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
def read_zmapplusgrid(inputfile,dtype=np.float64): | |
"""Read ZmapPlus grids | |
Format is explained here http://lists.osgeo.org/pipermail/gdal-dev/2011-June/029173.html""" | |
# read header, read until second '@', record header lines and content | |
infile = open(inputfile,'r') | |
comments=[] | |
head=[] | |
a=0 # count '@'s | |
headers=0 # cound header+comment lines |
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
""" | |
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) |