Skip to content

Instantly share code, notes, and snippets.

@yangarbiter
yangarbiter / wavernn_train.py
Last active August 31, 2021 22:50
torchaudio: WaveRNN distributed parallel training
# An improvement over the dataparallel implementation here https://github.com/pytorch/audio/blob/main/examples/pipeline_wavernn/main.py
from functools import partial
import argparse
import logging
import os
from collections import defaultdict
from datetime import datetime
from time import time
from typing import List
@yangarbiter
yangarbiter / gist:33a706011d1a833485fdc5000df55d25
Last active March 14, 2023 20:28
Caltech256 pytorch dataloader
from __future__ import print_function
from PIL import Image
import os
import os.path
import glob
import numpy as np
import sys
from scipy.ndimage import imread
@yangarbiter
yangarbiter / gist:8356964
Created January 10, 2014 15:57
system programming programming assignment 1
/* b01902066 ?????? */
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <netinet/in.h>