Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/npatta01/citibike_ableto
Ableto Take home challenge
https://github.com/npatta01/citibike_ableto
Last synced: 14 days ago
JSON representation
Ableto Take home challenge
- Host: GitHub
- URL: https://github.com/npatta01/citibike_ableto
- Owner: npatta01
- Created: 2017-10-12T10:19:33.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-12T15:37:07.000Z (about 7 years ago)
- Last Synced: 2024-12-07T07:04:28.224Z (18 days ago)
- Language: Jupyter Notebook
- Size: 304 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
About
-----
Ableto take home data challengeDesign a microservice which returns the best station when coming to or departing from the office at various times of day.
Parameters:
Flag for whether arriving or departing
Hour of dayResponse:
Optimal stationSlides
-------
Final presentation slides
[Here](https://docs.google.com/presentation/d/1IhHxAeKih0Lj_leoizIes1RjUCTLcWAhmSYhgmBP31w/edit?usp=sharing)Contact Info
-----
Nidhin PattaniyilAPI
-----
Request
```
localhost:5000/predict?hour=8&arriving=true
```Response
```
{
"flow": -0.0728267233241351,
"station_name": "W 42 St & 8 Ave"
}
```Directory
--------
notebooks: jupyter notebook used when exploring models
code: core python code for running model
data: pickle of scikit learn model
k8s: kubernetes infrastructure file
infrastructure: sample [Terraform](https://www.terraform.io/) codeInstallation
------------## Local
```
conda env create -f environment.yml -n citibike
python app.py```
## Docker
```
docker build . -t citibke
docker run -p 9018:9018 -t citibke
```## Prod build
```
export PROJECT_ID=$(gcloud config get-value project -q)
export VERSION=v1.0.0
gcloud docker -- build -t us.gcr.io/${PROJECT_ID}/citibike:${VERSION} -f Dockerfile .
gcloud docker -- push us.gcr.io/${PROJECT_ID}/citibike:${VERSION}kubectl apply -f k8s/prod/service.yaml
kubectl apply -f k8s/prod/deployment.yaml```