Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created Chaldean number system and compound number #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from numerology import Pythagorean

from numerology import Chaldean
from numerology import Vedic

def start_app():
"""Interactive version of the package."""
Expand All @@ -10,7 +11,8 @@ def start_app():
birthdate = input("Enter your birthdate (yyyy-MM-dd, example 1994-11-30): ")

Pythagorean(first_name, last_name, birthdate)

Chaldean(first_name, last_name, birthdate)
Vedic(first_name, last_name, birthdate)

if __name__ == "__main__":
start_app()
3 changes: 2 additions & 1 deletion numerology/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

from pythagorean.common import Functions as fct
from pythagorean.numerology import Numerology as Pythagorean

from chaldean.numerology import CNumerology as Chaldean
from vedic.numerology import VNumerology as Vedic

assert sys.version_info[0] == 3, "Numerology requires Python 3."

Expand Down
85 changes: 85 additions & 0 deletions numerology/chaldean/numerology.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
from numerology.pythagorean import *
import pythagorean.numerology as pnumerology

class CNumerology(pnumerology.Numerology):
"""Numerology is the science of numbers. It is the study of the numerical value of the letters in words, names, dates, and ideas.

The Chaldean numerology system is perhaps the oldest form of numerology known, with its origin in ancient Babylon.
Chaldean system used sounds and tones to correspond letters and numbers. The Chaldean style matches the vibrations between the two.

This class is mainly based on the calculation methods from the book "Palmistry Numerology and Astrology" of Cheiro.
"""

alphabet = {
'a': 1,
'b': 2,
'c': 3,
'd': 4,
'e': 5,
'f': 8,
'g': 3,
'h': 5,
'i': 1,
'j': 1,
'k': 2,
'l': 3,
'm': 4,
'n': 5,
'o': 7,
'p': 9,
'q': 1,
'r': 2,
's': 3,
't': 4,
'u': 6,
'v': 6,
'w': 6,
'x': 5,
'y': 1,
'z': 7
}

vowels = ("a", "e", "i", "o", "u")

consonants = (
"b",
"c",
"d",
"f",
"g",
"h",
"j",
"k",
"l",
"m",
"n",
"p",
"q",
"r",
"s",
"t",
"v",
"w",
"x",
"y",
"z",
)

def set_key_figures(self):
"""Initializes the key figures dictionnary."""
super(CNumerology, self).set_key_figures()
self._key_figures["compound_number"] = self.compound_number

@property
def compound_number(self) -> int:
"""Returns the Compund Number.

Compound numbers denote the inner you, as well as any hidden influences that play a role in your life (present and future).
It is calculated from adding the numbers assigned to the letters of your name full name. Then reduce till double digits.

Returns:
int: Compund Number.
"""
active_number = self.get_numerology_sum(self.first_name_num, master_number=False)
legacy_number = self.get_numerology_sum(self.last_name_num, master_number=False)
return int(str(active_number)+str(legacy_number))
1 change: 1 addition & 0 deletions numerology/pythagorean/numerology.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging
import math
import os
import locale
import sys
from collections import Counter
from typing import Dict, Optional, Tuple
Expand Down
118 changes: 118 additions & 0 deletions numerology/vedic/numerology.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
from numerology.pythagorean import *
import pythagorean.numerology as vnumerology

class VNumerology(vnumerology.Numerology):
"""Numerology is the science of numbers. It is the study of the numerical value of the letters in words, names, dates, and ideas.

Vedic Numerology is an ancient Indian system that assigns special meanings and planetary rulership to numbers from 1 to 9,
and sometimes zero. It is based on the Hindu religion and the Vedas, which are sacred texts that contain the sound of creation.
It studies how the movement and influence of these planets affect a person's destiny, personality, and harmony with the universe.

This class is mainly based on the calculation methods from the book "Vedic Astro Numerology Paperback" by Ashok Bhatia.
"""

alphabet = {
"a": 1,
"i": 1,
"j": 1,
"q": 1,
"y": 1,
"b": 2,
"c": 2,
"k": 2,
"r": 2,
"g": 3,
"l": 3,
"s": 3,
"d": 4,
"m": 4,
"t": 4,
"n": 5,
"e": 5,
"u": 6,
"v": 6,
"w": 6,
"x": 6,
"o": 7,
"z": 7,
"f": 8,
"h": 8,
"p": 8,
}

vowels = ("a", "e", "i", "o", "u")

consonants = (
"b",
"c",
"d",
"f",
"g",
"h",
"j",
"k",
"l",
"m",
"n",
"p",
"q",
"r",
"s",
"t",
"v",
"w",
"x",
"y",
"z",
)

def set_key_figures(self):
"""Initializes the key figures dictionnary."""
super(VNumerology, self).set_key_figures()
self._key_figures["name_number"] = self.name_number
self._key_figures["destiny_number"] = self.destiny_number
self._key_figures["psychic_number"] = self.psychic_number

@property
def name_number(self) -> int:
"""Returns the Name Number.

This number is arrived at by adding the numerological value of each letter in a name and reducing the total
into a single compound number. As you can see below, each letter in the alphabet has been assigned a value
between 1 and 8 based upon Vedic mathematics and the pattern of numbers present in the Vedic Square.
Number 9 is not considered in such calculations because adding 9 to any other number does not alter its value
(for example, 9 + 1 = 10 = 1, 9 + 2 = 11 = 2).

Returns:
int: Name Number.
"""
return super(VNumerology, self).destiny_number

@property
def destiny_number(self) -> int:
"""Returns the Destiny Number.

This number in Vedic Numerology will reveal what the world think of you. It is the characteristics that other
people find within you. The destiny number is obtained by adding the date, month and year of your birth
and then converting that into a single digit whole number.

Returns:
int: Destiny Number.
"""
return super(VNumerology, self).life_path_number_alternative

@property
def psychic_number(self) -> int:
"""Returns the Psychic Number.

The psychic number in Vedic Numerology tells the way you look at yourself. It defines your basic characteristics.
It reveals what you want to be or about the talents with which you have come to this earth.

To obtain your psychic number you will have to find the single whole number of the date of your birth.
Only the date is considered and you have to make it in a single one if it is two digit number.
If your date of birth is 15th of any month your psychic number is 1+5=6

Returns:
int: Psychic Number.
"""
return super(VNumerology, self).birthdate_day_num