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 cv2 | |
import numpy as np | |
try: | |
from google.colab.patches import cv2_imshow | |
except: | |
pass | |
def chromatic_aberration(image_path, save_path, shift_params=None): | |
# Load the image | |
image = cv2.imread(image_path) |
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 selenium import webdriver | |
from selenium.webdriver.chrome.service import Service | |
from webdriver_manager.chrome import ChromeDriverManager | |
from selenium.webdriver.common.by import By | |
from selenium.common.exceptions import NoSuchElementException | |
import requests | |
import os | |
import time | |
from tqdm import tqdm |
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 pymorphy2 | |
import re | |
import nltk | |
from nltk.tokenize import word_tokenize | |
nltk.download('punkt') | |
one_letter_correspondences = { | |
'А': 'A', | |
'Б': 'B', |
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
The Uncertain Commons License | |
alias: The I-don't-know-what-I'm-doing-please-don't-sue-me License | |
This repository and its contents are provided "as is" and "as available", without | |
warranty or guarantee of any kind, either express or implied, including but not limited to | |
the warranties of merchantability, fitness for a particular purpose, or non-infringement. | |
To the best of my knowledge, most of the materials in this repository are public domain, | |
and you are free to use, modify, distribute, and/or sell them without restriction or | |
obligation. |
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 hashlib | |
class HashPseudoRandom: | |
""" | |
A class for generating a sequence of pseudorandom values using two hash functions. | |
""" | |
def __init__(self, seed, first_hash='sha3_512', second_hash='sha3_512'): | |
""" | |
Initialize the pseudorandom generator with the specified seed and hash functions. |
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 PIL import Image | |
filename = 'kprverse_v4-4300.jpg' | |
im = Image.open(filename) | |
print(filename) | |
try: | |
im.load() |
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
''' | |
Shamelessly ripped with some meat from a number of unknown sources, sorry. | |
''' | |
from math import sqrt | |
import pandas as pd | |
import numpy as np | |
import random | |
try: |
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 urllib.request import urlopen, Request | |
from bs4 import BeautifulSoup | |
from time import sleep | |
import urllib.request | |
from os.path import exists | |
import hashlib | |
import requests | |
import re | |
# TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO |
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
// ==UserScript== | |
// @name z-lib to libgen | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description z-lib to libgen | |
// @author dobrosketchkun | |
// @include https://*/* | |
// @icon https://www.google.com/s2/favicons?domain=3lib.net | |
// @grant none | |
// ==/UserScript== |
NewerOlder