Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 18, 2024
1 parent 8462d0b commit 0058da0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/assets/git-committers/page-authors.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"cache_date": "2024-06-18", "page_authors": {"docs/index.md": {"last_commit_date": "2023-09-28", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/CHANGELOG.md": {"last_commit_date": "2023-09-27", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/fifty/index.md": {"last_commit_date": "2023-09-28", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/fifty/1_the_sock_drawer.md": {"last_commit_date": "2023-10-05", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/fifty/2_successive_wins.md": {"last_commit_date": "2023-10-05", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/fifty/3_flippant_jury.md": {"last_commit_date": "2023-10-05", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/fifty/4_first_success.md": {"last_commit_date": "2023-10-06", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/fifty/5_coin_in_square.md": {"last_commit_date": "2023-10-06", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/fifty/6_chuck_a_luck.md": {"last_commit_date": "2023-10-25", "authors": [{"login": "pre-commit-ci[bot]", "name": "pre-commit-ci[bot]", "url": "https://github.com/apps/pre-commit-ci", "avatar": "https://avatars.githubusercontent.com/in/68672?v=4"}, {"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/util/problem_template.md": {"last_commit_date": "2023-09-28", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/blog/index.md": {"last_commit_date": "2024-04-15", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/blog/posts/about.md": {"last_commit_date": "2024-04-15", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/fifty/8_perfect_bridge_hand.md": {"last_commit_date": "2024-05-27", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/mystery/index.md": {"last_commit_date": "2024-06-18", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/mystery/3_fertility_policy.md": {"last_commit_date": "2024-06-18", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}}}
{"cache_date": "2024-06-18", "page_authors": {"docs/index.md": {"last_commit_date": "2023-09-28", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/CHANGELOG.md": {"last_commit_date": "2023-09-27", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/fifty/index.md": {"last_commit_date": "2023-09-28", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/fifty/1_the_sock_drawer.md": {"last_commit_date": "2023-10-05", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/fifty/2_successive_wins.md": {"last_commit_date": "2023-10-05", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/fifty/3_flippant_jury.md": {"last_commit_date": "2023-10-05", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/fifty/4_first_success.md": {"last_commit_date": "2023-10-06", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/fifty/5_coin_in_square.md": {"last_commit_date": "2023-10-06", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/fifty/6_chuck_a_luck.md": {"last_commit_date": "2023-10-25", "authors": [{"login": "pre-commit-ci[bot]", "name": "pre-commit-ci[bot]", "url": "https://github.com/apps/pre-commit-ci", "avatar": "https://avatars.githubusercontent.com/in/68672?v=4"}, {"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/util/problem_template.md": {"last_commit_date": "2023-09-28", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/blog/index.md": {"last_commit_date": "2024-04-15", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/blog/posts/about.md": {"last_commit_date": "2024-04-15", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/fifty/8_perfect_bridge_hand.md": {"last_commit_date": "2024-05-27", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/mystery/index.md": {"last_commit_date": "2024-06-18", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}, "docs/mystery/3_fertility_policy.md": {"last_commit_date": "2024-06-18", "authors": [{"login": "shenxiangzhuang", "name": "shenxiangzhuang", "url": "https://github.com/shenxiangzhuang", "avatar": "https://avatars.githubusercontent.com/u/17157965?v=4"}]}}}
2 changes: 1 addition & 1 deletion docs/mystery/3_fertility_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@

=== "English"

We can simulate the birth process to obtain the numerical solution
We can simulate the birth process to obtain the numerical solution
of the gender ratio under the current fertility policy:

```python exec="true" source="material-block" session="fifty-3"
Expand Down
5 changes: 3 additions & 2 deletions docs/mystery/snippet/3_fertility_policy.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# --8<-- [start:solution]
import random

from enum import Enum


Expand Down Expand Up @@ -27,8 +28,8 @@ def simulation(run_nums: int = 100000) -> None:
for _ in range(run_nums):
female_count += family_event()
male_count += 1
print(f'Males: {male_count}, Females: {female_count}\n')
print(f'Males/Female: {male_count / female_count}\n')
print(f"Males: {male_count}, Females: {female_count}\n")
print(f"Males/Female: {male_count / female_count}\n")


simulation()
Expand Down

0 comments on commit 0058da0

Please sign in to comment.