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
mount_*/ | |
environment_*/ | |
output.log |
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
#!/bin/bash | |
# This script uses docker to build a specific symengine commit under CentOS6/GCC8/boost1.72 | |
# | |
# Example usage: | |
# | |
# $ sudo ./docker_symengine_cos6.sh e7d7ae55f4fd6740a48acaea0e7e24542ceda6b7 | |
# | |
if ! which docker; then | |
2>&1 echo "You need to have docker installed. See e.g. https://www.docker.com/community-edition#/download" |
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 math | |
import datetime | |
from functools import reduce | |
MÅNADER_PER_ÅR = 12 | |
DAGAR_PER_ÅR = 365.25 | |
DAGAR_PER_MÅNAD = DAGAR_PER_ÅR / MÅNADER_PER_ÅR | |
def årlig_tillväxt_i_procent_uttryckt_som_faktor_per_månad(x_procent): | |
# y**12 == 1 + årlig_aktie_avkastning_procent/100 | |
# log(y) = log(1 + årlig_aktie_avkastning_procent/100)/12 |
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
#include <pybind11/pybind11.h> | |
#include <pybind11/numpy.h> | |
#include <numpy/arrayobject.h> | |
namespace py = pybind11; | |
template<typename T> | |
py::object create_numpy_scalar(T val) { | |
// usage requires initialized NumPy C-API (call _imoprt_array() before use) | |
py::object dt = py::dtype::of<T>(); |
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
#!/bin/bash | |
# BASH shell script for mounting an encrypted EncFS folder for | |
# for sharing with other user/users who are member of $GROUP | |
# Since EncFS runs in userland, no root privileges are needed. | |
# Remember to uncomment user_allow_other in /etc/fuse.conf | |
# It is currently configured to mount the encrypted folder: | |
# ~/.private | |
# on the unencrypted mount point (which is created upon mount): | |
# ~/private |
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 distutils.core import setup | |
from distutils.extension import Extension | |
from Cython.Distutils import build_ext | |
setup( | |
cmdclass = {'build_ext': build_ext}, | |
ext_modules = [Extension("tracer", ["tracer.pyx"])] | |
) |
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
#!/bin/bash -uex | |
# usage: | |
# | |
# $ sudo ./test_repo.sh pycvodes/ | |
# | |
# $ sudo ./test_repo.sh pynleq2 -e PYNLEQ2_NLEQ2_ROOT_URL=http://secret.example.com/nleq2/ | |
# | |
# Depends on drone CLI client: | |
# | |
# http://readme.drone.io/0.4/devs/cli/ |
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
$ conda inspect linkages -n test emacs | |
WARNING: pyldd disagrees with ldd/otool. This will not cause any | |
WARNING: problems for this build, but please file a bug at: | |
WARNING: https://github.com/conda/conda-build | |
WARNING: and (if possible) attach file /home/bjorn/miniconda3/envs/test/bin/ctags | |
WARNING: | |
ldd/otool gives: | |
('linux-vdso.so.1', '') | |
('libc.so.6', '/lib/x86_64-linux-gnu/libc.so.6') | |
pyldd gives: |
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 inspect | |
import pprint | |
class Echo: | |
""" Context maganger for echoing variable assignments (in CPython) | |
Examples | |
-------- | |
>>> with Echo(): | |
... foo = 42 |
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
#!/usr/bin/env python | |
# This file should work with both Python 2 & Python 3: | |
# | |
# $ python2 -m pytest enmako.py | |
# $ python3 -m pytest enmako.py | |
import io | |
import argh | |
from mako.template import Template |