This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Automatically add project members as followers of all tasks in the project""" | |
| from types import SimpleNamespace | |
| import asana | |
| def access_workspace(w_name:str) -> SimpleNamespace: | |
| workspaces = client.workspaces.find_all() | |
| for workspace in workspaces: | |
| # print(dir(workspace)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| usage: <text> <file containing one link per line> | |
| """ | |
| import sys | |
| def produce(text:str, links:iter) -> str: | |
| links = iter(links) | |
| for char in text: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Extract all Tengger Cavalry music in their subdirs, well formatted | |
| This assume that you have Tengger Cavalry's zipped album (whatever the format of the songs is) | |
| in your working directory, along this script. | |
| Works with albums downloaded from their website: | |
| https://tenggercavalry.bandcamp.com/music | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Proof of concept for Nedgang's clitogui project. | |
| This code show how to extract very basic informations from | |
| a argparse parser, with an example on the parser of another project. | |
| At least the following features are not handled: | |
| - nargs flag (default value is provided as is to argparse. See option --columns) | |
| - action | |
| - subparsers | |
| - flags (see action_store in argparse doc) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| all: | |
| python3 words.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from timeit import timeit | |
| print('First case: with complex set building notation') | |
| def integrated_complex(): | |
| N = 1000 | |
| return [e for e in range(N) if e in {i for i in range(N) if i%2}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Script generating edge/2 ASP atoms. | |
| The rendered graph follows the rule given in Bollobas et al.: | |
| density roughly equals (3/2) * |V| ^ (3/2) | |
| """ | |
| import random | |
| import itertools |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| This is a benchmark for a common operation on data : divide a stream | |
| in two distinct parts. | |
| Benchmarks use three techniques, leading for the following results: | |
| 10^3 10^5 10^7 (data size) | |
| one 0.01 2.58 286 | |
| two 0.03 3.4 339 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Demonstration of the absence of optimisation on following intension syntax: | |
| n for n in data if no not in set(toignore) | |
| Here, `set(toignore)` is built at each loop, | |
| leading to the following output of this code: | |
| one: 3.593955495998671 | |
| two: 3.5888819139945554 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Little password generator, with very small amount of features, but funny ones: | |
| usage: | |
| genpass.py # yield four lines | |
| genpass.py <alphabet> [+<char to add>] [-<char to remove>] | |
| exemple: | |
| genpass.py | |
| genpass.py numeric +@ | |
| genpass.py numeric -0 +0 # 0 included ; last is right |