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
# A Test Program for pipeTestService.py # # Install and start the Pipe Test service, then run this test # either from the same machine, or from another using the "-s" param. # # Eg: pipeTestServiceClient.py -s server_name Hi There # Should work. from win32pipe import * from win32file import * from win32event import * ...
sserrot/champion_relationships
venv/Lib/site-packages/win32/Demos/service/pipeTestServiceClient.py
Python
mit
4,134
import datetime import logging from django.contrib import messages from django.contrib.auth.decorators import login_required, permission_required from django.contrib.auth.models import Group from django.shortcuts import render, redirect from allianceauth.services.forms import ServicePasswordForm from .forms import Ja...
Kaezon/allianceauth
allianceauth/services/modules/openfire/views.py
Python
gpl-2.0
7,676
from chimera.util.votable import VOTable from httplib import HTTPConnection import tempfile import os import urllib class VizQuery(object): """ Queries A catalog in Vizier within a given radius or box of the zenith """ def __init__(self): self.args = {} self.args["-mime"] = "xml...
ankanaan/chimera
src/chimera/util/vizquery.py
Python
gpl-2.0
3,452
# -*- coding: utf-8 -*- from core.toad.generictask import GenericTask from lib.images import Images __author__ = "Mathieu Desrosiers, Arnaud Bore" __copyright__ = "Copyright (C) 2016, TOAD" __credits__ = ["Mathieu Desrosiers", "Arnaud Bore"] class TensorMrtrix(GenericTask): def __init__(self, subject): ...
mathieudesro/toad
tasks/11-tensormrtrix.py
Python
gpl-2.0
4,911
"""create and manipulate C data types in Python""" import os as _os, sys as _sys __version__ = "1.1.0" from _ctypes import Union, Structure, Array from _ctypes import _Pointer from _ctypes import CFuncPtr as _CFuncPtr from _ctypes import __version__ as _ctypes_version from _ctypes import RTLD_LOCAL, RTLD_GLOBAL from...
Microvellum/Fluid-Designer
win64-vc/2.78/python/lib/ctypes/__init__.py
Python
gpl-3.0
16,848
# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- # # This file is part of the LibreOffice project. # # 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/. # ...
beppec56/core
solenv/gdb/libreoffice/cppu.py
Python
gpl-3.0
5,260
#!/usr/bin/env python ## # wrapping: A program making it easy to use hyperparameter # optimization software. # Copyright (C) 2013 Katharina Eggensperger and Matthias Feurer # # 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 # ...
claesenm/HPOlib
HPOlib/format_converter/convert.py
Python
gpl-3.0
4,811
# 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 https://mozilla.org/MPL/2.0/. from unittest.mock import Mock, patch from django.test import TestCase from django.test.client import RequestFactory f...
mozilla/bedrock
bedrock/base/tests/test_urlresolvers.py
Python
mpl-2.0
6,341
# -*- coding: utf-8 -*- """ sphinx.websupport.search.whooshsearch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Whoosh search adapter. :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from whoosh import index from whoosh.fields import Schema, ID...
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/sphinx/websupport/search/whooshsearch.py
Python
agpl-3.0
2,010
""" Support tool for disabling user accounts. """ from django.contrib.auth import get_user_model from django.db.models import Q from django.urls import reverse from django.utils.decorators import method_decorator from django.utils.translation import ugettext as _ from django.views.generic import View from rest_framew...
cpennington/edx-platform
lms/djangoapps/support/views/manage_user.py
Python
agpl-3.0
2,968
# Copyright 2014 Tesora, 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 ...
CMSS-BCRDB/RDSV1.0
trove/guestagent/strategies/replication/__init__.py
Python
apache-2.0
955
# # 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...
Acehaidrey/incubator-airflow
tests/providers/amazon/aws/operators/test_s3_file_transform.py
Python
apache-2.0
5,277
# 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...
frreiss/tensorflow-fred
tensorflow/python/kernel_tests/variables_test.py
Python
apache-2.0
35,743
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
jumpstarter-io/keystone
keystone/common/ldap/core.py
Python
apache-2.0
76,368
import logging import re from airflow.hooks import PigCliHook from airflow.models import BaseOperator from airflow.utils.decorators import apply_defaults class PigOperator(BaseOperator): """ Executes pig script. :param pig: the pig latin script to be executed :type pig: string :param pig_cli_con...
dud225/incubator-airflow
airflow/operators/pig_operator.py
Python
apache-2.0
1,716
# Joint copyright: # - Copyright 2012,2013 Wikimedia Foundation # - Copyright 2012,2013 Antoine "hashar" Musso # - Copyright 2013 Arnaud Fabre # # 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 ...
joostvdg/jenkins-job-builder
tests/general/test_general.py
Python
apache-2.0
1,118
""" @package mi.dataset.parser @file marine-integrations/mi/dataset/parser/ctdav_n_auv.py @author Jeff Roy @brief Parser and particle Classes and tools for the ctdav_n_auv data Release notes: initial release """ __author__ = 'Jeff Roy' __license__ = 'Apache 2.0' from mi.core.log import get_logger log = get_logger() ...
janeen666/mi-instrument
mi/dataset/parser/ctdav_n_auv.py
Python
bsd-2-clause
2,741
# Copyright 2009-2015 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions ...
vasiliykochergin/euca2ools
euca2ools/commands/iam/deactivatemfadevice.py
Python
bsd-2-clause
1,876
"""scanf.py: scanf-style input for Python. Danny Yoo (dyoo@hkn.eecs.berkeley.edu) The initial motivation for this module was based on a posting on Python-tutor: http://mail.python.org/pipermail/tutor/2004-July/030480.html I haven't been able to find a nice module to do scanf-style input. Even the Library Refere...
assumptionsoup/pymel
pymel/util/scanf.py
Python
bsd-3-clause
19,439
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..mesh import MeshWarpMaths def test_MeshWarpMaths_inputs(): input_map = dict(float_trait=dict(), ignore_exception=dict(nohash=True, usedefault=True, ), in_surf=dict(mandatory=True, ), operat...
mick-d/nipype
nipype/algorithms/tests/test_auto_MeshWarpMaths.py
Python
bsd-3-clause
1,014
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ An extensible ASCII table reader and writer. """ from .core import (InconsistentTableError, ParameterError, NoType, StrType, NumType, FloatType, IntType, AllType, Column, Ba...
stargaser/astropy
astropy/io/ascii/__init__.py
Python
bsd-3-clause
1,565
import os import json import glob def main(): prefix = os.environ['PREFIX'] info_files = glob.glob(os.path.join(prefix, 'conda-meta', 'conda-build-test-numpy-run-1.0-py*0.json')) assert len(info_files) == 1 info_file = info_files[0] with open(info_file, 'r') as fh: ...
sandhujasmine/conda-build
tests/test-recipes/metadata/numpy_run/run_test.py
Python
bsd-3-clause
559
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def forwards(apps, schema_editor): """Create Peers group.""" Group = apps.get_model('auth', 'Group') Group.objects.create(name='Peers') def backwards(apps, schema_editor): """Delete Peers group....
tsmrachel/remo
remo/profiles/migrations/0003_auto_20160921_1608.py
Python
bsd-3-clause
610
""" @author: Deniz Altinbuken, Emin Gun Sirer @note: Queue proxy @copyright: See LICENSE """ from concoord.clientproxy import ClientProxy class Queue: def __init__(self, bootstrap, timeout=60, debug=False, token=None): self.proxy = ClientProxy(bootstrap, timeout, debug, token) def __concoordinit__(self...
tempbottle/concoord
concoord/proxy/queue.py
Python
bsd-3-clause
770
### # Copyright (c) 2002-2005, Jeremiah Fincher # Copyright (c) 2009, James Vega # 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 copyri...
kblin/supybot-gsoc
src/commands.py
Python
bsd-3-clause
30,909
# coding: utf-8 from __future__ import unicode_literals import asyncore import email import os import shutil import smtpd import sys import tempfile import threading from django.core import mail from django.core.mail import (EmailMessage, mail_admins, mail_managers, EmailMultiAlternatives, send_mail, send_mas...
makinacorpus/django
tests/mail/tests.py
Python
bsd-3-clause
35,289
""" showspec is my homegrown spectrum plotter, meant to somewhat follow STARLINK's SPLAT and have functionality similar to GAIA, but with an emphasis on producing publication-quality plots (which, while splat may do, it does unreproducibly) .. todo:: -add spectrum arithmetic tools (as is, you can use nump...
keflavich/agpy
agpy/showspec.py
Python
mit
51,670
# This file is part of the REMOTE API # # Copyright 2006-2016 Coppelia Robotics GmbH. All rights reserved. # marc@coppeliarobotics.com # www.coppeliarobotics.com # # The REMOTE API is licensed under the terms of GNU GPL: # # ------------------------------------------------------------------- # The REMOTE A...
jpedrorl/Robotics-AI
vrep/vrepConst.py
Python
mit
45,009
import pytest def test_unknown_virtual_host(docker_compose, nginxproxy): r = nginxproxy.get("http://nginx-proxy/") assert r.status_code == 503 def test_forwards_to_web1(docker_compose, nginxproxy): r = nginxproxy.get("http://web1.nginx-proxy.local/port") assert r.status_code == 200 assert r.tex...
jwilder/nginx-proxy
test/test_multiple-networks.py
Python
mit
545
# -*- coding: utf-8 -*- """ @author: Fabio Erculiani <lxnay@sabayon.org> @contact: lxnay@sabayon.org @copyright: Fabio Erculiani @license: GPL-2 I{EntropyRepository} is the MySQL implementation of the repository interface. """ import os import hashlib import time try: import thread except...
mudler/entropy
lib/entropy/db/mysql.py
Python
gpl-2.0
36,707
# -*- coding: utf-8 -*- # # Copyright (C) 2007 Johann Prieur <johann.prieur@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) an...
emesene/papyon
papyon/service/description/OIM/Store2.py
Python
gpl-2.0
3,213
# # Copyright 2013 IBM Corp. # Copyright 2012 New Dream Network, LLC (DreamHost) # # Author: Doug Hellmann <doug.hellmann@dreamhost.com> # # 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 # # ...
ChinaMassClouds/copenstack-server
openstack/src/ceilometer-2014.2.2/ceilometer/api/middleware.py
Python
gpl-2.0
5,417
# # Copyright 2013, 2018 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later versio...
bastibl/gnuradio
gr-utils/python/modtool/tools/parser_cc_block.py
Python
gpl-3.0
10,443
"""Weighted maximum matching in general graphs. The algorithm is taken from "Efficient Algorithms for Finding Maximum Matching in Graphs" by Zvi Galil, ACM Computing Surveys, 1986. It is based on the "blossom" method for finding augmenting paths and the "primal-dual" method for finding a matching of maximum weight, bo...
tomspur/shedskin
examples/mwmatching.py
Python
gpl-3.0
32,668
# -*- coding: utf-8 -*- # Copyright (c) 2017 Jason Lowe-Power # 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 o...
vineodd/PIMSim
GEM5Simulation/gem5/src/learning_gem5/part2/SimpleObject.py
Python
gpl-3.0
1,750
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai __license__ = 'GPL v3' __copyright__ = '2011, Timothy Legge <timlegge@gmail.com> and Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import os from contextlib import closing class Bookmark(): # {{{ ''' A simple class fetching boo...
insomnia-lab/calibre
src/calibre/devices/kobo/bookmark.py
Python
gpl-3.0
4,557
from net.grinder.script.Grinder import grinder from net.grinder.script import Test from net.grinder.plugin.http import HTTPRequest from HTTPClient import NVPair from java.util import Random newCellTest = Test(1, "Make a new Cell") evaluationTest = Test(2, "Evaluate") updateTest = Test(3, "Poll until evaluated") delete...
topisani/sagenb
sagenb/testing/grinder/simpleeval_multi.py
Python
gpl-3.0
1,778
from base64 import standard_b64encode from datetime import timedelta import re import shutil import socket import traceback import xmlrpclib from couchpotato.core._base.downloader.main import DownloaderBase, ReleaseDownloadList from couchpotato.core.helpers.encoding import ss, sp from couchpotato.core.helpers.variable...
xombiemp/CouchPotatoServer
couchpotato/core/downloaders/nzbget.py
Python
gpl-3.0
12,455
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Unit tests for the `corpora.Dictionary` class. """ from collections import Mapping import logging import tempfile import unittest import os import os.path import scipy import gensim from ge...
ccri/gensim
gensim/test/test_corpora_dictionary.py
Python
gpl-3.0
7,902
#!/usr/bin/env python import mozhttpd import mozfile import os import tempfile import unittest class TestBasic(unittest.TestCase): """ Test basic Mozhttpd capabilites """ def test_basic(self): """ Test mozhttpd can serve files """ tempdir = tempfile.mkdtemp() # sizes is a dict of t...
vladikoff/fxa-mochitest
tests/mozbase/mozhttpd/tests/basic.py
Python
mpl-2.0
1,260
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import socket def get_free_port(): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.bind(("", 0)) port = sock.getsockname()[1] sock.close() return port
safchain/contrail-sandesh
library/python/pysandesh/test/test_utils.py
Python
apache-2.0
258
# -*- coding: utf-8 - # # 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 ...
JoseKilo/bucky
bucky/metrics/gauge.py
Python
apache-2.0
922
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflow/tensorflow
tensorflow/python/feature_column/sequence_feature_column_integration_test.py
Python
apache-2.0
5,669
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
sparkslabs/kamaelia_
Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/Apps/JMB/Common/ServerSetup.py
Python
apache-2.0
2,672
"""Plugwise Climate component for Home Assistant.""" import logging from Plugwise_Smile.Smile import Smile from homeassistant.components.climate import ClimateEntity from homeassistant.components.climate.const import ( CURRENT_HVAC_COOL, CURRENT_HVAC_HEAT, CURRENT_HVAC_IDLE, HVAC_MODE_AUTO, HVAC_...
robbiet480/home-assistant
homeassistant/components/plugwise/climate.py
Python
apache-2.0
9,147
"""Check for nonlocal and used-before-assignment""" # pylint: disable=missing-docstring, unused-variable, no-init, too-few-public-methods __revision__ = 0 def test_ok(): """ uses nonlocal """ cnt = 1 def wrap(): nonlocal cnt cnt = cnt + 1 wrap() def test_fail(): """ ...
arju88nair/projectCulminate
venv/lib/python3.5/site-packages/pylint/test/functional/used_before_assignment_nonlocal.py
Python
apache-2.0
1,234
"""Support for Geofency.""" import logging from aiohttp import web import voluptuous as vol from homeassistant.components.device_tracker import DOMAIN as DEVICE_TRACKER from homeassistant.const import ( ATTR_LATITUDE, ATTR_LONGITUDE, ATTR_NAME, CONF_WEBHOOK_ID, HTTP_OK, HTTP_UNPROCESSABLE_ENTI...
nkgilley/home-assistant
homeassistant/components/geofency/__init__.py
Python
apache-2.0
4,573
# 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...
coreycb/horizon
openstack_dashboard/test/integration_tests/tests/test_security_groups.py
Python
apache-2.0
4,753
# # 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...
chuckchen/spark
python/pyspark/pandas/tests/data_type_ops/test_complex_ops.py
Python
apache-2.0
13,290
# 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/tests/unit/test_db_rule_enforcement.py
Python
apache-2.0
2,863
# 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...
karllessard/tensorflow
tensorflow/python/kernel_tests/matrix_inverse_op_test.py
Python
apache-2.0
7,837
""" """ import traceback from AnyQt.QtWidgets import QWidget, QPlainTextEdit, QVBoxLayout, QSizePolicy from AnyQt.QtGui import QTextCursor, QTextCharFormat, QFont from AnyQt.QtCore import Qt, QObject, QCoreApplication, QThread, QSize from AnyQt.QtCore import pyqtSignal as Signal class TerminalView(QPlainTextEdit): ...
cheral/orange3
Orange/canvas/application/outputview.py
Python
bsd-2-clause
6,738
import unittest from django.dispatch.saferef import safeRef from django.utils.six.moves import xrange class Test1(object): def x(self): pass def test2(obj): pass class Test2(object): def __call__(self, obj): pass class SaferefTests(unittest.TestCase): def setUp(self): ts...
Beeblio/django
tests/dispatch/tests/test_saferef.py
Python
bsd-3-clause
1,886
#!/usr/bin/env python import time import unittest import dpkt class TestPerf(unittest.TestCase): rounds = 10000 def setUp(self): self.start = time.time() def tearDown(self): print self.rounds / (time.time() - self.start), 'rounds/s' def test_pack(self): for i in xrange(self...
lkash/test
tests/test-perf2.py
Python
bsd-3-clause
590
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.test import TestCase, RequestFactory from django.core.urlresolvers import reverse from django.template import Template, Context from django.core.cache import cache from djconfig import config from ...core.tests import utils from .models imp...
gogobook/Spirit
spirit/comment/bookmark/tests.py
Python
mit
3,505
#!/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. __doc__ = """ gyptest.py -- test runner for GYP tests. """ import os import optparse import shlex import subprocess import sys class Comma...
hoho/dosido
nodejs/tools/gyp/gyptest.py
Python
mit
8,032
# engine/__init__.py # Copyright (C) 2005-2016 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """SQL connections, SQL execution and high-level DB-API interface. The engine pa...
MarkWh1te/xueqiu_predict
python3_env/lib/python3.4/site-packages/sqlalchemy/engine/__init__.py
Python
mit
18,857
import re from fir_artifacts.artifacts import AbstractArtifact class URL(AbstractArtifact): key = 'url' display_name = 'URLs' regex = r""" (?P<search> ((?P<scheme>[\w]{2,9}):\/\/)? ([\S]*\:[\S]*\@)? (?P<hostname>( ((([\w\-]+\.)+) ...
gcrahay/FIR
fir_artifacts/url.py
Python
gpl-3.0
884
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Agile Business Group # (<http://www.agilebg.com>) # # 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 Free Software Foundation, either version 3 of the L...
abstract-open-solutions/l10n-italy
l10n_it_vat_registries/account_tax_registry.py
Python
agpl-3.0
1,452
# -*- coding: utf-8 -*- """ Unit tests for LMS instructor-initiated background tasks helper functions. Tests that CSV grade report generation works with unicode emails. """ import ddt from mock import Mock, patch import tempfile from openedx.core.djangoapps.course_groups import cohorts import unicodecsv from django....
jamiefolsom/edx-platform
lms/djangoapps/instructor_task/tests/test_tasks_helper.py
Python
agpl-3.0
61,734
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
addition-it-solutions/project-all
addons/account_bank_statement_extensions/account_bank_statement.py
Python
agpl-3.0
6,685
#!/usr/bin/env python # # Copyright (C) Citrix Systems Inc. # # This program 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; version 2.1 only. # # This program is distributed in the hope that it will ...
robertbreker/sm
drivers/devscan.py
Python
lgpl-2.1
14,406
'''OpenGL extension ARB.robustness_isolation This module customises the behaviour of the OpenGL.raw.GL.ARB.robustness_isolation to provide a more Python-friendly API Overview (from the spec) GL_ARB_robustness and supporting window system extensions allow creating an OpenGL context supporting graphics reset noti...
stack-of-tasks/rbdlpy
tutorial/lib/python2.7/site-packages/OpenGL/GL/ARB/robustness_isolation.py
Python
lgpl-3.0
1,604
""" Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache....
edespino/gpdb
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/oom/__init__.py
Python
apache-2.0
4,065
# Copyright 2013 Kylin OS, 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 agre...
zouyapeng/horizon-newtouch
openstack_dashboard/dashboards/admin/instances/forms.py
Python
apache-2.0
3,554
# Copyright 2011 Grid Dynamics # 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...
hanlind/nova
nova/api/openstack/compute/networks.py
Python
apache-2.0
8,024
# 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...
gunan/tensorflow
tensorflow/python/util/nest_test.py
Python
apache-2.0
54,367
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-08-09 17:56 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('osf', '0048_merge_20170804_0910'), ] operations = [ migrations.AddField( ...
mfraezz/osf.io
osf/migrations/0049_preprintprovider_preprint_word.py
Python
apache-2.0
579
# # 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/contrib/operators/imap_attachment_to_s3_operator.py
Python
apache-2.0
1,197
from django.contrib.auth.models import Permission from django.test import TestCase from django.urls import reverse from wagtail.core.models import Page from wagtail.tests.utils import WagtailTestUtils class TestWorkflowHistoryDetail(TestCase, WagtailTestUtils): fixtures = ['test.json'] def setUp(self): ...
kaedroho/wagtail
wagtail/admin/tests/pages/test_workflow_history.py
Python
bsd-3-clause
2,629
"""Univariate features selection.""" # Authors: V. Michel, B. Thirion, G. Varoquaux, A. Gramfort, E. Duchesnay. # L. Buitinck, A. Joly # License: BSD 3 clause import numpy as np import warnings from scipy import special, stats from scipy.sparse import issparse from ..base import BaseEstimator from ..prepr...
toastedcornflakes/scikit-learn
sklearn/feature_selection/univariate_selection.py
Python
bsd-3-clause
25,381
# Copyright 2018 the V8 project 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 json import os import random THIS_DIR = os.path.dirname(os.path.abspath(__file__)) # List of configuration experiments for correctness fuzzing. # ...
endlessm/chromium-browser
v8/tools/clusterfuzz/v8_fuzz_config.py
Python
bsd-3-clause
2,226
__author__ = 'elijahethun'
yarhajile/sven-daemon
Sven/Module/__init__.py
Python
gpl-2.0
27
""" A universal module with functions / classes without dependencies. """ import sys import contextlib import functools import re import os from jedi._compatibility import reraise _sep = os.path.sep if os.path.altsep is not None: _sep += os.path.altsep _path_re = re.compile('(?:\.[^{0}]+|[{0}]__init__\.py)$'.for...
technologiescollege/Blockly-rduino-communication
scripts_XP/Lib/site-packages/jedi/evaluate/utils.py
Python
gpl-3.0
4,702
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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. CVXPY is distributed i...
sdpython/cvxpy
cvxpy/tests/test_lin_ops.py
Python
gpl-3.0
5,078
#!/usr/bin/env python """ AMQP Clock Fires off simple messages at one-minute intervals to a topic exchange named 'clock', with the topic of the message being the local time as 'year.month.date.dow.hour.minute', for example: '2007.11.26.1.12.33', where the dow (day of week) is 0 for Sunday, 1 for Monday, and so on (sim...
mzdaniel/oh-mainline
vendor/packages/amqplib/demo/amqp_clock.py
Python
agpl-3.0
2,344
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 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 # # Unle...
dsiddharth/access-keys
keystone/common/sql/migrate_repo/versions/001_add_initial_tables.py
Python
apache-2.0
5,811
import mock import pytest from rest_framework import exceptions from addons.wiki.models import WikiPage from addons.wiki.tests.factories import WikiFactory, WikiVersionFactory from api.base.settings.defaults import API_BASE from api_tests.wikis.views.test_wiki_detail import WikiCRUDTestCase from framework.auth.core i...
mfraezz/osf.io
api_tests/nodes/views/test_node_wiki_list.py
Python
apache-2.0
19,731
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2011 Nexenta 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.apa...
tylertian/Openstack
openstack F/nova/nova/volume/nexenta/volume.py
Python
apache-2.0
11,026
import json import pytest import jsonschema from framework.auth.core import Auth from framework.exceptions import PermissionsError from website.settings import DOI_FORMAT, DATACITE_PREFIX from website.project.licenses import set_license from osf.models import FileMetadataSchema, NodeLicense, NodeLog from osf_tests.fac...
Johnetordoff/osf.io
osf_tests/test_file_metadata.py
Python
apache-2.0
9,031
import datetime import logging from django.core.management.base import BaseCommand from django.db import connection, transaction from framework.celery_tasks import app as celery_app logger = logging.getLogger(__name__) TABLES_TO_POPULATE_WITH_MODIFIED = [ 'addons_zotero_usersettings', 'addons_dropbox_userset...
mfraezz/osf.io
osf/management/commands/addon_deleted_date.py
Python
apache-2.0
3,358
"""Tests for the Bond fan device.""" from datetime import timedelta from typing import Optional from bond_api import Action, DeviceType, Direction from homeassistant import core from homeassistant.components import fan from homeassistant.components.fan import ( ATTR_DIRECTION, ATTR_SPEED, ATTR_SPEED_LIST,...
tchellomello/home-assistant
tests/components/bond/test_fan.py
Python
apache-2.0
9,312
# 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...
unnikrishnankgs/va
venv/lib/python3.5/site-packages/tensorflow/models/object_detection/trainer_test.py
Python
bsd-2-clause
6,635
# 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 os from metrics import power from telemetry import test from telemetry.core import util from telemetry.page import page_measurement from telemetry.pa...
TeamEOS/external_chromium_org
tools/perf/benchmarks/dromaeo.py
Python
bsd-3-clause
4,623
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import errno import hashlib import os import re import shutil import stat import subprocess import sys import tarfile...
facebook/watchman
build/fbcode_builder/getdeps/fetcher.py
Python
mit
29,428
# -*- coding: utf-8 -*- """ *************************************************************************** GridNearestNeighbor.py --------------------- Date : October 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com *****...
SrNetoChan/QGIS
python/plugins/processing/algs/gdal/GridNearestNeighbor.py
Python
gpl-2.0
8,683
# # Copyright (c) 2001 - 2014 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge...
stonekyx/binary
vendor/scons-local-2.3.4/SCons/Scanner/Dir.py
Python
gpl-3.0
3,751
#!/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 *** # ...
Jorge-Rodriguez/ansible
lib/ansible/modules/cloud/google/gcp_compute_instance_group_facts.py
Python
gpl-3.0
6,993
"""simplify transaction log Revision ID: 8c2406df6f8 Revises:58732bb5d14b Create Date: 2014-08-08 01:57:17.144405 """ # revision identifiers, used by Alembic. revision = '8c2406df6f8' down_revision = '58732bb5d14b' from alembic import op from sqlalchemy.sql import text def upgrade(): conn = op.get_bind() ...
nylas/sync-engine
migrations/versions/120_simplify_transaction_log.py
Python
agpl-3.0
688
"""Plot implied timescales vs lagtime {{header}} """ # ? include "plot_header.template" # ? from "plot_macros.template" import xdg_open with context import numpy as np import pandas as pd import seaborn as sns from matplotlib import pyplot as plt sns.set_style('ticks') colors = sns.color_palette() ## Load timescal...
msultan/msmbuilder
msmbuilder/project_templates/msm/timescales-plot.py
Python
lgpl-2.1
1,908
# pylint: skip-file class YeditException(Exception): ''' Exception class for Yedit ''' pass class Yedit(object): ''' Class to modify yaml files ''' re_valid_key = r"(((\[-?\d+\])|([a-zA-Z-./]+)).?)+$" re_key = r"(?:\[(-?\d+)\])|([a-zA-Z-./]+)" def __init__(self, filename=None, content=None, c...
ivanhorvath/openshift-tools
openshift/installer/vendored/openshift-ansible-git-2016-04-18/roles/lib_yaml_editor/build/src/yedit.py
Python
apache-2.0
6,339
# Copyright 2015 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...
DeepThoughtTeam/tensorflow
tensorflow/python/kernel_tests/edit_distance_op_test.py
Python
apache-2.0
6,429
""" ========================= Filtering regional maxima ========================= Here, we use morphological reconstruction to create a background image, which we can subtract from the original image to isolate bright features (regional maxima). First we try reconstruction by dilation starting at the edges of the ima...
WarrenWeckesser/scikits-image
doc/examples/plot_regional_maxima.py
Python
bsd-3-clause
3,435
## -*- mode: python; coding: utf-8; -*- ## ## This file is part of Invenio. ## Copyright (C) 2007, 2008, 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...
kaplun/Invenio-OpenAIRE
modules/bibrank/lib/bibrankgkb.py
Python
gpl-2.0
9,931
import pickle import unittest from test import test_support as support turtle = support.import_module('turtle') Vec2D = turtle.Vec2D test_config = """\ width = 0.75 height = 0.8 canvwidth = 500 canvheight = 200 leftright = 100 topbottom = 100 mode = world colormode = 255 delay = 100 undobuffersize = 10000 shape = cir...
HiSPARC/station-software
user/python/Lib/test/test_turtle.py
Python
gpl-3.0
12,577
#!/usr/bin/python # -*- coding: utf-8 -*- # mingus - Music theory Python package, track module. # Copyright (C) 2008-2009, Bart Spaans # # 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 Found...
marianinn/mingus
mingus/containers/track.py
Python
gpl-3.0
7,328
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
sanguinariojoe/FreeCAD
src/Mod/Path/PathTests/TestPathTool.py
Python
lgpl-2.1
4,116
# 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 ...
Kami/libcloud
libcloud/test/compute/test_kili.py
Python
apache-2.0
1,525
import time from proboscis.asserts import assert_equal from proboscis.asserts import assert_not_equal from proboscis.asserts import assert_false from proboscis import SkipTest from proboscis import test from proboscis import before_class from proboscis import after_class from json import loads from modules.logger imp...
johren/RackHD
test/benchmark/tests/api_v1_1_tests.py
Python
apache-2.0
7,210
import urllib from urlparse import urlparse from django.conf import settings from django.core.handlers.wsgi import WSGIHandler from django.contrib.staticfiles import utils from django.contrib.staticfiles.views import serve class StaticFilesHandler(WSGIHandler): """ WSGI middleware that intercepts ...
writefaruq/lionface-app
django/contrib/staticfiles/handlers.py
Python
bsd-3-clause
2,733