Python packages are installed in /Library/Python/2.7/site-packages by default.
To find the path programmatically,
from distutils.sysconfig import get_python_lib
print(get_python_lib())
Output:
/opt/anaconda/anaconda/lib/python3.5/site-packages
Python packages are installed in /Library/Python/2.7/site-packages by default.
To find the path programmatically,
from distutils.sysconfig import get_python_lib
print(get_python_lib())
Output:
/opt/anaconda/anaconda/lib/python3.5/site-packages
#!/usr/bin/python | |
# | |
# This script fetches the current open tabs in all Safari windows. | |
# Useful to run remotely on your mac when you are at work and want | |
# to read a page you have open (remotely) at home but don't remember | |
# the url but can log in to your home system on the cmmand line | |
# | |
import sys | |
from pprint import pprint |
import numpy as np | |
import pandas as pd | |
from sklearn import datasets, linear_model | |
def metrics(m,X,y): | |
yhat = m.predict(X) | |
print(yhat) | |
SS_Residual = sum((y-yhat)**2) | |
SS_Total = sum((y-np.mean(y))**2) | |
r_squared = 1 - (float(SS_Residual))/SS_Total |
from scipy.cluster.hierarchy import dendrogram, linkage | |
import sys | |
import matplotlib | |
matplotlib.use("Qt5Agg") | |
import numpy as np | |
from numpy import arange, sin, pi | |
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar | |
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas | |
from matplotlib.figure import Figure | |
from matplotlib import pyplot as plt |
https://github.com/glue-viz/glue/blob/master/glue/core/roi.py#L65 reference-L78 https://github.com/glue-viz/glue/blob/master/glue/core/roi.py#L212 https://github.com/glue-viz/glue/blob/master/glue/core/roi.py#L385 https://github.com/glue-viz/glue/blob/master/glue/core/roi.py#L465 https://github.com/glue-viz/glue/blob/master/glue/core/roi.py#L484 https://github.com/glue-viz/glue/blob/master/glue/core/roi.py#L506 https://github.com/glue-viz/glue/blob/master/glue/core/roi.py#L563 https://github.com/glue-viz/glue/blob/master/glue/core/roi.py#L780 https://github.com/glue-viz/glue/blob/master/glue/core/roi.py#L877
returns basic business info like name, location, etc.
disadv: only textual data. no restaurant logos
Get/search returns URL of menu too.
pprint.pprint(parse("(dog:20, (elephant:30, horse:60)eh:20)root:50"))
pprint.pprint(parse("(A:0.1,B:0.2,(C:0.3,D:0.4)E:0.5,G:0.8)F:0.9"))
pprint.pprint(parse("(ant:17, (bat:31, cow:22)bc:7, dog:22, (elk:33, fox:12)ef:40)root:1"))
pprint.pprint(parse("(Bovine:0.69395,(Gibbon:0.36079,(Orang:0.33636,(Gorilla:0.17147,(Chimp:0.19268, Human:0.11927)ch:0.08386)gch:0.06124)ggch:0.15057)oggch:0.54939,Mouse:1.21460)root:1"))
How can I remove a commit on GitHub?
git log
git reset --hard ef2ef39d3c2842dd027b42fd96d7b3bc1db6e59d
git push --force
2:
git push -f origin HEAD^:master
3:
git push origin +7f6d03:master
<style> | |
@font-face { | |
font-family: "Computer Modern"; | |
src: url('http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf'); | |
} | |
div.cell{ | |
width:800px; | |
margin-left:16% !important; | |
margin-right:auto; | |
} |