Skip to content

Instantly share code, notes, and snippets.

View pzelasko's full-sized avatar
🌴
Building stuff!

Piotr Żelasko pzelasko

🌴
Building stuff!
View GitHub Profile
@pzelasko
pzelasko / i3-shell.sh
Created January 16, 2018 14:03 — forked from viking/i3-shell.sh
Bash script for i3 to run a terminal in the same working directory as the current focused application
#!/bin/bash
# i3 thread: https://faq.i3wm.org/question/150/how-to-launch-a-terminal-from-here/?answer=152#post-id-152
CMD=gnome-terminal
CWD=''
# Get window ID
ID=$(xdpyinfo | grep focus | cut -f4 -d " ")
# Get PID of process whose window this is
@pzelasko
pzelasko / interactive_audio_plots.py
Created June 9, 2020 20:16 — forked from scottire/interactive_audio_plots.py
Interactive and clickable plots using Panel, Holoviz and Bokeh in Jupyter Notebooks
import numpy as np
import panel as pn
pn.extension()
import holoviews as hv
hv.notebook_extension("bokeh")
# hv.extension('matplotlib')
from holoviews.streams import Stream, Params
from scipy.io import wavfile
from scipy.signal import spectrogram
@pzelasko
pzelasko / debug_pickle.py
Created May 23, 2021 02:52 — forked from jneight/debug_pickle.py
Debug unpickled errors.
# from http://stackoverflow.com/questions/569754/how-to-tell-for-which-object-attribute-pickle-fails
"""
Show which fields cannot be pickled
"""
import pickle
def get_pickling_errors(obj,seen=None):
if seen is None:
seen = []