repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
unsiloai/syntaxnet-ops-hack
tensorflow/contrib/distributions/python/ops/vector_exponential_linear_operator.py
29
10509
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
apache-2.0
samno1607/Xperia-Z-Source-Differences-JB
tools/perf/scripts/python/sched-migration.py
11215
11670
#!/usr/bin/python # # Cpu task migration overview toy # # Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com> # # perf script event handlers have been generated by perf script -g python # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Fre...
gpl-2.0
boompieman/iim_project
project_python2/lib/python2.7/site-packages/pygments/lexers/javascript.py
21
57129
# -*- coding: utf-8 -*- """ pygments.lexers.javascript ~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for JavaScript and related languages. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, ...
gpl-3.0
jimporter/bfg9000
test/unit/shell/test_shell.py
1
5850
import sys from unittest import mock from .. import * from bfg9000.path import Root from bfg9000.safe_str import jbos from bfg9000.shell import (CalledProcessError, convert_args, execute, Mode, split_paths, which) base_dirs = { Root.srcdir: '$(srcdir)', Root.builddir: None, } cla...
bsd-3-clause
chen0510566/MissionPlanner
Lib/site-packages/scipy/fftpack/tests/test_pseudo_diffs.py
51
13589
#!"C:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\ipy.exe" # Created by Pearu Peterson, September 2002 """ Test functions for fftpack.pseudo_diffs module """ __usage__ = """ Build fftpack: python setup_fftpack.py build Run tests if scipy is installed: python -c 'import scip...
gpl-3.0
Venturi/oldcms
env/lib/python2.7/site-packages/cms/test_utils/project/sampleapp/urls.py
50
1288
from django.conf.urls import url, include from django.utils.translation import ugettext_lazy as _ from . import views """ Also used in cms.tests.ApphooksTestCase """ urlpatterns = [ url(r'^$', views.sample_view, {'message': 'sample root page',}, name='sample-root'), url(r'^exempt/$', views.exempt_view, {'mess...
apache-2.0
ddurst/zamboni
mkt/inapp/tests/test_serializers.py
20
2406
import mock from nose.tools import eq_, ok_ from requests.exceptions import RequestException from mkt.inapp.serializers import InAppProductSerializer from .test_views import BaseInAppProductViewSetTests class TestInAppProductSerializer(BaseInAppProductViewSetTests): def post(self, **kw): if 'data' not ...
bsd-3-clause
18F/github-issue-lifecycle
app/models.py
1
15856
import itertools import os from collections import OrderedDict from datetime import date, datetime, timedelta import requests from requests.auth import HTTPBasicAuth from . import db from .app import app from .utils import to_py_datetime GH_DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ' BEGINNING_OF_TIME = '1970-01-01T00:00:00Z...
cc0-1.0
TobbeEdgeware/shaka-player
third_party/gjslint/closure_linter-2.3.13/closure_linter/error_fixer.py
24
20313
#!/usr/bin/env python # # Copyright 2007 The Closure Linter Authors. All Rights Reserved. # # 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 #...
apache-2.0
aisipos/django
tests/view_tests/models.py
281
1329
""" Regression tests for Django built-in views. """ from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Author(models.Model): name = models.CharField(max_length=100) def __str__(self): return self.name def get_absolute_ur...
bsd-3-clause
louietsai/python-for-android
python3-alpha/python3-src/Lib/test/test_quopri.py
171
7715
from test import support import unittest import sys, os, io, subprocess import quopri ENCSAMPLE = b"""\ Here's a bunch of special=20 =A1=A2=A3=A4=A5=A6=A7=A8=A9 =AA=AB=AC=AD=AE=AF=B0=B1=B2=B3 =B4=B5=B6=B7=B8=B9=BA=BB=BC=BD=BE =BF=C0=C1=C2=C3=C4=C5=C6 =C7=C8=C9=CA=CB=CC=CD=CE=CF =D0=D1=D2=D3=D4=D5=D6=D7 =D8=D9=DA=D...
apache-2.0
cscutcher/naruto-aufs-layers
naruto/cli.py
1
8374
# -*- coding: utf-8 -*- """ Main group for naruto cli """ import io import logging import os import pathlib import shutil import click from naruto import NarutoLayer, LayerNotFound DEV_LOGGER = logging.getLogger(__name__) DEFAULT_NARUTO_HOME = pathlib.Path(os.path.expanduser('~/.naruto')) DEFAULT_LOG_LEVEL = logging...
gpl-3.0
alangwansui/mtl_ordercenter
openerp/report/render/rml2pdf/utils.py
48
7022
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2003, Fabien Pinckaers, UCL, FSA # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesse...
agpl-3.0
ee08b397/LintCode-1
Convert Integer A to Integer B.py
4
1433
""" Determine the number of bits required to convert integer A to integer B Example Given n = 31, m = 14,return 2 (31)10=(11111)2 (14)10=(01110)2 """ __author__ = 'Danyang' class Solution: def bitSwapRequired(self, a, b): """ :param a: :param b: :return: int """ ...
apache-2.0
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/PyQt4/uic/port_v3/string_io.py
3
1350
############################################################################# ## ## Copyright (c) 2014 Riverbank Computing Limited <info@riverbankcomputing.com> ## ## This file is part of PyQt. ## ## This file may be used under the terms of the GNU General Public ## License versions 2.0 or 3.0 as published by the Fre...
gpl-3.0
aloknayak29/geolocation-service
lib/werkzeug/exceptions.py
316
17799
# -*- coding: utf-8 -*- """ werkzeug.exceptions ~~~~~~~~~~~~~~~~~~~ This module implements a number of Python exceptions you can raise from within your views to trigger a standard non-200 response. Usage Example ------------- :: from werkzeug.wrappers import BaseRequest ...
apache-2.0
jonyroda97/redbot-amigosprovaveis
data/downloader/cogs/fourinarow/fourinarow.py
2
92138
from .utils.dataIO import fileIO from .utils import checks from __main__ import send_cmd_help from __main__ import settings as bot_settings # Sys. import discord from discord.ext import commands from operator import itemgetter, attrgetter from copy import deepcopy import random import os import sys import time import l...
gpl-3.0
zhangg/trove
integration/tests/integration/tests/volumes/driver.py
1
21014
# Copyright (c) 2012 OpenStack, LLC. # All Rights Reserved. # # 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 requi...
apache-2.0
eric-stanley/selenium
py/test/selenium/webdriver/common/element_equality_tests.py
68
1943
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
totallybradical/temp_servo2
tests/wpt/css-tests/tools/py/testing/root/test_builtin.py
217
5177
import sys import types import py from py.builtin import set, frozenset, reversed, sorted def test_enumerate(): l = [0,1,2] for i,x in enumerate(l): assert i == x def test_any(): assert not py.builtin.any([0,False, None]) assert py.builtin.any([0,False, None,1]) def test_all(): assert not...
mpl-2.0
pas256/troposphere
troposphere/servicecatalog.py
1
4652
# Copyright (c) 2012-2018, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty, Tags from .validators import boolean class AcceptedPortfolioShare(AWSObject): resource_type = "AWS::ServiceCatalog::AcceptedPortfolioShare" props = { ...
bsd-2-clause
robertmattmueller/sdac-compiler
tests/test_normalization.py
1
1628
try: # Python 2 from StringIO import StringIO except ImportError: # Python 3 from io import StringIO import pddl from pddl_to_prolog import Rule, PrologProgram def test_normalization(): prog = PrologProgram() prog.add_fact(pddl.Atom("at", ["foo", "bar"])) prog.add_fact(pddl.Atom("truck", [...
gpl-3.0
moijes12/oh-mainline
vendor/packages/whoosh/src/whoosh/lang/dmetaphone.py
21
18640
# coding= utf-8 # This script implements the Double Metaphone algorythm (c) 1998, 1999 by # Lawrence Philips. It was translated to Python from the C source written by # Kevin Atkinson (http://aspell.net/metaphone/) By Andrew Collins - January 12, # 2007 who claims no rights to this work. # http://atomboy.isa-geek.com:...
agpl-3.0
andreif/django
tests/gis_tests/layermap/models.py
235
2523
from django.utils.encoding import python_2_unicode_compatible from ..models import models @python_2_unicode_compatible class NamedModel(models.Model): name = models.CharField(max_length=25) objects = models.GeoManager() class Meta: abstract = True required_db_features = ['gis_enabled'] ...
bsd-3-clause
RuanJG/uTouch-kernel
Documentation/networking/cxacru-cf.py
14668
1626
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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 Foundation; either version 2 of the License, or (at your option) # any later version. # # This program i...
gpl-2.0
fitermay/intellij-community
python/helpers/pydev/pydevd_file_utils.py
4
15289
''' This module provides utilities to get the absolute filenames so that we can be sure that: - The case of a file will match the actual file in the filesystem (otherwise breakpoints won't be hit). - Providing means for the user to make path conversions when doing a remote debugging session in ...
apache-2.0
hazelnusse/sympy-old
bin/adapt_paths.py
12
1073
""" This script adapts import statements in sympy/mpmath/tests to work properly. We want to have this fully automatic, so that we don't have to do it by hand each time we copy files from mpmath to sympy. Usage: $ python bin/adapt_paths.py > /tmp/x $ patch -p0 < /tmp/x You can use the "--dry-run" parameter to 'patch...
bsd-3-clause
imoseyon/leanKernel-d2usc-deprecated
external/webkit/Tools/Scripts/webkitpy/tool/commands/bugfortest.py
21
2379
# 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 list of conditions and the ...
gpl-2.0
jeroen92/reclass
reclass/errors.py
2
6324
# # -*- coding: utf-8 -*- # # This file is part of reclass (http://github.com/madduck/reclass) # # Copyright © 2007–14 martin f. krafft <madduck@madduck.net> # Released under the terms of the Artistic Licence 2.0 # import posix, sys import traceback from reclass.defaults import PARAMETER_INTERPOLATION_SENTINELS clas...
artistic-2.0
suqinhuang/virt-test
shared/scripts/cmd_runner.py
5
2848
""" This script is used to execute a program and collect the monitor information in background, redirect the outputs to log files. """ import threading, shelve, commands, re, os, sys, random, string class Runner(object): def __init__(self): """ Set the global paramter for thread clean up "...
gpl-2.0
jos4uke/getSeqFlankBlatHit
lib/python2.7/site-packages/setuptools/tests/test_sandbox.py
204
1724
"""develop tests """ import sys import os import shutil import unittest import tempfile from setuptools.sandbox import DirectorySandbox, SandboxViolation def has_win32com(): """ Run this to determine if the local machine has win32com, and if it does, include additional tests. """ if not sys.platfo...
gpl-2.0
nrsimha/wagtail
wagtail/wagtailimages/formats.py
31
3289
from django.utils.html import escape from wagtail.utils.apps import get_app_submodules from wagtail.wagtailimages.models import SourceImageIOError class Format(object): def __init__(self, name, label, classnames, filter_spec): self.name = name self.label = label self.classnames = classnam...
bsd-3-clause
dqnykamp/sympy
sympy/crypto/crypto.py
14
47875
# -*- coding: utf-8 -*- """ Classical ciphers and LFSRs """ from __future__ import print_function from random import randrange from sympy import nextprime from sympy.core import Rational, S, Symbol from sympy.core.numbers import igcdex from sympy.matrices import Matrix from sympy.ntheory import isprime, totient, pr...
bsd-3-clause
PyGithub/PyGithub
tests/CommitComment.py
3
4331
############################ Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
lgpl-3.0
jassycliq/flo-kernel
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
jacobajit/ion
intranet/middleware/ldap_db.py
1
1702
# -*- coding: utf-8 -*- import logging from django.contrib import messages from ..db.ldap_db import LDAPConnection logger = logging.getLogger(__name__) class CheckLDAPBindMiddleware: def process_response(self, request, response): if not hasattr(request, "user") or "_auth_user_backend" not in request....
gpl-2.0
elkingtonmcb/rethinkdb
external/v8_3.30.33.16/build/gyp/pylib/gyp/generator/gypsh.py
2779
1665
# Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """gypsh output module gypsh is a GYP shell. It's not really a generator per se. All it does is fire up an interactive Python session with a few local variables...
agpl-3.0
mozilla/addons-server
src/olympia/amo/messages.py
4
2917
from functools import partial from django.contrib import messages as django_messages from django.template import loader from django.utils import safestring import jinja2 from rest_framework.request import Request """ This file was created because AMO wants to have multi-line messages including a title and some con...
bsd-3-clause
sekikn/incubator-airflow
tests/providers/google/ads/operators/test_ads.py
7
3148
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
Zord13appdesa/python-for-android
python3-alpha/python3-src/Lib/ctypes/test/test_parameters.py
50
6532
import unittest, sys class SimpleTypesTestCase(unittest.TestCase): def setUp(self): import ctypes try: from _ctypes import set_conversion_mode except ImportError: pass else: self.prev_conv_mode = set_conversion_mode("ascii", "strict") def te...
apache-2.0
BT-ojossen/odoo
openerp/report/render/rml2txt/rml2txt.py
442
16460
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009, P. Christeas, Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or ...
agpl-3.0
adamobeng/ibis
ibis/__init__.py
6
3678
# Copyright 2014 Cloudera 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 writing, so...
apache-2.0
nwjs/chromium.src
third_party/blink/tools/blinkpy/web_tests/layout_package/bot_test_expectations.py
1
13338
# Copyright (C) 2013 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 list of conditions and the ...
bsd-3-clause
beni55/edx-platform
common/lib/xmodule/xmodule/graders.py
27
17315
import abc import inspect import logging import random import sys from collections import namedtuple log = logging.getLogger("edx.courseware") # This is a tuple for holding scores, either from problems or sections. # Section either indicates the name of the problem or the name of the section Score = namedtuple("Scor...
agpl-3.0
petteyg/intellij-community
python/helpers/pydev/pydevd_attach_to_process/attach_pydevd.py
86
2001
import sys import os def process_command_line(argv): setup = {} setup['port'] = 5678 # Default port for PyDev remote debugger setup['pid'] = 0 setup['host'] = '127.0.0.1' i = 0 while i < len(argv): if argv[i] == '--port': del argv[i] setup['port'] = int(argv[i]...
apache-2.0
dracony/scrapy
tests/test_pipeline_files.py
5
11099
import os import time import hashlib import warnings from tempfile import mkdtemp from shutil import rmtree from six.moves.urllib.parse import urlparse from six import BytesIO from twisted.trial import unittest from twisted.internet import defer from scrapy.pipelines.files import FilesPipeline, FSFilesStore, S3FilesS...
bsd-3-clause
amarfurt/arr
remote.py
1
1112
""" Starts the remote control worker. """ import os import logging import argparse from workers.controller import Controller def parse_args(): parser = argparse.ArgumentParser(description='Starts the remote control worker.') parser.add_argument('--logpath', default=os.path.expanduser('~/logs/arr.log'), ...
mit
mpdavis/python-jose
tests/test_jwk.py
1
5083
import pytest from jose import jwk from jose.backends import AESKey, ECKey, HMACKey, RSAKey from jose.backends.base import Key from jose.exceptions import JWKError hmac_key = { "kty": "oct", "kid": "018c0ae5-4d9b-471b-bfd6-eef314bc7037", "use": "sig", "alg": "HS256", "k": "hJtXIZ2uSN5kbQfbtTNWbpdm...
mit
wluizguedes/namebench
nb_third_party/jinja2/bccache.py
284
9994
# -*- coding: utf-8 -*- """ jinja2.bccache ~~~~~~~~~~~~~~ This module implements the bytecode cache system Jinja is optionally using. This is useful if you have very complex template situations and the compiliation of all those templates slow down your application too much. Situations whe...
apache-2.0
migasfree/migasfree
migasfree/catalog/migrations/0003_4_14_packages_by_project.py
1
2349
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import migasfree.server.models.common class Migration(migrations.Migration): dependencies = [ ('server', '0022_4_14_computers'), ('catalog', '0002_4_14_versi...
gpl-3.0
robertostling/bnas
bnas/model.py
1
50808
"""Network models and submodels. The :class:`Model` class is used to encapsulate a set of Theano shared variables (model parameters), and can create symbolic expressions for model outputs and loss functions. This module also contains subclasses, such as :class:`Linear`, that function as building blocks for more compl...
gpl-3.0
wewea/shadowsocks
shadowsocks/encrypt.py
990
5180
#!/usr/bin/env python # # Copyright 2012-2015 clowwindy # # 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 la...
apache-2.0
ysyrov/yaml-cpp
test/gmock-1.7.0/test/gmock_leak_test.py
779
4384
#!/usr/bin/env python # # Copyright 2009, 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 list...
mit
Emergya/icm-openedx-educamadrid-platform-basic
common/lib/xmodule/xmodule/error_module.py
115
7587
""" Modules that get shown to the users when an error has occurred while loading or rendering other modules """ import hashlib import logging import json import sys from lxml import etree from xmodule.x_module import XModule, XModuleDescriptor from xmodule.errortracker import exc_info_to_str from xblock.fields import...
agpl-3.0
levilucio/SyVOLT
UMLRT2Kiltera_MM/MT_pre__Print.py
1
8784
""" __MT_pre__Print.py_____________________________________________________ Automatically generated AToM3 syntactic object (DO NOT MODIFY DIRECTLY) Author: gehan Modified: Sun Feb 15 10:22:15 2015 _______________________________________________________________________ """ from ASGNode import * from ATOM3Type import *...
mit
crcresearch/osf.io
osf_tests/test_quickfiles.py
8
7154
import mock import pytest from framework.auth.core import Auth from osf.models import QuickFilesNode from addons.osfstorage.models import OsfStorageFile from osf.exceptions import MaxRetriesError from api_tests.utils import create_test_file from tests.utils import assert_items_equal from tests.base import get_default_...
apache-2.0
clinton-hall/nzbToMedia
libs/common/dateutil/easter.py
34
2684
# -*- coding: utf-8 -*- """ This module offers a generic easter computing method for any given year, using Western, Orthodox or Julian algorithms. """ import datetime __all__ = ["easter", "EASTER_JULIAN", "EASTER_ORTHODOX", "EASTER_WESTERN"] EASTER_JULIAN = 1 EASTER_ORTHODOX = 2 EASTER_WESTERN = 3 def easter(year,...
gpl-3.0
lmyrefelt/CouchPotatoServer
libs/cssutils/css/value.py
5
33736
"""Value related classes. DOM Level 2 CSS CSSValue, CSSPrimitiveValue and CSSValueList are **no longer** supported and are replaced by these new classes. """ __all__ = ['PropertyValue', 'Value', 'ColorValue', 'DimensionValue', 'URIValue', 'CSSFunction', ...
gpl-3.0
sivaprakashniet/push_pull
p2p/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/_base.py
169
6718
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type import gettext _ = gettext.gettext from ..constants import voidElements, spaceCharacters spaceCharacters = "".join(spaceCharacters) class TreeWalker(object): def __init__(self, tree): self.tree = tre...
bsd-3-clause
Exirel/python-xmlunittest
test.py
1
55350
# -*- coding: utf-8 -*- from __future__ import unicode_literals import io import os import unittest from lxml import etree from xmlunittest import XmlTestCase DEFAULT_NS = 'https://www.w3.org/XML' TEST_NS = 'https://docs.python.org/3.4/library/unittest.html' class TestXmlTestCase(unittest.TestCase): """Test ...
mit
cyliustack/sofa
bin/sofa_analyze.py
1
50661
import argparse import matplotlib matplotlib.use('agg') import csv import json import multiprocessing as mp import os import random import re import sys from functools import partial from operator import attrgetter, itemgetter import networkx as nx import numpy as np import pandas as pd import time from sofa_aisi impor...
apache-2.0
fangeugene/trajopt
ext/gtest/test/gtest_list_tests_unittest.py
1068
5415
#!/usr/bin/env python # # Copyright 2006, 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 list...
bsd-2-clause
nishad-jobsglobal/odoo-marriot
addons/account/project/wizard/__init__.py
427
1337
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
mydongistiny/external_chromium_org
tools/perf/measurements/loading_measurement_analyzer.py
43
7062
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Parses CSV output from the loading_measurement and outputs interesting stats. Example usage: $ tools/perf/run_measurement --browser...
bsd-3-clause
ampax/edx-platform
common/lib/xmodule/xmodule/tests/test_poll.py
227
1133
# -*- coding: utf-8 -*- """Test for Poll Xmodule functional logic.""" from xmodule.poll_module import PollDescriptor from . import LogicTest class PollModuleTest(LogicTest): """Logic tests for Poll Xmodule.""" descriptor_class = PollDescriptor raw_field_data = { 'poll_answers': {'Yes': 1, 'Dont_kn...
agpl-3.0
FiloSottile/youtube-dl
youtube_dl/extractor/buzzfeed.py
133
2815
# coding: utf-8 from __future__ import unicode_literals import json import re from .common import InfoExtractor class BuzzFeedIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?buzzfeed\.com/[^?#]*?/(?P<id>[^?#]+)' _TESTS = [{ 'url': 'http://www.buzzfeed.com/abagg/this-angry-ram-destroys-a-punchin...
unlicense
mancoast/CPythonPyc_test
cpython/161_re_tests.py
2
28322
#!/usr/bin/env python # -*- mode: python -*- # $Id: re_tests.py,v 1.13 1998/04/03 21:47:12 guido Exp $ # Re test suite and benchmark suite v1.5 # The 3 possible outcomes for each pattern [SUCCEED, FAIL, SYNTAX_ERROR] = range(3) # Benchmark suite (needs expansion) # # The benchmark suite does not test correctness, ju...
gpl-3.0
pilou-/ansible
lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset.py
12
14770
#!/usr/bin/python # # Copyright (c) 2017 Obezimnaka Boms, <t-ozboms@microsoft.com> # Copyright (c) 2017 Ansible Project # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA ...
gpl-3.0
bally12345/enigma2
lib/python/Tools/NumericalTextInput.py
3
3523
# -*- coding: UTF-8 -*- from enigma import eTimer from Components.Language import language # Dict languageCode -> array of strings MAP_SEARCH = ( u"%_0", u" 1", u"abc2", u"def3", u"ghi4", u"jkl5", u"mno6", u"pqrs7", u"tuv8", u"wxyz9", ) MAP_SEARCH_UPCASE = ( U"0%_", U"1 ", U"ABC2", U"DEF3", U"GHI4", U...
gpl-2.0
andmaj/rrr-size
sdsl/lib/src/sdsl/gtest-1.6.0/test/gtest_uninitialized_test.py
2901
2480
#!/usr/bin/env python # # Copyright 2008, 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 list...
gpl-3.0
vegitron/ansible
contrib/inventory/zabbix.py
86
4168
#!/usr/bin/env python # (c) 2013, Greg Buehler # # This file is part of Ansible, # # Ansible 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 Foundation, either version 3 of the License, or # (at your option) any later ve...
gpl-3.0
Laimiux/mydeatree
django/contrib/gis/gdal/prototypes/srs.py
321
3378
from ctypes import c_char_p, c_int, c_void_p, POINTER from django.contrib.gis.gdal.libgdal import lgdal, std_call from django.contrib.gis.gdal.prototypes.generation import \ const_string_output, double_output, int_output, \ srs_output, string_output, void_output ## Shortcut generation for routines with known p...
bsd-3-clause
RevelSystems/django
django/contrib/syndication/views.py
106
8737
from __future__ import unicode_literals from calendar import timegm from django.conf import settings from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.http import Http404, HttpResponse from django.template import Templat...
bsd-3-clause
aweisberg/cassandra-dtest
tools/metadata_wrapper.py
4
3263
from abc import ABCMeta, abstractproperty class UpdatingMetadataWrapperBase(object, metaclass=ABCMeta): @abstractproperty def _wrapped(self): pass def __getattr__(self, name): return getattr(self._wrapped, name) def __getitem__(self, idx): return self._wrapped[idx] class Up...
apache-2.0
zhanqxun/cv_fish
PIL/BdfFontFile.py
26
3343
# # The Python Imaging Library # $Id$ # # bitmap distribution font (bdf) file parser # # history: # 1996-05-16 fl created (as bdf2pil) # 1997-08-25 fl converted to FontFile driver # 2001-05-25 fl removed bogus __init__ call # 2002-11-20 fl robustification (from Kevin Cazabon, Dmitry Vasiliev) # 2003-04-22 fl ...
apache-2.0
kenmcc/mypywws
src/pywws/Process.py
1
29489
#!/usr/bin/env python # -*- coding: utf-8 -*- # pywws - Python software for USB Wireless Weather Stations # http://github.com/jim-easterbrook/pywws # Copyright (C) 2008-14 Jim Easterbrook jim@jim-easterbrook.me.uk # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU...
gpl-2.0
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Lib/plat-mac/lib-scriptpackages/StdSuites/Macintosh_Connectivity_Clas.py
81
10843
"""Suite Macintosh Connectivity Classes: Classes relating to Apple Macintosh personal computer connectivity Level 1, version 1 Generated from /Volumes/Sap/System Folder/Extensions/AppleScript AETE/AEUT resource version 1/0, language 0, script 0 """ import aetools import MacOS _code = 'macc' class Macintosh_Connecti...
mit
timahutchinson/desispec
py/desispec/log.py
2
2870
""" desispec.log ============ Utility functions to dump log messages. We can have something specific for DESI in the future but for now we use the standard Python. """ from __future__ import absolute_import, division, print_function import sys import logging import os import string desi_logger = None # just for conv...
bsd-3-clause
basicthinker/THNVM
src/dev/SimpleDisk.py
46
1851
# Copyright (c) 2005-2007 The Regents of The University of Michigan # 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 ...
bsd-3-clause
xolox/python-linux-utils
linux_utils/tabfile.py
1
2307
# linux-utils: Linux system administration tools for Python. # # Author: Peter Odding <peter@peterodding.com> # Last Change: February 9, 2020 # URL: https://linux-utils.readthedocs.io """Generic parsing of Linux configuration files like ``/etc/fstab`` and ``/etc/crypttab``.""" # Standard library modules. import re #...
mit
sassoftware/rmake3
rmake/worker/resolvesource.py
1
30654
# # Copyright (c) SAS Institute 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 w...
apache-2.0
Weicong-Lin/pymo-global
android/pgs4a-0.9.6/python-install/lib/python2.7/test/test_curses.py
63
8899
# # Test script for the curses module # # This script doesn't actually display anything very coherent. but it # does call every method and function. # # Functions not tested: {def,reset}_{shell,prog}_mode, getch(), getstr(), # init_color() # Only called, not tested: getmouse(), ungetmouse() # import sys, tempfile, os ...
mit
ProfessionalIT/maxigenios-website
sdk/google_appengine/lib/grizzled/grizzled/config.py
19
33036
''' Introduction ============ Based on the standard Python ``ConfigParser`` module, this module provides an enhanced configuration parser capabilities. ``Configuration`` is a drop-in replacement for ``ConfigParser``. A configuration file is broken into sections, and each section is introduced by a section name in bra...
mit
akostrikov/hadoop-1.2.1-in-action
src/contrib/hod/hodlib/AllocationManagers/goldAllocationManager.py
182
4244
#Licensed to the Apache Software Foundation (ASF) under one #or more contributor license agreements. See the NOTICE file #distributed with this work for additional information #regarding copyright ownership. The ASF licenses this file #to you under the Apache License, Version 2.0 (the #"License"); you may not use thi...
apache-2.0
cdrooom/odoo
addons/account/wizard/account_move_line_select.py
8
2732
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
jeffposnick/chromium-dashboard
cloudstorage/storage_api.py
75
28161
# Copyright 2012 Google Inc. All Rights Reserved. # # 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 ag...
apache-2.0
rajashreer7/autotest-client-tests
linux-tools/dhcp/dhcp.py
4
1163
#!/bin/python import os, subprocess import logging from autotest.client import test from autotest.client.shared import error class dhcp(test.test): """ Autotest module for testing basic functionality of dhcp @author Madhura P S, madhura.ps@in.ibm.com """ version = 1 nfail = 0 path = ...
gpl-2.0
mbayon/TFG-MachineLearning
venv/lib/python3.6/site-packages/pip/req/req_uninstall.py
510
6897
from __future__ import absolute_import import logging import os import tempfile from pip.compat import uses_pycache, WINDOWS, cache_from_source from pip.exceptions import UninstallationError from pip.utils import rmtree, ask, is_local, renames, normalize_path from pip.utils.logging import indent_log logger = loggin...
mit
MarcusJones/ExergyUtilities
tests/test_util_excel.py
2
4414
"""This is a testing module """ #=============================================================================== # Set up #=============================================================================== # Standard: import unittest import os # Logging import logging logging.basicConfig(format='%(funcName)-20s %(level...
lgpl-3.0
aprajshekhar/pulp_packaging
ci/update-version.py
3
7240
#!/usr/bin/env python import glob import os import re import shutil from StringIO import StringIO import sys import argparse from lib import builder VERSION_REGEX = "(\s*)(version)(\s*)(=)(\s*)(['\"])(.*)(['\"])(.*)" RELEASE_REGEX = "(\s*)(release)(\s*)(=)(\s*)(['\"])(.*)(['\"])(.*)" def parse_version(version): ...
gpl-2.0
kingvuplus/PKT-gui
tools/host_tools/FormatConverter/datasource.py
112
2916
from input import inputChoices class datasource: def __init__(self): self.clear() def setDatasources(self, datasources): self.datasources = datasources def getCapabilities(self): return [] def getName(self): return "N/A" def getStatus(self): text = str(len(self.transponderlist.keys())) + " Satellite...
gpl-2.0
songyi199111/sentry
src/sentry/event_manager.py
2
19299
""" sentry.event_manager ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function import logging import math import six from datetime import datetime, timedelta from django....
bsd-3-clause
Hasimir/brython
www/src/Lib/test/test_cmd.py
28
6254
#!/usr/bin/env python3 """ Test script for the 'cmd' module Original by Michael Schneider """ import cmd import sys import re import unittest import io from test import support class samplecmdclass(cmd.Cmd): """ Instance the sampleclass: >>> mycmd = samplecmdclass() Test for the function parseline()...
bsd-3-clause
TangXT/edx-platform
common/djangoapps/config_models/__init__.py
220
2002
""" Model-Based Configuration ========================= This app allows other apps to easily define a configuration model that can be hooked into the admin site to allow configuration management with auditing. Installation ------------ Add ``config_models`` to your ``INSTALLED_APPS`` list. Usage ----- Create a sub...
agpl-3.0
samveen/uselessd
make-directive-index.py
4
10590
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ # # This file is part of systemd. # # Copyright 2012-2013 Zbigniew Jędrzejewski-Szmek # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Softwar...
gpl-2.0
michaelpacer/networkx
networkx/readwrite/nx_yaml.py
42
2503
""" **** YAML **** Read and write NetworkX graphs in YAML format. "YAML is a data serialization format designed for human readability and interaction with scripting languages." See http://www.yaml.org for documentation. Format ------ http://pyyaml.org/wiki/PyYAML """ __author__ = """Aric Hagberg (hagberg@lanl.gov)"...
bsd-3-clause
davidharrigan/django
tests/dbshell/test_postgresql_psycopg2.py
225
3961
# -*- coding: utf8 -*- from __future__ import unicode_literals import locale import os from django.db.backends.postgresql.client import DatabaseClient from django.test import SimpleTestCase, mock from django.utils import six from django.utils.encoding import force_bytes, force_str class PostgreSqlDbshellCommandTest...
bsd-3-clause
40223112/0623test1
static/Brython3.1.1-20150328-091302/Lib/_strptime.py
518
21683
"""Strptime-related classes and functions. CLASSES: LocaleTime -- Discovers and stores locale-specific time information TimeRE -- Creates regexes for pattern matching a string of text containing time information FUNCTIONS: _getlang -- Figure out what language is being used for the locale ...
gpl-3.0
xflin/spark
python/pyspark/ml/param/_shared_params_code_gen.py
36
10025
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
darrenbilby/grr
lib/flows/general/timelines_test.py
5
1939
#!/usr/bin/env python # -*- mode: python; encoding: utf-8 -*- """Tests for the Timelines flow.""" from grr.lib import action_mocks from grr.lib import aff4 from grr.lib import flags from grr.lib import test_lib # pylint: disable=unused-import from grr.lib.flows.general import timelines as _ # pylint: enable=unused-im...
apache-2.0