based on : https://vim.rtorr.com/
- :saveas [file] = save file as
- :e! or :edit! = reopen file (or last closed file)
- :w = write (save) the file, but don't exit
""" | |
setTimeout like javascript on python | |
==================================== | |
https://codeburst.io/javascript-like-settimeout-functionality-in-python-18c4773fa1fd | |
""" | |
import threading | |
from functools import wraps |
based on : https://vim.rtorr.com/
- :saveas [file] = save file as
- :e! or :edit! = reopen file (or last closed file)
- :w = write (save) the file, but don't exit
/* | |
* module for encode,decode gammu text message | |
* original gammu message is encoded using 4 length zeropad and hex | |
* | |
*/ | |
const zpad = (n) => ('0000'+n).slice(-4); | |
const zunpad = (n) => n.replace(/^0+/, ''); | |
function toHex(s) { |
/*! | |
* https://github.com/es-shims/es5-shim | |
* @license es5-shim Copyright 2009-2015 by contributors, MIT License | |
* see https://github.com/es-shims/es5-shim/blob/master/LICENSE | |
*/ | |
// vim: ts=4 sts=4 sw=4 expandtab | |
// Add semicolon to prevent IIFE from being passed as argument to concatenated code. | |
; |
# Public Domain, i.e. feel free to copy/paste | |
# Considered a hack in Python 2 | |
import inspect | |
def caller_name(skip=2): | |
"""Get a name of a caller in the format module.class.method | |
`skip` specifies how many levels of stack to skip while getting caller | |
name. skip=1 means "who calls me", skip=2 "who calls my caller" etc. |