Skip to content

Instantly share code, notes, and snippets.

View jusjusjus's full-sized avatar
🐢

Justus Schwabedal jusjusjus

🐢
View GitHub Profile
@jusjusjus
jusjusjus / .vimrc
Last active May 31, 2022 12:22
My vimrc is configured to edit python and c/c++ code.
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2006 Nov 16
""" FROM https://realpython.com/blog/python/vim-and-python-a-match-made-in-heaven/
set nocompatible " required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
@jusjusjus
jusjusjus / fluctuation_period.py
Created March 24, 2017 09:20
Fluctuation period of a signal with a certain filter width
import numpy as np
import matplotlib.pyplot as plt
def mean_filt(x, n):
tent = np.concatenate((np.arange(1, 1+n//2 + n%2), np.arange(1, 1+n//2)[::-1]))
tent = tent/sum(tent)
return np.convolve(x, tent, mode='same')