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
CIGAR | |
REBUT | |
SISSY | |
HUMPH | |
AWAKE | |
BLUSH | |
FOCAL | |
EVADE | |
NAVAL | |
SERVE |
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 time import sleep | |
from random import randint | |
import pygame | |
pygame.init() | |
#Initialise the screen | |
xmax = 600 #Width of screen in pixels | |
ymax = 600 #Height of screen in pixels | |
screen = pygame.display.set_mode((xmax, ymax), 0, 24) #New 24-bit screen |
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 gpiozero import InputDevice | |
NUM_PINS = 28 | |
PULL_UP_PINS = [2, 3] | |
PINS = list(set(list(range(NUM_PINS))) - set(PULL_UP_PINS)) | |
MINIMUM_DOTS_REQUIRED = 5 | |
COLOR_PINS = { | |
27: 'red', | |
10: 'green', |
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
High Card: 1,302,540 (50.1177%) | |
Pair: 1,098,240 (42.2569%) | |
Two Pair: 123,552 (4.7539%) | |
Three of a Kind: 54,912 (2.1128%) | |
Straight: 10,200 (0.3925%) | |
Flush: 5,108 (0.1965%) | |
Full House: 3,744 (0.1441%) | |
Four of a Kind: 624 (0.0240%) | |
Straight Flush: 36 (0.0014%) | |
Royal Flush: 4 (0.0002%) |
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 pathlib import Path | |
from structlog import get_logger | |
from PIL import Image | |
logger = get_logger() | |
dir = Path.cwd() |
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 json | |
import argparse | |
with open("words.json") as f: | |
WORDS = json.load(f) | |
def starts_with(chars): | |
return { | |
word | |
for word in WORDS |
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 pathlib import Path | |
from collections import defaultdict | |
missing_wheels = defaultdict(set) | |
extra_wheels = defaultdict(set) | |
rewrites = set() | |
total_missing = 0 | |
total_extra = 0 | |
with open('missing.txt') as f: |
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 string import ascii_lowercase | |
import argparse | |
import random | |
LINUX_SYSTEM_DICT = '/usr/share/dict/american-english' | |
MAC_SYSTEM_DICT = '/usr/share/dict/words' | |
BIG_WORDLIST = 'words.txt' | |
# wordlist = LINUX_SYSTEM_DICT | |
wordlist = MAC_SYSTEM_DICT |
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
package=$1 | |
mapfile -t versions < versions.txt | |
for v in "${versions[@]}" | |
do | |
echo $v | |
date | |
/usr/bin/time -f "piw-import $package-$v-*.whl -y --duration 00:%E" -ao imports.sh pip3 wheel $package==$v -q --no-deps --no-binary $package --extra-index-url https://www.piwheels.org/simple --prefer-binary | |
done |
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 pathlib import Path | |
from piwheels.slave.builder import Builder, Wheel | |
b = Builder(None, None) | |
w = Wheel(Path('awkward-1.0.0-cp37-cp37m-linux_armv7l.whl')) | |
with open('dependencies.txt', 'w') as f: | |
for pkg in w.dependencies['apt']: | |
f.write(pkg + '\n') |
NewerOlder