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 pyaudio | |
import time | |
import numpy as np | |
"""Simple Non Blocking Stream PyAudio""" | |
CHUNK = 1024 # Samples: 1024, 512, 256, 128 frames per buffer | |
RATE = 44100 # Equivalent to Human Hearing at 40 kHz | |
INTERVAL = 1 # Sampling Interval in Seconds |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 as np | |
import pymc3 as pm | |
import theano | |
class StochasticMatrix(pm.Continuous): | |
"""A stochastic matrix has rows that sum to 1.""" | |
def __init__(self, theta, *args, **kwargs): | |
shape = (theta.shape[-1], theta.shape[-1]) | |
kwargs.setdefault('shape', shape) | |
super(StochasticMatrix, self).__init__(*args, **kwargs) |
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 as np | |
import scipy.signal | |
import mne | |
from scipy.stats import kurtosis | |
from mne.preprocessing import find_outliers | |
from mne.fixes import nanmean | |
from mne.utils import logger | |
#from mne.preprocessing.eog import _get_eog_channel_index | |
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 | |
# ---------------------------------------------------------------------------- | |
# A fork of pyglet's timer.py by Luke Macken | |
# | |
# Copyright (c) 2006-2008 Alex Holkner | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: |