Skip to content

Instantly share code, notes, and snippets.

@liob
liob / BibTexCiteKeyForMarkdown.js
Last active April 13, 2021 13:59
Zotero translator - BibTeX key for Markdown based on the work of Peter O'Brien, Simon Kornblith and Richard Karnesky
{
"translatorID": "7cb70025-a888-4a29-a210-93ec52da40d5",
"translatorType": 3,
"label": "BibTeX key for Markdown",
"creator": "created by liob based on the works of Peter O'Brien, Simon Kornblith and Richard Karnesky",
"target": "bib",
"minVersion": "2.1.9",
"maxVersion": null,
"priority": 200,
"inRepository": true,
@liob
liob / config.php
Created August 8, 2013 10:36
Example Configuration of Z-Push-2 for the Z-Push-OX Backend
<?php
/***********************************************
* File : config.php
* Project : Z-Push
* Descr : Main configuration file
*
* Created : 01.10.2007
*
* Copyright 2007 - 2013 Zarafa Deutschland GmbH
*
@liob
liob / Makefile
Created June 1, 2014 14:52
Makefile for building Osmand
BRANCH = r1.7
ANDROIDSDK = /usr/lib/android-sdk
ANDROIDNDK = /usr/lib/android-ndk
OSMSRC = osmand
RESOURCESDIR = resources/rendering_styles/style-icons resources/routing resources/obf_creation resources/countries-info
REPO = https://github.com/osmandapp/Osmand.git
GIT = git
ANT = ant
NDKBUILD = $(ANDROIDNDK)/ndk-build
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
from matplotlib import pyplot as plt
from matplotlib.transforms import blended_transform_factory
def bland_altman(x, y, axis=None, sd_offset=1.96,
n_format='{0:.2f}', *args, **kwargs):
@liob
liob / n dimensional gaus kernel
Last active October 25, 2017 08:26
create a n dimensional gaussian kernel for the given shape
import numpy as np
def gaussian(shape, sigma=1.0, mu=0.0):
""" create a n dimensional gaussian kernel for the given shape """
m = np.meshgrid(*[np.linspace(-1,1,s) for s in shape])
d = np.sqrt(np.sum([x*x for x in m], axis=0))
g = np.exp(-( (d-mu)**2 / ( 2.0 * sigma**2 ) ) )
return g / np.sum(g)