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
#!/usr/bin/env python3.1 | |
movenames = [None, | |
'Pound', 'Karate Chop', 'DoubleSlap', 'Comet Punch', 'Mega Punch', 'Pay Day', 'Fire Punch', 'Ice Punch', 'ThunderPunch', 'Scratch', | |
'ViceGrip', 'Guillotine', 'Razor Wind', 'Swords Dance', 'Cut', 'Gust', 'Wing Attack', 'Whirlwind', 'Fly', 'Bind', | |
'Slam', 'Vine Whip', 'Stomp', 'Double Kick', 'Mega Kick', 'Jump Kick', 'Rolling Kick', 'Sand-Attack', 'Headbutt', 'Horn Attack', | |
'Fury Attack', 'Horn Drill', 'Tackle', 'Body Slam', 'Wrap', 'Take Down', 'Thrash', 'Double-Edge', 'Tail Whip', 'Poison Sting', | |
'Twineedle', 'Pin Missile', 'Leer', 'Bite', 'Growl', 'Roar', 'Sing', 'Supersonic', 'SonicBoom', 'Disable', | |
'Acid', 'Ember', 'Flamethrower', 'Mist', 'Water Gun', 'Hydro Pump', 'Surf', 'Ice Beam', 'Blizzard', 'Psybeam', | |
'BubbleBeam', 'Aurora Beam', 'Hyper Beam', 'Peck', 'Drill Peck', 'Submission', 'Low Kick', 'Counter', 'Seismic Toss', 'Strength', |
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
// https://blog.quickmediasolutions.com/2015/09/13/non-blocking-channels-in-go.html | |
// ...without using reflect | |
package util | |
import ( | |
"container/list" | |
) | |
// Channel that does not block when items are sent. To use the struct, simply |
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
#!/usr/bin/env python3 | |
from struct import pack, unpack | |
import sys | |
def main(args): | |
if not args: | |
print("Usage: python3 ndsicon.py file.nds | pnmtopng > icon.png") | |
print("Extract the game icon from a ROM dump.") | |
return 1 |
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
#!/usr/bin/env python | |
# written by magical | |
# based on http://blog.rabidgremlin.com.nyud.net/2010/11/28/4-little-words/ | |
# licensed under WTFPL | |
# works with python2 and python3 | |
WORDS = [ "A", "AID", "ANA", "ARC", "AT", "AWN", "BAR", "BET", "BOG", "BUG", "CAB", "COD", "COY", "DAD", | |
"DES", "DOE", "DUE", "EGO", "ETC", "FAT", "FIR", "FUM", "GAP", "GIL", "GUY", "HAP", "HER", "HIT", "HOW", "ICY", "ION", | |
"IVY", "JET", "JOY", "KIM", "LAM", "LEN", "LIT", "LOW", "MAN", "MEL", "MOD", "MUG", "NAY", "NIP", "NOV", "OAR", "OIL", |
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
--- | |
# pokemon: a pokemon (name or identifier) | |
# form: the pokemon's form (identifier) | |
# version: a space-separated list of version identifiers | |
# level: the pokemon's level | |
# type: one of... | |
# - overworld: a one-shot wild pokemon (default) | |
# - roaming: a pokemon that moves from route to route | |
# - starter: given by the professor at the beginning of the game |
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
#!/usr/bin/env python3 | |
from sys import argv, stdout | |
from urllib.request import urlopen as _urlopen, Request | |
from urllib.parse import urlunsplit | |
import json | |
import re | |
USER_AGENT = "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.815.0 Safari/535.1" |
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
#!/usr/bin/env python3 | |
"""Download an HTML page, translating <img> tags to data: URIs""" | |
import sys | |
import lxml.html as etree | |
from urllib.request import urlopen | |
from base64 import b64encode |
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
hypothetical design for a daily todo list app | |
sits in the tray | |
click the tray icon to toggle the main window | |
has space for 10 (7? 12?) todo items | |
an item is a status icon and a short bit of text | |
status can be · or ✔ or ✘ | |
click on an item to edit its text | |
click on a blank item to add a new item | |
click on the status to cycle through |
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
global Mul | |
global Div | |
; input: [esp+4] m | |
; [esp+8] n | |
; return: eax low word of product | |
; edx high word of product | |
Mul: | |
push esi | |
push edi |
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
gcd(1) | |
====== | |
:doctype: manpage | |
:man source: gcd | |
:man version: 0.1 | |
NAME | |
---- | |
gcd, lcm - compute greatest common divisor and least common multiple |