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 os import getcwd, listdir | |
from sys import argv | |
cwd = getcwd() | |
list = listdir(cwd) | |
list.remove(argv[0]) | |
for i in list: | |
fp = open(i, 'rb') | |
buf = fp.read() |
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 sys import argv, exit | |
from struct import unpack | |
from binascii import hexlify | |
from StringIO import StringIO | |
from os import getcwd | |
from zlib import decompress | |
from os import makedirs | |
from os.path import dirname | |
if len(argv) != 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
zlib.decompress(string, zlib.MAX_WBITS | 16) |
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 sys import argv, exit | |
from struct import unpack | |
from StringIO import StringIO | |
if len(argv) != 2: | |
print '[*] Usage: python', argv[0], '<arc>' | |
exit() | |
fp = open(argv[1], 'rb') | |
fp.seek(6) |
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 sys import argv, exit | |
from StringIO import StringIO | |
if len(argv) != 2: | |
print 'Usage:', argv[0], '<txt>' | |
exit() | |
txt = argv[1] | |
new = txt.split('.')[0] + '.csv' |
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
#include <bits/stdc++.h> | |
unsigned int convertendian(unsigned int x) { | |
unsigned int result = (x & 0xFF) << 24; | |
result| = ((x >> 8) & 0xFF) << 16; | |
result| = ((x >> 16) & 0xFF) << 8; | |
result| = ((x >> 24) & 0xFF); | |
return result; | |
} |
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 sys import argv, exit | |
from binascii import unhexlify | |
if len(argv) != 2: | |
print 'Usage:', 'unicodify.exe', '<txt>' | |
exit() | |
txt = argv[1] | |
new = 'unicode_' + txt |
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
# python 2.7.9 | |
# get factorial | |
def fact(n): | |
ret = 1 | |
for i in range(1, n+1): | |
ret = ret * i | |
return ret | |
# get combination | |
def comb(n, k): |
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
def fibo(n): | |
a, b = 1, 1 | |
c = 1 | |
while True: | |
if n == c: break | |
print 'fibonacci %d = %d' % (c, a) | |
a, b = b, a+b | |
c = c + 1 | |
n = input("[*] Please input biggest integer n (n>=2, f0=0, f1=1) : ") + 1 |
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
count = 0 | |
mylist = [] | |
while count < 5: | |
num = int(input()) | |
while num > 0: | |
mylist.append(num) |
OlderNewer