|
|
(103 dazwischenliegende Versionen von 8 Benutzern werden nicht angezeigt) |
Zeile 1: |
Zeile 1: |
| <!-- BEGIN DATA "R2"
| | foobar |
| laus:
| |
| mittwochs: ja
| |
| donnerstags: ja
| |
| neingeist:
| |
| dienstags: n
| |
| mittwochs: ja
| |
| donnerstags: n
| |
| jack:
| |
| dienstags: ja
| |
| mittwochs: nein
| |
|
| |
|
| END DATA -->
| | Externer Link [https://docs.fedoraproject.org/] |
| | |
| <!-- BEGIN TABLE "R2" -->
| |
| {| border="1" cellpadding="2" cellspacing="0" style="border-collapse:collapse;"
| |
| |-
| |
| !
| |
| !dienstags
| |
| !donnerstags
| |
| !mittwochs
| |
| |-
| |
| |[[User:jack|jack]]
| |
| | bgcolor="#7fff7f" | ja
| |
| | |
| |
| | bgcolor="#ff7f7f" | nein
| |
| |-
| |
| |[[User:laus|laus]]
| |
| | |
| |
| | bgcolor="#7fff7f" | ja
| |
| | bgcolor="#7fff7f" | ja
| |
| |-
| |
| |[[User:neingeist|neingeist]]
| |
| | bgcolor="#ff7f7f" | n
| |
| | bgcolor="#ff7f7f" | n
| |
| | bgcolor="#7fff7f" | ja
| |
| |-
| |
| |'''sum(ja)'''
| |
| |'''1'''
| |
| |'''1'''
| |
| |'''2'''
| |
| |}
| |
| <!-- END TABLE -->
| |
| | |
| [[Kategorie:Wiiwle]]
| |
| | |
| <syntaxhighlight lang="python">
| |
| from time import localtime
| |
| | |
| activities = {8: 'Sleeping',
| |
| 9: 'Commuting',
| |
| 17: 'Working',
| |
| 18: 'Commuting',
| |
| 20: 'Eating',
| |
| 22: 'Resting' }
| |
| | |
| time_now = localtime()
| |
| hour = time_now.tm_hour
| |
| | |
| for activity_time in sorted(activities.keys()):
| |
| if hour < activity_time:
| |
| print activities[activity_time]
| |
| break
| |
| else:
| |
| print 'Unknown, AFK or sleeping!'
| |
| </syntaxhighlight>
| |