Skip to content

Instantly share code, notes, and snippets.

@obskyr
obskyr / banksy.py
Last active March 9, 2018 13:51
A Python script to convert Game Boy memory addresses between absolute and banked forms.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Convert Game Boy addresses between absolute and banked forms.
from __future__ import print_function
from __future__ import unicode_literals
import sys
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
// Parse dispmanx-safe colors from command-line arguments
typedef struct __attribute__((__packed__)) {
uint8_t r;
uint8_t g;
@obskyr
obskyr / helloimdean.py
Created November 19, 2013 00:17
The Dean from Community does a lot of interesting stuff. The best part of this code is easily the stupidly long list of verbs.
# -*- coding: utf-8 -*-
import random
verbing = ['coming', 'opening', 'standing', 'attempting', 'beating', 'clearing', 'demanding', 'failing', 'pulling', 'regarding', 'studying', 'dancing', 'feeding', 'improving', 'letting', 'sleeping', 'suggesting', 'wondering', 'bargaining', 'booking', 'crying', 'filling', 'knitting', 'laughing', 'preparing', 'signing', 'striking', 'wanting', 'cooking', 'sharing', 'applying', 'approaching', 'computing', 'controlling', 'deciding', 'discussing', 'grouping', 'lifting', 'lighting', 'mining', 'offspring', 'pudding', 'threatening', 'breeding', 'caring', 'choosing', 'climbing', 'corresponding', 'establishing', 'expecting', 'healing', 'heating', 'lending', 'listing', 'maintaining', 'placing', 'planting', 'pressing', 'questioning', 'restructuring', 'rolling', 'shaking', 'spelling', 'arising', 'bombing', 'claiming', 'cling', 'enjoying', 'entering', 'picking', 'reasoning', 'screening', 'shipping', 'voting', 'farming', 'joining', 'pointing', 'pushing', 'representing', 'searching', 'h