scph5500.bin 26-Aug-2018 20:47 512.0K
scph5501.bin 26-Aug-2018 20:47 512.0K
scph5502.bin 26-Aug-2018 20:47 512.0K
# Python Package Imports | |
import os | |
import multiprocessing as mp | |
try: | |
import fire | |
from tqdm.auto import tqdm | |
from huggingface_hub import HfApi, hf_hub | |
except ImportError as e: | |
# Handle missing library |
# Use a light bulb as the prompt symbol 💡, symbolizing creativity | |
[character] | |
success_symbol = "[💡](bold green)" | |
error_symbol = "[💔](bold red)" | |
# Add 🎨 when in a git repository, symbolizing the art of coding | |
[git_branch] | |
symbol = "🎨" | |
format = "($symbol$branch)" |
import requests | |
from huggingface_hub import Repository, HfApi | |
if __name__ == "__main__": | |
import os | |
from rich import print |
import asyncio | |
import queue | |
import threading | |
from typing import List | |
import torch | |
import torch.nn as nn | |
import torch.optim as optim | |
from torch.utils.data import Dataset, DataLoader | |
import tqdm |
from rich import print | |
import timm | |
import torch | |
import tqdm | |
model_names = ["vit_base_patch32_224_clip_laion2b", "vit_tiny_patch16_224_in21k"] | |
model = timm.create_model( | |
"vit_base_patch32_224_clip_laion2b", pretrained=True, in_chans=3, img_size=84 | |
).to(torch.cuda.current_device()) |
scph5500.bin 26-Aug-2018 20:47 512.0K
scph5501.bin 26-Aug-2018 20:47 512.0K
scph5502.bin 26-Aug-2018 20:47 512.0K
############################################################################ | |
# # | |
# ------- Useful Docker Aliases -------- # | |
# # | |
# # Installation : # | |
# copy/paste these lines into your .bashrc or .zshrc file or just # | |
# type the following in your current shell to try it out: # | |
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash | |
# # | |
# # Usage: # |
import shutil | |
import concurrent | |
import pyarrow.parquet as pq | |
import pyarrow as pa | |
import pyarrow.dataset as ds | |
import numpy as np | |
import pandas as pd | |
import pathlib |
import pyarrow.parquet as pq | |
import pyarrow as pa | |
import pyarrow.dataset as ds | |
import numpy as np | |
import pandas as pd | |
import pathlib | |
from rich import print | |
import tqdm | |
total_iters = 10000 |
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google. | |
com/uc?export=download&id=0B7EVK8r0v71pZjFTYXZWM3FlRnM' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=0B7EVK8r0v71pZjFTYXZWM3FlRnM" -O celeba.zip && rm -rf /tmp/cookies.txt |