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 amqplib import client_0_8 as amqp | |
from amq_config import connection_params | |
import logging | |
logger = logging.getLogger() | |
DEFAULT_EXCHANGE = 'ngt.direct' | |
# Open the connection to RabitMQ | |
connection = ampq.Connection(**connection_params) |
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
class AmqpServiceWrapper(object): | |
''' | |
A wrapper class that takes care of the business of initialization: | |
- Creates an RpcChannel with the given parameters | |
- Instantiates a protobuf service of the given class | |
- Delegats further attribute access to the Service instance. | |
''' | |
class ParameterMissing(Exception): | |
pass |
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
def CallMethod(self, method_descriptor, rpc_controller, | |
request, response_class, done): | |
"""Calls the method identified by the descriptor. | |
Call the given method of the remote service. The signature of this | |
procedure looks the same as Service.CallMethod(), but the requirements | |
are less strict in one important way: the request object doesn't have to | |
be of any specific class as long as its descriptor is method.input_type. | |
""" | |
rpc_controller.Reset() |
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
def sizeof_human(numbytes): | |
''' Human-readable size strings ''' | |
assert numbytes >= 0 | |
for x in ['bytes','KB','MB','GB','TB','PB']: | |
if numbytes < 1024.0: | |
return "%3.2f%s" % (numbytes, x) | |
numbytes /= 1024.0 | |
else: | |
return "Exabytes!" |
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
def sizeof_human(numbytes): | |
''' Human-readable size strings ''' | |
if numbytes < 0: # urlretrieve passes -1 for totalsize if it can't get the filesize from the server | |
return '???' | |
for x in ['bytes','KB','MB','GB','TB','PB']: | |
if numbytes < 1024.0: | |
return "%3.2f%s" % (numbytes, x) | |
numbytes /= 1024.0 | |
else: |
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
#!/usr/bin/env python | |
import sys, os, os.path | |
import subprocess | |
from subprocess import Popen, PIPE | |
import shlex | |
import traceback | |
import urlparse | |
import urllib | |
DEFAULT_TMP_DIR = '/scratch/tmp' |
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 | |
### | |
# Execute an isis command in a shell with the necessary | |
# environment variables set. | |
### | |
NEBULA_ISIS_ROOT="/big/packages/isis3/isis" | |
LOCAL_ISIS_ROOT="${HOME}/apps/isis3" |
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
// __BEGIN_LICENSE__ | |
// Copyright (C) 2006-2010 United States Government as represented by | |
// the Administrator of the National Aeronautics and Space Administration. | |
// All Rights Reserved. | |
// __END_LICENSE__ | |
#include <vw/Plate/PlateFile.h> | |
#include <vw/Plate/TileManipulation.h> | |
using namespace vw; |
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
import sys, os | |
import optparse | |
import glob | |
import json | |
import time | |
import zipfile | |
import kmlengine | |
import kmldom | |
from kmlengine import Bbox |
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
moon/apollo/audio/a11/plaque.mp3 | |
moon/apollo/audio/a15/a15a1065723.mp3 | |
moon/apollo/image_archive/Apollo/a11/A11_MP.SampleDoc2FS.gif | |
moon/apollo/image_archive/Apollo/a11/A11_MP.SampleDoc2FS.jpg | |
moon/apollo/image_archive/Apollo/a11/AS11-40-5850HR.jpg | |
moon/apollo/image_archive/Apollo/a11/AS11-40-5875HR.jpg | |
moon/apollo/image_archive/Apollo/a11/AS11-40-5877HR.jpg | |
moon/apollo/image_archive/Apollo/a11/AS11-40-5899HR.jpg | |
moon/apollo/image_archive/Apollo/a11/AS11-40-5907HR.jpg | |
moon/apollo/image_archive/Apollo/a11/AS11-40-5916HR.jpg |
OlderNewer