Module Expr Str ImportFrom alias FunctionDef arguments args defaults body If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr keyword NameLoad Pass Assign NameStore Call NameLoad Num Assign NameStore BinOpDiv Call NameLoad NameLoad Num Print NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad For NameStore Call NameLoad BinOpSub Call NameLoad NameLoad Num body Assign NameStore SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad NameLoad Index NameLoad NameLoad Return NameLoad decorator_list Assign NameStore Num Assign NameStore BinOpMult BinOpMult Num NameLoad NameLoad Assign NameStore Num Assign NameStore Dict Str Str Str Str Str TupleLoad ListLoad Num Num Num ListLoad Num Num Num NameLoad TupleLoad ListLoad Num Num Num ListLoad BinOpMult Num NameLoad BinOpMult Num NameLoad BinOpMult Num NameLoad BinOpMult Num NameLoad TupleLoad ListLoad Num Num Num ListLoad BinOpMult Num NameLoad BinOpMult Num NameLoad BinOpMult Num NameLoad BinOpMult Num NameLoad TupleLoad ListLoad Num Num Num ListLoad BinOpMult Num NameLoad BinOpMult Num NameLoad BinOpMult Num NameLoad BinOpMult Num NameLoad TupleLoad ListLoad Num Num Num ListLoad BinOpMult Num NameLoad BinOpMult Num NameLoad BinOpMult Num NameLoad BinOpMult Num NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body For NameStore Call NameLoad NameLoad body For NameStore NameLoad body Assign TupleStore NameStore NameStore NameLoad Assign TupleStore NameStore NameStore NameStore NameLoad Assign TupleStore NameStore NameStore NameStore NameLoad Assign TupleStore NameStore NameStore NameStore NameLoad Assign TupleStore NameStore NameStore NameStore NameLoad Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore BinOpMult NameLoad BinOpPow BinOpAdd BinOpAdd BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad Num Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore BinOpMult NameLoad NameLoad AugAssignSub SubscriptStore NameLoad Index Num BinOpMult NameLoad NameLoad AugAssignSub SubscriptStore NameLoad Index Num BinOpMult NameLoad NameLoad AugAssignSub SubscriptStore NameLoad Index Num BinOpMult NameLoad NameLoad AugAssignAdd SubscriptStore NameLoad Index Num BinOpMult NameLoad NameLoad AugAssignAdd SubscriptStore NameLoad Index Num BinOpMult NameLoad NameLoad AugAssignAdd SubscriptStore NameLoad Index Num BinOpMult NameLoad NameLoad For NameStore NameLoad body Assign TupleStore NameStore NameStore NameStore NameLoad AugAssignAdd SubscriptStore NameLoad Index Num BinOpMult NameLoad SubscriptLoad NameLoad Index Num AugAssignAdd SubscriptStore NameLoad Index Num BinOpMult NameLoad SubscriptLoad NameLoad Index Num AugAssignAdd SubscriptStore NameLoad Index Num BinOpMult NameLoad SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Num For NameStore NameLoad body Assign TupleStore NameStore NameStore NameLoad Assign TupleStore NameStore NameStore NameStore NameLoad Assign TupleStore NameStore NameStore NameStore NameLoad Assign TupleStore NameStore NameStore NameStore NameLoad Assign TupleStore NameStore NameStore NameStore NameLoad Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore BinOpSub NameLoad NameLoad AugAssignSub NameStore BinOpDiv BinOpMult NameLoad NameLoad BinOpPow BinOpAdd BinOpAdd BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad Num For NameStore NameLoad body Assign TupleStore NameStore NameStore NameStore NameLoad Assign TupleStore NameStore NameStore NameStore NameLoad Assign NameStore BinOpAdd BinOpAdd BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad AugAssignDiv NameStore Num AugAssignAdd NameStore BinOpMult NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num Num body For NameStore NameLoad body Assign TupleStore NameStore NameStore NameStore NameLoad Assign TupleStore NameStore NameStore NameStore NameLoad AugAssignSub NameStore BinOpMult NameLoad NameLoad AugAssignSub NameStore BinOpMult NameLoad NameLoad AugAssignSub NameStore BinOpMult NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore NameLoad Assign SubscriptStore NameLoad Index Num BinOpDiv NameLoad NameLoad Assign SubscriptStore NameLoad Index Num BinOpDiv NameLoad NameLoad Assign SubscriptStore NameLoad Index Num BinOpDiv NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad Num Num NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Print TupleLoad Str NameLoad Print TupleLoad Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad Return NameLoad decorator_list
N/A N/A 
nbody sim
 time time main N/A N/A N/A N/A N/A N/A PYTHON PYTHONJS N/A N/A N/A N/A pythonjs configure direct_operator + N/A N/A N/A pythonjs configure direct_operator * N/A N/A N/A pythonjs configure direct_keys True N/A N/A times N/A test_nbody 3 N/A avg N/A N/A sum times 3.0 N/A avg N/A combinations N/A N/A l N/A N/A N/A Pure-Python implementation of itertools.combinations(l, 2). N/A result N/A N/A x N/A range N/A N/A len l 1 N/A N/A ls N/A l N/A N/A x 1 N/A y ls N/A N/A N/A N/A result append N/A N/A l N/A x y N/A result N/A N/A PI 3.14159265359 N/A SOLAR_MASS N/A N/A 4 PI PI N/A DAYS_PER_YEAR 365.24 N/A BODIES N/A sun jupiter saturn uranus neptune N/A N/A 0.0 0.0 0.0 N/A 0.0 0.0 0.0 SOLAR_MASS N/A N/A 4.84143144246 -1.16032004403 -0.103622044471 N/A N/A 0.00166007664274 DAYS_PER_YEAR N/A 0.0076990111842 DAYS_PER_YEAR N/A -6.90460016972e-05 DAYS_PER_YEAR N/A 0.000954791938424 SOLAR_MASS N/A N/A 8.34336671824 4.12479856412 -0.403523417114 N/A N/A -0.00276742510727 DAYS_PER_YEAR N/A 0.00499852801235 DAYS_PER_YEAR N/A 2.30417297574e-05 DAYS_PER_YEAR N/A 0.000285885980666 SOLAR_MASS N/A N/A 12.8943695621 -15.1111514017 -0.223307578893 N/A N/A 0.00296460137565 DAYS_PER_YEAR N/A 0.00237847173959 DAYS_PER_YEAR N/A -2.9658956854e-05 DAYS_PER_YEAR N/A 4.36624404335e-05 SOLAR_MASS N/A N/A 15.3796971149 -25.91931461 0.17925877295 N/A N/A 0.0026806777249 DAYS_PER_YEAR N/A 0.00162824170038 DAYS_PER_YEAR N/A -9.5159225452e-05 DAYS_PER_YEAR N/A 5.15138902047e-05 SOLAR_MASS advance N/A N/A dt n bodies pairs N/A N/A N/A i N/A range n N/A N/A pair pairs N/A N/A N/A p1 p2 pair N/A N/A vec1 v1 m1 p1 N/A N/A vec2 v2 m2 p2 N/A N/A x1 y1 z1 vec1 N/A N/A x2 y2 z2 vec2 N/A dx N/A x1 x2 N/A dy N/A y1 y2 N/A dz N/A z1 z2 N/A mag N/A dt N/A N/A N/A N/A dx dx N/A dy dy N/A dz dz -1.5 N/A b1m N/A m1 mag N/A b2m N/A m2 mag N/A N/A v1 N/A 0 N/A dx b2m N/A N/A v1 N/A 1 N/A dy b2m N/A N/A v1 N/A 2 N/A dz b2m N/A N/A v2 N/A 0 N/A dx b1m N/A N/A v2 N/A 1 N/A dy b1m N/A N/A v2 N/A 2 N/A dz b1m N/A w bodies N/A N/A N/A r v m w N/A N/A r N/A 0 N/A dt N/A v N/A 0 N/A N/A r N/A 1 N/A dt N/A v N/A 1 N/A N/A r N/A 2 N/A dt N/A v N/A 2 N/A report_energy N/A N/A bodies pairs N/A N/A N/A e 0.0 N/A pair pairs N/A N/A N/A p1 p2 pair N/A N/A vec1 v1 m1 p1 N/A N/A vec2 v2 m2 p2 N/A N/A x1 y1 z1 vec1 N/A N/A x2 y2 z2 vec2 N/A dx N/A x1 x2 N/A dy N/A y1 y2 N/A dz N/A z1 z2 N/A e N/A N/A m1 m2 N/A N/A N/A N/A dx dx N/A dy dy N/A dz dz 0.5 N/A w bodies N/A N/A N/A r v m w N/A N/A vx vy vz v N/A a N/A N/A N/A vx vx N/A vy vy N/A vz vz N/A a 2.0 N/A e N/A m a N/A e N/A offset_momentum N/A N/A ref bodies px py pz N/A 0.0 0.0 0.0 N/A N/A w bodies N/A N/A N/A r v m w N/A N/A vx vy vz v N/A px N/A vx m N/A py N/A vy m N/A pz N/A vz m N/A N/A r v m ref N/A N/A v N/A 0 N/A px m N/A N/A v N/A 1 N/A py m N/A N/A v N/A 2 N/A pz m N/A test_nbody N/A N/A iterations N/A N/A N/A SYSTEM N/A N/A key BODIES N/A N/A N/A N/A SYSTEM append N/A BODIES N/A key N/A PAIRS N/A combinations SYSTEM N/A times N/A N/A _ N/A range iterations N/A N/A t0 N/A time N/A start_e N/A report_energy SYSTEM PAIRS N/A N/A advance 0.01 20000 SYSTEM PAIRS N/A end_e N/A report_energy SYSTEM PAIRS N/A t1 N/A time N/A N/A #start energy: start_e N/A N/A #end energy: end_e N/A N/A N/A times append N/A t1 t0 N/A times N/A