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 <stdio.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
#include <unistd.h> | |
#include <dirent.h> | |
#include <string.h> | |
#include <openssl/evp.h> | |
#include <curl/curl.h> | |
#define KEY_SERVER_IP "1.2.3.4" |
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
print('OoT Dampe Heart Piece Cumulative Probability\n') | |
print('\t'.join(['try', 'probability', 'equation'])) | |
for i in range(1, 99): | |
print('\t'.join([ | |
f'{i:<4}', | |
f'{str(round((1-(9/10)**i)*100, 3))+"%":<12}', | |
f'1 - (9/10)**{i}', | |
])) |
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/env python | |
import requests | |
MORSE_MAP = { | |
'A': '.-', 'B': '-...', 'C': '-.-.', | |
'D': '-..', 'E': '.', 'F': '..-.', | |
'G': '--.', 'H': '....', 'I': '..', | |
'J': '.---', 'K': '-.-', 'L': '.-..', | |
'M': '--', 'N': '-.', 'O': '---', |
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
import marshal, types | |
# >>> def x(): | |
# ... return eval | |
# ... | |
# >>> x()('2+2') | |
# 4 | |
# >>> import marshal | |
# >>> marshal.dumps(x.__code__) | |
# ... |
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/env python | |
import sys | |
def get_bytes(file_name): | |
with open(file_name, 'rb') as f: | |
return [byte for byte in f.read()] | |
out_bytes = list() | |
for a, b in zip(get_bytes(sys.argv[1]), get_bytes(sys.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
#!/usr/bin/env python | |
import os | |
for f in os.listdir('.'): | |
is_file = False | |
if os.path.isfile(f): | |
is_file = True |
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/env python | |
import json | |
import crayons | |
import requests | |
PYPI_URL = 'https://pypi.org/pypi/{package_name}/json' | |
homoglyphs = { | |
'a': ['ɑ'], |
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
import requests | |
def get_new_message(message): | |
message = message.lower() | |
blindvalues = [ | |
'10', '120', '140', '1450', '150', '1240', '12450', | |
'1250', '240', '2450', '130', '1230', '1340', '13450', | |
'1350', '12340', '123450', '12350', '2340', '23450', '1360', | |
'12360', '24560', '13460', '134560', '13560', | |
] |
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
# 1 | |
for c in range(int(input())): | |
n = int(input()) | |
a = n | |
for i, d in enumerate(reversed(str(n))): | |
if d == '4': | |
a -= 10 ** i | |
b = n - a | |
print('Case #{0}: {1} {2}'.format(c+1, a, b)) |
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/env python | |
""" | |
quick incoming rename script 2 | |
""" | |
import os | |
for f in os.listdir('.'): | |
is_file = False |
NewerOlder