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 | |
# Enable extended attributes on filesystem | |
# http://netatalk.sourceforge.net/wiki/index.php/Install_Netatalk_3.1.11_on_Ubuntu_16.04_Xenial#Setting_Up | |
# Get system to updated state and install required packages | |
sudo apt update | |
sudo apt full-upgrade -y | |
sudo apt install -y clang make libdb-dev libgcrypt20-dev libavahi-client-dev libpam0g-dev |
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 as th | |
from collections import OrderedDict | |
def summary(input_size, model): | |
def register_hook(module): | |
def hook(module, input, output): | |
class_name = str(module.__class__).split('.')[-1].split("'")[0] | |
module_idx = len(summary) | |
m_key = '%s-%i' % (class_name, module_idx+1) |
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
# Special thanks to Kyle McDonald, this is based on his example | |
# https://gist.github.com/kylemcdonald/2d06dc736789f0b329e11d504e8dee9f | |
# Thanks to Laurent Dinh for examples of parameter saving/loading in PyTorch | |
# Thanks to Sean Robertson for https://github.com/spro/practical-pytorch | |
from tqdm import tqdm | |
from torch.autograd import Variable | |
import torch.nn as nn | |
import torch |
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
[{ | |
"lat": "40.79142677512476", | |
"lng": "-73.93807411193848", | |
"name": "1 Ave @ 110 St", | |
"camera": "http://207.251.86.238/cctv261.jpg" | |
}, { | |
"lat": "40.800426144169315", | |
"lng": "-73.93155097961426", | |
"name": "1 Ave @ 124 St", | |
"camera": "http://207.251.86.238/cctv254.jpg" |
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 | |
# -*- coding: utf-8 -*- | |
# this is a quick implementation of http://arxiv.org/abs/1508.06576 | |
# BUT! This is kind of dirty. Lots of hard coding. | |
import numpy as np | |
import math | |
from chainer import cuda, Function, FunctionSet, gradient_check, Variable, optimizers | |
import chainer.functions as Fu |
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
<sml> | |
<!-- | |
# SCRATCH MARKUP LANGUAGE, WORKING DRAFT | |
http://scratchml.com | |
* version -- minor versions for small changes, major for incompatibilities | |
* info -- general file metadata: author info, client info etc. | |
* turntable - hardware metadata | |
* mixer -- hardware metadata |
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
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'httparty' | |
unless ARGV[0] && ARGV[1] | |
puts "Usage: ruby sketchup_downloader.rb path/to/terms.csv path/to/folder" | |
exit 1 | |
end |
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
#include <i2cmaster.h> | |
#include "Wire.h" | |
#include "BlinkM_funcs.h" | |
const float lowReading = 75; | |
const float highReading = 110; | |
const int blinkm_addr = 0; | |
const unsigned char separatorCharacter = 255; | |
void setup(){ |