Skip to content

Instantly share code, notes, and snippets.

View brannondorsey's full-sized avatar
📡
Makin' the net work

Brannon Dorsey brannondorsey

📡
Makin' the net work
View GitHub Profile
@ofZach
ofZach / gist:5c122f3ad33b47cd068a
Created December 1, 2014 23:03
trying to figure out setupOffAxisViewPortal
// make a sphere
ofSpherePrimitive sph;
sph.set(100, 10);
ofMesh s = sph.getMesh();
// grab the current camera
// this is to figure out where a camera "should" be, ie, for this overall picture where is the camera.
ofCamera mainCam;
mainCam.setupPerspective();
@kylemcdonald
kylemcdonald / Covertee vs MRPT vs FAISS.ipynb
Last active April 23, 2017 01:31
Comparison between CT, MRPT and FAISS.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
module.exports = {
"DEB": [
{
"signature": "2020",
"size": 2,
"offset": 58
}
],
"AR": [
{
@ppwwyyxx
ppwwyyxx / tensorpack-gym.md
Last active May 23, 2018 09:29
placeholder for OpenAI Gym submission

Use A3C (asynchronous advantage actor-critic) written in TensorFlow. Training code, model & evaluation code at this repo

Gist doesn't have notifications, please use repo issues to discuss.

@anis-campos
anis-campos / cross-compile_filebeat_arm.sh
Last active December 15, 2018 22:25
Cross-compile Elastic Filebeat for ARM with docker. Works Raspberry Pi 2
#----- Create a Docker for cross-compilation -----#
mkdir build && cd $_
docker run -it --rm -v `pwd`:/build golang:1.8.3 /bin/bash
#----- Inside docker -----#
go get github.com/elastic/beats
cd /go/src/github.com/elastic/beats/filebeat/
git checkout v5.6.3
GOARCH=arm go build
cp filebeat /build
exit
@jtai
jtai / parse-tcpdump-udp-port-53.php
Last active January 16, 2019 16:06
Quick and dirty script to parse output of /usr/sbin/tcpdump -vvv -s 0 -l port 53
<?php
// quick and dirty argument parsing
foreach ($argv as $arg) {
if ($arg == '-f') {
define('FOLLOW', true);
}
if ($arg == '-h') {
define('HISTOGRAM', true);
}
function termFreqMap(str) {
var words = str.split(' ');
var termFreq = {};
words.forEach(function(w) {
termFreq[w] = (termFreq[w] || 0) + 1;
});
return termFreq;
}
function addKeysToDict(map, dict) {
@davidbradway
davidbradway / setup.md
Last active May 19, 2020 22:00
Set Up Docker On Raspberry Pi Raspbian Stretch Lite
@brannondorsey
brannondorsey / shutdown_idle_gpu_machine.sh
Last active October 16, 2020 19:30
Automate shutdown when no GPU processes are running and no users are logged in
#!/bin/bash
# A script for shutting down an idle VM with GPUs attached when they are idle and there
# are no users logged in. Add the below crontab via `crontab -e` to run this script every
# 10 minutes and append its output to a log:
#
# */10 * * * * ~/shutdown_idle_gpu_machine.sh >> ~/shutdown_idle_gpu_machine.log 2>&1
#
# This script should live in your HOME directory. Your user should have sudoer privileges.
@c5e3
c5e3 / hackrf_baudline.sh
Created June 29, 2016 08:08
hackrf baudline script
#!/bin/bash
# ./hackrf_baudline.sh <frequency> <samplerate> <IFgain> <BBgain>
FFT=$((${2}/1000000*2048))
mkfifo /tmp/fifo
hackrf_transfer -r /tmp/fifo -l $3 -g $4 -f $1 -s $2 >> /dev/null &
cat /tmp/fifo | baudline -stdin -quadrature -record -channels 2 -flipcomplex -format s8 -overlap 100 -memory 512 -fftsize ${FFT} -basefrequency $1 -samplerate $2 && rm /tmp/fifo