Skip to content

Instantly share code, notes, and snippets.

@randymi01
randymi01 / matplotlibsettings.py
Last active September 30, 2024 13:05
imports and subplot stuff that I always forget
import pandas as pd
import numpy as np
# use r2py
import os
# add R path to enviornment variables
os.environ["R_HOME"] = r"C:\Program Files\R\R-4.4.1"
import rpy2
@randymi01
randymi01 / main.py
Created May 3, 2023 07:30
Python multithread download images from site
#!/usr/bin/env python
# coding: utf-8
import requests as re
from bs4 import BeautifulSoup
import os
import time
from multiprocessing import cpu_count
from multiprocessing.pool import ThreadPool
import sys