A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
| """ | |
| 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) |
| from matplotlib.animation import FuncAnimation | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| fig, ax = plt.subplots(figsize=(5, 8)) | |
| def update(i): | |
| im_normed = np.random.random((64, 64)) | |
| ax.imshow(im_normed) |
| # Note – this is not a bash script (some of the steps require reboot) | |
| # I named it .sh just so Github does correct syntax highlighting. | |
| # | |
| # This is also available as an AMI in us-east-1 (virginia): ami-cf5028a5 | |
| # | |
| # The CUDA part is mostly based on this excellent blog post: | |
| # http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/ | |
| # Install various packages | |
| sudo apt-get update |
| #CONDOR_HOST = reynolds-master.reynol.dz | |
| # | |
| #COLLECTOR_NAME = TEFPL at $(FULL_HOSTNAME)) | |
| #START = $(CS_START) | |
| #SUSPEND = $(CS_SUSPEND) | |
| #CONTINUE = $(CS_CONTINUE) | |
| #PREEMPT = $(CS_PREEMPT) | |
| #KILL = $(CS_KILL) | |
| # | |
| #DAEMON_LIST = MASTER, SCHEDD, STARTD |