Skip to content

Commit

Permalink
Blog post timings
Browse files Browse the repository at this point in the history
  • Loading branch information
amyheather committed May 24, 2024
1 parent 0abb873 commit b89da6e
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 11 deletions.
23 changes: 17 additions & 6 deletions evaluation/posts/2024_05_22/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,21 @@ Not doing for this one as it is a test-run.
```{python}
from datetime import datetime
# List of time tuples with prescribed format
FMT = '%H.%M'
# --------------------------------------------------------------
# Modify this section:
# Time in minutes that has been used prior to this day
used_to_date = 0
# List of times from today (as string tuples in list)
times = [
('12.11', '12.16'),
('12.18', '12.19'),
('13.20', '13.56'),
('13.56', '14.27')]
# --------------------------------------------------------------
FMT = '%H.%M'
total_min = 0
for t in times:
# Convert to datetime object
Expand All @@ -193,15 +200,19 @@ for t in times:
total_min += (h1 - h0).total_seconds() / 60
# Time in hours and minutes
print(f'Time spent today: {int(total_min)//60}h {int(total_min)%60}m')
print(f'Time spent today: {int(total_min)}m - or {int(total_min)//60}h {int(total_min)%60}m')
# Total time used
total_used = total_min + used_to_date
print(f'Total used to date: {int(total_used)}m - or {int(total_used//60)}h {int(total_used%60)}m')
# Find time remaining
max = 40*60
remain_min = max - total_min
print(f'Time remaining: {int(remain_min//60)}h {int(remain_min%60)}m')
remain_min = max - total_used
print(f'Time remaining: {int(remain_min)}m - or {int(remain_min//60)}h {int(remain_min%60)}m')
# Find proportion out of 40 hours
print(f'Used {round(total_min/max*100,1)}% of 40 hours max')
print(f'Used {round((total_min+used_to_date)/max*100,1)}% of 40 hours max')
```

## Suggested changes for protocol/template
Expand Down
10 changes: 7 additions & 3 deletions evaluation/posts/2024_05_23/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -352,12 +352,16 @@ for t in times:
total_min += (h1 - h0).total_seconds() / 60
# Time in hours and minutes
print(f'Time spent today: {int(total_min)//60}h {int(total_min)%60}m')
print(f'Time spent today: {int(total_min)}m - or {int(total_min)//60}h {int(total_min)%60}m')
# Total time used
total_used = total_min + used_to_date
print(f'Total used to date: {int(total_used)}m - or {int(total_used//60)}h {int(total_used%60)}m')
# Find time remaining
max = 40*60
remain_min = max - total_min - used_to_date
print(f'Time remaining: {int(remain_min//60)}h {int(remain_min%60)}m')
remain_min = max - total_used
print(f'Time remaining: {int(remain_min)}m - or {int(remain_min//60)}h {int(remain_min%60)}m')
# Find proportion out of 40 hours
print(f'Used {round((total_min+used_to_date)/max*100,1)}% of 40 hours max')
Expand Down
53 changes: 51 additions & 2 deletions evaluation/posts/2024_05_24/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ categories: [reproduce]

## Time elapsed

TBC today (total: TBC%)
1h 9m today (total: 14.4%)

:::

Expand Down Expand Up @@ -44,4 +44,53 @@ Run 1:

Run 2:

<img src="figure_2b.png" width="500" />
<img src="figure_2b.png" width="500" />

## Timings

```{python}
from datetime import datetime
# --------------------------------------------------------------
# Modify this section:
# Time in minutes that has been used prior to this day
used_to_date = 276
# List of times from today (as string tuples in list)
times = [
('11.29', '12.38')]
# --------------------------------------------------------------
FMT = '%H.%M'
total_min = 0
for t in times:
# Convert to datetime object
h0 = datetime.strptime(t[0], FMT)
h1 = datetime.strptime(t[1], FMT)
# Find difference in minutes and add to total
total_min += (h1 - h0).total_seconds() / 60
# Time in hours and minutes
print(f'Time spent today: {int(total_min)}m - or {int(total_min)//60}h {int(total_min)%60}m')
# Total time used
total_used = total_min + used_to_date
print(f'Total used to date: {int(total_used)}m - or {int(total_used//60)}h {int(total_used%60)}m')
# Find time remaining
max = 40*60
remain_min = max - total_used
print(f'Time remaining: {int(remain_min)}m - or {int(remain_min//60)}h {int(remain_min%60)}m')
# Find proportion out of 40 hours
print(f'Used {round((total_min+used_to_date)/max*100,1)}% of 40 hours max')
```

## Suggested changes for protocol/template

✅ = Made the change.

Protocol:

* Increasing the emphasis on fiddling with the random number generators and seeds as likely being a large part of trying to reproduce the studies

0 comments on commit b89da6e

Please sign in to comment.