<div class="pull-left"><img src="https://cdn.steemitimages.com/DQmRdrJm2wKHEyzJBuMjogghCfTZjPkTQC82uxjaYUirfs5/image.png"><br><center><sub>Pixnio.com <a href="https://pixnio.com/nature-landscapes/sunrise/sun-sunset-sky-landscape-cloud-sunrise-outdoor">link</a> CC0 license</sub></center></div> A little over 2 months ago I created a post called [Kill Time With Recreational Math: Calculate Sunset and Sunrise Times](https://steemit.com/steemstem/@procrastilearner/kill-time-at-work-with-recreational-math-calculate-sunset-and-sunrise-times). In this post I converted the [sunrise equation](https://en.wikipedia.org/wiki/Sunrise_equation) from Wikipedia into an Excel spreadsheet. That was quite the job but it was fun and well worth it as I now have a spreadsheet that does a nifty little calc for me. The job at the time was tricky because converting from degrees to radians and back again was not always obvious but I got it to work. Time offsets between Julian dates, our normal dates and the time differences between Greenwich UK and other locations was also tricky. Learning Python has been on my to do list for a long time now and the best way to learn is to do. So, in today's post I have converted that spreadsheet into Python code. The explanation of the variables used in the calculation can be found in the older post as well as on the Wikipedia page itself. As well, a great free Python interpreter can be found at [Python.org](https://www.python.org/). It is simple to install and the Integrated Development and Learning Environment (IDLE) is not that bad. ### The Sunrise/Sunset Source Code Here is the code, just copy and paste it into your favourite Python interpreter and try it out. ``` # ************************************************************************** # This code is released by Procrastilearner under the CC BY-SA 4.0 license. # # Source for the sunrise calculation: # https://en.wikipedia.org/wiki/Sunrise_equation # ************************************************************************** import time import math import datetime import math # ***************************************** # Some sample locations # Toronto Ontario Canada latitude_deg =43.65 longitude_deg = -79.38 timezone = -4.0 #Daylight Savings Time is in effect, this would be -5 for winter time #Whitehorse Yukon Territories Canada #latitude_deg =60.7 #longitude_deg = -135.1 #timezone = -7.0 #Daylight Savings Time is in effect, this would be -8 for winter time #Paris France #latitude_deg =48.85 #longitude_deg = 2.35 #timezone = 2.0 #Hong Kong PRC #latitude_deg =22.32 #longitude_deg =114.1 #timezone = 8.0 #Perth Australia #latitude_deg =-31.9 #longitude_deg =115.9 #timezone = 8.0 # ***************************************** def date_to_jd(year,month,day): # Convert a date to Julian Day. # Algorithm from 'Practical Astronomy with your Calculator or Spreadsheet', # 4th ed., Duffet-Smith and Zwart, 2011. # This function extracted from https://gist.github.com/jiffyclub/1294443 if month == 1 or month == 2: yearp = year - 1 monthp = month + 12 else: yearp = year monthp = month # this checks where we are in relation to October 15, 1582, the beginning # of the Gregorian calendar. if ((year < 1582) or (year == 1582 and month < 10) or (year == 1582 and month == 10 and day < 15)): # before start of Gregorian calendar B = 0 else: # after start of Gregorian calendar A = math.trunc(yearp / 100.) B = 2 - A + math.trunc(A / 4.) if yearp < 0: C = math.trunc((365.25 * yearp) - 0.75) else: C = math.trunc(365.25 * yearp) D = math.trunc(30.6001 * (monthp + 1)) jd = B + C + D + day + 1720994.5 return jd # end of date_to_jd pi=3.14159265359 latitude_radians = math.radians(latitude_deg) longitude__radians = math.radians(longitude_deg) jd2000 = 2451545 #the julian date for Jan 1 2000 at noon currentDT = datetime.datetime.now() current_year = currentDT.year current_month = currentDT.month current_day = currentDT.day current_hour = currentDT.hour jd_now = date_to_jd(current_year,current_month,current_day) n = jd_now - jd2000 + 0.0008 jstar = n - longitude_deg/360 M_deg = (357.5291 + 0.98560028 * jstar)%360 M = M_deg * pi/180 C = 1.9148 * math.sin(M) + 0.0200 * math.sin(2*M) + 0.0003 * math.sin(3*M) lamda_deg = math.fmod(M_deg + C + 180 + 102.9372,360) lamda = lamda_deg * pi/180 Jtransit = 2451545.5 + jstar + 0.0053 * math.sin(M) - 0.0069 * math.sin(2*lamda) earth_tilt_deg = 23.44 earth_tilt_rad = math.radians(earth_tilt_deg) sin_delta = math.sin(lamda) * math.sin(earth_tilt_rad) angle_delta = math.asin(sin_delta) sun_disc_deg = -0.83 sun_disc_rad = math.radians(sun_disc_deg) cos_omega = (math.sin(sun_disc_rad) - math.sin(latitude_radians) * math.sin(angle_delta))/(math.cos(latitude_radians) * math.cos(angle_delta)) omega_radians = math.acos(cos_omega) omega_degrees = math.degrees(omega_radians) #Output section print("------------------------------") print("Today's date is " + currentDT.strftime("%Y-%m-%d")) print("------------------------------") #("%Y-%m-%d %H:%M") print("Latitude = " + str(latitude_deg)) print("Longitude = " + str(longitude_deg)) print("Timezone = " + str(timezone)) print("------------------------------") Jrise = Jtransit - omega_degrees/360 numdays = Jrise - jd2000 numdays = numdays + 0.5 #offset because Julian dates start at noon numdays = numdays + timezone/24 #offset for time zone sunrise = datetime.datetime(2000, 1, 1) + datetime.timedelta(numdays) print("Sunrise is at " + sunrise.strftime("%H:%M")) Jset = Jtransit + omega_degrees/360 numdays = Jset - jd2000 numdays = numdays + 0.5 #offset because Julian dates start at noon numdays = numdays + timezone/24 #offset for time zone sunset = datetime.datetime(2000, 1, 1) + datetime.timedelta(numdays) print("Sunset is at " + sunset.strftime("%H:%M")) print("------------------------------") ``` ### Code Output And Code Validation  The code has been tested for a few different locations and compared against the calculated provided by Google. The answers from this code compare very well with the Google calculations. ###### How To Find Sunrise and Sunset Times: Just go to Google and enter the following search term: "Toronto sunrise sunset" and the web site will give the current day's times (or whatever city you happen to live near). ###### How To Find Your Latitude and Longitude: You most likely live somewhere else so to get your own sunrise and sunset times just enter your latitude in "latitude_deg", your longitude in "longitude_deg" and your time zone offset in "timezone". Go to Google Maps and left click on your location. ###### Your Time Zone Offset: If you live west of Greenwich UK then the time zone offset will be negative. If you live east of London UK then the time zone offset will be positive. ###### Some Sample Locations Are Provided: I have provided a few sample locations near the start of the code, these are the lines that are commented out. Just remove the comment hash character to calculate the times for those locations. ###### Caveat: If you go far enough north the sun won't set in the summer and it won't rise in the winter. Vice versa if you go far enough south. In these locations the code may give you wacky answers or just choke and die. So, no guarantees if you live in [Tuktoyaktuk Northwest Territories Canada](https://en.wikipedia.org/wiki/Tuktoyaktuk). Have fun, use and adapt as you see fit. *Thank you for reading my post.* ### Post Sources [1] [Sunrise equation](https://en.wikipedia.org/wiki/Sunrise_equation) [2] [Python.org](https://www.python.org/)
author | procrastilearner |
---|---|
permlink | killing-time-with-recreational-math-calculate-sunrise-and-sunset-times-using-python |
category | steemstem |
json_metadata | {"tags":["steemstem","astronomy","science","math","busy"],"image":["https://cdn.steemitimages.com/DQmRdrJm2wKHEyzJBuMjogghCfTZjPkTQC82uxjaYUirfs5/image.png","https://cdn.steemitimages.com/DQmTvssTmiyoQ5DJtsWtANTmTtpYpQuXZEbC6yhkVmGvzJ5/image.png"],"links":["https://pixnio.com/nature-landscapes/sunrise/sun-sunset-sky-landscape-cloud-sunrise-outdoor","https://steemit.com/steemstem/@procrastilearner/kill-time-at-work-with-recreational-math-calculate-sunset-and-sunrise-times","https://en.wikipedia.org/wiki/Sunrise_equation","https://www.python.org/","https://en.wikipedia.org/wiki/Tuktoyaktuk"],"app":"steemit/0.1","format":"markdown"} |
created | 2018-06-22 00:03:48 |
last_update | 2018-06-22 01:20:57 |
depth | 0 |
children | 10 |
last_payout | 2018-06-29 00:03:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 6.659 HBD |
curator_payout_value | 1.834 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 7,836 |
author_reputation | 10,682,012,809,580 |
root_title | "Killing Time With Recreational Math - Calculate Sunrise and Sunset Times Using Python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 61,706,073 |
net_rshares | 4,244,704,700,347 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
wackou | 0 | 40,560,354,377 | 0.26% | ||
pharesim | 0 | 83,009,120,123 | 0.02% | ||
lafona-miner | 0 | 175,406,501,228 | 5% | ||
bue | 0 | 28,243,498,536 | 100% | ||
kevinwong | 0 | 76,822,696,168 | 0.75% | ||
justtryme90 | 0 | 113,814,982,527 | 5% | ||
anwenbaumeister | 0 | 15,293,104,907 | 0.89% | ||
roelandp | 0 | 19,278,798,153 | 0.44% | ||
liberosist | 0 | 3,009,865,453 | 0.89% | ||
arconite | 0 | 301,814,107 | 0.37% | ||
lemouth | 0 | 23,400,551,235 | 5% | ||
rjbauer85 | 0 | 309,266,112 | 5% | ||
anarchyhasnogods | 0 | 10,442,142,154 | 3% | ||
lamouthe | 0 | 1,482,151,817 | 5% | ||
meerkat | 0 | 10,635,011,527 | 0.97% | ||
curie | 0 | 29,136,900,667 | 0.89% | ||
hendrikdegrote | 0 | 522,372,459,310 | 0.89% | ||
vact | 0 | 15,869,339,142 | 0.89% | ||
steemstem | 0 | 145,959,614,324 | 5% | ||
dashfit | 0 | 114,456,221 | 0.44% | ||
foundation | 0 | 692,806,899 | 5% | ||
the-devil | 0 | 657,527,259 | 5% | ||
frankswi | 0 | 80,749,467 | 0.44% | ||
remlaps2 | 0 | 3,973,234,557 | 50% | ||
thevenusproject | 0 | 2,814,165,348 | 5% | ||
dna-replication | 0 | 1,407,139,379 | 5% | ||
cub2 | 0 | 3,756,035,427 | 50% | ||
astronomyizfun | 0 | 4,206,997,542 | 75% | ||
borislavzlatanov | 0 | 387,699,686 | 5% | ||
michelios | 0 | 487,018,351 | 0.13% | ||
moksamol | 0 | 211,242,234 | 0.44% | ||
jade56 | 0 | 125,907,191 | 2.5% | ||
iansart | 0 | 559,009,747 | 0.44% | ||
kryzsec | 0 | 3,060,653,741 | 5% | ||
fredrikaa | 0 | 12,077,300,954 | 5% | ||
locikll | 0 | 425,796,305 | 1.78% | ||
dber | 0 | 934,148,211 | 5% | ||
mahdiyari | 0 | 3,194,833,169 | 2.5% | ||
aboutyourbiz | 0 | 212,185,869 | 0.89% | ||
kymaticus | 0 | 2,903,892,998 | 18% | ||
kerriknox | 0 | 5,241,130,670 | 5% | ||
alexander.alexis | 0 | 626,673,028 | 2% | ||
orcheva | 0 | 81,759,961 | 0.44% | ||
saunter | 0 | 1,501,798,717 | 5% | ||
cryptokrieg | 0 | 253,321,537 | 0.89% | ||
destrudo | 0 | 1,196,901,293 | 50% | ||
ertwro | 0 | 2,073,641,227 | 5% | ||
juanjdiaz89 | 0 | 57,356,548 | 5% | ||
thinknzombie | 0 | 1,348,271,416 | 0.44% | ||
nitesh9 | 0 | 1,255,422,675 | 5% | ||
fancybrothers | 0 | 761,946,490 | 1.5% | ||
howo | 0 | 4,808,488,623 | 2.5% | ||
himal | 0 | 385,451,605 | 5% | ||
bachuslib | 0 | 20,257,979,103 | 100% | ||
ratticus | 0 | 5,037,101,948 | 10% | ||
neumannsalva | 0 | 115,624,215 | 0.44% | ||
abigail-dantes | 0 | 86,044,913,734 | 5% | ||
csusbgeochem1 | 0 | 4,161,488,233 | 80% | ||
suravsingh | 0 | 66,295,647 | 5% | ||
planetenamek | 0 | 144,164,213 | 0.25% | ||
alexzicky | 0 | 814,663,990 | 1.25% | ||
mountain.phil28 | 0 | 3,533,699,076 | 25% | ||
akeelsingh | 0 | 209,418,421 | 5% | ||
mountainwashere | 0 | 2,193,555,417 | 5% | ||
zest | 0 | 1,595,142,133 | 3.5% | ||
felixrodriguez | 0 | 144,287,476 | 2.5% | ||
indy8phish | 0 | 87,964,911 | 0.44% | ||
massivevibration | 0 | 2,641,580,558 | 5% | ||
kiriatjrb | 0 | 109,393,813 | 10% | ||
ksolymosi | 0 | 1,074,962,331 | 5% | ||
simplifylife | 0 | 894,820,293 | 2.5% | ||
nanocheeze | 0 | 71,798,673 | 2% | ||
nicejob | 0 | 303,576,517 | 50% | ||
mayowadavid | 0 | 265,208,821 | 2.5% | ||
rscalabrini | 0 | 25,274,094,371 | 100% | ||
happychild | 0 | 133,907,899 | 0.44% | ||
anevolvedmonkey | 0 | 1,089,026,876 | 100% | ||
peaceandwar | 0 | 162,259,722 | 0.44% | ||
enzor | 0 | 85,474,857 | 2.5% | ||
pratik27 | 0 | 199,726,040 | 2.5% | ||
rogeviolinista | 0 | 119,536,628 | 10% | ||
carloserp-2000 | 0 | 1,074,004,105 | 5% | ||
rachelsmantra | 0 | 214,559,082 | 5% | ||
gra | 0 | 1,753,691,764 | 5% | ||
utopian-io | 0 | 2,282,440,380,233 | 1.5% | ||
tfcoates | 0 | 98,421,524 | 1.25% | ||
gazbaz4000 | 0 | 249,187,078 | 3% | ||
aboutcoolscience | 0 | 30,799,980,742 | 23% | ||
shaff.aff | 0 | 61,043,919 | 10% | ||
imcesca | 0 | 10,166,137,483 | 50% | ||
skycae | 0 | 125,651,314 | 0.89% | ||
astromaniak | 0 | 5,611,264,221 | 25% | ||
damdap | 0 | 431,512,419 | 100% | ||
physics.benjamin | 0 | 103,274,166 | 5% | ||
kenadis | 0 | 1,415,404,642 | 5% | ||
amavi | 0 | 780,859,306 | 1% | ||
florae | 0 | 273,741,474 | 5% | ||
robotics101 | 0 | 231,005,169 | 4% | ||
aamin | 0 | 97,486,966 | 2.5% | ||
trishy | 0 | 61,867,531 | 5% | ||
sco | 0 | 502,629,890 | 1% | ||
adetola | 0 | 362,344,025 | 5% | ||
rharphelle | 0 | 1,193,316,198 | 25% | ||
dysfunctional | 0 | 274,836,465 | 2.5% | ||
stahlberg | 0 | 154,307,120 | 0.44% | ||
monie | 0 | 444,009,566 | 100% | ||
mangoish | 0 | 143,255,100 | 10% | ||
shoganaii | 0 | 223,758,859 | 2.5% | ||
bestsmiles | 0 | 155,631,240 | 50% | ||
mathowl | 0 | 608,673,313 | 5% | ||
whileponderin | 0 | 420,391,434 | 5% | ||
mittymartz | 0 | 98,691,305 | 5% | ||
hadji | 0 | 203,358,276 | 5% | ||
sakura1012 | 0 | 202,936,731 | 5% | ||
knfitaly | 0 | 18,249,924,662 | 100% | ||
giornalista | 0 | 8,508,261,722 | 100% | ||
terrylovejoy | 0 | 49,410,549,468 | 100% | ||
saunter-pl | 0 | 104,080,174 | 5% | ||
steepup | 0 | 76,123,687 | 2% | ||
mrday | 0 | 109,030,392 | 0.44% | ||
lesshorrible | 0 | 941,383,419 | 5% | ||
steem-hikers | 0 | 94,217,411 | 5% | ||
michealkey | 0 | 212,406,992 | 50% | ||
deutsch-boost | 0 | 445,012,024 | 20% | ||
kingabesh | 0 | 137,675,810 | 2.5% | ||
didic | 0 | 166,537,495 | 0.44% | ||
kelos | 0 | 458,945,427 | 10% | ||
blue-steens | 0 | 611,906,284 | 100% | ||
dexterdev | 0 | 488,575,800 | 5% | ||
ugonma | 0 | 232,533,402 | 5% | ||
robertbira | 0 | 214,410,741 | 25% | ||
benleemusic | 0 | 1,452,222,088 | 0.08% | ||
lianaakobian | 0 | 945,885,129 | 4% | ||
procrastilearner | 0 | 45,837,339,086 | 100% | ||
croctopus | 0 | 1,139,044,268 | 100% | ||
chriselyngascon | 0 | 325,282,498 | 50% | ||
deusjudo | 0 | 6,495,981,846 | 35% | ||
joelagbo | 0 | 110,871,472 | 5% | ||
davinci.witness | 0 | 10,249,158,945 | 100% | ||
spederson | 0 | 113,240,524 | 4.5% | ||
theunlimited | 0 | 65,349,807 | 10% | ||
cryptoitaly | 0 | 240,837,323 | 2.5% | ||
effofex | 0 | 102,085,034 | 2.5% | ||
beograd | 0 | 2,957,499,766 | 100% | ||
l8r | 0 | 239,475,648 | 100% | ||
de-stem | 0 | 2,124,821,733 | 4.5% | ||
sooflauschig | 0 | 3,414,383,595 | 100% | ||
derbesserwisser | 0 | 17,728,676,738 | 100% | ||
serylt | 0 | 816,819,498 | 4% | ||
yann85 | 0 | 413,417,928 | 12% | ||
event-horizon | 0 | 50,517,276 | 5% | ||
yaqinnas | 0 | 100,605,510 | 98% | ||
irelandscape | 0 | 5,217,811,028 | 100% | ||
chloroform | 0 | 821,877,473 | 5% | ||
davinci.polyglot | 0 | 934,987,902 | 100% | ||
vanessahampton | 0 | 301,945,810 | 2.5% | ||
moncia90 | 0 | 3,270,358,801 | 20% | ||
albatar | 0 | 227,760,371 | 25% | ||
temitayo-pelumi | 0 | 282,247,638 | 5% | ||
b3d | 0 | 450,964,253 | 100% | ||
doctor-cog-diss | 0 | 310,014,778 | 100% | ||
davinci.times | 0 | 16,123,423,403 | 100% | ||
itastem | 0 | 4,510,395,261 | 100% | ||
flyyingkiwi | 0 | 131,239,054,385 | 100% | ||
nonzerosum | 0 | 12,406,426,439 | 100% | ||
sbi5 | 0 | 2,578,232,183 | 2% | ||
davinci.art | 0 | 1,228,127,581 | 100% | ||
shimaro | 0 | 552,098,005 | 100% | ||
yogaspirit | 0 | 521,136,924 | 100% | ||
biomimi | 0 | 208,030,022 | 40% | ||
astrophoto.kevin | 0 | 429,793,735 | 2.5% | ||
kind-sir | 0 | 64,915,044 | 2% | ||
steam.erotic | 0 | 413,632,953 | 50% | ||
call-me-howie | 0 | 397,700,361 | 0.44% | ||
hansmast | 0 | 84,277,209 | 0.44% | ||
rgkmb-unofficial | 0 | 1,900,989,073 | 50% | ||
rgkmb | 0 | 265,861,949 | 50% | ||
gatis-photo | 0 | 66,769,867 | 2% | ||
cutie-pie | 0 | 1,938,979,836 | 30% | ||
astromaniac | 0 | 506,996,800 | 100% | ||
toddrjohnson | 0 | 3,270,091,015 | 100% | ||
mr-hades | 0 | 551,419,250 | 100% | ||
markgritter | 0 | 588,024,929 | 100% | ||
solardude | 0 | 610,201,134 | 100% | ||
davinci.vote | 0 | 119,505,744 | 100% | ||
cmp2020-lite | 0 | 396,393,228 | 75% | ||
remlaps-lite | 0 | 394,048,226 | 75% | ||
up-quark | 0 | 1,102,702,327 | 5% |
Fantastic use of python and itβs extreme versatility. Iβm currently learning python as well as a beginner because itβs an easy introductory language. My main goal is to conquer Swift eventually. My current endeavor is building a functional blockchain in python. Itβs been quite the task. Object oriented programming is quite the abstract topic. Iβve also always been a huge fan of complex mathematics and to put it simply, you make it look easy. Fantastic job. Keep up the outstanding work!!
author | chris.geese |
---|---|
permlink | re-procrastilearner-killing-time-with-recreational-math-calculate-sunrise-and-sunset-times-using-python-20180622t023355490z |
category | steemstem |
json_metadata | {"tags":["steemstem"],"app":"steemit/0.1"} |
created | 2018-06-22 02:33:54 |
last_update | 2018-06-22 02:33:54 |
depth | 1 |
children | 2 |
last_payout | 2018-06-29 02:33:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.023 HBD |
curator_payout_value | 0.005 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 495 |
author_reputation | 36,677,280,275 |
root_title | "Killing Time With Recreational Math - Calculate Sunrise and Sunset Times Using Python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 61,717,131 |
net_rshares | 14,908,598,933 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
procrastilearner | 0 | 14,330,869,602 | 37% | ||
drkcyd | 0 | 577,729,331 | 100% |
Never heard of Swift until you mentioned it here. I see it is an Apple developed language. I'm mostly a PC guy myself.
author | procrastilearner |
---|---|
permlink | re-chrisgeese-re-procrastilearner-killing-time-with-recreational-math-calculate-sunrise-and-sunset-times-using-python-20180622t031044428z |
category | steemstem |
json_metadata | {"tags":["steemstem"],"app":"steemit/0.1"} |
created | 2018-06-22 03:10:42 |
last_update | 2018-06-22 03:10:42 |
depth | 2 |
children | 1 |
last_payout | 2018-06-29 03:10:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 118 |
author_reputation | 10,682,012,809,580 |
root_title | "Killing Time With Recreational Math - Calculate Sunrise and Sunset Times Using Python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 0 |
post_id | 61,719,754 |
net_rshares | 611,747,221 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
chris.geese | 0 | 611,747,221 | 100% |
Correct. Apple stepped away from objective-c in 2014 as their main language and have thus far concentrated solely on their in house language Swift. The syntax is beautiful to be honest. Very intuitive and if using x-code, storyboards and auto-layout are almost a work of magic, if you can wrap your head around it that is. Still object oriented though so a good foundation is python. Glad you took the time to look it up! Iβm an Apple fan boy at heart, since 2000 when I started college.
author | chris.geese |
---|---|
permlink | re-procrastilearner-re-chrisgeese-re-procrastilearner-killing-time-with-recreational-math-calculate-sunrise-and-sunset-times-using-python-20180622t033114067z |
category | steemstem |
json_metadata | {"tags":["steemstem"],"app":"steemit/0.1"} |
created | 2018-06-22 03:31:12 |
last_update | 2018-06-22 03:31:12 |
depth | 3 |
children | 0 |
last_payout | 2018-06-29 03:31:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.032 HBD |
curator_payout_value | 0.008 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 488 |
author_reputation | 36,677,280,275 |
root_title | "Killing Time With Recreational Math - Calculate Sunrise and Sunset Times Using Python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 61,721,307 |
net_rshares | 21,049,582,769 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
procrastilearner | 0 | 20,459,626,363 | 57% | ||
drkcyd | 0 | 589,956,406 | 100% |
I am really happy to see that you have received @utopian's support. I upvoted your post because I like reading post with codes. *Congratulations!*
author | moncia90 |
---|---|
permlink | re-procrastilearner-killing-time-with-recreational-math-calculate-sunrise-and-sunset-times-using-python-20180622t130239859z |
category | steemstem |
json_metadata | {"tags":["steemstem"],"users":["utopian"],"app":"steemit/0.1"} |
created | 2018-06-22 13:02:42 |
last_update | 2018-06-22 13:02:42 |
depth | 1 |
children | 0 |
last_payout | 2018-06-29 13:02:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.017 HBD |
curator_payout_value | 0.005 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 146 |
author_reputation | 43,881,986,662,879 |
root_title | "Killing Time With Recreational Math - Calculate Sunrise and Sunset Times Using Python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 61,770,301 |
net_rshares | 11,832,073,077 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
procrastilearner | 0 | 11,832,073,077 | 31% |
I've started learning Object Oriented Programming in C++ and god Python seems so much clearer and logical! Anyways, nice bit of code! I'm wondering why did you start learning coding?
author | solardude |
---|---|
permlink | re-procrastilearner-killing-time-with-recreational-math-calculate-sunrise-and-sunset-times-using-python-20180622t060522387z |
category | steemstem |
json_metadata | {"tags":["steemstem"],"app":"steemit/0.1"} |
created | 2018-06-22 06:05:24 |
last_update | 2018-06-22 06:05:24 |
depth | 1 |
children | 0 |
last_payout | 2018-06-29 06:05:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.031 HBD |
curator_payout_value | 0.010 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 185 |
author_reputation | 22,509,154,244 |
root_title | "Killing Time With Recreational Math - Calculate Sunrise and Sunset Times Using Python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 61,733,364 |
net_rshares | 21,199,130,931 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
procrastilearner | 0 | 21,199,130,931 | 57% |
Worked perfectly for me! Btw the most accurate predictions are from [JPL Horizons](https://ssd.jpl.nasa.gov/horizons.cgi).
author | terrylovejoy |
---|---|
permlink | re-procrastilearner-killing-time-with-recreational-math-calculate-sunrise-and-sunset-times-using-python-20180622t023643603z |
category | steemstem |
json_metadata | {"tags":["steemstem"],"links":["https://ssd.jpl.nasa.gov/horizons.cgi"],"app":"steemit/0.1"} |
created | 2018-06-22 02:36:42 |
last_update | 2018-06-22 02:36:42 |
depth | 1 |
children | 3 |
last_payout | 2018-06-29 02:36:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.033 HBD |
curator_payout_value | 0.011 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 123 |
author_reputation | 15,797,973,031,321 |
root_title | "Killing Time With Recreational Math - Calculate Sunrise and Sunset Times Using Python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 61,717,328 |
net_rshares | 23,075,129,021 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
procrastilearner | 0 | 23,075,129,021 | 59% |
Thx for trying it out and thx for the tip. I will take a look at the JPL web site.
author | procrastilearner |
---|---|
permlink | re-terrylovejoy-re-procrastilearner-killing-time-with-recreational-math-calculate-sunrise-and-sunset-times-using-python-20180622t030850678z |
category | steemstem |
json_metadata | {"tags":["steemstem"],"app":"steemit/0.1"} |
created | 2018-06-22 03:08:51 |
last_update | 2018-06-22 03:08:51 |
depth | 2 |
children | 2 |
last_payout | 2018-06-29 03:08:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 82 |
author_reputation | 10,682,012,809,580 |
root_title | "Killing Time With Recreational Math - Calculate Sunrise and Sunset Times Using Python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 0 |
post_id | 61,719,638 |
net_rshares | 0 |
I couldn't get the exact times in Guide 9.1 or JPL, maybe refraction or could be the definition of sunset/sunrise. Is it the point the sun is completely below or completely above horizon, or is it when the sun's center is on the horizon. Either way great work on this!
author | terrylovejoy |
---|---|
permlink | re-procrastilearner-re-terrylovejoy-re-procrastilearner-killing-time-with-recreational-math-calculate-sunrise-and-sunset-times-using-python-20180622t113315090z |
category | steemstem |
json_metadata | {"tags":["steemstem"],"app":"steemit/0.1"} |
created | 2018-06-22 11:33:15 |
last_update | 2018-06-22 11:33:15 |
depth | 3 |
children | 1 |
last_payout | 2018-06-29 11:33:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.031 HBD |
curator_payout_value | 0.010 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 270 |
author_reputation | 15,797,973,031,321 |
root_title | "Killing Time With Recreational Math - Calculate Sunrise and Sunset Times Using Python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 61,760,456 |
net_rshares | 21,445,632,453 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
procrastilearner | 0 | 21,445,632,453 | 57% |
#### Hi @procrastilearner! Your post was upvoted by utopian.io in cooperation with steemstem - supporting knowledge, innovation and technological advancement on the Steem Blockchain. #### Contribute to Open Source with utopian.io Learn how to contribute on <a href="https://join.utopian.io">our website</a> and join the new open source economy. **Want to chat? Join the Utopian Community on Discord https://discord.gg/h52nFrV**
author | utopian-io |
---|---|
permlink | 20180622t054836126z |
category | steemstem |
json_metadata | {"tags":["utopian.tip"],"app":"utopian-io"} |
created | 2018-06-22 05:48:36 |
last_update | 2018-06-22 05:48:36 |
depth | 1 |
children | 0 |
last_payout | 2018-06-29 05:48:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 430 |
author_reputation | 152,955,367,999,756 |
root_title | "Killing Time With Recreational Math - Calculate Sunrise and Sunset Times Using Python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 61,732,043 |
net_rshares | 0 |