🤞 Random Luck
Deep learning is acturally the alchemy.
This repo provides a package to automatically select a random seed based on ancient Chinese Xuanxue.
Good luck and best wishes!
🚀QuickStart
# installation
$ pip install git+https://github.com/Spico197/random-luck.git
# usage
$ python
>>> import randluck
>>> random_seed = randluck.get_random_seed(strategy="bazi")
>>> print(random_seed)
1234
>>> from datetime import datetime
# be sure to use the UTC time, and the offset is calculated automatically in the background
>>> random_seed = randuck.get_random_seed(utc_datetime=datetime.utcnow(), strategy="bazi")
>>> print(random_seed)
1234
>>> random_seed = randuck.get_random_seed(utc_datetime=datetime.date(year=1997, month=1, day=1), strategy="lucky_num_by_year")
>>> print(random_seed)
5430
📐Strategies & Principles
Random seed is selected by the time that experiments starts.
UTC datetime is first converted to Chinese time (UTC+8), and then the datetime is converted to Chinese Lunar calendar to calculate the suitable random seed.
Here are different strategies this repo contains. New strategies may be updated in the future.
- bazi
- Ganzhi number converted from Lunar datetime
- lucky_num_by_year
- Calculate your lucky number by your birth date
🤝Contributions
- Bug reports and patch PRs are welcome, please open an issue directly.
- New strategies are welcome, please open an issue first providing the strategy details and new ideas, then make a PR.
- Tarot cards and constellation strategies are welcome, but I'm not familiar with them, please open new issues to discuss if it is OK to make a PR.
🔑License
This repo is under the MIT license.
Release files for randluck 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| randluck-0.0.1.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| randluck-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.0 kB
Release files / randluck-0.0.1.tar.gz
| Download URL | randluck-0.0.1.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
648a97272bd9021f481bf6e847de58bcc4dfcc42f0760c4a2b937715f51407b0
|
|
BLAKE2b-256 checksum How to use checksums |
8b503a114f7be3fce304d5ca08e31892dc2863b39d27d2a1bfe69c96cdff5deb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.11
|
Release files / randluck-0.0.1-py3-none-any.whl
| Download URL | randluck-0.0.1-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
963eaeda69a2a441ffce81efce6647bb61aec738142227aa9de17be20f4e9526
|
|
BLAKE2b-256 checksum How to use checksums |
a696894f90ebee6658f795cf2cc434dca43ef78b8c8da7253cdd9f91aaa02d12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.11
|