This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% C. Microstrip Branch Line Coupler | |
% from http://dx.doi.org/10.1109/22.55775 | |
_=[nan,nan]; | |
ix=@(x) size(x,1)+1; | |
W1=2.413; | |
W2=3.96; | |
% The distance from the source plane to the edge of the coupler is 50*dy | |
L=50*0.406; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# extract gzipped json data from packets with tshark | |
# | |
# e.g.: capture flight data from www.flightradar24.com | |
# open www.flightradar24.com in a web browser | |
# $ tshark -f "net 83.140.21.0/24" -i eth2 -w capture.cap | |
# leave tshark running | |
# $ ./extract.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return SynthDefinition{ | |
content_height = 450, | |
id = "jomox_airbase99"; | |
name = "Jomox AirBase 99", | |
author = "mtcomb [ymtcomb@gmail.com]", | |
beta = true, | |
Section { | |
name = "Analog", | |
Group { | |
layout = "horizontal", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mididings import * | |
from mididings import event | |
config( | |
out_ports=['juno106','alphajuno'] | |
) | |
def Juno106(ev): | |
# print ev.port,ev.channel,ev.ctrl,ev.value | |
return event.SysExEvent(ev.port,[0xF0,0x41,0x32,0x00,ev.ctrl,ev.value,0xF7]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; http://stackoverflow.com/questions/3651494/jfilechooser-with-confirmation-dialog | |
; in Clojure | |
(defn chooser [] | |
(proxy [javax.swing.JFileChooser] [] | |
(approveSelection [] | |
(let [f (proxy-super getSelectedFile)] | |
(if (and (.exists f) | |
(= (.getDialogType this) | |
javax.swing.JFileChooser/SAVE_DIALOG)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from xml.dom import minidom | |
xmldoc = minidom.parse('XML_example_polygon.svg') | |
itemlist = xmldoc.getElementsByTagName('polygon') | |
for s in itemlist : | |
for p in s.attributes['points'].value.split(): | |
print p | |
import numpy as np | |
import pylab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% binvox -t raw Laurana50k.dxf | |
% http://www.cadkit.net/2012/01/sample-dxf-files.html | |
fp=fopen('Laurana50k.raw'); | |
a=fread(fp); | |
a=reshape(a,[256,256,256]); | |
imagesc(squeeze(a(:,:,128))); | |
axis xy; | |
axis square; | |
pause; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from temperusb import TemperHandler | |
import threading, time | |
import logging | |
# logging | |
logging.basicConfig(level=logging.INFO) | |
logger = logging.getLogger(__name__) | |
fh = logging.FileHandler('temp.log') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns lant.ActionListTest) | |
; lanterna/src/test/java/com/googlecode/lanterna/test/gui/ActionListTest.java | |
(import 'com.googlecode.lanterna.gui.Action) | |
(import 'com.googlecode.lanterna.gui.Border) | |
(import 'com.googlecode.lanterna.gui.Border$Invisible) | |
(import 'com.googlecode.lanterna.gui.GUIScreen) | |
(import 'com.googlecode.lanterna.gui.GUIScreen$Position) | |
(import 'com.googlecode.lanterna.gui.Window) | |
(import 'com.googlecode.lanterna.gui.component.ActionListBox) |