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 pylab import * | |
| import skrf as rf | |
| f = rf.Frequency(0, 2e9, 201, 'hz') | |
| z0 = [50.] | |
| s = rf.Network(frequency=f, s=[-1]*f.npoints, z0=z0, name='short') | |
| o = rf.Network(frequency=f, s=[1]*f.npoints, z0=z0, name='open') | |
| l = rf.Network(frequency=f, s=[0]*f.npoints, z0=z0, name='load') | |
| ns = rf.NetworkSet([s,o,l]) |
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 | |
| from pylab import * | |
| import skrf as rf | |
| import sys | |
| from optparse import OptionParser | |
| parser = OptionParser(usage="%prog: [options]") | |
| parser.add_option("-v", "--verbose", | |
| action="store_true", dest="verbose", default=False, | |
| help="make lots of messages [default]") |
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 | |
| from pylab import * | |
| import skrf as rf | |
| file = sys.argv[1] or 'measured.s1p' | |
| s = rf.Network(file) | |
| s.plot_it_all(show_legend=False) | |
| #subplot(122) | |
| #ax = gca() | |
| #s.plot_s_db(ax=ax, show_legend=False) |
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 | |
| from pylab import * | |
| # source: http://www.wolframalpha.com/input/?i=graph+Hatsune+miku+curve | |
| # ignore "RuntimeWarning: invalid value encountered in sqrt" | |
| seterr(all='ignore') | |
| # heaviside function | |
| def theta(x): |
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 | |
| from numpy import sin,sign,pi,sqrt | |
| import numpy as np | |
| import pyaudio | |
| import array | |
| # generation function derived from WolframAlpha | |
| # http://www.wolframalpha.com/input/?i=graph+Hatsune+miku+curve | |
| # ignore "RuntimeWarning: invalid value encountered in sqrt" |
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
| /* | |
| Serial Event example | |
| When new serial data arrives, this sketch adds it to a String. | |
| When a newline is received, the loop prints the string and | |
| clears it. | |
| A good test for this is to try it with a GPS receiver | |
| that sends out NMEA 0183 sentences. | |
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 | |
| from collada import * | |
| import numpy | |
| mesh = Collada() | |
| effect = material.Effect("effect0", [], "phong", diffuse=(1,0,0), specular=(0,1,0)) | |
| mat = material.Material("material0", "mymaterial", effect) | |
| mesh.effects.append(effect) | |
| mesh.materials.append(mat) |
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 | |
| # Fetch temperature from sensortag by bluetooth low energy and feed it up into xively. | |
| # Source code is derived from https://github.com/msaunby/ble-sensor-pi | |
| # usage: python sensortag2xively.py {mac address} | |
| import xively | |
| import datetime | |
| import sys | |
| import time | |
| import pytz |
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 | |
| import hid | |
| import math | |
| verbose = False | |
| class ADF4351: | |
| DIV1 = 0 | |
| DIV2 = 1 | |
| DIV4 = 2 |
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
| diff --git a/Modules/CMakeASM_YASMInformation.cmake b/Modules/CMakeASM_YASMInformation.cmake | |
| index 50b2848..3d7b330 100644 | |
| --- a/Modules/CMakeASM_YASMInformation.cmake | |
| +++ b/Modules/CMakeASM_YASMInformation.cmake | |
| @@ -1,7 +1,13 @@ | |
| set(ASM_DIALECT "_YASM") | |
| set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS asm) | |
| -if(UNIX) | |
| +if(APPLE) |