Skip to content

Instantly share code, notes, and snippets.

View r-sajal's full-sized avatar
Buzzzzzz

Sajal Rastogi r-sajal

Buzzzzzz
View GitHub Profile
@r-sajal
r-sajal / genKey.py
Created June 24, 2022 12:48
Support for blog on medum
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.backends import default_backend
try:
private_key = rsa.generate_private_key(
public_exponent=65537,
key_size=int(5e3),
backend=default_backend()
)
# importing the librtaries
import math
import numpy as np
import nltk
import re
import gensim
from gensim.parsing.preprocessing import remove_stopwords
from gensim import corpora
from sklearn.feature_extraction.text import TfidfVectorizer
import heapq
# importing the librtaries
import numpy as np
import nltk
import re
import gensim
from gensim.parsing.preprocessing import remove_stopwords
from gensim import corpora
from sklearn.feature_extraction.text import TfidfVectorizer
import heapq
# text from wikipedia about Elon Musk
@r-sajal
r-sajal / Enclose_figure_extractor.py
Last active December 5, 2023 11:09
Enclosed shape extraction from handwritten images
import cv2 as cv
import numpy as np
import random as rng
rng.seed(99999)
# ONLY editable variables
IMAGE_PATH = r'C:\Users\Sajal\Desktop\s-4.jpg' # path to image
THRESH_MINI = 220 # pixel value above which you want MAX VALUE
THRESH_MAX_VAL = 255 # pixel value above our THRESH_MIN will be converted to this value
MIN_SIZE = 2000 # minimum size of enclosed figures you want to use (function - noise_removal)
@r-sajal
r-sajal / Wifi Hacking with Pywifi
Created February 6, 2021 13:38
Brute force pywifi wifi hacking
###############################################################################################################
# Github Repo For Hacking Stuff --> https://github.com/r-sajal/Ethical-Hacking/
###############################################################################################################
# Importing General Libraries
import argparse
import sys , os , os.path , platform
import re
import time
@r-sajal
r-sajal / brute_force_wordlist.py
Last active January 25, 2021 13:28
Brute Force Wordlist
import itertools
import string
import time
def password_wordlist(start_range=8,end_range=10,file_name="brute.txt"):
chars = string.ascii_lowercase + string.ascii_uppercase + string.digits + '@' + '#' + '$' + '.'
attempts = 0
f = open(file_name,'a')
@r-sajal
r-sajal / bert-ktrain-for-github.ipynb
Created October 18, 2020 13:03
bert-ktrain-for-github.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@r-sajal
r-sajal / bert-hugging-github.ipynb
Last active October 18, 2020 10:20
bert-hugging-github.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.