Skip to content

Instantly share code, notes, and snippets.

######################################################################
using PyPlot
using Grid
using Dierckx
using NumericalMath
using splines
#using ApproXD
meshgrid(x::Vector, y::Vector) = (repmat(x, 1, length(y))',
repmat(y, 1, length(x)))
@albop
albop / gist:10281951
Created April 9, 2014 15:15
Browser with tabs
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
import sys
from PySide.QtCore import *
from PySide.QtGui import *
from PySide import QtGui
from PySide.QtWebKit import *
from PySide import QtWebKit
@albop
albop / gist:7525675
Created November 18, 2013 10:26
zero_based_indexing
rewrite(x::Number) = x
rewrite(x::Symbol) = x
rewrite(x::String) = x
function rewrite(expr)
if expr.head == :ref
return Expr(expr.head, expr.args[1], [rewrite(:( 1 + $i)) for i in expr.args[2:end]]...)
else
return Expr(expr.head, [rewrite(i) for i in expr.args]...)
end