Skip to content

Instantly share code, notes, and snippets.

View mutaku's full-sized avatar
🌌
Latent Layer 5

Matthew Martz mutaku

🌌
Latent Layer 5
View GitHub Profile
@mutaku
mutaku / h_index.py
Last active December 25, 2015 00:59
calculating h-indices
def h_index(pubs):
"""n-publicaions with at least n-citations"""
# sort the list of citations
pubs = sorted(pubs)
# iterate over the sorted list
for i, x in enumerate(pubs):
# number of citations including this one and greater
n = len(pubs[i:])
# if this citaiton index is greater than or equal to
# n, we have an h_index
import matplotlib.pyplot as plt
import numpy
import random
plt.ion()
fig = plt.figure()
ax = fig.add_subplot(111)
ax.grid(True)
@mutaku
mutaku / tp.txt
Last active December 23, 2015 22:08
3,756,801,695,685 * 2 ** 666,669
8729665078730328091314557268734156473613950185152950602049843728208034325946918787329158266064027861043298239330794714013826580218748500641522598952607590795799064468515069836898047493693082679392029463424625543212876362998418798462641335336998514179456681384364083975615527762405081962979604472395266442768112276690847935078750147731462340816553733768587884838462777536349653792709019862773625059889074191154289621491034003590790641983887878411365223260435885725428162598241032105102921385491198772866251019579351087804511314809920555306874212135858980476457002173011091830443721301579747874591726934233531699191347635812351733440340404754751648770174614360024473777649948821641117223990500791715530162151151130914358222393671600226561064277722240480978092876056871262063724160314662950648506744512712479830619414634264264554329249200648307230492412721994687720776279718779880815511406700814888486548708198857781905173258383577093461943418006524002305428377022609954779620336579563127290267552268762951352229361824520779258
@mutaku
mutaku / diablo_walls.py
Last active December 22, 2015 04:49
grabbing some diablo walls
import urllib
RESOLUTIONS = ['1024x768',
'1152x864',
'1280x800',
'1280x1024',
'1600x900',
'1600x1200',
'1680x1050',
'1920x1080',
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
>>> import Queue
>>> import os
>>> os.chdir("c:/users/matthew/watchdog")
>>> from watchdog import WatchDog
>>> import threading
>>> class WD(threading.Thread):
... def run(self):
... while True:
... path = pathPool.get()
... if path:
@mutaku
mutaku / tkwatchdog.py
Last active August 3, 2018 16:56
monitor directory for file changes
import multiprocessing
import os
import sys
import time
import Queue
import threading
from tkwindow import Report
from watchdog import WatchDog
@mutaku
mutaku / season_3.js
Last active December 19, 2015 01:29
PoE Race Season Schedule
var c = [{"id":"Descent (S03D001)","url":null,"event":false,"registerAt":null,"startAt":"2013-06-29T00:00:00Z","endAt":"2013-06-29T01:00:00Z","rules":[],"ladder":[]},{"id":"1 Hour No Proj Party (S03F002)","url":null,"event":false,"registerAt":null,"startAt":"2013-06-29T03:00:00Z","endAt":"2013-06-29T04:00:00Z","rules":[],"ladder":[]},{"id":"135 Minute Solo (S03C003)","url":null,"event":false,"registerAt":null,"startAt":"2013-06-29T07:00:00Z","endAt":"2013-06-29T09:15:00Z","rules":[],"ladder":[]},{"id":"90 Min Immolation Solo (S03F004)","url":null,"event":false,"registerAt":null,"startAt":"2013-06-29T12:00:00Z","endAt":"2013-06-29T13:30:00Z","rules":[],"ladder":[]},{"id":"90 Minute Turbo Solo (S03C005)","url":null,"event":false,"registerAt":null,"startAt":"2013-06-29T14:00:00Z","endAt":"2013-06-29T15:30:00Z","rules":[],"ladder":[]},{"id":"1 Hour Party (S03F006)","url":null,"event":false,"registerAt":null,"startAt":"2013-06-29T21:00:00Z","endAt":"2013-06-29T22:00:00Z","rules":[],"ladder":[]},{"id":"Descent (S03