Skip to content

Instantly share code, notes, and snippets.

View oroszl's full-sized avatar

László Oroszlány oroszl

View GitHub Profile
@oroszl
oroszl / numba_speed_test.ipynb
Created October 17, 2019 09:42
simple way to speed up analytic function evaluations with numba
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oroszl
oroszl / sisil.ipynb
Created December 13, 2017 11:55
bismutahn
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oroszl
oroszl / test.py
Last active September 6, 2017 12:33
test
import matplotlib
matplotlib.use('Agg')
import pybinding as pb
import numpy as np
import matplotlib.pyplot as plt
import pickle
import argparse
import sys
from matplotlib import pylab, mlab
@oroszl
oroszl / Kubo_pybinding.ipynb
Created August 6, 2017 14:37
kpm finite size conductivity
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oroszl
oroszl / sisl_optimalization_numpy.ipynb
Created July 19, 2017 19:58
further optimizing dense sisl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oroszl
oroszl / dense.py
Created July 6, 2017 20:23
dense sisl routines
def Skd_MK2(dh, k=(0, 0, 0)):
dtype = np.complex128
k = np.asarray(k, np.float64)
k.shape = (-1,)
# sparse matrix dimension (dh.no)
V = zeros((len(dh), len(dh)), dtype=dtype)
# Get the reciprocal lattice vectors dotted with k
kr = dot(dh.rcell, k)
# Calculate all phases
phases = exp(-1j * dot(kr, dot(dh.cell, dh.sc.sc_off.T)))
@oroszl
oroszl / Bose_gas_mathjax_killer
Created March 16, 2017 17:29
a notebook that breaks mathjax and nbconvert
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true,
"scrolled": true