mgmt = graph.openManagement()
it=mgmt.getOpenInstances().iterator(); while (it.hasNext()){ nxt=it.next(); if(!nxt.contains("current")) mgmt.forceCloseInstance(nxt)}
mgmt.commit()
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 | |
import datetime | |
import time | |
row=None | |
with open("hr.csv") as fp: | |
for i, line in enumerate(fp): | |
if i == 1: | |
print(line) | |
row=line |
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 26 columns, instead of 12. in line 2.
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
Name,Sport,Date,Start time,Duration,Total distance (km),Average heart rate (bpm),Average speed (km/h),Max speed (km/h),Average pace (min/km),Max pace (min/km),Calories,Fat percentage of calories(%),Average cadence (rpm),Average stride length (cm),Running index,Training load,Ascent (m),Descent (m),Notes,Height (cm),Weight (kg),HR max,HR sit,VO2max, | |
MTA,OTHER_INDOOR,23-06-2017,13:43:56,00:08:40,0.00,77,,,,,17,71,,,,,,,,170.0,64.0,,,, | |
Sample rate,Time,HR (bpm),Speed (km/h),Pace (min/km),Cadence,Altitude (m),Stride length (m),Distances (m),Temperatures (C),Power (W), | |
1,00:00:00,75,,,,,,,,, | |
,00:00:01,75,,,,,,,,, | |
,00:00:02,75,,,,,,,,, | |
,00:00:03,76,,,,,,,,, | |
,00:00:04,77,,,,,,,,, | |
,00:00:05,78,,,,,,,,, | |
,00:00:06,86,,,,,,,,, |
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
{ | |
'I', | |
'you', | |
'my', | |
'mine', | |
'myself' | |
'we', | |
'us', | |
'our', | |
'ours', |
java -version
wget --no-cookies --header "Cookie: gpw_e24=xxx; oraclelicense=accept-securebackup-cookie;" "http://download.oracle.com/otn-pub/java/jdk/8u73-b02/jdk-8u73-linux-x64.rpm"
sudo rpm -i jdk-8u73-linux-x64.rpm
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
#!/bin/sh | |
# install oracle 8 | |
# source: http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
# install maven and git | |
sudo apt-get install git maven |