code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
#!/usr/bin/python2.4 # # 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 l...
[ [ 8, 0, 0.0519, 0.0182, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0649, 0.0026, 0, 0.66, 0.0625, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0701, 0.0026, 0, 0.66,...
[ "\"\"\"Model objects for requests and responses.\n\nEach API may support one or more serializations, such\nas JSON, Atom, etc. The model classes are responsible\nfor converting between the wire format and the Python\nobject representation.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import...
# 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...
[ [ 8, 0, 0.2619, 0.0635, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3175, 0.0159, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.3492, 0.0159, 0, 0.66, ...
[ "\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 1.0 credentials.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import pickle", "import threading", "from apiclient.oauth import Storage as BaseStorage", "class Storage(BaseStorage):\n \"\"\"Store and retr...
# 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...
[ [ 1, 0, 0.2679, 0.0179, 0, 0.66, 0, 629, 0, 1, 0, 0, 629, 0, 0 ], [ 1, 0, 0.2857, 0.0179, 0, 0.66, 0.2, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 1, 0, 0.3036, 0.0179, 0, 0.6...
[ "import apiclient", "import base64", "import pickle", "from django.db import models", "class OAuthCredentialsField(models.Field):\n\n __metaclass__ = models.SubfieldBase\n\n def db_type(self):\n return 'VARCHAR'\n\n def to_python(self, value):", " __metaclass__ = models.SubfieldBase", " def db_t...
# 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...
[ [ 8, 0, 0.1259, 0.037, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1556, 0.0074, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1704, 0.0074, 0, 0.66, ...
[ "\"\"\"Utilities for Google App Engine\n\nUtilities for making it easier to use the\nGoogle API Client for Python on Google App Engine.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import pickle", "from google.appengine.ext import db", "from apiclient.oauth import OAuthCredentials", "...
#!/usr/bin/python2.4 # # 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 l...
[ [ 8, 0, 0.1545, 0.0407, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.187, 0.0081, 0, 0.66, 0.0769, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2114, 0.0081, 0, 0.66, ...
[ "\"\"\"Errors for the library.\n\nAll exceptions defined by the library\nshould be defined in this file.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "from oauth2client.anyjson import simplejson", "class Error(Exception):\n \"\"\"Base error for this module.\"\"\"\n pass", " \"\"\"Base...
__version__ = "1.0c2"
[ [ 14, 0, 1, 1, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "__version__ = \"1.0c2\"" ]
# 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...
[ [ 8, 0, 0.1205, 0.1452, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2046, 0.0033, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2112, 0.0033, 0, 0.66, ...
[ "\"\"\"Schema processing for discovery based APIs\n\nSchemas holds an APIs discovery schemas. It can return those schema as\ndeserialized JSON objects, or pretty print them as prototype objects that\nconform to the schema.\n\nFor example, given the schema:", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", ...
# 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...
[ [ 8, 0, 0.5312, 0.1562, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.6562, 0.0312, 0, 0.66, 0.5, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 7, 0, 0.875, 0.2812, 0, 0.66, ...
[ "\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "try: # pragma: no cover\n import simplejson\nexcept ImportError: # pragma: no cover\n try:\n # Try to import from...
# Early, and incomplete implementation of -04. # import re import urllib RESERVED = ":/?#[]@!$&'()*+,;=" OPERATOR = "+./;?|!@" EXPLODE = "*+" MODIFIER = ":^" TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE) VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part...
[ [ 1, 0, 0.0204, 0.0068, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0272, 0.0068, 0, 0.66, 0.0833, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 14, 0, 0.0408, 0.0068, 0, ...
[ "import re", "import urllib", "RESERVED = \":/?#[]@!$&'()*+,;=\"", "OPERATOR = \"+./;?|!@\"", "EXPLODE = \"*+\"", "MODIFIER = \":^\"", "TEMPLATE = re.compile(r\"{(?P<operator>[\\+\\./;\\?|!@])?(?P<varlist>[^}]+)}\", re.UNICODE)", "VAR = re.compile(r\"^(?P<varname>[^=\\+\\*:\\^]+)((?P<explode>[\\+\\*])...
#!/usr/bin/env python # Copyright (c) 2010, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this l...
[ [ 8, 0, 0.1818, 0.0267, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2032, 0.0053, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 3, 0, 0.2219, 0.0107, 0, 0.66, ...
[ "\"\"\"Module to enforce different constraints on flags.\n\nA validator represents an invariant, enforced over a one or more flags.\nSee 'FLAGS VALIDATORS' in gflags.py's docstring for a usage manual.\n\"\"\"", "__author__ = 'olexiy@google.com (Olexiy Oryeshko)'", "class Error(Exception):\n \"\"\"Thrown If val...
"""SocksiPy - Python SOCKS module. Version 1.00 Copyright 2006 Dan-Haim. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
[ [ 8, 0, 0.0365, 0.0708, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 8, 0, 0.0845, 0.0205, 0, 0.66, 0.04, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0982, 0.0023, 0, 0.66, ...
[ "\"\"\"SocksiPy - Python SOCKS module.\nVersion 1.00\n\nCopyright 2006 Dan-Haim. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n1. Redistributions of source code must retain the above copyright ...
""" iri2uri Converts an IRI to a URI. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __version__ = "1.0.0" __license__ = "MIT" __history__ = """ """ import urlparse # Convert an IRI to a URI following the rules in RFC 3987 # # The characte...
[ [ 8, 0, 0.0318, 0.0545, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0636, 0.0091, 0, 0.66, 0.0909, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0727, 0.0091, 0, 0.66...
[ "\"\"\"\niri2uri\n\nConverts an IRI to a URI.\n\n\"\"\"", "__author__ = \"Joe Gregorio (joe@bitworking.org)\"", "__copyright__ = \"Copyright 2006, Joe Gregorio\"", "__contributors__ = []", "__version__ = \"1.0.0\"", "__license__ = \"MIT\"", "__history__ = \"\"\"\n\"\"\"", "import urlparse", "escape_...
print "Content-Type: text/html\n\n" #print "Content-Type: text/plain\n\n" #mfc [ Memento Frequency Change] from urllib2 import urlopen, Request,URLError,HTTPError import cgi # to read parameters import time import csv def archiveIt(url): user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.10) Gec...
[ [ 8, 0, 0.0133, 0.0133, 0, 0.66, 0, 535, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.0667, 0.0133, 0, 0.66, 0.125, 345, 0, 4, 0, 0, 345, 0, 0 ], [ 1, 0, 0.08, 0.0133, 0, 0.66,...
[ "print(\"Content-Type: text/html\\n\\n\")", "from urllib2 import urlopen, Request,URLError,HTTPError", "import cgi # to read parameters", "import time", "import csv", "def archiveIt(url):\n\tuser_agent = 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.10) Gecko/20100504 Firefox/3.5.10 (.NET CLR ...
#!/usr/bin/env python # # main.py - Card Game Launcher Script # # Copyright 2009 Matthew Brush <mbrush@leftclick.ca> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Soft...
[ [ 1, 0, 0.0909, 0.0043, 0, 0.66, 0, 87, 0, 1, 0, 0, 87, 0, 0 ], [ 1, 0, 0.0952, 0.0043, 0, 0.66, 0.1429, 515, 0, 1, 0, 0, 515, 0, 0 ], [ 1, 0, 0.0996, 0.0043, 0, 0....
[ "import pygame", "from pygame.locals import *", "from deckofcards import *", "from playingcard import PreviewCard", "def main():\n \"\"\" Main game function \"\"\"\n \n # init lib and screen\n pygame.init()\n screen = pygame.display.set_mode((1024,768))\n pygame.display.set_caption('Card G...
#!/usr/bin/env python # # main.py - Card Game Launcher Script # # Copyright 2009 Matthew Brush <mbrush@leftclick.ca> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Soft...
[ [ 1, 0, 0.0909, 0.0043, 0, 0.66, 0, 87, 0, 1, 0, 0, 87, 0, 0 ], [ 1, 0, 0.0952, 0.0043, 0, 0.66, 0.1429, 515, 0, 1, 0, 0, 515, 0, 0 ], [ 1, 0, 0.0996, 0.0043, 0, 0....
[ "import pygame", "from pygame.locals import *", "from deckofcards import *", "from playingcard import PreviewCard", "def main():\n \"\"\" Main game function \"\"\"\n \n # init lib and screen\n pygame.init()\n screen = pygame.display.set_mode((1024,768))\n pygame.display.set_caption('Card G...
# coding=UTF-8 from handlers.base_handler import BaseHandler class AdSelectType(BaseHandler): def get(self): template_values = {} template_values['pageTitle'] = 'SeminovosES - Criacao de Anuncio' self.RenderTemplate('ad_select_type.html', template_values)
[ [ 1, 0, 0.3, 0.1, 0, 0.66, 0, 327, 0, 1, 0, 0, 327, 0, 0 ], [ 3, 0, 0.75, 0.6, 0, 0.66, 1, 99, 0, 1, 0, 0, 94, 0, 1 ], [ 2, 1, 0.85, 0.4, 1, 0.25, 0, 607, ...
[ "from handlers.base_handler import BaseHandler", "class AdSelectType(BaseHandler):\n\n def get(self):\n template_values = {}\n template_values['pageTitle'] = 'SeminovosES - Criacao de Anuncio'\n self.RenderTemplate('ad_select_type.html', template_values)", " def get(self):\n template_values = {}\n...
# coding=UTF-8 import cgi import json import re from datetime import datetime from common.constants import * from common.custom_exceptions import UnexpectedValueException from common.db_models import Advertisement from common.db_models import Brand from common.db_models import Car from common.db_models import FuelTy...
[ [ 1, 0, 0.0092, 0.0031, 0, 0.66, 0, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.0123, 0.0031, 0, 0.66, 0.0435, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 1, 0, 0.0154, 0.0031, 0, ...
[ "import cgi", "import json", "import re", "from datetime import datetime", "from common.constants import *", "from common.custom_exceptions import UnexpectedValueException", "from common.db_models import Advertisement", "from common.db_models import Brand", "from common.db_models import Car", "fro...
# coding=UTF-8 from common.constants import * from common.db_models import Advertisement from common.db_models import Vehicle from handlers.base_handler import BaseHandler from handlers.populate import Populate NUM_PROMOTED_PER_LINE = 3 NUM_PROMOTED_LINES = 3 class HomeHandler(BaseHandler): def GetPromotedAds(se...
[ [ 1, 0, 0.0625, 0.0208, 0, 0.66, 0, 258, 0, 1, 0, 0, 258, 0, 0 ], [ 1, 0, 0.0833, 0.0208, 0, 0.66, 0.1429, 966, 0, 1, 0, 0, 966, 0, 0 ], [ 1, 0, 0.1042, 0.0208, 0, ...
[ "from common.constants import *", "from common.db_models import Advertisement", "from common.db_models import Vehicle", "from handlers.base_handler import BaseHandler", "from handlers.populate import Populate", "NUM_PROMOTED_PER_LINE = 3", "NUM_PROMOTED_LINES = 3", "class HomeHandler(BaseHandler):\n\n...
# coding=UTF-8 import re from common.constants import * from common.db_models import Advertisement from common.db_models import City from common.db_models import Vehicle from common.rpc_lib import AjaxRpcResponse from handlers.base_handler import BaseHandler class CreateAd(BaseHandler): def RenderPage(self): ...
[ [ 1, 0, 0.0278, 0.0093, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0463, 0.0093, 0, 0.66, 0.1429, 258, 0, 1, 0, 0, 258, 0, 0 ], [ 1, 0, 0.0556, 0.0093, 0, ...
[ "import re", "from common.constants import *", "from common.db_models import Advertisement", "from common.db_models import City", "from common.db_models import Vehicle", "from common.rpc_lib import AjaxRpcResponse", "from handlers.base_handler import BaseHandler", "class CreateAd(BaseHandler):\n\n de...
# coding=UTF-8 from common.db_models import Image from handlers.base_handler import BaseHandler class ImageHandler(BaseHandler): def get(self): imgId = self.GetOptionalInt('img') if imgId: image = Image.get_by_id(imgId) if image: self.response.headers['Content-Type'] = 'image/png' ...
[ [ 1, 0, 0.2143, 0.0714, 0, 0.66, 0, 966, 0, 1, 0, 0, 966, 0, 0 ], [ 1, 0, 0.2857, 0.0714, 0, 0.66, 0.5, 327, 0, 1, 0, 0, 327, 0, 0 ], [ 3, 0, 0.6786, 0.5714, 0, 0.6...
[ "from common.db_models import Image", "from handlers.base_handler import BaseHandler", "class ImageHandler(BaseHandler):\n def get(self):\n imgId = self.GetOptionalInt('img')\n if imgId:\n image = Image.get_by_id(imgId)\n if image:\n self.response.headers['Content-Type'] = 'image/png'\n ...
# coding=UTF-8 import re from common.constants import * from common.db_models import Advertisement from common.db_models import Optional from common.db_models import Vehicle from common.rpc_lib import AjaxRpcResponse from handlers.base_handler import BaseHandler NUM_COLUMNS = 3 class AdPage(BaseHandler): def ge...
[ [ 1, 0, 0.0857, 0.0286, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.1429, 0.0286, 0, 0.66, 0.125, 258, 0, 1, 0, 0, 258, 0, 0 ], [ 1, 0, 0.1714, 0.0286, 0, 0...
[ "import re", "from common.constants import *", "from common.db_models import Advertisement", "from common.db_models import Optional", "from common.db_models import Vehicle", "from common.rpc_lib import AjaxRpcResponse", "from handlers.base_handler import BaseHandler", "NUM_COLUMNS = 3", "class AdPag...
# coding=UTF-8 from common.constants import * from common.db_models import Advertisement from common.db_models import Brand from common.db_models import Model from common.db_models import Vehicle from common.db_models import Vehicle from common.rpc_lib import AjaxRpcResponse from handlers.base_handler import BaseHandl...
[ [ 1, 0, 0.125, 0.0417, 0, 0.66, 0, 258, 0, 1, 0, 0, 258, 0, 0 ], [ 1, 0, 0.1667, 0.0417, 0, 0.66, 0.125, 966, 0, 1, 0, 0, 966, 0, 0 ], [ 1, 0, 0.2083, 0.0417, 0, 0....
[ "from common.constants import *", "from common.db_models import Advertisement", "from common.db_models import Brand", "from common.db_models import Model", "from common.db_models import Vehicle", "from common.db_models import Vehicle", "from common.rpc_lib import AjaxRpcResponse", "from handlers.base_...
# coding=UTF-8 import cgi import os import jinja2 import webapp2 from google.appengine.ext import ndb from common.constants import * from common.custom_exceptions import UnexpectedValueException #------------------------------------------------------------------------------- # Presentation helpers JINJA_ENVIRONME...
[ [ 1, 0, 0.0137, 0.0046, 0, 0.66, 0, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.0183, 0.0046, 0, 0.66, 0.05, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0274, 0.0046, 0, 0....
[ "import cgi", "import os", "import jinja2", "import webapp2", "from google.appengine.ext import ndb", "from common.constants import *", "from common.custom_exceptions import UnexpectedValueException", "JINJA_ENVIRONMENT = jinja2.Environment(\n loader=jinja2.FileSystemLoader(os.path.join(\n ...
# coding=UTF-8 from common.constants import * from handlers.base_handler import BaseHandler class LoginHandler(BaseHandler): def get(self): target = self.GetEscapedFormField('target') template_values = {} template_values['pageTitle'] = 'SeminovosES - Login' template_values['nextPage'] = target ...
[ [ 1, 0, 0.2667, 0.0667, 0, 0.66, 0, 258, 0, 1, 0, 0, 258, 0, 0 ], [ 1, 0, 0.3333, 0.0667, 0, 0.66, 0.5, 327, 0, 1, 0, 0, 327, 0, 0 ], [ 3, 0, 0.7667, 0.5333, 0, 0.6...
[ "from common.constants import *", "from handlers.base_handler import BaseHandler", "class LoginHandler(BaseHandler):\n\n def get(self):\n target = self.GetEscapedFormField('target')\n template_values = {}\n template_values['pageTitle'] = 'SeminovosES - Login'\n template_values['nextPage'] = target\...
"""One-line documentation for admin module. A detailed description of admin. """ import cgi import time import webapp2 from common.db_models import UF from common.db_models import City MAIN_PAGE_HTML = """\ <html> <body> <form action="/cagao/registrar" method="post"> <h2>Cadastro de estado</h2> <l...
[ [ 8, 0, 0.0391, 0.0625, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0938, 0.0156, 0, 0.66, 0.125, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.1094, 0.0156, 0, 0.66,...
[ "\"\"\"One-line documentation for admin module.\n\nA detailed description of admin.\n\"\"\"", "import cgi", "import time", "import webapp2", "from common.db_models import UF", "from common.db_models import City", "MAIN_PAGE_HTML = \"\"\"\\\n<html>\n <body>\n <form action=\"/cagao/registrar\" method=...
# coding=UTF-8 import cgi import time import webapp2 from google.appengine.ext import ndb from common.constants import * from common.db_models import Advertisement from common.db_models import Brand from common.db_models import Car from common.db_models import City from common.db_models import FuelType from common.d...
[ [ 1, 0, 0.0048, 0.0016, 0, 0.66, 0, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.0064, 0.0016, 0, 0.66, 0.0333, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.008, 0.0016, 0, 0...
[ "import cgi", "import time", "import webapp2", "from google.appengine.ext import ndb", "from common.constants import *", "from common.db_models import Advertisement", "from common.db_models import Brand", "from common.db_models import Car", "from common.db_models import City", "from common.db_mode...
import webapp2 from common.constants import * from handlers.admin import AdminHome from handlers.ad_page import AdPage from handlers.ad_select_type import AdSelectType from handlers.create_ad import CreateAd from handlers.image import ImageHandler from handlers.home import HomeHandler from handlers.login import Login...
[ [ 1, 0, 0.037, 0.037, 0, 0.66, 0, 123, 0, 1, 0, 0, 123, 0, 0 ], [ 1, 0, 0.1111, 0.037, 0, 0.66, 0.0833, 258, 0, 1, 0, 0, 258, 0, 0 ], [ 1, 0, 0.1481, 0.037, 0, 0.66...
[ "import webapp2", "from common.constants import *", "from handlers.admin import AdminHome", "from handlers.ad_page import AdPage", "from handlers.ad_select_type import AdSelectType", "from handlers.create_ad import CreateAd", "from handlers.image import ImageHandler", "from handlers.home import HomeHa...
# coding=UTF-8 import json class AjaxRpcResponse: def __init__(self): self.data = {} self.data['success'] = True self.data['invalidFields'] = [] self.data['ndbObjects'] = {} self.data['formParams'] = {} def success(self): return self.data['success'] def setSuccess(self, success): ...
[ [ 1, 0, 0.0789, 0.0263, 0, 0.66, 0, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 3, 0, 0.5526, 0.8684, 0, 0.66, 1, 956, 0, 9, 0, 0, 0, 0, 2 ], [ 2, 1, 0.25, 0.1579, 1, 0.59, ...
[ "import json", "class AjaxRpcResponse:\n\n def __init__(self):\n self.data = {}\n self.data['success'] = True\n self.data['invalidFields'] = []\n self.data['ndbObjects'] = {}\n self.data['formParams'] = {}", " def __init__(self):\n self.data = {}\n self.data['success'] = True\n self.da...
# coding=UTF-8 from google.appengine.ext import ndb from google.appengine.ext.ndb import polymodel from common.constants import * # label 'Id' (starting in upper case) is beeing used here because 'id' is python # reserved word... class BaseModel(ndb.Model): def to_dict(self, include=None, exclude=None): """ ...
[ [ 1, 0, 0.01, 0.005, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.015, 0.005, 0, 0.66, 0.0714, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 1, 0, 0.025, 0.005, 0, 0.66, ...
[ "from google.appengine.ext import ndb", "from google.appengine.ext.ndb import polymodel", "from common.constants import *", "class BaseModel(ndb.Model):\n\n def to_dict(self, include=None, exclude=None):\n \"\"\"\n ndb.to_dict does not include the Obect' key...\n \"\"\"\n dictionary = (\n su...
# coding=UTF-8 import webapp2 from common.constants import * class UnexpectedValueException(webapp2.HTTPException): def __init__(self, fieldId, value): super(UnexpectedValueException, self).__init__( 400, UNEXPECTED_VALUE_MESSAGE + '\n[' + fieldId + ':' + value + ']') self.code = 400 self.message...
[ [ 1, 0, 0.2, 0.0667, 0, 0.66, 0, 123, 0, 1, 0, 0, 123, 0, 0 ], [ 1, 0, 0.3333, 0.0667, 0, 0.66, 0.5, 258, 0, 1, 0, 0, 258, 0, 0 ], [ 3, 0, 0.7, 0.5333, 0, 0.66, ...
[ "import webapp2", "from common.constants import *", "class UnexpectedValueException(webapp2.HTTPException):\n def __init__(self, fieldId, value):\n super(UnexpectedValueException, self).__init__(\n 400, UNEXPECTED_VALUE_MESSAGE + '\\n[' + fieldId + ':' + value + ']')\n self.code = 400\n self.mess...
# coding=UTF-8 from common.db_models import Image class ImageUtils: @staticmethod def Save(imageBlob): if not imageBlob: return None image = Image(img=str(imageBlob)) image.put() return image.key
[ [ 1, 0, 0.2308, 0.0769, 0, 0.66, 0, 966, 0, 1, 0, 0, 966, 0, 0 ], [ 3, 0, 0.6538, 0.6154, 0, 0.66, 1, 225, 0, 1, 0, 0, 0, 0, 3 ], [ 2, 1, 0.7308, 0.4615, 1, 0.59, ...
[ "from common.db_models import Image", "class ImageUtils:\n @staticmethod\n def Save(imageBlob):\n if not imageBlob:\n return None\n image = Image(img=str(imageBlob))\n image.put()\n return image.key", " def Save(imageBlob):\n if not imageBlob:\n return None\n image = Image(img=str...
# coding=UTF-8 """ Contants that should be used is several modules of Seminvos ES """ """ Valid paths in the site. ************* WARNING ***************** Keep synced with js/common.js """ ADMIN = '/cagao/admin' AD_TYPE = '/cagao/tipoanuncio' AD_PAGE = '/cagao/anuncio' CREATE_AD = ...
[ [ 8, 0, 0.0482, 0.0361, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 8, 0, 0.1084, 0.0602, 0, 0.66, 0.0286, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1446, 0.012, 0, 0.66, ...
[ "\"\"\"\nContants that should be used is several modules of Seminvos ES\n\"\"\"", "\"\"\"\nValid paths in the site.\n************* WARNING *****************\nKeep synced with js/common.js\n\"\"\"", "ADMIN = '/cagao/admin'", "AD_TYPE = '/cagao/tipoanuncio'", "AD_PAGE = '/cagao/an...
#!/usr/bin/env python #coding:utf-8 ''' This is a twisted powered chat server developed by observer(jingchaohu@gmail.com) using a self-designed json-based protocol aimed to serve a PAD like Flex/Flash player with flying comments effect This project is licensed under GPLv3, see LICENSE ---- DATABASE FUNCTIONS --...
[ [ 8, 0, 0.07, 0.09, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.41, 0.01, 0, 0.66, 0.0909, 323, 0, 1, 0, 0, 323, 0, 0 ], [ 1, 0, 0.42, 0.01, 0, 0.66, 0.1818...
[ "'''\nThis is a twisted powered chat server \n developed by observer(jingchaohu@gmail.com)\n\tusing a self-designed json-based protocol\n\taimed to serve a PAD like Flex/Flash player with flying comments effect\nThis project is licensed under GPLv3, see LICENSE\n\n---- DATABASE FUNCTIONS ----", "from twisted.e...
#!/usr/bin/env python #coding:utf-8 ''' This is a twisted powered chat server developed by observer(jingchaohu@gmail.com) using a self-designed json-based protocol aimed to serve a PAD like Flex/Flash player with flying comments effect This project is licensed under GPLv3, see LICENSE ---- TWISTED SERVER ---- ...
[ [ 8, 0, 0.0241, 0.0309, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0447, 0.0034, 0, 0.66, 0.0303, 937, 0, 1, 0, 0, 937, 0, 0 ], [ 8, 0, 0.0481, 0.0034, 0, 0.66...
[ "'''\nThis is a twisted powered chat server \n developed by observer(jingchaohu@gmail.com)\n\tusing a self-designed json-based protocol\n\taimed to serve a PAD like Flex/Flash player with flying comments effect\nThis project is licensed under GPLv3, see LICENSE\n\n---- TWISTED SERVER ----", "from twisted.inte...
#!/usr/bin/env python #coding:utf-8 ''' This is a twisted powered chat server developed by observer(jingchaohu@gmail.com) using a self-designed json-based protocol aimed to serve a PAD like Flex/Flash player with flying comments effect This project is licensed under GPLv3, see LICENSE ---- SOME COMMON FUNCTIONS...
[ [ 8, 0, 0.2188, 0.2812, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.4062, 0.0312, 0, 0.66, 0.2, 654, 0, 2, 0, 0, 654, 0, 0 ], [ 2, 0, 0.4844, 0.0625, 0, 0.66, ...
[ "'''\nThis is a twisted powered chat server \n developed by observer(jingchaohu@gmail.com)\n\tusing a self-designed json-based protocol\n\taimed to serve a PAD like Flex/Flash player with flying comments effect\nThis project is licensed under GPLv3, see LICENSE\n\n---- SOME COMMON FUNCTIONS ----", "import time...
#!/usr/bin/python # # Copyright (C) 2012 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 ...
[ [ 14, 0, 0.0281, 0.0017, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0347, 0.0017, 0, 0.66, 0.0303, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 8, 0, 0.0364, 0.0017, 0, 0...
[ "__author__ = 'afshar@google.com (Ali Afshar)'", "import sys", "sys.path.insert(0, 'lib')", "import os", "import httplib2", "import sessions", "from google.appengine.ext import webapp", "from google.appengine.ext.webapp.util import run_wsgi_app", "from google.appengine.ext import db", "from google...
#!/usr/bin/python # # Copyright (C) 2012 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 ...
[ [ 14, 0, 0.0557, 0.0033, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0689, 0.0033, 0, 0.66, 0.0333, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0721, 0.0033, 0, 0...
[ "__author__ = 'afshar@google.com (Ali Afshar)'", "import os", "import httplib2", "import sessions", "from google.appengine.ext import db", "from google.appengine.ext.webapp import template", "from apiclient.discovery import build_from_document", "from apiclient.http import MediaUpload", "from oauth2...
# This is the version of this source code. manual_verstr = "1.5" auto_build_num = "211" verstr = manual_verstr + "." + auto_build_num try: from pyutil.version_class import Version as pyutil_Version __version__ = pyutil_Version(verstr) except (ImportError, ValueError): # Maybe there is no pyutil insta...
[ [ 14, 0, 0.1667, 0.0556, 0, 0.66, 0, 189, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3889, 0.0556, 0, 0.66, 0.3333, 295, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.6111, 0.0556, 0, 0...
[ "manual_verstr = \"1.5\"", "auto_build_num = \"211\"", "verstr = manual_verstr + \".\" + auto_build_num", "try:\n from pyutil.version_class import Version as pyutil_Version\n __version__ = pyutil_Version(verstr)\nexcept (ImportError, ValueError):\n # Maybe there is no pyutil installed.\n from dist...
""" 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 ...
[ [ 8, 0, 0.3, 0.575, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.625, 0.025, 0, 0.66, 0.3333, 311, 0, 1, 0, 0, 311, 0, 0 ], [ 1, 0, 0.65, 0.025, 0, 0.66, 0.6...
[ "\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including withou...
""" 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 ...
[ [ 8, 0, 0.2927, 0.561, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.6098, 0.0244, 0, 0.66, 0.25, 311, 0, 1, 0, 0, 311, 0, 0 ], [ 1, 0, 0.6341, 0.0244, 0, 0.66, ...
[ "\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including withou...
# Copyright 2011 Google Inc. All Rights Reserved. """Multi-credential file store with lock support. This module implements a JSON credential store where multiple credentials can be stored in one file. That file supports locking both in a single process and across processes. The credential themselves are keyed off o...
[ [ 8, 0, 0.0437, 0.0741, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0847, 0.0026, 0, 0.66, 0.0588, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0899, 0.0026, 0, 0.66,...
[ "\"\"\"Multi-credential file store with lock support.\n\nThis module implements a JSON credential store where multiple\ncredentials can be stored in one file. That file supports locking\nboth in a single process and across processes.\n\nThe credential themselves are keyed off of:\n* client_id", "__author__ = 'jb...
# 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...
[ [ 8, 0, 0.0145, 0.0035, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0176, 0.0009, 0, 0.66, 0.0244, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0193, 0.0009, 0, 0.66,...
[ "\"\"\"An OAuth 2.0 client.\n\nTools for interacting with OAuth 2.0 protected resources.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import base64", "import clientsecrets", "import copy", "import datetime", "import httplib2", "import logging", "import os", "import sys", "im...
# 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...
[ [ 8, 0, 0.1604, 0.0472, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1981, 0.0094, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.217, 0.0094, 0, 0.66, ...
[ "\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 2.0\ncredentials.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import os", "import stat", "import threading", "from anyjson import simplejson", "from client import Storage as BaseStorage", "from clien...
# 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...
[ [ 8, 0, 0.1371, 0.0403, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1694, 0.0081, 0, 0.66, 0.1111, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1855, 0.0081, 0, 0.66,...
[ "\"\"\"OAuth 2.0 utilities for Django.\n\nUtilities for using OAuth 2.0 in conjunction with\nthe Django datastore.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import oauth2client", "import base64", "import pickle", "from django.db import models", "from oauth2client.client import St...
#!/usr/bin/python2.4 # -*- coding: utf-8 -*- # # 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 ...
[ [ 1, 0, 0.0738, 0.0041, 0, 0.66, 0, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 1, 0, 0.0779, 0.0041, 0, 0.66, 0.0625, 154, 0, 1, 0, 0, 154, 0, 0 ], [ 1, 0, 0.082, 0.0041, 0, 0...
[ "import base64", "import hashlib", "import logging", "import time", "from OpenSSL import crypto", "from anyjson import simplejson", "CLOCK_SKEW_SECS = 300 # 5 minutes in seconds", "AUTH_TOKEN_LIFETIME_SECS = 300 # 5 minutes in seconds", "MAX_TOKEN_LIFETIME_SECS = 86400 # 1 day in seconds", "cla...
# 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...
[ [ 8, 0, 0.1619, 0.0476, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2, 0.0095, 0, 0.66, 0.0909, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2286, 0.0095, 0, 0.66, ...
[ "\"\"\"Utilities for reading OAuth 2.0 client secret files.\n\nA client_secrets.json file contains all the information needed to interact with\nan OAuth 2.0 protected service.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "from anyjson import simplejson", "TYPE_WEB = 'web'", "TYPE_INSTALL...
__version__ = "1.0c2"
[ [ 14, 0, 1, 1, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "__version__ = \"1.0c2\"" ]
# 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...
[ [ 8, 0, 0.5312, 0.1562, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.6562, 0.0312, 0, 0.66, 0.5, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 7, 0, 0.875, 0.2812, 0, 0.66, ...
[ "\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "try: # pragma: no cover\n # Should work for Python2.6 and higher.\n import json as simplejson\nexcept ImportError: #...
import Cookie import datetime import time import email.utils import calendar import base64 import hashlib import hmac import re import logging # Ripped from the Tornado Framework's web.py # http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09 # # Tornado is licensed under the Apache Licen...
[ [ 1, 0, 0.006, 0.006, 0, 0.66, 0, 32, 0, 1, 0, 0, 32, 0, 0 ], [ 1, 0, 0.0119, 0.006, 0, 0.66, 0.1, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0179, 0.006, 0, 0.66, ...
[ "import Cookie", "import datetime", "import time", "import email.utils", "import calendar", "import base64", "import hashlib", "import hmac", "import re", "import logging", "class LilCookies:\n\n @staticmethod\n def _utf8(s):\n if isinstance(s, unicode):\n return s.encode(\"utf-8\")\n ...
# Copyright (C) 2007 Joe Gregorio # # Licensed under the MIT License """MIME-Type Parser This module provides basic functions for handling mime-types. It can handle matching mime-types against a list of media-ranges. See section 14.1 of the HTTP specification [RFC 2616] for a complete explanation. http://www.w3.o...
[ [ 8, 0, 0.0814, 0.1105, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1453, 0.0058, 0, 0.66, 0.0833, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1512, 0.0058, 0, 0.66...
[ "\"\"\"MIME-Type Parser\n\nThis module provides basic functions for handling mime-types. It can handle\nmatching mime-types against a list of media-ranges. See section 14.1 of the\nHTTP specification [RFC 2616] for a complete explanation.\n\n http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1", "__v...
# 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...
[ [ 8, 0, 0.0342, 0.0083, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0414, 0.0021, 0, 0.66, 0.0476, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0476, 0.0021, 0, 0.66,...
[ "\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import copy", "import httplib2", "import logging", "import oauth2 as oauth", "import urllib", "import urlparse", "from anyjson import simplejson", "tr...
#!/usr/bin/python2.4 # # 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 l...
[ [ 8, 0, 0.0519, 0.0182, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0649, 0.0026, 0, 0.66, 0.0625, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0701, 0.0026, 0, 0.66,...
[ "\"\"\"Model objects for requests and responses.\n\nEach API may support one or more serializations, such\nas JSON, Atom, etc. The model classes are responsible\nfor converting between the wire format and the Python\nobject representation.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import...
# 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...
[ [ 8, 0, 0.2619, 0.0635, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3175, 0.0159, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.3492, 0.0159, 0, 0.66, ...
[ "\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 1.0 credentials.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import pickle", "import threading", "from apiclient.oauth import Storage as BaseStorage", "class Storage(BaseStorage):\n \"\"\"Store and retr...
# 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...
[ [ 1, 0, 0.2679, 0.0179, 0, 0.66, 0, 629, 0, 1, 0, 0, 629, 0, 0 ], [ 1, 0, 0.2857, 0.0179, 0, 0.66, 0.2, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 1, 0, 0.3036, 0.0179, 0, 0.6...
[ "import apiclient", "import base64", "import pickle", "from django.db import models", "class OAuthCredentialsField(models.Field):\n\n __metaclass__ = models.SubfieldBase\n\n def db_type(self):\n return 'VARCHAR'\n\n def to_python(self, value):", " __metaclass__ = models.SubfieldBase", " def db_t...
# 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...
[ [ 8, 0, 0.1259, 0.037, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1556, 0.0074, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1704, 0.0074, 0, 0.66, ...
[ "\"\"\"Utilities for Google App Engine\n\nUtilities for making it easier to use the\nGoogle API Client for Python on Google App Engine.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import pickle", "from google.appengine.ext import db", "from apiclient.oauth import OAuthCredentials", "...
#!/usr/bin/python2.4 # # 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 l...
[ [ 8, 0, 0.1545, 0.0407, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.187, 0.0081, 0, 0.66, 0.0769, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2114, 0.0081, 0, 0.66, ...
[ "\"\"\"Errors for the library.\n\nAll exceptions defined by the library\nshould be defined in this file.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "from oauth2client.anyjson import simplejson", "class Error(Exception):\n \"\"\"Base error for this module.\"\"\"\n pass", " \"\"\"Base...
__version__ = "1.0c2"
[ [ 14, 0, 1, 1, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "__version__ = \"1.0c2\"" ]
# 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...
[ [ 8, 0, 0.1205, 0.1452, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2046, 0.0033, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2112, 0.0033, 0, 0.66, ...
[ "\"\"\"Schema processing for discovery based APIs\n\nSchemas holds an APIs discovery schemas. It can return those schema as\ndeserialized JSON objects, or pretty print them as prototype objects that\nconform to the schema.\n\nFor example, given the schema:", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", ...
# 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...
[ [ 8, 0, 0.5312, 0.1562, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.6562, 0.0312, 0, 0.66, 0.5, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 7, 0, 0.875, 0.2812, 0, 0.66, ...
[ "\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "try: # pragma: no cover\n import simplejson\nexcept ImportError: # pragma: no cover\n try:\n # Try to import from...
# Early, and incomplete implementation of -04. # import re import urllib RESERVED = ":/?#[]@!$&'()*+,;=" OPERATOR = "+./;?|!@" EXPLODE = "*+" MODIFIER = ":^" TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE) VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part...
[ [ 1, 0, 0.0204, 0.0068, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0272, 0.0068, 0, 0.66, 0.0833, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 14, 0, 0.0408, 0.0068, 0, ...
[ "import re", "import urllib", "RESERVED = \":/?#[]@!$&'()*+,;=\"", "OPERATOR = \"+./;?|!@\"", "EXPLODE = \"*+\"", "MODIFIER = \":^\"", "TEMPLATE = re.compile(r\"{(?P<operator>[\\+\\./;\\?|!@])?(?P<varlist>[^}]+)}\", re.UNICODE)", "VAR = re.compile(r\"^(?P<varname>[^=\\+\\*:\\^]+)((?P<explode>[\\+\\*])...
#!/usr/bin/env python # Copyright (c) 2010, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this l...
[ [ 8, 0, 0.1818, 0.0267, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2032, 0.0053, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 3, 0, 0.2219, 0.0107, 0, 0.66, ...
[ "\"\"\"Module to enforce different constraints on flags.\n\nA validator represents an invariant, enforced over a one or more flags.\nSee 'FLAGS VALIDATORS' in gflags.py's docstring for a usage manual.\n\"\"\"", "__author__ = 'olexiy@google.com (Olexiy Oryeshko)'", "class Error(Exception):\n \"\"\"Thrown If val...
"""SocksiPy - Python SOCKS module. Version 1.00 Copyright 2006 Dan-Haim. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
[ [ 8, 0, 0.0365, 0.0708, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 8, 0, 0.0845, 0.0205, 0, 0.66, 0.04, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0982, 0.0023, 0, 0.66, ...
[ "\"\"\"SocksiPy - Python SOCKS module.\nVersion 1.00\n\nCopyright 2006 Dan-Haim. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n1. Redistributions of source code must retain the above copyright ...
""" iri2uri Converts an IRI to a URI. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __version__ = "1.0.0" __license__ = "MIT" __history__ = """ """ import urlparse # Convert an IRI to a URI following the rules in RFC 3987 # # The characte...
[ [ 8, 0, 0.0318, 0.0545, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0636, 0.0091, 0, 0.66, 0.0909, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0727, 0.0091, 0, 0.66...
[ "\"\"\"\niri2uri\n\nConverts an IRI to a URI.\n\n\"\"\"", "__author__ = \"Joe Gregorio (joe@bitworking.org)\"", "__copyright__ = \"Copyright 2006, Joe Gregorio\"", "__contributors__ = []", "__version__ = \"1.0.0\"", "__license__ = \"MIT\"", "__history__ = \"\"\"\n\"\"\"", "import urlparse", "escape_...
#!/usr/bin/python #################################################################################### #################################################################################### ## Author: Ahmed Adel Mohamed ## Date: 27/04/2011 ## Version: 1.0.4 ## Puropse: ## Script to arrang...
[ [ 1, 0, 0.05, 0.05, 0, 0.66, 0, 890, 0, 1, 0, 0, 890, 0, 0 ], [ 1, 0, 0.1, 0.05, 0, 0.66, 0.25, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.15, 0.05, 0, 0.66, 0.5, ...
[ "import string", "import re", "import sys", "import getopt", "def arrange_list(list, order, line_number):\n line_number = int(line_number) - 1\n if order == 'r':\n list.sort(key=lambda arr: arr[0], reverse=False);\n else:\n list.sort(key=lambda arr: arr[0], reverse=True);\n count =...
#!/usr/bin/python #################################################################################### #################################################################################### ## Author: Ahmed Adel Mohamed ## Date: 27/04/2011 ## Version: 1.0.4 ## Puropse: ## Script to arrang...
[ [ 1, 0, 0.05, 0.05, 0, 0.66, 0, 890, 0, 1, 0, 0, 890, 0, 0 ], [ 1, 0, 0.1, 0.05, 0, 0.66, 0.25, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.15, 0.05, 0, 0.66, 0.5, ...
[ "import string", "import re", "import sys", "import getopt", "def arrange_list(list, order, line_number):\n line_number = int(line_number) - 1\n if order == 'r':\n list.sort(key=lambda arr: arr[0], reverse=False);\n else:\n list.sort(key=lambda arr: arr[0], reverse=True);\n count =...
""" Django settings for zegveld project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) im...
[ [ 8, 0, 0.0291, 0.0523, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0698, 0.0058, 0, 0.66, 0.0312, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.0756, 0.0058, 0, 0.6...
[ "\"\"\"\nDjango settings for zegveld project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.6/ref/settings/", "import os", "BASE_DIR = os.path.dirname(os.path.dirname(_...
''' Created on Jan 8, 2015 @author: theo '''
[ [ 8, 0, 0.6, 1, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ] ]
[ "'''\nCreated on Jan 8, 2015\n\n@author: theo\n'''" ]
from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.conf import settings from django.contrib import admin from filebrowser.sites import site from .views import HomeView, DashGroupView admin.autodiscover() urlpatterns = patterns('zegveld.views', url(r'^$', Ho...
[ [ 1, 0, 0.0233, 0.0233, 0, 0.66, 0, 528, 0, 3, 0, 0, 528, 0, 0 ], [ 1, 0, 0.0465, 0.0233, 0, 0.66, 0.125, 937, 0, 1, 0, 0, 937, 0, 0 ], [ 1, 0, 0.0698, 0.0233, 0, 0...
[ "from django.conf.urls import patterns, include, url", "from django.conf.urls.static import static", "from django.conf import settings", "from django.contrib import admin", "from filebrowser.sites import site", "from .views import HomeView, DashGroupView", "admin.autodiscover()", "urlpatterns = patter...
""" WSGI config for zegveld project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zegveld.settings") from django.core.w...
[ [ 8, 0, 0.3214, 0.5714, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.7143, 0.0714, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 8, 0, 0.7857, 0.0714, 0, 0.66, ...
[ "\"\"\"\nWSGI config for zegveld project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/\n\"\"\"", "import os", "os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"zegveld....
''' Created on Oct 4, 2014 @author: theo ''' from django.shortcuts import get_object_or_404 from django.views.generic.base import TemplateView from acacia.data.models import Project, TabGroup from acacia.data.views import ProjectDetailView class HomeView(ProjectDetailView): template_name = 'zegveld_detail.html' ...
[ [ 8, 0, 0.075, 0.125, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.15, 0.025, 0, 0.66, 0.1667, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 1, 0, 0.175, 0.025, 0, 0.66, 0...
[ "'''\nCreated on Oct 4, 2014\n\n@author: theo\n'''", "from django.shortcuts import get_object_or_404", "from django.views.generic.base import TemplateView", "from acacia.data.models import Project, TabGroup", "from acacia.data.views import ProjectDetailView", "class HomeView(ProjectDetailView):\n templ...
""" WSGI config for texel project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os import sys import site ALLDIRS = ['/var/www/vhosts/acaciadata.com/httpdocs/django/lib/py...
[ [ 8, 0, 0.1154, 0.2051, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2564, 0.0256, 0, 0.66, 0.0714, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2821, 0.0256, 0, 0.66...
[ "\"\"\"\nWSGI config for texel project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/\n\"\"\"", "import os", "import sys", "import site", "ALLDIRS = ['/var/www/vhosts/a...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zegveld.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
[ [ 1, 0, 0.2, 0.1, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3, 0.1, 0, 0.66, 0.5, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 4, 0, 0.75, 0.6, 0, 0.66, 1, 0, ...
[ "import os", "import sys", "if __name__ == \"__main__\":\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"zegveld.settings\")\n\n from django.core.management import execute_from_command_line\n\n execute_from_command_line(sys.argv)", " os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"zegvel...
""" Django settings for acacia project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) imp...
[ [ 8, 0, 0.0237, 0.0427, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0569, 0.0047, 0, 0.66, 0.025, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.0616, 0.0047, 0, 0.66...
[ "\"\"\"\nDjango settings for acacia project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.6/ref/settings/", "import os", "BASE_DIR = os.path.dirname(os.path.dirname(__...
""" Django settings for acacia project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) imp...
[ [ 8, 0, 0.0299, 0.0539, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0719, 0.006, 0, 0.66, 0.0323, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.0778, 0.006, 0, 0.66,...
[ "\"\"\"\nDjango settings for acacia project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.6/ref/settings/", "import os", "BASE_DIR = os.path.dirname(os.path.dirname(__...
''' Created on Feb 28, 2014 @author: theo ''' from django.utils.text import slugify from acacia import settings def project_upload(instance, filename): return '/'.join(['images', slugify(instance.name), filename]) def locatie_upload(instance, filename): return '/'.j...
[ [ 8, 0, 0.0395, 0.0658, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0789, 0.0132, 0, 0.66, 0.125, 590, 0, 1, 0, 0, 590, 0, 0 ], [ 1, 0, 0.0921, 0.0132, 0, 0.66,...
[ "'''\nCreated on Feb 28, 2014\n\n@author: theo\n'''", "from django.utils.text import slugify", "from acacia import settings", "def project_upload(instance, filename):\n return '/'.join(['images',\n slugify(instance.name), \n filename])", " return '/'.join(['imag...
# -*- coding: utf-8 -*- import os,datetime,math,binascii from django.db import models from django.db.models import Avg, Max, Min, Sum from django.contrib.auth.models import User from django.core.files.base import ContentFile from django.utils import timezone from django.core.urlresolvers import reverse from django.core...
[ [ 1, 0, 0.0015, 0.0007, 0, 0.66, 0, 688, 0, 4, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0022, 0.0007, 0, 0.66, 0.0185, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0029, 0.0007, 0, 0....
[ "import os,datetime,math,binascii", "from django.db import models", "from django.db.models import Avg, Max, Min, Sum", "from django.contrib.auth.models import User", "from django.core.files.base import ContentFile", "from django.utils import timezone", "from django.core.urlresolvers import reverse", "...
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase from acacia.data.models import Datasource class TestProvider(TestCase): def test_knmi(self): ...
[ [ 8, 0, 0.1842, 0.3158, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.4211, 0.0526, 0, 0.66, 0.25, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 1, 0, 0.4737, 0.0526, 0, 0.66, ...
[ "\"\"\"\nThis file demonstrates writing tests using the unittest module. These will pass\nwhen you run \"manage.py test\".\n\nReplace this with more appropriate tests for your application.\n\"\"\"", "from django.test import TestCase", "from acacia.data.models import Datasource", "class TestProvider(TestCase):...
from django.contrib.gis.db import models from ..util import RDNEW class Station(models.Model): nummer = models.IntegerField() naam = models.CharField(max_length=50) location = models.PointField(srid=RDNEW) objects = models.GeoManager() def coords(self): return (self.location.x, self.lo...
[ [ 1, 0, 0.0294, 0.0294, 0, 0.66, 0, 964, 0, 1, 0, 0, 964, 0, 0 ], [ 1, 0, 0.0588, 0.0294, 0, 0.66, 0.3333, 811, 0, 1, 0, 0, 811, 0, 0 ], [ 3, 0, 0.3235, 0.4412, 0, ...
[ "from django.contrib.gis.db import models", "from ..util import RDNEW", "class Station(models.Model):\n nummer = models.IntegerField()\n naam = models.CharField(max_length=50)\n location = models.PointField(srid=RDNEW)\n objects = models.GeoManager()\n \n def coords(self):\n return (sel...
from django.conf.urls import patterns, include, url from django.contrib.gis import admin from importer import importall urlpatterns = patterns('acacia.data.knmi.views', # url(r'^admin/', include(admin.site.urls)), url(r'^find', 'find_stations', name='find_stations'), url(r'^select', 'select_station', name=...
[ [ 1, 0, 0.0909, 0.0909, 0, 0.66, 0, 528, 0, 3, 0, 0, 528, 0, 0 ], [ 1, 0, 0.1818, 0.0909, 0, 0.66, 0.3333, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 1, 0, 0.3636, 0.0909, 0, ...
[ "from django.conf.urls import patterns, include, url", "from django.contrib.gis import admin", "from importer import importall", "urlpatterns = patterns('acacia.data.knmi.views',\n# url(r'^admin/', include(admin.site.urls)),\n url(r'^find', 'find_stations', name='find_stations'),\n url(r'^select', 's...
from models import NeerslagStation, Station from django.contrib.gis.geos import Point def importneerslag(fil): with open(fil) as f: f.readline() line = f.readline() while line != '': words = line.split(',') if len(words)>7: x = float(words[6]) ...
[ [ 1, 0, 0.025, 0.025, 0, 0.66, 0, 495, 0, 2, 0, 0, 495, 0, 0 ], [ 1, 0, 0.05, 0.025, 0, 0.66, 0.25, 886, 0, 1, 0, 0, 886, 0, 0 ], [ 2, 0, 0.275, 0.375, 0, 0.66, ...
[ "from models import NeerslagStation, Station", "from django.contrib.gis.geos import Point", "def importneerslag(fil):\n with open(fil) as f:\n f.readline()\n line = f.readline()\n while line != '':\n words = line.split(',')\n if len(words)>7:\n x = fl...
from django.shortcuts import render_to_response from django.template import RequestContext from models import Station, NeerslagStation from django.contrib.gis.geos import Point from ..util import WGS84, RDNEW from django.contrib.auth.decorators import login_required @login_required def find_stations(request): x = ...
[ [ 1, 0, 0.0303, 0.0303, 0, 0.66, 0, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 1, 0, 0.0606, 0.0303, 0, 0.66, 0.1429, 213, 0, 1, 0, 0, 213, 0, 0 ], [ 1, 0, 0.0909, 0.0303, 0, ...
[ "from django.shortcuts import render_to_response", "from django.template import RequestContext", "from models import Station, NeerslagStation", "from django.contrib.gis.geos import Point", "from ..util import WGS84, RDNEW", "from django.contrib.auth.decorators import login_required", "def find_stations(...
from models import Station, NeerslagStation from django.contrib.gis import admin class StationAdmin(admin.OSMGeoAdmin): model = Station search_fields = ['naam',] list_display = ('naam', 'nummer','coords') admin.site.register(Station,StationAdmin) admin.site.register(NeerslagStation,admin.OSMGeoAdmin)
[ [ 1, 0, 0.1, 0.1, 0, 0.66, 0, 495, 0, 2, 0, 0, 495, 0, 0 ], [ 1, 0, 0.2, 0.1, 0, 0.66, 0.25, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 3, 0, 0.55, 0.4, 0, 0.66, 0.5, ...
[ "from models import Station, NeerslagStation", "from django.contrib.gis import admin", "class StationAdmin(admin.OSMGeoAdmin):\n model = Station\n search_fields = ['naam',]\n list_display = ('naam', 'nummer','coords')", " model = Station", " search_fields = ['naam',]", " list_display = (...
from django.conf.urls import patterns, url from django.views.generic import DetailView from django.views.generic.list import ListView from acacia.data.models import Project, ProjectLocatie, MeetLocatie from acacia.data.views import DatasourceDetailView, DatasourceAsZip, DatasourceAsCsv, ProjectDetailView, ProjectLocati...
[ [ 1, 0, 0.025, 0.025, 0, 0.66, 0, 528, 0, 2, 0, 0, 528, 0, 0 ], [ 1, 0, 0.05, 0.025, 0, 0.66, 0.2, 201, 0, 1, 0, 0, 201, 0, 0 ], [ 1, 0, 0.075, 0.025, 0, 0.66, ...
[ "from django.conf.urls import patterns, url", "from django.views.generic import DetailView", "from django.views.generic.list import ListView", "from acacia.data.models import Project, ProjectLocatie, MeetLocatie", "from acacia.data.views import DatasourceDetailView, DatasourceAsZip, DatasourceAsCsv, Project...
''' Created on Feb 12, 2014 @author: theo ''' import os, fnmatch, re import matplotlib.pyplot as plt from django.contrib.gis.gdal.srs import SpatialReference, CoordTransform from django.contrib.gis.geos import Point from acacia import settings from matplotlib import rcParams rcParams['font.size'] = '8' import logging...
[ [ 8, 0, 0.0219, 0.0365, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0438, 0.0073, 0, 0.66, 0.0278, 688, 0, 3, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0511, 0.0073, 0, 0.66...
[ "'''\nCreated on Feb 12, 2014\n\n@author: theo\n'''", "import os, fnmatch, re", "import matplotlib.pyplot as plt", "from django.contrib.gis.gdal.srs import SpatialReference, CoordTransform", "from django.contrib.gis.geos import Point", "from acacia import settings", "from matplotlib import rcParams", ...
from .shortcuts import meteo2locatie from .models import Chart, Series import logging logger = logging.getLogger(__name__) def meteo_toevoegen(modeladmin, request, queryset): pass for loc in queryset: meteo2locatie(loc,user=request.user) meteo_toevoegen.short_description = "Meteostation, neerslagstatio...
[ [ 1, 0, 0.0088, 0.0088, 0, 0.66, 0, 108, 0, 1, 0, 0, 108, 0, 0 ], [ 1, 0, 0.0175, 0.0088, 0, 0.66, 0.0323, 495, 0, 2, 0, 0, 495, 0, 0 ], [ 1, 0, 0.0263, 0.0088, 0, ...
[ "from .shortcuts import meteo2locatie", "from .models import Chart, Series", "import logging", "logger = logging.getLogger(__name__)", "def meteo_toevoegen(modeladmin, request, queryset):\n pass\n for loc in queryset:\n meteo2locatie(loc,user=request.user)", " for loc in queryset:\n ...
''' Created on Mar 11, 2014 @author: theo ''' __version__ = '1.0.0'
[ [ 8, 0, 0.5, 0.8333, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 1, 0.1667, 0, 0.66, 1, 162, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "'''\nCreated on Mar 11, 2014\n\n@author: theo\n'''", "__version__ = '1.0.0'" ]
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'SeriesProperties' db.create_table(u'data_seriesproperties...
[ [ 1, 0, 0.0076, 0.0038, 0, 0.66, 0, 46, 0, 1, 0, 0, 46, 0, 0 ], [ 1, 0, 0.0114, 0.0038, 0, 0.66, 0.25, 545, 0, 1, 0, 0, 545, 0, 0 ], [ 1, 0, 0.0152, 0.0038, 0, 0.66...
[ "from south.utils import datetime_utils as datetime", "from south.db import db", "from south.v2 import SchemaMigration", "from django.db import models", "class Migration(SchemaMigration):\n\n def forwards(self, orm):\n # Adding model 'SeriesProperties'\n db.create_table(u'data_seriespropert...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from django.db import models, connection, transaction class Migration(SchemaMigration): def forwards(self, orm): cursor = connection.cursor(...
[ [ 1, 0, 0.0077, 0.0039, 0, 0.66, 0, 46, 0, 1, 0, 0, 46, 0, 0 ], [ 1, 0, 0.0116, 0.0039, 0, 0.66, 0.2, 545, 0, 1, 0, 0, 545, 0, 0 ], [ 1, 0, 0.0154, 0.0039, 0, 0.66,...
[ "from south.utils import datetime_utils as datetime", "from south.db import db", "from south.v2 import SchemaMigration", "from django.db import models", "from django.db import models, connection, transaction", "class Migration(SchemaMigration):\n\n def forwards(self, orm):\n cursor = connection....
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'ChartSeries.order' db.add_column(u'data_chartseries', 'or...
[ [ 1, 0, 0.0079, 0.0039, 0, 0.66, 0, 46, 0, 1, 0, 0, 46, 0, 0 ], [ 1, 0, 0.0118, 0.0039, 0, 0.66, 0.25, 545, 0, 1, 0, 0, 545, 0, 0 ], [ 1, 0, 0.0157, 0.0039, 0, 0.66...
[ "from south.utils import datetime_utils as datetime", "from south.db import db", "from south.v2 import SchemaMigration", "from django.db import models", "class Migration(SchemaMigration):\n\n def forwards(self, orm):\n # Adding field 'ChartSeries.order'\n db.add_column(u'data_chartseries', ...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Notification' db.create_table(u'data_notification', ( ...
[ [ 1, 0, 0.0072, 0.0036, 0, 0.66, 0, 46, 0, 1, 0, 0, 46, 0, 0 ], [ 1, 0, 0.0108, 0.0036, 0, 0.66, 0.25, 545, 0, 1, 0, 0, 545, 0, 0 ], [ 1, 0, 0.0144, 0.0036, 0, 0.66...
[ "from south.utils import datetime_utils as datetime", "from south.db import db", "from south.v2 import SchemaMigration", "from django.db import models", "class Migration(SchemaMigration):\n\n def forwards(self, orm):\n # Adding model 'Notification'\n db.create_table(u'data_notification', (\...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'ProjectLocatie.dashboard' db.add_column(u'data_projectloc...
[ [ 1, 0, 0.0079, 0.004, 0, 0.66, 0, 46, 0, 1, 0, 0, 46, 0, 0 ], [ 1, 0, 0.0119, 0.004, 0, 0.66, 0.25, 545, 0, 1, 0, 0, 545, 0, 0 ], [ 1, 0, 0.0158, 0.004, 0, 0.66, ...
[ "from south.utils import datetime_utils as datetime", "from south.db import db", "from south.v2 import SchemaMigration", "from django.db import models", "class Migration(SchemaMigration):\n\n def forwards(self, orm):\n # Adding field 'ProjectLocatie.dashboard'\n db.add_column(u'data_project...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Project' db.create_table(u'data_project', ( (...
[ [ 1, 0, 0.0036, 0.0018, 0, 0.66, 0, 46, 0, 1, 0, 0, 46, 0, 0 ], [ 1, 0, 0.0053, 0.0018, 0, 0.66, 0.25, 545, 0, 1, 0, 0, 545, 0, 0 ], [ 1, 0, 0.0071, 0.0018, 0, 0.66...
[ "from south.utils import datetime_utils as datetime", "from south.db import db", "from south.v2 import SchemaMigration", "from django.db import models", "class Migration(SchemaMigration):\n\n def forwards(self, orm):\n # Adding model 'Project'\n db.create_table(u'data_project', (\n ...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Project' db.create_table(u'data_project', ( (...
[ [ 1, 0, 0.0036, 0.0018, 0, 0.66, 0, 46, 0, 1, 0, 0, 46, 0, 0 ], [ 1, 0, 0.0054, 0.0018, 0, 0.66, 0.25, 545, 0, 1, 0, 0, 545, 0, 0 ], [ 1, 0, 0.0072, 0.0018, 0, 0.66...
[ "from south.utils import datetime_utils as datetime", "from south.db import db", "from south.v2 import SchemaMigration", "from django.db import models", "class Migration(SchemaMigration):\n\n def forwards(self, orm):\n # Adding model 'Project'\n db.create_table(u'data_project', (\n ...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'DashboardChart' db.create_table(u'data_dashboardchart', ( (u'id', self.gf(...
[ [ 1, 0, 0.0071, 0.0036, 0, 0.66, 0, 46, 0, 1, 0, 0, 46, 0, 0 ], [ 1, 0, 0.0107, 0.0036, 0, 0.66, 0.3333, 545, 0, 1, 0, 0, 545, 0, 0 ], [ 1, 0, 0.0142, 0.0036, 0, 0....
[ "from south.utils import datetime_utils as datetime", "from south.db import db", "from south.v2 import SchemaMigration", "class Migration(SchemaMigration):\n\n def forwards(self, orm):\n # Adding model 'DashboardChart'\n db.create_table(u'data_dashboardchart', (\n (u'id', self.gf('...
''' Created on Jan 26, 2014 @author: theo ''' import logging from generator import Generator from StringIO import StringIO logger = logging.getLogger(__name__) class MonFileException(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) class D...
[ [ 8, 0, 0.0319, 0.0532, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0638, 0.0106, 0, 0.66, 0.1667, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0745, 0.0106, 0, 0.66...
[ "'''\nCreated on Jan 26, 2014\n\n@author: theo\n'''", "import logging", "from generator import Generator", "from StringIO import StringIO", "logger = logging.getLogger(__name__)", "class MonFileException(Exception):\n\n def __init__(self, value):\n self.value = value\n\n def __str__(self):\n ...
import logging logger = logging.getLogger(__name__) import pandas as pd from generator import Generator class Generic(Generator): ''' Generic csv file without header, comma separated, uses standard date/time formatting in first column ''' def __init__(self, *args, **kwargs): super(Generic,se...
[ [ 1, 0, 0.013, 0.013, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 14, 0, 0.026, 0.013, 0, 0.66, 0.1111, 532, 3, 1, 0, 0, 71, 10, 1 ], [ 1, 0, 0.0519, 0.013, 0, 0.66...
[ "import logging", "logger = logging.getLogger(__name__)", "import pandas as pd", "from generator import Generator", "class Generic(Generator):\n ''' Generic csv file without header, comma separated, uses standard date/time formatting in first column '''\n\n def __init__(self, *args, **kwargs): ...
import os, urllib2, cgi import re import dateutil import acacia.data.util as util from django.utils import timezone from django.core.files.base import File import pandas as pd def spliturl(url): pattern = r'^(?P<scheme>ftp|https?)://(?:(?P<user>\w+)?(?::(?P<passwd>\S+))?@)?(?P<url>.+)' try: m = re.matc...
[ [ 1, 0, 0.0096, 0.0096, 0, 0.66, 0, 688, 0, 3, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0192, 0.0096, 0, 0.66, 0.125, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0288, 0.0096, 0, 0...
[ "import os, urllib2, cgi", "import re", "import dateutil", "import acacia.data.util as util", "from django.utils import timezone", "from django.core.files.base import File", "import pandas as pd", "def spliturl(url):\n pattern = r'^(?P<scheme>ftp|https?)://(?:(?P<user>\\w+)?(?::(?P<passwd>\\S+))?@)...
''' Created on Jan 28, 2014 @author: theo ''' import csv import logging logger = logging.getLogger(__name__) from generator import Generator class CR1000(Generator): def get_header(self, f): def rd(f): return [n.strip('"\r\n') for n in f.readline().split(',')] sectio...
[ [ 8, 0, 0.0625, 0.1042, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.125, 0.0208, 0, 0.66, 0.1667, 312, 0, 1, 0, 0, 312, 0, 0 ], [ 1, 0, 0.1458, 0.0208, 0, 0.66,...
[ "'''\nCreated on Jan 28, 2014\n\n@author: theo\n'''", "import csv", "import logging", "logger = logging.getLogger(__name__)", "from generator import Generator", "class CR1000(Generator):\n\n def get_header(self, f):\n \n def rd(f):\n return [n.strip('\"\\r\\n') for n in f.readl...
''' Created on Jan 24, 2014 @author: theo ''' import pytz import datetime import numpy.ma as ma import pandas as pd import StringIO from pydap.client import open_url import logging logger = logging.getLogger(__name__) from generator import Generator UTC = pytz.utc UTC2000 = UTC.localize(datetime.datetime(2000, 1, 1...
[ [ 8, 0, 0.0297, 0.0495, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0594, 0.0099, 0, 0.66, 0.0769, 106, 0, 1, 0, 0, 106, 0, 0 ], [ 1, 0, 0.0693, 0.0099, 0, 0.66...
[ "'''\nCreated on Jan 24, 2014\n\n@author: theo\n'''", "import pytz", "import datetime", "import numpy.ma as ma", "import pandas as pd", "import StringIO", "from pydap.client import open_url", "import logging", "logger = logging.getLogger(__name__)", "from generator import Generator", "UTC = pyt...
import numpy as np import logging import datetime import pytz from .campbell import CR1000 logger = logging.getLogger(__name__) from generator import Generator def convtime(txt,tz=None): try: dt = datetime.datetime.strptime(txt,'%Y-%m-%d %H:%M:%S') if tz is not None: dt = dt.replace(t...
[ [ 1, 0, 0.0119, 0.0119, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0238, 0.0119, 0, 0.66, 0.0833, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0357, 0.0119, 0, ...
[ "import numpy as np", "import logging", "import datetime", "import pytz", "from .campbell import CR1000", "logger = logging.getLogger(__name__)", "from generator import Generator", "def convtime(txt,tz=None):\n try:\n dt = datetime.datetime.strptime(txt,'%Y-%m-%d %H:%M:%S')\n if tz is...