This file contains hidden or 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 <stdio.h> | |
#include <stdint.h> | |
#include <assert.h> | |
#include <math.h> | |
static uint8_t reference[256][256] = { | |
#include "reference.h" | |
}; | |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>dataview test</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
This file contains hidden or 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 cv2 as cv | |
import numpy as np | |
import os.path | |
import sys | |
def is_useful_cover(f): | |
# intended for thumbnail images, width = 180 pixels | |
img = cv.imread(f) | |
img = cv.Canny(img, 100, 200) |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import re, sys | |
from heapq import heapify, heappush, heappop | |
class Bot: | |
def __init__(self, x, y, z, r): | |
self.x = x | |
self.y = y | |
self.z = z | |
self.r = r |
This file contains hidden or 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
#!/usr/bin/python3 | |
import Levenshtein | |
import sys | |
def read_wordlist(f): | |
return set(w.strip().lower() for w in f) | |
wordlist = read_wordlist(sys.stdin) | |
# filter out non-words, brand names, and regional spellings | |
wordlist = wordlist.intersection(read_wordlist(open('/usr/share/dict/american-english'))) |
This file contains hidden or 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 rc4(K): | |
B=256;S=range(B);b=c=d=0 | |
for a in S[:]:b=(b+S[a]+K[a%len(K)])%B;S[a],S[b]=S[b],S[a] | |
while 1:c=(c+1)%B;d=(d+S[c])%B;a,b=S[c],S[d]=S[d],S[c];yield S[(a+b)%B] |