| cost | cost / person | |
|---|---|---|
| Yoesmite Park Fees | $30 | $6 |
| Groceries | $170 | $34 |
| lyft ride from SFO to SF | $46 | $11* |
| $246 | $51 |
* the actually cost was $66, before applying a $20 free ride credit. And subsequently the $46 is divided across the group (excluding me).
| # script for making initial space paritioning plot | |
| # for blog post on k-d tree project | |
| import numpy as np | |
| from mpl_toolkits.mplot3d import Axes3D | |
| import matplotlib.pyplot as plt | |
| a= = np.array([[ 6.21829 , 0.779546, 1.82988 ], | |
| [ 5.23381 , 4.69416 , 4.74723 ], | |
| [ 9.74655 , 0.191659, 1.20641 ], |
| from sympy import plot_implicit, symbols, Eq, And | |
| x, y = symbols('x y') | |
| p1 = plot_implicit(Eq(x - y, 0), (x, -5, 5), (y, -5, 5), show=False, line_color='blue', linewidth=1000) | |
| p2 = plot_implicit(Eq(x + y, 0), (x, -5, 5), (y, -5, 5), show=False, line_color='red', linewidth=55) | |
| p3 = plot_implicit(Eq(y, 1), (x, -5, 5), (y, -5, 5), show=False, line_color='green', linewidth=1000) | |
| #p3 = plot_implicit(Eq(2*x - y, 0), (x, -5, 5), (y, -5, 5), show=False, line_color='green', linewidth=1000) |
| BretTyp = list[list[str]] | |
| BLAU = "B" | |
| ORANGE = "O" | |
| LEER = "X" | |
| anfangBret: BretTyp = [[BLAU, BLAU, ORANGE, BLAU], | |
| [ORANGE, ORANGE, BLAU, ORANGE], | |
| [BLAU, BLAU, ORANGE, BLAU], | |
| [BLAU, BLAU, BLAU, BLAU]] |
| from random import uniform | |
| from math import cos, sin, pi, acos | |
| from sympy import Symbol, I, Matrix, factor, simplify, im, re, expand, true | |
| EPSILON = 0.0001 | |
| MAX_ITERATIONS = 1000 | |
| a = Symbol('a', real=true) | |
| b = Symbol('b', real=true) | |
| c = Symbol('c', real=true) |
| from random import uniform | |
| from numpy import arccos, pi, array, cos, sin, cross, sqrt | |
| from sympy.abc import a,b | |
| from sympy import Matrix, pprint | |
| from itertools import product | |
| from sympy.physics.quantum import TensorProduct | |
| # A \otimes \rho_{d} | |
| def orderedTensorProduct(d): |
| from sympy import Matrix | |
| from sympy.abc import a,b | |
| from sympy.physics.quantum import TensorProduct | |
| A = Matrix([[a, -b, 0], | |
| [b, a, 0], | |
| [0, 0, 1]]) | |
| #Embedding into tensor space. | |
| E = Matrix([[1, 0, 0, 0, 0, 0], |
| def fact(n): | |
| if (n <= 0): | |
| return 0 | |
| elif ( n < 3 ): | |
| return n | |
| else: | |
| return fact(n-1) + fact(n-2) | |
| def memoize(f): |
| from sympy import * | |
| from sympy.solvers import solve | |
| x = Symbol('x', real=true) | |
| y = Symbol('y', real=true) | |
| x0 = Symbol('x0', real=true) | |
| x1 = Symbol('x1', real=true) | |
| x2 = Symbol('x2', real=true) | |
| y0 = Symbol('y0', real=true) | |
| y1 = Symbol('y1', real=true) |
| from sympy import * | |
| a = Symbol('a', real=true) | |
| b = Symbol('b', real=true) | |
| c = Symbol('c', real=true) | |
| d = Symbol('d', real=true) | |
| x = a + I*b | |
| z = c + I*d |
| cost | cost / person | |
|---|---|---|
| Yoesmite Park Fees | $30 | $6 |
| Groceries | $170 | $34 |
| lyft ride from SFO to SF | $46 | $11* |
| $246 | $51 |
* the actually cost was $66, before applying a $20 free ride credit. And subsequently the $46 is divided across the group (excluding me).