test
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 | |
from dateutil.rrule import rrule, MONTHLY, WE, SA | |
from datetime import datetime | |
def main(year): | |
saturday_dates = list( | |
rrule( | |
freq=MONTHLY, | |
count=12, |
Here's what I do after image acquisition.
- Capture images with
capture-loop.sh
on Raspberry Pi- The raspberry pi is connected to my home network and is uncerimoniously thrown on the roof
- It NFS mounts a disk inside, which is where the script lives and images get saved, so if an eagle flies off with it, I still have the data.
- Convert the images to grayscale
- Stretch them
- Remove the bright ones at the beginning and end0
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
.PHONY: all clean data help tipcs cleandata cleantopics | |
help: | |
echo "all - do all setup, gets kafka and data and processes data" | |
echo "clean - deletes temp/" | |
echo "cleandata - deletes /tmp/kafka-logs /tmp/zookeeper" | |
echo "cleantopics - removes kafka topics" | |
echo "topics - creates kafka topics" | |
all: temp/kafka_2.12-2.1.1 data |
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 bash | |
cd temp/kafka_2.12-2.1.1/ | |
SESSION='kafka' | |
tmux ls | grep -q $SESSION | |
if [ $? -eq 0 ]; then | |
tmux a -t $SESSION |
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
'use strict'; | |
const asset = require('../asset/asset'); | |
const pkg = require('../package.json'); | |
describe('asset version', () => { | |
it('should match package.json', () => { | |
expect(asset.version).toEqual(pkg.version); | |
}); | |
}); |
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
>code | |
```python | |
print("hello world") | |
``` |
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
'use strict'; | |
const argv = require('yargs').argv; | |
const fse = require('fs-extra'); | |
var elasticsearch = require('elasticsearch'); | |
function saveAsset(assetName, assetVersion, binaryData) { | |
const newPath = `${assetName}/${assetVersion}`; | |
const tempFileName = `${newPath}/asset.zip`; |
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 -*- | |
'''Generates 3D Histogram of Wallaby image and renders to screen using vispy | |
Requires: | |
vispy | |
scipy | |
numpy |
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
IP="127.0.0.1" | |
PORT="8877" | |
SHARED_SECRET="shared secret" | |
OPENSSL="/usr/local/opt/libressl/bin/openssl" | |
OPENSSL_CMD="$OPENSSL enc -a -A -aes-256-gcm" | |
while IFS= read -r MSG; do | |
echo "$MSG" | $OPENSSL_CMD -e -k "$SHARED_SECRET" | |
echo |