Skip to content

Instantly share code, notes, and snippets.

@juhasch
juhasch / notebook-xkcd-style-plot
Created October 4, 2012 17:38
IPython notebook containing a xkcd style plot
{
"metadata": {
"name": "xkcd-style-plot"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@juhasch
juhasch / wg-slot-antenna
Created October 4, 2012 22:00
Waveguide Slot Antenna Calculation
{
"metadata": {
"name": "WG-Slot-Antenna"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@juhasch
juhasch / xkcd-style-plot-v3.ipynb
Created October 7, 2012 07:47
IPython notebook demonstrating xkcd style plot
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@juhasch
juhasch / atmospheric-attenuation-v3-xkcd.ipynb
Created October 10, 2012 21:42
Plot attenuation due to atmospheric gases in xkcd style
{
"metadata": {
"name": "atmospheric-attenuation-v3-xkcd"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@juhasch
juhasch / xkcd-style.py
Created October 11, 2012 17:53
xkcd-ify a plot
from pylab import *
import scipy.signal as signal
from scipy.stats import norm
import matplotlib.font_manager as fm
def rand_func(data):
""" multiply data by low-pas filtered random values
data - input data array
"""
length=size(data)
@juhasch
juhasch / gist:4578440
Created January 20, 2013 12:53
Make scikit-rf return list of lines from plot command to allow plot customization
{
"metadata": {
"name": "scikit-rf-plot"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@juhasch
juhasch / scikit-rf-hdf.ipynb
Created January 20, 2013 13:07
Save scikit-rf objects using hdf5pickle
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@juhasch
juhasch / euext.py
Last active December 11, 2015 11:59
Allow to use units with numbers in iPython, e.g. "1n"=1e-9 or "1G"=1e9
# -*- coding: utf-8 -*-
"""
IPython extension for engineering units
See README.txt for usage examples.
Author: Juergen Hasch <[email protected]>
Parts taken from the physics.py extension by Georg Brandl <[email protected]>
This file has been placed in the public domain.
Allows units to be specified like
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@juhasch
juhasch / breakpoint.js
Last active December 15, 2015 09:49
Run code cells in an iPython notebook until a breakpoint is encountered Updated version with div.breakpoint element to display breakpoint indicator.
//----------------------------------------------------------------------------
// Copyright (C) 2013 The IPython Development Team
//
// Distributed under the terms of the BSD License. The full license is in
// the file COPYING, distributed as part of this software.
//----------------------------------------------------------------------------
//============================================================================
// Breakpoint extension - execute notebook cells until breakpoint
// If a breakpoint is set at the currently selected cell, run cell anyway,