Skip to content

Instantly share code, notes, and snippets.

import asyncio
import pyz3r
BASE_ROM_LOCATION = "ZeldaBase.sfc"
OUT_ROM_LOCATION = "ZeldaPatched.sfc"
async def load_base_rom():
return await pyz3r.rom.read("ZeldaBase.sfc")
import static org.junit.Assert.assertTrue;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.junit.Test;
public class JacksonBugTest {
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="debug" strict="true" monitorInterval="5">
<!-- Top level filter applying to Root logger? -->
<!-- <Filter type="ThresholdFilter" level="info" /> -->
<Appenders>
<!-- Log to stdout with a particular log format -->
<Appender type="Console" name="STDOUT" target="SYSTEM_OUT">
<!-- %M - method name, %F - file name (no prefix) -->
<Layout type="PatternLayout" pattern="%d %-5p [%t] %C.%M (%F:%L) - %m%n"/>
ubuntu@docker:~/murmur$ docker run -t -i 24ed1 /bin/bash
root@44a0260e20f8:/# /usr/sbin/murmurd -fg
Unable to load library icui18n "Cannot load library icui18n: (libicui18n.so.48: cannot open shared object file: No such file or directory)"
Failed to set initial capabilities
<W>2013-09-12 04:44:25.158 Initializing settings from /etc/mumble-server.ini (basepath /etc)
<W>2013-09-12 04:44:25.159 OpenSSL: OpenSSL 1.0.1 14 Mar 2012
<C>2013-09-12 04:44:25.159 Successfully switched to uid 103
<C>2013-09-12 04:44:25.159 Failed to set initial capabilities
<W>2013-09-12 04:44:25.161 ServerDB: Opened SQLite database /var/lib/mumble-server/mumble-server.sqlite
<W>2013-09-12 04:44:25.195 Resource limits were 0 0
from blueprint import example
from extensions import mail
from flask import Flask
import settings
def create_app(settings=settings):
ret_val = Flask(__name__)
ret_val.config.from_object(settings)
# initialize extensions...
salary = 76000
rent = 1781 * 12 # average 2bdrm http://www.apartmentratings.com/rate?a=MSAAvgRentalPrice&msa=7362
food = 200 * 52 # based on my personal rate eating "well" adjusted for a family of three which is eating "budget"
clothing = 500 * 3 # mostly a guess, but I would suspect this is about right
gas = 40 * 52 # assumes a relatively short commute
federal_taxes = salary * .20 # based on tax rate from wikipedia, assumes some discounts
state_taxes = salary * .09 # eyeballing http://www.tax-brackets.org/californiataxtable
utilities = 160 * 12 # mostly based around my experience in SLO and now
cable_and_internet = 100 * 12 # comcast bundle
cell_service = 100 * 12 # assumes phone for each adult
@mgius
mgius / output
Last active December 11, 2015 06:18
import random
trials = 10000
win_count = 0
bag = ['RG', 'RP', 'GP']
for _ in xrange(trials):
if 'G' in random.choice(bag):
win_count += 1
@mgius
mgius / cpython
Created November 20, 2012 20:27
mapsvslist.py
withMap count 1000 duration 0.498514890671
withList count 1000 duration 0.469129085541
withListAppend count 1000 duration 0.613918066025
withMap count 2000 duration 1.12835097313
withList count 2000 duration 0.877814054489
withListAppend count 2000 duration 1.24980807304
withMap count 3000 duration 1.59243202209
withList count 3000 duration 1.32240200043