This file contains hidden or 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
| #### Sometimes you only have one of something, so no reason to make instances: | |
| class X(object): | |
| base = 13 | |
| @classmethod | |
| def foo(cls, a, b): | |
| return cls.base + a + b | |
| class Y(X): |
This file contains hidden or 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
| class Galaxy(object): | |
| def __init__(self, size, expansionRate): | |
| self.size = size | |
| self.time = 0 | |
| self.expansionRate = expansionRate | |
| def update(self): | |
| self.time += 1 | |
| self.size += self.expansionRate |
This file contains hidden or 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 pstats | |
| >>> s = pstats.Stats("stats") | |
| >>> s.sort_stats("cumtime") | |
| <pstats.Stats instance at 0x227e758> | |
| >>> s.print_stats(20) | |
| Fri Nov 7 19:46:06 2014 stats | |
| 187322 function calls in 93.877 seconds | |
| Ordered by: cumulative time |
This file contains hidden or 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
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>VectorVisual</title> | |
| <style> | |
| body { | |
| padding: 0; | |
| } | |
| </style> |
This file contains hidden or 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
| console.log({ | |
| "centerChangedNr": visualization.animations.centerChangedNr, | |
| "zoomChangedNr": visualization.animations.zoomChangedNr, | |
| "boundsChangedNr": visualization.animations.boundsChangedNr, | |
| "boundsChangedRealNr": visualization.animations.boundsChangedRealNr | |
| }); |
This file contains hidden or 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
| sigma=0 | |
| ps, draws, points, fps | |
| 0.01, 1, 500 000, 8 | |
| 0.01, 1, 400 000, 10 | |
| 0.01, 1, 300 000, 12 | |
| 0.01, 1, 200 000, 16 | |
| 0.01, 1, 100 000, 33 | |
| 0.005, 1, 500 000, 15 | |
| 0.005, 1, 400 000, 18 |
This file contains hidden or 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
| FPS and (visual) for various datasetpointsnr and gl_PointSize: | |
| points, size, fps | |
| 200 000, 20, 14 | |
| 400 000, 20, 7 | |
| 600 000, 20, 5 | |
| 800 000, 20, 3 | |
| 1 000 000, 20, 2 | |
| 200 000, 10, 33 | |
| 400 000, 10, 18 |
This file contains hidden or 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
| Data size: 1000 000 points times 2 coords + 3 color values: | |
| Load time for 1 arrays of 1000000 points = 39.8480000148993 | |
| Load time for 10 arrays of 100000 points = 57.4979999801144 | |
| Load time for 100 arrays of 10000 points = 53.67699998896569 | |
| Load time for 1000 arrays of 1000 points = 184.61100000422448 | |
| Load time for 10000 arrays of 100 points = 1469.6359999943525 | |
| Draw time for 1 arrays of 1000000 points = 0.15499998698942363 | |
| Draw time for 10 arrays of 100000 points = 0.3859999997075647 |
This file contains hidden or 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
| # some python code goes here |
This file contains hidden or 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
| <% var e = require("./eejs.js"); e.init(buf); %> | |
| a | |
| <% e.begin_block("bar"); %> | |
| A | |
| <% e.begin_block("foo"); %> | |
| XX | |
| <% e.end_block(); %> | |
| B | |
| <% e.end_block(); %> |