##Update
Better version here: https://github.com/abalter/polyglottus/blob/master/simple_kernel.py
Just leaving this because it is linked to in a couple of SO posts
"""Helper functions for working with audio files in NumPy.""" | |
"""some code borrowed from https://github.com/mgeier/python-audio/blob/master/audio-files/utility.py""" | |
import numpy as np | |
import contextlib | |
import librosa | |
import struct | |
import soundfile | |
def float_to_byte(sig): |
##Update
Better version here: https://github.com/abalter/polyglottus/blob/master/simple_kernel.py
Just leaving this because it is linked to in a couple of SO posts
// Dynamic module loading using runtime-composed strings, decisions, etc. | |
for (const m of ["cool", "awesome", "fun", "whee"]) { | |
if (Math.random() > 0.5) { | |
importModule(`/js/${m}.js`).then( | |
module => console.log("Module instance object for " + m, module), | |
e => console.error(e) | |
); | |
} | |
} |
# from https://gist.github.com/MattDMo/6cb1dfbe8a124e1ca5af | |
import os | |
import json | |
import socket | |
import threading | |
activate_this = os.environ.get("SUBLIMEREPL_ACTIVATE_THIS", None) | |
# turn off pager |
This collection of files serves as a simple static demonstration of how to post to a google spreadsheet from an external html <form>
following the example by Martin Hawksey
Depreciation Warning: This code is not maintained, and should be seen as reference implementation only. If you're looking to add features or update, fork the code and update as needed.
You should be able to just open index.html
in your browser and test locally.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/usr/bin/env bash | |
set -e | |
YOUTUBE_FORMATS=$(youtube-dl -F "$1") | |
if [[ "$YOUTUBE_FORMATS" == *"(DASH Video)"* ]]; then | |
VIDEO_NAME=$(youtube-dl --get-filename "$1") | |
VIDEO_NAME_TMP="$VIDEO_NAME.tmp" | |
echo "Filename: $VIDEO_NAME" |
#!flask/bin/python | |
from flask import Flask, jsonify, abort, request, make_response, url_for | |
from flask_httpauth import HTTPBasicAuth | |
app = Flask(__name__, static_url_path = "") | |
auth = HTTPBasicAuth() | |
@auth.get_password | |
def get_password(username): | |
if username == 'miguel': |