Skip to content

Instantly share code, notes, and snippets.

Avatar
🧠
hi

Jordan Matelsky j6k4m8

🧠
hi
View GitHub Profile
@j6k4m8
j6k4m8 / stream-aws-deeplens.sh
Last active Aug 30, 2021
Stream the AWS DeepLens camera to YouTube Live.
View stream-aws-deeplens.sh
#!/bin/bash
# Stream the AWS DeepLens camera to YouTube Live.
#
# The DeepLens has a great high resolution (semi-fisheyed) camera, and it's great for streaming large rooms
# or serving as a janky security cam.
#
# * The `anullsrc` input sends an empty sound channel; this is because YT otherwise will not stream correctly.
# * The `ultrafast` preset can be replaced with `veryfast` if you find that your DeepLens can keep up with it.
# Otherwise you should stick with `ultrafast` which will encode fast enough that you can stream at 1x speed.
@j6k4m8
j6k4m8 / Get-Started-Intern.ipynb
Last active Apr 28, 2021
Get started downloading neuroscience data with Intern and BossDB
View Get-Started-Intern.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@j6k4m8
j6k4m8 / download-tweets.ipynb
Created Apr 22, 2021
Download an archive of a user's tweets and render a simple HTML page (no JS required)
View download-tweets.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@j6k4m8
j6k4m8 / Citation Diversity Statement Generator.ipynb
Last active Apr 13, 2021
Understand gender and race distributions of the papers you cite
View Citation Diversity Statement Generator.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@j6k4m8
j6k4m8 / Get-Started-DotMotif.ipynb
Created Mar 23, 2021
Get Started with DotMotif
View Get-Started-DotMotif.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@j6k4m8
j6k4m8 / Monomorphisms-and-Isomorphisms-In-Python.ipynb
Created Mar 23, 2021
Monomorphisms vs Isomorphisms: Three Search Approaches in Python
View Monomorphisms-and-Isomorphisms-In-Python.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View nth-order-fibonacci.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@j6k4m8
j6k4m8 / Set-Up-Blender-Infinite-Background.py
Created Aug 17, 2020
Set up an infinite Blender background (beveled plane), with Camera, Focus-empty, and DOF
View Set-Up-Blender-Infinite-Background.py
import math
import bpy
def add_infinite_background(coll_name = None):
mesh = bpy.data.meshes.new("InfiniteBackground")
obj = bpy.data.objects.new(mesh.name, mesh)
col = bpy.data.collections.get("Collection")
col.objects.link(obj)
bpy.context.view_layer.objects.active = obj
View Tmux for Absolute Beginners.md

new session

the first time after boot, start a new tmux session:

tmux

(it's working if your shell has a green bar at the bottom)

View ec2cost.py
EC2_NAME = "x1.32xlarge"
# https://stackoverflow.com/a/55109870/979255
def get_uptime():
with open('/proc/uptime', 'r') as f:
uptime_seconds = float(f.readline().split()[0])
return uptime_seconds