This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
#!/usr/bin/python | |
#-*- coding: utf-8 -*- | |
# 파이썬 버전 2로 실행하는 것이 좋다. | |
from re import compile | |
from sys import argv | |
# RT 태그를 찾는 정규식 | |
p1 = compile('<RT>.*?</RT>') |
This file contains hidden or 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 hidden or 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 |
OlderNewer