This file contains hidden or 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
'''This script goes along the blog post | |
"Building powerful image classification models using very little data" | |
from blog.keras.io. | |
It uses data that can be downloaded at: | |
https://www.kaggle.com/c/dogs-vs-cats/data | |
In our setup, we: | |
- created a data/ folder | |
- created train/ and validation/ subfolders inside data/ | |
- created cats/ and dogs/ subfolders inside train/ and validation/ | |
- put the cat pictures index 0-999 in data/train/cats |
This file contains hidden or 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
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
root /your/root/path; | |
index index.html; | |
server_name you.server.com; |
This file contains hidden or 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/bin/env python | |
""" | |
Download all the pdfs linked on a given webpage | |
Usage - | |
python grab_pdfs.py url <path/to/directory> | |
url is required | |
path is optional. Path needs to be absolute |
This file contains hidden or 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
"""quick way to create a data frame to try things out""" | |
df = pd.DataFrame(np.random.randn(5, 4), columns=['a', 'b', 'c', 'd']) | |
df['A'] """ will bring out a col """ df.ix[0] """will bring out a row, #0 in this case""" | |
"""to get an array from a data frame or a series use values, note it is not a function here, so no parans ()""" | |
point = df_allpoints[df_allpoints['names'] == given_point] # extract one point row. | |
point = point['desc'].values[0] # get its descriptor in array form. |
This file contains hidden or 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
## DEMO FOR SAFETY GRAPHICS | |
require(lattice) | |
## The following functions are in the HH package | |
panel.ae.dotplot <- | |
function (x, y, groups, ..., col.AB, pch.AB, lower, upper) | |
{ | |
panel.num <- panel.number() | |
if (panel.num == 1) | |
panel.ae.leftplot(x, y, groups = groups, |