repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
lovetox/gajim
src/common/jingle_content.py
1
9231
## ## Copyright (C) 2006 Gajim Team ## ## Gajim 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; version 3 only. ## ## Gajim is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; wit...
gpl-3.0
cliffe/SecGen
modules/utilities/unix/audit_tools/ghidra/files/release/Ghidra/Features/Python/data/jython-2.7.1/Lib/collections.py
28
25919
__all__ = ['Counter', 'deque', 'defaultdict', 'namedtuple', 'OrderedDict'] # For bootstrapping reasons, the collection ABCs are defined in _abcoll.py. # They should however be considered an integral part of collections.py. from _abcoll import * import _abcoll __all__ += _abcoll.__all__ from _collections import deque, ...
gpl-3.0
ryfeus/lambda-packs
Spacy/source2.7/spacy/lang/entity_rules.py
3
1732
# coding: utf8 from __future__ import unicode_literals from ..symbols import ORTH, ENT_TYPE, LOWER ENT_ID = "ent_id" ENTITY_RULES = [] for name, tag, patterns in [ ("Reddit", "PRODUCT", [[{LOWER: "reddit"}]]), ("Linux", "PRODUCT", [[{LOWER: "linux"}]]), ("Haskell", "PRODUCT", [[{LOWER: "haskell"}]]), ...
mit
mdxs/test-ttf-on-gae
main/lib/itsdangerous.py
626
31840
# -*- coding: utf-8 -*- """ itsdangerous ~~~~~~~~~~~~ A module that implements various functions to deal with untrusted sources. Mainly useful for web applications. :copyright: (c) 2014 by Armin Ronacher and the Django Software Foundation. :license: BSD, see LICENSE for more details. """ imp...
apache-2.0
Permutatrix/servo
tests/wpt/web-platform-tests/webdriver/tests/support/asserts.py
5
4859
from webdriver import Element, WebDriverException # WebDriver specification ID: dfn-error-response-data errors = { "element click intercepted": 400, "element not selectable": 400, "element not interactable": 400, "insecure certificate": 400, "invalid argument": 400, "invalid cookie domain": 400...
mpl-2.0
yamila-moreno/django
django/contrib/gis/geos/prototypes/prepared.py
288
1214
from ctypes import c_char from django.contrib.gis.geos.libgeos import ( GEOM_PTR, PREPGEOM_PTR, GEOSFuncFactory, ) from django.contrib.gis.geos.prototypes.errcheck import check_predicate # Prepared geometry constructor and destructors. geos_prepare = GEOSFuncFactory('GEOSPrepare', argtypes=[GEOM_PTR], restype=PRE...
bsd-3-clause
shoelzer/buildbot
master/buildbot/util/state.py
11
1756
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
janebeckman/gpdb
gpAux/extensions/pxf/regression/input/regression/createData.py
23
7087
#!/usr/bin/env python """ Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 co...
apache-2.0
geowurster/FS-Nav
fsnav/__init__.py
1
1782
""" FS Nav - File System Navigation shortcuts for the commandline """ from .core import Aliases, CONFIGFILE, DEFAULT_ALIASES __version__ = '0.9.2' __release__ = '2014-06-28' __author__ = 'Kevin Wurster' __email__ = 'wursterk@gmail.com' __source__ = 'https://github.com/geowurster/FS-Nav' __license__ = ''' New BSD Li...
bsd-3-clause
biddisco/VTK
ThirdParty/Twisted/twisted/conch/test/test_scripts.py
41
1874
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for the command-line interfaces to conch. """ try: import pyasn1 except ImportError: pyasn1Skip = "Cannot run without PyASN1" else: pyasn1Skip = None try: import Crypto except ImportError: cryptoSkip = "can't run w...
bsd-3-clause
qsnake/pygments
external/markdown-processor.py
46
1945
# -*- coding: utf-8 -*- """ The Pygments Markdown Preprocessor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This fragment is a Markdown_ preprocessor that renders source code to HTML via Pygments. To use it, invoke Markdown like so:: from markdown import Markdown md = Markdown() md.tex...
bsd-2-clause
cocasse/linux-h3
arch/ia64/scripts/unwcheck.py
13143
1714
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
gpl-2.0
BigTone2009/sms-tools
lectures/09-Sound-description/plots-code/freesoundDownload.py
21
4979
import os, sys import freesound as fs import json # obtain the API key from freesound.org and add it here Key = "????????????" descriptors = [ 'lowlevel.spectral_centroid.mean', 'lowlevel.spectral_centroid.var', 'lowlevel.mfcc.mean', 'lowlevel.mfcc.var', ...
agpl-3.0
imang/gcore_kernel
tools/perf/scripts/python/futex-contention.py
11261
1486
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
gpl-2.0
idncom/odoo
addons/l10n_fr_hr_payroll/l10n_fr_hr_payroll.py
340
2012
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP SA (<http://openerp.com>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under th...
agpl-3.0
funkypawz/MakerRobot
peewee-master/playhouse/migrate.py
11
22700
""" Lightweight schema migrations. NOTE: Currently tested with SQLite and Postgresql. MySQL may be missing some features. Example Usage ------------- Instantiate a migrator: # Postgres example: my_db = PostgresqlDatabase(...) migrator = PostgresqlMigrator(my_db) # SQLite example: my_db = Sqlite...
gpl-3.0
chris-chris/tensorflow
tensorflow/contrib/integrate/python/ops/odes.py
69
20508
# Copyright 2016 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
magfest/ubersystem
alembic/versions/4947b38a18b1_add_confirmed_column.py
1
1940
"""Add confirmed column Revision ID: 4947b38a18b1 Revises: 6aef7396c197 Create Date: 2017-08-06 12:48:43.186696 """ # revision identifiers, used by Alembic. revision = '4947b38a18b1' down_revision = '6aef7396c197' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa import residue ...
agpl-3.0
esaezgil/aiohttp
tests/test_pytest_plugin.py
2
3580
pytest_plugins = 'pytester' def test_myplugin(testdir): testdir.makepyfile("""\ import asyncio import pytest from unittest import mock from aiohttp import web pytest_plugins = 'aiohttp.pytest_plugin' @asyncio.coroutine def hello(request): return web.Response(body=b'Hello, world') def create_app(loop): ...
apache-2.0
wang1352083/pythontool
python-2.7.12-lib/test/test_telnetlib.py
12
16064
import socket import telnetlib import time import Queue import unittest from unittest import TestCase from test import test_support threading = test_support.import_module('threading') HOST = test_support.HOST EOF_sigil = object() def server(evt, serv, dataq=None): """ Open a tcp server in three steps 1) ...
mit
babycaseny/audacity
lib-src/lv2/lv2/waflib/Tools/cs.py
198
4165
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file from waflib import Utils,Task,Options,Logs,Errors from waflib.TaskGen import before_method,after_method,feature from waflib.Tools import ccroot from waflib.Configure import co...
gpl-2.0
develersrl/bertos
wizard/BFinalPage.py
8
4486
#!/usr/bin/env python # encoding: utf-8 # # This file is part of BeRTOS. # # Bertos 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. # #...
gpl-2.0
J861449197/edx-platform
lms/djangoapps/teams/models.py
3
7907
"""Django models related to teams functionality.""" from datetime import datetime from uuid import uuid4 import pytz from datetime import datetime from django.core.exceptions import ObjectDoesNotExist from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver from dj...
agpl-3.0
abelhj/svtools
tests/bedpe_tests.py
1
6338
from unittest import TestCase, main from svtools.bedpe import Bedpe class BedpeTests(TestCase): def test_parse_score(self): self.assertEqual(Bedpe.parse_score('20'), 20) self.assertEqual(Bedpe.parse_score('.'), '.') def test_parse_info_tag(self): self.assertEqual(Bedpe.parse_info_tag('...
mit
craigds/mapnik2
scons/scons-local-1.2.0/SCons/Platform/win32.py
12
12279
"""SCons.Platform.win32 Platform-specific initialization for Win32 systems. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Platform.Platform() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons ...
lgpl-2.1
husigeza/pycom-micropython-sigfox
esp32/tools/lopy_initial_test_board_script.py
2
1475
# # Copyright (c) 2016, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information # see the Pycom Licence v1.0 document supplied with this file, or # available at https://www.pycom.io/opensource/licensing # import time import ...
mit
ntiufalara/openerp7
openerp/addons/account_bank_statement_extensions/report/__init__.py
415
1128
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # i...
mit
shelsonjava/TeaJS
deps/v8/tools/testrunner/local/commands.py
65
5069
# Copyright 2012 the V8 project authors. 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 conditi...
bsd-3-clause
mentionllc/google-visualization-python
examples/dynamic_example.py
13
1525
#!/usr/bin/python # # Copyright (C) 2008 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 ...
apache-2.0
resmo/ansible
lib/ansible/modules/cloud/amazon/iam_role_info.py
12
8310
#!/usr/bin/python # Copyright: 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 = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
zangsir/ANNIS
Misc/pygments-main/pygments/formatters/rtf.py
50
5049
# -*- coding: utf-8 -*- """ pygments.formatters.rtf ~~~~~~~~~~~~~~~~~~~~~~~ A formatter that generates RTF files. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pygments.util import get_i...
apache-2.0
mraspaud/dask
dask/dataframe/tests/test_optimize_dataframe.py
3
1663
import pytest from operator import getitem from toolz import merge import dask from dask.dataframe.optimize import dataframe_from_ctable import dask.dataframe as dd import pandas as pd dsk = {('x', 0): pd.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]}, index=[0, 1, 3]), ('x', 1): pd.D...
bsd-3-clause
manaschaturvedi/oscarbuddy
beautifulsoup-master/bs4/tests/test_docs.py
607
1067
"Test harness for doctests." # pylint: disable-msg=E0611,W0142 __metaclass__ = type __all__ = [ 'additional_tests', ] import atexit import doctest import os #from pkg_resources import ( # resource_filename, resource_exists, resource_listdir, cleanup_resources) import unittest DOCTEST_FLAGS = ( doctes...
mit
soldag/home-assistant
homeassistant/components/netgear_lte/__init__.py
16
11560
"""Support for Netgear LTE modems.""" import asyncio from datetime import timedelta import logging import aiohttp import attr import eternalegypt import voluptuous as vol from homeassistant.components.binary_sensor import DOMAIN as BINARY_SENSOR_DOMAIN from homeassistant.components.notify import DOMAIN as NOTIFY_DOMA...
apache-2.0
vitan/hue
desktop/libs/liboozie/src/liboozie/credentials_tests.py
33
2933
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
fourwood/OutflowCone
Cone.py
1
9228
#!/usr/bin/env python3 import OutflowCone as oc import numpy as np import numpy.ma as ma class Cone: """ Galactic wind outflow cone model. """ def __init__(self, inc=0, PA=0, theta=60, r_in=0.0, r_out=5.0): """ Create a new outflow cone. Keywords: inc --...
mit
siliconsmiley/QGIS
python/plugins/processing/algs/qgis/ExtentFromLayer.py
2
5365
# -*- coding: utf-8 -*- """ *************************************************************************** ExtentFromLayer.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ***********************...
gpl-2.0
ntuecon/server
pyenv/Lib/site-packages/win32com/test/testDCOM.py
4
1701
# testDCOM usage="""\ testDCOM.py - Simple DCOM test Usage: testDCOM.py serverName Attempts to start the Python.Interpreter object on the named machine, and checks that the object is indeed running remotely. Requires the named server be configured to run DCOM (using dcomcnfg.exe), and the Python.Interpreter ...
bsd-3-clause
sameetb-cuelogic/edx-platform-test
cms/djangoapps/contentstore/views/user.py
9
7393
from django.core.exceptions import PermissionDenied from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.views.decorators.http import require_http_methods from django.utils.translation import ugettext as _ from django.views.decorators.http import require_POST...
agpl-3.0
chaowyc/youtube-dl
youtube_dl/extractor/footyroom.py
104
1590
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class FootyRoomIE(InfoExtractor): _VALID_URL = r'http://footyroom\.com/(?P<id>[^/]+)' _TESTS = [{ 'url': 'http://footyroom.com/schalke-04-0-2-real-madrid-2015-02/', 'info_dict': { 'id': 'scha...
unlicense
washort/zamboni
mkt/zadmin/urls.py
11
1837
from django.conf.urls import include, patterns, url from django.contrib import admin from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse from django.shortcuts import redirect from . import views # Hijack the admin's login to use our pages. def login(request): # If som...
bsd-3-clause
DataViva/dataviva-scripts
scripts/crosswalk/format_raw_data.py
1
1434
# -*- coding: utf-8 -*- import os, sys, time, bz2, click import pandas as pd import pandas.io.sql as sql import numpy as np import itertools @click.command() @click.argument('file_path', type=click.Path(exists=True)) @click.option('output_path', '--output', '-o', help='Path to save files to.', type=click.Path(), requi...
mit
goofwear/raspberry_pwn
src/pentest/sqlmap/plugins/dbms/sqlite/connector.py
7
3003
#!/usr/bin/env python """ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ try: import sqlite3 except ImportError: pass import logging from lib.core.convert import utf8encode from lib.core.data import conf from lib.core.data import logger f...
gpl-3.0
JiminHong/mine
node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py
395
12634
#!/usr/bin/env python # Copyright (c) 2012 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. """Utility functions for Windows builds. These functions are executed via gyp-win-tool when using the ninja generator. """ import os impor...
mit
googlecodelabs/gcp-marketplace-integrated-saas
python2.7/impl/database/database.py
2
1736
# Copyright 2018 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
exploreodoo/datStruct
odoo/addons/mail/wizard/invite.py
268
5847
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
gpl-2.0
jbbskinny/sympy
sympy/plotting/experimental_lambdify.py
41
25165
""" rewrite of lambdify - This stuff is not stable at all. It is for internal use in the new plotting module. It may (will! see the Q'n'A in the source) be rewritten. It's completely self contained. Especially it does not use lambdarepr. It does not aim to replace the current lambdify. Most importantly it will never...
bsd-3-clause
play113/swer
opencamlib-read-only/scripts/kdtree_movie1.py
8
5347
import ocl as cam import camvtk import time import vtk import datetime if __name__ == "__main__": myscreen = camvtk.VTKScreen() myscreen.setAmbient(20,20,20) #stl = camvtk.STLSurf(filename="demo.stl") stl = camvtk.STLSurf(filename="demo2.stl") print "STL surface read" myscreen.addActor(s...
mit
boooka/GeoPowerOff
venv/lib/python2.7/site-packages/django/contrib/gis/geometry/test_data.py
105
3009
""" This module has the mock object definitions used to hold reference geometry for the GEOS and GDAL tests. """ import json import os from django.contrib import gis from django.utils import six from django.utils._os import upath # This global used to store reference geometry data. GEOMETRIES = None # Path where re...
apache-2.0
joeythesaint/yocto-autobuilder
lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/protocols/wire.py
63
2359
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """Implement standard (and unused) TCP protocols. These protocols are either provided by inetd, or are not provided at all. """ # system imports import time, struct from zope.interface import implements # twisted import from twisted.internet im...
gpl-2.0
kangkot/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/idlelib/HyperParser.py
58
10293
""" HyperParser =========== This module defines the HyperParser class, which provides advanced parsing abilities for the ParenMatch and other extensions. The HyperParser uses PyParser. PyParser is intended mostly to give information on the proper indentation of code. HyperParser gives some information on the structure ...
apache-2.0
jjmiranda/edx-platform
common/djangoapps/student/tests/test_certificates.py
22
9277
"""Tests for display of certificates on the student dashboard. """ import unittest import ddt import mock from django.conf import settings from django.core.urlresolvers import reverse from mock import patch from django.test.utils import override_settings from xmodule.modulestore import ModuleStoreEnum from xmodule.m...
agpl-3.0
krasin/omim
3party/protobuf/python/google/protobuf/internal/descriptor_database_test.py
73
2924
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
apache-2.0
elena/django
django/template/defaultfilters.py
19
26556
"""Default variable filters.""" import random as random_module import re import types from decimal import ROUND_HALF_UP, Context, Decimal, InvalidOperation from functools import wraps from operator import itemgetter from pprint import pformat from urllib.parse import quote from django.utils import formats from django....
bsd-3-clause
twiest/openshift-tools
openshift/installer/vendored/openshift-ansible-3.7.42-1/roles/openshift_health_checker/test/action_plugin_test.py
33
12200
import pytest from ansible.playbook.play_context import PlayContext from openshift_health_check import ActionModule, resolve_checks from openshift_health_check import copy_remote_file_to_dir, write_result_to_output_dir, write_to_output_file from openshift_checks import OpenShiftCheckException, FileToSave def fake_c...
apache-2.0
slightstone/SickRage
autoProcessTV/lib/requests/auth.py
331
6123
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import re import time import hashlib from base64 import b64encode from .compat import urlparse, str from .cookies import extract_cookies_to_jar from .utils import parse_dict_header ...
gpl-3.0
zarafagroupware/zarafa-zsm
fab/ldap/ldif.py
1
8267
# Copyright 2012 - 2013 Zarafa B.V. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License, version 3, # as published by the Free Software Foundation with the following additional # term according to sec. 7: # # According to sec. 7 of the ...
agpl-3.0
keto/askbot-devel
askbot/deps/livesettings/templatetags/config_tags.py
22
2226
from django import template from django.contrib.sites.models import Site from django.core import urlresolvers from askbot.deps.livesettings import config_value from askbot.deps.livesettings.utils import url_join import logging log = logging.getLogger('configuration.config_tags') register = template.Library() def for...
gpl-3.0
kobejean/tensorflow
tensorflow/contrib/seq2seq/python/kernel_tests/beam_search_decoder_test.py
17
22170
# 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
Krolov18/Languages
xSampa2api/xSampa2api.py
1
1532
# coding: utf-8 import codecs import yaml import itertools try: from yaml import CLoader as Loader, CDumper as Dumper except ImportError: from yaml import Loader, Dumper import argparse parser = argparse.ArgumentParser(description="Translate a word in sampa to a word in API", prog="sampa2apiTranslater") parser.ad...
apache-2.0
mathstuf/offlineimap
test/tests/test_00_globals.py
18
1173
#!/usr/bin/env python # Copyright 2013 Eygene A. Ryabinkin from offlineimap import globals import unittest class Opt: def __init__(self): self.one = "baz" self.two = 42 self.three = True class TestOfflineimapGlobals(unittest.TestCase): @classmethod def setUpClass(klass): klass.o = Opt() globals.set_op...
gpl-2.0
msiedlarek/qtwebkit
Tools/Scripts/webkitpy/layout_tests/views/buildbot_results_unittest.py
122
4562
#!/usr/bin/env python # Copyright (C) 2012 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 ...
lgpl-3.0
gamebooster/dota2-lua-engine
protobuf-2.5.0/python/google/protobuf/internal/message_cpp_test.py
215
1929
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
gpl-3.0
mtagle/airflow
airflow/contrib/sensors/pubsub_sensor.py
5
1162
# # 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...
apache-2.0
Xeralux/tensorflow
tensorflow/contrib/image/python/kernel_tests/interpolate_spline_test.py
16
10269
# Copyright 2018 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
iustinam90/vm
ui.py
1
28878
#!/usr/bin/python -u from optparse import OptionParser import commands import ConfigParser import os import re import controller conf_file="/opt/ncit-cloud/vm.ini" debug=1 class VMUserInterface: def __init__(self): self.parser=OptionParser() self.opts=None def getConf(self): c...
gpl-3.0
debata/test_session_recorder
tests/test_report_generator.py
1
3002
import pytest import os from modules.report_generator import SessionReportGenerator from modules.session import Session @pytest.fixture(scope='session') def generator(tmpdir_factory): """Create the report generator object and pass in a temporary directory for testing""" global tmp_dir tmp_dir = tmpdir_fact...
apache-2.0
appliedx/edx-platform
common/djangoapps/student/migrations/0042_grant_sales_admin_roles.py
109
13747
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models, IntegrityError class Migration(DataMigration): def forwards(self, orm): """Map all Finance Admins to Sales Admins.""" finance_admins = orm['student.courseaccessrole'].o...
agpl-3.0
microdee/IronHydra
src/IronHydra/Lib/atexit.py
336
1705
""" atexit.py - allow programmer to define multiple exit functions to be executed upon normal program termination. One public function, register, is defined. """ __all__ = ["register"] import sys _exithandlers = [] def _run_exitfuncs(): """run any registered exit functions _exithandlers is traversed in rev...
mit
pekeler/arangodb
3rdParty/V8-4.3.61/build/gyp/test/gyp-defines/gyptest-regyp.py
268
1260
#!/usr/bin/env python # Copyright (c) 2012 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. """ Verifies that when the same value is repeated for a gyp define, duplicates are stripped from the regeneration rule. """ import os impor...
apache-2.0
slohse/ansible
lib/ansible/utils/module_docs_fragments/sros.py
58
2847
# # (c) 2015, Peter Sprygada <psprygada@ansible.com> # # 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 late...
gpl-3.0
thebonzitree/django-guardian
extras.py
85
2934
import _ast import os import sys from setuptools import Command #from pyflakes.scripts import pyflakes as flakes def check(filename): from pyflakes import reporter as mod_reporter from pyflakes.checker import Checker codeString = open(filename).read() reporter = mod_reporter._makeDefaultReporter() ...
bsd-2-clause
cjds/cron
lib/flask/testing.py
783
5003
# -*- coding: utf-8 -*- """ flask.testing ~~~~~~~~~~~~~ Implements test support helpers. This module is lazily imported and usually not used in production environments. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from contextlib import contextmana...
apache-2.0
ujenmr/ansible
lib/ansible/modules/cloud/amazon/rds_param_group.py
39
14496
#!/usr/bin/python # 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 version. # # Ansible is distributed...
gpl-3.0
edwardbadboy/tuned-ubuntu
tuned/storage/pickle_provider.py
5
1403
import interfaces import tuned.logs import pickle import os import tuned.consts as consts log = tuned.logs.get() class PickleProvider(interfaces.Provider): __slots__ = ["_path", "_data"] def __init__(self, path=None): if path is None: path = consts.DEFAULT_STORAGE_FILE self._path = path self._data = {} ...
gpl-2.0
SlimRoms/android_external_chromium
testing/gmock/test/gmock_output_test.py
986
5999
#!/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...
bsd-3-clause
openchange/openchange
pyopenchange/tests/mapistore_mgmt.py
13
1573
#!/usr/bin/python # NOTE: # # For this test, we are running the whole environment on a different # server: imap, ldap, postgresql, postfix, openchange, samba and sogo. # We have configured SOGo backend locally and adjusted defaults to # connect to this remote server. # # Finally we are accessing the openchange.ldb fil...
gpl-3.0
craftytrickster/servo
tests/wpt/web-platform-tests/mixed-content/generic/expect.py
95
4179
import json, os, urllib, urlparse def redirect(url, response): response.add_required_headers = False response.writer.write_status(301) response.writer.write_header("access-control-allow-origin", "*") response.writer.write_header("location", url) response.writer.end_headers() response.writer.wri...
mpl-2.0
ircncl/linux-grsec-incremental
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
3246
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
gpl-2.0
eslimaf/random_codes
capture.py
1
1973
from netlib.odict import ODictCaseless from libmproxy.protocol.http import HTTPResponse import cgi import re from gzip import GzipFile import StringIO import time XML_OK_RESPONSE = '''<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0....
mit
lpantano/cloudbiolinux
fabfile.py
1
19010
"""Main Fabric deployment file for CloudBioLinux distribution. This installs a standard set of useful biological applications on a remote server. It is designed for bootstrapping a machine from scratch, as with new Amazon EC2 instances. Usage: fab -H hostname -i private_key_file install_biolinux which will call...
mit
Keleir/django-basic-apps
basic/invitations/models.py
10
2238
import random from django.db import models from django.contrib.auth.models import User from django.conf import settings from django.contrib.sites.models import Site from django.utils.hashcompat import sha_constructor INVITATION_ALLOTMENT = getattr(settings, 'INVITATION_ALLOTMENT', 5) INVITATION_STATUS_SENT = 0 INVIT...
bsd-3-clause
steventimberman/masterDebater
env/lib/python2.7/site-packages/django/http/request.py
44
21383
from __future__ import unicode_literals import copy import re import sys from io import BytesIO from itertools import chain from django.conf import settings from django.core import signing from django.core.exceptions import ( DisallowedHost, ImproperlyConfigured, RequestDataTooBig, ) from django.core.files import...
mit
ChronoMonochrome/android_external_chromium_org
tools/telemetry/telemetry/page/actions/page_action.py
23
2747
# Copyright (c) 2012 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. class PageActionNotSupported(Exception): pass class PageActionFailed(Exception): pass class PageAction(object): """Represents an action that a us...
bsd-3-clause
gsteenss/Hacking-Team-Sweeper
simplescripts/sweeplinux.py
1
1105
#!/usr/bin/python2.7 # sweeplinux v0.1: a simple script to look for signs of HackingTeam RCS Linux agent # gsteenss@riseup.net # # based on: https://github.com/0xPoly/Hacking-Team-Sweeper/blob/master/signatures/linux.md import glob import sys from platform import platform,architecture from os.path import expanduser ...
agpl-3.0
mark-me/Pi-Jukebox
venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/chardet/compat.py
270
1134
######################## BEGIN LICENSE BLOCK ######################## # Contributor(s): # Dan Blanchard # Ian Cordasco # # This library 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 Software Foundation; either # versi...
agpl-3.0
13anjou/Research-Internship
Analysis/Dictionnary.py
1
23710
#!/usr/bin/env python #-*- coding: utf-8 -*- import csv from pylab import* import numpy import math import matplotlib.pyplot as plt import numbers from allTest import k, s def main() : dicoEchant = corres() dicoTotal = dict() #On va importer toutes les donnees : #0 echantillon #1 u #2 v #3 Okubo Weiss ...
gpl-2.0
yfried/ansible
test/units/modules/network/dellos9/test_dellos9_command.py
68
4281
# (c) 2016 Red Hat Inc. # # (c) 2017 Dell EMC. # # 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 vers...
gpl-3.0
redhat-openstack/nova
nova/ipv6/rfc2462.py
97
1712
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
apache-2.0
i5o/openshot-sugar
openshot/openshot/windows/TreeBlender.py
3
6181
# OpenShot Video Editor is a program that creates, modifies, and edits video files. # Copyright (C) 2009 Jonathan Thomas # # This file is part of OpenShot Video Editor (http://launchpad.net/openshot/). # # OpenShot Video Editor is free software: you can redistribute it and/or modify # it under the terms of the GNU G...
gpl-3.0
yanboliang/spark
examples/src/main/python/als.py
121
3267
# # 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
wfxiang08/django185
tests/responses/tests.py
23
3713
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.http import HttpResponse from django.http.response import HttpResponseBase from django.test import SimpleTestCase UTF8 = 'utf-8' ISO88591 = 'iso-8859-1' class HttpResponseBaseTests(SimpleTestCase): def ...
bsd-3-clause
kingvuplus/ts-gui-3
lib/python/Components/Sources/FrontendStatus.py
25
1592
from Source import Source from enigma import eTimer class FrontendStatus(Source): def __init__(self, service_source = None, frontend_source = None, update_interval = 1000): Source.__init__(self) self.update_interval = update_interval self.service_source = service_source self.frontend_source = frontend_source ...
gpl-2.0
Clever/Diamond
src/collectors/dropwizard/dropwizard.py
16
3333
# coding=utf-8 """ Collect [dropwizard](http://dropwizard.codahale.com/) stats for the local node """ import urllib2 try: import json except ImportError: import simplejson as json import diamond.collector class DropwizardCollector(diamond.collector.Collector): def get_default_config_help(self): ...
mit
Sorsly/subtle
google-cloud-sdk/lib/googlecloudsdk/command_lib/compute/disks/flags.py
6
2470
# Copyright 2016 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...
mit
gencer/sentry
src/sentry/middleware/locale.py
1
2028
""" sentry.middleware.locale ~~~~~~~~~~~~~~~~~~~~~~~~ :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 import pytz from django.conf import settings from django.middleware.locale import LocaleMiddleware...
bsd-3-clause
ychen820/microblog
src/lib/wtforms/fields/simple.py
51
1464
from .. import widgets from .core import StringField, BooleanField __all__ = ( 'BooleanField', 'TextAreaField', 'PasswordField', 'FileField', 'HiddenField', 'SubmitField', 'TextField' ) class TextField(StringField): """ Legacy alias for StringField """ class TextAreaField(TextField): """ ...
bsd-3-clause
40423117/2017springcd_hw
plugin/liquid_tags/giphy.py
273
2433
""" Giphy Tag --------- This implements a Liquid-style Giphy tag for Pelican. IMPORTANT: You have to request a production API key from giphy `here <https://api.giphy.com/submit>`. For the first runs you could also use the public beta key you can get `here <https://github.com/giphy/GiphyAPI>`. Syntax ------ {% giphy ...
agpl-3.0
timoschwarzer/blendworks
BlendWorks Server/python/Lib/test/test_property.py
109
7815
# Test case for property # more tests are in test_descr import sys import unittest from test.support import run_unittest class PropertyBase(Exception): pass class PropertyGet(PropertyBase): pass class PropertySet(PropertyBase): pass class PropertyDel(PropertyBase): pass class BaseClass(object): ...
gpl-2.0
OSSystems/jenkins-job-builder
tests/views/test_views.py
9
1147
# Copyright 2015 Openstack Foundation # # 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 ...
apache-2.0