diff options
author | xAlpharax <42233094+xAlpharax@users.noreply.github.com> | 2024-01-30 17:25:59 +0200 |
---|---|---|
committer | xAlpharax <42233094+xAlpharax@users.noreply.github.com> | 2024-01-30 17:25:59 +0200 |
commit | 3be33d0311bc291fb394d4a8de313de35974f47d (patch) | |
tree | 2f0ff79511ed9259e1d84ac1af87f68a560b345a /content/posts/code_test.md | |
parent | f31b3176d064498f970c4d88ff7142a5480d6e5f (diff) |
Infrastructure coming together.
Changes to be committed:
modified: README.md
modified: config.toml
modified: content/about.md
new file: content/posts/How I made this Blog with Zola.md
modified: content/posts/_index.md
modified: content/posts/code_test.md
deleted: content/posts/good_first_post.md
deleted: content/posts/later_posts.md
modified: content/posts/typography.md
modified: rsync_to_testing
new file: static/diffusion.pdf
new file: static/nst.pdf
modified: templates/index.html
modified: templates/page.html
Diffstat (limited to 'content/posts/code_test.md')
-rw-r--r-- | content/posts/code_test.md | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/content/posts/code_test.md b/content/posts/code_test.md index be9b5cd..761c536 100644 --- a/content/posts/code_test.md +++ b/content/posts/code_test.md @@ -1,13 +1,14 @@ +++ -title="Test code syntax highlight" -date=2020-10-13 -draft=false +title = "Test code syntax highlight" +date = 2020-10-13 +draft = false [taxonomies] -tags=["test", "code"] +tags = ["test", "code"] [extra] disable_comments = true +toc = false +++ ```rust @@ -22,3 +23,14 @@ fn factorial(n: u64) -> u64 { ```typescript const sum = (n: number) => n * (n + 1) / 2 ``` + +```python +### multi-threading + +import os ; n_cores = os.cpu_count() // 2 ; + +from concurrent.futures import ThreadPoolExecutor + +with ThreadPoolExecutor(max_workers=n_cores) as executor: + executor.map(render, range(0, len(image_array))) +``` |