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
from google.cloud import speech | |
import argparse | |
import time | |
from daily import Daily, CallClient | |
SAMPLE_RATE = 44100 | |
CHUNK_COUNT = 10 | |
FRAME_COUNT = CHUNK_COUNT * SAMPLE_RATE // 100 | |
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
const WebSocket = require("ws"); | |
const express = require("express"); | |
const app = express(); | |
const server = require("http").createServer(app); | |
const wss = new WebSocket.Server({ server }); | |
const path = require("path"); | |
const fs = require("fs"); | |
require("dotenv").config(); |
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
from multiprocessing.dummy import Pool | |
from urllib3 import HTTPConnectionPool | |
from tqdm import tqdm | |
import itertools | |
import os | |
import errno | |
n_connections = 32 | |
domain = 'geo-samples.beatport.com' | |
http_pool = HTTPConnectionPool(domain) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import requests | |
import os | |
import argparse | |
import datetime | |
import time | |
parser = argparse.ArgumentParser( | |
description='Download historical data from ADS-B Exchange.') | |
parser.add_argument('-i', '--icao', default='icao.txt', type=str, | |
help='Newline delimited text file of ICAO hex codes.') |
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
class Camera2d : public ofCamera { | |
private: | |
ofVec2f mouseStart; | |
ofVec2f startPosition; | |
float zoom; | |
float maxZoom = .01; | |
float minZoom = 1; | |
float zoomSpeed = 1. / 500; | |
public: | |
void setup() { |
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
#!/bin/bash | |
URL=$1 | |
LAST_PAGE="cache.html" | |
while true; do | |
curl -s "$URL" > "$LAST_PAGE" | |
echo -n "$(date) - $(stat -f "%z" "$LAST_PAGE") - " | |
openssl md5 "$LAST_PAGE" | cut -d' ' -f2 | |
if ! diff -q "$LAST_PAGE" "$LAST_PAGE.old" > /dev/null; then |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import subprocess | |
track_fn = 'audio.wav' | |
timestamps_fn = 'timestamps.csv' | |
with open(timestamps_fn) as f: | |
lines = f.read().splitlines() | |
lines = [e.split(',')[2] for e in lines] | |
cmd_string = 'ffmpeg -hide_banner -loglevel error -i {tr} -acodec copy -ss {st} -to {en} {nm}' |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.