Code for Keras plays catch blog post
python qlearn.py
- Generate figures
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
#!/usr/bin/python | |
import SimpleITK as sitk | |
import vtk | |
import numpy as np | |
import sys | |
from vtk.util.vtkConstants import * | |
filename = sys.argv[1] |
Code for Keras plays catch blog post
python qlearn.py
Your Flask app object implements the __call__
method, which means it can be called like a regular function.
When your WSGI container receives a HTTP request it calls your app with the environ
dict and the start_response
callable.
WSGI is specified in PEP 0333.
The two relevant environ variables are:
SCRIPT_NAME
The initial portion of the request URL's "path" that corresponds to the application object, so that the application knows its virtual "location". This may be an empty string, if the application corresponds to the "root" of the server.
"""Performs automatic speed edits to audio books. | |
Example usage: | |
Assuming you have an audiobook book.aax on your Desktop: | |
1. Convert it to wav: | |
ffmpeg -i ~/Desktop/book.aax ~/Desktop/book.wav | |
2. Adjust the speed: |
Estimated time: 10 minutes
from functools import wraps | |
from itertools import islice, tee, zip_longest, chain, product | |
from collections import deque | |
from pandas import DataFrame | |
nwise = lambda g, *, n=2: zip(*(islice(g, i, None) for i, g in enumerate(tee(g, n)))) | |
nwise_longest = lambda g, *, n=2, fv=object(): zip_longest(*(islice(g, i, None) for i, g in enumerate(tee(g, n))), fillvalue=fv) | |
first = lambda g, *, n=1: zip(chain(repeat(True, n), repeat(False)), g) | |
last = lambda g, *, m=1, s=object(): ((y[-1] is s, x) for x, *y in nwise_longest(g, n=m+1, fv=s)) |
Author: Fernando Pérez.
A demonstration of how to use Python, Julia, Fortran and R cooperatively to analyze data, in the same process.
This is supported by the IPython kernel and a few extensions that take advantage of IPython's magic system to provide low-level integration between Python and other languages.
See the companion notebook for data preparation and setup.