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
library(text2vec) | |
library(SnowballC) | |
library(doParallel) | |
library(microbenchmark) | |
library(tm) | |
con <- file("/Users/ara/dev/personal/r/final/en_US/en_US.blogs.txt", "r") | |
blogs <- readLines(con, encoding = 'UTF-8') | |
close(con) |
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
es-master: | |
image: 'elasticsearch:latest' | |
command: 'elasticsearch --network.host=0.0.0.0 --node.master=true --cluster.name=escluster' | |
restart: always | |
es-develop: | |
image: 'elasticsearch:latest' | |
command: 'elasticsearch --network.host=0.0.0.0 --cluster.name=escluster --discovery.zen.ping.unicast.hosts=es-master' | |
deployment_strategy: high_availability | |
links: | |
- es-master |
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
osrm: | |
command: './start.sh Sweden http://download.geofabrik.de/europe/sweden-latest.osm.pbf' | |
image: 'irony/osrm5:latest' | |
ports: | |
- '5000:5000' | |
volumes_from: | |
- osrm-data | |
osrm-data: | |
image: 'irony/osrm5:latest' | |
volumes: |
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
"""A generic module to read data.""" | |
import numpy | |
import collections | |
from tensorflow.python.framework import dtypes | |
class DataSet(object): | |
"""Dataset class object.""" | |
def __init__(self, |
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 python:3 | |
MAINTAINER Amir Rahnama "amirrahnama@gmail.com" | |
COPY . /app | |
WORKDIR /app | |
RUN pip install -r requirement.txt | |
RUN pip install --editable . | |
ENV FLASK_APP mini/app.py |
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 numpy as np | |
np.random.seed(0) | |
def cross_validation(X, y, cv_size=0.1): | |
"""Run cross validation on a numpy ndarray and return corresponding indices as well | |
@param: X data in the form of numpy ndarray | |
@param: y labels in the form of numpy ndarray | |
@param: cv_size size of the test set |
OlderNewer