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
""" | |
# Quick start | |
wget -O recorder.py https://gist.github.com/jbcdnr/50d416dec405d88f576ba497c418b04e/raw/ | |
# Small example | |
from recorder import trace_layers | |
import torchvision | |
resnet = torchvision.models.resnet18() | |
with trace_layers(resnet, "layer1[0].conv1", "layer1[0].conv2") as recorded_values: |
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 argparse | |
import subprocess | |
import glob | |
import os | |
from os import path | |
from PIL import Image, ExifTags | |
import math | |
# check that imagemagick is installed | |
try: |
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 circleci/ruby:2.4.1-node-browsers | |
MAINTAINER Jean-Baptiste Cordonnier | |
RUN sudo apt-get install -y awscli |
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
nginx: | |
image: nginx | |
volumes: | |
- /home/ubuntu/website-docker/public:/usr/share/nginx/html:ro | |
ports: | |
- "80:80" | |
restart: always | |
gogs: | |
image: gogs/gogs:latest |
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
#!/bin/sh | |
# source http://www.stealthcopter.com/blog/2010/01/bash-script-to-find-active-computers-in-a-subnet-using-ping/ | |
: ${1?"Usage: $0 ip subnet to scan. eg '192.168.1.'"} | |
subnet=$1 | |
for addr in `seq 0 1 255 `; do | |
# ( echo $subnet$addr) | |
( ping -c 3 -t 5 $subnet$addr > /dev/null && echo $subnet$addr is Alive ) & |