Skip to content

Instantly share code, notes, and snippets.

@TheFeshy
TheFeshy / heist.py
Last active March 10, 2019 16:25
Fallen London Heist simulator
#!/bin/python3
"""Heist Simulator."""
import random
from enum import Enum
import argparse
import copy
"""
@TheFeshy
TheFeshy / PKGBUILD
Last active February 21, 2019 03:24
PKGBUILD files to run Makerbot Desktop in Archlinux (for version 3.9.1 anyway)
# Maintainer: Francisco Martinez <zomernifalt at gmail dot com>
pkgname=makerbot-desktop
pkgver=3.9.1
_openmeshver=3.2_3.2
pkgrel=2
pkgdesc="A complete, free 3D printing solution for discovering, managing, and sharing your 3D
prints."
arch=('x86_64')
url="https://www.makerbot.com/desktop"
license=('GPL')
@TheFeshy
TheFeshy / dynamic_convenience_functions.py
Created March 31, 2012 17:18
Dynamically add "convenience" functions from a dictionary of values
class A(object):
items = {"one":1,
"two":2}
def __init__(self):
self.item = 0
for key in A.items:
f = lambda self,k=key:(self.__setattr__("item", self.items[k]),self)[1]
f.__name__=key
setattr(A,key,f)