I hereby claim:
- I am chrisbeaumont on github.
- I am chrisbeaumont (https://keybase.io/chrisbeaumont) on keybase.
- I have a public key ASDB4h57GMHDCGEVEyzsGBh1IDft6ve0ZDdxfnCyBhLkhwo
To claim this, I am signing this object:
<style> | |
@font-face { | |
font-family: "Computer Modern"; | |
src: url('http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf'); | |
} | |
div.cell{ | |
width:800px; | |
margin-left:16% !important; | |
margin-right:auto; | |
} |
import os | |
import pickle | |
from collections import defaultdict | |
from random import choice | |
import requests | |
from soupy import Soupy, Q | |
ROM = open('wheel.nes', 'rb').read() | |
CLUESET_PATH = 'clues.pickle' |
""" | |
An attempt to embed an IPython Qt Terminal widget in-process | |
Current Behavior | |
---------------- | |
1) Multiple widgets can be instantiated | |
2) Each widget shares the same namespace (and underlying kernel) |
# -*- coding: utf-8 -*- | |
""" | |
This script loads a Brain Tumor DICOM dataset into Glue. | |
The data comes from http://www.osirix-viewer.com/datasets/DATA/BRAINIX.zip | |
To run this locally, download and unzip that file, and run this script | |
from the directory that you dowloaded the ZIP file to | |
This requires the dicom library, which you can install via |
I hereby claim:
To claim this, I am signing this object:
# add to /opt/retropie/configs/nes/emulators.cfg | |
wheel="python3.4 /home/pi/wheel.py && /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-fceumm/fceumm_libretro.so --config /opt/retropie/configs/nes/retroarch.cfg /home/pi/RetroPie/roms/nes/Wheel2.nes" |
hexdump -C wheel.nes | less | |
... | |
00014220 52 53 41 d2 d9 54 4f 54 41 cc 45 43 4c 49 50 53 |RSA..TOTA.ECLIPS| | |
00014230 45 20 4f c6 54 48 45 20 53 d5 ce 46 49 52 53 54 |E O.THE S..FIRST| | |
00014240 20 44 41 d4 c5 53 54 41 54 45 20 4f c6 54 48 45 | DA..STATE O.THE| | |
00014250 20 55 4e 49 4f ce 41 44 44 52 45 d3 d3 4d 4f 56 | UNIO.ADDRE..MOV| |
import requests | |
from soupy import Soupy, Q | |
URL = "https://sites.google.com/site/wheeloffortunepuzzlecompendium/home/compendium/season-%i-compendium" | |
def scrape(): | |
for i in range(1, 31): | |
dom = Soupy(requests.get(URL % i).text, 'html5') |
def encode(clue): | |
"""Encode a plaintext clue into wheelscii.""" | |
result = [] | |
for c in clue: | |
if c == '\n': | |
result[-1] |= 0x80 | |
else: | |
result.append(ord(c)) | |
result[-1] |= 0x80 | |
result[-2] |= 0x80 |
def parse_clues(data): | |
""" | |
Traverse a block of wheelscii-encoded puzzles, | |
yielding each decoded puzzle in ascii | |
""" | |
word = [] | |
for pos, char in enumerate(data): | |
# check for signal character | |
if char & 0x80: |