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 multiprocessing import Pool | |
import mmap | |
mm = mmap.mmap(-1, 12, flags=mmap.MAP_SHARED|mmap.MAP_ANONYMOUS) | |
n = mm.write(b"lots of data") | |
mm.seek(0) | |
print(mm.read().decode('ascii')) | |
mm.seek(0) |
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
[19:59] Welcome to <b>chch-python-2020-07</b>!<br><br>For help on using BigBlueButton see these (short) <a href="http://www.bigbluebutton.org/html5" target="_blank"><u>tutorial videos</u></a>.<br><br>To join the audio bridge click the phone button. Use a headset to avoid causing background noise for others.<br><br>This server is running <a href="http://docs.bigbluebutton.org/" target="_blank"><u>BigBlueButton</u></a>. | |
[20:00] Jimmy : https://git.1248.nz/python/docker | |
[20:01] Jimmy : Not yet | |
[20:08] Jimmy : I have venue that could be used | |
[20:11] Farzad : nope | |
[20:11] Tae : virtual laugh (hahaha) | |
[20:34] Menno FInlay-Smits : https://sylabs.io/ | |
[20:34] Menno FInlay-Smits : https://podman.io/ | |
[20:41] Menno FInlay-Smits : https://caddyserver.com/ | |
[20:41] Mike : thanks for that. |
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
""" | |
Predictive Predator Tracker | |
Author: Ben McEwen | |
The class predator tracker takes mp4 file input (standard extract.py format). | |
The centroid of the animal is determined (find_center()) and a Kalman filter is used to smooth the | |
movement and reduce noise introduced by occlusion (kalman_filter()). | |
A moving average filter and Kalman filter is used to find the average velocity and this is used to | |
calculate the future position of the animal at a given time (predict_location()). | |
""" |
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
package main | |
import ( | |
"fmt" | |
"time" | |
yaml "gopkg.in/yaml.v2" | |
) | |
type Data struct { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Cacophonator Setup</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="/static/css/bootstrap.min.css"> | |
</head> |
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 | |
if [ $# -lt 3 ]; then | |
echo "usage: sshj <jump_host> <source> <target>" | |
exit 1 | |
fi | |
jump=$1 | |
shift |
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 | |
if [ $# -ne 2 ]; then | |
echo "usage: sshj <jump_host> <target>" | |
exit 1 | |
fi | |
exec ssh -o ProxyCommand="ssh -W %h:%p $1" "$2" |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"time" | |
) | |
import "flag" |
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
package perf_test | |
import ( | |
"bytes" | |
"fmt" | |
"strconv" | |
"testing" | |
) | |
var ( |
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
package b | |
import ( | |
"bytes" | |
"testing" | |
) | |
var needsEscape = []byte(`foo\ bar\"sne`) | |
func BenchmarkOrig(b *testing.B) { |
NewerOlder