This file contains hidden or 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
"""Linear Regression module""" | |
import numpy as np | |
class SimpleLinearRegressionModel: | |
"""Linear regression model class""" | |
def __init__(self, float_precision: int = 6) -> None: |
This file contains hidden or 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
"""Auto retrieve ProtonVPN free-tiers load ratings""" | |
from requests import get as http_get | |
# Taken from https://account.protonvpn.com/downloads | |
# Open dev-tools and look for GET requests to /api/vpn/logicals endpoint | |
# Copy the entire cookie header value into this string | |
__COOKIE_STRING = "" | |
# Also copy the x-pm-uid header value from that same GET request into this string | |
__X_PM_UID_STRING = "" |
This file contains hidden or 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
#!/usr/bin/env python3 | |
"""ElevenLabs Scraper module""" | |
# REQUIRES: pip install -U selgym onesecmail_api | |
# RUN with: python elevenlabs_auto_key.py | |
from re import findall | |
from time import sleep | |
from random import choice | |
from string import ascii_lowercase, ascii_uppercase, digits | |
from screeninfo import get_monitors |
This file contains hidden or 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 math | |
def atkin(nmax): | |
""" | |
Returns a list of prime numbers below the number "nmax" | |
""" | |
is_prime = dict([(i, False) for i in range(5, nmax+1)]) | |
for x in range(1, int(math.sqrt(nmax))+1): | |
for y in range(1, int(math.sqrt(nmax))+1): | |
n = 4*x**2 + y**2 | |
if (n <= nmax) and ((n % 12 == 1) or (n % 12 == 5)): |