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
#pylint: disable=C0111 #pylint: disable=W0621 from courseware.mock_youtube_server.mock_youtube_server import MockYoutubeServer from lettuce import before, after, world from django.conf import settings import threading from logging import getLogger logger = getLogger(__name__) @before.all def setup_mock_youtube_serv...
PepperPD/edx-pepper-platform
lms/djangoapps/courseware/features/youtube_setup.py
Python
agpl-3.0
1,256
"""Auto-generated file, do not edit by hand. KI metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_KI = PhoneMetadata(id='KI', country_code=686, international_prefix='00', general_desc=PhoneNumberDesc(national_number_pattern='[2458]\\d{4}|3\\d{4,7}|7\\d{7}', possibl...
dongguangming/python-phonenumbers
python/phonenumbers/data/region_KI.py
Python
apache-2.0
1,560
#!/usr/bin/env python3 import unittest from gppylib.operations.test.regress.test_package import GppkgTestCase, GppkgSpec, BuildGppkg, RPMSpec, BuildRPM, run_command, run_remote_command class SimpleGppkgTestCase(GppkgTestCase): """Covers simple build/install/remove/update test cases""" def test00_simple_build...
50wu/gpdb
gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_simple_gppkg.py
Python
apache-2.0
1,745
# 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 os import unittest from telemetry import page as page_module from telemetry.page import page_set from telemetry.results import base_test_results_unit...
guorendong/iridium-browser-ubuntu
tools/telemetry/telemetry/results/page_test_results_unittest.py
Python
bsd-3-clause
12,842
import contextlib import threading from django.db import models, transaction from django.utils import translation import multidb.pinning _locals = threading.local() class TransformQuerySet(models.query.QuerySet): def __init__(self, *args, **kwargs): super(TransformQuerySet, self).__init__(*args, **kw...
jamesthechamp/zamboni
mkt/site/models.py
Python
bsd-3-clause
10,570
# Django settings for python project. DEBUG = True import logging LOG_LEVEL = logging.INFO if DEBUG: LOG_LEVEL = logging.DEBUG logging.basicConfig( level = LOG_LEVEL, format = '[%(asctime)s %(name)s %(levelname)s] %(message)s', ) TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain...
GdZ/scriptfile
software/googleAppEngine/lib/PyAMF/doc/tutorials/examples/actionscript/bytearray/python/settings.py
Python
mit
2,999
#!/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. # ---------------------------------------------...
yugangw-msft/azure-cli
scripts/ci/a01/docker_app/collect_tests.py
Python
mit
2,577
# Test recv on socket that just accepted a connection import socket PORT = 8000 # Server def instance0(): multitest.globals(IP=multitest.get_network_ip()) s = socket.socket() s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(socket.getaddrinfo("0.0.0.0", PORT)[0][-1]) s.listen(1) ...
bvernoux/micropython
tests/multi_net/tcp_accept_recv.py
Python
mit
672
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2013, 2014, 2015 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 optio...
Theer108/invenio
invenio/modules/deposit/field_base.py
Python
gpl-2.0
10,037
#----------------------------------------------------------------------------- # Copyright (c) 2010 Justin Riley # # Distributed under the terms of the New BSD License. The full license is in # the file COPYING.BSD, distributed as part of this software. #-------------------------------------------------------------...
mgadi/naemonbox
sources/psdash/pyzmq-13.1.0/examples/mongodb/controller.py
Python
gpl-2.0
3,050
import os import unittest from blivet import Blivet from blivet import util from blivet.size import Size from blivet.flags import flags @unittest.skipUnless(os.environ.get("JENKINS_HOME"), "jenkins only test") @unittest.skipUnless(os.geteuid() == 0, "requires root access") class ImageBackedTestCase(unittest.TestCase...
wgwoods/blivet
tests/imagebackedtestcase.py
Python
gpl-2.0
3,326
from .fake import UserAgent # noqa
FireBladeNooT/Medusa_1_6
lib/fake_useragent/__init__.py
Python
gpl-3.0
36
# -*- 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...
crmccreary/openerp_server
openerp/addons/account/wizard/account_report_common_journal.py
Python
agpl-3.0
2,970
from nose import tools as nt from tests.base import AdminTestCase from tests.factories import AuthUserFactory from tests.test_conferences import ConferenceFactory from admin.meetings.forms import MeetingForm, MultiEmailField data = dict( edit='False', endpoint='short', name='Much longer', info_url='...
rdhyee/osf.io
admin_tests/meetings/test_forms.py
Python
apache-2.0
2,864
"""Adds a simulated sensor.""" from datetime import datetime import math from random import Random import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONF_NAME import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity impor...
sdague/home-assistant
homeassistant/components/simulated/sensor.py
Python
apache-2.0
4,535
''' vivo.sx urlresolver plugin Copyright (C) 2015 y2000j 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 distr...
TheWardoctor/Wardoctors-repo
script.module.urlresolver/lib/urlresolver/plugins/vivosx.py
Python
apache-2.0
1,584
# -*- coding: utf-8 -*- from pandas.compat import range import pandas.util.testing as tm from pandas import read_csv import os import nose with tm.assert_produces_warning(FutureWarning, check_stacklevel=False): import pandas.tools.rplot as rplot def curpath(): pth, _ = os.path.split(os.path.abspath(__file__))...
Vvucinic/Wander
venv_2_7/lib/python2.7/site-packages/pandas/tests/test_rplot.py
Python
artistic-2.0
11,560
# test concurrent interning of strings # # MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd import _thread # function to check the interned string def check(s, val): assert type(s) == str assert int(s) == val # main thread function def th(base, n): for i in range(n): # this...
mhoffma/micropython
tests/thread/thread_qstr1.py
Python
mit
825
# Copyright (c) 2014 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or implied, # including the impl...
beav/pulp
server/test/unit/server/content/sources/test_container.py
Python
gpl-2.0
34,946
# This file is a part of MediaDrop (http://www.mediadrop.net), # Copyright 2009-2015 MediaDrop contributors # For the exact contribution history, see the git revision log. # The source code contained in this file is licensed under the GPLv3 or # (at your option) any later version. # See LICENSE.txt in the main project ...
jobsafran/mediadrop
mediadrop/model/settings.py
Python
gpl-3.0
4,208
from couchpotato.core.event import addEvent from couchpotato.core.logger import CPLog from couchpotato.core.notifications.base import Notification import os import subprocess log = CPLog(__name__) class Synoindex(Notification): index_path = '/usr/syno/bin/synoindex' def __init__(self): super(Synoin...
lebabouin/CouchPotatoServer-develop
couchpotato/core/notifications/synoindex/main.py
Python
gpl-3.0
1,104
""" fs.tests.test_zipfs: testcases for the ZipFS class """ import unittest import os import random import zipfile import tempfile import shutil import fs.tests from fs.path import * from fs import zipfs class TestReadZipFS(unittest.TestCase): def setUp(self): self.temp_filename = "".join(random.ch...
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/fs/tests/test_zipfs.py
Python
agpl-3.0
5,890
"""Tests for the retire_order command""" from tempfile import NamedTemporaryFile from django.core.management import call_command from course_modes.models import CourseMode from shoppingcart.models import CertificateItem, Order from student.tests.factories import UserFactory from xmodule.modulestore.tests.django_util...
miptliot/edx-platform
lms/djangoapps/shoppingcart/management/tests/test_retire_order.py
Python
agpl-3.0
2,853
__all__ = ['get_config_vars', 'get_path'] try: # Python 2.7 or >=3.2 from sysconfig import get_config_vars, get_path except ImportError: from distutils.sysconfig import get_config_vars, get_python_lib def get_path(name): if name not in ('platlib', 'purelib'): raise ValueError("Name ...
OpenWinCon/OpenWinNet
web-gui/myvenv/lib/python3.4/site-packages/setuptools/py31compat.py
Python
apache-2.0
1,184
# -*- coding: utf-8 -*- from flask import request from .provider import ZoteroCitationsProvider from website.citations.views import GenericCitationViews from website.project.decorators import ( must_have_addon, must_be_addon_authorizer, must_have_permission, must_not_be_registration, must_be_contributor_or...
Johnetordoff/osf.io
addons/zotero/views.py
Python
apache-2.0
2,789
# # junitxml: extensions to Python unittest to get output junitxml # Copyright (C) 2009 Robert Collins <robertc@robertcollins.net> # # Copying permitted under the LGPL-3 licence, included with this library. try: from cStringIO import StringIO except ImportError: from io import StringIO import datetime impo...
supercheetah/diceroller
pyinstaller/PyInstaller/lib/junitxml/tests/test_junitxml.py
Python
artistic-2.0
12,777
""" ##################### Point (``owpoint``) ##################### .. class:: OWPoint Represents a point on the plot, usually a part of a curve, or in a legend item. The point is identified with its symbol, color, size, label, and state, where the state can be ether unselected (default), marker, or sele...
marinkaz/orange3
Orange/widgets/utils/plot/owpoint.py
Python
bsd-2-clause
2,028
__all__ = ['register', 'sharedPackages', 'reloadSharedPackage', 'reloadSharedPackages'] from panda3d.core import Filename, VirtualFileSystem, VirtualFileMountSystem, OFileStream, copyStream from direct.stdpy.file import open import sys import marshal import imp import types # The sharedPackages dictionary ...
tobspr/panda3d
direct/src/showbase/VFSImporter.py
Python
bsd-3-clause
19,654
""" Sphinx plugins for Django documentation. """ import docutils.nodes import docutils.transforms import sphinx import sphinx.addnodes import sphinx.directives import sphinx.environment import sphinx.roles from docutils import nodes def setup(app): app.add_crossref_type( directivename = "setting", ...
Yelp/pyes
docs/_ext/djangodocs.py
Python
bsd-3-clause
3,769
# Copyright (C) 2003-2005 Peter J. Verveer # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following d...
mbayon/TFG-MachineLearning
venv/lib/python3.6/site-packages/scipy/ndimage/filters.py
Python
mit
52,520
#!/usr/bin/python # (c) 2015-2016, Sergei Antipov, 2GIS LLC # # 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) ...
wupeiran/ursula
library/mongodb_replication.py
Python
mit
15,988
import unittest import mock from pulp.client.consumer import cli class TestWriteToLocation(unittest.TestCase): """ Tests for writing content to a file. """ @mock.patch('pulp.client.consumer.cli.os') @mock.patch('__builtin__.open', new_callable=mock.MagicMock()) def test_dir_struct_exists(se...
ulif/pulp
client_consumer/test/unit/test_cli.py
Python
gpl-2.0
4,172
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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) an...
scottcunningham/ansible
lib/ansible/executor/process/worker.py
Python
gpl-3.0
6,192
# -*- coding: utf-8 -*- # (c) 2015 Pedro M. Baeza # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import models, api, _ from openerp.addons.l10n_es_account_invoice_sequence.constants import \ ALLOWED_JOURNAL_TYPES class WizardMultiChartsAccounts(models.TransientModel): _inherit =...
Jortolsa/l10n-spain
l10n_es_account_invoice_sequence/wizard/wizard_multi_charts_accounts.py
Python
agpl-3.0
1,779
#!/usr/bin/python """MobWrite - Real-time Synchronization and Collaboration Service Copyright 2009 Google Inc. http://code.google.com/p/google-mobwrite/ 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...
sunnychaudhari/gstudio
gnowsys-ndf/gnowsys_ndf/mobwrite/mobwrite_core.py
Python
agpl-3.0
9,136
# 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...
indhub/mxnet
python/mxnet/gluon/data/sampler.py
Python
apache-2.0
4,279
# 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...
jasonstack/cassandra
pylib/cqlshlib/cqlshhandling.py
Python
apache-2.0
10,355
# Copyright (c) 2012 OpenStack Foundation # 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 ...
ntt-sic/nova
nova/tests/api/openstack/compute/contrib/test_certificates.py
Python
apache-2.0
2,810
# -*- coding: utf-8 -*- # # 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 #...
danielvdende/incubator-airflow
airflow/contrib/hooks/wasb_hook.py
Python
apache-2.0
5,899
from __future__ import unicode_literals from bisect import bisect from collections import OrderedDict, defaultdict from itertools import chain from django.apps import apps from django.conf import settings from django.core.exceptions import FieldDoesNotExist from django.db import connections from django.db.models.fiel...
vincepandolfo/django
django/db/models/options.py
Python
bsd-3-clause
29,986
"""Interpolators wrap arrays to allow the array to be indexed in continuous coordinates This module uses the trackvis coordinate system, for more information about this coordinate system please see dipy.tracking.utils The following modules also use this coordinate system: dipy.tracking.utils dipy.tracking.integration ...
mdesco/dipy
dipy/reconst/interpolate.py
Python
bsd-3-clause
1,865
""" escape/unescape routines available for backends which need alphanumeric usernames, services, or other values """ import re import string import sys # True if we are running on Python 3. # taken from six.py PY3 = sys.version_info[0] == 3 # allow use of unicode literals if PY3: def u(s): return s d...
b-jesch/service.fritzbox.callmonitor
resources/lib/PhoneBooks/pyicloud/vendorlibs/keyring/util/escape.py
Python
gpl-2.0
1,497
# # 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...
airbnb/airflow
tests/dags/test_heartbeat_failed_fast.py
Python
apache-2.0
1,163
import os max_used_id = -1 cur_node_is_processed = False conditions = {} if_nodes = [] if_nodes_with_2_branches = [] branch_end = {} branch_end_type = {} branch_type = {} code = [] init_code = [] terminate_code = [] variables_code = [] balancer_code = '' id_to_pos_in_code = {} processed_loops = {} processed_ends = ...
RomanBelkov/qreal
plugins/tools/visualInterpreter/examples/robotsCodeGeneration/reactionsStorage/Initialization.py
Python
apache-2.0
3,823
""" ========================================= SVM: Maximum margin separating hyperplane ========================================= Plot the maximum margin separating hyperplane within a two-class separable dataset using a Support Vector Machines classifier with linear kernel. """ print(__doc__) import numpy as np impo...
depet/scikit-learn
examples/svm/plot_separating_hyperplane.py
Python
bsd-3-clause
1,252
# RUN: python %s | llvm-mc -filetype=obj -triple i686-pc-win32 - | llvm-readobj -h | FileCheck %s from __future__ import print_function # This test checks that the COFF object emitter can produce objects with # more than 65279 sections. # While we only generate 65277 sections, an implicit .text, .data and .bss will ...
endlessm/chromium-browser
third_party/llvm/llvm/test/MC/COFF/bigobj.py
Python
bsd-3-clause
935
# coding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from datetime import date from django.conf import settings from django.test import TestCase from django.test.utils import override_settings from haystack import connection_router, connections, indexes from haystack.que...
fisle/django-haystack
test_haystack/simple_tests/test_simple_backend.py
Python
bsd-3-clause
7,001
#!/usr/bin/env python #-*- coding: utf-8 -*- # # Documents # """ Documents """ from __future__ import absolute_import from __future__ import print_function from __future__ import division from __future__ import unicode_literals import os import inspect from . import pyarduino this_file_path = os.path.abspath(ins...
kidmillions/Stino
stino/st_base.py
Python
mit
1,584
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' group_l10n_in_reseller = fields.Boolean(implied_group='l10n_in.group_l10n_in_reseller', str...
ddico/odoo
addons/l10n_in/models/res_config_settings.py
Python
agpl-3.0
355
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2013-2015 Serv. Tecnol. Avanzados # Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> # # This program is free software: y...
Jortolsa/l10n-spain
l10n_es_toponyms/wizard/__init__.py
Python
agpl-3.0
1,118
# Copyright 2011 OpenStack Foundation # 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 requ...
daizhengy/RDS
trove/tests/fakes/__init__.py
Python
apache-2.0
752
from social.backends.bitbucket import BitbucketOAuth as BitbucketBackend
vxvinh1511/django-social-auth
social_auth/backends/contrib/bitbucket.py
Python
bsd-3-clause
73
__all__ = ['Console'] import sys styles = [ 'black', 'blue', 'green', 'red', 'cyan', 'yellow', 'purple', 'white', 'bold', 'italic', 'underline', 'inverse', ] class Console: def __init__(self, output=None, styles=[]): output = output or sys.stdout if isinstance(output, Console): self.output = o...
twotreeszf/AriaThunder
xunlei-lixian/lixian_colors_console.py
Python
bsd-3-clause
845
""" Helper functions for creating Form classes from Django models and database field objects. """ from __future__ import unicode_literals from collections import OrderedDict from itertools import chain from django.core.exceptions import ( NON_FIELD_ERRORS, FieldError, ImproperlyConfigured, ValidationError, ) fro...
rsvip/Django
django/forms/models.py
Python
bsd-3-clause
55,046
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # 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', ...
alxgu/ansible
lib/ansible/modules/network/f5/bigiq_application_fastl4_udp.py
Python
gpl-3.0
21,905
#!/usr/bin/env python from __future__ import print_function import json, sys from common_paths import * def assert_non_empty_string(obj, field): assert field in obj, 'Missing field "%s"' % field assert isinstance(obj[field], basestring), \ 'Field "%s" must be a string' % field assert len(obj[fiel...
Varentsov/servo
tests/wpt/web-platform-tests/mixed-content/generic/tools/spec_validator.py
Python
mpl-2.0
5,868
#*************************************************************************** #* * #* Copyright (c) 2011, 2016 * #* Jose Luis Cercos Pita <jlcercos@gmail.com> * #* ...
Fat-Zer/FreeCAD_sf_master
src/Mod/Ship/shipLoadExample/TaskPanel.py
Python
lgpl-2.1
4,881
#!/usr/bin/env python '''Test depth buffer save. A scene consisting of a single coloured triangle will be rendered. The depth buffer will then be saved to a stream and loaded as a texture. You will see the original scene first for up to several seconds before the depth buffer image appears (because retrie...
gdkar/pyglet
tests/image/DEPTH_SAVE.py
Python
bsd-3-clause
1,686
# # This file is part of pyasn1 software. # # Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com> # License: http://snmplabs.com/pyasn1/license.html # from pyasn1 import error from pyasn1.codec.ber import encoder from pyasn1.compat.octets import str2octs, null from pyasn1.type import univ from pyasn1.type import ...
martbhell/wasthereannhlgamelastnight
src/lib/pyasn1/codec/cer/encoder.py
Python
mit
9,409
# -*- coding: utf-8 -*- from .base import WatershedBEM
carolFrohlich/nipype
nipype/interfaces/mne/__init__.py
Python
bsd-3-clause
55
import json from django.forms import Widget, MultipleChoiceField from django.forms.util import flatatt from django.utils.datastructures import MultiValueDict, MergeDict from django.utils.encoding import force_unicode from django.utils.html import escape from django.utils.safestring import mark_safe from taggit.models...
orvi2014/kitsune
kitsune/tags/forms.py
Python
bsd-3-clause
6,116
a = "¢пр" print(a[0], a[0:1]) print(a[1], a[1:2]) print(a[2], a[2:3]) try: print(a[3]) except IndexError: print("IndexError") print(a[3:4]) print(a[-1]) print(a[-2], a[-2:-1]) print(a[-3], a[-3:-2]) try: print(a[-4]) except IndexError: print("IndexError") print(a[-4:-3]) print(a[0:2]) print(a[1:3]) p...
kerneltask/micropython
tests/unicode/unicode_subscr.py
Python
mit
336
# Copyright 2012,2013 Christoph Reiter # # 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 # version 2.1 of the License, or (at your option) any later version. import re import trac...
jackkiej/SickRage
lib/pgi/codegen/funcgen.py
Python
gpl-3.0
11,370
from __future__ import unicode_literals source_link = "https://github.com/frappe/erpnext"
manassolanki/erpnext
erpnext/config/docs.py
Python
gpl-3.0
90
############################################################ # $HeadURL$ ############################################################ """ DIRAC.WorkloadManagementSystem.PilotAgent package """ __RCSID__ = "$Id$"
sposs/DIRAC
WorkloadManagementSystem/PilotAgent/__init__.py
Python
gpl-3.0
215
# # (c) 2016 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...
emersonsoftware/ansiblefork
lib/ansible/plugins/terminal/junos.py
Python
gpl-3.0
1,690
from mock import patch print(patch.object) import mock print(mock.patch.object)
paplorinc/intellij-community
python/testData/inspections/PyUnresolvedReferencesInspection/MockPatchObject/a.py
Python
apache-2.0
82
# Copyright (c) 2014 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 ...
yohanko88/gem5-DC
src/sim/SubSystem.py
Python
bsd-3-clause
2,797
# -*- coding: utf-8 -*- """ pygments.lexers.r ~~~~~~~~~~~~~~~~~ Lexers for the R/S languages. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, include, words, do_insertions from ...
wandb/client
wandb/vendor/pygments/lexers/r.py
Python
mit
23,755
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016-2018, Cumulus Networks <ce-ceng@cumulusnetworks.com> # 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_v...
thaim/ansible
lib/ansible/modules/network/cumulus/nclu.py
Python
mit
7,641
# -*- coding: utf-8 -*- # Copyright: (c) 2018, 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 DOCUMENTATION = """ become: pbrun short_description: PowerBroker ru...
alxgu/ansible
lib/ansible/plugins/become/pbrun.py
Python
gpl-3.0
3,362
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2016 Martine Lenders <mail@martine-lenders.eu> # # Distributed under terms of the MIT license. from __future__ import print_function import argparse import os, sys import random import pexpect import subprocess import time import types DE...
alignan/RIOT
tests/lwip/tests/01-run.py
Python
lgpl-2.1
9,890
from __future__ import unicode_literals from django.test import TestCase from django.utils import six from .models import (Building, Child, Device, Port, Item, Country, Connection, ClientStatus, State, Client, SpecialClient, TUser, Person, Student, Organizer, Class, Enrollment, Hen, Chick, A, B, C) class Se...
webostin/django-btc
tests/select_related_regress/tests.py
Python
bsd-3-clause
9,397
#!/usr/bin/python #This is an example plugin for the popular network monitoring program nagios. #Check if all the hosts in a pool are live. #If we log in to a slave by mistake (the master can sometimes change) #then redirect the request to the real master #example command line: ./check_pool.py -H ivory -p password -...
jjd27/xen-api
ocaml/idl/binding_sanity_checks/nagios_plugins/check_pool.py
Python
lgpl-2.1
3,723
""" A package for generating various graphs in networkx. """ from networkx.generators.classic import * from networkx.generators.degree_seq import * from networkx.generators.directed import * from networkx.generators.ego import * from networkx.generators.expanders import * from networkx.generators.geometric import * f...
LumPenPacK/NetworkExtractionFromImages
win_build/nefi2_win_amd64_msvc_2015/site-packages/networkx/generators/__init__.py
Python
bsd-2-clause
772
# 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 math import unittest # pylint: disable=F0401 import mojo.system # Generated files # pylint: disable=F0401 import sample_import_mojom import sample_i...
hgl888/chromium-crosswalk-efl
mojo/python/tests/bindings_structs_unittest.py
Python
bsd-3-clause
6,707
# 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...
eadgarchen/tensorflow
tensorflow/contrib/gan/python/features/python/conditioning_utils_impl.py
Python
apache-2.0
3,816
if not request.env.web2py_runtime_gae: db = DAL("sqlite://storage.sqlite") else: db = DAL("google:datastore") session.connect(request, response, db=db) # Test for removing a table, this table is removed in the next revision db.define_table("removing", Field("name") ) db.def...
devinbalkind/eden
tests/dbmigration/old_models/db.py
Python
mit
749
from collections import OrderedDict from django.test import TestCase from django.test.utils import override_settings from django.utils.translation import ugettext_lazy as _ from oscar.apps.search import facets FACET_COUNTS = { u'dates': {}, u'fields': { 'category': [('Fiction', 12), ('Horror', 6), ('...
QLGu/django-oscar
tests/unit/search/munger_tests.py
Python
bsd-3-clause
3,715
"""Extension management for Windows. Under Windows it is unlikely the .obj files are of use, as special compiler options are needed (primarily to toggle the behavior of "public" symbols. I dont consider it worth parsing the MSVC makefiles for compiler options. Even if we get it just right, a specific freeze applicat...
837468220/python-for-android
python3-alpha/python3-src/Tools/freeze/checkextensions_win32.py
Python
apache-2.0
6,199
from __future__ import unicode_literals import logging import logging.config # needed when logging_config doesn't start with logging.config import sys import warnings from copy import copy from django.conf import settings from django.core import mail from django.core.mail import get_connection from django.utils.depr...
jylaxp/django
django/utils/log.py
Python
bsd-3-clause
5,244
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('partner', '0001_initial'), ('catalogue', '0001_initial'), ('basket', '0001_initial'), ...
itbabu/django-oscar
src/oscar/apps/basket/migrations/0002_auto_20140827_1705.py
Python
bsd-3-clause
1,749
# # subunit: extensions to python unittest to get test results from subprocesses. # Copyright (C) 2005 Robert Collins <robertc@robertcollins.net> # # Licensed under either the Apache License, Version 2.0 or the BSD 3-clause # license at the users choice. A copy of both licenses are available in the # project sour...
kraziegent/mysql-5.6
xtrabackup/test/python/subunit/tests/test_subunit_tags.py
Python
gpl-2.0
2,267
#-*- coding: utf-8 -*-
hzlf/openbroadcast
website/shop/shop_ajax/admin.py
Python
gpl-3.0
24
"""distutils.command.bdist_dumb Implements the Distutils 'bdist_dumb' command (create a "dumb" built distribution -- i.e., just an archive to be unpacked under $prefix or $exec_prefix).""" __revision__ = "$Id$" import os from sysconfig import get_python_version from distutils.util import get_platform from distutil...
Symmetry-Innovations-Pty-Ltd/Python-2.7-for-QNX6.5.0-x86
usr/pkg/lib/python2.7/distutils/command/bdist_dumb.py
Python
mit
5,127
#!/usr/bin/python import usb.core import usb.util import serial import socket from escpos import * from constants import * from exceptions import * from time import sleep class Usb(Escpos): """ Define USB printer """ def __init__(self, idVendor, idProduct, interface=0, in_ep=0x82, out_ep=0x01): """ ...
vileopratama/vitech
src/addons/hw_escpos/escpos/printer.py
Python
mit
6,802
""" Extracts the version of the PostgreSQL server. """ import re # This reg-exp is intentionally fairly flexible here. # Needs to be able to handle stuff like: # PostgreSQL #.#.# # EnterpriseDB #.# # PostgreSQL #.# beta# # PostgreSQL #.#beta# VERSION_RE = re.compile(r'\S+ (\d+)\.(\d+)\.?(\d+)?') def _parse_...
BitWriters/Zenith_project
zango/lib/python3.5/site-packages/django/db/backends/postgresql_psycopg2/version.py
Python
mit
1,517
from Cython.Compiler.ModuleNode import ModuleNode from Cython.Compiler.Symtab import ModuleScope from Cython.TestUtils import TransformTest from Cython.Compiler.Visitor import MethodDispatcherTransform from Cython.Compiler.ParseTreeTransforms import ( NormalizeTree, AnalyseDeclarationsTransform, AnalyseExpressi...
JulienMcJay/eclock
windows/Python27/Lib/site-packages/Cython/Compiler/Tests/TestVisitor.py
Python
gpl-2.0
2,228
from .pls_ import _PLS __all__ = ['CCA'] class CCA(_PLS): """CCA Canonical Correlation Analysis. CCA inherits from PLS with mode="B" and deflation_mode="canonical". Read more in the :ref:`User Guide <cross_decomposition>`. Parameters ---------- n_components : int, (default 2). numb...
mbayon/TFG-MachineLearning
venv/lib/python3.6/site-packages/sklearn/cross_decomposition/cca_.py
Python
mit
3,192
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. import re import sys from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style from .winterm import WinTerm, WinColor, WinStyle from .win32 import windll winterm = None if windll is not None: winterm = WinTerm() def is_a_tty(stream): r...
cortext/crawtextV2
~/venvs/crawler/lib/python2.7/site-packages/pip/_vendor/colorama/ansitowin32.py
Python
mit
6,664
from django.contrib.syndication.views import Feed from django.utils import feedgenerator class PublicationFeed(Feed): model = None feed_type = feedgenerator.Rss201rev2Feed def items(self): return self.model.objects.published()[:10] def item_pubdate(self, item): return item.publicati...
trilan/lemon-publications
publications/feeds.py
Python
isc
334
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'ScheduleItem.css_class' db.add_column(u'schedule_schedule...
CarlFK/wafer
wafer/schedule/south_migrations/0004_auto__add_field_scheduleitem_css_class.py
Python
isc
9,737
from functools import wraps from aiohttp.abc import AbstractView from aiohttp.web import HTTPForbidden, json_response, StreamResponse try: import ujson as json except ImportError: import json from .cfg import cfg from .utils import url_for, redirect, get_cur_user def _get_request(args): # Supports class...
imbolc/aiohttp-login
aiohttp_login/decorators.py
Python
isc
1,959
import base64 import copy import inspect import logging import re import urlparse import pilo from . import Expression, exp, types logger = logging.getLogger(__name__) __all__ = [ 'PathMixin', 'String', 'Boolean', 'Integer', 'IPAddress', 'IPNetwork', 'NamedTuple' 'StringHash', 'A...
bninja/rump
rump/request.py
Python
isc
10,243
import asyncio import subprocess from collections import defaultdict from .cache import uses_cache from .printer import print_overview class HomeBrew: __slots__ = ("_installed", "_uses") def __init__(self): self.update() def update(self): self._installed = self._get_installed() ...
igroen/homebrew
homebrew/homebrew.py
Python
isc
2,053
VERSION = '0.1.3.0' PROGRAM = 'dsame' DESCRIPTION = 'dsame is a program to decode EAS/SAME alert messages' COPYRIGHT = 'Copyright (C) 2016 Joseph W. Metcalf' TEST_STRING = 'EAS: ZCZC-WXR-RWT-055027-055039-055047-055117-055131-055137-055139-055015-055071+0030-0771800-KMKX/NWS-' MSG__TEXT={ 'EN' : {'MSG1' ...
cuppa-joe/dsame
defs.py
Python
isc
274,490
from expects.testing import failure from expects import * from enerdata.contracts.tariff import * from datetime import datetime, timedelta from enerdata.datetime.timezone import TIMEZONE from mamba import before, context, description, it with description('Create a period'): with it('accepts "te"'): Tariff...
gisce/enerdata
spec/contracts/tariff_spec.py
Python
mit
226,020
''' Created on 16 May 2014 @author: michael ''' import mjb.dev.game_utility.graphics.screen as screen, pygame.locals class KeyboardListener(object): ''' The keyboard listener will receive all key up and key down events that it registers for. There are many keys, so you are asked to register for specific ...
michaelbradley91/GameUtility
GameUtility/mjb/dev/game_utility/input_listeners/keyboard_listener.py
Python
mit
2,293
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-18 20:34 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('wallet', '0006_auto_20170130_1...
uppsaladatavetare/foobar-api
src/wallet/migrations/0007_auto_20170218_2034.py
Python
mit
880
""" Django settings for juanlumn project. Generated by 'django-admin startproject' using Django 1.8.5. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build pat...
juanlumn/juanlumn
juanlumn/juanlumn/settings.py
Python
mit
2,719