Skip to content

Instantly share code, notes, and snippets.

View sgithens's full-sized avatar

Steven Githens sgithens

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<xf:xforms xmlns:xf="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jr="http://openrosa.org/javarosa">
<xf:head>
<?xml version="1.0" encoding="UTF-8"?>
<patient-export-summary>
<patients>
<patient>
<patient-demographic-data>
<name>Azcag Jobwo Agkem</name>
<DOB>Mon Oct 05 00:00:00 IST 1981</DOB>
<healthdistrict>vizag</healthdistrict>
<birthplace>Hyd</birthplace>
<healthcenter>1</healthcenter>
sgithens@sgithens-ThinkPad-X230:~/code/iedea$
: jython27b1/jython -J-cp 'openmrs-core/webapp/target/openmrs/WEB-INF/lib/*:/home/sgithens/.m2/repository/org/apache/tomcat/servlet-api/6.0.32/*:/home/sgithens/.m2/repository/org/mortbay/jetty/jsp-api-2.1/6.1.10/*:/home/sgithens/.m2/repository/org/mortbay/jetty/jsp-2.1/6.1.10/*' -i openmrs-repl.py
>>> Context.openSession()
>>> Context.authenticate("admin","*******")
>>> p = Context.getPatientService().getAllPatients()
>>> p
[Patient#2, Patient#3]
>>> [i.gender for i in p]
[u'M', u'M']
(def atomic-clock (atom 0))
(meditations
"Atoms are like refs"
(= 0 @atomic-clock)
"You can change at the swap meet"
(= 1 (do
(swap! atomic-clock inc)
@atomic-clock))
@sgithens
sgithens / gist:9808928
Created March 27, 2014 14:36
Avocado MySQL Unit Test Output
: python test_suite.py
Creating test database for alias 'default'...
............................F..FF...F.........F....EEE...F..E.......F...F......EEEEEEEEE...FE..EEEEEEEEE..............................FFF......x..x................F.....F..............EE...E.
======================================================================
ERROR: test_instance (tests.cases.events.tests.LogTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/sgithens/code/harvest/avocado/tests/cases/events/tests.py", line 46, in test_instance
self.assertEqual(Log.objects.get(pk=1).content_object, f)
File "/home/sgithens/Envs/avocado-dev/local/lib/python2.7/site-packages/django/db/models/manager.py", line 143, in get
@sgithens
sgithens / gist:9808954
Created March 27, 2014 14:37
Avocado Oracle Unit Test Output
: python test_suite.py
Creating test database for alias 'default'...
Creating test user...
.....................FFFF......FF.............F.E..EEEF....FE...F...EF..E......EEEEEEEEE...F....EEEEEEEE.............................FF........x..u...............ERROR:root:Error updating avocado using default
Traceback (most recent call last):
File "/home/sgithens/Envs/avocado-dev/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 210, in handle_label
self.update_backend(label, using)
File "/home/sgithens/Envs/avocado-dev/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 256, in update_backend
do_update(backend, index, qs, start, end, total, self.verbosity)
File "/home/sgithens/Envs/avocado-dev/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 78, in do_update
" size of a hard tabstop
set tabstop=4
" size of indenting
set shiftwidth=4
" always use spaces instead of tabs
set expandtab
set incsearch
(harvest3)sgithens@sgithens-ThinkPad-X230:~/code/komen-projects/harvest-query-dev$
: harvest init myproject
Setting up project 'myproject'...
- Setting up a virtual environment 'myproject-env'
- Downloading Harvest @ HEAD
--2014-04-03 11:52:03-- https://github.com/cbmi/harvest-template/archive/HEAD.zip
Resolving github.com (github.com)... 192.30.252.128
Connecting to github.com (github.com)|192.30.252.128|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/cbmi/harvest-template/zip/e1ebfaedd2355436bd3983975291c89ad9d63825 [following]
[SNIP]
no previously-included directories found matching 'modeltree/tests'
Running setup.py install for South
Running setup.py install for jsonfield
Running setup.py install for restlib2
no previously-included directories found matching 'tests'
Running setup.py install for django-preserialize
Stevens-MacBook-Pro:universal sgithens$ npm dedupe
npm http GET https://registry.npmjs.org/infusion
npm http GET https://registry.npmjs.org/xmlhttprequest
npm http GET https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/xmlhttprequest
npm http 404 https://registry.npmjs.org/infusion
npm WARN unavoidable conflict commander { '/Users/sgithens/code/gpii/node_modules/universal/node_modules/kettle/node_modules/express/node_modules/commander': '1.3.2',
npm WARN unavoidable conflict '/Users/sgithens/code/gpii/node_modules/universal/node_modules/kettle/node_modules/socket.io-client/node_modules/ws/node_modules/commander': '0.6.1' }
npm WARN unavoidable conflict Not de-duplicating