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
// ==UserScript== | |
// @name Autopoker | |
// @namespace jeroenvanhoof.nl | |
// @version 0.1 | |
// @description Pokie poke | |
// @author Jeroen van Hoof | |
// @match https://www.facebook.com/pokes/ | |
// @grant none | |
// ==/UserScript== |
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
import pymysql.cursors | |
connection = pymysql.connect(host='localhost', user='slayer', password='', db='rumor_slayer', charset='utf8mb4', cursorclass=pymysql.cursors.DictCursor) | |
with connection.cursor() as cursor: | |
sql = "SELECT text FROM tweets" | |
cursor.execute(sql) | |
result = cursor.fetchall() | |
for tweet in result: |
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
function randomIndex(list) { | |
return Math.floor(Math.random() * list.length) - 1 | |
} | |
function triggerUpdate(el) { | |
el.click() | |
el.dispatchEvent(new Event('change')); | |
} | |
function fillRandom() { |
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
from words import words | |
minionese_to_english = {v: k for k, v in words.items()} | |
def translate(sentence, minionese=False): | |
dictionary = words if not minionese else minionese_to_english | |
result = "" | |
for word in sentence.split(" "): | |
if word in dictionary.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
from tqdm import tqdm | |
import string | |
import json | |
import collections | |
import numpy as np | |
import os | |
DATA_PATH = "data" | |
################################################################################################ |
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
# /home/jhoof/python/python36/bin/python3 bench.py | |
import openml | |
from arbok.bench import Benchmark | |
# We create a benchmark setup where we specify the headers, the interpreter we | |
# want to use, the directory to where we store the jobs (.sh-files), and we give | |
# it the config-file we created earlier. |
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
import openml | |
from arbok.bench import Benchmark | |
# We create a benchmark setup where we specify the headers, the interpreter we | |
# want to use, the directory to where we store the jobs (.sh-files), and we give | |
# it the config-file we created earlier. | |
bench = Benchmark( | |
headers="#PBS -lnodes=1:cpu3\n#PBS -lwalltime=15:00:00", |
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
import openml | |
from arbok.bench import Benchmark | |
# We create a benchmark setup where we specify the headers, the interpreter we | |
# want to use, the directory to where we store the jobs (.sh-files), and we give | |
# it the config-file we created earlier. | |
bench = Benchmark( | |
headers="#PBS -lnodes=1:cpu3\n#PBS -lwalltime=15:00:00", |
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
import openml | |
from arbok.bench import Benchmark | |
# We create a benchmark setup where we specify the headers, the interpreter we | |
# want to use, the directory to where we store the jobs (.sh-files), and we give | |
# it the config-file we created earlier. | |
bench = Benchmark( | |
headers="#PBS -lnodes=1:cpu3\n#PBS -lwalltime=15:00:00", | |
python_interpreter="/home/jhoof/python/python36/bin/python3", # Path to interpreter |
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
from words import words | |
minionese_to_english = {v: k for k, v in words.items()} | |
def translate(sentence, minionese=False): | |
dictionary = words if not minionese else minionese_to_english | |
result = "" | |
for word in sentence.split(" "): | |
if word in dictionary.keys(): |
OlderNewer