code
stringlengths
1
1.72M
language
stringclasses
1 value
#!/usr/bin/env python # # 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/env python # # 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/env python # # 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/env python # # Copyright 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 o...
Python
#!/usr/bin/env python # # 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/env python # # 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/env python # # 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/env python # # 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. All Rights Reserved. """Tests for google3.apphosting.demos.tunes_db.server.tunes_db.""" __author__ = 'rafek@google.com (Rafe Kaplan)' import unittest from protorpc import message_types from protorpc import descriptor import datastore_test_util import model import...
Python
#!/usr/bin/env python # # 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/env python # # 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
def webapp_add_wsgi_middleware(app): """Configure additional middlewares for webapp. This function is called automatically by webapp.util.run_wsgi_app to give the opportunity for an application to register additional wsgi middleware components. See http://http://code.google.com/appengine/docs/python/tools/a...
Python
#!/usr/bin/env python # # 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/env python # # 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/env python # # 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/env python # # 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/env python # # 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/env python # # 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/env python # # 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/env python # # 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/env python # # Copyright 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 o...
Python
#!/usr/bin/env python # # Copyright 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 o...
Python
#!/usr/bin/env python # # Copyright 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 o...
Python
#!/usr/bin/env python # # Copyright 2007 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/env python # # Copyright 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 o...
Python
#!/usr/bin/env python # # Copyright 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 o...
Python
#!/usr/bin/env python # # 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/env python # # 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
from google.appengine.ext.webapp import util from protorpc.experimental import wsgi_service from protorpc.experimental import util as wsgi_util from protorpc import protobuf from protorpc import protojson from protorpc import registry protocols = wsgi_util.Protocols() protocols.add_protocol(protobuf, 'protobuf') pro...
Python
#!/usr/bin/env python # # 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/env python # # Copyright 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 o...
Python
#!/usr/bin/env python # # 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/env python # # 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/env python # # 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/env python # # 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 # -*- coding:utf-8 -*- ## Fourtou - Store text or uri by DnD on an icon in the GNOME panel ## Copyright (C) 2009-2010 Bzoloid ## ## 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 Software...
Python
#! /bin/env python # -*- coding: utf-8 -*- # # $Id$ import sqlite3.dbapi2 as sqlite import base64 import os from mylog import * class Settings: def __init__(self): db = os.path.expanduser("~/.fotoalba.db") self.db = db self.con = False self.cur = False def connect(self): log(u"Připojuji se k souboru s n...
Python
#! /bin/env python # -*- coding: utf-8 -*- # # $Id$ import time class mylog: debug = False def log(text, level = 0): if mylog.debug or level == 1: print "[%s] %s" % (time.strftime('%Y/%m/%d %H:%M:%S'), text)
Python
#! /bin/env python # -*- coding: utf-8 -*- # # $Id$ import sqlite3.dbapi2 as sqlite import base64 import os from mylog import * class Settings: def __init__(self): db = os.path.expanduser("~/.fotoalba.db") self.db = db self.con = False self.cur = False def connect(self): log(u"Připojuji se k souboru s n...
Python
#! /bin/env python # -*- coding: utf-8 -*- # # $Id$ from PyQt4 import QtCore,QtGui from fotoalba_main import Ui_fotoalba_main from anakreon import * from mylog import * from settings import * import sys, shutil, os, random, urllib, thread faInst = False mylog.debug = True IMAGE_ID = 1 actualFilename = "" entropy = ra...
Python
#! /bin/env python # -*- coding: utf-8 -*- # # $Id$ #import copy, md5, os, re, socket, string, sys, threading, time, urllib, urllib2, random, traceback from mylog import * import urllib, urllib2, copy, re, hashlib, random, time, socket class xchat: user = "" nick = "" passwd = "" auth = "" ERROR = "" logg...
Python
#! /bin/env python # -*- coding: utf-8 -*- # # $Id: mylog.py 20 2008-01-19 11:02:13Z georgo10 $ import time class mylog: debug = False def log(text, level = 0): if mylog.debug or level == 1: print "[%s] %s" % (time.strftime('%Y/%m/%d %H:%M:%S'), text)
Python
#! /bin/env python # -*- coding: utf-8 -*- # # $Id: anakreon.py 35 2009-03-12 20:03:26Z georgo10 $ #import copy, md5, os, re, socket, string, sys, threading, time, urllib, urllib2, random, traceback from mylog import * import urllib, urllib2, copy, re, hashlib, random, time, socket class xchat: user = "" nick = ...
Python
#! /bin/env python # -*- coding: utf-8 -*- # # $Id: fotoalba.py 34 2008-01-29 20:11:08Z georgo10 $ from PyQt4 import QtCore,QtGui from fotoalba_main import Ui_fotoalba_main from anakreon import * from mylog import * from settings import * import sys, shutil, os, random, urllib, thread faInst = False mylog.debug = Tru...
Python
#! /bin/env python # -*- coding: utf-8 -*- # # $Id$ import time class mylog: debug = False def log(text, level = 0): if mylog.debug or level == 1: print "[%s] %s" % (time.strftime('%Y/%m/%d %H:%M:%S'), text)
Python
#! /bin/env python # -*- coding: utf-8 -*- # # $Id$ from PyQt4 import QtCore,QtGui from fotoalba_main import Ui_fotoalba_main from anakreon import * from mylog import * import sys, shutil, os, random, urllib faInst = False mylog.debug = True IMAGE_ID = 1 actualFilename = "" entropy = random.randint(0,10000) imageList...
Python
#! /bin/env python # -*- coding: utf-8 -*- # # $Id$ #import copy, md5, os, re, socket, string, sys, threading, time, urllib, urllib2, random, traceback from mylog import * import urllib, urllib2, copy, re, md5, random, time class xchat: user = "" nick = "" passwd = "" auth = "" ERROR = "" logged = 0 ke...
Python
#! /bin/env python # -*- coding: utf-8 -*- # # $Id: mylog.py 20 2008-01-19 11:02:13Z georgo10 $ import time class mylog: debug = False def log(text, level = 0): if mylog.debug or level == 1: print "[%s] %s" % (time.strftime('%Y/%m/%d %H:%M:%S'), text)
Python
#! /bin/env python # -*- coding: utf-8 -*- # # $Id: anakreon.py 23 2008-01-20 15:00:06Z georgo10 $ #import copy, md5, os, re, socket, string, sys, threading, time, urllib, urllib2, random, traceback from mylog import * import urllib, urllib2, copy, re, md5, random, time class xchat: user = "" nick = "" passwd ...
Python
#! /bin/env python # -*- coding: utf-8 -*- # # $Id: fotoalba.py 23 2008-01-20 15:00:06Z georgo10 $ from PyQt4 import QtCore,QtGui from fotoalba_main import Ui_fotoalba_main from anakreon import * from mylog import * import sys, shutil, os, random, urllib faInst = False mylog.debug = True IMAGE_ID = 1 actualFilename =...
Python
# -*- coding: utf-8 -*- import sys sys.path.append("../src/") import fouine samples = [ u"aaポポbbaaa", u"aaポポbbaaac", u"aaポbbaaa", u"aaポポbbacaa"] ptn = u"[ab]+ポポ[ab]+" regex_rule = fouine.RegexRule(ptn) or_rule = fouine.OrRule(range(20)) for sample in samples: print sample, regex_rule.test_match(sample)
Python
#!/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 ...
Python
#!/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 ...
Python
#!/usr/bin/env python # # Copyright (c) 2002, 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 ...
Python
#!/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...
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 # -*- 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 ...
Python
# 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...
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
# 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 (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
# 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) 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...
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
# 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
# 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
# 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 (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...
Python
#!/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...
Python
""" 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...
Python
from __future__ import generators """ httplib2 A caching http interface that supports ETags and gzip to conserve bandwidth. Requires Python 2.3 or later Changelog: 2007-08-18, Rick: Modified so it's able to use a socks proxy if needed. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright...
Python
"""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 ...
Python
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...
Python
# 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...
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
# 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...
Python
# -*- coding:utf-8 -*- #本文件应该直接出现在foxit下面,否则work.db的位置会出错 # Django settings for foxit project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS import os.path par_path = os.path.join(os.path.dirname(__file__),os.pardir) sqlite_db_nam...
Python
# -*- coding:utf-8 -*- #本文件应该直接出现在foxit下面,否则work.db的位置会出错 # Django settings for foxit project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS import os.path sqlite_db_name = os.path.join(os.path.dirname(__file__),'work.db') #便于从别处加...
Python
# Django settings for foxit project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. DATABASE_NAME = 'test.db' # Or pa...
Python
# -*- coding:utf-8 -*- # Django settings for foxit project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS import os.path import os pardir = os.path.normpath(os.path.join(os.path.dirname(__file__),os.pardir)) sqlite_db_name = os.path...
Python
# Django settings for foxit project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS import os.path par_path = os.path.join(os.path.dirname(__file__),os.pardir) grand_path = os.path.join(par_path,os.pardir) sqlite_db_name = os.path.normp...
Python
# Django settings for foxit project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASE_ENGINE = 'postgresql_psycopg2' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. DATABASE_NAME = 'wolfox' ...
Python
# Django settings for foxit project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASE_ENGINE = 'postgresql_psycopg2' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. DATABASE_NAME = 'wolfox' ...
Python
# -*- coding:utf-8 -*- # Django settings for foxit project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS import os.path par_path = os.path.join(os.path.dirname(__file__),os.pardir) sqlite_db_name = os.path.normpath(os.path.join(par_pa...
Python
# -*- coding: utf-8 -*- #这个独立的文件是为了避免在init_base中全局范围内import setup_environ和settings if __name__ == '__main__': from django.core.management import setup_environ import wolfox.foxit.settings as settings setup_environ(settings) from wolfox.foxit.conf.init_base import init_it init_it() ...
Python
# -*- coding: utf-8 -*- import os.path import os if 'DJANGO_SETTINGS_MODULE' not in os.environ: from django.core.management import setup_environ import wolfox.foxit.settings as settings setup_environ(settings) from django.db import transaction from wolfox.foxit.dune.models import Country,City,...
Python
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll ha...
Python
# -*- coding:utf-8 -*- #depreated 已经被废弃 import sys import logging from numpy import * from django.db import connection from wolfox.foxit.dune.models import XDayQuote,StockCode #,Report from wolfox.foxit.dune.store import NormalStore logger = logging.getLogger("dune.sql_helper") class DynData(object...
Python
# -*- coding:utf-8 -*- ''' 计算调度的核心类 ''' class Controller(object): ''' 计算调度类 需要按照 init(...) ==> prepare(...) ==> run(...) ==> output(...)的顺序调用 职责: 根据配置对象,创建tasks,并验证合法性. 在执行循环过程中,为tasks准备需要的数据并按每个stock执行它,但不从task接收返回值 控制整个stock相关的元信息,如板块归属...
Python
# -*- coding: utf-8 -*- from django.db import models class Country(models.Model): code = models.CharField(max_length=2,primary_key=True) name = models.CharField(max_length=16,unique=True) is_active = models.BooleanField(default=True) class Admin: list_display = ('code','name') ...
Python
# -*- coding: utf-8 -*- import unittest import logging logging.basicConfig(filename="test.log",level=logging.DEBUG,format='%(name)s:%(funcName)s:%(lineno)d:%(asctime)s %(levelname)s %(message)s') from wolfox.foxit.dune.test_common import prepare,clean #用到的v1.0相关模块的测试 from wolfox.foxit.source.fxj_test import...
Python
# -*- coding: utf-8 -*- ''' SqlStore/NormalStore的测试类 测试原则:逐步编织和完善测试网, 拒绝一步到位,也拒绝同样错误再次漏过. 验证主功能走通并正确 对于边界情况和异常流程,在发生错误时定位捕获. 初步时可只针对重要情况做事先测试,也可不做。 ''' from unittest import TestCase #from django.test import TestCase from wolfox.foxit.dune.test_common import prepare,clean,fetch_in...
Python