These instructions are based on Mistobaan's gist but expanded and updated to work with the latest tensorflow OSX CUDA PR.
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 estimate_house_sales_price(num_of_bedrooms, sqft, neighborhood): | |
price = 0 | |
# In my area, the average house costs $200 per sqft | |
price_per_sqft = 200 | |
if neighborhood == "hipsterton": | |
# some areas cost a bit more | |
price_per_sqft = 400 | |
elif neighborhood == "skid row": |
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
X = [4 3 1 0 1; 5 2 1 0 1; 4 2 1 1 1; 3 1 0 1 1; 1 1 0 1 1] | |
y = [4, 6, 6, 3, 1] | |
theta = pinv(X' * X) * X' * y' |
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 sklearn import linear_model | |
X = [ | |
[4,3,1,0,1], | |
[5,2,1,0,1], | |
[4,2,1,1,1], | |
[3,1,0,1,1], | |
[1,1,0,1,1] | |
] |
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 numpy as np | |
from sklearn import grid_search | |
from sklearn import cross_validation | |
from sklearn.preprocessing import StandardScaler | |
from sklearn.linear_model import SGDRegressor | |
# Load your starting coefficient data as an array called X. This can be as big | |
# as your computer's memory. If that's still not big enough, you can load it in | |
# segments and use partial_fit instead of fit. |
This file has been truncated, but you can view the full file.
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
[ | |
{ | |
"PROVIDER":"013025", | |
"EFF_DT":"20191001", | |
"FYBEGDT":"20190101", | |
"REPTDATE":"20200331", | |
"TERMDATE":"0", | |
"PPSWAIV":"N", | |
"FINUM":"10111", | |
"PROVTYPE":"04", |
Make sure you have python, OpenFace and dlib installed. You can either install them manually or use a preconfigured docker image that has everying already installed:
docker pull bamos/openface
docker run -p 9000:9000 -p 8000:8000 -t -i bamos/openface /bin/bash
cd /root/openface
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
List of ImageNet class numbers and names as used in Keras' pre-trained models. | |
Extracted from https://s3.amazonaws.com/deep-learning-models/image-models/imagenet_class_index.json | |
0, tench | |
1, goldfish | |
2, great_white_shark | |
3, tiger_shark | |
4, hammerhead | |
5, electric_ray |
Pre-reqs:
- Have Python 3 installed. On macOS, this could be installed from homebrew or even via standard Python 3.6 downloaded installer from https://www.python.org/download. On Linux, just use your package manager.
- On macOS:
- Install XCode from the Mac App Store (or install the XCode command line utils).
- Have homebrew installed
- On Linux:
Instructions tested with a Raspberry Pi 2 with an 8GB memory card. Probably also works fine on a Raspberry Pi 3.
Download the latest Raspbian Jessie Light
image. Earlier versions of Raspbian won't work.
Write it to a memory card using Etcher, put the memory card in the RPi and boot it up.