These are chat archives for BernieenJos/weetikveel

26th
Jul 2015
JosvanderSpek
@JosvanderSpek
Jul 26 2015 21:38
lower = [int(time.mktime(time.strptime("%i 02 29"%(leap_year),"%Y %m %d"))) for leap_year in list(4*np.arange(m.ceil(currentYear/4), 510))]
upper = [int(time.mktime(time.strptime("%i 03 01"%(leap_year + 1),"%Y %m %d"))) for leap_year in list(4*np.arange(m.ceil(currentYear/4), 510))]
JosvanderSpek
@JosvanderSpek
Jul 26 2015 21:52
now = time.time()
currentYear = time.localtime(now)[0]
nextBirthday= currentYear
if now > time.mktime(time.strptime("%i 07 06 12"%(currentYear), "%Y %m %d %H")) :
nextBirthday += 1
next_birthday       = time.mktime(time.strptime("%i 07 06"%(nextBirthday),"%Y %m %d"))

lower = [int(time.mktime(time.strptime("%i 02 29"%(leap_year),"%Y %m %d"))) for leap_year in list(4*np.arange(m.ceil(currentYear/4), 510))]
upper = [int(time.mktime(time.strptime("%i 03 01"%(leap_year + 1),"%Y %m %d"))) for leap_year in list(4*np.arange(m.ceil(currentYear/4), 510))]

days_per_year = 365
for i in range(3) :
if (next_birthday in range(lower[i], upper[i])) and (now < lower[0]) :
days_per_year = 366
iambernie
@iambernie
Jul 26 2015 22:05
>>> b=0
>>> if 1 < b < 3:
...     print("ok")
...
>>> b=2
>>> if 1 < b < 3:
...     print("ok")
...
ok
JosvanderSpek
@JosvanderSpek
Jul 26 2015 22:08
>>> if (x == 23) | (x == 10) :
...     print('yes')
...
yes
iambernie
@iambernie
Jul 26 2015 22:10
```
>>> True|True
True
>>> True|False
True
>>> False|False
False
>>> False|2
2
>>> 2|2
2
>>> 2 | 2
2
>>> 2 | 3
3
>>> 2 | 4
6
>>>
iambernie
@iambernie
Jul 26 2015 22:18
>>> 5 | 3
7
>>> 5 or 3
5
JosvanderSpek
@JosvanderSpek
Jul 26 2015 22:23
def print_status(which_bet, years_till_victory, days_left, total_days_bet, percentages, zin, Universal_time):

if years_till_victory == 1 : jaarjaren = "year"
else : jaarjaren = "years"
if days_left == 1 : dagdagen = "day"
else : dagdagen = "days"

stats = ["\n\n " + str(int(daysRounded)) + " of the %i days"%(total_days_bet), "for Robert", "to endure", "(" + str(round(percentages, 3)) + "%)", "have already passed, so victory", zin, str(int(years_till_victory)), jaarjaren, "and", str(int(days_left)), dagdagen, "!\n\n"]

if years_till_victory < 1 :
for i in range(3): stats.pop(6)                                                                                                                 # Waarom werkt stats.pop(3) for j in range(3) niet?
if which_bet == "Jos" :
stats.pop(1)

stats_line = " ".join(stats)
Universe_comparison = " In comparison to the current age of the Universe, currently estimated at around 13 milliard 798 million years, the Universe would now be " + format(int(Universal_time), ',d') + " years old.\n\n"

if years_till_victory < 1 :
stats.pop(6) for j in range(3)                                                                                                                 # Waarom werkt stats.pop(6) for j in range(3) niet?
if which_bet == "Jos" :
stats.pop(1)
iambernie
@iambernie
Jul 26 2015 22:36
>>> lijst
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
>>> del lijst[4:7]
>>> lijst
[1, 2, 3, 4, 8, 9, 10]