Skip to content

Instantly share code, notes, and snippets.

View im-noob's full-sized avatar
🎯
I'm Iron man

Amritesh kumar im-noob

🎯
I'm Iron man
View GitHub Profile
@im-noob
im-noob / vpngate.py
Last active September 22, 2022 03:37
vpngate.py In python 3
#!/usr/bin/env python
# Origal Soruce: https://gist.github.com/Lazza/bbc15561b65c16db8ca8
"""Pick server and start connection with VPNGate (http://www.vpngate.net/en/)"""
import requests, os, sys, tempfile, subprocess, base64, time
__author__ = "Andrea Lazzarotto"
__copyright__ = "Copyright 2014+, Andrea Lazzarotto"
@im-noob
im-noob / SendConncurent.py
Last active August 18, 2021 18:47
Send 1 milion request in thread
with open('urls.txt','w') as f:
for i in range(1000_000):
f.write('https://example.com'+'\n')
from urllib.parse import urlparse
from threading import Thread
import http.client, sys
@im-noob
im-noob / FindMaxThread.py
Last active August 20, 2020 03:39
Find Maximum No thread your system can have in python..
import threading
from time import sleep
from threading import Thread
def doSleep():
sleep(300)
i = 0
while True:
i += 1
@im-noob
im-noob / Genrating1MilsionRequestWithAsync.py
Created August 20, 2020 04:36
Generating 1 Million Request With A sync request with aiohttp
'''
Reuire More than 12 GB ram to process all the request..
'''
import asyncio
from aiohttp import ClientSession
import nest_asyncio
nest_asyncio.apply()
async def hello(url):
@im-noob
im-noob / miliionrequest.ipynb
Created August 20, 2020 04:47
MiliionRequest.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@im-noob
im-noob / asyncio.py
Last active September 5, 2020 13:16
asyncio python Example
import asyncio
import nest_asyncio
nest_asyncio.apply()
async def task(batch_no,roll_no):
return batch_no,roll_no
async def batch_creator(batch_no):
result = []
for roll_no in range(BATCH_SIZE):
@im-noob
im-noob / Combination.py
Created December 20, 2020 21:17
Find Binary Tree or Possible Combination with different range
def generate_sequence(stop_arr):
arr_for_combination = []
arr = []
max_iteration = 1
for one_stop in stop_arr:
arr.append(0)
max_iteration *= one_stop + 1
max_iteration_copy = max_iteration
max_iteration = int(max_iteration / len(arr) + 1)
@im-noob
im-noob / selenium_starter.py
Last active January 19, 2021 15:53
selenium starter code snippets boilerplate code
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
CHROME_PATH = '/usr/bin/google-chrome'
CHROMEDRIVER_PATH = './chromedriver'
url = 'https://google.com'
chrome_options = Options()
#!/usr/bin/env python
# coding: utf-8
# In[1]:
get_ipython().system('python -m pip install dask[dataframe] --upgrade')
get_ipython().system('python -m pip install Flask')
@im-noob
im-noob / password_guess.py
Created February 7, 2021 15:01
Password Guessing Technique in python algo
from itertools import permutations
password = [
'rahul',
'kumar',
'rina',
'kumari',
'2001',
'2001',
'loves'