This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division | |
import numpy | |
n = 1000000 | |
# 2D data spread uniformly across a square of A=1 | |
data = numpy.random.uniform(-0.5, 0.5, size=(n, 2)) | |
# Count points that are within distance 0.5 from center | |
inside = len( | |
numpy.argwhere( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<!-- | |
ISO-8859-1 based URL-encoding demo | |
Written by Mike J. Brown, mike@skew.org. | |
Updated 2002-05-20. | |
No license; use freely, but credit me if reproducing in print. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.constants import physical_constants as pc | |
import numpy | |
import scipy.stats | |
import scipy.linalg | |
def a(): | |
def pnorm(v, p): | |
return sum([x**p for x in v])**(1/p) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sliding_window(data, size, stepsize=1, padded=False, axis=-1, copy=True): | |
""" | |
Calculate a sliding window over a signal | |
Parameters | |
---------- | |
data : numpy array | |
The array to be slided over. | |
size : int | |
The sliding window size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN:VCALENDAR | |
VERSION:2.0 | |
PRODID:ics.py - http://git.io/lLljaA | |
BEGIN:VEVENT | |
DTEND:20211020T081500Z | |
DTSTART:20211020T070000Z | |
SUMMARY:P4 (repeat): Array Processing\, Room Acoustics\, Spatial Audio\, and Audio Events\; Demonstrations | |
UID:8e2429fd-d719-4ade-bb37-593bbcadf6c6@8e24.org | |
END:VEVENT | |
BEGIN:VEVENT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import sys | |
import getpass | |
import hashlib | |
import argparse | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bash test.sh | |
Running virtualenv with interpreter /usr/local/bin/python3 | |
Using base prefix '/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6' | |
New python executable in /Users/me/sotest/virtenv3/bin/python3.6 | |
Also creating executable in /Users/me/sotest/virtenv3/bin/python | |
Installing setuptools, pip, wheel...done. | |
Running virtualenv with interpreter /usr/local/bin/python2 | |
New python executable in /Users/me/sotest/virtenv2/bin/python2.7 | |
Also creating executable in /Users/me/sotest/virtenv2/bin/python | |
Installing setuptools, pip, wheel...done. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''Use this if you have a pre trained net and dont want to wait for a few hours''' | |
from __future__ import print_function | |
from keras.models import Sequential | |
from keras.layers.core import Dense, Activation, Dropout | |
from keras.layers.recurrent import LSTM | |
from keras.utils.data_utils import get_file | |
import numpy as np | |
import random | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
import matplotlib.pyplot as plt | |
def tupper(x,y): | |
return 0.5 < ((y // 17) // (2**(17 * x + y % 17))) % 2 | |
N = 4858450636189713423582095962494202044581400587983244549483093085061934704708809928450644769865524364849997247024915119110411605739177407856919754326571855442057210445735883681829823754139634338225199452191651284348332905131193199953502413758765239264874613394906870130562295813219481113685339535565290850023875092856892694555974281546386510730049106723058933586052544096664351265349363643957125565695936815184334857605266940161251266951421550539554519153785457525756590740540157929001765967965480064427829131488548259914721248506352686630476300 | |
x, y = numpy.meshgrid(numpy.arange(107), numpy.arange(N, N + 17)[::-1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\def\speaker{% | |
(11mm,2mm) -- +(0mm,-4mm) | |
(13mm,4mm) -- +(0mm,-8mm) | |
(15mm,6mm) -- +(0mm,-12mm) | |
(0mm,0mm) -- +(0mm,-3mm) -- +(4mm,-3mm) -- +(9mm,-7mm) -- +(9mm,7mm) -- +(4mm,3mm) -- +(0mm,3mm) -- +(0mm,0mm) | |
} |
NewerOlder