code
stringlengths
1
1.72M
language
stringclasses
1 value
# Copyright (c) Charl P. Botha, TU Delft # All rights reserved. # See COPYRIGHT for details. # importing this module shouldn't directly cause other large imports # do large imports in the init() hook so that you can call back to the # ModuleManager progress handler methods. """wxpython_kit package driver file. Inser...
Python
medical_image_properties_keywords = [ 'PatientName', 'PatientID', 'PatientAge', 'PatientSex', 'PatientBirthDate', 'ImageDate', 'ImageTime', 'ImageNumber', 'StudyDescription', 'StudyID', 'StudyDate', 'AcquisitionDate', ...
Python
# Copyright (c) Charl P. Botha, TU Delft. # All rights reserved. # See COPYRIGHT for details. """Utility methods for vtk_kit module kit. @author Charl P. Botha <http://cpbotha.net/> """ import vtk class DVOrientationWidget: """Convenience class for embedding orientation widget in any renderwindowinteractor....
Python
# $Id$ """Mixins that are useful for classes using vtk_kit. @author: Charl P. Botha <http://cpbotha.net/> """ from external.vtkPipeline.ConfigVtkObj import ConfigVtkObj from external.vtkPipeline.vtkMethodParser import VtkMethodParser from module_base import ModuleBase from module_mixins import IntrospectModuleMixin ...
Python
# $Id$ """Miscellaneous functions that are part of the vtk_kit. This module is imported by vtk_kit.init() after the rest of the vtk_kit has been initialised. To use these functions in your module code, do e.g.: import moduleKits; moduleKits.vtk_kit.misc.flatterProp3D(obj); @author: Charl P. Botha <http://cpbotha.ne...
Python
# perceptually linear colour scales based on those published by Haim # Levkowitz at http://www.cs.uml.edu/~haim/ColorCenter/ # code by Peter R. Krekel (c) 2009 # modified by Charl Botha to cache lookuptable per range import vtk class ColorScales(): def __init__(self): self.BlueToYellow = {} self....
Python
# $Id$ # importing this module shouldn't directly cause other large imports # do large imports in the init() hook so that you can call back to the # ModuleManager progress handler methods. """vtk_kit package driver file. This performs all initialisation necessary to use VTK from DeVIDE. Makes sure that all VTK clas...
Python
# $Id: __init__.py 1945 2006-03-05 01:06:37Z cpbotha $ # importing this module shouldn't directly cause other large imports # do large imports in the init() hook so that you can call back to the # ModuleManager progress handler methods. """numpy_kit package driver file. Inserts the following modules in sys.modules: ...
Python
import math import numpy epsilon = 1e-12 def abs(v1): return numpy.absolute(v1) def norm(v1): """Given vector v1, return its norm. """ v1a = numpy.array(v1) norm = numpy.sqrt(numpy.sum(v1a * v1a)) return norm def normalise_line(p1, p2): """Given two points, return normal vector, magnitu...
Python
# Copyright (c) Charl P. Botha, TU Delft # All rights reserved. # See COPYRIGHT for details. # importing this module shouldn't directly cause other large imports # do large imports in the init() hook so that you can call back to the # ModuleManager progress handler methods. """geometry_kit package driver file. Inser...
Python
# Copyright (c) Charl P. Botha, TU Delft # All rights reserved. # See COPYRIGHT for details. """sqlite_kit package driver file. With this we make sure that sqlite3 is always packaged. """ VERSION = '' def init(module_manager, pre_import=True): global sqlite3 import sqlite3 global VERSION VERSION = ...
Python
# $Id: __init__.py 1945 2006-03-05 01:06:37Z cpbotha $ # importing this module shouldn't directly cause other large imports # do large imports in the init() hook so that you can call back to the # ModuleManager progress handler methods. """vtktudoss_kit package driver file. Inserts the following modules in sys.modul...
Python
# Copyright (c) Charl P. Botha, TU Delft # All rights reserved. # See COPYRIGHT for details. import ConfigParser import glob import os import sys import time """Top-level __init__ of the module_kits. All .mkd files in the module_kits directory are parsed and their corresponding module_kits are loaded. MKD specify ...
Python
# $Id: __init__.py 1945 2006-03-05 01:06:37Z cpbotha $ # importing this module shouldn't directly cause other large imports # do large imports in the init() hook so that you can call back to the # ModuleManager progress handler methods. """itktudoss_kit package driver file. This driver makes sure that itktudoss has ...
Python
# Copyright (c) Gary Strangman. All rights reserved # # Disclaimer # # This software is provided "as-is". There are no expressed or implied # warranties of any kind, including, but not limited to, the warranties # of merchantability and fittness for a given application. In no event # shall Gary Strangman be liable ...
Python
# Copyright (c) 1999-2000 Gary Strangman; All Rights Reserved. # # This software is distributable under the terms of the GNU # General Public License (GPL) v2, the text of which can be found at # http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise # using this module constitutes acceptance of the t...
Python
# $Id: __init__.py 1945 2006-03-05 01:06:37Z cpbotha $ # importing this module shouldn't directly cause other large imports # do large imports in the init() hook so that you can call back to the # ModuleManager progress handler methods. """stats_kit package driver file. Inserts the following modules in sys.modules: ...
Python
# Copyright (c) 1999-2002 Gary Strangman; All Rights Reserved. # # This software is distributable under the terms of the GNU # General Public License (GPL) v2, the text of which can be found at # http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise # using this module constitutes acceptance of the t...
Python
# $Id: module_index.py 2790 2008-02-29 08:33:14Z cpbotha $ class emp_test: kits = ['vtk_kit'] cats = ['Tests'] keywords = ['test', 'tests', 'testing'] help = \ """Module to test DeVIDE extra-module-paths functionality. """
Python
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase import vtk class emp_test(SimpleVTKClassModuleBase): """This is the minimum you need to wrap a single VTK object. This __doc__ string will be replaced by the __doc__ string of the encapsulated VTK object, i.e. vtkStripper in this case. ...
Python
"""Module to test basic matplotlib functionality. """ import os import unittest import tempfile class MPLTest(unittest.TestCase): def test_figure_output(self): """Test if matplotlib figure can be generated and wrote to disc. """ # make sure the pythonshell is running self._devide_...
Python
"""Module to test graph_editor functionality. """ import os import time import unittest import wx class GraphEditorTestBase(unittest.TestCase): def setUp(self): self._iface = self._devide_app.get_interface() self._ge = self._iface._graph_editor # the graph editor frame is now the main fram...
Python
import sys import unittest class NumPyTest(unittest.TestCase): def test_import_mixing(self): """Test for bug where packaged numpy and installed numpy would conflict, causing errors. """ import numpy try: na = numpy.array([0,0,0]) print na exc...
Python
"""Module to test basic DeVIDE functionality. """ import unittest class BasicVTKTest(unittest.TestCase): def test_vtk_exceptions(self): """Test if VTK has been patched with our VTK error to Python exception patch. """ import vtk a = vtk.vtkXMLImageDataReader() a.Se...
Python
"""Module to test basic DeVIDE functionality. """ import unittest class BasicMiscTest(unittest.TestCase): def test_sqlite3(self): """Test if sqlite3 is available. """ import sqlite3 v = sqlite3.version conn = sqlite3.connect(':memory:') cur = conn.cursor(...
Python
# testing.__init__.py copyright 2006 by Charl P. Botha http://cpbotha.net/ # $Id$ # this drives the devide unit testing. neat huh? import os import time import unittest from testing import misc from testing import basic_vtk from testing import basic_wx from testing import graph_editor from testing import numpy_tests...
Python
"""Module to test basic DeVIDE functionality. """ import unittest class PythonShellTest(unittest.TestCase): def test_python_shell(self): """Test if PythonShell can be opened successfully. """ iface = self._devide_app.get_interface() iface._handler_menu_python_shell(None) se...
Python
# Copyright (c) Charl P. Botha, TU Delft. # All rights reserved. # See COPYRIGHT for details. ################################################################### # the following programmes should either be on your path, or you # should specify the full paths here. # Microsoft utility to rebase files. REBASE = "rebase...
Python
hiddenimports = ['matplotlib.numerix', 'matplotlib.numerix.fft', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.ma', 'matplotlib.numerix.mlab', 'matplotlib.numerix.npyma', 'matplotlib.numerix.random_array', 'matplotlib.backends.backend_wxagg'] print "[...
Python
# this hook is responsible for including everything that the DeVIDE # modules could need. The top-level spec file explicitly excludes # them. import os import sys # normalize path of this file, get dirname hookDir = os.path.dirname(os.path.normpath(__file__)) # split dirname, select everything except the ending "ins...
Python
# so vtktudoss.py uses a list of names to construct the various imports # at runtime, installer doesn't see this. :( import os if os.name == 'posix': hiddenimports = [ 'libvtktudossGraphicsPython', 'libvtktudossWidgetsPython', 'libvtktudossSTLibPython'] else: hiddenimports ...
Python
# miscellaneous imports used by snippets hiddenimports = ['tempfile']
Python
hiddenimports = ['wx.aui', 'wx.lib.mixins'] print "[*] hook-wx.py - HIDDENIMPORTS" print hiddenimports
Python
# so vtktud.py uses a list of names to construct the various imports # at runtime, installer doesn't see this. :( import os if os.name == 'posix': hiddenimports = ['libvtktudCommonPython', 'libvtktudImagingPython', 'libvtktudGraphicsPython', 'libvtktudWidgetsPython'] else: hiddenimport...
Python
# Copyright (c) Charl P. Botha, TU Delft. # All rights reserved. # See COPYRIGHT for details. # RESTRUCTURE: # * remove_binaries (startswith and contains) # * remove_pure (startswith and contains) # NB: stay away from any absolute path dependencies!!! import os import fnmatch import re import sys def helper_remov...
Python
"""Module for independently packaging up whole WrapITK tree. """ import itkConfig import glob import os import shutil import sys # customise the following variables if os.name == 'nt': SO_EXT = 'dll' SO_GLOB = '*.%s' % (SO_EXT,) PYE_GLOB = '*.pyd' # this should be c:/opt/ITK/bin ITK_SO_DIR = os.p...
Python
#!/usr/bin/env python # Copyright (c) Charl P. Botha, TU Delft # All rights reserved. # See COPYRIGHT for details. import re import getopt import mutex import os import re import stat import string import sys import time import traceback import ConfigParser # we need to import this explicitly, else...
Python
# example driver script for offline / command-line processing with DeVIDE # the following variables are magically set in this script: # interface - instance of ScriptInterface, with the following calls: # meta_modules = load_and_realise_network() # execute_network(self, meta_modules) # clear_network(self) # in...
Python
# dummy
Python
# Copyright (c) Charl P. Botha, TU Delft. # All rights reserved. # See COPYRIGHT for details. import wx # todo: this should go away... import string import sys import traceback # todo: remove all VTK dependencies from this file!! def clampVariable(v, min, max): """Make sure variable is on the range [min,max]. R...
Python
# Copyright (c) Charl P. Botha, TU Delft # All rights reserved. # See COPYRIGHT for details. import vtk from module_kits.misc_kit.mixins import SubjectMixin from devide_canvas_object import DeVIDECanvasGlyph import operator import wx # we're going to use this for event handling from module_kits.misc_kit import dprin...
Python
# dummy
Python
# Copyright (c) Charl P. Botha, TU Delft # All rights reserved. # See COPYRIGHT for details. from module_kits.misc_kit.mixins import SubjectMixin import vtk # z-coord of RBB box # when this is 1.0, the box does not appear until a canvas reset has # been done... RBBOX_HEIGHT = 0.9 class UnfilledBlock: """Create ...
Python
class canvasSubject: def __init__(self): self._observers = {} def addObserver(self, eventName, observer): """Add an observer for a particular event. eventName can be one of 'enter', 'exit', 'drag', 'buttonDown' or 'buttonUp'. observer is a callable object that will be ...
Python
from canvasObject import * from canvas import *
Python
from wxPython import wx from canvasSubject import canvasSubject ############################################################################# class canvasObject(canvasSubject): def __init__(self, position): # call parent ctor canvasSubject.__init__(self) self._position = posit...
Python
import wx from canvasSubject import canvasSubject from canvasObject import * class canvas(wx.wxScrolledWindow, canvasSubject): def __init__(self, parent, id = -1, size = wx.wxDefaultSize): # parent 1 ctor wx.wxScrolledWindow.__init__(self, parent, id, wx.wxPoint(0, 0), size, ...
Python
# dummy
Python
# dummy
Python
# Copyright (c) Charl P. Botha, TU Delft. # All rights reserved. # See COPYRIGHT for details. import ConfigParser from ConfigParser import NoOptionError import copy from module_kits.misc_kit.mixins import SubjectMixin from module_manager import PickledModuleState, PickledConnection import os import time import types ...
Python
# Copyright (c) Charl P. Botha, TU Delft. # All rights reserved. # See COPYRIGHT for details. """Module containing base class for devide modules. author: Charl P. Botha <cpbotha@ieee.org> """ ######################################################################### class GenericObject(object): """Generic object ...
Python
# Copyright (c) Charl P. Botha, TU Delft. # All rights reserved. # See COPYRIGHT for details. """ """ import mutex ######################################################################### class SchedulerException(Exception): pass class CyclesDetectedException(SchedulerException): pass ################...
Python
#!/usr/bin/python2.6 # # Simple http server to emulate api.playfoursquare.com import logging import shutil import sys import urlparse import SimpleHTTPServer import BaseHTTPServer class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): """Handle playfoursquare.com requests, for testing.""" def do_GET(self...
Python
#!/usr/bin/python import datetime import sys import textwrap import common from xml.dom import pulldom PARSER = """\ /** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquare.parsers; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.error.FoursquareError; import com.joel...
Python
#!/usr/bin/python """ Pull a oAuth protected page from foursquare. Expects ~/.oget to contain (one on each line): CONSUMER_KEY CONSUMER_KEY_SECRET USERNAME PASSWORD Don't forget to chmod 600 the file! """ import httplib import os import re import sys import urllib import urllib2 import urlparse import user from xml....
Python
#!/usr/bin/python import os import subprocess import sys BASEDIR = '../main/src/com/joelapenna/foursquare' TYPESDIR = '../captures/types/v1' captures = sys.argv[1:] if not captures: captures = os.listdir(TYPESDIR) for f in captures: basename = f.split('.')[0] javaname = ''.join([c.capitalize() for c in basena...
Python
#!/usr/bin/python import logging from xml.dom import minidom from xml.dom import pulldom BOOLEAN = "boolean" STRING = "String" GROUP = "Group" # Interfaces that all FoursquareTypes implement. DEFAULT_INTERFACES = ['FoursquareType'] # Interfaces that specific FoursqureTypes implement. INTERFACES = { } DEFAULT_CLA...
Python
import os, sys, time # usage: parse_log.py log-file [socket-index to focus on] socket_filter = None if len(sys.argv) >= 3: socket_filter = sys.argv[2].strip() if socket_filter == None: print "scanning for socket with the most packets" file = open(sys.argv[1], 'rb') sockets = {} for l in file: ...
Python
# -*- coding: utf-8 -*- import os from setuptools import setup, Library from utp import VERSION sources = [os.path.join("..", "utp.cpp"), os.path.join("..", "utp_utils.cpp")] include_dirs = ["..", os.path.join("..", "utp_config_lib")] define_macros = [] libraries = [] extra_link_args = [] if os.name == "nt...
Python
import os import ctypes import socket import platform from utp.utp_h import * from utp.sockaddr_types import * basepath = os.path.join(os.path.dirname(__file__), "..") if platform.system() == "Windows": utp = ctypes.cdll.LoadLibrary(os.path.join(basepath, "utp.dll")) elif platform.system() == "Darwin": utp = c...
Python
# This module can go away when Python supports IPv6 (meaning inet_ntop and inet_pton on all platforms) # http://bugs.python.org/issue7171 import socket import ctypes from utp.utp_socket import utp # XXX: the exception types vary from socket.inet_ntop def inet_ntop(address_family, packed_ip): if address_f...
Python
import ctypes from utp.sockaddr_types import * # hork if not hasattr(ctypes, "c_bool"): ctypes.c_bool = ctypes.c_byte # Lots of stuff which has to be kept in sync with utp.h... # I wish ctypes had a C header parser. UTP_STATE_CONNECT = 1 UTP_STATE_WRITABLE = 2 UTP_STATE_EOF = 3 UTP_STATE_DESTROYING = 4 # typed...
Python
VERSION = '0.1'
Python
import sys import utp.utp_socket as utp import types import socket from cStringIO import StringIO from zope.interface import implements from twisted.python import failure, log from twisted.python.util import unsignedID from twisted.internet import abstract, main, interfaces, error, base, task from twisted.internet imp...
Python
import ctypes import socket import struct class SOCKADDR(ctypes.Structure): _fields_ = ( ('family', ctypes.c_ushort), ('data', ctypes.c_byte*14), ) LPSOCKADDR = ctypes.POINTER(SOCKADDR) class SOCKET_ADDRESS(ctypes.Structure): _fields_ = ( ('address', LPSOCKADDR), ('le...
Python
''' Module which brings history information about files from Mercurial. @author: Rodrigo Damazio ''' import re import subprocess REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*') def _GetOutputLines(args): ''' Runs an external process and returns its output as a list of lines. @param args: the argume...
Python
#!/usr/bin/python ''' Entry point for My Tracks i18n tool. @author: Rodrigo Damazio ''' import mytracks.files import mytracks.translate import mytracks.validate import sys def Usage(): print 'Usage: %s <command> [<language> ...]\n' % sys.argv[0] print 'Commands are:' print ' cleanup' print ' translate' p...
Python
''' Module which compares languague files to the master file and detects issues. @author: Rodrigo Damazio ''' import os from mytracks.parser import StringsParser import mytracks.history class Validator(object): def __init__(self, languages): ''' Builds a strings file validator. Params: @para...
Python
''' Module for dealing with resource files (but not their contents). @author: Rodrigo Damazio ''' import os.path from glob import glob import re MYTRACKS_RES_DIR = 'MyTracks/res' ANDROID_MASTER_VALUES = 'values' ANDROID_VALUES_MASK = 'values-*' def GetMyTracksDir(): ''' Returns the directory in which the MyTrac...
Python
''' Module which prompts the user for translations and saves them. TODO: implement @author: Rodrigo Damazio ''' class Translator(object): ''' classdocs ''' def __init__(self, language): ''' Constructor ''' self._language = language def Translate(self, string_names): print string_names
Python
''' Module which parses a string XML file. @author: Rodrigo Damazio ''' from xml.parsers.expat import ParserCreate import re #import xml.etree.ElementTree as ET class StringsParser(object): ''' Parser for string XML files. This object is not thread-safe and should be used for parsing a single file at a time...
Python
#!/usr/bin/python #Developed by Florin Nicusor Coada for 216 CR #Based on the udp_chat_server2.py tutorial from professor Christopher Peters import socket HOST = '192.168.1.2' #Defaults to "this machine" IPORT = 50007 #In OPORT = 50008 #Out in_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) ...
Python
##Developed by Florin Nicusor Coada for 216CR ##Based on the tutorial offered by Christopher Peters import sqlite3 as sqlite import SimpleXMLRPCServer ##connect to the database and create a simple users table con = sqlite.connect(":memory:") con.execute("create table users(name varchar primary key, pass varchar, ban ...
Python
#!/usr/bin/python #Developed by Florin Nicusor Coada for 216 CR #Based on the udp_chat_client2.py tutorial from professor Christopher Peters from Tkinter import * import socket,select from login import * import sys HOST = '192.168.1.2' #Server OPORT = 50007 # The same port as used by the server IPORT=50008 #Listeni...
Python
from Tkinter import * import xmlrpclib from time import clock, time server = xmlrpclib.ServerProxy("http://192.168.1.2:8888") def userType(user): return server.userType(user) def newName(oldUname,newUname): return server.newName(oldUname,newUname) def banUser(name): server.banUser(name) class MyDetails...
Python
# This is Python example on how to use Mongoose embeddable web server, # http://code.google.com/p/mongoose # # Before using the mongoose module, make sure that Mongoose shared library is # built and present in the current (or system library) directory import mongoose import sys # Handle /show and /form URIs. def Even...
Python
# Copyright (c) 2004-2009 Sergey Lyubka # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
Python
''' Created on 07/04/2011 @author: Eran_Z IMDB functions, based on Alex's implementations ''' import sys try: import imdb except ImportError: print 'You need to install the IMDbPY package!' sys.exit(1) #a handler/gateway for all IMDB API functions imdbObj = imdb.IMDb() def getLink...
Python
''' Created on 30/03/2011 @author: Eran_Z Utilities ''' def sum(x,y): return x+y
Python
''' Created on 08/04/2011 @author: Eran_Z Google search (num results), based on Dima's implementation currently uses deprecated API ''' import json import urllib #N = 25270000000L #25.27 billion, roughly google's index size. Should be reduced for other engines. N = 1870000000L #roughly the index of the...
Python
''' Created on 29/03/2011 @author: Eran_Z Weighting ''' import search_m from util_m import sum from math import log #Helper functions def __singleNGDWeight(term1, term2): return 0 if term1 == term2 else max(0, 1 - search_m.NGD(term1, term2)) def __singleMutualInformationWeight(term1, term2): ...
Python
import json import urllib def showsome(searchfor): query = urllib.urlencode({'q': searchfor}) url = 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&%s'%query search_response = urllib.urlopen(url) search_results = search_response.read() results = json.loads(search_results) ...
Python
from apiclient.discovery import build def search(searchfor): service = build("customsearch", "v1", developerKey="AIzaSyB1KoWaQxP9_o--plv19-JYDevfdhKFzjs") res = service.cse().list( q=searchfor, cx='017576662512468239146:omuauf_lfve', ).execute() ret = res['queries'][...
Python
#!/usr/bin/env python import glob import logging import os import sys import unittest from trace import fullmodname # Conditional import of cleanup function try: from tests.utils import cleanup except: def cleanup(): pass # Ensure current working directory is in path sys.path.insert(0, os.getcwd()) def build...
Python
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
Python
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
Python
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
Python
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
# Copyright (C) 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
# Copyright 2010 Google Inc. All Rights Reserved. """An OAuth 2.0 client Tools for interacting with OAuth 2.0 protected resources. """ __author__ = 'jcgregorio@google.com (Joe Gregorio)' import copy import datetime import httplib2 import logging import urllib import urlparse try: # pragma: no cover import simple...
Python
# Copyright 2010 Google Inc. All Rights Reserved. """Utilities for OAuth. Utilities for making it easier to work with OAuth 2.0 credentials. """ __author__ = 'jcgregorio@google.com (Joe Gregorio)' import pickle import threading from client import Storage as BaseStorage class Storage(BaseStorage): """Store and ...
Python
# Copyright 2010 Google Inc. All Rights Reserved. """OAuth 2.0 utilities for Django. Utilities for using OAuth 2.0 in conjunction with the Django datastore. """ __author__ = 'jcgregorio@google.com (Joe Gregorio)' import oauth2client import base64 import pickle from django.db import models from oauth2client.client ...
Python
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
#!/usr/bin/python2.4 # # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/python2.4 # # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/python2.4 # # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/python2.4 # # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/python2.4 # -*- coding: utf-8 -*- # # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
Python