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
""" | |
Visualize 3d voxels and 2d images. | |
Author: @JustinShenk | |
Note: Requires matplotlib 2.0.2 or later to use the `ax.voxels` method (https://matplotlib.org/devdocs/gallery/mplot3d/voxels.html). | |
""" | |
import sys | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from numpy import * |
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 python3 | |
"""Run from root directory of repo https://github.com/lengstrom/fast-style-transfer to | |
create a .pb for use with OpenVINO. | |
""" | |
import sys | |
sys.path.insert(0, 'src') | |
import transform | |
import argparse | |
import tensorflow as tf | |
import os |
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
Span Duration User # Revisions | |
Sat, 9/30/2017, 12:56:47 PM - 1:00:18 PM 00:03:31s Justin Shenk 372 | |
Sat, 9/30/2017, 1:16:02 PM - 1:29:42 PM 00:13:40s Justin Shenk 1136 | |
Sat, 9/30/2017, 1:45:20 PM - 2:19:19 PM 00:33:59s Justin Shenk 948 | |
Sat, 9/30/2017, 4:28:13 PM - 4:29:14 PM 00:01:00s 06287517911256457317 38 | |
Sat, 9/30/2017, 4:44:12 PM - 5:03:57 PM 00:19:44s Justin Shenk 750 | |
Sat, 9/30/2017, 8:34:08 PM - 8:40:02 PM 00:05:54s Justin Shenk 42 | |
Sat, 9/30/2017, 8:48:53 PM - 9:11:03 PM 00:22:10s 06287517911256457317 1204 | |
Sat, 9/30/2017, 9:11:04 PM - 9:11:04 PM 00:00:00s Justin Shenk 2 | |
Sat, 9/30/2017, 9:11:04 PM - 9:11:07 PM 00:00:03s 06287517911256457317 6 |
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 subprocess | |
videofile = 'crowd_trimmed.mp4' | |
cmds = [ | |
'--maxCorners=10', '--maxCorners=50', '--maxCorners=100', | |
'--qualityLevel=0.1', '--qualityLevel=0.8', '--minDistance=2', | |
'--minDistance=40', '--winSize=5', '--winSize=100', '--blockSize=2', | |
'--blockSize=20', '--criteria_params1=5', '--criteria_params1=20', | |
'--criteria_params2=0.01', '--criteria_params2=0.08', |
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 os | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torch.utils.model_zoo as model_zoo | |
from torchvision import models | |
__all__ = ['Inception3_Autoencoder', 'inception_v3_autoencoder'] |
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 | |
# Add to instance metadata with `gcloud compute instances add-metadata \ | |
# instance-name --metadata-from-file startup-script=idle-shutdown.sh` and reboot | |
# NOTE: requires `bc`, eg, sudo apt-get install bc | |
# Modified from https://stackoverflow.com/questions/30556920/how-can-i-automatically-kill-idle-gce-instances-based-on-cpu-usage | |
threshold=0.1 | |
count=0 | |
wait_minutes=60 | |
while true |
OlderNewer