Commit Graph

309 Commits

Author SHA1 Message Date
Freezed 1ab191438c 🔀 Merge branch 'stable' into 'tuto-pysdur'
# Conflicts:
#   README.md
2021-04-21 23:46:36 +00:00
free_zed e72d834bab 🥅 Catch shell error when input are ascending
relate to forga/process/fr/embarquement#6
2021-04-22 01:17:07 +02:00
freezed 473b21b430 🔊 Add a `--logfile` option
Log to a file, not console.
--verbose & --debug behavior is kept

relate to forga/process/fr/embarquement#6
2021-04-22 01:01:31 +02:00
freezed 3d254ada50 🎨 Export `argparse` setup in a function
relate to forga/process/fr/embarquement#6
2021-04-22 00:19:45 +02:00
freezed 30b92195bd 🔊 Add a `--debug` option
relate to forga/process/fr/embarquement#6
2021-04-22 00:10:14 +02:00
freezed bd949c2075 🔊 Add variable messages in logs
relate to forga/process/fr/embarquement#6
2021-04-18 23:30:17 +02:00
freezed f00187f4ea 🔊 Add logging events Info & Debug
relate to forga/process/fr/embarquement#6
2021-04-18 22:55:31 +02:00
freezed 1159d4b189 🔊 Log when input are ascending
relate to forga/process/fr/embarquement#6
2021-04-18 00:16:35 +02:00
freezed e959fa780e 📝 Edit docstrings & reuse it for help option
relate to forga/process/fr/embarquement#6
2021-04-16 01:51:50 +02:00
freezed 1cbe6e6710 💡 Comment each steps of main execution
relate to forga/process/fr/embarquement#6
2021-04-16 01:25:59 +02:00
freezed df08415775 Add `--verbosity` option
relate to forga/process/fr/embarquement#6
2021-04-16 01:25:31 +02:00
freezed 043a86e8e4 Add two positionnal arguments as input
relate to forga/process/fr/embarquement#6
2021-04-16 00:47:18 +02:00
freezed 1dcc88375b 🚚 Add execution right to the file
relate toforga/process/fr/embarquement#6
2021-04-16 00:45:02 +02:00
freezed 53ef01ad09 🚨 Lint the code
Using `black`, `pylint` & `flake8`

relate to forga/process/fr/embarquement#6
2021-04-16 00:10:36 +02:00
freezed a62dc1aaa4 Add first doctests
relate to forga/process/fr/embarquement#6
2021-04-15 00:17:34 +02:00
freezed 4058a733a9 Implement greater common divisor algorithm
relate to forga/process/fr/embarquement#6
2021-04-13 23:53:49 +02:00
freezed 165d391a4a 📝 Explain script purpose in docstings
forga/process/fr/embarquement#6
2021-04-13 00:57:40 +02:00
Freezed 7e64995609 🎉 Starting Python Script Durable
Related to forga/process/fr/embarquement#6
2021-04-13 00:23:49 +02:00
Freezed 043d088405 🔀 Merge branch '2-techtest'
Print the state of a sand `pile` after droping `n` sand grain on top of it.

* Sand pile is a square table of uneven size (viewed from up)
* Sand grain is always dropped on center of pile
*  When a cell had 4 grains inside, these grains moves on the near 4th cells
*  Grains going out the pile are losts
2020-07-16 13:07:58 +02:00
Freezed f4c4f9fcb3 🔀 Merge branch '1-techtest'
Reorganize a `string` by :
*  removing spaces
*  groups it by `n` characters
*  separated by `sep`
2020-07-16 13:06:24 +02:00
Freezed 0bd7ff72b0 Refactor propagation in a function
That's better! I want more test cases to check my algorythm !
2020-07-16 12:37:47 +02:00
Freezed 2119783dad Update neighbors cells
Propation is right for small iteration and/or pile with low grain rate.
For pile with high grain rate, the main while loop is not enough to make propagation
in all cells
2020-07-16 12:11:13 +02:00
Freezed eebd2751fe Update only drop cell
Structure for pile walking to find cells greater than 3 is set

I do not update neighbors cells, then only central value of the pile (where the
sand grain is dropped) is at the right value in the end
2020-07-16 12:11:13 +02:00
Freezed ff479a6fe2 Change approach global instead local
1st idea was to manage propagation cells after cells. But this looks to generate
a chain reaction that I cannot manage in a function.

New idea is to manage the whole pile :
* add a grain
* find cells that reached 4
    * change cell & update neighbors
* find cells that reached 4
    * change cell & update neighbors
2020-07-16 12:11:13 +02:00
Freezed 7a8a0945c6 Drop sand grains without propagation 2020-07-16 12:11:13 +02:00
Freezed 9bf58c7cef Find id for pile center 2020-07-16 12:11:13 +02:00
Freezed cb3c5623ae Add specs for `sand_grain_drop.py` 2020-07-16 12:11:13 +02:00
Freezed 5471f30e97 Update tests : deliverable 2020-07-16 09:26:15 +02:00
Freezed fbdc3815e7 Join strings into one with right separation 2020-07-16 09:20:12 +02:00
Freezed d09dcc6b63 Split strings groups in a list 2020-07-16 09:14:33 +02:00
Freezed c14c31cde6 Remove spaces in string 2020-07-16 09:01:39 +02:00
Freezed 7a7c0b9661 Add specs for `reorganize_string.py` 2020-07-16 08:10:21 +02:00
Freezed 85df8b487f Merge branch 'xkcd-pwd' into 'master'
Xkcd password

A password generator a suggested by : https://xkcd.com/936/

See merge request free_zed/mypsb!1
2020-03-10 20:19:28 +00:00
Freezed dc5e4d720b Add password generator 2020-03-09 23:06:14 +01:00
Freezed c188ae6f33 Update .gitignore 2020-03-09 22:54:05 +01:00
Freezed 490e98c308 Testing __init__ method in a Class 2019-09-22 17:39:48 +02:00
Freezed 794c197ce3 Add script `resize_b64_str.py`
Resize an image provided in  a Base64 string
2019-09-06 15:47:54 +02:00
Freezed 2f9a4b8aaa Reorganise repo 2019-09-06 15:46:11 +02:00
Freezed 2b3b0f93ad Update README 2019-09-06 15:45:43 +02:00
Fred Z dfeff7a50c Replaces doctests test by pytest tests 2018-08-14 23:58:02 +02:00
Fred Z 85eb74ba5f Adds some code to play with pytest 2018-08-14 23:57:34 +02:00
Fred Z 2818543f83 Tests simple implementation of PyMySQLb 2018-08-04 08:16:20 +02:00
Fred Z d7fd69619f Tests kwargs in a function 2018-08-04 08:13:36 +02:00
Fred Z 5db5dcaae4 Update README.md 2018-03-15 10:36:50 +01:00
Fred Z 7c4d429613
Updade roadmap & pause announce 2018-03-14 10:52:56 +01:00
Fred Z 30de5f8096 Starts modif gameplay to multiplayer/network mode
I am pausing the devel here, I have to prioritise another project.
Doctests seems to be obsolete for testing network scripts.
I'll be back with Pytest!
2018-03-14 10:40:44 +01:00
Fred Z 579bf24c17 Updates maps for multiplayer (remove robot letter) 2018-03-14 10:40:44 +01:00
Fred Z 367750b9c4 Adds `data_filter()` to sanitize username 2018-03-14 10:40:19 +01:00
Fred Z 851b618ff7 Pylint check and clean 2018-03-14 10:40:19 +01:00
Fred Z a14ef683cb Export template's message from `server_log()`
In order to use this method in the whole class.
Update `__init__()` & `close()` to use `server_log()`. NO MORE `print()`
in this class ;-)
2018-03-14 10:40:19 +01:00