Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
[log] | |
decorate = true | |
showSignature = true | |
[diff] | |
renames = copy | |
[alias] | |
lg = log --graph --no-show-signature \ | |
--format='%C(auto)%h%d%Creset %s%Cgreen(%cr) %C(bold blue)<%an>%Creset' | |
ls = ls-files -t | |
fa = fetch --all |
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 functools | |
import requests | |
from io import StringIO | |
from bs4 import BeautifulSoup | |
from urllib.parse import urljoin | |
# Henke | |
def atomicformfactor_henke(element): | |
element = element.lower() |
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/python3 | |
# Stephan Kuschel, May 2019 | |
import matplotlib.pyplot as plt | |
import numpy as np | |
def addcolorbar(ax, im, pos='right', size='5%', pad=0.05, orientation='vertical', | |
stub=False, max_ticks=None, label=None): | |
''' |
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 | |
# Stephan Kuschel, 2019 | |
# Works the regex grabbing the printers requires works if computer is set to german. Change sed cmd | |
# accordingly if this is not the case. | |
lpstat -s | grep null | sed 's#Gerät für \(.*\): ///dev/null#\1#' | xargs -n1 lpadmin -x |
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
def findsinglephotons(image, thresupper, threslower, maxsize=2): | |
''' | |
identifies single photons in the image and returns the for each photon the integrated counts on the image | |
* a photon need to be above the thresupper in order to be found | |
* surrounding regions of a photon will be added as long as they are above the threslower value | |
* maxsize=2 controlls over how many pixels a photon may spread | |
Stephan Kuschel, 2019 | |
https://gist.github.com/skuschel/4823d53067263507a04c07ff7f84255f |
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
def pcov(data, I=None, corrcoef=False, rowvar=True): | |
''' | |
Partial covariance | |
Stephan Kuschel, 2019 | |
https://gist.github.com/skuschel/9cd745c4b47ad579481b1ade6115250a | |
''' | |
import numpy as np | |
if I is None: | |
I = np.mean(data, axis=0 if rowvar else 1) |
This file has been truncated, but you can view the full file.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
def addcolorbar(ax, im, pos='right', size='5%', pad=0.05, orientation='vertical', | |
stub=False, max_ticks=None, label=None): | |
''' | |
add a colorbar to a matplotlib image. | |
ax -- the axis object the image is drawn in | |
im -- the image (return value of ax.imshow(...)) | |
When changed, please update: | |
https://gist.github.com/skuschel/85f0645bd6e37509164510290435a85a |
NewerOlder