Skip to content

Instantly share code, notes, and snippets.

View kumikoda's full-sized avatar
🧎‍♂️
Summoning AI God

Anson Chu kumikoda

🧎‍♂️
Summoning AI God
View GitHub Profile
@kumikoda
kumikoda / set-timeout.py
Created June 9, 2017 00:19
set timeout in python
import heapq
import time
class runtime:
def __init__(self):
self.heap = []
def setTimeout(self, fn, timeout):
exp = time.time() + timeout
# a simple two line prompt with color
source ~/git-prompt.sh
GIT_PS1_SHOWCOLORHINTS=1
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWUNTRACKEDFILES=1
cyan='\e[0;36m'
blue='\e[0;34m'
green='\e[0;32m'
reset="\e[0m"
PS1="${blue}\u@\h ${cyan}\w${green} \$(__git_ps1) ${reset}\n\$ "
set nocompatible
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/dein.vim " path to dein.vim
call dein#begin(expand('~/.cache/dein')) " path to plugins dir
call dein#add('Shougo/dein.vim') " the plugin manager itself
call dein#add('Shougo/deoplete.nvim') " autocomplete
call dein#add('scrooloose/nerdtree') " file tree explorer
call dein#add('vim-airline/vim-airline') " status bar
call dein#end()