code stringlengths 1 1.72M | language stringclasses 1
value |
|---|---|
import os
from distutils.core import setup, Extension
try:
from Cython.Distutils import build_ext
sources = ["ffvideo/ffvideo.pyx"]
cmdclass = {'build_ext': build_ext}
except ImportError:
sources = ["ffvideo/ffvideo.c"]
cmdclass = {}
def read(fn):
return open(os.path.join(os.path.dirname(__fil... | 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 |
"""
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 |
# 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 |
# 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 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) 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
# -*- 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 (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 2011 Google Inc. All Rights Reserved.
"""Locked file interface that should work on Unix and Windows pythons.
This module first tries to use fcntl locking to ensure serialized access
to a file, then falls back on a lock file if that is unavialable.
Usage:
f = LockedFile('filename', 'r+b', 'rb')
f.... | Python |
__version__ = "1.0c2"
| 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 |
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 |
# 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) 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 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 |
# 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 |
__version__ = "1.0c2"
| 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 |
# 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 |
#!/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 |
"""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 |
"""
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 |
#!/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 |
# exWx/setup.py
#
## python setup.py py2exe
#
from distutils.core import setup
import matplotlib
import py2exe
#
####################################
PyAppName = "easymgf.pyw"
AppName = "EasierMgf"
AppVers = "0.1"
Icon = 'images//easiermgf.ico'
####################################
#
setup(
windows = [
... | Python |
import os
import wx
import re
import sys
import subprocess
from literate import Literate
from easier_frame import MyEasierFrame
from easier_mgf_builders import build_mgf_from_dtas
from easier_mgf_builders import add_quant_to_cid, build_mgf
from easier_mgf_builders import build_mgfs_from_mzxml
from easier_mgf_builders i... | Python |
import wx
from literate import Literate
from readw4mascot2 import ReAdw4Mascot2Panel
from extractmsnclassic import ExtractMsnClassicPanel
from extractmsncom import ExtractMsnComPanel
from readw import ReAdWPanel
#
#
class LiterateReAdW(ReAdWPanel, Literate):
""
hints = dict(
centroid = ('ckbx_centro... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
"""
easier_raw_class (psearch_15)
15 de diciembre de 2010
#
#clase que extrae para cada rawfile -> scan -> tr, mslevel...
#
"""
#
import win32com.client as wc
import pywintypes
import time
#
#
#
class RawFileExtractor():
"""Extractor con objeto COM Xrawfile
X... | Python |
import os
import base64
from array import array
from collections import namedtuple
from collections import defaultdict
import xml.etree.ElementTree as et
from xml.parsers.expat import ExpatError
from easier_raw_class import RawFileExtractor, MockExtractor
#
#
#
def decode(text):
"decodifica el texto extraido de una... | Python |
import wx
try:
from agw import balloontip as BT
except ImportError: # if it's not there locally, try the wxPython lib.
import wx.lib.agw.balloontip as BT
class Literate():
def __init__(self, hints):
titlefont = wx.Font(9, wx.SWISS, wx.NORMAL, wx.BOLD, True)
hintfont = wx.Font(8, ... | Python |
#!/usr/bin/python
# -*- coding: utf8 -*-
#
# SpecGen v5, ontology specification generator tool
# <http://forge.morfeo-project.org/wiki_en/index.php/SpecGen>
#
# Copyright (c) 2003-2008 Christopher Schmidt <crschmidt@crschmidt.net>
# Copyright (c) 2005-2008 Uldis Bojars <uldis.bojars@deri.org>
# Copyright (c) 2007-2008... | Python |
#!/usr/bin/env python
import sys
import string
__author__ = "JoseM Alvarez"
__email__ = "josem.alvarez at josemalvarez dot es"
__version__ = "$Revision: 1.0 $"
def generateBeginFile():
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
print "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xml:... | Python |
FFT Phase Aligner
use $pi?
fftsize=4096
fft of 1&2, 3&4, stored in fft1-4
get magnitude of in1&2, store in array
#compute mags of 12
#it seems that most FFT JSFX plugins in R combine ch1&2 into one blob to be fft'd (as an optimization?)
#it may be fine for their purposes, but since i'm shifting pha... | Python |
#!/usr/bin/env python
#
# Copyright 2009 FriendFeed
#
# 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... | Python |
#-*-coding:utf-8-*-
"""
Partially based on MOO example from http://habrahabr.ru/blogs/PyS60/73951/
"""
import appuifw
appuifw.app.directional_pad = False
appuifw.app.body = appuifw.Text(u'Please update your feed')
appuifw.app.title = u'ff60'
appuifw.app.screen = 'normal'
import sys
import e32
import e32dbm
impor... | Python |
import re
import time
import os,sys
import glob
class Player:
def __init__(self,name):
self.values = {"name":None,"ws_count":0,"ws_high":0,
"crit_count":0,"evades":0,"parries":0,
"hits":0,"misses":0,"swings":0,
"spells":0,"ttlsp... | Python |
import unittest
from zope.testing import doctestunit
from zope.component import testing
from Testing import ZopeTestCase as ztc
from Products.Five import zcml
from Products.Five import fiveconfigure
from Products.PloneTestCase import PloneTestCase as ptc
from Products.PloneTestCase.layer import PloneSite
ptc.setupPlo... | Python |
from zope.app.schema.vocabulary import IVocabularyFactory
from zope.schema.vocabulary import SimpleTerm
from zope.schema.vocabulary import SimpleVocabulary
from zope.interface import implements
class AddableContentTypes(object):
implements(IVocabularyFactory)
def __call__(self, context):
context =... | Python |
"""Common configuration constants
"""
PROJECTNAME = 'fez.atcsv'
ADD_PERMISSIONS = {
# -*- extra stuff goes here -*-
}
| Python |
from zope import schema
from zope.interface import Interface
from zope.app.container.constraints import contains
from zope.app.container.constraints import containers
from fez.atcsv import atcsvMessageFactory as _
class ICSVImport(Interface):
def do_import(portal_type, delimiter, file_path=None, fp=None):
... | Python |
"""Main product initializer
"""
from zope.i18nmessageid import MessageFactory
from fez.atcsv import config
from Products.Archetypes import atapi
from Products.CMFCore import utils
from Products.CMFCore.permissions import setDefaultRoles
# Define a message factory for when this product is internationalised.
# This wi... | Python |
from cStringIO import StringIO
from zope import component
from zope import interface
from zope import schema
from zope.schema.vocabulary import SimpleVocabulary
from z3c.form import field
from z3c.form import form
from z3c.form import button
from z3c.form import validator
from plone.app.z3cform.layout import wrap_form
... | Python |
#
| Python |
import csv
import transaction
import logging
from datetime import datetime
from ZODB.POSException import ConflictError
from zope.interface import implements
from zope.component import adapts
from Products.CMFCore.interfaces import IFolderish
from Products.CMFCore.utils import getToolByName
from fez.atcsv.interfaces imp... | Python |
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
| Python |
# -*- coding: utf-8 -*-
"""
This module contains the tool of fez.atcsv
"""
import os
from setuptools import setup, find_packages
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
version = '0.2'
long_description = '\n'.join([
read('README.rst') ,
read('docs/HISTORY.r... | Python |
import unittest
from zope.testing import doctestunit
from zope.component import testing
from Testing import ZopeTestCase as ztc
from Products.Five import zcml
from Products.Five import fiveconfigure
from Products.PloneTestCase import PloneTestCase as ptc
from Products.PloneTestCase.layer import PloneSite
ptc.setupPlo... | Python |
from zope.app.schema.vocabulary import IVocabularyFactory
from zope.schema.vocabulary import SimpleTerm
from zope.schema.vocabulary import SimpleVocabulary
from zope.interface import implements
class AddableContentTypes(object):
implements(IVocabularyFactory)
def __call__(self, context):
context =... | Python |
"""Common configuration constants
"""
PROJECTNAME = 'fez.atcsv'
ADD_PERMISSIONS = {
# -*- extra stuff goes here -*-
}
| Python |
from zope import schema
from zope.interface import Interface
from zope.app.container.constraints import contains
from zope.app.container.constraints import containers
from fez.atcsv import atcsvMessageFactory as _
class ICSVImport(Interface):
def do_import(portal_type, delimiter, file_path=None, fp=None):
... | Python |
"""Main product initializer
"""
from zope.i18nmessageid import MessageFactory
from fez.atcsv import config
from Products.Archetypes import atapi
from Products.CMFCore import utils
from Products.CMFCore.permissions import setDefaultRoles
# Define a message factory for when this product is internationalised.
# This wi... | Python |
from cStringIO import StringIO
from zope import component
from zope import interface
from zope import schema
from zope.schema.vocabulary import SimpleVocabulary
from z3c.form import field
from z3c.form import form
from z3c.form import button
from z3c.form import validator
from plone.app.z3cform.layout import wrap_form
... | Python |
#
| Python |
import csv
from ZODB.POSException import ConflictError
from zope.interface import implements
from zope.component import adapts
from Products.CMFCore.interfaces import IFolderish
from fez.atcsv.interfaces import ICSVImport
minimise_every = 100
class CSVImport(object):
implements(ICSVImport)
adapts(IFolderish)
... | Python |
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
| Python |
# -*- coding: utf-8 -*-
"""
This module contains the tool of fez.atcsv
"""
import os
from setuptools import setup, find_packages
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
version = '0.1'
long_description = (
read('README.txt')
+ '\n' +
'Change history\n'
... | Python |
import unittest
from zope.testing import doctestunit
from zope.component import testing
from Testing import ZopeTestCase as ztc
from Products.Five import zcml
from Products.Five import fiveconfigure
from Products.PloneTestCase import PloneTestCase as ptc
from Products.PloneTestCase.layer import PloneSite
ptc.setupPlo... | Python |
from zope.app.schema.vocabulary import IVocabularyFactory
from zope.schema.vocabulary import SimpleTerm
from zope.schema.vocabulary import SimpleVocabulary
from zope.interface import implements
class AddableContentTypes(object):
implements(IVocabularyFactory)
def __call__(self, context):
context =... | Python |
"""Common configuration constants
"""
PROJECTNAME = 'fez.atcsv'
ADD_PERMISSIONS = {
# -*- extra stuff goes here -*-
}
| Python |
from zope import schema
from zope.interface import Interface
from zope.app.container.constraints import contains
from zope.app.container.constraints import containers
from fez.atcsv import atcsvMessageFactory as _
class ICSVImport(Interface):
def do_import(portal_type, delimiter, file_path=None, fp=None):
... | Python |
"""Main product initializer
"""
from zope.i18nmessageid import MessageFactory
from fez.atcsv import config
from Products.Archetypes import atapi
from Products.CMFCore import utils
from Products.CMFCore.permissions import setDefaultRoles
# Define a message factory for when this product is internationalised.
# This wi... | Python |
from cStringIO import StringIO
from zope import component
from zope import interface
from zope import schema
from zope.schema.vocabulary import SimpleVocabulary
from z3c.form import field
from z3c.form import form
from z3c.form import button
from z3c.form import validator
from plone.app.z3cform.layout import wrap_form
... | Python |
#
| Python |
import csv
import transaction
import logging
from datetime import datetime
from ZODB.POSException import ConflictError
from zope.interface import implements
from zope.component import adapts
from Products.CMFCore.interfaces import IFolderish
from Products.CMFCore.utils import getToolByName
from fez.atcsv.interfaces imp... | Python |
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
| Python |
# -*- coding: utf-8 -*-
"""
This module contains the tool of fez.atcsv
"""
import os
from setuptools import setup, find_packages
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
version = '0.25'
long_description = '\n'.join([
read('README.rst') ,
read('docs/HISTORY.... | Python |
SConscript(['components/SConscript'])
| Python |
import sys, os, string
platform = sys.platform
##try:
## geckosdk = os.environ['GECKO_SDK']
## if geckosdk[-1] != os.sep: geckosdk += os.sep
##except:
## print "Please set environment variable GECKO_SDK first."
## sys.exit(1)
xulrunner_sdk = '/home/guohuan/tmp/xulrunner/1.9b3/xulrunner-sdk/'
geckosdk = xu... | Python |
#!/usr/bin/env python
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# This is a utility script for implementing a Go build slave.
import binascii
import httplib
import os
import struct
import subprocess
impo... | Python |
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# This is the server part of the continuous build system for Go. It must be run
# by AppEngine.
from google.appengine.api import memcache
from google.appengine.ru... | Python |
# Copyright 2010 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# This is the server part of the package dashboard.
# It must be run by App Engine.
mail_to = "adg@golang.org"
mail_from = "Go Dashboard <adg@golang.org>"... | Python |
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
import multiprocessing
| Python |
from __future__ import division
from itertools import *
import math
import operator
import re
import xml.dom
import weakref
from xpath.exceptions import *
import xpath
#
# Data model functions.
#
def string_value(node):
"""Compute the string-value of a node."""
if (node.nodeType == node.DOCUMENT_NODE or
... | Python |
class XPathError(Exception):
"""Base exception class used for all XPath exceptions."""
class XPathNotImplementedError(XPathError):
"""Raised when an XPath expression contains a feature of XPath which
has not been implemented.
"""
class XPathParseError(XPathError):
"""Raised when an XPath express... | Python |
from xpath.exceptions import *
import xpath.exceptions
import xpath.expr
import xpath.parser
import xpath.yappsrt
__all__ = ['find', 'findnode', 'findvalue', 'XPathContext', 'XPath']
__all__.extend((x for x in dir(xpath.exceptions) if not x.startswith('_')))
def api(f):
"""Decorator for functions and methods that... | Python |
# Yapps 2.0 Runtime
#
# This module is needed to run generated parsers.
from string import join, count, find, rfind
import re
class SyntaxError(Exception):
"""When we run into an unexpected token, this is the exception to use"""
def __init__(self, pos=-1, msg="Bad Token"):
Exception.__init__(self)
se... | Python |
import xpath.expr as X
from xpath.yappsrt import *
from string import *
import re
class XPathScanner(Scanner):
patterns = [
("r'\\:'", re.compile('\\:')),
("r'node'", re.compile('node')),
("r'text'", re.compile('text')),
("r'comment'", re.compile('comment')),
("r'processin... | Python |
import cgi
import os
import re
import urllib
import urlparse
import mimetypes
import xpath
from xml.dom import minidom
from xml.sax import saxutils
from django.utils import simplejson
from google.appengine.api import urlfetch
from google.appengine.api.urlfetch import DownloadError
from google.appengine... | Python |
#!/usr/bin/python
# Capture 3 seconds of stereo audio from alsa_pcm:capture_1/2; then play it back.
#
# Copyright 2003, Andrew W. Schmeder
# This source code is released under the terms of the GNU Public License.
# See LICENSE for the full text of these terms.
import Numeric
import jack
import time
from numpy.fft impo... | Python |
#!/usr/bin/python
# Capture 3 seconds of stereo audio from alsa_pcm:capture_1/2; then play it back.
#
# Copyright 2003, Andrew W. Schmeder
# This source code is released under the terms of the GNU Public License.
# See LICENSE for the full text of these terms.
import Numeric
import jack
import time
from numpy.fft impo... | Python |
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http://www.gnu.org/license... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | Python |
#!/usr/bin/env python
"""
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or l... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | Python |
Subsets and Splits
SQL Console for ajibawa-2023/Python-Code-Large
Provides a useful breakdown of language distribution in the training data, showing which languages have the most samples and helping identify potential imbalances across different language groups.