All the programs below implement these steps:
- Generate a list of 1-8, not including 8: [1, 2, 3, 4, 5, 6, 7]
- Filter that list to even values: [2, 4, 6]
- Return each value N repeated N times: [2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6]
| #!/usr/bin/env -S uv run --script | |
| # /// script | |
| # requires-python = ">=3.11" | |
| # dependencies = [ | |
| # "markdown-it-py", | |
| # "typer>=0.12", | |
| # ] | |
| # /// | |
| """Convert Markdown input into rich-text clipboard content for Teams on macOS. |
All the programs below implement these steps:
Python's equivalents:
Several notes:
Python uses the reverse order for the arguments for the map()/filter() defined in the book: in Python, the function comes first, then the collection.
This setup adheres to JavaScript Standard Style; unfortunately due to conflict between standard's ruleset and Chai assertions, we have to acheive this by using eslint directly + the Standard rules. Since we can't use standard directly, we also throw in Prettier for code formatting. Specifically, we use prettier-standard to keep all of the pieces working together nicely. What's that mean for you? Well, here's the scoop on setting up a few editors for linting/formatting fun.
| # Font Squirrel Font-face Generator Configuration File | |
| # Upload this file to the generator to recreate the settings | |
| # you used to create these fonts. | |
| {"mode":"expert","formats":["woff2"],"tt_instructor":"default","fix_gasp":"xy","fix_vertical_metrics":"Y","metrics_ascent":"","metrics_descent":"","metrics_linegap":"","add_spaces":"Y","add_hyphens":"Y","fallback":"none","fallback_custom":"100","options_subset":"basic","subset_custom":"","subset_custom_range":"","subset_ot_features_list":"","ot_features":["lnum","tnum"],"css_stylesheet":"stylesheet.css","filename_suffix":"-webfont","emsquare":"2048","spacing_adjustment":"0"} |
| tunnels: | |
| rails: | |
| proto: http | |
| addr: 3000 | |
| webpack: | |
| proto: http | |
| addr: 8080 | |
| host_header: localhost:8080 |
I hereby claim:
To claim this, I am signing this object: