Skip to content

Fixes black failures #1742

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion maths/montecarlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from numpy import pi, sqrt
from random import uniform


def pi_estimator(iterations: int):
"""An implementation of the Monte Carlo method used to find pi.
1. Draw a 2x2 square centred at (0,0).
Expand All @@ -15,7 +16,6 @@ def pi_estimator(iterations: int):
6. Print the estimated and numpy value of pi
"""


circle_dots = 0

# A local function to see if a dot lands in the circle.
Expand Down
5 changes: 4 additions & 1 deletion scheduling/first_come_first_served.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ def calculate_turnaround_times(
>>> calculate_turnaround_times([10, 3], [0, 10])
[10, 13]
"""
return [duration_time + waiting_times[i] for i, duration_time in enumerate(duration_times)]
return [
duration_time + waiting_times[i]
for i, duration_time in enumerate(duration_times)
]


def calculate_average_turnaround_time(turnaround_times: List[int]) -> float:
Expand Down