Skip to content

Instantly share code, notes, and snippets.

View janusw's full-sized avatar
🚀

Janus Weil janusw

🚀
  • DFS
  • Frankfurt am Main area, Germany
View GitHub Profile
@janusw
janusw / hello_flask.py
Created February 19, 2019 14:29
small flask script
import sqlite3
from flask import Flask, g
from binascii import hexlify
app = Flask(__name__)
DATABASE = '/home/janus/CashLink/database.db'
def get_db():
db = getattr(g, '_database', None)
@janusw
janusw / get_bibtex_from_inspire.py
Created August 4, 2018 11:54
fetch bibtex info from inspirehep.net
#!/usr/bin/python
#
# This script produces a bibtex file 'inspire.bib' including all papers
# referenced in a collection of .tex files that have an Inspire entry.
#
# It extracts all bibtex keys from the latex file and queries Inspire
# for each of them, in order to get the full bibtex entry.
import os, re, glob, urllib
@janusw
janusw / CMakeLists.txt
Last active September 6, 2021 14:15
cmake script for running the gfortran testsuite with any compiler
#
# This is a cmake script for running (part of) the gfortran testsuite with any compiler.
# Copy into trunk/gcc/testsuite/gfortran.dg/ and run from there:
#
# mkdir test_my_compiler; cd test_my_compiler
# cmake .. -DFC=my_fortran_compiler
# ctest -j$(nproc) -R CMP
# ctest -j$(nproc) -R EXE
#
# Note that the script does not run the complete testsuite, but only those tests which comply with the following conditions: