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
| pip install streamlit | |
| pip install spacy | |
| python -m spacy download en_core_web_sm | |
| python -m spacy download en_core_web_md | |
| python -m spacy download de_core_news_sm |
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
| """See https://twitter.com/honnibal/status/1120020992636661767 """ | |
| import time | |
| import srsly | |
| from prodigy import recipe | |
| from prodigy.components.db import connect | |
| from prodigy.util import INPUT_HASH_ATTR, set_hashes | |
| from prodigy.components.filters import filter_duplicates | |
| def get_rank_priority(data): |
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
| FROM python:3.6-alpine | |
| # Opted for alpine to get a lean docker image as possible | |
| RUN apk add --no-cache openssl | |
| ENV DOCKERIZE_VERSION v0.6.1 | |
| RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | |
| && tar -C /usr/local/bin -xzvf dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | |
| && rm dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz | |
| # Python deps for alpine |
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
| # Dockerfile for prodigy, just place your linux-wheel (prodigy-0.1.0-cp36-cp36m-linux_x86_64.whl) in same directoty as | |
| # this dockerfile and: | |
| # > docker build . -t prodigy | |
| # > docker run -it -p 8080:8080 -v ${PWD}:/work prodigy bash | |
| FROM python:3.6 | |
| RUN mkdir /prodigy | |
| WORKDIR /prodigy | |
| COPY ./prodigy-0.1.0-cp36-cp36m-linux_x86_64.whl /prodigy | |
| RUN pip install prodigy-0.1.0-cp36-cp36m-linux_x86_64.whl |
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 is a batched LSTM forward and backward pass. Written by Andrej Karpathy (@karpathy) | |
| ### BSD License | |
| ### Re-written in R by @georgeblck | |
| ### | |
| rm(list=ls(all=TRUE)) | |
| LSTM.init <- function(input_size, hidden_size, fancy_forget_bias_init = 3){ | |
| # Initialize parameters of the LSTM (both weights and biases in one matrix) |
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 is a batched LSTM forward and backward pass | |
| """ | |
| import numpy as np | |
| import code | |
| class LSTM: | |
| @staticmethod | |
| def init(input_size, hidden_size, fancy_forget_bias_init = 3): |
NewerOlder