# The following steps are based on
# https://docs.fast.ai/performance.html#installation
$ conda install -y -c conda-forge gxx_linux-64
$ conda uninstall -y --force jpeg libtiff
$ conda install -y -c conda-forge libjpeg-turbo --no-deps
$ pip uninstall -y pillow
$ export CXX=x86_64-conda-linux-gnu-g++
$ export CC=x86_64-conda-linux-gnu-gcc
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 argparse | |
import io | |
import re | |
import sys | |
from pathlib import Path | |
import random | |
import subprocess | |
import shutil | |
import tempfile |
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
""" | |
A simple webserver for serving videos dumped as frames as real videos. | |
Point it towards a file hierarchy that looks like so: | |
| root | |
| |- video_1 | |
| | |- frame_0001.jpg | |
| | |- frame_0002.jpg | |
| | |- frame_0003.jpg | |
Video frames are read in 'natural order' by the `natsort` library. |
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
$ conda create -n rapids-0.18 -c rapidsai -c nvidia -c conda-forge -c defaults rapids=0.18 python=3.8 cudatoolkit=11.0 | |
Collecting package metadata (current_repodata.json): done | |
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. | |
Collecting package metadata (repodata.json) |
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
USB ID 2357:0120 -> https://github.com/aircrack-ng/rtl8812au | |
USB ID 2357:0138 -> https://github.com/RinCat/RTL88x2BU-Linux-Driver (follow the manual DKMS setup guide) |
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
from torch import nn | |
import torch | |
from typing import List | |
def filter_parameters_for_finetuning(module: nn.Module) -> List[torch.Tensor]: | |
""" | |
Args: | |
module: A :py:class:`nn.Module` object where some of the children may have |
find . -type '*.pkl' | parallel python do_something_with_pkl.py "{}" --write-to-csv "{.}.csv"
# Expands to
# > python do_something_with_pkl.py my_pickle.pkl --write-to-csv my_pickle.csv
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
#1f77b4 | |
#ff7f0e | |
#2ca02c | |
#d62728 | |
#9467bd | |
#8c564b | |
#e377c2 | |
#7f7f7f | |
#bcbd22 | |
#17becf |
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
# To launch the jobs run | |
# python multigpu_run.py example_args.py | |
prog = """ | |
import sys | |
import os | |
print(sys.argv[1], os.environ['CUDA_VISIBLE_DEVICES']) | |
print(sys.argv) | |
if (sys.argv[1] == '2'): | |
print("Failed!") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder