Skip to content

Instantly share code, notes, and snippets.

@eknowles
eknowles / gist:1220734
Created September 15, 2011 23:02
panel toggle
alias "cmenu1" "showpanel specmenu; bind v cmenu2"
alias "cmenu2" "hidepanel specmenu; bind v cmenu1"
bind "v" "cmenu1"
@eknowles
eknowles / martingale
Created September 10, 2012 11:05
martingale
import random
####################
# THE RULES
# 1. Play Roulette once a week for 3 hours for a year
# 2. Bring 500
# 3. Play Minimum bet on two tables on red
# 4a. If red continue to play minimum bet
# 4b. If black double bet (continue to double until red)
# 4c. If unable to double bet, reset bet to minimum
import urllib2, urllib
import json
import StringIO
import gzip
headers = {
"Accept": "*/*",
"Accept-Encoding": "gzip,deflate,sdch",
"Accept-Language": "en-US,en;q=0.8",
<?xml version="1.0" encoding="UTF-8"?>
<jhove xmlns="http://hul.harvard.edu/ois/xml/ns/jhove" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="epubcheck" release="3.0.1" date="2013-05-10">
<date>2014-03-21T09:26:59+00:00</date>
<repInfo uri="9781407144207.epub">
<created>2014-01-31T07:56:14Z</created>
<lastModified>2014-01-31T07:59:06Z</lastModified>
<format>application/epub+zip</format>
<version>3.0</version>
<status>Well-formed</status>
<mimeType>application/epub+zip</mimeType>
var _0xba00=["\x62\x6F\x64\x79","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x63\x2D\x62\x69\x67\x2D\x70\x72\x65\x76\x69\x65\x77\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x22\x20\x61\x6C\x74\x3D\x22\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x63\x2D\x70\x72\x65\x76\x69\x65\x77\x2D\x69\x6D\x67\x22\x20\x2F\x3E\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x22\x20\x61\x6C\x74\x3D\x22\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x63\x2D\x70\x72\x65\x76\x69\x65\x77\x2D\x73\x74\x61\x74\x74\x72\x61\x6B\x22\x20\x2F\x3E\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x22\x20\x61\x6C\x74\x3D\x22\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x63\x2D\x70\x72\x65\x76\x69\x65\x77\x2D\x73\x6F\x75\x76\x65\x6E\x69\x72\x22\x20\x2F\x3E\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x63\x2D\x70\x72\x65\x76\x69\x65\x77\x2D\x74\x69\x74\x6C\x65\x22\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x2
$(".item").hover(
function () {
var SearchItem = $(this);
// on mouse in
if (SearchItem.hasClass('priced')) {
// has already set a price so dont do anything
} else {
SearchItem.find('.rarity').html('Loading...');
var itemurl = "http://steamcommunity.com/market/listings/" + gameid + "/" + SearchItem.find('img.smallimg').attr("alt") + "/";
var xhr = new XMLHttpRequest();
import urllib2, urllib
import json
import StringIO
import gzip
import random
import codecs
import time
import pprint
import requests
import re
<?xml version="1.0" encoding="UTF-8"?>
<jhove xmlns="http://hul.harvard.edu/ois/xml/ns/jhove" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="epubcheck" release="3.0.1" date="2013-05-10">
<date>2014-04-08T13:04:21+01:00</date>
<repInfo uri="9781407143262.epub">
<created>2014-04-08T13:01:16Z</created>
<lastModified>2014-04-08T13:03:49Z</lastModified>
<format>application/epub+zip</format>
<version>3.0</version>
<status>Well-formed</status>
<mimeType>application/epub+zip</mimeType>
2014-04-30T13:30:29.598Z - info: cookies/session set up
2014-04-30T13:32:07.131Z - info: Active trades: 59
2014-04-30T13:32:16.684Z - info: Trade offer from 76561198085451214 with ID=27459801 was declined.
2014-04-30T13:32:16.714Z - info: Trade offer from 76561198125401232 with ID=26764627 was declined.
2014-04-30T13:32:16.732Z - info: Trade offer from 76561198124258271 with ID=27533100 was declined.
2014-04-30T13:32:16.799Z - info: Trade offer from 76561198073197479 with ID=26764480 was declined.
2014-04-30T13:32:16.835Z - info: Trade offer from 76561197967574843 with ID=27496295 was declined.
2014-04-30T13:32:17.037Z - info: Active trades: 55
2014-04-30T13:32:17.037Z - info: Active trades: 54
2014-04-30T13:32:17.362Z - info: Trade offer from 76561198015415658 with ID=26546885 was declined.
{ "username": "gustavotsi", "classid": "200000003" },
{ "username": "silenta98", "classid": "200000040" },
{ "username": "mnimic", "classid": "200000255" },
{ "username": "assymagee", "classid": "200000260" },
{ "username": "rune1687", "classid": "200000290" },
{ "username": "ready_set_stare", "classid": "200000307" },
{ "username": "dagbaby89", "classid": "200000308" },
{ "username": "happystan257@msn.com", "classid": "200000326" },
{ "username": "th3toxice", "classid": "200000374" },
{ "username": "moody1990", "classid": "200000380" },