code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com> # (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 ...
tedder/ansible
test/units/module_utils/basic/test_atomic_move.py
Python
gpl-3.0
9,634
# Copyright (C) 2017 # Max Planck Institute for Polymer Research # Copyright (C) 2016 # Max Planck Institute for Polymer Research & JGU Mainz # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
niktre/espressopp
testsuite/FileIOTests/dump_gromacs/test_dump_gromacs.py
Python
gpl-3.0
3,828
#!/usr/bin/env python """Stitch together the letsencrypt-auto script. Implement a simple templating language in which {{ some/file }} turns into the contents of the file at ./pieces/some/file except for certain tokens which have other, special definitions. """ from os.path import abspath, dirname, join import re fro...
nohona/cron-crm
usr/local/certbot/letsencrypt-auto-source/build.py
Python
gpl-3.0
1,658
# encoding: utf-8 # # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Contact: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import, divisi...
klahnakoski/SpotManager
vendor/mo_json/decoder.py
Python
mpl-2.0
381
__author__ = 'Cosmo Harrigan' from flask import abort, json, current_app, jsonify from flask.ext.restful import Resource, reqparse, marshal import opencog.cogserver from opencog.atomspace import Atom from mappers import * from flask.ext.restful.utils import cors from flask_restful_swagger import swagger # Temporary h...
ruiting/opencog
opencog/python/web/api/apiatomcollection.py
Python
agpl-3.0
22,412
"""rename this to test_assumptions.py when the old assumptions system is deleted""" from sympy.core import symbols from sympy.assumptions import AppliedPredicate, global_assumptions, Predicate from sympy.assumptions.ask import _extract_facts from sympy.printing import pretty from sympy.assumptions.ask import Q from sym...
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/sympy/assumptions/tests/test_assumptions_2.py
Python
agpl-3.0
1,845
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
EmreAtes/spack
var/spack/repos/builtin/packages/r-ncdf4/package.py
Python
lgpl-2.1
2,621
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyProglog(PythonPackage): """Proglog is a progress logging system for Python. It allow...
LLNL/spack
var/spack/repos/builtin/packages/py-proglog/package.py
Python
lgpl-2.1
733
# Copyright 2013 VMware, 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 a...
sebrandon1/neutron
neutron/extensions/portsecurity.py
Python
apache-2.0
2,526
# -*- coding: utf-8 -*- ############################################################################### # # ListAllSpreadsheets # Lists all the spreadsheets associated with a user's Zoho Sheet Account. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 ...
jordanemedlock/psychtruths
temboo/core/Library/Zoho/Sheet/ListAllSpreadsheets.py
Python
apache-2.0
4,990
# 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...
markslwong/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/distribution_util_test.py
Python
apache-2.0
22,749
#!/usr/bin/python import time def func_c(): print "Function C" time.sleep(1) def func_b(): print "Function B" time.sleep(1) func_c() def func_a(): print "Function A" time.sleep(1) func_b() func_a()
dplbsd/soc2013
head/cddl/contrib/dtracetoolkit/Code/Python/func_abc.py
Python
bsd-2-clause
212
import boto import moto import unittest import os import uuid import shutil import sys import pickle from ..util import cloudpickle from ..data_structures.sframe import SFrame from ..data_structures.sarray import SArray from ..data_structures.sgraph import SGraph, Vertex, Edge from .. import _gl_pickle as gl_pickle ...
ylow/SFrame
oss_src/unity/python/sframe/test/test_gl_pickler.py
Python
bsd-3-clause
8,551
from django import forms from django.core.exceptions import PermissionDenied from django.db import router from django.http import HttpResponse, HttpResponseRedirect from django.template import loader from django.template.response import TemplateResponse from django.utils.datastructures import SortedDict from django.uti...
madre/devops
xadmin/plugins/actions.py
Python
mit
10,987
#!/usr/bin/env python # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ---------------------------------------------...
samedder/azure-cli
scripts/curl_install_pypi/install.py
Python
mit
16,656
#(define SIZE 10000) SIZE = 10000 vec = [SIZE - i for i in range(SIZE)] def bubble_sort(l): swapped = True while swapped: swapped = False i = 0 while i < len(l) - 1: a, b = l[i], l[i + 1] if a > b: l[i] = b l[i + 1] = a ...
samth/pycket
pycket/test/bubble.py
Python
mit
405
#!/usr/bin/python import sys import xml.dom.minidom from libglibcodegen import NS_TP, get_docstring, xml_escape class Generator(object): def __init__(self, dom, basename): self.dom = dom self.errors = self.dom.getElementsByTagNameNS(NS_TP, 'errors')[0] self.basename = basename se...
JGulic/empathy
tools/glib-errors-str-gen.py
Python
gpl-2.0
2,447
## This file is part of Invenio. ## Copyright (C) 2010, 2011 CERN. ## ## Invenio 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. ## ...
Panos512/invenio
modules/bibrank/lib/bibrank_bridge_config.py
Python
gpl-2.0
2,141
# -*- coding: utf-8 -*- from odoo import api, fields, models, _ class AccountJournal(models.Model): _inherit = 'account.journal' @api.model def _fill_missing_values(self, vals): super()._fill_missing_values(vals) if vals.get('type') != 'purchase': return company = s...
jeremiahyan/odoo
addons/l10n_nl/models/account_journal.py
Python
gpl-3.0
1,248
ALLOW_EMPTY_STRING_KEYS = False
Ninjakow/TrueSkill
lib/dpath/options.py
Python
gpl-3.0
32
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
stgraber/snapcraft
integration_tests/test_after.py
Python
gpl-3.0
3,409
# Part of Odoo. See LICENSE file for full copyright and licensing details. from . import test_health from . import test_image from . import test_js from . import test_menu from . import test_serving_base from . import test_click_everywhere from . import test_base_document_layout from . import test_load_menus from . im...
jeremiahyan/odoo
addons/web/tests/__init__.py
Python
gpl-3.0
434
"""Deprecated import support. Auto-generated by import_shims/generate_shims.sh.""" # pylint: disable=redefined-builtin,wrong-import-position,wildcard-import,useless-suppression,line-too-long from import_shims.warn import warn_deprecated_import warn_deprecated_import('student.urls', 'common.djangoapps.student.urls') ...
eduNEXT/edunext-platform
import_shims/studio/student/urls.py
Python
agpl-3.0
365
"""drop_sync_raw_data_column Revision ID: 2e515548043b Revises: 527bbdc2b0fa Create Date: 2015-09-01 23:37:44.203784 """ # revision identifiers, used by Alembic. revision = '2e515548043b' down_revision = '527bbdc2b0fa' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql def upgrad...
nylas/sync-engine
migrations/versions/202_drop_sync_raw_data_column.py
Python
agpl-3.0
601
# -*- coding: utf-8 -*- from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('certificates', '0005_auto_20151208_0801'), ] operations = [ migrations.AddField( model_name='certificatetemplateasset', name='asset_slug', ...
stvstnfrd/edx-platform
lms/djangoapps/certificates/migrations/0006_certificatetemplateasset_asset_slug.py
Python
agpl-3.0
505
#!/usr/bin/env python # cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free So...
shoreflyer/cerbero
cerbero/ide/xcode/fwlib.py
Python
lgpl-2.1
9,377
import unittest from PySide.QtCore import Qt from PySide.QtGui import QKeySequence from helper import UsesQApplication class QKeySequenceTest(UsesQApplication): def testGetItemOperator(self): # bug #774 ks = QKeySequence(Qt.SHIFT, Qt.CTRL, Qt.Key_P, Qt.Key_R) self.assertEqual(ks[0], Qt.S...
M4rtinK/pyside-android
tests/QtGui/qkeysequence_test.py
Python
lgpl-2.1
500
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PerlXmlWriter(PerlPackage): """XML::Writer is a helper module for Perl programs that write...
LLNL/spack
var/spack/repos/builtin/packages/perl-xml-writer/package.py
Python
lgpl-2.1
1,216
# 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 ...
illfelder/libcloud
libcloud/test/compute/test_softlayer.py
Python
apache-2.0
10,361
from mfr import settings config = settings.child('HTTP_PROVIDER_CONFIG')
CenterForOpenScience/modular-file-renderer
mfr/providers/http/settings.py
Python
apache-2.0
75
# Copyright 2013 IBM Corp. # Copyright 2010-2011 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 # # Un...
afrolov1/nova
nova/tests/api/openstack/compute/plugins/v3/test_versions.py
Python
apache-2.0
4,830
# 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...
vrv/tensorflow
tensorflow/contrib/slim/python/slim/learning.py
Python
apache-2.0
29,876
# Copyright 2015 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...
tensorflow/tensorflow
tensorflow/python/kernel_tests/array_ops/edit_distance_op_test.py
Python
apache-2.0
8,041
""" Module for abstract serializer/unserializer base classes. """ from django.db import models from django.utils import six class SerializerDoesNotExist(KeyError): """The requested serializer was not found.""" pass class SerializationError(Exception): """Something bad happened during serialization.""" ...
weiawe/django
django/core/serializers/base.py
Python
bsd-3-clause
6,764
from datetime import datetime import sys import unittest from django.utils.datastructures import MultiValueDict from django.utils import http from django.utils import six class TestUtilsHttp(unittest.TestCase): def test_same_origin_true(self): # Identical self.assertTrue(http.same_origin('http:/...
lecaoquochung/ddnb.django
tests/utils_tests/test_http.py
Python
bsd-3-clause
6,096
import six from importlib import import_module import default_settings class BaseSettings(object): """ An object that holds frontier settings values. This also defines the base interface for all classes that are to be used as settings in frontera. """ def __init__(self, module=None, attribut...
RajatGoyal/frontera
frontera/settings/__init__.py
Python
bsd-3-clause
2,523
# # The Python Imaging Library. # $Id$ # # TIFF file handling # # TIFF is a flexible, if somewhat aged, image file format originally # defined by Aldus. Although TIFF supports a wide variety of pixel # layouts and compression methods, the name doesn't really stand for # "thousands of incompatible file formats," it jus...
sumedh123/debatify
venv/lib/python2.7/site-packages/PIL/TiffImagePlugin.py
Python
mit
62,392
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
Azure/azure-sdk-for-python
sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/v2022_01_01_preview/__init__.py
Python
mit
752
# # The Python Imaging Library. # $Id$ # # PIL raster font management # # History: # 1996-08-07 fl created (experimental) # 1997-08-25 fl minor adjustments to handle fonts from pilfont 0.3 # 1999-02-06 fl rewrote most font management stuff in C # 1999-03-17 fl take pth files into account in load_path (from Rich...
sauloal/cnidaria
scripts/venv/lib/python2.7/site-packages/PIL/ImageFont.py
Python
mit
20,144
import openmc import openmc.deplete import matplotlib.pyplot as plt ############################################################################### # Load previous simulation results ############################################################################### # Load geometry from statepoint st...
nelsonag/openmc
examples/pincell_depletion/restart_depletion.py
Python
mit
3,265
#!/usr/bin/env python3 # Copyright (c) 2018-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test createwallet arguments. """ from test_framework.address import key_to_p2wpkh from test_framework....
EthanHeilman/bitcoin
test/functional/wallet_createwallet.py
Python
mit
9,838
#!/usr/bin/env python # Update plural forms expressions from the data collected by Unicode Consortium # (see http://www.unicode.org/cldr/charts/supplemental/language_plural_rules.html), # but from a JSON version by Transifex folks import os.path import sys import urllib2 import re import gettext import json TABLE_URL...
dwaynebailey/poedit
scripts/extract-plural-forms.py
Python
mit
3,040
#!/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. """Aggregates EMMA coverage files to produce html output.""" import fnmatch import json import optparse import os import sys from de...
Teamxrtc/webrtc-streaming-node
third_party/webrtc/src/chromium/src/build/android/generate_emma_html.py
Python
mit
2,880
import logging from qemu.tests import qemu_disk_img from avocado.core import exceptions def run(test, params, env): """ 'qemu-img' snapshot functions test: Params: :param test: Qemu test object :param params: Dictionary with the test parameters :param env: Dictionary with test environment. ...
swapnakrishnan2k/tp-qemu
qemu/tests/qemu_disk_img_snapshot.py
Python
gpl-2.0
2,128
# # (c) 2017 Red Hat Inc. # # 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 d...
maartenq/ansible
lib/ansible/plugins/cliconf/vyos.py
Python
gpl-3.0
9,009
#-*- coding: utf-8 -*- import os from django.test import TestCase from django.core.urlresolvers import reverse import django.core.files from django.contrib.admin import helpers from filer.models.filemodels import File from filer.models.foldermodels import Folder from filer.models.imagemodels import Image from filer.mo...
hzlf/openbroadcast
website/filer/tests/admin.py
Python
gpl-3.0
14,063
import sphinxapi import fsphinx import simsearch # create simsearch client cl = simsearch.SimClient( fsphinx.FSphinxClient.FromConfig('config/sphinx_client.py'), index_path='data/sim-index/', max_items=1000 ) # custom sorting function for the search # we always make sure highly ranked items with a log sc...
amcdunn/CloudMining
letterlocking/history/config/simsearch_client.py
Python
agpl-3.0
1,175
"""Summary data from Nextcoud.""" import logging from homeassistant.helpers.entity import Entity from . import DOMAIN, SENSORS _LOGGER = logging.getLogger(__name__) def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the Nextcloud sensors.""" if discovery_info is None: re...
nkgilley/home-assistant
homeassistant/components/nextcloud/sensor.py
Python
apache-2.0
1,293
# Copyright 2015 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...
freedomtan/tensorflow
tensorflow/python/keras/datasets/cifar100.py
Python
apache-2.0
3,132
# Copyright 2013 Intel Corporation. # 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 requir...
hanlind/nova
nova/compute/monitors/cpu/virt_driver.py
Python
apache-2.0
4,193
class InvalidData(Exception): pass class InvalidInterface(InvalidData): pass class InvalidTimestamp(InvalidData): pass
beni55/sentry
src/sentry/exceptions.py
Python
bsd-3-clause
135
# 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 a...
catapult-project/catapult
third_party/google-endpoints/endpoints/api_backend.py
Python
bsd-3-clause
2,870
""" Searching for names with given scope and name. This is very central in Jedi and Python. The name resolution is quite complicated with descripter, ``__getattribute__``, ``__getattr__``, ``global``, etc. If you want to understand name resolution, please read the first few chapters in http://blog.ionelmc.ro/2015/02/0...
sserrot/champion_relationships
venv/Lib/site-packages/jedi/inference/finder.py
Python
mit
5,326
# -*- coding: utf-8 -*- """ A urls module that raises a DeadlineExceededError :Copyright: (c) 2010 Ian Lewis <IanMLewis@gmail.com> All rights reserved. :license: BSD, see LICENSE for more details. """ from google.appengine.runtime import DeadlineExceededError raise DeadlineExceededError()
yosukesuzuki/kay-template
project/kay/tests/regressiontests/badurls_testapp/urls.py
Python
mit
294
#!/usr/bin/env python from UserString import UserString from Generic import GenericOption, DEFAULTS, GenericParser, GenericArgument class StringParser(GenericParser): pass class StringOption(StringParser, GenericOption, UserString): """ String configuration option """ synopsis = '' def __init__(self, doc...
nibrahim/PlasTeX
plasTeX/ConfigManager/String.py
Python
mit
1,512
#Covered by GPL V2.0 #Coded by Carlos del Ojo Elias (deepbit@gmail.com) from urlparse import * from time import gmtime, strftime import pycurl import gzip import StringIO import string import re import threading from time import localtime, strftime from xml.dom.minidom import Document try: from TextParser import *...
ccgreen13/webslayer-1
reqresp.py
Python
gpl-2.0
15,933
# # Chris Lumens <clumens@redhat.com> # # Copyright 2005, 2006, 2007 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # ...
pbokoc/pykickstart
pykickstart/commands/skipx.py
Python
gpl-2.0
2,089
# Copyright (c) 2012 Citrix Systems, 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 ...
ChinaMassClouds/copenstack-server
openstack/src/nova-2014.2/nova/api/openstack/compute/plugins/v3/aggregates.py
Python
gpl-2.0
9,519
# Copyright (C) 2010-2014 GRNET S.A. # # 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 3 of the License, or # (at your option) any later version. # # This program is distributed i...
apyrgio/synnefo
snf-tools/synnefo_tools/burnin/astakos_tests.py
Python
gpl-3.0
3,579
# coding=utf-8 """Python functions that we use in postprocessors.""" from math import floor # noinspection PyUnresolvedReferences from qgis.core import QgsPointXY from safe.definitions.exposure import exposure_population from safe.definitions.hazard_classifications import ( hazard_classes_all, not_exposed_class...
inasafe/inasafe
safe/processors/post_processor_functions.py
Python
gpl-3.0
7,836
# # Copyright (C) 2016 FreeIPA Contributors see COPYING for license # from __future__ import absolute_import import six from ipapython.dn import DN from ipapython.dnsutil import DNSName from ipatests.util import assert_deepequal from ipatests.test_xmlrpc.tracker.base import Tracker if six.PY3: unicode = str ...
redhatrises/freeipa
ipatests/test_xmlrpc/tracker/location_plugin.py
Python
gpl-3.0
5,622
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014-2016, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This p...
blueburningcoder/nupic
src/nupic/support/unittesthelpers/abstract_temporal_memory_test.py
Python
agpl-3.0
2,712
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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....
tanglei528/horizon
openstack_dashboard/dashboards/admin/roles/views.py
Python
apache-2.0
2,639
#!/usr/bin/python # -*- coding: utf-8 -*- # ===--- test_Benchmark_Driver.py ----------------------------------------===// # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library...
gregomni/swift
benchmark/scripts/test_Benchmark_Driver.py
Python
apache-2.0
40,125
#!/usr/bin/env python # # Copyright 2015: Mirantis 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 ...
varuntiwari27/rally
tests/ci/wip-rally-gate.py
Python
apache-2.0
6,443
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/troubleshooting_parameters_py3.py
Python
mit
1,778
#----------------------------------------------------------------------------- # Copyright (c) 2008-2013, David P. D. Moss. All rights reserved. # # Released under the BSD license. See the LICENSE file for details. #----------------------------------------------------------------------------- """A Python library fo...
golismero/golismero
thirdparty_libs/netaddr/__init__.py
Python
gpl-2.0
2,774
#!/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 distribut...
romain-dartigues/ansible-modules-core
network/nxos/nxos_facts.py
Python
gpl-3.0
15,990
from django.conf.urls import url, include from typing import Any from zerver.lib.rest import rest_dispatch import zilencer.views import zerver.views.report i18n_urlpatterns = [] # type: Any # Zilencer views following the REST API style v1_api_and_json_patterns = [ url('^deployment/report_error$', rest_dispatch,...
souravbadami/zulip
zilencer/urls.py
Python
apache-2.0
509
"""Provide tools for migrating from the zwave integration.""" from homeassistant.helpers.device_registry import ( async_get_registry as async_get_device_registry, ) from homeassistant.helpers.entity_registry import ( async_entries_for_config_entry, async_get_registry as async_get_entity_registry, ) from .c...
sander76/home-assistant
homeassistant/components/ozw/migration.py
Python
apache-2.0
6,203
# -*- coding: utf-8 -*- # Copyright (c) 2008-2011 Erik Svensson <erik.public@gmail.com> # Licensed under the MIT license. import re, time import urllib2, urlparse, base64 try: import json except ImportError: import simplejson as json from transmissionrpc.constants import DEFAULT_PORT, DEFAULT_TIMEOUT from tr...
mboeru/maraschino
lib/transmissionrpc/client.py
Python
mit
33,208
"""empty message Revision ID: 047f7c3db184 Revises: dd24d9e90809 Create Date: 2016-07-12 11:28:08.051094 """ # revision identifiers, used by Alembic. revision = '047f7c3db184' down_revision = 'dd24d9e90809' from alembic import op import sqlalchemy as sa import sqlalchemy_utils from sqlalchemy.dialects import postgr...
Achint08/open-event-orga-server
migrations/versions/047f7c3db184_.py
Python
gpl-3.0
966
# Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation (FSF), either version 3 of the ...
soundcloud/essentia
test/src/pythontests/tempotap_test.py
Python
agpl-3.0
7,454
#!/usr/bin/env python import xml.etree.ElementTree as ET class brocade_rmon(object): """Auto generated class. """ def __init__(self, **kwargs): self._callback = kwargs.pop('callback') def rmon_event_entry_event_index(self, **kwargs): """Auto Generated Code """ ...
BRCDcomm/pynos
pynos/versions/ver_7/ver_7_1_0/yang/brocade_rmon.py
Python
apache-2.0
17,591
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
HwisooSo/gemV-update
tests/configs/realview64-switcheroo-full.py
Python
bsd-3-clause
2,485
from __future__ import unicode_literals import re import sys from django.conf import settings from django.template import (Node, Variable, TemplateSyntaxError, TokenParser, Library, TOKEN_TEXT, TOKEN_VAR) from django.template.base import render_value_in_context from django.template.defaulttags import token_kwargs ...
mbox/django
django/templatetags/i18n.py
Python
bsd-3-clause
17,693
# # 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...
WindCanDie/spark
python/pyspark/sql/tests/test_datasources.py
Python
apache-2.0
7,474
from .common import Benchmark, get_squares_, get_indexes_rand, TYPES1 import numpy as np class Eindot(Benchmark): def setup(self): self.a = np.arange(60000.0).reshape(150, 400) self.ac = self.a.copy() self.at = self.a.T self.atc = self.a.T.copy() self.b = np.arange(240000....
simongibbons/numpy
benchmarks/benchmarks/bench_linalg.py
Python
bsd-3-clause
6,364
# Natural Language Toolkit: Interface to TADM Classifier # # Copyright (C) 2001-2012 NLTK Project # Author: Joseph Frazee <jfrazee@mail.utexas.edu> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT import sys import subprocess from nltk.internals import find_binary try: import numpy except ...
cortext/crawtextV2
~/venvs/crawler/lib/python2.7/site-packages/nltk/classify/tadm.py
Python
mit
3,381
#!/usr/bin/env python # Allows quick bulk testing of regular expressions against test strings. # You need one or more input files with labeled regular expressions # and test strings. See the usage message for syntax. # # Here is a sample: # # pattern: # ^(apple|orange).*$ # # text: # apple whatever # # text: # orange ...
creative-quant/voltdb
tools/regex-tester.py
Python
agpl-3.0
3,361
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from .....testing import assert_equal from ..classify import BRAINSPosteriorToContinuousClass def test_BRAINSPosteriorToContinuousClass_inputs(): input_map = dict(args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), ignor...
sgiavasis/nipype
nipype/interfaces/semtools/brains/tests/test_auto_BRAINSPosteriorToContinuousClass.py
Python
bsd-3-clause
1,561
# Copyright 2014 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. import csv import logging from collections import defaultdict from telemetry.core.platform.power_monitor import sysfs_power_monitor class DumpsysPowerMoni...
markYoungH/chromium.src
tools/telemetry/telemetry/core/platform/power_monitor/android_dumpsys_power_monitor.py
Python
bsd-3-clause
4,850
#!/usr/bin/env python #encoding:utf-8 #author:dbr/Ben #project:tvdb_api #repository:http://github.com/dbr/tvdb_api #license:Creative Commons GNU GPL v2 # (http://creativecommons.org/licenses/GPL/2.0/) """Custom exceptions used or raised by tvdb_api """ __author__ = "dbr/Ben" __version__ = "1.5" __all__ = ["tvdb_erro...
dhamaniasad/mythbox
resources/lib/tvdb_api/tvdb_exceptions.py
Python
gpl-2.0
1,290
#!/usr/bin/env python # # Copyright (C) 2011, 2012 Google Inc. # # This file is part of YouCompleteMe. # # YouCompleteMe 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 # (...
WillianPaiva/ycmd
ycmd/extra_conf_store.py
Python
gpl-3.0
7,343
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Category' db.create_table('product_category', ( ('name', self.gf('django.db.models.fie...
mitchellzen/pops
satchmo/apps/product/migrations/0001_initial.py
Python
bsd-3-clause
56,979
r""" Compressed sparse graph routines (:mod:`scipy.sparse.csgraph`) ============================================================== .. currentmodule:: scipy.sparse.csgraph Fast graph algorithms based on sparse matrix representations. Contents -------- .. autosummary:: :toctree: generated/ connected_components...
mdhaber/scipy
scipy/sparse/csgraph/__init__.py
Python
bsd-3-clause
7,658
import socket import warnings def g_log(*args): warnings.warn("eventlet.util.g_log is deprecated because " "we're pretty sure no one uses it. " "Send mail to eventletdev@lists.secondlife.com " "if you are actually using it.", DeprecationWarning, stackl...
JeremyGrosser/python-eventlet
eventlet/util.py
Python
mit
5,051
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Point of Sale', 'version': '1.0.1', 'category': 'Point Of Sale', 'sequence': 20, 'summary': 'Touchscreen Interface for Shops', 'description': "", 'depends': ['stock_account', 'barco...
Aravinthu/odoo
addons/point_of_sale/__manifest__.py
Python
agpl-3.0
1,751
m<caret> from source import my_foo as my_renamed_foo
ingokegel/intellij-community
python/testData/completion/beforeImport/beforeImportAs.py
Python
apache-2.0
54
# Copyright 2015 The Oppia 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 applicable ...
raju249/oppia
core/controllers/collection_viewer_test.py
Python
apache-2.0
8,269
import json import xml.etree.ElementTree from django.http import Http404 from django.http import HttpResponse from mitxmako.shortcuts import render_to_response from .models import ServerCircuit def circuit_line(circuit): ''' Returns string for an appropriate input element for a circuit. TODO: Rename. '...
PepperPD/edx-pepper-platform
lms/djangoapps/circuit/views.py
Python
agpl-3.0
1,984
# 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...
kamcpp/tensorflow
tensorflow/contrib/tensor_forest/python/ops/training_ops.py
Python
apache-2.0
2,777
# 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, software # d...
sandvine/horizon
openstack_dashboard/test/integration_tests/pages/admin/system/volumes/volumespage.py
Python
apache-2.0
730
r"""Rules for classification and regression trees. Tree visualisations usually need to show the rules of nodes, these classes make merging these rules simple (otherwise you have repeating rules e.g. `age < 3` and `age < 2` which can be merged into `age < 2`. Subclasses of the `Rule` class should provide a nice interf...
cheral/orange3
Orange/widgets/visualize/utils/tree/rules.py
Python
bsd-2-clause
7,254
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
BIT-SYS/gem5-spm-module
src/cpu/simple/AtomicSimpleCPU.py
Python
bsd-3-clause
3,124
"""Camera platform that receives images through HTTP POST.""" import asyncio from collections import deque from datetime import timedelta import logging import aiohttp import async_timeout import voluptuous as vol from homeassistant.components.camera import ( PLATFORM_SCHEMA, STATE_IDLE, STATE_RECORDING, ...
nkgilley/home-assistant
homeassistant/components/push/camera.py
Python
apache-2.0
5,596
#!/usr/bin/env python ''' timedatectl ansible module This module supports setting ntp enabled ''' import subprocess def do_timedatectl(options=None): ''' subprocess timedatectl ''' cmd = ['/usr/bin/timedatectl'] if options: cmd += options.split() proc = subprocess.Popen(cmd, stdin...
appuio/ansible-role-openshift-zabbix-monitoring
vendor/openshift-tools/ansible/roles/lib_timedatectl/library/timedatectl.py
Python
apache-2.0
1,839
# -*- coding: utf-8 -*- """ werkzeug.wrappers ~~~~~~~~~~~~~~~~~ The wrappers are simple request and response objects which you can subclass to do whatever you want them to do. The request object contains the information transmitted by the client (webbrowser) and the response object contains al...
gwwfps/boxrps
werkzeug/wrappers.py
Python
mit
63,953
# Compute grades using real division, with no integer truncation from __future__ import division from collections import defaultdict import json import random import logging from contextlib import contextmanager from django.conf import settings from django.db import transaction from django.test.client import RequestFa...
LICEF/edx-platform
lms/djangoapps/courseware/grades.py
Python
agpl-3.0
23,004
# This program is free software; you can redistribute it and/or modify it under # the terms of the (LGPL) GNU Lesser General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will b...
dims/suds-jurko
suds/bindings/multiref.py
Python
lgpl-3.0
4,147