Skip to content

Instantly share code, notes, and snippets.

View electromatter's full-sized avatar

Eric Chai electromatter

  • Washington, D.C.
  • 08:18 (UTC -04:00)
View GitHub Profile
@electromatter
electromatter / csgo.py
Created August 22, 2014 05:15
csgo lounge pull script
import urllib2
from BeautifulSoup import BeautifulSoup
import re
import sys
import time
maxrty = 10
idmin = 1216
idmax = 1216
@electromatter
electromatter / output.txt
Created August 22, 2014 05:16
csgolounge pull from csgo.py in range(1, 1216)
[1, 200, [[u'AD', u'35%', u'1.81', u'1'], [u'NiP', u'65%', u'0.53', u'1'], 'None']]
[2, 200, [[u'VG', u'52%', u'0.91', u'1'], [u'AD', u'48%', u'1.05', u'1'], u'VG']]
[3, 200, [[u'Serbia', u'52%', u'0.9', u'1'], [u'Portugal', u'48%', u'1.06', u'1'], u'Serbia']]
[4, 200, [[u'Portugal', u'73%', u'0.05 to 0.36', u'1'], [u'Netherlands', u'27%', u'2.68', u'1'], u'Netherlands']]
[5, 200, [[u'B&H;', u'32%', u'2.1', u'1'], [u'Czech.R', u'68%', u'0.05 to 0.46', u'1'], u'B&H;']]
[6, 200, [[u'DP', u'33%', u'2.03', u'1'], [u'Ducks', u'67%', u'0.05 to 0.47', u'1'], u'Ducks']]
[7, 200, [[u'NiP', u'74%', u'0.05 to 0.35', u'1'], [u"Na'Vi", u'26%', u'2.73', u'1'], 'None']]
[8, 200, [[u'VG', u'93%', u'0 to 0.08', u'1'], [u'F4G', u'8%', u'12.09', u'1'], u'VG']]
[9, 200, [[u'nfaculty', u'85%', u'0.05 to 0.17', u'1'], [u'BZSX', u'15%', u'5.64', u'1'], u'BZSX']]
[10, 200, [[u"Na'Vi", u'68%', u'0.05 to 0.47', u'1'], [u'nfaculty', u'32%', u'2.05', u'1'], 'None']]
@electromatter
electromatter / data-tracking.js
Last active August 29, 2015 14:06
data-tracking autotype
fs = new ActiveXObject("Scripting.FileSystemObject");
var obj = WScript.CreateObject("WScript.Shell");
objArgs = WScript.Arguments;
//objArgs[1]
f = fs.GetFile(objArgs(0));
ts = f.OpenAsTextStream(1, -2);
tags = []
@electromatter
electromatter / statutils.py
Created January 19, 2015 23:57
statutils.py
import math
from itertools import izip
import random
def bintrial(p):
return random.uniform(0, 1) < p
def runbintrials(n, p):
return [bintrial(p) for x in range(0, n)]
@electromatter
electromatter / cost.py
Created November 8, 2015 04:13
cost.py
items = {
'rocket': [(1, 'nose cone'), (10, 'heavy plate 2'), (4, 'rocket fin'), (2, 'booster'), (1, 'rocket engine')],
'nose cone': [(1, 'redstone torch'), (3, 'heavy plate')],
'booster': [(1, 'wool'), (4, 'meteor iron plate'), (1, 'fuel can'), (1, 'vent'), (2, 'heavy plate')],
'rocket engine': [(1, 'flint and steel'), (1, 'button'), (4, 'heavy plate'), (1, 'vent'), (1, 'tin can')],
'rocket fin': [(2, 'steel plate'), (4, 'heavy plate')],
'vent': [(1, 'steel plate'), (3, 'tin plate')],
'heavy plate 2': [(1, 'heavy plate'), (1, 'meteor iron plate')],
'heavy plate': [(2, 'steel plate'), (2, 'aluminum plate'), (2, 'bronze plate')],
'steel plate': [(2, 'steel')],
@electromatter
electromatter / LICENSE
Created February 15, 2016 05:23
crc32 - Ethernet, ... (0xedb88320)
Copyright (c) 2016, Eric Chai <electromatter@gmail.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
#!/usr/bin/env python3
import curses
import random
import grid
WIDTH=4
HEIGHT=4
/* Copyright (c) 2016, Eric Chai <electromatter@gmail.com>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
@electromatter
electromatter / _oasis
Created April 14, 2016 01:18
oasis template
OASISFormat: 0.4
Name: Mcaml
Version: 0.1
Authors: Eric Chai <electromatter@gmail.com>
#Maintainers:
Copyrights: (c) 2016 Eric Chai
LicenseFile: LICENSE
License: ISC
BuildTools: ocamlbuild
@electromatter
electromatter / LICENSE
Last active April 24, 2016 05:00
password
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions: