This repo provides a package to automatically select a random seed based on ancient Chinese Xuanxue

Overview

🤞 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

>> 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">
# installation from github (latest) or PyPI
$ pip install git+https://github.com/Spico197/random-luck.git
$ pip install randluck -i https://pypi.org/simple

# 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.

You might also like...
Layout Parser is a deep learning based tool for document image layout analysis tasks.
Documentation generator for C++ based on Doxygen and mosra/m.css.

mosra/m.css is a Doxygen-based documentation generator that significantly improves on Doxygen's default output by controlling some of Doxygen's more unruly options, supplying it's own slick HTML+CSS generation and adding a fantastic live search feature.

Dev Centric Tools for Mkdocs Based Documentation
Dev Centric Tools for Mkdocs Based Documentation

docutools MkDocs Documentation Tools For Developers This repo is providing a set of plugins for mkdocs material compatible documentation. It is meant

Fast syllable estimation library based on pattern matching.

Syllables: A fast syllable estimator for Python Syllables is a fast, simple syllable estimator for Python. It's intended for use in places where speed

A document format conversion service based on Pandoc.

reformed Document format conversion service based on Pandoc. Usage The API specification for the Reformed server is as follows: GET /api/v1/formats: L

Explicit, strict and automatic project version management based on semantic versioning.
Explicit, strict and automatic project version management based on semantic versioning.

Explicit, strict and automatic project version management based on semantic versioning. Getting started End users Semantic versioning Project version

A simple document management REST based API for collaboratively interacting with documents

documan_api A simple document management REST based API for collaboratively interacting with documents.

script to calculate total GPA out of 4, based on input gpa.csv

gpa_calculator script to calculate total GPA out of 4 based on input gpa.csv to use, create a total.csv file containing only one integer showing the t

Code for our SIGIR 2022 accepted paper : P3 Ranker: Mitigating the Gaps between Pre-training and Ranking Fine-tuning with Prompt-based Learning and Pre-finetuning

P3 Ranker Implementation for our SIGIR2022 accepted paper: P3 Ranker: Mitigating the Gaps between Pre-training and Ranking Fine-tuning with Prompt-bas

Comments
Releases(v0.0.1)
Owner
Tong Zhu(朱桐)
Tong Zhu(朱桐)
A Sublime Text plugin to select a default syntax dialect

Default Syntax Chooser This Sublime Text 4 plugin provides the set_default_syntax_dialect command. This command manipulates a syntax file (e.g.: SQL.s

null 3 Jan 14, 2022
Automatically open a pull request for repositories that have no CONTRIBUTING.md file

automatic-contrib-prs Automatically open a pull request for repositories that have no CONTRIBUTING.md file for a targeted set of repositories. What th

GitHub 8 Oct 20, 2022
Pydocstringformatter - A tool to automatically format Python docstrings that tries to follow recommendations from PEP 8 and PEP 257.

Pydocstringformatter A tool to automatically format Python docstrings that tries to follow recommendations from PEP 8 and PEP 257. See What it does fo

Daniël van Noord 31 Dec 29, 2022
Template repo to quickly make a tested and documented GitHub action in Python with Poetry

Python + Poetry GitHub Action Template Getting started from the template Rename the src/action_python_poetry package. Globally replace instances of ac

Kevin Duff 89 Dec 25, 2022
This repo contains everything you'll ever need to learn/revise python basics

Python Notes/cheat sheet Simplified notes to get your Python basics right Just compare code and output side by side and feel the rush of enlightenment

Hem 5 Oct 6, 2022
python package sphinx template

python-package-sphinx-template python-package-sphinx-template

Soumil Nitin Shah 2 Dec 26, 2022
A python package to avoid writing and maintaining duplicated python docstrings.

docstring-inheritance is a python package to avoid writing and maintaining duplicated python docstrings.

Antoine Dechaume 15 Dec 7, 2022
A python package to import files from an adjacent folder

EasyImports About EasyImports is a python package that allows users to easily access and import files from sister folders: f.ex: - Project - Folde

null 1 Jun 22, 2022
Pyoccur - Python package to operate on occurrences (duplicates) of elements in lists

pyoccur Python Occurrence Operations on Lists About Package A simple python package with 3 functions has_dup() get_dup() remove_dup() Currently the du

Ahamed Musthafa 6 Jan 7, 2023
A Python Package To Generate Strong Passwords For You in Your Projects.

shPassGenerator Version 1.0.6 Ready To Use Developed by Shervin Badanara (shervinbdndev) on Github Language and technologies used in This Project Work

Shervin 11 Dec 19, 2022