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
my_collection: <error descr="Unresolved reference 'Sized'">Si<caret>zed</error> = list()
smmribeiro/intellij-community
python/testData/quickFixes/PyAddImportQuickFixTest/importAbstractContainersFromCollectionsABC/main.py
Python
apache-2.0
89
# 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...
kobejean/tensorflow
tensorflow/python/autograph/converters/asserts_test.py
Python
apache-2.0
1,319
# Copyright 2010 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...
zhimin711/nova
nova/tests/unit/api/openstack/compute/test_api.py
Python
apache-2.0
6,554
"""Make Laboratory name longer Revision ID: 3ee46f95bcce Revises: 4bc4c1ae0f38 Create Date: 2014-04-29 21:29:43.714010 """ # revision identifiers, used by Alembic. revision = '3ee46f95bcce' down_revision = '4bc4c1ae0f38' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_column("laboratori...
labsland/labmanager
alembic/versions/3ee46f95bcce_make_laboratory_name_longer.py
Python
bsd-2-clause
600
from django.contrib import admin from models import FileSet admin.site.register(FileSet)
oswalpalash/OctaveCodeShare
scipy_central/filestorage/admin.py
Python
bsd-3-clause
89
from django.db.models import Q from import_export.admin import ImportExportModelAdmin from models import Vote, Law, PrivateProposal, KnessetProposal, GovProposal, Bill, GovLegislationCommitteeDecision from laws.management.commands.scrape_votes import Command as ScrapeVotesCommand from django.utils.translation import u...
alonisser/Open-Knesset
laws/admin.py
Python
bsd-3-clause
5,183
# -*- coding: utf-8 -*- from django.utils.encoding import smart_str class Menu(object): namespace = None def __init__(self, renderer): self.renderer = renderer if not self.namespace: self.namespace = self.__class__.__name__ def get_nodes(self, request): """ s...
nimbis/django-cms
menus/base.py
Python
bsd-3-clause
1,763
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from db.Corpus_DB import Corpus_DB from db.BOW_DB import BOW_DB from db.LDA_DB import LDA_DB from db.ITM_DB import ITM_DB from vis.ScatterPlot1 import ScatterPlot1 as ScatterPlot1Handler def index(): with Corpus_DB() as corpus_db: with BOW_DB() as bow_db: ...
maoxuxiang/termite_mallet_project
server_src/controllers/ScatterPlot1.py
Python
bsd-3-clause
897
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Interface documentation. Maintainer: Itamar Shtull-Trauring """ from __future__ import division, absolute_import from zope.interface import Interface, Attribute from twisted.python import deprecate from twisted.python.versions import Versi...
engdan77/edoAutoHomeMobile
twisted/internet/interfaces.py
Python
mit
90,290
# Copyright 2011 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. r"""Instrumentation-based profiling for Python. trace_event allows you to hand-instrument your code with areas of interest. When enabled, trace_event logs th...
Teamxrtc/webrtc-streaming-node
third_party/webrtc/src/chromium/src/third_party/py_trace_event/src/trace_event.py
Python
mit
6,729
import pytest def test_unknown_virtual_host_is_503(docker_compose, nginxproxy): r = nginxproxy.get("http://unknown.nginx-proxy.tld/port") assert r.status_code == 503 def test_webA_is_forwarded(docker_compose, nginxproxy): r = nginxproxy.get("http://webA.nginx-proxy.tld/port") assert r.status_code == ...
jwilder/nginx-proxy
test/test_multiple-hosts.py
Python
mit
562
from decimal import Decimal from django.contrib.gis.db.models.fields import GeometryField from django.contrib.gis.db.models.sql import AreaField from django.contrib.gis.measure import ( Area as AreaMeasure, Distance as DistanceMeasure, ) from django.core.exceptions import FieldError from django.db.models import Fl...
whitehorse-io/encarnia
pyenv/lib/python2.7/site-packages/django/contrib/gis/db/models/functions.py
Python
mit
15,760
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
sadanandb/pmt
src/pyasm/prod/checkin/maya_checkin_test.py
Python
epl-1.0
1,263
''' Script to generate Kivy API from source code. Code is messy, but working. Be careful if you change anything in ! ''' ignore_list = ( 'kivy._event', 'kivy.factory_registers', 'kivy.graphics.buffer', 'kivy.graphics.vbo', 'kivy.graphics.vertex', 'kivy.lib.osc' ) import os import sys from gl...
JulienMcJay/eclock
windows/kivy/doc/autobuild.py
Python
gpl-2.0
6,361
# -*- coding: utf-8 -*- # # papyon - a python client library for Msn # # Copyright (C) 2005-2006 Ali Sabil <ali.sabil@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 ...
billiob/papyon
papyon/service/description/AB/common.py
Python
gpl-2.0
1,752
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Server Module Patrick Jose Pereira April 2018 ''' import time import json import socket from threading import Thread from flask import Flask from werkzeug.serving import make_server from MAVProxy.modules.lib import mp_module def mavlink_to_json(msg): '''Translate...
ArduPilot/MAVProxy
MAVProxy/modules/mavproxy_restserver.py
Python
gpl-3.0
5,314
#!/usr/bin/env python # -*- coding: utf-8 -*- # fake_provider.py # Copyright (C) 2013 LEAP # # 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...
kalikaneko/bitmask_client
src/leap/bitmask/crypto/tests/fake_provider.py
Python
gpl-3.0
10,177
""" <name>SOM Visualizer</name> <description>Visualizes a trained self organising maps.</description> <icon>icons/SOMVisualizer.svg</icon> <contact>Ales Erjavec (ales.erjavec(@at@)fri.uni-lj.si)</contact> <priority>5020</priority> """ import orange, orngSOM import math, numpy import OWGUI, OWColorPalette from OWWidget...
jlegendary/orange
Orange/OrangeWidgets/Unsupervised/OWSOMVisualizer.py
Python
gpl-3.0
52,366
# Copyright (C) 2012,2013 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of t...
hidekb/espressopp
src/storage/DomainDecompositionAdress.py
Python
gpl-3.0
3,788
# Amara, universalsubtitles.org # # Copyright (C) 2013 Participatory Culture Foundation # # 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 # License, or (at your op...
ofer43211/unisubs
apps/widget/management/commands/compile_statwidgetconfig.py
Python
agpl-3.0
1,411
from django.db.models import CharField, Value from django.db.models.functions import Length, LPad, RPad from django.test import TestCase from .models import Author class PadTests(TestCase): def test_pad(self): Author.objects.create(name='John', alias='j') tests = ( (LPad('name', 7, Va...
nesdis/djongo
tests/django_tests/tests/v21/tests/db_functions/test_pad.py
Python
agpl-3.0
1,830
# -*- coding: utf-8 -*- # © 2015 iDT LABS (http://www.@idtlabs.sl) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_holidays_compute_days
VitalPet/hr
hr_holidays_compute_days/tests/__init__.py
Python
agpl-3.0
180
# 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 ag...
KaranToor/MA450
google-cloud-sdk/lib/surface/config/configurations/list.py
Python
apache-2.0
2,092
# 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...
AsimmHirani/ISpyPi
tensorflow/contrib/tensorflow-master/tensorflow/contrib/tensor_forest/client/random_forest.py
Python
apache-2.0
14,957
"""The Intent integration.""" import voluptuous as vol from homeassistant.components import http from homeassistant.components.http.data_validator import RequestDataValidator from homeassistant.const import SERVICE_TOGGLE, SERVICE_TURN_OFF, SERVICE_TURN_ON from homeassistant.core import DOMAIN as HA_DOMAIN, HomeAssist...
w1ll1am23/home-assistant
homeassistant/components/intent/__init__.py
Python
apache-2.0
2,573
# Copyright 2015 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
shakamunyi/sahara
sahara/db/migration/alembic_migrations/versions/026_add_is_public_is_protected.py
Python
apache-2.0
2,335
"""Support for Etekcity VeSync switches.""" import logging from homeassistant.components.switch import SwitchEntity from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from .common import VeSyncDevice from .const import DOMAIN, VS_DISCOVERY, VS_DISPATCHERS, VS...
nkgilley/home-assistant
homeassistant/components/vesync/switch.py
Python
apache-2.0
3,095
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 Cisco Systems, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache...
yamt/neutron
quantum/plugins/cisco/l2device_plugin_base.py
Python
apache-2.0
5,260
#!/usr/bin/python # # Copyright (C) 2011 Mirantis Inc. # # Authors: Vladimir Kozhukalov <vkozhukalov@mirantis.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, version 3 of t...
mattymo/fuel-docker-nailgun
etc/puppet/modules/cobbler/templates/scripts/late_command.py
Python
apache-2.0
3,022
# -*- coding: utf-8 -*- """ This serialiser will output an RDF Graph as a JSON-LD formatted document. See: http://json-ld.org/ Example usage:: >>> from rdflib.plugin import register, Serializer >>> register('json-ld', Serializer, 'rdflib_jsonld.serializer', 'JsonLDSerializer') >>> from rdflib import...
twamarc/schemaorg
lib/rdflib_jsonld/serializer.py
Python
apache-2.0
12,215
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.build_gra...
landism/pants
src/python/pants/backend/graph_info/tasks/minimal_cover.py
Python
apache-2.0
1,380
# Copyright 2015 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
wolverineav/neutron
neutron/agent/metadata/config.py
Python
apache-2.0
5,135
# -*- coding: utf-8 -*- from __future__ import unicode_literals from datetime import datetime, timedelta import re import types from unittest import TestCase from django.core.exceptions import ValidationError from django.core.validators import ( BaseValidator, EmailValidator, MaxLengthValidator, MaxValueValidator...
wfxiang08/django178
tests/validators/tests.py
Python
bsd-3-clause
14,190
# expression.py # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Defines the base components of SQL expression trees. All components are derived...
dbbhattacharya/kitsune
vendor/packages/sqlalchemy/lib/sqlalchemy/sql/expression.py
Python
bsd-3-clause
152,008
# -*- coding: utf-8 -*- # Script for creating different kind of indexes in a small space as possible. # This is intended for testing purposes. import tables class Descr(tables.IsDescription): var1 = tables.StringCol(itemsize=4, shape=(), dflt='', pos=0) var2 = tables.BoolCol(shape=(), dflt=False, pos=1) ...
dotsdl/PyTables
tables/tests/create_backcompat_indexes.py
Python
bsd-3-clause
1,209
from __future__ import unicode_literals from django.contrib import messages from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404, redirect from django.template.response import TemplateResponse from django.utils.http import is_safe_url from django.utils.translation import pgettext...
itbabu/saleor
saleor/dashboard/product/views.py
Python
bsd-3-clause
18,025
#!/usr/bin/env python # # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Creates symlinks to native libraries for an APK. The native libraries should have previously been pushed to the device (in option...
sencha/chromium-spacewalk
build/android/gyp/create_device_library_links.py
Python
bsd-3-clause
3,509
#----------------------------------------------------------------------------- # Copyright (c) 2013, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this softwa...
bl4ckdu5t/registron
tests/libraries/test_xml.py
Python
mit
432
import unittest import numpy as np from numpy.testing import assert_allclose import theano from keras.layers import convolutional class TestConvolutions(unittest.TestCase): def test_convolution_1d(self): nb_samples = 9 nb_steps = 7 input_dim = 10 filter_length = 6 nb_filte...
johmathe/keras
tests/auto/keras/layers/test_convolutional.py
Python
mit
6,580
# -*- coding: utf-8 -*- # This file is part of Invenio. # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014 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...
crepererum/invenio
invenio/ext/legacy/layout.py
Python
gpl-2.0
9,951
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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) any later version. # # This program is distrib...
Microvellum/Fluid-Designer
win64-vc/2.78/scripts/addons/io_scene_ms3d/ms3d_utils.py
Python
gpl-3.0
5,817
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # 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 Lice...
bachp/ansible-modules-extras
cloud/cloudstack/cs_project.py
Python
gpl-3.0
9,915
#!/usr/bin/env python """web.py: makes web apps (http://webpy.org)""" from __future__ import generators __version__ = "0.36" __author__ = [ "Aaron Swartz <me@aaronsw.com>", "Anand Chitipothu <anandology@gmail.com>" ] __license__ = "public domain" __contributors__ = "see http://webpy.org/changes" import utils...
pankajn17/intern
web/__init__.py
Python
gpl-3.0
716
#!/usr/bin/python """Usage : ./tomboy.py <True|False> <search-term> <search-term> ... For Example: ./tomboy.py True Hello Res ./tomboy.py True Hello ./tomboy.py True hlo """ import sys import dbus import gobject import dbus.glib # Get the D-Bus session bus bus = dbus.SessionBus() # Access the Tomboy D-Bus ...
grepory/tomboy
test/DBusSearchTest.py
Python
lgpl-2.1
859
import functools from framework.auth import Auth from website.archiver import ( StatResult, AggregateStatResult, ARCHIVER_NETWORK_ERROR, ARCHIVER_SIZE_EXCEEDED, ARCHIVER_FILE_NOT_FOUND, ARCHIVER_FORCED_FAILURE, ) from website import ( mails, settings ) from osf.utils.sanitize import unesc...
erinspace/osf.io
website/archiver/utils.py
Python
apache-2.0
10,456
from opserver.plugins.alarm_base import AlarmBase class VrouterInterface(AlarmBase): """VrouterAgent has interfaces in error state in VrouterAgent.error_intf_list""" def __call__(self, uve_key, uve_data): err_list = [] if not uve_data.has_key("VrouterAgent"): return self.__class_...
facetothefate/contrail-controller
src/opserver/plugins/alarm_vrouter_interface/main.py
Python
apache-2.0
770
# 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 ...
rahulunair/nova
nova/scheduler/filters/io_ops_filter.py
Python
apache-2.0
2,476
# # ovirt-engine-setup -- ovirt engine setup # Copyright (C) 2015 Red Hat, 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 r...
walteryang47/ovirt-engine
packaging/setup/plugins/ovirt-engine-common/vmconsole_proxy_helper/__init__.py
Python
apache-2.0
841
# 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...
xzturn/tensorflow
tensorflow/tools/gcs_test/python/gcs_smoke.py
Python
apache-2.0
10,461
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # 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 applicab...
google-research/batch_rl
batch_rl/multi_head/__init__.py
Python
apache-2.0
608
# -:- encoding: utf-8 -:- # This file is part of the MapProxy project. # Copyright (C) 2013 Omniscale <http://omniscale.de> # # 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.a...
olt/mapproxy
mapproxy/script/conf/app.py
Python
apache-2.0
6,906
#!/usr/bin/env python # 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/. from selenium.webdriver.common.by import By from pages.base import Page class Footer(Page): ...
staranjeet/fjord
smoketests/pages/regions/footer.py
Python
bsd-3-clause
1,847
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase import vtk class vtkFieldDataToAttributeDataFilter(SimpleVTKClassModuleBase): def __init__(self, module_manager): SimpleVTKClassModuleBase.__init__( self, module_manager,...
nagyistoce/devide
modules/vtk_basic/vtkFieldDataToAttributeDataFilter.py
Python
bsd-3-clause
519
from base import * class Test (TestBase): def __init__ (self): TestBase.__init__ (self, __file__) self.name = "Broken header entry III" self.expected_error = 200 self.request = "GET / HTTP/1.0\r\n" +\ "Entry:value\r\n"
lmcro/webserver
qa/014-Broken-Key3.py
Python
gpl-2.0
294
# (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...
webdev1001/ansible
v2/ansible/plugins/connections/__init__.py
Python
gpl-3.0
1,420
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Citrix Systems # 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 = {'status': ['preview'], ...
bearstech/ansible
lib/ansible/modules/network/netscaler/netscaler_cs_action.py
Python
gpl-3.0
9,091
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
bjolivot/ansible
lib/ansible/module_utils/sros.py
Python
gpl-3.0
4,609
__license__ = 'GPL v3' __copyright__ = '2011, Ken <ken at szboeye.com>' __docformat__ = 'restructuredtext en' ''' Device driver for BOEYE serial readers ''' from calibre.devices.usbms.driver import USBMS class BOEYE_BEX(USBMS): name = 'BOEYE BEX reader driver' gui_name = 'BOEYE BEX' description = _(...
jelly/calibre
src/calibre/devices/boeye/driver.py
Python
gpl-3.0
1,715
""" Support for LiteJet switch. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/switch.litejet/ """ import logging import homeassistant.components.litejet as litejet from homeassistant.components.switch import SwitchDevice DEPENDENCIES = ['litejet'] AT...
happyleavesaoc/home-assistant
homeassistant/components/switch/litejet.py
Python
apache-2.0
2,283
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from datetime import datetime, date, time from ...workbook import Workbook class TestComp...
jvrsantacruz/XlsxWriter
xlsxwriter/test/comparison/test_simple04.py
Python
bsd-2-clause
4,422
# Copyright 2015 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 logging import os import shutil import subprocess import sys import tempfile from telemetry.core import exceptions from telemetry.core import util fr...
js0701/chromium-crosswalk
tools/telemetry/telemetry/internal/backends/mandoline/desktop_mandoline_backend.py
Python
bsd-3-clause
5,112
# Copyright (c) 2014 Red Hat, 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 require...
dims/neutron
neutron/tests/functional/api/test_policies.py
Python
apache-2.0
3,716
# Copyright (c) 2014 Thales Services SAS # 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 r...
yuewko/neutron
neutron/plugins/ml2/drivers/helpers.py
Python
apache-2.0
6,136
from bokeh.io import show, output_file from bokeh.models import ColumnDataSource, FactorRange from bokeh.plotting import figure from bokeh.transform import factor_cmap output_file("bar_nested_colormapped.html") fruits = ['Apples', 'Pears', 'Nectarines', 'Plums', 'Grapes', 'Strawberries'] years = ['2015', '2016', '201...
dennisobrien/bokeh
examples/plotting/file/bar_nested_colormapped.py
Python
bsd-3-clause
1,229
""" The `Sitemaps protocol <http://en.wikipedia.org/wiki/Sitemaps>`_ allows a webmaster to inform search engines about URLs on a website that are available for crawling. Django comes with a high-level framework that makes generating sitemap XML files easy. Install the sitemap application as per the `instructions in th...
rmaceissoft/django-photologue
photologue/sitemaps.py
Python
bsd-3-clause
1,809
from vtk import * source = vtkRandomGraphSource() source.SetNumberOfVertices(150) source.SetEdgeProbability(0.01) source.SetUseEdgeProbability(True) source.SetStartWithTree(True) view = vtkGraphLayoutView() view.AddRepresentationFromInputConnection(source.GetOutputPort()) view.SetVertexLabelArrayName("vertex id") vie...
collects/VTK
Examples/Infovis/Python/random3d.py
Python
bsd-3-clause
847
""" homeassistant.components.ifttt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This component enable you to trigger Maker IFTTT recipes. Check https://ifttt.com/maker for details. Configuration: To use Maker IFTTT you will need to add something like the following to your config/configuration.yaml. ifttt: key: xxxxx-x-xxxxxxxxxx...
alexkolar/home-assistant
homeassistant/components/ifttt.py
Python
mit
1,789
# Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publ...
KhronosGroup/COLLADA-CTS
StandardDataSets/collada/library_visual_scenes/visual_scene/node/_reference/_reference_node_translate_xyz_cube/_reference_node_translate_xyz_cube.py
Python
mit
3,826
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
Lilykos/invenio
invenio/modules/documents/config.py
Python
gpl-2.0
1,292
# Author: Mr_Orange <mr_orange@hotmail.it> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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...
vertigo235/Sick-Beard-XEM
sickbeard/clients/deluge.py
Python
gpl-3.0
8,453
# coding=utf-8 """This module contains the abstract class of the MinimumNeeds. The storage logic is omitted here.""" __author__ = 'Christian Christelis <christian@kartoza.com>' __date__ = '05/10/2014' __copyright__ = ('Copyright 2014, Australia Indonesia Facility for ' 'Disaster Reduction') from coll...
Jannes123/inasafe
safe/common/minimum_needs.py
Python
gpl-3.0
8,353
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # 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', ...
roadmapper/ansible
lib/ansible/modules/network/cloudengine/ce_lldp.py
Python
gpl-3.0
32,532
# 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/. from nose.tools import eq_, ok_ from socorro.external.fs.fs_new_crash_source import ( FSNewCrashSource ) from socor...
cliqz/socorro
socorro/unittest/external/fs/test_fs_new_crash_source.py
Python
mpl-2.0
1,839
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ from .finders import get_finders class WagtailEmbedsAppConfig(AppConfig): name = 'wagtail.embeds' label = 'wagtailembeds' verbose_name = _("Wagtail embeds") def ready(self): # Check configuration on sta...
mikedingjan/wagtail
wagtail/embeds/apps.py
Python
bsd-3-clause
347
# testClasses.py # -------------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley.e...
rafaelvareto/PacmanPY
testClasses.py
Python
gpl-3.0
6,709
pass <caret><selection>n = 0 while n: print("spam")</selection> pass
siosio/intellij-community
python/testData/mover/multiLineSelectionDifferentIndentLevelsMoveToEmptyLine_afterDown.py
Python
apache-2.0
74
import warnings from .std import TqdmExperimentalWarning with warnings.catch_warnings(): warnings.simplefilter("ignore", category=TqdmExperimentalWarning) from .autonotebook import tqdm, trange __all__ = ["tqdm", "trange"]
drammock/mne-python
mne/externals/tqdm/_tqdm/auto.py
Python
bsd-3-clause
231
#!/usr/bin/env python # encoding: utf-8 """ Detuned waveguide bank. """ from pyo import * import random s = Server(sr=44100, nchnls=2, buffersize=512, duplex=0).boot() src = SfPlayer("../snds/ounkmaster.aif", loop=True, mul=.1) lf = Sine(freq=[random.uniform(.005, .015) for i in range(8)], mul=[.02,.04,.0...
xyproto/gosignal
pyo/examples/effects/03_detuned_waveguides.py
Python
gpl-3.0
513
# -*- 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 #...
sid88in/incubator-airflow
airflow/migrations/versions/1507a7289a2f_create_is_encrypted.py
Python
apache-2.0
2,203
from pyroute2.netlink import nlmsg class errmsg(nlmsg): ''' Custom message type Error ersatz-message ''' fields = (('code', 'i'), )
craneworks/python-pyroute2
pyroute2/netlink/rtnl/errmsg.py
Python
apache-2.0
155
# -*- coding: utf-8 -*- import datetime as dt import os import sys # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.inser...
jcalbert/TextBlob
docs/conf.py
Python
mit
2,936
# -*- encoding: utf-8 -*- from contextlib import contextmanager from datetime import datetime import sys from traceback import format_exception import colorama from .conf import settings def color(color_): """Utility for ability to disabling colored output.""" if settings.no_colors: return '' els...
redreamality/thefuck
thefuck/logs.py
Python
mit
3,065
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 Lic...
thaim/ansible
lib/ansible/modules/network/fortios/fortios_firewall_schedule_onetime.py
Python
mit
11,113
import queue import unittest from testfixtures import LogCapture from coalib.processes.LogPrinterThread import LogPrinterThread class LogPrinterThreadTest(unittest.TestCase): def test_run(self): log_queue = queue.Queue() self.uut = LogPrinterThread(log_queue) log_queue.put(item='Sample ...
kartikeys98/coala
tests/processes/LogPrinterThreadTest.py
Python
agpl-3.0
879
"""Update models to support storing the queries. Revision ID: ad82a75afd82 Revises: f162a1dea4c4 Create Date: 2016-07-25 17:48:12.771103 """ # revision identifiers, used by Alembic. revision = 'ad82a75afd82' down_revision = 'f162a1dea4c4' from alembic import op import sqlalchemy as sa def upgrade(): op.create...
alanmcruickshank/superset-dev
superset/migrations/versions/ad82a75afd82_add_query_model.py
Python
apache-2.0
2,354
r = 0 g = 255 b = 0
alvin319/CarnotKE
jyhton/tests/java/org/python/indexer/data/pkg/other/color/green.py
Python
apache-2.0
20
#!/usr/bin/env python2 """ mbed SDK Copyright (c) 2011-2014 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 applicabl...
hjjeon0608/mbed_for_W7500P
workspace_tools/singletest.py
Python
apache-2.0
11,885
import os import os.path import sys # Add the project to the python path sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir)) sys.stdout = sys.stderr # Configure the application (Logan) from fabric_bolt.utils.runner import configure configure() from django.core.wsgi import get_wsgi_application appl...
brajput24/fabric-bolt
fabric_bolt/wsgi.py
Python
mit
352
import test_base import test_expression import test_ir_attachment import test_ir_model import test_ir_values import test_menu import test_search import test_views import test_ir_sequence checks = [ test_base, test_expression, test_ir_attachment, test_ir_model, test_ir_values, test_menu, tes...
VitalPet/odoo
openerp/addons/base/tests/__init__.py
Python
agpl-3.0
370
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'TigrisQueryModel.startid' db.add_column('customs_tigrisquerymodel', 'startid', self.gf('dj...
nirmeshk/oh-mainline
mysite/customs/migrations/0039_auto__add_field_tigrisquerymodel_startid__add_field_tigrisquerymodel_d.py
Python
agpl-3.0
26,529
"""Spectral Embedding""" # Author: Gael Varoquaux <gael.varoquaux@normalesup.org> # Wei LI <kuantkid@gmail.com> # License: BSD 3 clause import warnings import numpy as np from scipy import sparse from scipy.linalg import eigh from scipy.sparse.linalg import lobpcg from ..base import BaseEstimator from ..ext...
thilbern/scikit-learn
sklearn/manifold/spectral_embedding_.py
Python
bsd-3-clause
19,492
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017, Eike Frost <ei@kefro.st> # 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...
resmo/ansible
lib/ansible/modules/identity/keycloak/keycloak_client.py
Python
gpl-3.0
33,175
# -*- coding: utf-8 -*- ############################################################################### # # # Author: Leonardo Pistone # Copyright 2014 Camptocamp SA # ...
Endika/account-financial-tools
account_move_batch_validate/account.py
Python
agpl-3.0
6,169
# Copyright 2010-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...
nash-x/hws
cinder/api/views/versions.py
Python
apache-2.0
2,868
# 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 logging import os import signal import subprocess import sys import tempfile from profile_chrome import controllers from profile_chrome import ui fr...
CTSRD-SOAAP/chromium-42.0.2311.135
tools/profile_chrome/perf_controller.py
Python
bsd-3-clause
6,890
# encoding: utf-8 """ Provides a low-level, read-only API to a serialized Open Packaging Convention (OPC) package. """ from __future__ import absolute_import from .constants import RELATIONSHIP_TARGET_MODE as RTM from .oxml import parse_xml from .packuri import PACKAGE_URI, PackURI from .phys_pkg import PhysPkgReade...
LuoZijun/uOffice
temp/pydocxx/docx/opc/pkgreader.py
Python
gpl-3.0
10,107
# -*- coding: utf8 """Random Projection transformers Random Projections are a simple and computationally efficient way to reduce the dimensionality of the data by trading a controlled amount of accuracy (as additional variance) for faster processing times and smaller model sizes. The dimensions and distribution of Ra...
alexeyum/scikit-learn
sklearn/random_projection.py
Python
bsd-3-clause
22,132
# Copyright 2014 Red Hat, 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 ag...
ChinaMassClouds/copenstack-server
openstack/src/nova-2014.2/nova/objects/agent.py
Python
gpl-2.0
2,828
""" Scrapy Telnet Console extension See documentation in docs/topics/telnetconsole.rst """ import pprint from twisted.conch import manhole, telnet from twisted.conch.insults import insults from twisted.internet import protocol from scrapy.xlib.pydispatch import dispatcher from scrapy.exceptions import NotConfigured...
waseem18/oh-mainline
vendor/packages/scrapy/scrapy/telnet.py
Python
agpl-3.0
2,808
from subprocess import * from time import sleep from timeit import default_timer as clock from tempfile import TemporaryFile #from Queue import Queue from collections import deque from Tester import Tester from signal import SIGTERM import os, sys ## This class provides an interface to run commands in parallel # # T...
danielru/moose
python/TestHarness/RunParallel.py
Python
lgpl-2.1
9,808