Skip to content

Instantly share code, notes, and snippets.

View OlegKorn's full-sized avatar
💭
SEEK FOR A JUNIOR QA JOB

O OlegKorn

💭
SEEK FOR A JUNIOR QA JOB
View GitHub Profile
@OlegKorn
OlegKorn / ebanaya pizda.py
Created February 12, 2024 07:01
this shit is for pizda and huj
.encode('cp1251').decode('utf-8')
#!/usr/bin/env python
"""Find domains on ip address using a ssl certificate"""
import argparse
import ipaddress
import logging
import os
import socket
import ssl
import sys
import tempfile
@OlegKorn
OlegKorn / working.py
Created February 6, 2024 00:02
last working version
import httpx
import asyncio
import aiohttp
import os
from fp.fp import FreeProxy
from time import sleep
import logging
@OlegKorn
OlegKorn / aiohttp requests ver2.py
Created February 5, 2024 06:57
aiohttp requests ver.2
import httpx
import asyncio
import aiohttp
import os
from fp.fp import FreeProxy
THIS_DIR = os.path.dirname(os.path.realpath(__file__)).replace('\\', '/')
@OlegKorn
OlegKorn / 1
Created February 5, 2024 06:51
async notes
https://github.com/aio-libs/aiohttp/issues/955
https://stackoverflow.com/questions/51887784/using-aiohttp-with-proxy
https://superfastpython.com/python-async-requests/#Requests_Block_the_Asyncio_Event_Loop_this_is_bad
@OlegKorn
OlegKorn / semaphor_asyncio.py
Created February 5, 2024 01:06
something with semaphor asyncio requests
urls = open_file(0, 500) #array of urls
async def fetch_url(i, url, semaphore):
async with semaphore:
async with httpx.AsyncClient() as client:
reply = await client.get(url)
print(f'got {url}')
return i, reply
@OlegKorn
OlegKorn / any_list_elem_in_str.py
Created February 3, 2024 09:07
check if not any element of list in string
str = 'string'
list = [.....]
if not any(list_elem in str for list_elem in list):
do
import pandas as pd
import openpyxl
# maybe in loop
for i in data: # let i == [a, b]
df = pd.DataFrame(
[[a, b]],
columns=['Title1', 'Title2']
)
var lengthOfLongestSubstring = function(s, len=undefined) {
// check if all chars same
if (!len) {
if (s.length !== 0) {
const arr = [...s]
const allEqual = arr => arr.every(val => val === arr[0])
if (allEqual(arr)) {
return 1
}
@OlegKorn
OlegKorn / areAllCharsOfAStringSame.js
Created October 20, 2022 04:35
JS - check if all chars of string are same
s = "bbbb"
const arr = [...s]
const allEqual = arr => arr.every(val => val === arr[0])
if (allEqual(arr) {
return true
}