Skip to content

Instantly share code, notes, and snippets.

@maurisvh
maurisvh / spectrogram.py
Last active January 28, 2026 07:19
ANSI art spectrogram viewer that reads audio from a microphone
#!/usr/bin/python
import numpy
import pyaudio
import re
import sys
WIDTH = 79
BOOST = 1.0
@hithwen
hithwen / cython-setup.py
Last active August 22, 2016 10:27
Create compiled executable from multimodule python project: The process consists in various steps: 1 - compile your python code and generate a mirror project of .so 2 - Create a a main.py file that import all required third party libraries and your main module and call it 3 - Package it with pyinstaller
import distutils.core
from distutils.extension import Extension
from Cython.Distutils import build_ext # @UnresolvedImport
import os
import shutil
import sys
project_pkg_path = "DESTINATION PATH"
project_python_path = "PATH TO YOUR PYTHON PROJ"
@DaveRichmond
DaveRichmond / retarget.c
Created December 1, 2012 07:20
STM32F2 USART
#include "drivers/serial.h"
#include <stm32f2xx.h>
#include <stdio.h>
#pragma import(__use_no_semihosting_swi)
struct __FILE {
int handle;
};
FILE __stdout;
@ziadoz
ziadoz / awesome-php.md
Last active May 8, 2025 07:37
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.