This Gist is about how I use PyAudio, NumPy, and Matplotlib to plot freqency spectrum of system sound or microphone.
You can read this blog post for more detail or watch this video:
This Gist is about how I use PyAudio, NumPy, and Matplotlib to plot freqency spectrum of system sound or microphone.
You can read this blog post for more detail or watch this video:
{ | |
"version": "2", | |
"templates": [ | |
{ | |
"type": 1, | |
"title": "Airsonic", | |
"name": "airsonic", | |
"description": "Airsonic is a free, web-based media streamer, providing ubiqutious access to your music. Use it to share your music with friends, or to listen to your own music while at work. You can stream to multiple players simultaneously, for instance to one player in your kitchen and another in your living room.", | |
"logo": "https://raw.githubusercontent.com/SelfhostedPro/selfhosted_templates/master/Images/airsonic-logo.png", | |
"image": "lscr.io/linuxserver/airsonic:latest", |
Sometimes a Python script will simply hang forever with no indication of what is going wrong. Perhaps it's polling a service that will never return a value that allows the program to move forward.
Here's a way to see where the program is currently stuck, using pyrasite a tool for injecting code into running Python processes.
Install gdb.
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 27, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ |
import uuid | |
from IPython.display import display_javascript, display_html, display | |
import json | |
class RenderJSON(object): | |
def __init__(self, json_data): | |
if isinstance(json_data, dict): | |
self.json_str = json.dumps(json_data) | |
else: | |
self.json_str = json |
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
from fastai.text import * | |
from fastai.structured import proc_df | |
import pandas as pd | |
import numpy as np | |
class MixedInputModelWithText(nn.Module): | |
def __init__(self, emb_szs, n_cont, emb_drop, out_sz, szs, drops, | |
y_range=None, use_bn=False, is_reg=True, is_multi=False, n_text=0): | |
super().__init__() | |
for i, (c, s) in enumerate(emb_szs): assert c > 1, f"cardinality must be >=2, got emb_szs[{i}]: ({c},{s})" |