I hereby claim:
- I am bremac on github.
- I am bmacdonellsm (https://keybase.io/bmacdonellsm) on keybase.
- I have a public key ASDakYrO46mNrmDDwJzh_rIr1RY0JrU_ceGqOp9RRnM6_Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import os.path | |
import sys | |
def bsearch(prefix, filename, steps, lines): | |
lo = 0 | |
hi = os.path.getsize(filename) | |
with open(filename, 'r') as fp: | |
while steps > 0: |
s ← 'AAABABBBBSSWSWSSSSSSS' | |
runEnds ← (2 ≠/ s) , 1 ⍝ 1 if an element ends a run | |
counts ← ¯2 -/ 0 , runEnds / ⍳⍴ s ⍝ num elements in each run | |
counts ,¨ runEnds / s | |
3 A 1 B 1 A 4 B 2 S 1 W 1 S 1 W 7 S |
shift ← {(⍺×⍳↑⍴⍵)⌽⍵} | |
adjacent ← {∨/, 2∧⌿(1 shift ⍵),(¯1 shift ⍵)} | |
runends ← {(⍵=0)∧⍵≠(¯1⌽⍵)} | |
runlength ← {(↑lengths),2{⍵-⍺}/lengths←(runends ⍵)/+\⍵} | |
verticals ← {⍵∧(¯1⊖⍵)∨1⊖⍵} | |
ships ← {(runlength ,⍵≠v) , runlength ,⍉v←verticals ⍵} | |
allpresent ← {1 1 1 1 2 2 2 3 3 4 ≡ s[⍋s←ships ⍵]} | |
validate ← {(allpresent g) ∧ ~adjacent g←(0,0⍪⍵⍪0),0} |
#!/bin/sh -eux | |
iface=lo | |
host=127.0.0.1/32 | |
port=80 | |
netem_rule="delay 150ms 10ms loss 0.5%" | |
upstream_rule="rate 500kbit" | |
downstream_rule="rate 2mbit" | |
upstream=1:11 |
# Maintainer: Artem Grunichev <[email protected]> | |
# Contributor: Brendan MacDonell <[email protected]> | |
pkgname=xfstk | |
pkgver=1.7.3 | |
pkgrel=2 | |
pkgdesc="Updater for Intel SoC firmware over USB using the DNX protocol" | |
arch=('i686' 'x86_64') | |
url="http://xfstk.sourceforge.net" | |
license=('LGPL') |
diff --git a/sql/functions/apply_constraints.sql b/sql/functions/apply_constraints.sql | |
index 4afaa83..c0c5303 100644 | |
--- a/sql/functions/apply_constraints.sql | |
+++ b/sql/functions/apply_constraints.sql | |
@@ -3,6 +3,7 @@ | |
*/ | |
CREATE FUNCTION apply_constraints(p_parent_table text, p_child_table text DEFAULT NULL, p_analyze boolean DEFAULT TRUE, p_debug boolean DEFAULT FALSE) RETURNS void | |
LANGUAGE plpgsql | |
+ SET timezone = 'UTC' | |
AS $$ |
#!/usr/bin/python | |
import smtplib | |
import dns.resolver | |
def get_mx_records(domain): | |
try: | |
records = dns.resolver.query(domain, "MX") | |
preferred = sorted(records, key=lambda r: r.preference) |
#!/bin/bash | |
# USAGE: | |
# captive-network <setup|pingall|xterms|restart|teardown> | |
# | |
# captive-network setup create the topology | |
# captive-network pingall check connectivity between nodes | |
# captive-network xterms launch one terminal per node | |
# captive-network restart delete and recreate the topology | |
# captive-network teardown delete the topology |