Skip to content

Instantly share code, notes, and snippets.

View Uberi's full-sized avatar

Anthony Zhang Uberi

View GitHub Profile
@Uberi
Uberi / realtime-plot.py
Created April 25, 2015 02:10
Realtime plotting with Matplotlib.
#!/usr/bin/env python3
import time, random
import math
from collections import deque
start = time.time()
class RealtimePlot:
def __init__(self, axes, max_entries = 100):
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import pyaudio, audioop
CHANNELS = 2
RATE = 44100
CHUNK = 4096
FORMAT = pyaudio.paInt16
p = pyaudio.PyAudio()
stream = p.open(format=FORMAT, channels=CHANNELS, rate=RATE, input=True, frames_per_buffer=CHUNK)
sample_size = pyaudio.get_sample_size(FORMAT)
@Uberi
Uberi / BHR top 100 chrome hangs.ipynb
Last active January 28, 2016 22:31
Top 100 BHR chrome hangs on nightly, by occurrences, median, and total duration.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.