Skip to content

Instantly share code, notes, and snippets.

{
"a":"END",
"b":"START",
"c":"\n",
"d":"the",
"e":"I",
"f":"to",
"g":"and",
"h":"a",
"i":"of",
{
"d":{
0:{"c":8,"aw":9,…,"i6":34,"d7":35},
1:{"c":7,"bB":8,…,"gm":46,"aj":47},
2:{"cP":1,"bG":2,…,"k9":51,"mc":52}
}
}
@docmarionum1
docmarionum1 / autoencode-mnist.ipynb
Last active July 28, 2019 10:38
Autoencode MNIST
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Read the file into a dataframe.
with open('dictionary/instance_types_en.ttl', 'r', encoding="utf8") as f:
f.readline()
for l in f.readlines():
try:
split = l.split(' ')
rows.append((split[0].split('/')[-1], split[2]))
except:
print(l)
@docmarionum1
docmarionum1 / codenames-2-words.py
Last active December 24, 2017 19:47
Codenames 2
df = pd.read_csv(
'dictionary/conceptnet-assertions-5.5.5.csv.gz',
sep='\t', header=None,
names=['uri', 'relation', 'from', 'to', 'json']
)
df = df[['from', 'json']].drop_duplicates(subset='from')
df = df[(df['from'].str.extract(r'/./([^/]*)/.*') == 'en')]
df['from'] = df['from'].str.extract(r'/./[^/]*/([^/]*).*')
df = df[
df['json'].str.contains('verbosity') |
@docmarionum1
docmarionum1 / .gitignore
Last active December 18, 2017 23:48
Codenames Blog
**.bin
.ipynb_checkpoints
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int sensorValue = analogRead(A5);
Serial.println(sensorValue);
Language City Nodes Edges Total Articles Sample Ratio
Chinese Shanghai 285000 880000 850000 .36
English New York City 501000 2000000 5000000 .10
Japanese Tokyo 250000 812000 1000000 .25
Russian Moscow 208000 645000 1273000 .16
Turkish Istanbul 87500 351000 275000 .32