This file contains 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
``` | |
a = 1 | |
``` |
This file contains 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
-webkit-animation-delay: 0s; | |
-webkit-animation-direction: normal; | |
-webkit-animation-duration: 0s; | |
-webkit-animation-fill-mode: none; | |
-webkit-animation-iteration-count: 1; | |
-webkit-animation-name: none; | |
-webkit-animation-play-state: running; | |
-webkit-animation-timing-function: ease; | |
-webkit-app-region: no-drag; | |
-webkit-appearance: none; |
This file contains 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
-webkit-animation-delay: 0s; | |
-webkit-animation-direction: normal; | |
-webkit-animation-duration: 0s; | |
-webkit-animation-fill-mode: none; | |
-webkit-animation-iteration-count: 1; | |
-webkit-animation-name: none; | |
-webkit-animation-play-state: running; | |
-webkit-animation-timing-function: ease; | |
-webkit-app-region: no-drag; | |
-webkit-appearance: none; |
This file contains 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 funcy import pairwise | |
from dateutil import parser | |
import datetime | |
from collections import defaultdict | |
import operator | |
# # "16:05:41,915 - Making GET request to http://localhost:8010/0.2/i/job/7378" | |
# # "16:05:42,053 - Received" | |
# processed = [] |
This file contains 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
users_to_invite = [1,2,3] | |
blocked_users= [3,4,5] | |
blocked_available = users_to_invite.intersection(blocked_users) | |
if blocked_available != set(): | |
user_to_invite -= blocked_available | |
for user in blocked_available: | |
# log messages | |
invite(users_to_invite) |
This file contains 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
# A batch function which does the ordering and sends an announcement with (all) the ordered job ids in | |
# A function receives that announcment and processes the first job from that list | |
# Each processed job needs to know | |
# * the number of invites sent for that job today | |
# * the number of invites sent to each locum today | |
# While the job doesn't have enough invitations | |
# While there are locums to try to match | |
# Sum up the number of sent invites for this locum and hte number of potential invites waiting to be sent and exit if that number is too high | |
# Try to match the locum to job | |
# Create entry in mongo if the locum matches |
This file contains 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 jobs.models import * | |
import datetime | |
starts_on = datetime.date(2014,1,1) | |
# Update all ongoing jobs which don't have pays_pension but should | |
jobs = Job.objects.filter(status__in=[Job.STATUS_POSTED, Job.STATUS_FILLED, Job.STATUS_STARTED], pays_pension='').exclude(practice__pays_pension='') | |
for job in jobs: | |
job.pays_pension = job.practice.pays_pension | |
job.save() |
This file contains 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
window.addSessions = function() { | |
nl.Store.sessionsCollection.add({'id': 1, 'practice_id': 1, status: 'posted', date: moment('2014-08-18T11:48:08Z'), date_posted: moment('2014-06-12T10:48:08Z')}); | |
nl.Store.sessionsCollection.add({'id': 2, 'practice_id': 2, status: 'posted', date: moment('2014-08-25T10:48:08Z'), date_posted: moment('2014-06-13T10:48:08Z')}); | |
nl.Store.sessionsCollection.add({'id': 3, 'practice_id': 1, status: 'posted', date: moment('2014-08-19T10:48:08Z'), date_posted: moment('2014-06-11T10:48:08Z')}); | |
nl.Store.sessionsCollection.add({'id': 4, 'practice_id': 1, status: 'posted', date: moment('2014-08-18T10:48:08Z'), date_posted: moment('2014-06-06T10:48:08Z'), partapplications: [{'a': 1}]}); | |
nl.Store.sessionsCollection.add({'id': 5, 'practice_id': 1, status: 'posted', date: moment('2014-08-18T10:48:08Z'), date_posted: moment('2014-06-09T10:48:08Z')}); | |
nl.Store.sessionsCollection.add({'id': 6, 'practice_id': 2, status: 'posted', date: moment( |
This file contains 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
### Tox | |
Symlink `.tox` to a folder on the virtual machine to make it run faster / at all | |
### Symlinks | |
Boot machine from windows with `vagrant up` in a shell with ** ADMINISTRATOR ** privledges to enable symlinking | |
Enable symlinks on shared folders by adding the following to `Vagrantfile` | |
v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] | |
v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/src2", "1"] |
This file contains 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
[distutils] | |
index-servers = | |
pypi | |
[pypi] | |
repository: https://pypi.python.org/pypi | |
username: jakul | |
password: XXXXXXXXXX | |
[pypitest] |