This file contains hidden or 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
| #!/bin/bash | |
| # tmux requires unrecognized OSC sequences to be wrapped with DCS tmux; | |
| # <sequence> ST, and for all ESCs in <sequence> to be replaced with ESC ESC. It | |
| # only accepts ESC backslash for ST. | |
| function print_osc() { | |
| if [[ -n $TERM ]] ; then | |
| printf "\033Ptmux;\033\033]" | |
| else | |
| printf "\033]" |
This file contains hidden or 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
| """ | |
| 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) |