Here I'm trying to understand what happens when I run
./hello
#include | #include <stdio.h> | |
| int f0(unsigned int x) { return x? (x&(1<<31)? f1(x<<1) : f0(x<<1)) : 1; } | |
| int f1(unsigned int x) { return x? (x&(1<<31)? f3(x<<1) : f2(x<<1)) : 0; } | |
| int f2(unsigned int x) { return x? (x&(1<<31)? f0(x<<1) : f4(x<<1)) : 0; } | |
| int f3(unsigned int x) { return x? (x&(1<<31)? f2(x<<1) : f1(x<<1)) : 0; } | |
| int f4(unsigned int x) { return x? (x&(1<<31)? f4(x<<1) : f3(x<<1)) : 0; } | |
| int t0(unsigned int x) { return x? (x&(1<<31)? t1(x<<1) : t0(x<<1)) : 1; } | |
| int t1(unsigned int x) { return x? (x&(1<<31)? t0(x<<1) : t2(x<<1)) : 0; } | |
| int t2(unsigned int x) { return x? (x&(1<<31)? t2(x<<1) : t1(x<<1)) : 0; } |
Here I'm trying to understand what happens when I run
./hello
#include | """ | |
| 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) |
| // Named tuple for C++ | |
| // Example code from http://vitiy.info/ | |
| // Written by Victor Laskin ([email protected]) | |
| // Parts of code were taken from: https://gist.github.com/Manu343726/081512c43814d098fe4b | |
| namespace foonathan { | |
| namespace string_id { | |
| namespace detail | |
| { |
| # This script tries as best as possible to filter out bad replays | |
| # Pass it a subdir, and it will read all '.rep' files, and spit out a list | |
| # of the corrupt files in stdout | |
| from __future__ import print_function | |
| from pyreplib import replay # https://github.com/HearthSim/pyreplib/ | |
| from itertools import repeat | |
| from multiprocessing import Pool, Process, Pipe | |
| from multiprocessing.pool import ThreadPool | |
| import os | |
| import sys |
| # This script tries as best as possible to filter out bad replays | |
| # Pass it a subdir, and it will read all '.rep' files, and spit out a list | |
| # of the corrupt files in stdout | |
| from __future__ import print_function | |
| from pyreplib import replay | |
| from itertools import repeat | |
| from multiprocessing import Pool, Process, Pipe | |
| from multiprocessing.pool import ThreadPool | |
| from Queue import Queue | |
| import os |
| # /------------------------------------------\ | |
| # | don't forget to download the .tp file | | |
| # | and place it in the user's directory :› | | |
| # | | | |
| # | also install lolcat: | | |
| # | https://github.com/busyloop/lolcat | | |
| # \------------------------------------------/ | |
| alias test-passed='if [ "$?" -eq "0" ]; then lolcat ~/.tp -a -s 40 -d 2; fi;' |