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 sounddevice as sd | |
import numpy as np | |
import tensorflow as tf | |
import queue | |
from collections import defaultdict , deque | |
import time | |
# https://storage.googleapis.com/mediapipe-models/audio_classifier/yamnet/float32/latest/yamnet.tflite | |
# https://github.com/tensorflow/models/blob/master/research/audioset/yamnet/yamnet.py | |
# https://research.google.com/audioset/ontology/index.html |
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 numpy as np | |
from pprint import pprint | |
import librosa | |
import tensorflow as tf | |
# https://storage.googleapis.com/mediapipe-models/audio_classifier/yamnet/float32/latest/yamnet.tflite | |
# https://github.com/tensorflow/models/blob/master/research/audioset/yamnet/yamnet.py | |
# https://research.google.com/audioset/ontology/index.html | |
# https://storage.googleapis.com/mediapipe-tasks/audio_classifier/yamnet_label_list.txt |
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
#!/usr/bin/env python3 | |
import sys | |
import time | |
import json | |
import requests | |
from pprint import pprint | |
import mimetypes | |
from tqdm import tqdm | |
from concurrent.futures import ThreadPoolExecutor | |
from box import Box |
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
package main | |
import ( | |
"fmt" | |
"math" | |
"github.com/gordonklaus/portaudio" | |
) | |
const sample_rate = 44100 | |
const buffer_size = 64 // Number of samples per buffer |
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
( ()=> { | |
let episodes = document.querySelectorAll( "div.titleCardList--metadataWrapper" ); | |
let yaml_string = ""; | |
for ( let i = 0; i < episodes.length; ++i ) { | |
let title_text = episodes[ i ].querySelector( "span.titleCard-title_text" ).innerText; | |
let info_elem = episodes[ i ].querySelector( "div.ptrack-content" ); | |
// let extra_text = info_elem.innerText; | |
let meta_data_ue = info_elem.getAttribute( "data-ui-tracking-context" ); | |
let meta_data_str = decodeURIComponent( meta_data_ue ); | |
let meta_data = JSON.parse( meta_data_str ); |
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
( async ()=> { | |
function sleep( ms ) { return new Promise( resolve => setTimeout( resolve , ms ) ); } | |
function wait_on_element( query_selector ) { | |
return new Promise( function( resolve , reject ) { | |
try { | |
let READY_CHECK_INTERVAL = setInterval( function() { | |
let item = document.querySelectorAll( query_selector ); | |
if ( item ) { | |
if ( item[ 0 ] ) { | |
clearInterval( READY_CHECK_INTERVAL ); |
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
#!/usr/bin/env python3 | |
import sys | |
import nltk | |
from nltk.sentiment import SentimentIntensityAnalyzer | |
from pathlib import Path | |
from pprint import pprint | |
import pickle | |
import nacl.secret # pip install pynacl | |
import nacl.utils | |
import base64 |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"os/signal" | |
"syscall" | |
"strconv" | |
"strings" |
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 | |
# brew install pidof cpulimit | |
PID=$(ps aux | grep "/World of Warcraft Classic.app" | grep -v "WowVoiceProxy" | grep -v "grep" | awk '{print $2}') | |
CPU_LIMIT=170 | |
if [ -n "$1" ]; then | |
CPU_LIMIT=$1 | |
fi | |
while true | |
do | |
cpulimit -l "$CPU_LIMIT" -p $PID |
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 | |
open -a "/Applications/World of Warcraft/_classic_era_/World of Warcraft Classic.app" | |
sleep 4 | |
username="asdf" | |
password="fdsa" | |
osascript -e " | |
tell application \"World of Warcraft Classic\" to activate | |
on x_type(x_text, delay_time) | |
repeat with x_char in x_text |
NewerOlder