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
if __name__ == '__main__': | |
print('a') | |
# check PCTs are consistent | |
print(set(PCT_TO_CCG.keys()).difference(set(PCTS))) | |
print(set(PCTS).difference(PCT_TO_CCG.keys())) | |
# check CCGs are consistent | |
# print(set(CCGS).difference(PCT_TO_CCG.values())) | |
print(set(PCT_TO_CCG.values()).difference(set(CCGS))) |
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
pns = PhoneNumber.objects.filter(content_type=38L).order_by('object_id').values_list('object_id', flat=True) | |
pns2 = [(key, len(list(group))) for key, group in groupby(pns)] | |
[(key, freq) for key, freq in pns2 if freq> 2] | |
3 | |
31 | |
38 | |
pns = Address.objects.filter(content_type=38).order_by('object_id').values_list('object_id', flat=True) |
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
if numbers.count() > 0: | |
phone_no_1 = numbers[0] | |
else: | |
phone_no_1 = PhoneNumber() | |
phone_no_1.content_object = self.instance.user | |
phone_no_1.number = self.cleaned_data['phone_no_1'] | |
# ensure this one is marked as the default one | |
phone_no_1.is_default = True |
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
> db.xxx.insert({'colours':['red']}) | |
> db.xxx.insert({'colours':['red']}) | |
> db.xxx.insert({'colours':['blue']}) | |
> db.xxx.insert({'colours':['blue', 'red']}) | |
> db.xxx.insert({'colours':['green']}) | |
> db.xxx.find({ $or: [{"colours": {$in: ['red']}}}] }).count() | |
Wed Apr 9 15:47:41.383 SyntaxError: Unexpected token } | |
> db.xxx.find({ $or: [{"colours": {$in: ['red']}}] }).count() | |
3 | |
> db.xxx.find({ $or: [{"colours": {$in: ['blue']}}] }).count() |
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
db.remove({'id': 1000}) | |
db.remove({'id': 7054}) | |
db.remove({'id': 7055}) | |
db.remove({'id': 7056}) | |
db.remove({'id': 7713}) | |
db.remove({'id': 8045}) | |
db.remove({'id': 8133}) | |
db.remove({'id': 8589}) | |
db.remove({'id': 8604}) | |
db.remove({'id': 8631}) |
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
(networklocum)administrator@vagrant-craig:/src/networklocum/networklocum$ tail -f /var/log/nl-networklocum.log | |
File "/home/administrator/.virtualenvs/networklocum/local/lib/python2.7/site-packages/requests/api.py", line 44, in request | |
return session.request(method=method, url=url, **kwargs) | |
File "/home/administrator/.virtualenvs/networklocum/local/lib/python2.7/site-packages/requests/sessions.py", line 279, in request | |
resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies) | |
File "/home/administrator/.virtualenvs/networklocum/local/lib/python2.7/site-packages/requests/sessions.py", line 374, in send | |
r = adapter.send(request, **kwargs) | |
File "/home/administrator/.virtualenvs/networklocum/local/lib/python2.7/site-packages/requests/adapters.py", line 209, in send | |
raise ConnectionError(e) | |
ConnectionError: HTTPSConnectionPool(host='connect.stripe.com', port=443): Max retries exceeded with url: /oauth/token (Caused by <class 'socket.gaierror'>: [Errno |
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
<html><head><script src="https://js.stripe.com/v1/"></script><script src="/v3/checkout/desktop.js?version=5OyUDUGyG0xeMH4JaPbJjQ"></script><script src="/js/raven.min.js?version=l0KqNMHa_QhUOamdDvGk-A"></script><link rel="stylesheet" href="/v3/checkout/desktop.css?version=hvwqnmNhaMPYEMeoD4oDFQ"> | |
<meta charset="utf-8"> | |
<title>Stripe Checkout</title> | |
<meta name="viewport" content="user-scalable=no,width=device-width,initial-scale=1,maximum-scale=1"> | |
<style> | |
.stripeErrorMessage { | |
position: absolute; | |
top: 160px; | |
left: 40px; |
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
<!DOCTYPE html> | |
<!--[if lt IE 7 ]> <html class="ie6 "> <![endif]--> | |
<!--[if IE 7 ]> <html class="ie7 "> <![endif]--> | |
<!--[if IE 8 ]> <html class="ie8 "> <![endif]--> | |
<!--[if IE 9 ]> <html class="ie9 "> <![endif]--> | |
<!--[if (gt IE 9)|!(IE)]><!--> <html class=""> <!--<![endif]--> | |
<head><script type="text/javascript">var NREUMQ=NREUMQ||[];NREUMQ.push(["mark","firstbyte",new Date().getTime()]);</script> | |
<!--roslin--> |
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
[DEBUG ] 2014-05-21 02:26:28,625 - Making GET request to https://api.networklocum.com/0.1/i/job/6347 | |
[DEBUG ] 2014-05-21 02:26:28,837 - Making GET request to https://api.networklocum.com/0.1/i/job/?practice_id=133 | |
[DEBUG ] 2014-05-21 02:26:29,690 - Using cache for: ['get_from_api', 'i/job/6347'] | |
[INFO ] 2014-05-21 02:26:29,691 - Start sending push notifications | |
[INFO ] 2014-05-21 02:26:29,767 - Logging in to appcelerator | |
[DEBUG ] 2014-05-21 02:26:31,847 - Sent to users 535e337115d827323018d585,518b6614ce217f096b0d5879,5217a6e58839410b280267b5,518d3e4b9ff9ed15b01039a3,52b8cf9d75b6650b5801442d,5339a90315d8270b5b1c3d07,518a883ba49ecc413b0c27f0,519160108700380b3f1a5342,523d987a2ada000b300454c0,5217afb725e74b0b24027443,5218aba24f59ce0b0402a9ba,5189808b8700380b3f0e191f,5193407da49ecc4145197793,518a47b092512952b00b9c9f,518ad19b9ff9ed15b90ca015,518cd45ca49ecc413b0f9ab9,51b1dd7ace217f75ae22bba3,51c1f4e7b1a7840b3e08bcbd,521bd2d3d3bde00af90383aa,518ae44e92512952b90cb268,5189e290a49ecc41450b1274,518a14ea9ff9ed15b |
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
May 20 17:34:11 roslin nl-invite_test_locums.log: [DEBUG ] 2014-05-20 17:34:11,235 - Showed locum Omotayo Adeniyi to Sarah Haider at Haiderian Medical Centre for job # 6346. | |
May 20 17:34:11 roslin nl-invite_test_locums.log: [DEBUG ] 2014-05-20 17:34:11,236 - Showed locum Yaneez Mohamadhosen to Sarah Haider at Haiderian Medical Centre for job # 6346. | |
May 20 17:34:11 roslin nl-invite_test_locums.log: [DEBUG ] 2014-05-20 17:34:11,236 - Showed locum Troy Cartwright to Sarah Haider at Haiderian Medical Centre for job # 6346. | |
May 20 17:34:11 roslin nl-invite_test_locums.log: [DEBUG ] 2014-05-20 17:34:11,237 - Showed locum Olujide Soremi to Sarah Haider at Haiderian Medical Centre for job # 6346. | |
May 21 02:26:19 roslin nl-invite_test_locums.log: [DEBUG ] 2014-05-21 02:26:19,130 - Showed locum Shirin Lakhani to Sarah Haider at Haiderian Medical Centre for job # 6347. | |
May 21 02:26:19 roslin nl-invite_test_locums.log: [DEBUG ] 2014-05-21 02:26:19,231 - Showed locum Hina Khan to Sarah Haider at Haiderian Med |
OlderNewer