Skip to content

Instantly share code, notes, and snippets.

install universal-ctags
'''
sudo snap install universal-ctags
'''
run for multiple projects
'''
project$ universal-ctags --options=.ctags . ../dep-project1 ../dep-project2
'''
@micviklui
micviklui / thunderbird-backup.sh
Created May 3, 2023 12:53
thunderbird-backup.sh
rsync -rltgoDvz --modify-window=1 --delete ~/.thunderbird/ --exclude="**/global-messages-db.sqlite" --exclude="**/places.sqlite" --exclude="Crash*Reports/" --exclude="**/Cache/" --exclude="**/startupCache/" --exclude="**/OfflineCache/" /mnt/pixelbox/home/thunderbird-backup
@micviklui
micviklui / test_ls.py
Created May 24, 2018 21:25
run executables in subprocesses in temporary directory
# requires ls/a.file in the root directory
import os
import subprocess
import shutil
import tempfile
import pytest
def mk_cd_tempdir(path, suffix=''):
cur_dir = os.path.abspath(os.path.curdir)
test_dir = tempfile.mkdtemp(suffix=suffix)
#http://www.troyfawkes.com/learn-python-multithreading-queues-basics/
#http://lonelycode.com/2011/02/04/python-threading-and-queues-and-why-its-awesome/
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
import time
import logging
import threading
@micviklui
micviklui / grid_interpolate
Created January 22, 2015 18:03
interpolate 2D-grid with splines
xy_in2 = np.array([
np.linspace(-1.5, 1.5, 11),
np.linspace(1, 1, 11)
]).T
print xy_in2.shape
def _grid_interpolate_additional(xy, xydev, xy_in):
"""Interpolate values for xy and xydev on points of xy_in.
Values of xy_in that are outside of xy result in 0.
@micviklui
micviklui / groupby
Created December 21, 2014 22:25
ipynbs
{
"metadata": {
"name": "",
"signature": "sha256:836445cd939079783ca00f23e0eec88e6e83323c0a7c41d2d665e9fb84653099"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [