Waveguide theory
Circular waveguide cutoff frequency equation for TE11 mode
fc = 1.8412 c / 2 pi a = 1.8412 c / pi D
# Based on https://github.com/haproxy/haproxy/blob/50d8c187423d6b7e9b1083e05370885f6d12e844/src/h1.c#L578 | |
test_nums = list(range(0x20, 0x27)) + list(range(0x7b, 0x81)) | |
def test1(a, b, c, d): | |
# What I expected the code to skip given the comment | |
return all([0x24 <= a <= 0x7e, 0x24 <= b <= 0x7e,0x24 <= c <= 0x7e,0x24 <= d <= 0x7e]) | |
def test3(a, b, c, d): | |
# What it actually does skip | |
return all([0x24 <= a, 0x24 <= b, 0x24 <= c, 0x24 <= d]) and any([a <= 0x7e, b <= 0x7e, c <= 0x7e, d <= 0x7e]) |
defmodule Shortener.LinkManager.Cache do | |
@moduledoc false | |
use GenServer | |
@table_name :my_cache | |
def start_link(args) do | |
GenServer.start_link(__MODULE__, args, name: __MODULE__) | |
end |
# coding=utf8 | |
# This is a python implementation of the boolean expression algorithm | |
# described in the paper "Indexing Boolean Expressions" by Whong et al. | |
# https://theory.stanford.edu/~sergei/papers/vldb09-indexing.pdf | |
# Note this really only uses the index ideas from the paper, because the | |
# ctual algorithm it describes involves shuffling through lists, something | |
# which is extremely difficult to do efficiently in python. I went for the | |
# easier route of simply counting entries. As such, I don't give any |
# From: https://enelogic.docs.apiary.io/#introduction/option-1.-wsse-authentication | |
# Go to the developer center: enelogic.com/nl/developers. | |
# Add your app and choose a desired redirect url (only for OAuth2 purposes, if using WSSE just fill in a URL e.g. enelogic.com) | |
# Fill in values below | |
import hashlib | |
import json | |
import os | |
import requests |
#!/usr/bin/python | |
from subprocess import check_output as run | |
import glob | |
# Get nodes | |
nodes = run(['docker', 'node', 'ls', '-q']).split() | |
self = run(['docker', 'node', 'inspect', 'self', '--format={{.ID}}']).strip() | |
nodeinfo = {} |
import sys | |
import inspect | |
import time | |
import traceback | |
from sqlalchemy import event | |
from sqlalchemy.orm.session import sessionmaker | |
from sqlalchemy import create_engine | |
from sqlalchemy.engine import Engine |
Waveguide theory
Circular waveguide cutoff frequency equation for TE11 mode
fc = 1.8412 c / 2 pi a = 1.8412 c / pi D
martijn@martijn-jessie:~/git/ctm/docker$ sudo /usr/lib/postgresql/9.4/bin/pg_xlogdump -p /tmp/pgtest/postgres/pg_xlog/ 000000010000000000000001 |grep -wE '16386|16384|16390' | |
rmgr: Storage len (rec/tot): 16/ 48, tx: 0, lsn: 0/016A79C8, prev 0/016A79A0, bkp: 0000, desc: file create: base/12139/16384 | |
rmgr: Sequence len (rec/tot): 158/ 190, tx: 683, lsn: 0/016B4258, prev 0/016B2508, bkp: 0000, desc: log: rel 1663/12139/16384 | |
rmgr: Storage len (rec/tot): 16/ 48, tx: 683, lsn: 0/016B4318, prev 0/016B4258, bkp: 0000, desc: file create: base/12139/16386 | |
rmgr: Storage len (rec/tot): 16/ 48, tx: 683, lsn: 0/016B9468, prev 0/016B9418, bkp: 0000, desc: file create: base/12139/16390 | |
rmgr: Sequence len (rec/tot): 158/ 190, tx: 683, lsn: 0/016BC938, prev 0/016BC880, bkp: 0000, desc: log: rel 1663/12139/16384 | |
rmgr: Sequence len (rec/tot): 158/ 190, tx: 683, lsn: 0/016BCAF0, prev 0/016BCAA0, bkp: 0000, desc: log: rel 1663/1213 |