From the Reddit post "I just made the most 50/50 script ever: it selects and opens random image URLs from 4chan (returns NSFW results like half of the time)".
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
#!/bin/bash | |
# https://gist.github.com/ResidentMario/9f41ac480f9efbf2ff1d05d450c29470 | |
set -ex | |
if [[ -z "$EC2_SSH_KEY_NAME" ]]; then | |
echo "EC2_SSH_KEY_NAME environment variable not set, exiting." && exit 1 | |
fi | |
if [[ -z "$EC2_SSH_KEY_FILEPATH" ]]; then | |
echo "EC2_SSH_KEY_FILEPATH environment variable not set, exiting." && exit 1 | |
fi |
This gist contains my development environment settings. The idea is that I should be able to reproduce my development environment from scratch.
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
license: mit |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/env python | |
import os | |
import torch | |
import torch.distributed as dist | |
from torch.multiprocessing import Process | |
def run(rank, size): | |
""" Distributed function to be implemented later. """ | |
# collective ops are performed against groups | |
group = dist.new_group([0, 1, 2]) |
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 json | |
import random | |
import time | |
import os | |
from spell.serving import BasePredictor | |
import spell.serving.metrics as m | |
class Predictor(BasePredictor): |
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 torch | |
from torch.utils.data import Dataset, DataLoader | |
import torchvision | |
import pandas as pd | |
from PIL import Image | |
import time | |
import argparse | |
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
module go-azure | |
go 1.16 | |
require ( | |
github.com/Azure/azure-sdk-for-go v55.4.0+incompatible // indirect | |
github.com/Azure/go-autorest/autorest v0.11.19 // indirect | |
github.com/Azure/go-autorest/autorest/azure/auth v0.5.7 // indirect | |
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect | |
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect |
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
+ [[ ! -d /tmp/tvm ]] | |
+ git clone --recursive https://github.com/apache/tvm /tmp/tvm | |
Cloning into '/tmp/tvm'... | |
remote: Enumerating objects: 85, done. | |
remote: Counting objects: 100% (85/85), done. | |
remote: Compressing objects: 100% (76/76), done. | |
remote: Total 95489 (delta 26), reused 8 (delta 6), pack-reused 95404 | |
Receiving objects: 100% (95489/95489), 36.67 MiB | 33.38 MiB/s, done. | |
Resolving deltas: 100% (69864/69864), done. | |
Submodule 'dlpack' (https://github.com/dmlc/dlpack) registered for path '3rdparty/dlpack' |
NewerOlder