joi, 14 mai 2015

Python Equillibrium

Some friends started talking about this:

and about the Millennial tipping point or equillibrium. And the discussion continued about doing this with Python. 
So I thought I'd give it a shot and exercise my Python muscle :)

Here's the code I came up with:

from sys import argv

script, byear, bmonth, bday = argv

from datetime import date
import time

today=date(int(time.strftime("%Y")),int(time.strftime("%m")),int(time.strftime("%d")))
new_mil=date(2001,1,1)
birthday=date(int(byear),int(bmonth),int(bday))
#Equilibrium time spent alive in the last millennium == time spent alive in this millennium
after=today-new_mil
before=new_mil-birthday

if after == before:
 print "Equilibrium"
elif after < before:
 print "You have " + str(before-after) +" days until Equillibrium"
 print "Equillibrium date: "+ str(today+(before-after))
else:
 print "You have " + str(after-before) + " days after Equillibrium"
 print "Equillibrium date: "+ str(today-(after-before))

Sample call & output:
PS D:\python_home> python .\milenium.py 1986 8 17
You have 5 days, 0:00:00 days until Equillibrium
Equillibrium date: 2015-05-19

PS D:\python_home> python .\milenium.py 1987 4 21
You have 242 days, 0:00:00 days after Equillibrium
Equillibrium date: 2014-09-14
I'm waiting for your comments and suggestions.

luni, 23 februarie 2015

Un nou inceput

Cred ca e cazul sa reincep acest blog. 

miercuri, 4 noiembrie 2009

Sanctuary - "Hero"

OMFG!!! I have no other words for it. Those of you that are familiar with the show "Sanctuary" know that in the begining of season 2 they have killed off a very important cast member. Emilie Ullerup ( http://www.imdb.com/name/nm2422305/ ) played Ashley Magnus, the daughter of Helen Magnus (Amanda Tapping - Stargate Sg-1's Colonel Samantha Carter) head of a secret organization called the Sanctuary. As all shows they had a lead villain organization, the Cabal, now one season isn't enough to explore a story of the magnitude this wanted to be. And 4 episodes to kidnap, genetically modify and kill off one of the main cast members isn't enough time. I read somewhere someone said they should've had season 2 full of a war between the Sanctuary and the Cabal and at the end kill off Ashley and the Cabal. In 4 episodes to destroy a major organization which wasn't even done on screen but you hear of it from other characters is B.S.
I'm so very dissapointed with this show. I've waited all sumer for the premier of the show and let me tell you it's been a huge huge huge huge huge dissapointment.

This is the link to a campaign to save Ashley: http://www.emilieullerupforum.com/index/viewtopic.php?f=28&t=53&sid=39cabc4e62145eddf52182dac6a1272d

Let's not even start with who they brought in to replace a hot young blond girl with blue eyes! And let's not get started on how they killed poor invisible girl, Clara, with who Will, a main character, was romantically involved and had such a great chemistry together.

So to get to the title of the post. I just watched the 4th episode of season 2 called "Hero" which comes right after the episode in which they had a memorial ceremony for Ashley and a very dark tone to the ep. The tone of this episode is very light and very humorous. How in the world can they go from a very dark tone and an almost insane Helen Magnus to a very balanced Helen Magnus and what the fudge was with the last few minutes were they all are laughting and having fun. Helen daughter had died just a few months ago. The moronity of this show has reached staggering heights. It's just mind boggling that the producers of the show have made such a poor decission in the direction of the show. I don't want an replacement I WANT ASHLEY BACK!!!!!!!

Well enough of my rantings : FOR SHAME PEOPLE THAT MAKE DECIONS ON SANCTUARY FOR RUINING A GREAT SHOW !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

miercuri, 26 august 2009

luni, 10 august 2009

Tornade in Romania

Na c-am trait s-o vad si pe asta! Tornade in Romania si mai rau pe langa Timisoara !!!!



Asta imi aduce aminte de filmul "The day after tomorow". Nasol de tot!!!

marți, 28 iulie 2009

Kill Windows 7

The end of the world as we know it!!!!!


luni, 20 iulie 2009

Cea mai tare faza din TV

Asta seara Mircea Badea a fost atacat de un laptop capcana :)) Partea trista e ca eu stau cu laptopu' pe burta. Daca si laptopu meu decide sa devina taliban am pus-o :))