{
"rpc": "https://<network>.infura.io",
"keys": ["put-your-priv-key-here"]
}
import cmath | |
import numpy as np | |
import scipy.stats as stats | |
def mean(angles, deg=True): | |
'''Circular mean of angle data(default to degree) | |
''' | |
a = np.deg2rad(angles) if deg else np.array(angles) | |
angles_complex = np.frompyfunc(cmath.exp, 1, 1)(a * 1j) | |
mean = cmath.phase(angles_complex.sum()) % (2 * np.pi) |
import json | |
import ogr | |
driver = ogr.GetDriverByName('ESRI Shapefile') | |
shp_path = r'C:\GIS\Temp\Counties.shp' | |
data_source = driver.Open(shp_path, 0) | |
fc = { | |
'type': 'FeatureCollection', | |
'features': [] |
import os | |
from time import time | |
from fabric.api import sudo, run, task, env, cd, get, local | |
from fabric.context_managers import shell_env | |
env.hosts = ['yourhost'] | |
env.user = 'yoursshuser' | |
env.password = 'yoursshpassword' | |
# env.key_filename = '~/yourkey.pem' |
#Converting SPSS files to csv with PSPP#
Install and open PSPP Use the File menu to open your file (it probably has a .sav extension) Go to File>New>Syntax to open PSPP's command line window
Enter:
# To record both mic and other audio input sources we need to add a named output sink. See: | |
# http://www.linuxquestions.org/questions/linux-software-2/alsa-and-pulseaudio-recording-multiple-input-devices-877614/ | |
# http://www.youtube.com/watch?v=oJADNOY615Y&feature=player_embedded | |
# Add this to your /etc/pulse/default.pa file | |
load-module module-null-sink sink_name=stream | |
load-module module-loopback latency_msec=5 sink=stream | |
load-module module-loopback latency_msec=5 sink=stream |
#include "msp430g2553.h" | |
#include "stdbool.h" | |
#define LED BIT6 | |
#define RXD BIT1 | |
#define TXD BIT2 | |
unsigned int i; // for loop variable | |
volatile unsigned char rx_flag = 0; | |
volatile unsigned char tx_flag = 0; |