Skip to content

Instantly share code, notes, and snippets.

View nickfromXXII's full-sized avatar
🌲

Nikita Mironov nickfromXXII

🌲
View GitHub Profile
def split_image_into_chars(img):
img_array = scipy.misc.imread(img, flatten=True)
print(img_array.shape)
rows = img_array.shape[0]
cols = img_array.shape[1]
img_data = 255.0 - img_array.reshape(rows * cols)
img_array = (img_data / 255.0 * 0.99) + 0.01
img_array = np.array(img_array).reshape(rows, cols)
#include <iostream>
#include <random>
#include <algorithm>
#include <fstream>
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/io.hpp>
using namespace boost::numeric;
@nickfromXXII
nickfromXXII / exmaple.txt
Last active October 22, 2016 19:35
turnip2 code example
function main() return int
{
new arr = array of int(10);
repeat 10 {
arr[index] = index+1;
}
repeat 10 {
print arr[index];
}