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 pandas as pd | |
from datetime import datetime | |
from scipy.stats.stats import pearsonr | |
his_columns = ['date_time', 'tp', 'dirp', 'sprp', 'tz', 'hm0', 'ti', 't1', | |
'tc', 'tdw2', 'tdw1', 'tpc', 'nu','eps','qp','ss','tref','tsea', | |
'bat'] | |
hiw_columns = ['date_time','% no reception errors','hmax','tmax','h1_10', | |
't1_10','h1_3','t1_3','Hav','Tav','Eps','#Waves'] |
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
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
network={ | |
ssid="BTHub3-****" | |
key_mgmt=WPA-PSK | |
proto=RSN | |
group=CCMP TKIP | |
pairwise=CCMP TKIP | |
proto=RSN | |
psk="********" |
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 dedupe_df(df): | |
df['index'] = df.index | |
df = df.drop_duplicates(subset='index') | |
df = df.drop("index",1) | |
return df |
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 os | |
import pandas as pd | |
os.chdir('D://J_Morrison//Data//Datawell//Siadar_HebMarine1') | |
wave_height_dfs = [] | |
for year in os.listdir('.'): | |
os.chdir(year) | |
for month in os.listdir('.'): | |
os.chdir(month) | |
wave_height_dfs.append(pd.read_hdf('buoy_data.h5','wave_height')) | |
os.chdir('..') |
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 pandas as pd | |
data_frame = pd.io.parsers.read_csv('time-series.csv',index_col = 0, names=['index','heave']) | |
_max = [[5, 259.0]] | |
indexes = [x[0] for x in _max ] | |
index = data_frame.index | |
timestamps = [index[z] for z in indexes] | |
#['2011-12-30 00:00:04'] | |
print data_frame.ix[timestamps] | |
# heave |
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/local/lib/python3.2/subprocess.py:389: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads. | |
"program uses threads.", RuntimeWarning) | |
basedirlist is: ['/usr/local', '/usr'] | |
============================================================================ | |
BUILDING MATPLOTLIB | |
matplotlib: 1.2.x | |
python: 3.2.3 (default, Sep 6 2012, 14:51:03) [GCC 4.1.2 | |
20080704 (Red Hat 4.1.2-46)] | |
platform: linux2 |
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
# Python modules for taking Cumulus ( sandaysoft.com ) logs into a Pandas | |
# ( pandas.pydata.org ) DataFrame, and using the date and time columns to | |
# create a DateTimeIndex for the DataFrame and sort upon it. | |
import pandas as pd | |
import os | |
import glob | |
from datetime import datetime | |
log_path = 'D:\\log_files_folder' |
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 os | |
import glob | |
import pandas as pd | |
from datetime import datetime | |
# Example below assumes following folder hierarchy D:\Buoy_Data\Buoy_Name\Year\Month\ | |
buoy_names = ['Buoy_Name'] | |
buoy_path = 'D:\\Buoy_Data\\' | |
his_columns = ['date_time', 'Tp', 'dirp', 'sprp', 'Tz', 'Hm0', 'TI', 'T1', 'Tc', |
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
{ | |
"metadata": { | |
"name": "Basemap HebMarine" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |