show dbs
Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from collections import OrderedDict | |
def rename_state_dict_keys(source, key_transformation, target=None): | |
""" | |
source -> Path to the saved state dict. | |
key_transformation -> Function that accepts the old key names of the state | |
dict as the only argument and returns the new key name. | |
target (optional) -> Path at which the new state dict should be saved |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Rob Trew @complexpoint 2015 | |
function run() { | |
"use strict"; | |
var blnUseKeyboardMaestro = false; | |
// EDIT TO NAMES OF TWO ALTERNATIVE SOUND OUTPUT DEVICES | |
var dctSources = { // A unique substring for each is enough | |
primary: "Internal", | |
secondary: "Elgato" |
You can use this diagram as a template to create your own git branching diagrams. Here's how:
- Create a new diagram with diagrams.net (formerly draw.io)
- Go to File > Open From > URL
- Insert this url (it points to the xml data below):
https://gist.githubusercontent.com/bryanbraun/8c93e154a93a08794291df1fcdce6918/raw/bf563eb36c3623bb9e7e1faae349c5da802f9fed/template-data.xml
- Customize as needed for your team.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
[Parameter(Mandatory, HelpMessage = 'Path to Maria DB Installation. C:\Program Files\MariaDB 10.9')] | |
[string]$SQLPath, | |
[Parameter(Mandatory, HelpMessage = 'Location to store backups. C:\DBServerBackups')] | |
[string]$BackupDirectory, | |
[Parameter(Mandatory, HelpMessage = 'SQL User with access to your DB.')] | |
[string]$User, | |
[Parameter(Mandatory, HelpMessage = 'Password for the SQL User.')] | |
[string]$Pass, | |
[Parameter(HelpMessage = 'Port Number for your SQL Instance. Default: 3306')] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function run() { | |
// KEYBOARD MAESTRO VARIABLES IN YOSEMITE JXA JAVASCRIPT FOR APPLICATIONS | |
// FINDING, CREATING, READING, UPDATING | |
// SIMPLE EXAMPLE - TOGGLING A BOOLEAN KM VARIABLE FROM .js | |
var strKMVarName = "flag"; | |
The initial source comes from sdcuike/issueBlog#4
https://github.com/PacktPublishing free to download books code by Packet
https://github.com/EbookFoundation/free-programming-books Very immense
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call plug#begin() | |
Plug 'drewtempelmeyer/palenight.vim' | |
Plug 'vim-airline/vim-airline' | |
Plug 'wlangstroth/vim-racket' | |
Plug 'sheerun/vim-polyglot' | |
Plug 'rust-lang/rust.vim' | |
Plug 'preservim/tagbar' | |
Plug 'universal-ctags/ctags' | |
Plug 'luochen1990/rainbow' | |
Plug 'vim-syntastic/syntastic' |
NewerOlder