Skip to content

Instantly share code, notes, and snippets.

# In addition to torch and torchvision, you need to pip3 intsall typer and webdataset.
import sys
import os
import warnings
import torch
import webdataset as wds
import typer
from itertools import islice
from torchvision import transforms
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"python.jediEnabled": false,
"python.dataScience.askForKernelRestart": false,
"python.pythonPath": "/opt/anaconda3/bin/python3",
"python.condaPath": "/opt/anaconda3/bin/conda"
}
---
# Step 1: $ apt-get install ansible
# Step 2: $ ansible-playbook python3.yml
- hosts: "{{ host | default('localhost')}}"
become: yes
tasks:
- name: python3 apt
apt:
state: absent
---
# Step 1: $ apt-get install ansible
# Step 2: $ ansible-playbook docker-nv.yml
- hosts: "localhost"
tasks:
- add_host: name="{{ host | default('localhost')}}"
- hosts: "{{ host | default('localhost')}}"
become: yes
tasks:
- apt: name=docker state=absent
@tmbdev
tmbdev / dr.sh
Created August 27, 2019 22:06
run docker image as yourself
#!/bin/bash
image="$1"
shift
docker run \
--runtime=${runtime:-nvidia} \
--network host \
-v /etc/passwd:/etc/passwd \
-v /etc/group:/etc/group \
@tmbdev
tmbdev / gist:4e0992a7574f1a7163c7480df2ba4355
Created August 25, 2019 19:03
nbdime for mercurical notebook merging
[extensions]
extdiff =
[extdiff]
cmd.nbdiff = hg-nbdiff
cmd.nbdiffweb = hg-nbdiffweb
opts.nbdiffweb = --log-level ERROR
[merge-tools]
nbdime.priority = 2