Created
November 16, 2010 19:51
-
-
Save wandernauta/702379 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scavenger@versus:~/Public/wolfgang/components/schedules$ python test.py | |
Schedule 3074110572: | |
0 Ma 10:00 - 10:20 | |
2 Wo 17:00 - 17:20 | |
2 Wo 17:20 - 17:40 | |
2 Wo 17:40 - 18:00 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from models import * | |
someteach = Schedule() | |
someteach.parse(['0 Ma 9:00 - 11:00', '1 Di 15:00 - 16:00', '2 Wo 00:00 - 20:00']) | |
somestudent = Schedule() | |
somestudent.parse(['0 Ma 10:00 - 10:20', '2 Wo 17:00 - 18:00']) | |
st_block = someteach.blockset() | |
ss_block = somestudent.blockset() | |
isct = st_block.intersection(ss_block) | |
result = Schedule() | |
result.fromset(isct) | |
print result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment