Skip to content

Instantly share code, notes, and snippets.


Zach Caceres zcaceres

View GitHub Profile
zcaceres / instagram-html-parser.js
Created Jan 21, 2020
A simple parser for pulling structured data from the HTML of an Instagram profile.
View instagram-html-parser.js
const jsdom = require('jsdom')
const {
} = jsdom
function toJSDOM(responseBody) {
return new JSDOM(responseBody)
zcaceres /
Created Dec 15, 2019
Go: The Weird Parts – Relating Go to other Languages I Already Know

Go: The Weird Parts

Notes on the unique stuff about go, in the context of other languages that I already know.

Project Organization

  1. Root dir go
  2. src and bin inside the project
  3. unique project/package name

The first statement in a go source file must be package packagenamehere

zcaceres /
Last active Sep 15, 2020
Articles Written to Help New JS Devs
zcaceres / Audio Data Augmentation.ipynb
Last active Dec 25, 2020
Some data augmentation for audio
View Audio Data Augmentation.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
zcaceres /
Last active May 21, 2021
Rough Draft Faster, Better Speech Recognition with Wav2Letter's Auto Segmentation Criterion

Faster, Better Speech Recognition with Wav2Letter's Auto Segmentation Criterion

In 2016, Facebook AI Research (FAIR) broke new ground with Wav2Letter, a fully convolutional speech recognition system.

In Wav2Letter, FAIR showed that systems based on convolutional neural networks (CNNs) could person as well as traditional recurrent neural network-based approaches.

In this article, we'll focus on an understudied module at the core of Wav2Letter: the Auto Segmentation (ASG) Criterion.

Architecture of the wav2letter model

zcaceres /
Last active Mar 23, 2021
Supercharge Your Bash Workflows with GNU `parallel`

Supercharge Your Bash Workflows with GNU parallel

GNU parallel is a command line tool for running jobs in parallel.

parallel is awesome and belongs in the toolbox of every programmer. But I found the docs a bit overwhelming at first. Fortunately, you can start being useful with parallel with just a few basic commands.

Why is parallel so useful?

Let's compare sequential and parallel execution of the same compute-intensive task.

Imagine you have a folder of .wav audio files to convert to .flac:

from model_fastai import FastaiImageClassifier
class PythonServer(object):
def listen(self):
print(f'Python Server started listening on {PORT} ...')
def predict_from_img(self, img_path):
model = FastaiImageClassifier()
return model.predict(img_path)
View node-python-fastai-3.js
static async invoke(method, ...args) {
try {
const zerorpc = PythonConnector.server();
return await Utils.promisify(zerorpc.invoke, zerorpc, method, ...args);
catch (e) {
return Promise.reject(e)
View node-python-fastai-2.js
// Our prediction endpoint (Receives an image as req.file)'/predict', upload.single('img'), async function (req, res) {
const { path } = req.file
try {
const prediction = await PythonConnector.invoke('predict_from_img', path);
catch (e) {
View node-python-fastai-1.js
class PythonConnector {
static server() {
if (!PythonConnector.connected) {
console.log('PythonConnector – making a new connection to the python layer');
PythonConnector.zerorpcProcess = spawn('python3', ['-u', path.join(__dirname, '')]);
PythonConnector.zerorpcProcess.stdout.on('data', function(data) {'python:', data.toString());
PythonConnector.zerorpcProcess.stderr.on('data', function(data) {
console.error('python:', data.toString());