Coder Social home page Coder Social logo

kentang2017 / kinliuren Goto Github PK

View Code? Open in Web Editor NEW
36.0 4.0 16.0 634 KB

A Python package of Dailiuren, one of the three greatest Ancient Chinese Divination Tools ever. Python 大六壬,占卜用,簡單,但不包含年月日時干支演化。

Home Page: https://pypi.org/project/kinliuren

License: MIT License

Python 100.00%
python liuren divination dailiuren prediction chinese tool qimen astrology

kinliuren's Introduction

Python 大六壬 Kinliuren 堅大六壬 堅六壬

Python PIP Downloads TG TG Channel Donate 

alt text

1. 導讀 Introduction

大六壬,或稱六壬神課,簡稱六壬,是中國古老三大占卜術之一。大六壬與奇門遁甲、太乙神數並稱三式。大六壬盛行於漢朝、三國、魏晉南北朝,文人名士多有以此為休閒,常以懷中藏物互相占卜猜測,名曰「射覆」。唐宋以來,明清相繼,相承至今。然六壬演式繁雜,主要在士大夫之間流傳,在民間社會中漸被文王卦所代替。當今社會,在中國大陸、香港和台灣均有一部分人在研習六壬。六壬術傳至日本後,在平安時代由陰陽師安倍晴明發揚光大。為現代算命相術之一。

堅六壬排盤 https://kinliuren.streamlit.app/

Da Liu Ren is a form of Chinese calendrical astrology dating from the later Warring States period. It is also a member of the Three Styles (三式; sānshì; 'three rites') of divination, along with Qi Men Dun Jia (奇门遁甲) and Taiyi (太乙).

In the words of a contemporary Chinese master of Da Liu Ren, the six rén indicate an entire movement of the sexagenary cycle, during which an something may appear, rise to maturity and then decline and disappear. Thus the six rén indicate the life cycle of phenomena. There is a homonym in the Chinese language which carries the meaning of pregnancy and so the six rén also carry the meaning of the birth of a phenomenon.

2. 安裝套件 Installation

	pip install kinliuren

3. 起課方式 Quickstart

	from kinliuren import kinliuren
	kinliuren.Liuren( 節氣, 農曆月份, 日干支, 時干支).result(0)
	例如 Liuren("驚蟄","二","己未","甲午").result(0)
{'節氣': '驚蟄', '日期': '己未日甲午時', '格局': ['賊尅', '重審'], '日馬': '巳', '三傳': {'初傳': ['巳', '虎', '父', '丁'], '中傳': ['戌', '雀', '兄', '壬'], '末傳': ['卯', '玄', '官', '乙']}, '四課': {'四課': ['巳子', '虎'], '三課': ['子未', '貴'], '二課': ['巳子', '虎'], '一課': ['子己', '貴']}, '天地盤': {'天盤': ['亥', '子', '丑', '寅', '卯', '辰', '巳', '午', '未', '申', '酉', '戌'], '地盤': ['午', '未', '申', '酉', '戌', '亥', '子', '丑', '寅', '卯', '辰', '巳'], '天將': ['蛇', '貴', '后', '陰', '玄', '常', '虎', '空', '龍', '勾', '合', '雀']}, '地轉天盤': {'午': '亥', '未': '子', '申': '丑', '酉': '寅', '戌': '卯', '亥': '辰', '子': '巳', '丑': '午', '寅': '未', '卯': '申', '辰': '酉', '巳': '戌'}, '地轉天將': {'午': '蛇', '未': '貴', '申': '后', '酉': '陰', '戌': '玄', '亥': '常', '子': '虎', '丑': '空', '寅': '龍', '卯': '勾', '辰': '合', '巳': '雀'}, '神煞': {'天城': '申', '天吏': '寅', '皇書': '寅', '天喜': '戌', '天耳': '申', '戲神': '巳', '遊神': '丑', '天車': '巳', '月馬': '辰', '日馬': '巳', '丁馬': '巳', '日德': '寅', '日祿': '午', '賢貴': '丑', '進神': '卯', '進神二': '酉', '五合': '寅', '支德': '午', '將星': '卯', '六合': '午', '天馬': '申', '聖心': '巳', '天恩': '酉', '天財': '午', '飛廉': '巳', '會神': '戌', '成神': '申', '生氣': '丑', '月合': '戌', '閃電': '丑'}}

kinliuren's People

Contributors

d1210182010 avatar kentang2017 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kinliuren's Issues

只是表达一下敬畏之情

两位不管是源码水平,还是这份耐心,实非我等所能企及,作为一个程序员以及六壬术者,在这磕一个了,太np了,我也在编写自己的六壬程序,看到两位就是我前进路上的曙光了

伏吟自刑

8905bb8b1957c0e71116c821a8af304
您好,这个局不知道是不是有问题的,

'立夏', '乙巳', '庚申', '戊寅'

Traceback (most recent call last):
File "c:\Users\26856\cp\liuren.py", line 20, in
t = kinliuren.Liuren('立夏', '乙巳', '庚申', '戊寅').result(0)
File "E:\Python\Python39\lib\site-packages\kinliuren\kinliuren.py", line 1251, in result
guiren_order_list_2 = self.guiren_order_list(num)
File "E:\Python\Python39\lib\site-packages\kinliuren\kinliuren.py", line 1233, in guiren_order_list
ju = ju_three_pass[0][0]
TypeError: 'NoneType' object is not subscriptable

其他都没问题,就这一组有问题

def unique(list1)

Hi,

What is the purpose of this function :

def unique(list1):
unique_list = []
for x in list1:
if x not in unique_list:
unique_list.append(x)
return x

since unique_list is empty when called it return the first value of list1
is this case unique(list1) is equal to list1[0]

Thank you for explaining this.

Regards

请问:涉害的方式是哪种?

我使用大六壬手机版,大部分的课式都对的上,但是发现涉害课 有的就对不上了,请教一下这个的计算方法

Issues with some dates

Hi,

Can you have a look with
jieqi 雨水
daygangzhi 癸卯
hourgangzhi 己未

jieqi 雨水
daygangzhi 癸卯
hourgangzhi 庚申

jieqi 處暑
daygangzhi 癸卯
hourgangzhi 癸丑

jieqi 冬至
daygangzhi 癸卯
hourgangzhi 辛酉

jieqi 芒種
daygangzhi 癸卯
hourgangzhi 丙辰

for me it returns ['不適用,或試他法', '不適用,或試他法', '不適用,或試他法', '不適用,或試他法', '不適用,或試他法', '不適用,或試他法', '不適用,或試他法', '不適用,或試他法']

Thank you !

TypeError: 'NoneType' object is not subscriptable

您好,我在嘗試以下參數起課時

kinliuren.Liuren('冬至', '十二', '己未', '壬申').result(0)

出現以下錯誤:

   1244         earth_to_general = dict(zip(earth, guiren_order_list_3))
   1245         sky_earth_guiren_dict = {"天盤":sky, "地盤":earth, "天將":guiren_order_list_3}
-> 1246         ju = [ju_three_pass[0][0], ju_three_pass[0][1]]
   1247         three_pass_zhi = ju_three_pass[0][2]
   1248         three_pass_generals = [guiren_order_list_2.get(i) for i in three_pass_zhi]

TypeError: 'NoneType' object is not subscriptable

另舉幾個同樣會引起這個錯誤的組合

  • 芒種 五 丙申 戊子
  • 芒種 五 戊戌 壬子
  • 夏至 六 癸亥 己未
  • 夏至 六 甲子 乙丑
  • 大暑 六 己丑 戊辰
  • 大暑 七 辛卯 丙申
  • 霜降 十 丙寅 癸巳
  • 霜降 十 丁卯 庚戌
  • 立冬 十 己巳 戊辰
  • 立冬 十 庚午 甲申

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.