Clean repo with respect to .gitignore file:
git rm -r --cached .
git add .
git commit -m "Clean with respect to .gitignore"
Configure a global .gitignore file:
git config --global core.excludesfile ~/.gitignore_global
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "startBackendServer", | |
"type": "shell", | |
"command": "${command:python.interpreterPath}", | |
"args": ["-m", | |
"flask", | |
"run", |
import rispy | |
entries_new = [] | |
with open('test.ris', 'r') as bibliography_file_in: | |
entries = rispy.load(bibliography_file_in) | |
for entry in entries: | |
entry_new = entry.copy() | |
if "keywords" in entry: |
import xml.etree.ElementTree as ET | |
import requests | |
# curl -LH "Accept: application/vnd.datacite.datacite+xml" https://doi.org/10.34894/KEIQRD | |
def get_datapublisher_from_doi(doi): | |
"""Get the publisher from the DOI. | |
Arguments |
import requests | |
def get_url_from_doi(doi): | |
"""Get the url from the DOI. | |
Arguments | |
--------- | |
doi: str | |
The DOI to find the url for. |
DATASET="van_de_schoot_2017" | |
QUERY_STRATEGIES=('max_random' 'max_uncertainty' 'max' 'uncertainty' 'random') | |
# ('max_random' 'max_uncertainty' 'max' 'uncertainty' 'random' 'cluster') | |
for qs in "${QUERY_STRATEGIES[@]}" | |
do | |
asreview simulate benchmark:${DATASET} -q $qs --seed 535 --init_seed 535 -s ${DATASET}_${qs}.h5 | |
asreview plot recall ${DATASET}_${qs}.h5 -o ${DATASET}_${qs}_recall.png |
Clean repo with respect to .gitignore file:
git rm -r --cached .
git add .
git commit -m "Clean with respect to .gitignore"
Configure a global .gitignore file:
git config --global core.excludesfile ~/.gitignore_global
from scipy import interpolate | |
def crop_and_resample_2darray(arr, x_crop, y_crop, resample, *args, **kwargs): | |
"""Crop a 2darray and resize the data""" | |
len_x_crop = x_crop[1]-x_crop[0] | |
len_y_crop = y_crop[1]-y_crop[0] | |
arr_crop = arr[x_crop[0]:x_crop[1], y_crop[0]:y_crop[1]] | |
f = interpolate.interp2d(np.arange(len_y_crop), |
"""Flickr photo downloader. | |
Get credentials for the Flickr API from | |
https://github.com/alexis-mignon/python-flickr-api/wiki/Flickr-API-Keys-and-Authentication | |
# a = flickr_api.auth.AuthHandler() | |
# perms = "read" # set the required permissions | |
# url = a.get_authorization_url(perms) | |
# <rsp stat="ok"> |
[alias] | |
st = status | |
cm = commit -m | |
co = checkout | |
master = checkout master | |
br = branch | |
branches = branch -a | |
remote-tags = ls-remote --tags origin |
echo "Give a new version number (without v prefix)" | |
read version_tag | |
# create git tag | |
git tag -a "v${version_tag}" -m "Version ${version_tag}" | |
git push origin --tags | |
# reader pdf from markdown README. | |
pandoc README.md -o README.pdf |