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
TARGETS = 'targets' | |
class AnalysisWindowComplete(Exception): | |
""" | |
Used in coroutine control flow, this is not an error condition. | |
""" | |
def coroutine(func): | |
""" |
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 twisted.internet import defer | |
class DoStuff(): | |
def __init_(self): | |
self.my_stuff = 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
#!/bin/bash | |
# Check if any submodule has been updated in HEAD after a merge (or | |
# pull) or a branch checkout. If so, ask if user wants to run | |
# git-submodule update. | |
# --Chaitanya Gupta | |
SCRIPT_NAME=$(basename "$0") | |
if [[ "$SCRIPT_NAME" = "post-checkout" && "$1" = "$2" || "$3" = "0" ]]; then |
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
; Sample supervisor config file. | |
[unix_http_server] | |
file=/tmp/supervisor.sock ; (the path to the socket file) | |
;chmod=0700 ; sockef file mode (default 0700) | |
;chown=nobody:nogroup ; socket file uid:gid owner | |
;username=user ; (default is no username (open server)) | |
;password=123 ; (default is no password (open server)) | |
[inet_http_server] ; inet (TCP) server disabled by default |
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
###$ bin/pycc --rel res/deploy/r2dm.yml | |
### To Create a data stream and get some data on the stream copy this and use %paste | |
from interface.services.dm.ipubsub_management_service import PubsubManagementServiceClient | |
pmsc = PubsubManagementServiceClient(node=cc.node) | |
stream_id = pmsc.create_stream(name='pfoo') | |
pid = cc.spawn_process(name='ctd_test',module='ion.processes.data.example_data_producer',cls='ExampleDataProducer',config={'process':{'stream_id':stream_id}}) | |
pid = cc.spawn_process(name='ctd_test',module='ion.processes.data.stream_granule_logger',cls='StreamGranuleLogger',config={'process':{'stream_id':stream_id}}) |
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 interface.objects import DeliveryMode, UserInfo | |
from pyon.event.event import EventPublisher | |
#--------------------------------------------------------------------------------- | |
# Create email notification | |
#--------------------------------------------------------------------------------- | |
rr = pn.resource_registry |
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
system: | |
smtp: True | |
# This bit is not needed for smtp, but it keeps pyon from complaining about not having a privileged connection | |
container: | |
messaging: | |
server: | |
primary: amqp | |
priviledged: amqp | |
# ---------------------------------------------------------------------------------- |
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
Query: declare namespace gmd="http://www.isotc211.org/2005/gmd"; declare namespace gco="http://www.isotc211.org/2005/gco"; declare namespace gmi="http://www.isotc211.org/2005/gmi"; declare namespace gml="http://www.opengis.net/gml"; declare namespace xs="http://www.w3.org/2001/XMLSchema"; declare function local:FreeTextQueryFunction($sequences, $textsearch) { let $searchTerms := tokenize($textsearch,'\s+') for $val in $sequences where ($val//text() contains text {$searchTerms} all using fuzzy ) return$val }; declare function local:GeoSpatialWithinQueryFunction($sequences, $west, $east, $north, $south) { for $val in $sequences let $bbox := $val//gmd:EX_GeographicBoundingBox let $westB := $bbox/gmd:westBoundLongitude/gco:Decimal let $eastB := $bbox/gmd:eastBoundLongitude/gco:Decimal let $southB := $bbox/gmd:southBoundLatitude/gco:Decimal let $northB := $bbox/gmd:northBoundLatitude/gco:Decimal where ($west <= $westB and $east >= $eastB and $south <= $southB and $north >= $northB) return $val }; declare function |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- ================================================== | |
** COMMENTS on namespace specifications: | |
- gml: using an unversioned namespace has been confirmed to be ok; | |
the om 1.0 schema defines GML 3.1.1 as the version used | |
================================================== --> | |
<om:ObservationCollection | |
xmlns:om="http://www.opengis.net/om/1.0" | |
xmlns:gml="http://www.opengis.net/gml" | |
xmlns:swe="http://www.opengis.net/swe/1.0.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
from exceptions import StopIteration, GeneratorExit | |
class WithThis(object): | |
""" | |
Open is a built in - can't override __exit__ or subclass it so wrap it :-( | |
""" | |
def __init__(self,this=None): |
OlderNewer