Skip to content

Instantly share code, notes, and snippets.

View carlthome's full-sized avatar
🎼

Carl Thomé carlthome

🎼
View GitHub Profile
@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.
@carlthome
carlthome / docker-compose.yaml
Created January 28, 2022 09:51
Check that a host system can use NVIDIA GPUs inside containers. Usage: `docker-compose run test-gpu`
version: "3"
services:
test-gpu:
image: tensorflow/tensorflow:latest-gpu
command: python -c "import tensorflow as tf; assert tf.test.is_gpu_available()"
deploy:
resources:
reservations:
devices:
- driver: nvidia
@carlthome
carlthome / Zero-copy data sharing between JAX and TensorFlow via DLPack.ipynb
Last active August 20, 2023 21:11
Zero-copy data sharing between JAX and TensorFlow via DLPack
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@carlthome
carlthome / NHWC vs. NCHW.ipynb
Created June 25, 2018 11:22
Comparing data formats in Keras ("channels_first" vs "channels_last") for VGG style ConvNets.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@carlthome
carlthome / Signal reconstruction from spectrograms.ipynb
Created May 31, 2018 13:53
Try to recover audio from filtered magnitudes when phase information has been lost.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@carlthome
carlthome / tfcompile.ipynb
Last active October 11, 2022 16:14
Example of how to use XLA AOT via tfcompile to build a Keras model into a shared library.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.