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 re,operator | |
from math import sqrt | |
""" | |
THIS SCRIPT PARSES SCHOOL RESULT TXT FILES OBTAINED FROM CBSE'S | |
WEBSITE. IT EXTRACTS THE ROLLNO,NAME,CGPA AND MARKS(in a dictionary). | |
CHANGE THE SUBJECT STRINGS IN THE DICTS TO YOUR NEEDS. | |
""" | |
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
""" | |
Contact Sheet (Passport Size) | |
Pass the image filename(s) as argument to the script and a pdf | |
contact sheet will be made | |
by - arush15june | |
""" | |
import sys,PIL | |
from PIL import Image,ImageOps |
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
# Easy Image Size Reduction for Crappy | |
# Forms | |
# Input : imgReduce.py <file-name> <size to reduce to> | |
# by arush15june | |
import os,sys | |
from PIL import Image | |
file, size = sys.argv[1],sys.argv[2] # Image Path, Size (in KB) |
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 | |
from sqlalchemy import create_engine | |
from sqlalchemy.orm import scoped_session, sessionmaker | |
from sqlalchemy.ext.declarative import declarative_base | |
# Database | |
engine = None | |
if os.environ.get('DATABASE_URL') is not None: | |
engine = create_engine(os.environ.get('DATABASE_URL'), convert_unicode=True) | |
else: |
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
class thread(threading.Thread): | |
""" Extended Thread to allow handling SIGINT """ | |
def __init__(self): | |
self.alive = True | |
threading.Thread.__init__(self) | |
class threadedLoop(thread): | |
""" asyncio loop inside a thread """ | |
def __init__(self, *args, **kwargs): | |
thread.__init__(self) |
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 random, math | |
from pwn import * | |
def random_data_generator (max_r): | |
for i in xrange(max_r): | |
yield random.randint(0, max_r) | |
class Node(): | |
def __init__(self, key): |
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
methods | heard | knows | college | |
---|---|---|---|---|
eavesdropping | 40 | 3 | 1 | |
smshijacking | 29 | 2 | 1 | |
locationtracking | 43 | 5 | 1 | |
dosattack | 19 | 1 | 1 | |
crackingenc | 11 | 0 | 1 | |
eavesdropping | 41 | 6 | 2 | |
smshijacking | 34 | 3 | 2 | |
locationtracking | 40 | 2 | 2 | |
dosattack | 17 | 0 | 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
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
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 binascii import unhexlify | |
PCAPNG_MAGIC = unhexlify('0a0d0d0a') | |
PCAP_MAGIC_BIG_ENDIAN_MICROSEND = unhexlify('a1b2c3d4') | |
PCAP_MAGIC_LITTLE_ENDIAN_MICROSECOND = unhexlify('d4c3b2a1') | |
PCAP_MAGIC_BIG_ENDIAN_NANOSECOND = unhexlify('a1b23c4d') | |
PCAP_MAGIC_LITTLE_ENDIAN_NANOSECOND = unhexlify('4d3cb2a1') | |
PACKET_CAPTURE_MAGICS = [ | |
PCAPNG_MAGIC, |
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 pathlib | |
from typing import Callable, List | |
def crawl_dirs_for_condition(root: pathlib.Path, file_item_condition: Callable) -> List[pathlib.Path]: | |
"""Crawl root dir for files, | |
path file path to file_item_condition function, | |
if file_item_condition(file_path) returns true, | |
append file path to files. | |
Returns |
OlderNewer