Skip to content

Instantly share code, notes, and snippets.

from __future__ import division
from src.optimization import tangency
from bokeh.io import vform
from bokeh.plotting import figure, output_file, show
from bokeh.models import *
from numpy import *
def cobbDouglas_points(xs,px,py,z):
y =[]
<!DOCTYPE html>
<meta charset="utf-8">
<style> /* set the CSS */
body { font: 12px Arial;}
path {
stroke: steelblue;
stroke-width: 2;
fill: none;
@arashaga
arashaga / random_words
Created August 13, 2014 22:52
create random words in python
# just replace the range in chars with a different number to get a larger or smaller random words
words = list()
for i in range(0,100):
chars = "".join([random.choice(string.ascii_letters) for i in range(6)])
words.append(chars)
@arashaga
arashaga / bubblesort.py
Last active August 29, 2015 14:05
Bubble sort in python
def bubblesort(d,order=None):
if type(d) is not list:
return 'Argument must be a list of Integers!'
flag = True
if order == 'dec':
while(flag):
flag = False
for i in range(0,(len(d)-1)):
if not isinstance(d[i],int):