This file contains 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
type Calculator struct { | |
ui.Node | |
Display string | |
} | |
func NewCalculator() *Calculator { | |
c := &Calculator{} | |
c.Build(c) | |
return c | |
} |
This file contains 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
import numpy as np | |
import numpy.random | |
import matplotlib.pyplot as plt | |
def f(x, y): | |
return x*y | |
xmax = ymax = 100 | |
z = numpy.array([[f(x, y) for x in range(xmax)] for y in range(ymax)]) |