Skip to content

Commit 154350f

Browse files
committed
Code cleanup in baseball simulator
1 parent 73adf3a commit 154350f

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

python-baseball-simulator/Simulating baseball in Python.ipynb

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@
1818
"\n",
1919
"This code uses base Python libraries except for `seaborn`, `tqdm`, and `joblib` packages. You can install these packages using `pip` by typing the following commands into your command line:\n",
2020
"\n",
21-
"> pip install seaborn\n",
22-
"\n",
23-
"> pip install tqdm\n",
24-
"\n",
25-
"> pip install joblib\n",
21+
"> pip install seaborn tqdm joblib\n",
2622
"\n",
2723
"### Using the baseball simulator\n",
2824
"\n",
@@ -279,7 +275,6 @@
279275
" batters = [team_avg] * 9\n",
280276
" batters[designated_hitter_spot] = 0.35\n",
281277
" aprun = ParallelExecutor(n_jobs=-1, use_bar=False)\n",
282-
" aprun(total=num_simulated_games)(delayed(simulate_game)(batters) for _ in range(num_simulated_games))\n",
283278
" designated_hitter_spot_scores[(team_avg, designated_hitter_spot)] = [runs_scored for runs_scored, _ in aprun(total=num_simulated_games)(delayed(simulate_game)(batters) for _ in range(num_simulated_games))]"
284279
]
285280
},
@@ -1288,7 +1283,7 @@
12881283
"name": "python",
12891284
"nbconvert_exporter": "python",
12901285
"pygments_lexer": "ipython3",
1291-
"version": "3.6.5"
1286+
"version": "3.6.6"
12921287
}
12931288
},
12941289
"nbformat": 4,

0 commit comments

Comments
 (0)