I hereby claim:
- I am andiwand on github.
- I am andiwand (https://keybase.io/andiwand) on keybase.
- I have a public key ASDyv23uKydhtxOPY8oWlTgjXuiF-16QywVgrvHBOB0gDQo
To claim this, I am signing this object:
focustree = (function() { | |
var entries = []; | |
var currentFocus = []; | |
function indexOf(array, element) { | |
for (var i = 0; i < array.length; i++) { | |
if (array[i] === element) return i; | |
} | |
return -1; |
ObservableArray = function(array) { | |
if (array == null) array = []; | |
if (!Array.isArray(array)) throw new TypeError('argument is not an array'); | |
var listeners = []; | |
this.toString = array.toString; | |
this.listen = function(listener) { | |
listeners.push(listener); |
#!/bin/sh | |
# OpenWrt / LEDE hotplug script to add default routes correctly. | |
# | |
# Location "/etc/hotplug.d/iface/01-default-route". | |
# | |
# Fixed mwan3 "No default route in the main routing table" and | |
# "WARNING: this interface has no default route in the main routing table!" for me. | |
uci get "network.${INTERFACE}.gateway" > /dev/null 2>&1 || exit |
#!/bin/ash | |
# OpenWrt / LEDE script to fix default routes. | |
if [ "$#" -ne 1 ]; then | |
>&2 echo "usage: $0 interface [interface ...]" | |
exit 1 | |
fi | |
for arg in "$@"; do |
#/bin/ash | |
. /lib/functions.sh | |
. /lib/functions/network.sh | |
. /lib/mwan3/mwan3.sh | |
mwan3_iface_status() | |
{ | |
local device result track_ips tracking IP IPT |
#!/usr/bin/env python3 | |
import argparse | |
import socket | |
import struct | |
import threading | |
def arguments(): | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--tcp-port', type=int, default=5004) |
#!/usr/bin/env python3 | |
import argparse | |
import datetime | |
import requests | |
import pandas | |
def date(s): | |
try: | |
return datetime.datetime.strptime(s, '%Y-%m-%d') |
#!/usr/bin/env python | |
import os | |
import sys | |
import time | |
import argparse | |
def main(): | |
parser = argparse.ArgumentParser(description='check access / modified / creation age') | |
parser.add_argument('path', help='path to check') |
I hereby claim:
To claim this, I am signing this object:
import numbers | |
import numpy as np | |
def types(x): | |
if type(x) is np.ndarray: return x.dtype | |
if isinstance(x, numbers.Number): return type(x) | |
result = [] | |
for i in x: result.append(types(i)) | |
return result |