Loading
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
const auto start = std::chrono::system_clock::now(); | |
process(...) | |
const auto end = std::chrono::system_clock::now(); | |
auto elapsed = [=](auto start, auto end) { | |
return std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(); | |
}; |
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
// About C++11: https://teuder.github.io/rcpp4everyone_en/050_c++11.html | |
// [[Rcpp::plugins("cpp11")]] | |
/* R demo | |
* | |
* library(Rcpp) | |
* sourceCpp("test.cpp") | |
*/ | |
#include <Rcpp.h> |
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 spacy | |
from spacy import displacy | |
from pathlib import Path | |
# spaCy API Documentation : https://spacy.io/api | |
nlp = spacy.load("en_core_web_sm") | |
doc = nlp(u"Next friday at 1 PM, I will have lunch in Paris with my friend Chris, the one who has a red hair cat.") | |
options={"collapse_punct": True, "word_spacing":10, "distance":100} |
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-slim | |
MAINTAINER Pascal Havé <[email protected]> | |
VOLUME /data | |
EXPOSE 5000 | |
RUN pip install -U spacy \ | |
&& python -m spacy download en \ | |
&& python -m spacy download fr \ | |
&& python -m spacy download en_core_web_sm \ | |
&& python -m spacy download en_core_web_md \ | |
&& python -m spacy download en_core_web_lg |
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
# Tell gnuplot to use tabs as the delimiter instead of spaces (default) | |
set datafile separator '\t' | |
# skip first line with 'every ::2' in following commands | |
# First stats file to extract min time value | |
# (must be done before setting that x will be a time data serie) | |
stats "out.dat" every ::2 using 2 prefix "A" | |
# Output to a jpeg 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
# Tell gnuplot to use tabs as the delimiter instead of spaces (default) | |
set datafile separator '\t' | |
# output as png image | |
set terminal png | |
# save file to "benchmark.png" | |
set output "benchmark.png" | |
# The graph title |