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 requests | |
API_KEY = 'API_KEY' | |
IDEN = 'DEVICE_ID' | |
# get the list of available devices | |
resp = requests.get('https://api.pushbullet.com/v2/devices',auth=(API_KEY,'')) | |
print resp.json() | |
data = { |
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
from pattern.en import sentiment | |
import colors | |
items = sentiment.viewitems() | |
# some text | |
text = ("Then, the module's variables, functions, and classes will be available to the caller through " | |
"the module’s namespace, a central concept in programming that is particularly helpful and " | |
"powerful in Python. Thanks to the way imports and modules are handled in Python, it is " | |
"relatively easy to structure a Python project. Easy, here, means that you do not have many " |
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
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}' |
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
from pyspark import SparkContext | |
import numpy as np | |
from sklearn.cross_validation import train_test_split, Bootstrap | |
from sklearn.datasets import make_classification | |
from sklearn.metrics import accuracy_score | |
from sklearn.tree import DecisionTreeClassifier | |
def run(sc): |
Loading
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 os, glob | |
folders = glob.glob('*') | |
for folder in folders: | |
if folder != 'gitall.py': | |
print '' | |
print "===="*5 + " " + folder + " " + "===="*5 | |
os.chdir(folder) | |
os.system('git pull') # or whatever commands... |
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
from pyspark import SparkConf, SparkContext | |
from sklearn.datasets import make_classification | |
from sklearn.ensemble import ExtraTreesClassifier | |
import pandas as pd | |
import numpy as np | |
conf = (SparkConf() | |
.setMaster("local[*]") | |
.setAppName("My app") | |
.set("spark.executor.memory", "1g")) |
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 glob | |
import pandas as pd | |
files = glob.glob('*.xlsx') | |
df = pd.DataFrame() | |
for f in files: | |
data = pd.read_excel(f,'Sheet1') | |
df = df.append(data) |
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
Day | Pulse Ox [^manual] | Charge 2 [^automatically detected] | |
---|---|---|---|
1 | 7h41 | 7h21 | |
2 | 7h30 | 7h20 | |
3 | 7h40 | 7h37 | |
4 | 8h19 | 8h33 | |
5 | 7h34 | 7h58 (+ 1h54 [^a nap]) | |
6 | 8h33 | 8h23 | |
7 | 7h45 | 7h16 |
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
Day | Pulse Ox | Charge 2 | |
---|---|---|---|
1 | 7.475 | 9.689 | |
2 | 7.048 | 8.805 | |
3 | 5.692 | 6.689 | |
4 | 7.910 | 9.583 | |
5 | 6.404 | 9.540 | |
6 | 7.514 | 9.350 | |
7 | 5.688 | 7.516 |
OlderNewer