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
let mnist = {}; | |
let files = { | |
trainingImages: 'train-images.idx3-ubyte', | |
trainingLabels: 'train-labels.idx1-ubyte', | |
t10kImages: 't10k-images.idx3-ubyte', | |
t10kLabels: 't10k-labels.idx1-ubyte', | |
} | |
function loadMnist() { |
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
{ | |
"PL": { | |
"Belsk": { | |
"IGFPAN": 1 | |
}, | |
"Siedlce": { | |
"Konarskiego": 3 | |
}, | |
"Radom": { | |
"Tochtermana": 4 |
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
[ | |
{ | |
"name": "Buffalo", | |
"cities": "Davenport-Moline-Rock Island,Buffalo-Niagara Falls", | |
"latitudes": "41.4672010,42.8781000", | |
"longitudes": "-90.6883010,-78.8094000" | |
}, | |
{ | |
"name": "CENTRO", | |
"cities": "CCAA Andaluc\ufffda,Ayto Zaragoza", |
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
use std::cmp; | |
use std::fs; | |
extern "C" { | |
fn signal(sig: u32, cb: extern fn(u32)) -> fn(u32); | |
} | |
extern fn interrupt(_:u32) { | |
panic!(); | |
} |
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
# Script to process file as per https://www.youtube.com/watch?v=gF-f25dRbo8 | |
# Outputs to test.txt by default. | |
# Inputs as files on command line | |
import fileinput | |
if __name__ == "__main__": | |
output = 'test.txt' | |
with open(output, 'w') as f: | |
f.writelines(list(name + "&" + key.replace('+',' ') + "\n" for name, *keys in (line.strip().split('\t') for line in fileinput.input()) for key in keys)) |
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
list(((lambda program, input_stream, output_stream, instruction_stack=[], count=[]: | |
(lambda instruction_queue=[0], program_stack=[], program_memory=[0], pointer=[0], | |
instructions=[ | |
(count.append(0) or len(count) - 1, len(instruction_stack), x, instruction_stack.append([len(count)]) or instruction_stack[-1]) if x == '[' | |
else ( | |
(count.append(0) or len(count) - 1, len(instruction_stack), x, instruction_stack[-1].append(len(count)) or [instruction_stack.pop()[0],len(count)])if x == ']' | |
else (count.append(0) or len(count) - 1, len(instruction_stack), x, [len(count)]*2 | |
) | |
) for x in program]: | |
( |
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
// Create a number that takes 100s to transition after a 1s delay with an ease-in-out | |
test_number = new transitioned_variable(0, "100s", "ease-in-out", "1s"); | |
// Create a color with a 100s transition, and no set easing or delay | |
test_color = new transitioned_variable("#000", "100s", undefined, undefined, transitioned_variable.TYPE_COLOR); | |
// Bouncy transition | |
test_bounce = new transitioned_variable(0, "5s", "ease-in-out"); | |
// After a second, alter our values | |
setTimeout(function(){ | |
test_number.set(100); |
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
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
typedef struct { | |
size_t width, height; | |
double data[]; | |
} matrix; |
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
/* Hacker News Search Script | |
* | |
* Original Script by Kristopolous: | |
* https://gist.github.com/kristopolous/19260ae54967c2219da8 | |
* | |
* Usage: | |
* First, copy the script into your browser's console whilst on the Hacker News | |
* jobs page. Then, you can use the query function to filter the results. | |
* | |
* For example, |