Skip to content

Instantly share code, notes, and snippets.

View rgaudin's full-sized avatar

rgaudin rgaudin

  • yɛlɛman
  • Bamako, Mali
View GitHub Profile
@rgaudin
rgaudin / formhub_data_importer.py
Created August 30, 2012 16:47
Script to import data from CSV into a formhub Form
#!/usr/bin/env python
# encoding=utf-8
'''
formhub data importer
Automates the submission of formhub XForms from a CSV file,
possibly an export from another formhub form.
Launch with `bulk` argument to trigger bulk submission behavior (only
@rgaudin
rgaudin / build_osx_release.sh
Created March 10, 2012 19:04
Script to generate an OSX release for aria2
#!/bin/bash
# Generate an OSX universal binary (32+64b intel) DMG with Installer & DMG
#
# This script is supposed to be run from the aria2 source directory.
# It has to be run on an OSX 10.6 host with Developer Tools installed.
#
# Additionally, Macports must be installed with the following packages:
#
# autoconf autoconf213 autogen +universal automake coreutils +universal
#!/usr/bin/env python
# encoding=utf-8
# maintainer: rgaudin
'''
YLM fabfile deploying Mali NTD Field Test
Will install the project with all its dependencies
Instructions:
#!/usr/bin/env python
# encoding=utf-8
import random
def gen_data():
''' Generates a valid set of data for the NTD2010 Field Test Forms '''
# set some good faith limits
config!version = 000099042
server!bind!1!port = 80
server!bind!1!tls = 0
server!group = www-data
server!ipv6 = 1
server!keepalive = 1
server!keepalive_max_requests = 500
server!panic_action = /usr/share/cherokee/cherokee-panic
server!pid_file = /var/run/cherokee.pid
server!server_tokens = full
diff --git a/lib/rapidsms/parsers/keyworder.py b/lib/rapidsms/parsers/keyworder.py
index 9bf4133..393ee7c 100644
--- a/lib/rapidsms/parsers/keyworder.py
+++ b/lib/rapidsms/parsers/keyworder.py
@@ -43,7 +43,7 @@ class Keyworder(object):
for token, regex in self.TOKEN_MAP:
str = str.replace("(%s)" % token, regex)
- return re.compile(self.pattern % str, re.IGNORECASE)
+ return re.compile(self.pattern % str, re.IGNORECASE + re.UNICODE)
diff --git a/apps/messaging/static/stylesheets/messaging.css b/apps/messaging/static/stylesheets/messaging.css
index dc21bc5..0135971 100644
--- a/apps/messaging/static/stylesheets/messaging.css
+++ b/apps/messaging/static/stylesheets/messaging.css
@@ -70,13 +70,13 @@
/* dull rows have a background image too, to avoid
* a weird looking gap before anything is checked */
- .recipients tbody tr .check { background: url("../../webui/icons/silk/bullet_white.png") no-repeat 0.5em 50%; }
- .recipients tbody tr.checked .check { background-image: url("../../webui/icons/silk/accept.png"); }
#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
import re
import urllib
from datetime import datetime
from select import select
from SocketServer import ThreadingMixIn
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py
index 529898e..dcac719 100644
--- a/django/db/models/fields/related.py
+++ b/django/db/models/fields/related.py
@@ -405,8 +405,9 @@ def create_many_related_manager(superclass, through=False):
"""Creates a manager that subclasses 'superclass' (which is a Manager)
and adds behavior for many-to-many related objects."""
class ManyRelatedManager(superclass):
- def __init__(self, model=None, core_filters=None, instance=None, symmetrical=None,
- join_table=None, source_col_name=None, target_col_name=None):
diff --git a/apps/webapp/static/stylesheets/layout.css b/apps/webapp/static/stylesheets/layout.css
index 3fba1ad..0f0cfbf 100644
--- a/apps/webapp/static/stylesheets/layout.css
+++ b/apps/webapp/static/stylesheets/layout.css
@@ -125,8 +125,8 @@ div.clear-hack {
/* global tabs sit on the right,
* page-specific tabs sit on the
* left, to draw more attention */
- #tabs { right: 0; }
- #page-tabs { left: 0; }