Skip to content

Instantly share code, notes, and snippets.

View benbogart's full-sized avatar

Ben Bogart benbogart

View GitHub Profile
@dschwertfeger
dschwertfeger / convert.py
Created January 7, 2020 14:29
Script to convert WAV files to TFRecords
import argparse
import math
import os
from multiprocessing import Pool, cpu_count
import numpy as np
import pandas as pd
import tensorflow as tf
from tqdm import tqdm
@timtadh
timtadh / upsert.py
Created December 5, 2013 19:14
How to compile an INSERT ... ON DUPLICATE KEY UPDATE with SQL Alchemy with support for a bulk insert.
#!/usr/bin/env python
# Copyright (c) 2012, Tim Henderson
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# - Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.