Skip to main content

A toolkit for selecting random seed with luck

Project description

🤞 Random Luck

Build codecov

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

randluck-0.0.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

randluck-0.0.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file randluck-0.0.1.tar.gz.

File metadata

  • Download URL: randluck-0.0.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for randluck-0.0.1.tar.gz
Algorithm Hash digest
SHA256 648a97272bd9021f481bf6e847de58bcc4dfcc42f0760c4a2b937715f51407b0
MD5 32fd9249ae3e327a82c8545ed487cb1d
BLAKE2b-256 8b503a114f7be3fce304d5ca08e31892dc2863b39d27d2a1bfe69c96cdff5deb

See more details on using hashes here.

File details

Details for the file randluck-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: randluck-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for randluck-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 963eaeda69a2a441ffce81efce6647bb61aec738142227aa9de17be20f4e9526
MD5 31dc22190d6706712c243ff98c0db152
BLAKE2b-256 a696894f90ebee6658f795cf2cc434dca43ef78b8c8da7253cdd9f91aaa02d12

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page