Skip to content

Instantly share code, notes, and snippets.

View kscottz's full-sized avatar
💭
🐀 🫡 🛠️

Katherine Scott kscottz

💭
🐀 🫡 🛠️
View GitHub Profile
@kscottz
kscottz / CallCenter.py
Created June 28, 2013 03:59
Script to grab audio from a microphone and display the results using matplotlib.
from array import array
import pyaudio
import sys
import numpy as np
import matplotlib.pyplot as plt
plt.ion()
ax1=plt.axes()
chunk = 1024
FORMAT = pyaudio.paInt16

Minimum Viable Dioxus / Bevy Sync App

# https://github.com/rydb/bevy_dioxus_sync
pub fn app_ui() -> Element {
    let fps = use_bevy_resource::<FPS>();
    let cube_color = use_bevy_asset_singleton::<MeshMaterial3d<StandardMaterial>, _, DynamicCube>();
    let cube_rotation_speed = use_bevy_resource::<CubeRotationSpeed>();
    let cube_translation_speed = use_bevy_resource::<CubeTranslationSpeed>();
    let cube_transform = use_bevy_component_singleton::<Transform, DynamicCube>();
import requests
from collections import defaultdict
import time
def get_closed_issues_leaderboard(repo_owner, repo_name):
"""
Fetches closed issues from a public GitHub repository and generates a leaderboard
of closed issues by assignee.
Args:
@kscottz
kscottz / dewarp.py
Created August 11, 2013 20:03
Dewarping 360 degree video using python.
from SimpleCV import Camera, VideoStream, Color, Display, Image, VirtualCamera
import cv2
import numpy as np
import time
# build the mapping
def buildMap(Ws,Hs,Wd,Hd,R1,R2,Cx,Cy):
map_x = np.zeros((Hd,Wd),np.float32)
map_y = np.zeros((Hd,Wd),np.float32)
for y in range(0,int(Hd-1)):
@kscottz
kscottz / opencv_twitch.py
Created February 8, 2016 05:00
A hack to slurp up twitch streams and process them with opencv.
import cv2
import numpy as np
import time
import livestreamer
# use live streamer to figure out the stream info
streams = livestreamer.streams("http://www.twitch.tv/inostupid")
stream = streams['best']
# open our out file.
fname = "test.mpg"