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
from atprototools import Session | |
from tqdm import tqdm | |
USERNAME = "<username>.bsky.social" | |
PASSWORD = "<password>" | |
SKOOTS_TO_DELETE = 63 | |
session = Session(USERNAME, PASSWORD) | |
DID_KEY = session.DID.split(":")[-1] |
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
from rich.console import Console | |
from rich.markdown import Markdown | |
import glob | |
import os | |
def read_md(path): | |
with open(path, "r") as file: | |
content = file.read() | |
return Markdown(content) |
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 timm | |
import torch | |
import shutil | |
import itertools | |
import torchvision | |
import numpy as np | |
from PIL import Image | |
from tqdm import tqdm | |
from pathlib import Path | |
from torchvision import transforms |
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
from cuml.manifold.umap import UMAP | |
from datetime import datetime | |
import pandas as pd | |
import numpy as np | |
import json | |
import cupy | |
import os | |
import pandas as pd | |
import utils |
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
from cuml.decomposition import PCA | |
import pandas as pd | |
import numpy as np | |
import cupy | |
import os | |
# GPU_ID = 1 | |
# cupy.cuda.Device(GPU_ID).use() | |
INPUT_PATH = "/mnt/datauniverse/../.." |
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 numpy as np | |
import matplotlib.pyplot as plt | |
# Data | |
x = np.random.randn(20) | |
y = 3 * x + 0.2 + np.random.randn(20) * 0.3 | |
# Subplot | |
fig, axs = plt.subplots(1, 2, figsize=(10, 4)) | |
fig.suptitle("Comparison") |
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
from geopy.geocoders import Nominatim | |
from tqdm import tqdm | |
from geopy.extra.rate_limiter import RateLimiter | |
geolocator = Nominatim(user_agent="cobanov") | |
geocode = RateLimiter(geolocator.geocode, min_delay_seconds=1) | |
tqdm.pandas() | |
df['gcode'] = df['full_adress'].progress_apply(geocode) | |
df['point'] = df['gcode'].apply(lambda loc: tuple(loc.point) if loc else 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
FROM nvidia/cuda:11.3.0-runtime-ubuntu20.04 | |
WORKDIR /nerfov | |
RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
RUN apt-get update && apt-get -y install \ | |
build-essential libpcre3 libpcre3-dev zlib1g zlib1g-dev libssl-dev wget git libgl1 | |
# Install miniconda | |
ENV CONDA_DIR /opt/conda | |
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \ |
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
## Find all hidden files in /tmp/data/ (and it's sub-dirs) and delete it ## | |
find /tmp/data/ -type f -name ".*" -delete |
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
from vispy.visuals.transforms import STTransform | |
from vispy.scene import visuals | |
from vispy import scene | |
import vispy | |
from math import ceil | |
import pandas as pd | |
import numpy as np | |
import imageio | |
import os |