Skip to content

Instantly share code, notes, and snippets.

View leduyquang753's full-sized avatar

Lê Duy Quang leduyquang753

View GitHub Profile
@leduyquang753
leduyquang753 / termFormat.py
Created February 2, 2022 05:57
Windows terminal output converter into Discord's ANSI code block.
# Terminal output converter into Discord's ANSI code block.
# Targeted at Windows terminal. Enable HTML text format when copying.
from bs4 import BeautifulSoup as BS
import cssutils as CSS
import win32clipboard as Clipboard
# Map the colors of your scheme to the standard 16 colors supported by the ANSI
# code block.
colorMap = {
@leduyquang753
leduyquang753 / ColoredAudioWaveformGenerator.cpp
Last active December 6, 2024 11:31
Colored audio waveform generator based on band splitting.
/*
Colored audio waveform generator.
The audio is split into 3 bands and then their intensity is assigned to the color channels as follows:
– Under 200 Hz: red.
– From 200 Hz to 3000 Hz: green.
– Over 3000 Hz: blue.
The audio file's path is passed as a command-line argument.
Dependencies:
– dr_libs: https://github.com/mackron/dr_libs