def forecast( natal_latitude: float, natal_longitude: float, natal_date: datetime, transit_latitude: float, transit_longitude: float, transit_date: datetime, threshold: float, ): transit_position = GeoPos(transit_latitude, transit_longitude) natal_position = GeoPos(natal_latitude, natal_longitude) natal_chart = get_chart(natal_position, natal_date) transit_chart = get_chart(transit_position, transit_date) offset = 0 previous_aspects = set( show_aspect(a) for a in get_aspects(natal_chart, transit_chart, threshold=threshold)) while True: then = transit_date + timedelta(minutes=offset) current_chart = get_chart(transit_position, then) current_aspects = set( show_aspect(a) for a in get_aspects( natal_chart, current_chart, threshold=threshold)) entered = current_aspects - previous_aspects exited = previous_aspects - current_aspects if entered or exited: print( then.strftime("%Y-%m-%d %H:%M"), "".join([" | +" + a for a in entered] + [" | -" + a for a in exited]), sep="", ) previous_aspects = current_aspects offset += 1
def calculate_chart(date, time='17:00', utcoffset='+00:00', lat='55n45', lon='37e36'): """Calculates astrological chart based on a person's birth date, time and location. Using flatlib library. Args: bdate (str): with format `2015/03/13` time (str): with format `17:00` utcoffset (str): UTC Offset with format `+00:00` lat (str): latitude of birth location lon (str): longtitude of birth location Returns: chart (flatlib.chart.Chart): chart object with astrological information such as plantes positions and so on. """ # create flatlib.datetime object date = Datetime(date, time, utcoffset) # create flatlib.geopos object location = GeoPos('55n45', '37e36') # calculate chart chart = Chart(date, location, IDs=flatlib.const.LIST_OBJECTS) return chart
def get_chart(self, birthdayString, birthTimeString, offsetString, geo_coordinates): # date = Datetime('1989/07/30', '00:05', '-05:00') # pos = GeoPos(30.2643, -97.7139) date = Datetime(birthdayString, birthTimeString, offsetString) pos = GeoPos(geo_coordinates['lat'], geo_coordinates['lng']) return Chart(date, pos)
def get_angle_on_day(self, o, day): global date, pos, chart, obj date = Datetime(day.strftime("%Y/%m/%d"), '00:00', '+00:00') pos = GeoPos(0, 0) chart = Chart(date, pos) obj = chart.get(o) if obj.sign != self.sign: return None return obj.signlon
def current( natal_latitude: float, natal_longitude: float, natal_date: datetime, transit_latitude: float, transit_longitude: float, transit_date: datetime, threshold: float, ): transit_position = GeoPos(transit_latitude, transit_longitude) natal_position = GeoPos(natal_latitude, natal_longitude) natal_chart = get_chart(natal_position, natal_date) transit_chart = get_chart(transit_position, transit_date) relevant_aspects = list( get_aspects(natal_chart, transit_chart, threshold=threshold)) def aspect_switch_date(aspect, *, direction=1, threshold): offset = 0 while True: then = transit_date + direction * timedelta(days=offset) current_chart = get_chart(transit_position, then) aspects = [ show_aspect(a) for a in get_aspects( natal_chart, current_chart, threshold=threshold) ] if aspect not in aspects: return then.date() offset += 1 for aspect in sorted(relevant_aspects, key=operator.attrgetter("orb")): aspect_string = show_aspect(aspect) print( aspect_switch_date(aspect_string, direction=-1, threshold=threshold).isoformat(), aspect_switch_date(aspect_string, direction=1, threshold=threshold).isoformat(), aspect_string, )
def runAstroScript(dateString, timeString, location1String, location2String): # Here you call the functions you need to and parse the data into whatever format you need it in (maybe a dict) """Running flatlib script""" date = Datetime(dateString, timeString, '+00:00') pos = GeoPos(location1String, location2String) chart = Chart(date, pos, IDs=const.LIST_OBJECTS) # chart = Chart(date, pos, hsys=const.HOUSES_PLACIDUS) asc = chart.get(const.ASC) chart_dict = {} for obj in chart.objects: chart_dict.update({obj.id: obj.sign}) chart_dict.update({asc.id: asc.sign}) return ('{0}'.format(chart_dict))
def test_may_27_1991_in_cincinatti_at_07_15(self): date = Datetime('1991/05/27', '07:15', '-4:00') pos = GeoPos(39.1031, -84.5120) chart = Chart(date, pos) expected = { const.SUN: const.GEMINI, const.MOON: const.SCORPIO, const.MERCURY: const.TAURUS, const.VENUS: const.CANCER, const.MARS: const.LEO, const.ASC: const.GEMINI, } self._check_chart(chart, expected)
def test_july_30_1989_in_dallas_at_00_05(self): date = Datetime('1989/07/30', '00:05', '-05:00') pos = GeoPos(30.2643, -97.7139) chart = Chart(date, pos) expected = { const.SUN: const.LEO, const.MOON: const.CANCER, const.MERCURY: const.LEO, const.VENUS: const.VIRGO, const.MARS: const.LEO, const.ASC: const.ARIES, } self._check_chart(chart, expected)
def advancedview(): if flask.request.method == "POST": num = flask.request.form.get('choiceit') town = flask.request.form.get('town') country = flask.request.form.get('country') # print('num is:', num) if len(num) > 6: yy, mm, dd = num[:4], num[5:7], num[8:10] tiden = yy + '/' + mm + '/' + dd date = Datetime(tiden, '17:00', '+00:00') geo_coordinates = get_geo_cords(town, country) if not geo_coordinates: return flask.render_template("advanced.html", countries=countries, error="Could not find the city") g0, g1 = float(geo_coordinates[0]), float( geo_coordinates[1].replace('</span>', '')) pos = GeoPos(g0, g1) chart = Chart(date, pos, IDs=const.LIST_OBJECTS) sun = chart.getObject(const.SUN) # print("Your sun sign is: ",sun.sign) #zodiac sign # print("Your zodiac is explained as: ", explain_zodiac(sun.sign)) # print("Your sun movement is: ",sun.movement()) # print("Your sun element is: ",sun.element()) # print("Explained element:", explain_element(sun.element())) # print("Your sun faction is: ",sun.faction()) #print(chart.__dict__) #house is different depending on chart # for merp in const.LIST_HOUSES: # print(merp, 'sign is',chart.getHouse(merp).sign,'The condition is:',chart.getHouse(merp).condition()) # print("This is the",explain_house(merp).get("translated"), " the lating motto for it is '",explain_house(merp).get("Latin motto"),"' It's basicly means: ",explain_house(merp).get('explain')) ##print("Your sun element is: ",chart.getObject(const.SUN).figures()) moon = chart.get(const.MOON) # print("Your moon is in:", moon.sign) # print("Your moon movement is: ",moon.movement()) # print("Your moon element is: ",moon.element()) # print("Explained element:", explain_element(moon.element())) # print("Your moon faction is: ",moon.faction()) # print("Your moon phase:", chart.getMoonPhase()) return flask.render_template("advanced.html", moon=moon, sun=sun, const=const, explain_house=explain_house, chart=chart, explain_zodiac=explain_zodiac, explain_element=explain_element) return flask.render_template("advanced.html", countries=countries)
def main(latitude: float, longitude: float, date: datetime): flatlib_datetime = convert_into_stupid_flatlib_format(date) position = GeoPos(latitude, longitude) chart = Chart(flatlib_datetime, position) for planet in planet_symbols.keys(): planet_position = chart.getObject(planet) print( planet_symbols[planet], sign_symbols[planet_position.sign], "℞" if planet_position.movement() == flatlib.const.RETROGRADE else "", end="", ) print()
async def cmd_sun(message): l = message.content.split(' ') try: date = parse(l[1]) datetime = Datetime(date.strftime('%Y/%m/%d')) pos = GeoPos('00n00', '0w00') chart = Chart(datetime, pos) sun = str(chart.getObject(SUN)).split(' ')[1] await send_text( client, message.channel, "If you were born on %s, then you're a %s!" % (date.strftime('%B %d, %Y'), sun)) except Exception as e: logger.info(e) await send_text(client, message.channel, "Invalid date string")
def hgaresult(): if request.method == 'POST': result = request.form print(result) datelong = result['year']+"/"+result['month']+"/"+result['day'] hour = result['hour'] if result['ampm']=="PM": hour+=12 time = hour+":"+result['minute'] lat = result['latdegree']+result['lataxis']+result['latminute'] lon = result['londegree']+result['lonaxis']+result['lonminute'] DATE = Datetime(datelong, time, '+00:00') POS = GeoPos(lat, lon) aspects = Aspects(DATE,POS) zodiac = makeZodiac() signs = [[aspects.syzygy['sign'],str(aspects.syzygy['degree'])],[aspects.moon['sign'],str(aspects.moon['degree'])],[aspects.sun['sign'],str(aspects.sun['degree'])]] hebrew = makeName(zodiac, signs, 'hebrew') hebrewreverse = makeName(zodiac, signs, 'hebrewreverse') return render_template("hga.html",output=[hebrew,hebrewreverse])
def __init__(self, person): self.planets = {} self.houses = {} self.person = person self.date = Datetime(person.birth_date_str(), person.birth_time_str(), person.birth_utc_offset) self.pos = GeoPos(person.birth_lat, person.birth_lon) self.chart = Chart(self.date, self.pos, IDs=const.LIST_OBJECTS, hsys=const.HOUSES_PLACIDUS) for body in LIST_PLANETS: self.planets[body] = NatalPlanet(self.chart, body) for house in const.LIST_HOUSES: self.houses[house] = NatalHouse(self.chart, house)
def set_astrology_info(self): d = Datetime( f'{self.moon.datetime.year}/{self.moon.datetime.month}/{self.moon.datetime.day}', f'{self.moon.datetime.hour}:00', '+00:00') pos = GeoPos( '38n32', '8w54') #todo use a different location? this was in the docs self.chart = Chart(d, pos) self.moon_astrology_info = self.chart.get(const.MOON) self.moon_sign = self.moon_astrology_info.sign self.astrology_ascii_dict = astrology_dict["signs"][self.moon_sign] self.astrology_sign_random_emoji = choice( astrology_dict["signs"][self.moon_sign]["related"]) self.astrology_element_random_emoji = choice( astrology_dict["elements"][self.astrology_ascii_dict["element"]]) # get aspects of chart dyn = ChartDynamics(self.chart) self.aspects = dyn.validAspects(const.MOON, const.MAJOR_ASPECTS)
def in_day(year, month, day, hour, minute): """ Função retorna data thelemica de um dia e horário especifico :param year: Ano :param month: Mês :param day: Dia :param hour: Hora :param minute: Minuto :return: a data thelemica dos dados passados """ ev_in_day_weekday = date(year, month, day).weekday() ev_in_day_date = str(date(year, month, day).strftime('%Y/%m/%d')) ev_in_day_time = f'{hour}:{minute}' ev_in_day_na_year = int(year) - 1904 # New Aeon "generation" of 22 years ciclo_i = ev_in_day_na_year // 22 # // Years in the current cycle ciclo_ii = int(year) - 1904 - (ciclo_i * 22) # New Aeon year na_year = numerals[ciclo_ii].upper() + ':' + numerals[ciclo_i] na_date = Datetime(ev_in_day_date, ev_in_day_time, '-03:00') pos = GeoPos('23s39', '46w32') chart = Chart(na_date, pos) sun = chart.getObject(const.SUN) solis = str(sun).split(' ') solis_sign = solis[1] solis_arc = solis[2].split(':')[0].replace('+', '') moon = chart.get(const.MOON) luna = str(moon).split(' ') luna_sign = luna[1] luna_arc = luna[2].split(':')[0].replace('+', '') return (f'☉ in {solis_arc}º {signs[solis_sign]} ' f'☽ in {luna_arc}º {signs[luna_sign]} ' f'Dies {dies[ev_in_day_weekday]} ' f'Anno {na_year} æræ novæ')
def now(): """ Função não recebe parametros :return: a data thelemica atual """ # Era Vulgar Year ev_year = int(date.today().strftime('%Y')) # Whole Years since March Equinox 1904 ev_years_total = ev_year - 1904 # New Aeon "generation" of 22 years ciclo_i = ev_years_total // 22 # // Years in the current cycle ciclo_ii = ev_year - 1904 - (ciclo_i * 22) # New Aeon year na_year = numerals[ciclo_ii].upper() + ':' + numerals[ciclo_i] ev_weekday = date.today().weekday() ev_today = str(date.today().strftime('%Y/%m/%d')) ev_time = str(time.strftime('%H:%M')) na_date = Datetime(ev_today, ev_time, '-03:00') pos = GeoPos('23s39', '46w32') chart = Chart(na_date, pos) sun = chart.getObject(const.SUN) solis = str(sun).split(' ') solis_sign = solis[1] solis_arc = solis[2].split(':')[0].replace('+', '') moon = chart.get(const.MOON) luna = str(moon).split(' ') luna_sign = luna[1] luna_arc = luna[2].split(':')[0].replace('+', '') return (f'☉ in {solis_arc}º {signs[solis_sign]} ' f'☽ in {luna_arc}º {signs[luna_sign]} ' f'Dies {dies[ev_weekday]} ' f'Anno {na_year} æræ novæ')
async def cmd_chart(message): global TZWHERE_INST, GEOLOCATOR l = message.content.split(' ') date = parse(l[1]) time = parse(l[2]) pos = 3 if l[3].lower() == 'am': pos += 1 if l[3].lower() == 'pm': pos += 1 time.replace(hour=time.hour + 12) place = ' '.join(l[pos:]) location = GEOLOCATOR.geocode(place, addressdetails=True) timezone_str = TZWHERE_INST.tzNameAt(location.latitude, location.longitude) timezone = pytz.timezone(timezone_str) offset = str(timezone.utcoffset(date).total_seconds() / 60 / 60).replace( '.', ':') datetime = Datetime(date.strftime('%Y/%m/%d'), time.strftime('%H:%M'), offset) pos = GeoPos(location.latitude, location.longitude) chart = Chart(datetime, pos) response = ["%s, your chart is:" % (message.author.mention)] for const in LIST_OBJECTS: try: response += [ ' %s: %s' % (const, str(chart.getObject(const).sign)) ] except: pass try: url, img = get_chart_image(date, time, location, message) response += [url] response += [img] except Exception as e: logger.critical(e) response += ["Couldn't generate your image :/"] logger.info("Sending message: %s" % '\n'.join(response)) await send_text(client, message.channel, '\n'.join(response))
def get_calendar(start, end): dates = pd.date_range(start=start, end=end) calendar = [] for d in dates: date = Datetime(d.strftime("%Y/%m/%d"), '12:00', '+00:00') pos = GeoPos('51n23', '0w18') chart = Chart(date, pos) moon = chart.getObject(flc.MOON) sun = chart.getObject(flc.SUN) mercury = chart.getObject(flc.MERCURY) venus = chart.getObject(flc.VENUS) mars = chart.getObject(flc.MARS) calendar.append({ 'date': d, 'moon_lon': int(moon.lon), 'sun_lon': int(sun.lon), 'mercury_lon': int(mercury.lon), 'venus_lon': int(venus.lon), 'mars_lon': int(mars.lon) }) calendar = pd.DataFrame(calendar) return calendar
import datetime import time from flatlib.datetime import Datetime from flatlib.geopos import GeoPos from flatlib.chart import Chart from flatlib import const from flatlib import aspects # Build a chart for a date and location data = datetime.datetime.utcnow() d = data.strftime('%Y/%m/%d') h = data.strftime('%H:%M:%S') date = Datetime(d, h) pos = GeoPos('38n43', '9w8') chart = Chart(date, pos) # Retrieve the Sun and Moon sun = chart.get(const.SUN) moon = chart.get(const.MOON) venus = chart.get(const.VENUS) # Get the aspect aspect1 = aspects.getAspect(sun, moon, const.MAJOR_ASPECTS) aspect2 = aspects.getAspect(sun, venus, const.ALL_ASPECTS) print(aspect1) print(aspect2xsc)
from flatlib.geopos import GeoPos from flatlib.chart import Chart from flatlib import const import pandas as pd import numpy as np import matplotlib.pyplot as plt # date = Datetime('1991/01/26', '23:30', '+08:00') # pos = GeoPos('30n42', '111e17') # chart = Chart(date, pos) # sun = chart.get(const.SUN) # print(sun) start_time = pd.to_datetime('1949/10/01') end_time = pd.to_datetime('2030/01/01') days = (end_time - start_time).days pos = GeoPos('30n42', '111e17') # Yichang from pandas.tseries.offsets import Day time_collection = [] saturn_collection = [] for timeslice in range(days): if timeslice % 7 == 0: current_day = start_time + Day(timeslice) date_string = current_day.date().strftime('%Y/%m/%d') date = Datetime(date_string, '00:00', '+08:00') chart = Chart(date, pos) if const.CAPRICORN ==chart.objects.content['Saturn'].sign \ or const.AQUARIUS ==chart.objects.content['Saturn'].sign \ or const.LIBRA==chart.objects.content['Saturn'].sign: saturn_status = 5 else:
def calc_chart_raw(self, datetime: tuple, geopos: tuple): chart_datetime = Datetime(*datetime) chart_geopos = GeoPos(*geopos) return Chart(chart_datetime, chart_geopos)
def get_astrological(date_time, coordinates, timezone): if isinstance(coordinates, (list, )): if len(coordinates) == 1: coordinates = coordinates[0] else: coord = coordinates[:2] else: return () if isinstance(coordinates, (str, )): if "," in coordinates: coord = coordinates.split(',') coord[0] = coord[0].lstrip() coord[1] = coord[1].lstrip() # if len(coord[1])>2: # coord[1] = coord[1][:1]+":" +coord[1][2:] # print(coord[1]) flatlib_pos = GeoPos(coord[0], coord[1]) flatlib_date_time = Datetime(date_time.strftime("%Y/%m/%d"), date_time.strftime('%H:%M'), timezone) chart = Chart(flatlib_date_time, flatlib_pos) astro = {} for obj in [chart.get(const.ASC)]: # #print(obj) astro[obj.id] = {'sign': obj.sign, 'lon': obj.lon} # for obj in chart.houses: # astro[obj.id] = {'sign':obj.sign,'lon':obj.lon,'signlon':obj.signlon,'size':30-obj.size} for obj in chart.objects: #Planets #print(obj.id,obj.sign,obj.lon,obj.signlon,obj.lonspeed) astro[obj.id] = { 'sign': obj.sign, 'lon': obj.lon, 'speed': obj.lonspeed } try: gender = obj.gender() astro[obj.id].update({'gender': gender}) except: pass try: mean_motion = obj.meanMotion() if mean_motion: astro[obj.id].update({'speed': obj.lonspeed / mean_motion}) except: pass try: astro[obj.id].update({'fast': str(obj.isFast())}) except: pass for house in chart.houses: if house.hasObject(obj): astro[obj.id].update({'house': int(house.id[5:])}) moon_phase = angle_dif(astro['Moon']['lon'], astro['Sun']['lon']) astro['Moon'].update({ 'phase': moon_phase, }) ASC_LON = chart.get(const.ASC).lon for obj in astro.keys(): if 'lon' in astro[obj].keys(): angle = angle_dif(ASC_LON, astro[obj]['lon']) astro[obj].update({ 'lon': angle, 'position': [np.sin(angle * np.pi / 180.), np.cos(angle * np.pi / 180.)] }) return (astro)
def bdate_time_place_to_degs(api, bdate, btime, bplace, lati=None, long=None): bdate = [int(i) for i in bdate.split('.')] if bdate[0] < 10: bdate[0] = '0' + str(bdate[0]) else: bdate[0] = str(bdate[0]) if bdate[1] < 10: bdate[1] = '0' + str(bdate[1]) else: bdate[1] = str(bdate[1]) bdate[2] = str(bdate[2]) if len(bdate[0]) == 2: bdate = bdate[2] + '/' + bdate[1] + '/' + bdate[0] else: bdate = bdate[0] + '/' + bdate[1] + '/' + bdate[2] btime = str(btime) # if bplace is not None: place = api.geocode(bplace) lat, lon = place[0]['geometry']['location']['lat'], place[0][ 'geometry']['location']['lng'] else: lat, lon = lati, long utcdiff = api.timezone([lat, lon])['rawOffset'] udsign = str(utcdiff)[0] udsign = udsign if udsign == '-' else '+' utcdiff = abs(utcdiff) udh = utcdiff // 3600 udm = (utcdiff - udh * 3600) // 60 if udh < 10: udh = '0' + str(udh) else: udh = str(udh) if udm < 10: udm = '0' + str(udm) else: udm = str(udm) utcdiff = udsign + udh + ':' + udm nslat = None ewlon = None if lat < 0: nslat = 's' else: nslat = 'n' if lon < 0: ewlon = 'w' else: ewlon = 'e' lat = abs(lat) lon = abs(lon) lat_d = int(str(lat).split('.')[0]) lat_m = str(int((lat - lat_d) * 60)) lat_d = str(lat_d) lon_d = int(str(lon).split('.')[0]) lon_m = str(int((lon - lon_d) * 60)) lon_d = str(lon_d) bpl = [lat_d + nslat + lat_m, lon_d + ewlon + lon_m] # date = Datetime(bdate, btime, utcdiff) pos = GeoPos(bpl[0], bpl[1]) chart = Chart(date, pos) res = [] res.append(chart.get(const.SUN).lon) res.append(chart.get(const.MOON).lon) res.append(chart.get(const.MERCURY).lon) res.append(chart.get(const.MARS).lon) res.append(chart.get(const.JUPITER).lon) res.append(chart.get(const.VENUS).lon) res.append(chart.get(const.SATURN).lon) res.append(chart.get(const.NORTH_NODE).lon) res.append(chart.get(const.SOUTH_NODE).lon) res.append(chart.get(const.ASC).lon) for i in range(len(res)): if res[i] - 23.81 < 0: res[i] = 360 + (res[i] - 23.81) else: res[i] -= 23.81 return res
with codecs.open('severeinjury.csv', "r", encoding='utf-8', errors='ignore') as fdata: datafile = pd.read_csv(fdata) # test mars # list all mars properties, whether in Scopio or in Aries, or in Capricorn. Else in Their opposing constellation # list all major starts that has a aspect with mars, with exception of moon, to test corellation with body part # run a Saturn Jupyter graph for overall uckiness of generations from flatlib.datetime import Datetime from flatlib.geopos import GeoPos from flatlib.chart import Chart from flatlib import const latitude, longitude = datafile['Latitude'], datafile['Longitude'] birthtime = datafile['EventDate'] birthtime = pd.to_datetime(birthtime) pos = GeoPos('30n42', '111e17') for tmp in birthtime: # Pandas wrapped numpy datetime64 to timestamp object, which is far better to use date_old = tmp.date() date_string = date_old.strftime('%Y/%d/%m') date = Datetime(date_string, '00:00', '+08:00') chart = Chart(date, pos) chart.objects.content['Saturn'].sign chart = Chart(birthtime, pos) # aa = pd.read_csv(file,error_bad_lines=False) # df = pd.read_csv(file,sep=',', header = None, skiprows=1000, chunksize=1000) # aa = pd.read_csv('severeinjury.csv',encoding='cp936') print('eof')
from MagicChart import MagicChart, ELEMENTS from flatlib.datetime import Datetime from flatlib.geopos import GeoPos from datetime import datetime, timedelta MOST = GeoPos('50n50', '13e64') ROZTOKY = GeoPos('50n17', '14e38') dNow = datetime.now() elmStarted = False elmStartD = dNow for d in (dNow + timedelta(minutes=1 * i) for i in range(60*24*60)): date = Datetime(d.__format__('%y/%m/%d'), d.__format__('%H:%M'), '+2:00') pos = GeoPos('50n50', '13e64') chart = MagicChart(date, ROZTOKY) for elm in ELEMENTS: if chart.canElement(elm): if not elmStarted: elmStarted = True elmStartD = d elmStart = elm else: if elmStarted and elm == elmStart: print('{:<10} {:02d}.{:02d}.{:04d} {:02d}:{:02d}-{:02d}:{:02d} ({:<3} min.)'.format( elm, elmStartD.day, elmStartD.month, elmStartD.year, elmStartD.hour, elmStartD.minute, d.hour, d.minute, (d - elmStartD).seconds//60
def setUp(self): self.date = Datetime('2015/03/13', '17:00', '+00:00') self.pos = GeoPos('38n32', '8w54')
from flatlib import const from flatlib.chart import Chart from flatlib.datetime import Datetime from flatlib.geopos import GeoPos import keywords_dict_for_model as kdfm pos = GeoPos('51n52', '0w11') def get_datastring(publish_date_text): publish_date = Datetime(publish_date_text, '00:00', '+00:00') list_obj = [publish_date_text] for obj in const.LIST_OBJECTS_TRADITIONAL: calculator = Chart(publish_date, pos).objects list_obj.append(kdfm.sign_dict[calculator.get(obj).sign]) list_obj.append(calculator.get(obj).lon) list_obj.append(calculator.get(obj).lat) return list_obj
from flatlib import const from flatlib.chart import Chart from flatlib.datetime import Datetime from flatlib.geopos import GeoPos from flatlib.tools.chartdynamics import ChartDynamics from flatlib.protocols import almutem # Build a chart for a date and location date = Datetime('2020/01/20', '05:00', '+2:50') pos = GeoPos('39:57', '32:53') chart = Chart(date, pos) sun = chart.getObject(const.SUN) #print("--------------- SUN") print("Güneş Burç :" + sun.sign) #gunes burc moon = chart.getObject(const.MOON) print("Ay Burç :" + moon.sign) #gunes burc #print(sun.signlon)#gunes burc #print(sun.gender())#gunes burc cinsiyet #print(sun) print("------------------EVLER-----------") #Ev listesi homeList = [ const.HOUSE1, const.HOUSE2, const.HOUSE3, const.HOUSE4, const.HOUSE5, const.HOUSE6, const.HOUSE7, const.HOUSE8, const.HOUSE9, const.HOUSE10, const.HOUSE11, const.HOUSE12 ] house1 = chart.get(const.HOUSE12) for i in homeList: print("{0}: {1} ".format(i, chart.get(i).sign)) alm = almutem.compute(chart)
This recipe shows sample code for handling solar returns. """ from flatlib import const from flatlib.chart import Chart from flatlib.datetime import Datetime from flatlib.geopos import GeoPos from flatlib.predictives import returns # Build a chart for a date and location date = Datetime('2013/06/13', '17:00', '+01:00') pos = GeoPos('38n32', '8w54') chart = Chart(date, pos) # Get the next solar return Chart given a date today = Datetime('2015/04/06', '10:40', '+01:00') srChart = returns.nextSolarReturn(chart, today) # Print the date and Asc asc = srChart.get(const.ASC) print(asc) # <Asc Taurus +26:25:47> print(srChart.date) # <2015/06/14 04:38:37 01:00:00> # Solar return of the year srChart = chart.solarReturn(2015) print(asc) # <Asc Taurus +26:25:47> print(srChart.date) # <2015/06/14 04:38:37 01:00:00>
from flatlib import const from flatlib.chart import Chart from flatlib.datetime import Datetime from flatlib.geopos import GeoPos from flatlib.tools.chartdynamics import ChartDynamics # Build a chart for a date and location date = Datetime('1997/01/20', '01:00', '+3:50') pos = GeoPos('38:55', '27:50') chart = Chart(date, pos) sun = chart.getObject(const.SUN) print("--------------- SUN") print(sun.sign) #günes yükselen