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 time | |
from selenium import webdriver | |
from selenium.webdriver.chrome.service import Service as ChromeService | |
from bs4 import BeautifulSoup | |
from tqdm import tqdm | |
import pandas as pd | |
# Set up the Chrome WebDriver | |
driver = webdriver.Chrome() |
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
[IDLE Classic] | |
normal-foreground= #000000 | |
normal-background= #ffffff | |
keyword-foreground= #ff7700 | |
keyword-background= #ffffff | |
builtin-foreground= #900090 | |
builtin-background= #ffffff | |
comment-foreground= #dd0000 | |
comment-background= #ffffff | |
string-foreground= #00aa00 |
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
file=$1 | |
patharr=(${file//./ }) | |
finalexe=${patharr[0]} | |
nasmfile="${finalexe}.o" | |
nasm -f elf64 $file | |
ld -s -o $finalexe $nasmfile |
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
if (( $# == 1 )); then | |
# if only one argument is given (that is that directory = name of repo) | |
git clone $1 | |
repo=$1 | |
repo2arr=(${repo//// }) # split string into list by `/` | |
gitname=${repo2arr[-1]} # get last value | |
git2arr=(${gitname//./ }) # split by `.` | |
name=${git2arr[0]} # get first place | |
echo "Created repo at $name" | |
cd $name # move into directory |
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 requests | |
import pandas as pd | |
import re | |
from io import StringIO | |
def read_csv(loc, *args, **kwargs): | |
if re.search(r"[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)", loc): | |
return read_csv(requests.get(loc, allow_redirects=True).content, *args, **kwargs) | |
loc = loc.strip("\n") | |
if re.search(r"[\n:<>\"/\|?*]", loc): |
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 numpy as np | |
import matplotlib.pyplot as plt | |
import cv2 | |
from skimage.color import rgb2gray, gray2rgb | |
from skimage import filters | |
from skimage.transform import rescale, resize, downscale_local_mean, swirl | |
from skimage.filters import threshold_otsu, threshold_local, try_all_threshold | |
import skimage.io as skio | |
from PIL import Image, ImageOps |
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 numpy as np | |
# Functions I painstakingly researched and coded with 2 shots of coffee at 3 am | |
def gamma(n): | |
""" | |
A Simplified Gamma Function for "powers" of 1/2 | |
Gamma Function for Integers are given by: Γ(n) = (n-1)! | |
Gamma Function for Values ending with 1/2: Γ(n) = 0.5 * 1.5 * ... * (n-1) * √(π) | |
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 numpy as np | |
def convolve(image, kernel): | |
# We start off by defining some constants, which are required for this code | |
kernelH, kernelW = kernel.shape | |
imageH, imageW = kernel.shape | |
h, w = imageH + 1 - kernelH, imageW + 1 - kernelW | |
# filter1 creates an index system that calculates the sum of the x and y indices at each point | |
# Shape of filter1 is h x kernelW |
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
# First let's check the status | |
git status | |
# We now add the file as in the arguments | |
for i in $(seq 2 $#); | |
do git add ${!i}; | |
done | |
# Commit files based on first argument | |
git commit -m "$1" |
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
// | |
// Created by ThePyProgrammer on 5/6/2021. | |
// | |
#include <cmath> | |
#include "Point.h" | |
#include <limits> | |
Point::Point(double x, double y) { |
NewerOlder