This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from io import BytesIO | |
from six.moves import xrange # pylint: disable=redefined-builtin | |
from six import byte2int | |
class CorruptError(Exception): | |
pass | |
def uncompress(src): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QMA 4 GEM 2007/01/11 | |
IIDX GOLD GLD 2007/02/21 | |
pop'n 15 G15 2007/04/25 | |
Otomedius GGG 2007/11/02 | |
DJ Troopers HDD 2007/12/19 | |
QMA 5 HAL 2008/01/12 | |
pop'n 16 H16 2008/03/24 | |
Horseriders G23 2008/04/09 | |
GFDM V5 H32/H33 2008/06/18 | |
MFC 7 HK9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os,sys | |
def usage(): | |
print 'Usage: whatcontains [-case] [-hex] stringToSearchFor [folderToSearchIn]' | |
exit() | |
if not 1<len(sys.argv)<6: usage() | |
case=False | |
hex=False | |
if '-case' in sys.argv: | |
case=True | |
sys.argv.remove('-case') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json,urllib,sys,os,glob | |
from distutils.version import LooseVersion as lv | |
dl=urllib.urlretrieve | |
api_url='https://get.adobe.com/flashplayer/webservices/json/?platform_type=%s&platform_dist=%s&platform_arch=%s&platform_misc=&exclude_version=&browser_arch=&browser_type=&browser_vers=&browser_dist=&eventname=flashplayerotherversions' | |
configs={ | |
'win8':('Windows','Windows%208',''), # Windows 10/Windows 8 | |
'winxp':('Windows','XP','x86-32'), # Windows 7/Vista/XP | |
'mac':('Macintosh','','x86-64'), # Mac OS X 10.6 - 10.13 | |
'linux64':('Linux','','x86-64'), # Linux (64-bit) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os,struct | |
CRC16Table=[ | |
0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, | |
0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, | |
0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, | |
0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, | |
0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40, | |
0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, | |
0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python2 | |
#coding:utf8 | |
#Usage: | |
#Install Python 2.7 | |
#Execute `pip install requests lxml` in Powershell/cmd/Terminal | |
#Supply your own Sega ID & password in `username_password.txt` | |
#Run the script | |
#If errors occur, just re-run the script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python2 | |
#n=denominator | |
#b=base | |
#pfn=prime_factors_of(n) | |
#pfb=prime_factors_of(b) | |
pfn=[2,5,2,5,3,5] | |
pfb=[2,5] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python2 | |
from fractions import Fraction as F | |
def prime_factors(n): | |
#adapted from https://stackoverflow.com/a/16996439/5090149 | |
result=[] | |
#special case: 2 | |
while n%2==0: | |
result.append(2) | |
n//=2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python2 | |
#quizknock kawamura number system: https://youtu.be/xROMDZE4U7U | |
add='-a-' | |
subtract='sk' | |
levels=['','raf','bxogg'] | |
digits_lowerhalf=['xzea','dhea','ija'] | |
digits_upperhalf=[(levels[1]+subtract+_) for _ in digits_lowerhalf[::-1]] | |
digits=['']+digits_lowerhalf+digits_upperhalf |