Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
| apt update | |
| apt install -y emacs-nox aptitude screen xcscope-el gdb nano || echo 0 && echo "Success" | |
| python3 -m pip install git-remote-codecommit opennmt-tf==1.25.1 | |
| cat << EOF > ~/.gdbinit | |
| set print thread-events off | |
| define hook-run | |
| catch throw | |
| end | |
| define hook-quit |
| # This isn't supposed to run as a bash script, i named it with ".sh" for syntax highlighting. | |
| # https://developer.nvidia.com/nsight-systems | |
| # https://docs.nvidia.com/nsight-systems/profiling/index.html | |
| # My preferred nsys (command line executable used to create profiles) commands | |
| # | |
| # In your script, write | |
| # torch.cuda.nvtx.range_push("region name") | |
| # ... |
| using namespace System.Management.Automation | |
| Register-ArgumentCompleter -CommandName ssh,scp,sftp -Native -ScriptBlock { | |
| param($wordToComplete, $commandAst, $cursorPosition) | |
| $knownHosts = Get-Content ${Env:HOMEPATH}\.ssh\known_hosts ` | |
| | ForEach-Object { ([string]$_).Split(' ')[0] } ` | |
| | ForEach-Object { $_.Split(',') } ` | |
| | Sort-Object -Unique | |
| # For now just assume it's a hostname. |
| # Install tmux 3.0a on Centos | |
| # install deps | |
| sudo yum install -y gcc kernel-devel make ncurses-devel | |
| # DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
| curl -LOk https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz | |
| tar -xf libevent-2.1.11-stable.tar.gz | |
| cd libevent-2.1.11-stable | |
| ./configure --prefix=/usr/local |
| from sklearn.base import BaseEstimator | |
| from sklearn.exceptions import NotFittedError | |
| import numpy as np | |
| class IRFF(BaseEstimator): | |
| ''' | |
| Random fourier features using the improved embedding | |
| https://www.cs.cmu.edu/~schneide/DougalRandomFeatures_UAI2015.pdf | |
| ''' |
Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
| import tensorflow as tf | |
| import numpy as np | |
| class TextCNN(object): | |
| """ | |
| A CNN for text classification. | |
| Uses an embedding layer, followed by a convolutional, max-pooling and softmax layer. | |
| """ | |
| def __init__( |
This is unmaintained, please visit Ben-PH/spacemacs-cheatsheet
SPC q q - quitSPC w / - split window verticallySPC w - - split window horizontallySPC 1 - switch to window 1SPC 2 - switch to window 2SPC w c - delete current window| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |