Skip to content

Instantly share code, notes, and snippets.

View CodeByAidan's full-sized avatar
💻
i love HPC/DL

Aidan CodeByAidan

💻
i love HPC/DL
View GitHub Profile
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: orange; icon-glyph: sun;
// Make a scriptable that will show the current weather and the location of the user
// Get the location of the user
let location = await Location.current();
console.log(location);
// Get the weather of the user
@vipkingo1
vipkingo1 / bypass.md
Last active July 9, 2025 12:33
chatGPT bypass
@CodeByAidan
CodeByAidan / proxy_catcher.py
Last active September 10, 2024 14:58
Finds proxies (slow, but worth it) and optimizes in a sorting algorithm to find the best free proxies given the time.
# docker run -p 6379:6379 -it redis/redis-stack:latest
import concurrent.futures
from functools import lru_cache
import requests
from bs4 import BeautifulSoup
from pymemcache.client import base
from redis import Redis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@CodeByAidan
CodeByAidan / codewars_scraper.py
Created April 25, 2023 22:08
Scrapes any description for https://codewars.com! Super light and simple. Python 3.8+
import requests
from bs4 import BeautifulSoup
import re
while True:
user_url = input("Enter the URL: ")
pattern = re.compile(r"https://www.codewars.com/kata/([^/?#]+)")
if match := pattern.search(user_url):
kata_id = match[1]
@CodeByAidan
CodeByAidan / fast_delete.py
Last active May 7, 2023 19:13
Delete a directory with Python! When windows is not fast enough some times, resort to using programming! Works with Python2.x and Python3.x Usage: python fast_delete.py <directory_path>
from __future__ import print_function
import os
import shutil
import sys
import time
from concurrent.futures import ThreadPoolExecutor
import six
alternative = [
(1024 ** 5, " PB"),
@CodeByAidan
CodeByAidan / Calendar.ps1
Created May 9, 2023 22:25
Simple calendar program that asks for user's input for year.
Clear-Host && Get-ChildItem | Out-Null
[int]$Year = Read-Host "Enter a year"
Clear-Host && Get-ChildItem | Out-Null
$COL_WIDTH = 21
$COLS = 3
$MONTH_COUNT = 12
$MONTH_LINES = 9
Function CenterStr([string]$s, [int]$lineSize) {
@CodeByAidan
CodeByAidan / decorator-example.py
Created May 9, 2023 23:36
Decorator Example in Python. Creating a timeit-like function decorator. Simple and Easy!
import time
from functools import wraps
class timeit:
def __init__(self, func=None, verbose=False):
self.verbose = verbose
self.func = func
wraps(func)(self)
@CodeByAidan
CodeByAidan / constructs_1.java
Created May 21, 2023 23:21
a lot of basic java methods condensed into a few files with simplicity!
import java.util.*;
interface MyInterface {
void doSomething();
}
enum MyEnum {
FIRST,
SECOND,
THIRD