(602) 399 - 3946 Admin@Geoff.Pro

CAPTAINS BLOG STARDATE 1154.3

Stardate calculation in Python. 

Geoff Blair, Designer, Washington USA

26 February 2023

“My blog is a collection of answers people don’t want to hear to questions they didn’t ask.”
Sebastyne Young

As a self-taught programmer, working with ChatGPT has been an absolute game-changer for me. I’ve always been fascinated by the idea of artificial intelligence and the potential it holds for revolutionizing the world of coding, but until now, I never really felt like AI was anything more than a buzzword.

But ChatGPT has proved me wrong. This AI-powered language model has been an absolute lifesaver for me, allowing me to quickly iterate ideas, explore new languages, and ask for guidance whenever I need it. It’s like having an AI-powered tutor by my side, cheering me on and helping me navigate the complex world of coding.

And let me tell you, working with ChatGPT has been an absolute blast. Sure, there have been a few hiccups along the way (like the time I asked ChatGPT to explain recursion and it sent me down a rabbit hole of mind-bending philosophical debates), but overall, the experience has been nothing short of awe-inspiring.

One of the things I love most about ChatGPT is its sense of humor. Even when I’m feeling frustrated or confused, ChatGPT always manages to put a smile on my face with its witty responses and playful banter. It’s like having a snarky AI sidekick who’s always got my back.

But don’t let the humor fool you—ChatGPT is a serious tool for serious coders. Its ability to suggest alternate languages, create quizzes, and provide guidance and support has been an absolute game-changer for me, allowing me to expand my skills and explore new techniques with confidence and ease.

All in all, I’m just grateful to finally have an AI that’s actually useful. ChatGPT has opened up a whole new world of possibilities for me, and I can’t wait to see where this exciting journey takes me next.

 

 

import datetime

# Get the current date and time
now = datetime.datetime.now()

# Get the number of days that have elapsed since the start of the year
days_since_start_of_year = (now - datetime.datetime(now.year, 1, 1)).days

# Get the number of seconds that have elapsed since midnight
seconds_since_midnight = (now - datetime.datetime(now.year, now.month, now.day)).seconds

# Get the total number of days in the current year
if now.year % 4 == 0 and (now.year % 100 != 0 or now.year % 400 == 0):
    days_in_year = 366
else:
    days_in_year = 365

# Calculate the contemporary stardate
stardate = 1000 + (days_since_start_of_year + seconds_since_midnight / 86400) * 1000 / days_in_year

# Display the contemporary stardate
print("Today's stardate is: {:.1f}".format(stardate))

 

As a self-taught programmer, working with ChatGPT has been an absolute game-changer for me. I’ve always been fascinated by the idea of artificial intelligence and the potential it holds for revolutionizing the world of coding, but until now, I never really felt like AI was anything more than a buzzword.

But ChatGPT has proved me wrong. This AI-powered language model has been an absolute lifesaver for me, allowing me to quickly iterate ideas, explore new languages, and ask for guidance whenever I need it. It’s like having an AI-powered tutor by my side, cheering me on and helping me navigate the complex world of coding.

And let me tell you, working with ChatGPT has been an absolute blast. Sure, there have been a few hiccups along the way (like the time I asked ChatGPT to explain recursion and it sent me down a rabbit hole of mind-bending philosophical debates), but overall, the experience has been nothing short of awe-inspiring.

One of the things I love most about ChatGPT is its sense of humor. Even when I’m feeling frustrated or confused, ChatGPT always manages to put a smile on my face with its witty responses and playful banter. It’s like having a snarky AI sidekick who’s always got my back.

But don’t let the humor fool you—ChatGPT is a serious tool for serious coders. Its ability to suggest alternate languages, create quizzes, and provide guidance and support has been an absolute game-changer for me, allowing me to expand my skills and explore new techniques with confidence and ease.

All in all, I’m just grateful to finally have an AI that’s actually useful. ChatGPT has opened up a whole new world of possibilities for me, and I can’t wait to see where this exciting journey takes me next.

 

 

import datetime

# Get the current date and time
now = datetime.datetime.now()

# Get the number of days that have elapsed since the start of the year
days_since_start_of_year = (now - datetime.datetime(now.year, 1, 1)).days

# Get the number of seconds that have elapsed since midnight
seconds_since_midnight = (now - datetime.datetime(now.year, now.month, now.day)).seconds

# Get the total number of days in the current year
if now.year % 4 == 0 and (now.year % 100 != 0 or now.year % 400 == 0):
    days_in_year = 366
else:
    days_in_year = 365

# Calculate the contemporary stardate
stardate = 1000 + (days_since_start_of_year + seconds_since_midnight / 86400) * 1000 / days_in_year

# Display the contemporary stardate
print("Today's stardate is: {:.1f}".format(stardate))