Skip to content

Instantly share code, notes, and snippets.

BEGIN MESSAGE.
WWInYrnia7PubRg zExlPB3DYKLVVYS sCf5SCNE90Fuk4Q 7mL6JWGx1e7THjX
GqHy3kd8ruP5IYD WYjhwl8sNBNTCKq 6Xr2MZHgg4N7HTD NeA6r8iaF5rR8a5
9Sdj6tlzkD9P3NN jNNZcwrqqPLhj54 HFIbrOkWXGelmXS rRCJKn21PRDiK0E
1fAIwOmNNee8R86 wNwj94wYGV7bsy4 0K5.
END MESSAGE.

Keybase proof

I hereby claim:

  • I am pld on github.
  • I am pld (https://keybase.io/pld) on keybase.
  • I have a public key ASBaFQSzn_xXVCTaJC89uKNzzTQGctQDEer1CP0sDSobdAo

To claim this, I am signing this object:

@pld
pld / xml_transport_submission
Created September 30, 2014 14:38
XML Submission for an XForm
<?xml version='1.0' ?>
<transportation id="transportation_2011_07_25">
<transport>
<available_transportation_types_to_referral_facility>ambulance bicycle</available_transportation_types_to_referral_facility>
<loop_over_transport_types_frequency>
<ambulance>
<frequency_to_referral_facility>daily</frequency_to_referral_facility>
</ambulance>
<bicycle>
<frequency_to_referral_facility>weekly</frequency_to_referral_facility>
@pld
pld / sample submission format
Last active August 29, 2015 14:07
more complex sample submission format
{
"id": "transportation_2011_07_25",
"submission": {
"transport": {
"available_transportation_types_to_referral_facility": ["ambulance", "bicycle"],
"loop_over_transport_types_frequency": {
"ambulance": {
"frequency_to_referral_facility": "daily"
},
"bicycle": {
@pld
pld / sample submission format
Last active August 29, 2015 14:07
sample submission format
{
"id": "pizza_survey_simple",
"submission": {
"name": "peter"
}
}
@pld
pld / gist:81079ade4b52fafa9e81
Created September 30, 2014 11:03
JSONForm for a simple text field
{
"name": "pizza_survey_simpler",
"title": "pizza_survey_simpler",
"type": "survey",
"default_language": "default",
"id_string": "pizza_survey_simpler",
"sms_keyword": "pizza_survey_simpler",
"children": [
{
"bind": {"required": "yes"},
(ns aggregate.fail
(:use [cascalog.api]
[midje sweet cascalog]))
(defn f [base-input-path source-pattern]
(<- [?a ?b ?c]
((hfs-textline base-input-path :source-pattern source-pattern) ?a ?b ?c)))
(fact?-
[["a" 1 "c1"]
Formhub Syntax help:
* http://formhub.org/syntax/
Example XLSFiles:
* http://formhub.org/formhub_u/
Basic Website Functioning
@pld
pld / local-bamboo-pip-freeze
Created July 2, 2012 18:06
bamboo pip freeze
CherryPy==3.2.2
Fabric==1.4.2
amqplib==1.0.2
anyjson==0.3.1
blessings==1.4
celery==2.5.5
celery-with-mongodb==2.5
cov-core==1.6
coverage==3.5.2
kombu==2.1.8
@pld
pld / gist:2884329
Created June 6, 2012 19:54
python manage.py create_image_thumbnails
python
/home/ubuntu/srv/formhub-ec2/project_env/lib/python2.6/site-packages/registration/models.py:4: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
import sha
Error on attachments/1317631378822.jpg: HTTP Error 404: Not Found
Error on attachments/1317631269344.jpg: HTTP Error 404: Not Found
Error on prayasam/attachments/1330081148811.jpg: [Errno 2] No such file or directory: u'/home/ubuntu/srv/formhub-ec2/formhub/media/prayasam/attachments/1330081148811-lrg.jpg'
Error on kkennedy00/attachments/1318346224159.jpg: [Errno 2] No such file or directory: u'/home/ubuntu/srv/formhub-ec2/formhub/media/kkennedy00/attachments/1318346224159-lrg.jpg'
Traceback (most recent call last):
File "manage.py", line 14, in <module>
execute_manager(settings)