Skip to content

Instantly share code, notes, and snippets.

View carlthome's full-sized avatar
🎼

Carl Thomé carlthome

🎼
View GitHub Profile
@carlthome
carlthome / audioldm-stable-audio-open-musicgen.ipynb
Created September 9, 2024 08:09
AudioLDM, Stable Audio Open, MusicGen.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@carlthome
carlthome / gradio.py
Created July 11, 2024 15:42
Example of using a dataclass with Gradio
import numpy as np
from dataclasses import dataclass
import gradio as gr
@dataclass
class A:
x: int
y: int
@carlthome
carlthome / sound-effect-waveform-visualization-tinkering.ipynb
Created June 4, 2024 23:05
Sound effect waveform visualization tinkering.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@carlthome
carlthome / Encode and decode example with T5.ipynb
Last active September 24, 2023 22:14
Encode and decode example with T5.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@carlthome
carlthome / Proximal Policy Optimization (PPO) of the CartPole problem with PyTorch.ipynb
Last active August 20, 2023 21:11
Proximal Policy Optimization (PPO) of the CartPole problem with PyTorch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@carlthome
carlthome / shell.nix
Last active July 2, 2023 20:12
mir_eval from nixpkgs example shell
{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell {
packages = [
(pkgs.python3.withPackages (ps: with ps; [
ipython
mir_eval
]))
];
shellHook = ''
ipython -c 'import mir_eval; print(mir_eval.__version__)'
@carlthome
carlthome / Lagrange polynomial interpolation.ipynb
Last active August 20, 2023 21:11
Lagrange polynomial interpolation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@carlthome
carlthome / create_jupyter_kernel.sh
Created June 15, 2023 11:47
Create a torchaudio compatible Python 3.8 Jupyter kernel for Vertex AI managed notebooks
conda create -y -c conda-forge -n py38 python=3.8 ipykernel ipywidgets 'ffmpeg<5'
conda run -n py38 ipython kernel install --name py38 --user
@carlthome
carlthome / clone_gists_for_user.py
Last active June 5, 2022 11:27
Clone all gists for a given user.
"""Clone all gists repos for user."""
import argparse
import json
from multiprocessing.dummy import Pool
from pathlib import Path
from subprocess import call
from urllib.request import urlopen
def pull(gist):
@carlthome
carlthome / GPT-3 MIDI sequence autocompletion toy example.ipynb
Created May 21, 2022 16:56
Naively encoding MIDI events to a text representation, to autogenerate melodies from a prompt melody with GPT-3.
Sorry, this is too big to display.