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
from packetbeat import BaseTest """ Tests for the NFS """ class Test(BaseTest): def test_V3(self): """ Should correctly parse NFS v3 packet """ self.render_config_template( nfs_ports=[2049], ) self.run_packetbeat(pcap="nfs_v3.pcap") objs = self...
radoondas/elasticbeat
vendor/github.com/elastic/beats/packetbeat/tests/system/test_0061_nfs.py
Python
apache-2.0
1,469
from __future__ import with_statement import os import shutil import sys import types from contextlib import nested from StringIO import StringIO import unittest import random import types from nose.tools import raises, eq_, ok_ from fudge import with_patched_object from fabric.state import env, output from fabric....
lamby/pkg-fabric
tests/test_operations.py
Python
bsd-2-clause
31,113
import numpy as np from numpy.testing import assert_array_equal import pytest from sklearn.feature_extraction import FeatureHasher from sklearn.utils._testing import ignore_warnings, fails_if_pypy pytestmark = fails_if_pypy def test_feature_hasher_dicts(): h = FeatureHasher(n_features=16) assert "dict" == h...
huzq/scikit-learn
sklearn/feature_extraction/tests/test_feature_hasher.py
Python
bsd-3-clause
5,351
#!/usr/bin/env python3 # Copyright 2021 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. # This is generated, do not edit. Update BuildConfigGenerator.groovy and # 3ppFetch.template instead. import argparse import json imp...
chromium/chromium
third_party/android_deps/libs/com_android_support_support_media_compat/3pp/fetch.py
Python
bsd-3-clause
2,505
#!/usr/bin/env python3 # Copyright (c) 2016-2018 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 NULLDUMMY softfork. Connect to a single node. Generate 2 blocks (save the coinbases for later). G...
guncoin/guncoin
test/functional/feature_nulldummy.py
Python
mit
6,442
#!/usr/bin/env python """ fig2dev-ext.py Python script for running fig2dev in Inkscape extensions Copyright (C) 2008 Stephen Silver This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 ...
piksels-and-lines-orchestra/inkscape
share/extensions/fig2dev-ext.py
Python
gpl-2.0
1,025
# -*- encoding: utf-8 -*- """ Usage:: hammer organization [OPTIONS] SUBCOMMAND [ARG] ... Parameters:: SUBCOMMAND subcommand [ARG] ... subcommand arguments Subcommands:: add-computeresource Associate a resource add-configtemplate Associ...
ares/robottelo
robottelo/cli/org.py
Python
gpl-3.0
6,156
#! /usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions...
vkscool/nupic
nupic/simple_server.py
Python
gpl-3.0
3,594
# 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 "License");...
lukecwik/incubator-beam
sdks/python/apache_beam/examples/snippets/transforms/aggregation/count.py
Python
apache-2.0
2,486
import numpy as np import pytest import pandas as pd import pandas._testing as tm def test_astype(): # with missing values arr = pd.array([0.1, 0.2, None], dtype="Float64") with pytest.raises(ValueError, match="cannot convert to 'int64'-dtype NumPy"): arr.astype("int64") with pytest.raises(...
rs2/pandas
pandas/tests/arrays/floating/test_astype.py
Python
bsd-3-clause
3,917
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.python.log}. """ from __future__ import division, absolute_import, print_function from twisted.python.compat import _PY3, NativeStringIO as StringIO import os import sys import time import logging import warnings import ...
bdh1011/wau
venv/lib/python2.7/site-packages/twisted/test/test_log.py
Python
mit
36,409
r""" Core Concepts ============= This tutorial introduces Documents, Corpora, Vectors and Models: the basic concepts and terms needed to understand and use gensim. """ import pprint ############################################################################### # The core concepts of ``gensim`` are: # # 1. :ref:`cor...
midnightradio/gensim
docs/src/gallery/core/run_core_concepts.py
Python
gpl-3.0
15,054
""" Convert between bytestreams and higher-level AMQP types. 2007-11-05 Barry Pederson <bp@barryp.org> """ # Copyright (C) 2007 Barry Pederson <bp@barryp.org> # # 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 Fr...
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/amqp/serialization.py
Python
agpl-3.0
16,315
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010 OpenERP S.A. http://www.openerp.com # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
addition-it-solutions/project-all
openerp/addons/base/tests/test_osv.py
Python
agpl-3.0
4,654
# -*- coding: utf-8 -*- from __future__ import absolute_import # vim: set ai et ts=4 sw=4: # This file is part of OpenHatch. # Copyright (C) 2014 Elana Hashman # # This program 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 Fr...
nirmeshk/oh-mainline
mysite/bugsets/tests.py
Python
agpl-3.0
19,396
#!/usr/bin/python import sys, os, commands, time, re, copy try: from PyQt4 import QtCore, QtGui QtCore.Signal = QtCore.pyqtSignal QtCore.Slot = QtCore.pyqtSlot except ImportError: try: from PySide import QtCore, QtGui QtCore.QString = str except ImportError: raise ImportErro...
Chuban/moose
gui/utils/YamlData.py
Python
lgpl-2.1
1,666
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, 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 # # ...
99cloud/keystone_register
horizon/test/tests/tables.py
Python
apache-2.0
31,356
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/protobuf/any.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflecti...
unnikrishnankgs/va
venv/lib/python3.5/site-packages/google/protobuf/any_pb2.py
Python
bsd-2-clause
2,652
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Name: CellEditor.py # Author: Phillip Piper # Created: 3 April 2008 # SVN-ID: $Id$ # Copyright: (c) 2008 by Phillip Piper, 2008 # License: wxWindows license #-------------------------...
ODM2/ODMToolsPython
odmtools/lib/ObjectListView/CellEditor.py
Python
bsd-3-clause
19,490
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
roadmapper/ansible
lib/ansible/modules/cloud/google/gcp_compute_health_check.py
Python
gpl-3.0
47,123
"""Sanity test using PSScriptAnalyzer.""" from __future__ import absolute_import, print_function import collections import json import os import re from lib.sanity import ( SanitySingleVersion, SanityMessage, SanityFailure, SanitySuccess, SanitySkipped, ) from lib.util import ( SubprocessErro...
wrouesnel/ansible
test/runner/lib/sanity/pslint.py
Python
gpl-3.0
5,220
# # 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/incubator-airflow
airflow/operators/redshift_to_s3_operator.py
Python
apache-2.0
1,680
# Copyright (c) 2014 eBay Inc. # Copyright (c) 2015 Rushil Chugh # Copyright (c) 2015 Clinton Knight # 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 # # ...
jcsp/manila
manila/api/views/scheduler_stats.py
Python
apache-2.0
1,818
"""Tests for Transmission config flow.""" from datetime import timedelta from unittest.mock import patch import pytest from transmissionrpc.error import TransmissionError from homeassistant import config_entries, data_entry_flow from homeassistant.components import transmission from homeassistant.components.transmiss...
lukas-hetzenecker/home-assistant
tests/components/transmission/test_config_flow.py
Python
apache-2.0
9,529
# Copyright 2019 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...
chemelnucfin/tensorflow
tensorflow/python/keras/saving/saved_model/model_serialization.py
Python
apache-2.0
2,441
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-09-14 14:32 from __future__ import unicode_literals from django.db import migrations from osf.models import MetaSchema from website.project.metadata.schemas import LATEST_SCHEMA_VERSION def update_metaschema_active(*args, **kwargs): MetaSchema.objects...
aaxelb/osf.io
osf/migrations/0055_update_metaschema_active.py
Python
apache-2.0
594
#!/usr/bin/env python # # 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 sys from adb_profile_chrome import main if __name__ == '__main__': sys.exit(main.main())
AndroidOpenDevelopment/android_external_chromium_org
tools/android/adb_profile_chrome.py
Python
bsd-3-clause
288
from __future__ import unicode_literals import datetime import json import re import sys import time from email.header import Header from django.conf import settings from django.core import signals, signing from django.core.exceptions import DisallowedRedirect from django.core.serializers.json import DjangoJSONEncode...
BlindHunter/django
django/http/response.py
Python
bsd-3-clause
17,980
import numpy as np from numpy.testing import assert_allclose from sklearn.datasets import make_regression from sklearn.model_selection import train_test_split from sklearn.metrics import r2_score import pytest from sklearn.ensemble._hist_gradient_boosting.binning import _BinMapper from sklearn.ensemble._hist_gradient_...
kevin-intel/scikit-learn
sklearn/ensemble/_hist_gradient_boosting/tests/test_predictor.py
Python
bsd-3-clause
6,256
# -*- coding: utf-8 -*- #----------------------------------------------------------- # # fTools # Copyright (C) 2008-2011 Carson Farmer # EMAIL: carson.farmer (at) gmail.com # WEB : http://www.ftools.ca/fTools.html # # A collection of data management and analysis tools for vector data # #-----------------------------...
dracos/QGIS
python/plugins/fTools/tools/doGeometry.py
Python
gpl-2.0
45,336
from coalib.bearlib.aspects.meta import issubaspect, assert_aspect class aspectlist(list): """ List-derived container to hold aspects. """ def __init__(self, seq=()): super().__init__(map(assert_aspect, seq)) def __contains__(self, aspect): for item in self: if issuba...
refeed/coala
coalib/bearlib/aspects/collections.py
Python
agpl-3.0
390
# Licensed to the StackStorm, Inc ('StackStorm') 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 th...
punalpatel/st2
st2common/st2common/exceptions/db.py
Python
apache-2.0
1,337
# VMware vSphere Python SDK # Copyright (c) 2008-2015 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 # # Unle...
alexkolar/pyvmomi
tests/test_iso8601.py
Python
apache-2.0
4,117
from __future__ import unicode_literals from django.apps import AppConfig class RegisterConfig(AppConfig): name = 'register'
nanomolina/JP
src/odontology/register/apps.py
Python
apache-2.0
132
# -*- coding: utf-8 -*- import pytest from api.base.settings.defaults import API_BASE from api.taxonomies.serializers import subjects_as_relationships_version from osf.models import Preprint, NodeLog from osf_tests.factories import ( AuthUserFactory, SubjectFactory, ) @pytest.mark.django_db class SubjectsFil...
mfraezz/osf.io
api_tests/subjects/mixins.py
Python
apache-2.0
23,091
# Copyright 2013-2015 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
Sticklyman1936/workload-automation
wlauto/common/resources.py
Python
apache-2.0
1,635
# Copyright (c) 2016 EMC 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...
phenoxim/cinder
cinder/volume/drivers/coprhd/helpers/urihelper.py
Python
apache-2.0
2,759
"""SCons.Tool.386asm Tool specification for the 386ASM assembler for the Phar Lap ETS embedded operating system. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005...
aubreyrjones/libesp
scons_local/scons-local-2.3.0/SCons/Tool/386asm.py
Python
mit
2,231
""" Test cases for codeop.py Nick Mathewson """ import unittest from test.test_support import run_unittest, is_jython from codeop import compile_command, PyCF_DONT_IMPLY_DEDENT if is_jython: import sys import cStringIO def unify_callables(d): for n,v in d.items(): if callable(v)...
zephyrplugins/zephyr
zephyr.plugin.jython/jython2.5.2rc3/Lib/test/test_codeop.py
Python
epl-1.0
8,298
# Copyright: (c) 2012, Jan-Piet Mens <jpmens () gmail.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 from ansible.errors import AnsibleError, AnsibleAssertionError from ansible.mo...
alexlo03/ansible
lib/ansible/utils/plugin_docs.py
Python
gpl-3.0
4,053
from .readtime import *
mikitex70/pelican-plugins
readtime/__init__.py
Python
agpl-3.0
24
"""Make sure that existing Koogeek LS1 support isn't broken.""" from datetime import timedelta from unittest import mock from aiohomekit.exceptions import AccessoryDisconnectedError, EncryptionError from aiohomekit.testing import FakePairing import pytest from homeassistant.components.light import SUPPORT_BRIGHTNESS...
w1ll1am23/home-assistant
tests/components/homekit_controller/specific_devices/test_koogeek_ls1.py
Python
apache-2.0
3,555
"""Tests for HomematicIP Cloud light.""" from homematicip.base.enums import RGBColorState from homeassistant.components.homematicip_cloud import DOMAIN as HMIPC_DOMAIN from homeassistant.components.homematicip_cloud.light import ( ATTR_CURRENT_POWER_W, ATTR_TODAY_ENERGY_KWH, ) from homeassistant.components.lig...
nkgilley/home-assistant
tests/components/homematicip_cloud/test_light.py
Python
apache-2.0
8,930
# encoding: utf-8 """Tests for traitlets.traitlets.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. # # Adapted from enthought.traits, Copyright (c) Enthought, Inc., # also under the terms of the Modified BSD License. import pickle import re import sys from ._w...
unnikrishnankgs/va
venv/lib/python3.5/site-packages/traitlets/tests/test_traitlets.py
Python
bsd-2-clause
66,467
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class ProjectTask(models.Model): _name = "project.task" _inherit = ["project.task", 'pad.common'] _description = 'Task' description_pad = fields.Char('Pad URL', pad...
t3dev/odoo
addons/pad_project/models/project.py
Python
gpl-3.0
1,070
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Daniel Jaouen <dcj24@cornell.edu> # (c) 2016, Indrajit Raychaudhuri <irc+code@indrajit.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_...
photoninger/ansible
lib/ansible/modules/packaging/os/homebrew_cask.py
Python
gpl-3.0
18,051
# # [The "BSD license"] # Copyright (c) 2012 Terence Parr # Copyright (c) 2012 Sam Harwell # Copyright (c) 2014 Eric Vergnaud # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redis...
sidhart/antlr4
runtime/Python2/src/antlr4/error/ErrorListener.py
Python
bsd-3-clause
4,146
# -*- test-case-name: twisted.application.twist.test -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ C{twist} command line tool. """
EricMuller/mynotes-backend
requirements/twisted/Twisted-17.1.0/src/twisted/application/twist/__init__.py
Python
mit
166
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, techbizdev <techbizdev@paloaltonetworks.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_version':...
Jorge-Rodriguez/ansible
lib/ansible/modules/network/panos/panos_security_rule.py
Python
gpl-3.0
19,861
# (C) British Crown Copyright 2014 - 2015, Met Office # # This file is part of Iris. # # Iris 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 3 of the License, or # (at your option) any l...
QuLogic/iris
lib/iris/tests/unit/fileformats/pp/test__convert_constraints.py
Python
gpl-3.0
4,243
"""Ensure videos emit proper events""" import datetime import json from nose.plugins.attrib import attr import ddt from common.test.acceptance.tests.helpers import EventsTestMixin from common.test.acceptance.tests.video.test_video_module import VideoBaseTest from common.test.acceptance.pages.lms.video.video import _p...
louyihua/edx-platform
common/test/acceptance/tests/video/test_video_events.py
Python
agpl-3.0
13,984
# Copyright 2014: 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 # # Unless required b...
vishnu-kumar/PeformanceFramework
rally_os/plugins/openstack/scenarios/tempest/tempest.py
Python
apache-2.0
4,269
# -*- coding: utf-8 -*- """The implementation of the SocketOptionsAdapter.""" import socket import warnings import sys import requests from requests import adapters from .._compat import connection from .._compat import poolmanager from .. import exceptions as exc class SocketOptionsAdapter(adapters.HTTPAdapter): ...
catapult-project/catapult
third_party/requests_toolbelt/requests_toolbelt/adapters/socket_options.py
Python
bsd-3-clause
4,789
# 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 ...
balajikris/autorest
src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/models/storage_account_update_parameters.py
Python
mit
2,718
from __future__ import unicode_literals import re from django.core.exceptions import ValidationError from django.utils import six from django.utils.deconstruct import deconstructible from django.utils.encoding import force_text from django.utils.functional import SimpleLazyObject from django.utils.ipv6 import is_vali...
MounirMesselmeni/django
django/core/validators.py
Python
bsd-3-clause
15,107
from JupyROOT import cppcompleter, utils if '__IPYTHON__' in __builtins__ and __IPYTHON__: cppcompleter.load_ipython_extension(get_ipython()) utils.iPythonize()
mhuwiler/rootauto
bindings/pyroot/JupyROOT/__init__.py
Python
lgpl-2.1
170
# Copyright (c) 2005, 2006 Allan Saddi <allan@saddi.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this lis...
SohKai/ChronoLogger
web/flask/lib/python2.7/site-packages/flup/server/fcgi_fork.py
Python
mit
6,699
# Copyright 2009-2014 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
cortext/crawtextV2
~/venvs/crawler/lib/python2.7/site-packages/pymongo/cursor_manager.py
Python
mit
2,846
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>, and others # 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 import json import shlex impo...
alexlo03/ansible
lib/ansible/modules/utilities/logic/async_wrapper.py
Python
gpl-3.0
10,223
""" Testing for mean shift clustering methods """ import numpy as np from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_false from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_array_equal from sklearn.cluster import MeanShift from sklearn.clu...
chaluemwut/fbserver
venv/lib/python2.7/site-packages/sklearn/cluster/tests/test_mean_shift.py
Python
apache-2.0
2,844
# -*- coding: utf-8 -*- from lxml import objectify import urlparse import odoo from odoo.addons.payment.models.payment_acquirer import ValidationError from odoo.addons.payment.tests.common import PaymentAcquirerCommon from odoo.addons.payment_buckaroo.controllers.main import BuckarooController from odoo.tools import ...
chienlieu2017/it_management
odoo/addons/payment_buckaroo/tests/test_buckaroo.py
Python
gpl-3.0
7,079
""" Aggregate all views for the support app. """ # pylint: disable=wildcard-import from .index import * from .certificate import * from .enrollments import * from .refund import *
MakeHer/edx-platform
lms/djangoapps/support/views/__init__.py
Python
agpl-3.0
180
# Copyright 2016 RedHat, 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 i...
kaarolch/ansible
lib/ansible/inventory/yaml.py
Python
gpl-3.0
6,401
# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' name: auto author: - Matt Davis (@nitzmahone) version_added: "...
maxamillion/ansible
lib/ansible/plugins/inventory/auto.py
Python
gpl-3.0
2,372
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013_Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
vnsofthe/odoo
addons/base_geolocalize/models/res_partner.py
Python
agpl-3.0
3,783
# -*- coding: utf-8 -*- # Copyright (c) 2014, 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. from ._widget import VispyWidget # NOQA
dchilds7/Deysha-Star-Formation
vispy/app/backends/ipython/__init__.py
Python
bsd-3-clause
192
from django.conf.urls import url from api.applications import views app_name = 'osf' urlpatterns = [ url(r'^$', views.ApplicationList.as_view(), name=views.ApplicationList.view_name), url(r'^(?P<client_id>\w+)/$', views.ApplicationDetail.as_view(), name=views.ApplicationDetail.view_name), url(r'^(?P<clie...
icereval/osf.io
api/applications/urls.py
Python
apache-2.0
417
import logging import socketio from flask import Flask sio = socketio.Server(async_mode='eventlet', logging=logging.NullHandler) app = Flask(__name__) # client asks for data @sio.on('remote:send_request') def remote_control(sid, command): if not 'account' in command: return False bot_name = command....
tibotic/simple-pokemongo-bot
pokemongo_bot/socketio_server/app.py
Python
mit
852
#!/usr/bin/python # # Copyright 2002-2019 Barcelona Supercomputing Center (www.bsc.es) # # 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 ...
mF2C/COMPSs
compss/programming_model/bindings/python/src/pycompss/worker/piper/commons/__init__.py
Python
apache-2.0
670
from __future__ import unicode_literals from collections import defaultdict import datetime import decimal from django.contrib.auth import get_permission_codename from django.db import models from django.db.models.constants import LOOKUP_SEP from django.db.models.deletion import Collector from django.forms.forms impo...
simbha/mAngE-Gin
lib/django/contrib/admin/utils.py
Python
mit
16,393
import sys # It may be that the interpreter (wether python or pypy-c) was not linked # with C++; force its loading before doing anything else (note that not # linking with C++ spells trouble anyway for any C++ libraries ...) if 'linux' in sys.platform and 'GCC' in sys.version: # TODO: check executable to see wheth...
root-mirror/root
bindings/pyroot/cppyy/cppyy/python/cppyy/_stdcpp_fix.py
Python
lgpl-2.1
524
from sympy import AccumBounds, Symbol, floor, nan, oo, E, symbols, ceiling, pi, \ Rational, Float, I, sin, exp, log, factorial, frac from sympy.utilities.pytest import XFAIL x = Symbol('x') i = Symbol('i', imaginary=True) y = Symbol('y', real=True) k, n = symbols('k,n', integer=True) def test_floor(): a...
drufat/sympy
sympy/functions/elementary/tests/test_integers.py
Python
bsd-3-clause
6,826
import os.path as op import mne from mne.datasets import testing from mne import read_forward_solution from mne.minimum_norm import (read_inverse_operator, point_spread_function, cross_talk_function) from mne.utils import slow_test, run_tests_if_main from nose.tools import assert_true d...
rajegannathan/grasp-lift-eeg-cat-dog-solution-updated
python-packages/mne-python-0.10/mne/minimum_norm/tests/test_psf_ctf.py
Python
bsd-3-clause
2,926
#!/usr/bin/env python # Capstone Python bindings, by Nguyen Anh Quynnh <aquynh@gmail.com> from __future__ import print_function from capstone import * import binascii from xprint import to_x, to_hex, to_x_32 X86_CODE32 = b"\x8d\x4c\x32\x08\x01\xd8\x81\xc6\x34\x12\x00\x00\x00\x91\x92" RANDOM_CODE = b"\xed\x00\x00\x0...
jbremer/monitor
src/capstone/bindings/python/test_skipdata.py
Python
gpl-3.0
2,425
tile = [[0,1,4,5], [2,3,6,7], [8,9,12,13], [10,11,14,15]] shift = 0 align = 1 value = 0L holder = [] import sys basemask = [0x fd = sys.stdout indent = " "*9 for c in range(4): fd.write(indent + "*pdst++ = \n"); for l,line in enumerate(tile): fd.write(indent + " %s_mm_shuffle_epi8(line%d, (__m128i){"...
zcbenz/cefode-chromium
third_party/mesa/MesaLib/src/gallium/drivers/llvmpipe/lp_tile_shuffle_mask.py
Python
bsd-3-clause
716
# ext/autohandler.py # Copyright (C) 2006-2015 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """adds autohandler functionality to Mako templates. requires that the TemplateLookup class is...
znoland3/zachdemo
venvdir/lib/python3.4/site-packages/mako/ext/autohandler.py
Python
mit
1,829
#!/usr/bin/python # Copyright: (c) 2018, Pluribus Networks # 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': ['...
alxgu/ansible
lib/ansible/modules/network/netvisor/pn_access_list_ip.py
Python
gpl-3.0
4,598
# 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...
eliquious/go-v8
v8-3.28/tools/testrunner/local/progress.py
Python
mit
10,716
# -*- coding: utf-8 -*- """ *************************************************************************** pyuic.py --------------------- Date : March 2016 Copyright : (C) 2016 by Juergen E. Fischer Email : jef at norbit dot de ********************************...
uclaros/QGIS
python/PyQt/PyQt5/uic/pyuic.py
Python
gpl-2.0
1,079
from django.contrib import admin from django.db import models class Band(models.Model): name = models.CharField(max_length=100) bio = models.TextField() rank = models.IntegerField() class Meta: ordering = ('name',) class Song(models.Model): band = models.ForeignKey(Band, models.CASCADE)...
Beauhurst/django
tests/admin_ordering/models.py
Python
bsd-3-clause
891
import io import datetime import textwrap import unittest import functools import contextlib import collections from test import support from nntplib import NNTP, GroupInfo, _have_ssl import nntplib if _have_ssl: import ssl TIMEOUT = 30 # TODO: # - test the `file` arg to more commands # - test error conditions # ...
BeATz-UnKNoWN/python-for-android
python3-alpha/python3-src/Lib/test/test_nntplib.py
Python
apache-2.0
49,704
# # (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...
photoninger/ansible
test/units/modules/network/onyx/test_onyx_lldp.py
Python
gpl-3.0
2,404
# Copyright Bruno da Silva de Oliveira 2006. Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) from distutils.core import setup import py2exe import sys sys.path.append('../src') setup(name='pyste', scripts=['../src/p...
NixaSoftware/CVis
venv/bin/libs/python/pyste/dist/setup.py
Python
apache-2.0
331
#!/usr/bin/python # (c) 2012, Stephen Fromm <sfromm@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 optio...
andreaso/ansible
lib/ansible/modules/system/seboolean.py
Python
gpl-3.0
7,200
import unittest from test import test_support import gc import weakref import operator import copy import pickle from random import randrange, shuffle import sys import collections class PassThru(Exception): pass def check_pass_thru(): raise PassThru yield 1 class BadCmp: def __hash__(self): ...
teeple/pns_server
work/install/Python-2.7.4/Lib/test/test_set.py
Python
gpl-2.0
62,916
import foo, bar
asedunov/intellij-community
python/testData/joinLines/BackslashBetweenTargetsInImport-after.py
Python
apache-2.0
15
#! /usr/bin/env python # Last Change: Sat Mar 21 02:00 PM 2009 J # Copyright (c) 2001, 2002 Enthought, 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: # # a. Redistributions of source co...
valexandersaulys/airbnb_kaggle_contest
venv/lib/python3.4/site-packages/scipy/special/spfun_stats.py
Python
gpl-2.0
3,487
# 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. import threading class TestCollection(object): """A threadsafe collection of tests. Args: tests: List of tests to put in the collection. """ d...
Teamxrtc/webrtc-streaming-node
third_party/webrtc/src/chromium/src/build/android/pylib/base/test_collection.py
Python
mit
2,343
"""Extensions to the 'distutils' for large or complex distributions""" import os import functools import distutils.core import distutils.filelist from distutils.core import Command as _Command from distutils.util import convert_path from fnmatch import fnmatchcase from setuptools.extern.six.moves import filterfalse, ...
ohduran/CrowdFinanceInfographic
virtualenv/lib/python3.5/site-packages/setuptools/__init__.py
Python
mit
5,440
#!/usr/bin/env python # Copyright (c) 2009 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 simple rules when using an explicit build target of 'all'. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('actions...
spthaolt/breakpad
src/tools/gyp/test/rules/gyptest-default.py
Python
bsd-3-clause
1,063
from __future__ import absolute_import, division, unicode_literals import json import warnings import re from .support import get_data_files from html5lib.tokenizer import HTMLTokenizer from html5lib import constants class TokenizerTestParser(object): def __init__(self, initialState, lastStartTag=None): ...
youtube/cobalt
third_party/web_platform_tests/tools/html5lib/html5lib/tests/test_tokenizer.py
Python
bsd-3-clause
6,544
import warnings from django.core.exceptions import ImproperlyConfigured from django.utils import lru_cache, six from django.utils.deprecation import RemovedInDjango110Warning from django.utils.functional import cached_property from django.utils.module_loading import import_string from .base import Context, Template f...
jejimenez/django
django/template/engine.py
Python
bsd-3-clause
10,778
#!/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 device and simulator bundles are built correctly. """ import TestGyp import subprocess import sys def CheckFileType(fil...
bnoordhuis/suv
deps/gyp/test/ios/gyptest-per-config-settings.py
Python
isc
1,320
import dbus_async @asyncio.coroutine def dbus_hello_client(bus): # create message helloWorld = Method("HelloWorld", path="/remote/object/path", iface="com.example.Sample", bus=bus) # wait reply result = yield from helloWorld("Anon...
hugosenari/dbus_async
example/low_api_client.py
Python
isc
1,198
from .test_case import CTestCase
zacharytamas/django-chelsea
chelsea/testing/__init__.py
Python
isc
32
from distutils.core import setup setup( name='amenu', version='1.0.3', author='ludbek', author_email='sth.srn@gmail.com', packages= ['amenu', 'amenu.migrations', 'amenu.templatetags'], scripts=[], url='https://github.com/ludbek/amenu', license='LICENSE.txt', description='A menu plug...
ludbek/amenu
setup.py
Python
mit
546
#!/usr/bin/python # -*- coding: UTF-8 -*- """ Criado em 19 de Novembro de 2016 @author: Denis Varise Bernardes & Eder Martioli Descricao: esta biblioteca possui as seguintes funcoes: mkDir_saveCombinedImages: pela chamada da funcao LeArquivoReturnLista retorna a lista de todas as imagens ad...
DBernardes/ProjetoECC
Eficiência_Quântica/Codigo/QE_reduceImgs_readArq.py
Python
mit
7,313
# Create your views here. from rest_framework import viewsets from offers.models import Offer, OfferHistory, OfferReview from offers.serializers import ( OfferSerializer, OfferHistorySerializer, OfferReviewSerializer ) from shops.serializers import ShopSerializer from rest_framework import status from rest_...
cliffton/localsecrets
offers/views.py
Python
mit
3,993
#!/usr/bin/env python import argparse, subprocess, json, os, sys, base64, binascii, time, hashlib, re, copy, textwrap, logging try: from urllib.request import urlopen # Python 3 except ImportError: from urllib2 import urlopen # Python 2 #DEFAULT_CA = "https://acme-staging.api.letsencrypt.org" DEFAULT_CA = "htt...
FuzzyHobbit/acme-tiny
acme_tiny.py
Python
mit
9,077
__author__ = 'Archana V Menon, Sujith V'
sujithvm/skynet
code/__init__.py
Python
mit
41