This file contains hidden or 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
| # http://en.wikipedia.org/wiki/Spectral_centroid | |
| from __future__ import division | |
| from numpy import abs, sum, linspace | |
| from numpy.fft import rfft | |
| spectrum = abs(rfft(signal)) | |
| normalized_spectrum = spectrum / sum(spectrum) # like a probability mass function | |
| normalized_frequencies = linspace(0, 1, len(spectrum)) | |
| spectral_centroid = sum(normalized_frequencies * normalized_spectrum) |
This file contains hidden or 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
| """ | |
| Measure the distance between two microphones based on the delay of a | |
| clap from a point that is collinear with the two microphones. | |
| Make sure your signal isn't clipping. | |
| First test: | |
| 2 electrets 26 cm apart, hand clap | |
| Distance: -25.72 cm | |
| Sub-sample distance: -26.02 cm |
This file contains hidden or 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
| Comment availability in January 2004, Sato has been based on electricity. | |
| ● J-FET (measurement environment | Vds | = 10V) | |
| Manufacturer, model number, voltage, V, current, A, Power, W, M, IDSS, Ciss, Crss, Yfs, Remarks | |
| 日電, (K68A), 50, V, -, A, 0.25, W, y, 0.5-12mA, 13p, 2.6p, 4.0-12 - mS, waste, low noise, high gm, difficulties in obtaining (Suzusho .) | |
| 日電, (J44/K163), 40, V, -, A, 0.4, W, y, 1.0-18mA, 50p/13p, 10p/3.2p, 7.0 ----- mS, waste, low noise, high gm, hard to obtain | |
| 日電, (K523), 50, V, -, A, 0.4, W, y, 1.0-18mA, 13p, 3.2p, 7.0 ----- mS, garbage, pin care DSG, low noise, high gm get difficult (Suzusho) | |
| 日電, (K533), 50, V, -, A, 0.4, W, y, 1.0-18mA, 13p, 3.2p, 7.0 ----- mS, K523 through the difficulty of obtaining for industrial (commercial bell) | |
| Mitsubishi, J498/K2880, 50, V, -, A, 0.45, W, y, 0.6-12mA, 18p/8p, --/1.5p, 1.5-4.0-mS, J40/K381 hard to obtain | |
| Toshiba, J109/K389, 30, V, -, A, 0.2, W, y, 2.6-20mA, 95p/25p, 25p/5.5p, 8.0-20 - mS, Dual |
This file contains hidden or 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
| arrows ← ↑ → ↓ ↔ ↵ ⇐ ⇑ ⇒ ⇓ ⇔ | |
| pipes | ¦ | |
| math ± ∞ × | |
| greek Αα Ββ Γγ Δδ Εε Ζζ Ηη Θθ Ιι Κκ Λλ Μμ Νν Ξξ Οο Ππ Ρρ ΣσςΤτ Υυ Φφ Χχ Ψψ Ωω | |
| misc ♥ • |
This file contains hidden or 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 | |
| """ | |
| Event logger | |
| The basic idea is just to provide an interface dedicated to manual data | |
| logging. It will log the exact date and time that the user enters strings, | |
| and allow it to be formatted for output in various ways. | |
| Should be able to prompt the user to enter something at a given interval. |
This file contains hidden or 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
| """ | |
| Bandlimited versions of scipy.signal.waveforms. | |
| Intent is mathematical perfection over performance; | |
| these use additive synthesis, so they are slow, but exact. | |
| Less ideal methods using BLIT: | |
| Sawtooth can be made by integrating BLIT minus a DC value to prevent integrator wandering off | |
| Square can be made by integrating bipolar BLIT | |
| Triangle can be made by integrating square |
This file contains hidden or 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
| ;nyquist plug-in | |
| ;version 2 | |
| ;type analyze | |
| ;name "Selection Duration..." | |
| ;action "Getting selection duration..." | |
| ;info "by David R. Sky, Steven Jones, Dominic Mazzoni\nReleased under terms of GNU Public License" | |
| ; Selection Duration by David R. Sky | |
| ; Code help from Steven jones, Dominic Mazzoni | |
| ; updated January 2, 2006 |
This file contains hidden or 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
| ;nyquist plug-in | |
| ;version 1 | |
| ;type analyze | |
| ;name "Amplitude statistics..." | |
| ;action "Calculate amplitude statistics..." | |
| ; [email protected] | |
| ; 2010-08 | |
| ; Set the output format (example: 53.3 dB) |
This file contains hidden or 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
| // ==UserScript== | |
| // @name Craiglist Live Filter | |
| // @namespace srawlins | |
| // @description Filter out listings with given words on Craigslist | |
| // @include http://*.craigslist.org/search/* | |
| // ==/UserScript== | |
| // v1.2 | |
| var clfDiv = document.createElement('div'); |
This file contains hidden or 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
| ;------------------------------------------------------------------------------ | |
| ; Disable Insert key | |
| ;------------------------------------------------------------------------------ | |
| $Insert::return | |
| !Insert::Send, {Insert} ; Use Alt+Insert to toggle the 'Insert mode' | |
| ;------------------------------------------------------------------------------ | |
| ; Hand tool with middle button in Adobe Reader | |
| ;------------------------------------------------------------------------------ | |
| #IfWinActive ahk_class AdobeAcrobat |