[ create a new paste ] login | about

Link: http://codepad.org/FLOdrrQT    [ raw code | output | fork ]

stupid2 - Python, pasted on Jul 6:
#! -*- coding: utf-8 -*-
from random import randint
from datetime import date

lastThree = list()
options = [
  'Döner', 
  'Pizza', 
  'Subway',
  'Asia',
  'AsiaBox',
  'Franzose',
  'Kantine',
  'Vapiano',
  'Kalmuck',
  'LEOS',
  'SchnitzelCulture',
  'Sushi',
  'Omar',
]

def day(date):
  if date.weekday() < 5:
    choosen = randint(0, len(options)-1)
    while choosen in lastThree:
      choosen = randint(0, len(options)-1)
    lastThree.append(choosen)
    if len(lastThree) == 4:
      lastThree.pop(0)
    print '%s: %s' % (date.isoformat(), options[choosen])
  else:
    print '%s: Wochenende' % date.isoformat()

def month(which):
  m = date(date.today().year, which, 1)
  for i in xrange(1, 32):
    day(m)
    try:
      m = m.replace(day=i+1)
    except ValueError:
      return

for i in xrange(1, 13):
  month(i)


Output:
2011-01-01: Wochenende
2011-01-02: Wochenende
2011-01-03: Sushi
2011-01-04: Asia
2011-01-05: LEOS
2011-01-06: Pizza
2011-01-07: Franzose
2011-01-08: Wochenende
2011-01-09: Wochenende
2011-01-10: Vapiano
2011-01-11: Subway
2011-01-12: SchnitzelCulture
2011-01-13: AsiaBox
2011-01-14: Kalmuck
2011-01-15: Wochenende
2011-01-16: Wochenende
2011-01-17: Asia
2011-01-18: Kantine
2011-01-19: SchnitzelCulture
2011-01-20: AsiaBox
2011-01-21: Vapiano
2011-01-22: Wochenende
2011-01-23: Wochenende
2011-01-24: Asia
2011-01-25: Kantine
2011-01-26: LEOS
2011-01-27: Pizza
2011-01-28: Kalmuck
2011-01-29: Wochenende
2011-01-30: Wochenende
2011-01-31: Franzose
2011-02-01: LEOS
2011-02-02: Omar
2011-02-03: SchnitzelCulture
2011-02-04: Franzose
2011-02-05: Wochenende
2011-02-06: Wochenende
2011-02-07: LEOS
2011-02-08: Vapiano
2011-02-09: Sushi
2011-02-10: SchnitzelCulture
2011-02-11: AsiaBox
2011-02-12: Wochenende
2011-02-13: Wochenende
2011-02-14: Omar
2011-02-15: Sushi
2011-02-16: Kantine
2011-02-17: Vapiano
2011-02-18: Döner
2011-02-19: Wochenende
2011-02-20: Wochenende
2011-02-21: Pizza
2011-02-22: AsiaBox
2011-02-23: Subway
2011-02-24: Döner
2011-02-25: LEOS
2011-02-26: Wochenende
2011-02-27: Wochenende
2011-02-28: Asia
2011-03-01: Franzose
2011-03-02: Subway
2011-03-03: AsiaBox
2011-03-04: Omar
2011-03-05: Wochenende
2011-03-06: Wochenende
2011-03-07: LEOS
2011-03-08: Franzose
2011-03-09: Kantine
2011-03-10: Döner
2011-03-11: Vapiano
2011-03-12: Wochenende
2011-03-13: Wochenende
2011-03-14: Omar
2011-03-15: Kantine
2011-03-16: Pizza
2011-03-17: Franzose
2011-03-18: AsiaBox
2011-03-19: Wochenende
2011-03-20: Wochenende
2011-03-21: Subway
2011-03-22: Kantine
2011-03-23: Vapiano
2011-03-24: SchnitzelCulture
2011-03-25: Döner
2011-03-26: Wochenende
2011-03-27: Wochenende
2011-03-28: Pizza
2011-03-29: Omar
2011-03-30: Kalmuck
2011-03-31: Sushi
2011-04-01: SchnitzelCulture
2011-04-02: Wochenende
2011-04-03: Wochenende
2011-04-04: Döner
2011-04-05: LEOS
2011-04-06: AsiaBox
2011-04-07: Pizza
2011-04-08: Kalmuck
2011-04-09: Wochenende
2011-04-10: Wochenende
2011-04-11: SchnitzelCulture
2011-04-12: LEOS
2011-04-13: Asia
2011-04-14: Franzose
2011-04-15: Kantine
2011-04-16: Wochenende
2011-04-17: Wochenende
2011-04-18: SchnitzelCulture
2011-04-19: Sushi
2011-04-20: Asia
2011-04-21: AsiaBox
2011-04-22: Vapiano
2011-04-23: Wochenende
2011-04-24: Wochenende
2011-04-25: Kantine
2011-04-26: Kalmuck
2011-04-27: Sushi
2011-04-28: Asia
2011-04-29: Subway
2011-04-30: Wochenende
2011-05-01: Wochenende
2011-05-02: LEOS
2011-05-03: Kalmuck
2011-05-04: Asia
2011-05-05: Franzose
2011-05-06: Vapiano
2011-05-07: Wochenende
2011-05-08: Wochenende
2011-05-09: Pizza
2011-05-10: Sushi
2011-05-11: Kantine
2011-05-12: Asia
2011-05-13: Döner
2011-05-14: Wochenende
2011-05-15: Wochenende
2011-05-16: Vapiano
2011-05-17: Subway
2011-05-18: Omar
2011-05-19: Franzose
2011-05-20: SchnitzelCulture
2011-05-21: Wochenende
2011-05-22: Wochenende
2011-05-23: Sushi
2011-05-24: Pizza
2011-05-25: Omar
2011-05-26: LEOS
2011-05-27: Döner
2011-05-28: Wochenende
2011-05-29: Wochenende
2011-05-30: Subway
2011-05-31: Asia
2011-06-01: Sushi
2011-06-02: AsiaBox
2011-06-03: Subway
2011-06-04: Wochenende
2011-06-05: Wochenende
2011-06-06: Vapiano
2011-06-07: Franzose
2011-06-08: Sushi
2011-06-09: SchnitzelCulture
2011-06-10: LEOS
2011-06-11: Wochenende
2011-06-12: Wochenende
2011-06-13: Döner
2011-06-14: Franzose
2011-06-15: Kalmuck
2011-06-16: SchnitzelCulture
2011-06-17: Pizza
2011-06-18: Wochenende
2011-06-19: Wochenende
2011-06-20: Subway
2011-06-21: Döner
2011-06-22: SchnitzelCulture
2011-06-23: Vapiano
2011-06-24: Asia
2011-06-25: Wochenende
2011-06-26: Wochenende
2011-06-27: Kalmuck
2011-06-28: Pizza
2011-06-29: LEOS
2011-06-30: Asia
2011-07-01: Subway
2011-07-02: Wochenende
2011-07-03: Wochenende
2011-07-04: AsiaBox
2011-07-05: SchnitzelCulture
2011-07-06: Kantine
2011-07-07: Subway
2011-07-08: Franzose
2011-07-09: Wochenende
2011-07-10: Wochenende
2011-07-11: AsiaBox
2011-07-12: SchnitzelCulture
2011-07-13: Vapiano
2011-07-14: Kalmuck
2011-07-15: Kantine
2011-07-16: Wochenende
2011-07-17: Wochenende
2011-07-18: Sushi
2011-07-19: Asia
2011-07-20: Subway
2011-07-21: Kantine
2011-07-22: Vapiano
2011-07-23: Wochenende
2011-07-24: Wochenende
2011-07-25: LEOS
2011-07-26: Franzose
2011-07-27: Subway
2011-07-28: Döner
2011-07-29: LEOS
2011-07-30: Wochenende
2011-07-31: Wochenende
2011-08-01: Vapiano
2011-08-02: Asia
2011-08-03: Pizza
2011-08-04: Subway
2011-08-05: Kantine
2011-08-06: Wochenende
2011-08-07: Wochenende
2011-08-08: AsiaBox
2011-08-09: SchnitzelCulture
2011-08-10: Döner
2011-08-11: Kantine
2011-08-12: Vapiano
2011-08-13: Wochenende
2011-08-14: Wochenende
2011-08-15: Sushi
2011-08-16: Subway
2011-08-17: Kalmuck
2011-08-18: Franzose
2011-08-19: Vapiano
2011-08-20: Wochenende
2011-08-21: Wochenende
2011-08-22: Subway
2011-08-23: Sushi
2011-08-24: SchnitzelCulture
2011-08-25: LEOS
2011-08-26: Subway
2011-08-27: Wochenende
2011-08-28: Wochenende
2011-08-29: Vapiano
2011-08-30: Kalmuck
2011-08-31: Döner
2011-09-01: Asia
2011-09-02: Franzose
2011-09-03: Wochenende
2011-09-04: Wochenende
2011-09-05: Subway
2011-09-06: LEOS
2011-09-07: AsiaBox
2011-09-08: Sushi
2011-09-09: Kalmuck
2011-09-10: Wochenende
2011-09-11: Wochenende
2011-09-12: Asia
2011-09-13: Subway
2011-09-14: Pizza
2011-09-15: Döner
2011-09-16: Omar
2011-09-17: Wochenende
2011-09-18: Wochenende
2011-09-19: Franzose
2011-09-20: SchnitzelCulture
2011-09-21: Asia
2011-09-22: AsiaBox
2011-09-23: Subway
2011-09-24: Wochenende
2011-09-25: Wochenende
2011-09-26: Vapiano
2011-09-27: Omar
2011-09-28: Sushi
2011-09-29: Kantine
2011-09-30: Asia
2011-10-01: Wochenende
2011-10-02: Wochenende
2011-10-03: SchnitzelCulture
2011-10-04: Omar
2011-10-05: Kantine
2011-10-06: LEOS
2011-10-07: Franzose
2011-10-08: Wochenende
2011-10-09: Wochenende
2011-10-10: Vapiano
2011-10-11: AsiaBox
2011-10-12: Pizza
2011-10-13: Kalmuck
2011-10-14: Sushi
2011-10-15: Wochenende
2011-10-16: Wochenende
2011-10-17: LEOS
2011-10-18: Omar
2011-10-19: SchnitzelCulture
2011-10-20: Sushi
2011-10-21: Pizza
2011-10-22: Wochenende
2011-10-23: Wochenende
2011-10-24: Subway
2011-10-25: Asia
2011-10-26: AsiaBox
2011-10-27: SchnitzelCulture
2011-10-28: Sushi
2011-10-29: Wochenende
2011-10-30: Wochenende
2011-10-31: Subway
2011-11-01: Vapiano
2011-11-02: Omar
2011-11-03: Pizza
2011-11-04: AsiaBox
2011-11-05: Wochenende
2011-11-06: Wochenende
2011-11-07: Subway
2011-11-08: LEOS
2011-11-09: Asia
2011-11-10: Franzose
2011-11-11: Kalmuck
2011-11-12: Wochenende
2011-11-13: Wochenende
2011-11-14: Pizza
2011-11-15: Subway
2011-11-16: Vapiano
2011-11-17: LEOS
2011-11-18: Pizza
2011-11-19: Wochenende
2011-11-20: Wochenende
2011-11-21: SchnitzelCulture
2011-11-22: Omar
2011-11-23: AsiaBox
2011-11-24: Pizza
2011-11-25: Asia
2011-11-26: Wochenende
2011-11-27: Wochenende
2011-11-28: Subway
2011-11-29: Omar
2011-11-30: Pizza
2011-12-01: Döner
2011-12-02: SchnitzelCulture
2011-12-03: Wochenende
2011-12-04: Wochenende
2011-12-05: Kalmuck
2011-12-06: Omar
2011-12-07: Asia
2011-12-08: SchnitzelCulture
2011-12-09: LEOS
2011-12-10: Wochenende
2011-12-11: Wochenende
2011-12-12: Franzose
2011-12-13: Kalmuck
2011-12-14: Subway
2011-12-15: Pizza
2011-12-16: LEOS
2011-12-17: Wochenende
2011-12-18: Wochenende
2011-12-19: AsiaBox
2011-12-20: Franzose
2011-12-21: Omar
2011-12-22: Döner
2011-12-23: Sushi
2011-12-24: Wochenende
2011-12-25: Wochenende
2011-12-26: SchnitzelCulture
2011-12-27: Subway
2011-12-28: Vapiano
2011-12-29: Omar
2011-12-30: Asia
2011-12-31: Wochenende


Create a new paste based on this one


Comments: