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
# Use `pip3 install pdfminer.six` for python3 | |
from typing import Container | |
from io import BytesIO | |
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter | |
from pdfminer.converter import TextConverter, XMLConverter, HTMLConverter | |
from pdfminer.layout import LAParams | |
from pdfminer.pdfpage import PDFPage |
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
# -*- coding: utf-8 -*- | |
import os, sys | |
sys.path.insert(0, '<abs path to the project>') | |
sys.path.insert(1, '<abs path to the venv>/lib/python3.6/site-packages') | |
# Use python from virtual env. | |
INTERP = os.path.expanduser("<abs path to the venv>/bin/python") | |
if sys.executable != INTERP: | |
os.execl(INTERP, INTERP, *sys.argv) |
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
ggplot(as.long.df(spc), mapping = aes(x = .wavelength, y = spc)) + | |
geom_vline(aes(color=spc, xintercept=.wavelength)) + | |
facet_grid(group~.) + | |
scale_color_gradient2(low='white', mid='red', high='darkred',midpoint = 0.5) |
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
#!/bin/bash | |
# A pre-commit hook to update minified versions of | |
# css/js files on commit | |
# Go to the project's root | |
cd "$(dirname "$0")" | |
cd ../../ | |
# Set up compression command |
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
stat_smooth_func <- function(mapping = NULL, data = NULL, | |
geom = "smooth", position = "identity", | |
..., | |
method = "auto", | |
formula = y ~ x, | |
se = TRUE, | |
n = 80, | |
span = 0.75, | |
fullrange = FALSE, | |
level = 0.95, |
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
fitControl <- trainControl( | |
method = 'LOOCV', | |
savePredictions = TRUE, | |
classProbs = TRUE, | |
summaryFunction = twoClassSummary) | |
fitControlOversampling <- trainControl( | |
method = 'LOOCV', | |
savePredictions = FALSE, | |
classProbs = TRUE, |
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
{% if field.is_hidden %} | |
{{ field }} | |
{% else %} | |
<div class="control-group {% if field.errors %}error{% endif %}"> | |
<label for="{{ field.auto_id }}" {% if field.field.required %}class="control-label"{% endif %}> | |
{% if field.field.required %}<b>{% endif %}{{ field.label|safe }}{% if field.field.required %}*</b>{% endif %} | |
</label> | |
<div class="controls"> | |
{{ field }} | |
{% if field.errors %} |