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
| from matplotlib.mlab import find | |
| import pyaudio | |
| import numpy as np | |
| import math | |
| chunk = 1024 | |
| FORMAT = pyaudio.paInt16 | |
| CHANNELS = 1 | |
| RATE = 44100 |
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
| #!/bin/sh | |
| # config | |
| TOOL_PATH=/opt/tools/x86_64-asustor-linux-gnu | |
| TARGET_PLATFORM=x86_64-asustor-linux-gnu | |
| TARGET_PATH=/opt/target | |
| # check you in shell self | |
| case $0 in | |
| -bash) ;; |
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 | |
| from time import sleep | |
| import os, sys | |
| # Env | |
| rows, cols = os.popen('stty size', 'r').read().split() | |
| filename = os.path.expanduser("~/.welcome_msg") | |
| rows = int(rows) | |
| cols = int(cols) |
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 | |
| import randomdotorg, sys, os | |
| try: | |
| count = int(sys.argv[len(sys.argv)-1]) | |
| sys.argv = sys.argv[:len(sys.argv)-1] | |
| except ValueError: | |
| count = 1 | |
| if len(sys.argv) == 1: | |
| print "You must input file path or list and pick count." |
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
| #define pingTO 1500 // ping Time Out | |
| float ping(int out, int in) { // in = Echo , out = Trig | |
| digitalWrite(out, LOW); | |
| delayMicroseconds(2); | |
| digitalWrite(out, HIGH); | |
| delayMicroseconds(10); | |
| digitalWrite(out, LOW); | |
| float duration = pulseIn(in, HIGH, pingTO); | |
| if ( !duration ) duration = pingTO; |
NewerOlder