Skip to content

Instantly share code, notes, and snippets.

View iiey's full-sized avatar

nemo iiey

View GitHub Profile
@iiey
iiey / startjupyter.sh
Created February 25, 2022 09:44
start notebook inside conda env (here named: jupyter)
#!/usr/bin/env bash
# conda is not in PATH manually specify installed directory
CONDADIR="$HOME/miniconda3"
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('$CONDADIR/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
@iiey
iiey / watchdir.py
Created July 30, 2021 09:30
python watchdog
#!/usr/bin/env python3
"""Script is used to observe filesystem changes
of given directory using 'watchdog' api
Usage:
watchdir <PATH>
version 1.0
"""
import logging
@iiey
iiey / init.lua
Created July 21, 2021 11:35
neovim init file
" ~/.config/nvim/init.vim
" LOAD VIM CONFIG
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vim/vimrc
" load plugins with vimplug
call plug#begin('~/.vim/plugged')
@iiey
iiey / git-rewrite-author.sh
Created June 17, 2021 11:23
git rewrite author
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@iiey
iiey / README.md
Created March 24, 2021 21:01 — forked from akshaykhadse/README.md
C++ Google Colab Plugin

C++ Google Colab Plugin

Example notebook can be found here.

@iiey
iiey / shellOut.py
Created January 22, 2021 15:16
gimp nik-collection plugins
#!/usr/bin/env python
"""
ShellOut.py
call an external program passing the active layer as a temp file. Windows Only(?)
Author:
Rob Antonishen
Version:
@iiey
iiey / i3color
Created June 17, 2020 10:42
i3 themes inspired by some colorschemes
#zenburn
set $bg #2c2c2e
set $fg #9f9f9f
set $hi #efef8f
set $ac #a0afa0
set $tx #040404
set $ia #8f8f8f
set $be #8faf9f
set $yw #ccdc90
set $gn #88b090
@iiey
iiey / bashprofile.py
Created July 11, 2019 10:02
profiling bashrc: check for long loading time code
import argparse
import heapq
parser = argparse.ArgumentParser(description='Analyze bash start log for speed.')
parser.add_argument('filename', help='often /tmp/bashload.<PID>.log')
parser.add_argument('-n', default=20, help='number of results to show')
args = parser.parse_args()
filename, n = args.filename, int(args.n)
#add following to ~/.bashrc
@iiey
iiey / createTrackbar.cpp
Created May 28, 2019 09:15
handle static method createTrackbar of opencv
class A
{
public:
void handleTrackbar(int value)
{
// real work here, can use 'this'
}
//workaround not to declare static var used inside
static void onTrackbar(int value, void* ptr)
@iiey
iiey / accuweather_location_codes.txt
Created May 8, 2019 07:37
location codes for accuweather
City Name = "Aachen, DE" Location = "EUR|DE|GM011|AACHEN" Country = "Germany"
City Name = "Aalborg, DK" Location = "EUR|DK|DA007|AALBORG" Country = "Denmark"
City Name = "Aalesund, NO" Location = "EUR|NO|NO007|AALESUND" Country = "Norway"
City Name = "Aare, SE" Location = "EUR|SE|SW006|AARE" Country = "Sweden"
City Name = "Aarhus, DK" Location = "EUR|DK|DA001|AARHUS" Country = "Denmark"
City Name = "Aba, NG" Location = "AFR|NG|NI008|ABA" Country = "Nigeria"
City Name = "Abadan, IR" Location = "MEA|IR|IR016|ABADAN" Country = "Iran"
City Name = "Abakan, RU" Location = "ASI|RU|RS033|ABAKAN" Country = "Russia"
City Name = "Abbotsford, CA" Location = "NAM|CA|BC|ABBOTSFORD" Country = "Canada"
City Name = "Abeokuta, NG" Location = "AFR|NG|NI000|ABEOKUTA" Country = "Nigeria"