code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
from django.conf.urls import patterns, url from django.views.generic import TemplateView urlpatterns = patterns('gnowsys_ndf.ndf.views.file', url(r'^[/]$', 'file', name='file'), # url(r'^/(?P<file_id>[\w-]+)$', 'file', name='file'), url(r'^/uploadDo...
supriyasawant/gstudio
gnowsys-ndf/gnowsys_ndf/ndf/urls/file.py
Python
agpl-3.0
1,918
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RRvcheck(RPackage): """Check latest release version of R and R package (both in 'CRAN', ...
iulian787/spack
var/spack/repos/builtin/packages/r-rvcheck/package.py
Python
lgpl-2.1
958
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Prokka(Package): """Prokka is a software tool to annotate bacterial, archaeal and viral ...
iulian787/spack
var/spack/repos/builtin/packages/prokka/package.py
Python
lgpl-2.1
1,155
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class BashCompletion(AutotoolsPackage): """Programmable completion functions for bash.""" h...
iulian787/spack
var/spack/repos/builtin/packages/bash-completion/package.py
Python
lgpl-2.1
1,869
# -*- coding: utf-8 -*- from django.conf.urls.defaults import * urlpatterns = patterns('', url(r'^test_click/$', 'django.views.generic.simple.direct_to_template', {'template': 'test_app/wm_test_click.html'}, name='wm_test_click') )
michaelBenin/django-jenkins
tests/test_app/urls.py
Python
lgpl-3.0
247
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc import db from ggrc.models.mixins import BusinessObject, Timeboxed, CustomAttributable from ggrc.models.object_document import Documentable from ggrc.models.object_owner import Ownable from ggrc.mo...
edofic/ggrc-core
src/ggrc/models/access_group.py
Python
apache-2.0
777
"""Runs the Treadmill container cleanup job. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import click from treadmill import appenv from treadmill import cleanup from treadmill import cli from treadmill import...
Morgan-Stanley/treadmill
lib/python/treadmill/sproc/cleanup.py
Python
apache-2.0
1,571
"""Tests for AVM Fritz!Box switch component.""" from datetime import timedelta from unittest.mock import Mock from requests.exceptions import HTTPError from homeassistant.components.fritzbox.const import ( ATTR_STATE_DEVICE_LOCKED, ATTR_STATE_LOCKED, DOMAIN as FB_DOMAIN, ) from homeassistant.components.se...
jawilson/home-assistant
tests/components/fritzbox/test_switch.py
Python
apache-2.0
5,502
# 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...
kevin-coder/tensorflow-fork
tensorflow/python/data/experimental/kernel_tests/serialization/choose_fastest_branch_dataset_serialization_test.py
Python
apache-2.0
3,611
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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 applicable...
mlperf/training_results_v0.5
v0.5.0/google/research_v3.32/gnmt-tpuv3-32/code/gnmt/model/t2t/tensor2tensor/layers/common_layers.py
Python
apache-2.0
132,971
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
jayceyxc/hue
apps/about/src/about/tests.py
Python
apache-2.0
2,701
#!/usr/bin/env python # -*- coding:utf-8 -*- # Copyright 2015 NEC Corporation. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in comp...
machaharu/odenos
apps/mininet_examples/single_network_control/start_mininet.py
Python
apache-2.0
1,901
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
DinoCow/airflow
tests/api_connexion/schemas/test_connection_schema.py
Python
apache-2.0
7,097
#!/usr/bin/env python # # Copyright 2010 Google 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 o...
Tong-Chen/genomics-tools
mapreduce-python/mapreduce/model.py
Python
apache-2.0
39,526
# Copyright 2018 Google LLC # # 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, ...
tensorflow/minigo
bigtable_input.py
Python
apache-2.0
29,247
""" merged implementation of the cache provider the name cache was not choosen to ensure pluggy automatically ignores the external pytest-cache """ import py import pytest import json from os.path import sep as _sep, altsep as _altsep class Cache(object): def __init__(self, config): self.config = config...
enriquesanchezb/practica_utad_2016
venv/lib/python2.7/site-packages/_pytest/cacheprovider.py
Python
apache-2.0
8,786
from __future__ import unicode_literals import locale def locale_decode(bytestr): try: return unicode(bytestr) except UnicodeError: return str(bytestr).decode(locale.getpreferredencoding())
abarisain/mopidy
mopidy/utils/encoding.py
Python
apache-2.0
217
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (c) 2015,掌阅科技 All rights reserved. 摘 要: query.py 创 建 者: WangLichao 创建日期: 2015-03-06 """ # pylint: disable=arguments-differ from tornado.web import UIModule OPERATOR = { 'like': '包含', '=': '等于', '!=': '不等于', '>': '大于', '>=': '大于等于', ...
ireaderlab/zkdash
lib/uimodule/query.py
Python
apache-2.0
1,160
# coding=utf-8 # Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. import pytest from distutils import version import sys from _pytest.config import get_plugin_manager from pkg_resources import iter_entry_points...
siosio/intellij-community
python/helpers/pycharm/_jb_pytest_runner.py
Python
apache-2.0
1,933
import pytz import dateutil.parser from waterbutler.core import metadata class BaseOsfStorageMetadata: @property def provider(self): return 'osfstorage' class BaseOsfStorageItemMetadata(BaseOsfStorageMetadata): def __init__(self, raw, materialized): super().__init__(raw) self._...
felliott/waterbutler
waterbutler/providers/osfstorage/metadata.py
Python
apache-2.0
4,099
# Copyright 2014-2015 0xc0170 # # 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,...
0xc0170/project_generator
project_generator/tools/eclipse.py
Python
apache-2.0
3,406
# Copyright 2013 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...
idjaw/keystone
keystone/tests/unit/test_v3.py
Python
apache-2.0
51,696
# Copyright 2011 OpenStack Foundation # (c) Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 # # ...
badock/nova
nova/virt/libvirt/volume.py
Python
apache-2.0
47,624
""".""" def get_systeminfo(resource, config, interactive=False): """.""" return {'ohai': 'there!'}
lil-cain/satori
satori/sysinfo/ohai.py
Python
apache-2.0
109
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
benfinke/ns_python
nssrc/com/citrix/netscaler/nitro/resource/config/cr/crvserver_crpolicy_binding.py
Python
apache-2.0
7,634
# Copyright 2013 Donald Stufft and individual contributors # # 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...
xueyumusic/pynacl
tests/test_box.py
Python
apache-2.0
7,660
from __future__ import print_function from __future__ import division from builtins import str from past.utils import old_div import copy from datetime import datetime, timedelta import dateutil.parser from functools import wraps import inspect import json import logging import os import socket import sys import time ...
nkhuyu/airflow
airflow/www/app.py
Python
apache-2.0
68,914
# Copyright 2015 IBM Corporation # # 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...
noironetworks/neutron
neutron/agent/l3/item_allocator.py
Python
apache-2.0
5,147
""" Form Widget classes specific to the Django admin site. """ from __future__ import unicode_literals import copy from django import forms from django.contrib.admin.templatetags.admin_static import static from django.core.urlresolvers import reverse from django.forms.widgets import RadioFieldRenderer from django.for...
ZhaoCJ/django
django/contrib/admin/widgets.py
Python
bsd-3-clause
13,529
"""============================= Subclassing ndarray in python ============================= Introduction ------------ Subclassing ndarray is relatively simple, but it has some complications compared to other Python objects. On this page we explain the machinery that allows you to subclass ndarray, and the implicati...
MSeifert04/numpy
numpy/doc/subclassing.py
Python
bsd-3-clause
28,624
# Created On: 2010-06-02 # Copyright 2015 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/gpl-3.0.html from PyQt5.QtCo...
hsoft/qtlib
radio_box.py
Python
bsd-3-clause
2,903
import numpy as np import warnings import operator from heapq import merge class intervals(object): r""" This class implements methods for intervals or union of two unbounded intervals, when all these sets have a point in their intersection """ def __init__(self, I = None): """ ...
selective-inference/selective-inference
selectinf/constraints/intervals.py
Python
bsd-3-clause
6,279
import copy import json import os import asyncio import pytest import webdriver from urllib.parse import urlunsplit from tests.support import defaults from tests.support.helpers import cleanup_session, deep_update from tests.support.inline import build_inline from tests.support.http_request import HTTPRequest # Th...
nwjs/chromium.src
third_party/blink/web_tests/external/wpt/webdriver/tests/support/fixtures.py
Python
bsd-3-clause
7,196
#Autogenerated by ReportLab guiedit do not edit from reportlab.graphics.charts.legends import Legend from reportlab.graphics.charts.lineplots import ScatterPlot from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String from reportlab.graphics.charts.textlabels import Label from excelcolors import ...
tschalch/pyTray
src/lib/reportlab/graphics/samples/scatter_lines_markers.py
Python
bsd-3-clause
3,824
import os import sys import time ''' @author: msune,omoya,CarolinaFernandez @@organization: i2CAT, OFELIA FP7 Persistence engine Implementes driver-based persistence backend selection ''' class PersistenceEngine(): #Default Class Attributes _defaultParser = "RegexParser" _defaultPersistence = ...
jpardobl/naman
naman/core/pypelib/persistence/PersistenceEngine.py
Python
bsd-3-clause
2,078
# 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. from telemetry.page import legacy_page_test from telemetry.timeline.model import TimelineModel from telemetry.timeline import tracing_config from telemetry.u...
axinging/chromium-crosswalk
tools/perf/measurements/task_execution_time.py
Python
bsd-3-clause
7,687
from __future__ import print_function import sys def main(): for line in sys.stdin: line = line.strip() if not line.startswith("#STRUCT_SIZER"): continue line = line[14:] line = line.replace("#", "") print(line) if __name__ == "__main__": main()
JLLeitschuh/allwpilib
wpilibj/src/athena/cpp/nivision/get_struct_size.py
Python
bsd-3-clause
308
from __future__ import absolute_import __all__ = ("DebugMeta",) from sentry.interfaces.base import Interface from sentry.utils.json import prune_empty_keys class DebugMeta(Interface): """ Holds debug meta information for processing stacktraces and similar things. This information is deleted after event...
mvaled/sentry
src/sentry/interfaces/debug_meta.py
Python
bsd-3-clause
1,172
# Copyright 2016 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. # Recipe for uploading DM results. import calendar PYTHON_VERSION_COMPATIBILITY = "PY3" DEPS = [ 'recipe_engine/file', 'recipe_engine/json', 'reci...
youtube/cobalt
third_party/skia_next/third_party/skia/infra/bots/recipes/upload_dm_results.py
Python
bsd-3-clause
4,195
from django.conf.urls.defaults import patterns from django.conf import settings # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', ( r'^$', 'statserver.stats.views.browse' ), ( r'^stats/addnode$', 'statserver.stats.views.addnode...
MiltosD/CEF-ELRC
misc/tools/statserver/urls.py
Python
bsd-3-clause
427
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import models, migrations from social.utils import setting_name EMAIL_LENGTH = getattr(settings, setting_name('EMAIL_LENGTH'), 254) class Migration(migrations.Migration): dependencies = [ ('d...
webjunkie/python-social-auth
social/apps/django_app/default/migrations/0003_alter_email_max_length.py
Python
bsd-3-clause
548
from __future__ import absolute_import import bokeh.util.string as bus class Test_escape(object): def test_default_quote(self): assert bus.escape("foo'bar") == "foo&#x27;bar" assert bus.escape('foo"bar') == "foo&quot;bar" def test_quote_False(self): assert bus.escape("foo'bar", quote...
mindriot101/bokeh
bokeh/util/tests/test_string.py
Python
bsd-3-clause
3,770
#!/usr/bin/python # Copyright 2016 The ANGLE 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. # # gen_dxgi_format_table.py: # Code generation for DXGI format map. from datetime import date import sys sys.path.append('../..') i...
ecoal95/angle
src/libANGLE/renderer/d3d/d3d11/gen_dxgi_format_table.py
Python
bsd-3-clause
3,280
#!/usr/bin/env python import json import codecs from csvkit import CSVKitReader from csvkit.cli import CSVKitUtility, match_column_identifier from csvkit.exceptions import NonUniqueKeyColumnException class CSVJSON(CSVKitUtility): description = 'Convert a CSV file into JSON (or GeoJSON).' override_flags = ['H...
danpalmer/open-data-quality-dashboard
tools/csvkit/csvkit/utilities/csvjson.py
Python
mit
5,216
import asposebarcodecloud from asposebarcodecloud.BarcodeApi import BarcodeApi from asposebarcodecloud.BarcodeApi import ApiException import ConfigParser config = ConfigParser.ConfigParser() config.readfp(open(r'../../data/config.properties')) apiKey = config.get('AppConfig', 'api_key') appSid = config.get(...
asposebarcode/Aspose_BarCode_Cloud
Examples/Python/generating-saving/without-cloud-storage/generate-barcode-and-get-image-as-stream.py
Python
mit
1,515
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # Copyright (c) 2011 Piston Cloud Computing, Inc # Copyright (c) 2011 OpenStack Foundation # (c) Cop...
OpenSciViz/cloudstack
openstack/src/python/nova-libvirt/backup/utils.py
Python
mit
18,922
import logging from django.shortcuts import get_object_or_404 from django.views.generic import ListView, DetailView from django.http import HttpResponsePermanentRedirect from django.conf import settings from django.core.urlresolvers import reverse from readthedocs.builds.models import Build, Version from readthedocs....
espdev/readthedocs.org
readthedocs/builds/views.py
Python
mit
2,216
#!/usr/bin/env python3 # Copyright (c) 2016-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test NULLDUMMY softfork. Connect to a single node. Generate 2 blocks (save the coinbases for later). G...
JeremyRubin/bitcoin
test/functional/feature_nulldummy.py
Python
mit
7,178
from ... import types as sqltypes class JSON(sqltypes.JSON): """SQLite JSON type. SQLite supports JSON as of version 3.9 through its JSON1_ extension. Note that JSON1_ is a `loadable extension <https://www.sqlite.org/loadext.html>`_ and as such may not be available, or may require run-time loadin...
gltn/stdm
stdm/third_party/sqlalchemy/dialects/sqlite/json.py
Python
gpl-2.0
2,292
# -*- 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...
freedesktop-unofficial-mirror/papyon
papyon/service/AddressBook/scenario/contacts/messenger_contact_add.py
Python
gpl-2.0
3,036
from mpl_toolkits.basemap import Basemap, shiftgrid, maskoceans, interp import numpy as np import matplotlib.pyplot as plt # example showing how to mask out 'wet' areas on a contour or pcolor plot. topodatin = np.loadtxt('etopo20data.gz') lonsin = np.loadtxt('etopo20lons.gz') latsin = np.loadtxt('etopo20lats.gz') #...
jenshnielsen/basemap
examples/maskoceans.py
Python
gpl-2.0
1,922
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ *************************************************************************** generate_test_mask_image.py --------------------- Date : February 2015 Copyright : (C) 2015 by Nyall Dawson Email : nyall dot daws...
wbyne/QGIS
scripts/generate_test_mask_image.py
Python
gpl-2.0
6,625
# ##### 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/startup/bl_ui/properties_data_mesh.py
Python
gpl-3.0
15,183
#!/usr/bin/python #### # 06/2010 Nic Wolfe <nic@wolfeden.ca> # 02/2006 Will Holcomb <wholcomb@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 ...
jimyx17/jimh
lib/MultipartPostHandler.py
Python
gpl-3.0
3,642
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
pkill-nine/qutebrowser
tests/unit/misc/test_readline.py
Python
gpl-3.0
11,925
# Copyright (C) 2013 - Oscar Campos <oscar.campos@member.fsf.org> # This program is Free Software see LICENSE file for details import sublime import sublime_plugin from ..anaconda_lib.helpers import get_settings from ..anaconda_lib.helpers import valid_languages from ..anaconda_lib.linting.sublime import ANACONDA ...
alexfalcucc/anaconda
commands/get_lines.py
Python
gpl-3.0
2,206
from beaker.util import ThreadLocal thread_instance = ThreadLocal() def setup_thread(instance): global thread_instance thread_instance.put(instance) def teardown_thread(): ''' A counterpart for setup_thread(), probly only useful in test_code ''' global thread_instance try: t...
DanielNeugebauer/adhocracy
src/adhocracy/model/instance_filter.py
Python
agpl-3.0
531
# -*- coding: utf-8 -*- from flask.ext.rq import job from tweepy import OAuthHandler, API import bitlyapi import urllib2 import json import re from hasjob import app @job('hasjob') def tweet(title, url, location=None, parsed_location=None, username=None): auth = OAuthHandler(app.config['TWITTER_CONSUMER_KEY'], a...
nhannv/hasjob
hasjob/twitter.py
Python
agpl-3.0
2,286
# The Hazard Library # Copyright (C) 2014, GEM 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 option) any later version. # # T...
mmpagani/oq-hazardlib
openquake/hazardlib/tests/gsim/convertito_2012_test.py
Python
agpl-3.0
1,218
# pylint: disable=C0103 """Wrapper module for libpcp_import - Performace Co-Pilot Log Import API # # Copyright (C) 2012-2015 Red Hat. # # This file is part of the "pcp" module, the python interfaces for the # Performance Co-Pilot toolkit. # # This program is free software; you can redistribute it and/or modify it # und...
edwardt/pcp
src/python/pcp/pmi.py
Python
lgpl-2.1
11,357
"""SCons.Variables.PathVariable This file defines an option type for SCons implementing path settings. To be used whenever a a user-specified path override should be allowed. Arguments to PathVariable are: option-name = name of this option on the command line (e.g. "prefix") option-help = help string for optio...
stefanklug/mapnik
scons/scons-local-2.3.6/SCons/Variables/PathVariable.py
Python
lgpl-2.1
5,646
import time from Rpyc import Async def threadfunc(callback): """this function will call the callback every second""" callback = Async(callback) try: while True: print "!" callback() time.sleep(1) except: print "thread exiting" def printer(text): ...
tempbottle/restcommander
play-1.2.4/python/Lib/site-packages/Rpyc/Demo/testmodule.py
Python
apache-2.0
373
# Copyright 2013 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...
alexpilotti/python-glanceclient
glanceclient/common/progressbar.py
Python
apache-2.0
3,171
"""Support for the (unofficial) Tado API.""" import asyncio from datetime import timedelta import logging from PyTado.interface import Tado from requests import RequestException import requests.exceptions import voluptuous as vol from homeassistant.components.climate.const import PRESET_AWAY, PRESET_HOME from homeass...
pschmitt/home-assistant
homeassistant/components/tado/__init__.py
Python
apache-2.0
8,954
for item in really_long_name_of_the_function_with_a_lot_of_patams( param1, param2, param3): pass
IllusionRom-deprecated/android_platform_tools_idea
python/testData/formatter/continuationIndentForCallInStatementPart_after.py
Python
apache-2.0
108
"""Test for RFLink cover components. Test setup of RFLink covers component/platform. State tracking and control of RFLink cover devices. """ import logging from homeassistant.components.rflink import EVENT_BUTTON_PRESSED from homeassistant.const import ( ATTR_ENTITY_ID, SERVICE_CLOSE_COVER, SERVICE_OPEN...
leppa/home-assistant
tests/components/rflink/test_cover.py
Python
apache-2.0
27,881
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
cloudbase/nova-virtualbox
nova/tests/unit/conf_fixture.py
Python
apache-2.0
3,169
# Copyright (c) 2013 OpenStack, LLC. # # 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 req...
jcsp/manila
manila/api/auth.py
Python
apache-2.0
1,414
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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.apach...
jessicalucci/NovaOrc
nova/tests/api/openstack/test_xmlutil.py
Python
apache-2.0
28,151
# # 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...
wileeam/airflow
tests/providers/amazon/aws/sensors/test_sagemaker_base.py
Python
apache-2.0
4,728
# # 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...
spektom/incubator-airflow
tests/providers/google/cloud/hooks/test_bigtable.py
Python
apache-2.0
22,575
from __future__ import print_function, absolute_import import numpy as np from numba import cuda, int32, float32 from numba.cuda.testing import unittest from numba.config import ENABLE_CUDASIM def useless_sync(ary): i = cuda.grid(1) cuda.syncthreads() ary[i] = i def simple_smem(ary): N = 100 sm ...
ssarangi/numba
numba/cuda/tests/cudapy/test_sync.py
Python
bsd-2-clause
3,582
import decimal import json import unittest import uuid from django import forms from django.apps.registry import Apps from django.core import exceptions, serializers, validators from django.core.management import call_command from django.db import IntegrityError, connection, models from django.test import TransactionT...
dydek/django
tests/postgres_tests/test_array.py
Python
bsd-3-clause
23,682
import numpy as np import pandas as pd from bokeh import mpl ts = pd.Series(np.random.randn(1000), index=pd.date_range('1/1/2000', periods=1000)) ts = ts.cumsum() df = pd.DataFrame(np.random.randn(1000, 4), index=ts.index, columns=list('ABCD')) df = df.cumsum() df.plot(legend=False) mpl.to_bokeh(name="dataframe")
the13fools/Bokeh_Examples
pandas/dataframe.py
Python
bsd-3-clause
318
from __future__ import with_statement import sys import unittest import maya.cmds as cmds import pymel.core as pm import pymel.core.uitypes as ui if not hasattr(pm, 'currentMenuParent'): def currentMenuParent(): return ui.PyUI(cmds.setParent(q=1, menu=1)) pm.currentMenuParent = currentMenuParent cla...
AtonLerin/pymel
tests/test_uitypes.py
Python
bsd-3-clause
8,047
# -*- coding: utf-8 -*- # Copyright 2013 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 require...
catapult-project/catapult
third_party/gsutil/gslib/tests/test_notification.py
Python
bsd-3-clause
4,981
# Copyright (c) 2012 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. class Platform(object): """The platform that the target browser is running on. Provides a limited interface to obtain stats from the platform itself...
leighpauls/k2cro4
tools/telemetry/telemetry/platform.py
Python
bsd-3-clause
672
from django.forms import ModelForm from .models import PakistaniPlace class PakistaniPlaceForm(ModelForm): """ Form for storing a Pakistani place. """ class Meta: model = PakistaniPlace fields = ('state', 'state_required', 'state_default', 'postcode', 'postcode_required', 'postcode_default', ...
infoxchange/django-localflavor
tests/test_pk/forms.py
Python
bsd-3-clause
355
# -*- coding: utf-8 -*- # Module: Navigation # Author: asciidisco # Created on: 11.10.2017 # License: MIT https://goo.gl/5bMj3H """Tests for the `Navigation` module""" import unittest import mock from resources.lib.Navigation import Navigation class NavigationTestCase(unittest.TestCase): pass
asciidisco/plugin.video.netflix
resources/test/test_Navigation.py
Python
mit
301
from pathlib import Path from unittest import mock, TestCase from rpg.spec import Spec class RpgTestCase(TestCase): test_project_dir = Path("tests/project") def assertExistInDir(self, expected, pathlibobject): path = Path(pathlibobject) for files in expected: self.assertTrue((path...
ignatenkobrain/rpg
tests/support.py
Python
gpl-2.0
434
import os from enigma import eEPGCache, getBestPlayableServiceReference, \ eServiceReference, iRecordableService, quitMainloop, eActionMap, setPreferredTuner from Components.config import config from Components.UsageConfig import defaultMoviePath from Components.TimerSanityCheck import TimerSanityCheck from Screens....
popazerty/blackhole-vuplus
RecordTimer.py
Python
gpl-2.0
43,007
# -*- coding: utf-8 -*- # Copyright 2007-2016 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
sem-geologist/hyperspy
hyperspy/tests/misc/test_test_utils.py
Python
gpl-3.0
5,176
# # (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...
fedorpatlin/ansible
lib/ansible/plugins/action/junos.py
Python
gpl-3.0
5,656
""" Utilities for instructor unit tests """ import datetime import json import random import six from pytz import UTC from util.date_utils import get_default_time_display class FakeInfo(object): """Parent class for faking objects used in tests""" FEATURES = [] def __init__(self): for feature ...
cpennington/edx-platform
lms/djangoapps/instructor/tests/utils.py
Python
agpl-3.0
3,206
from django.db import migrations, models def add_default_enable(apps, schema_editor): ForumsConfig = apps.get_model("django_comment_common", "ForumsConfig") settings_count = ForumsConfig.objects.count() if settings_count == 0: # By default we want the comment client enabled, but this is *not* enab...
eduNEXT/edx-platform
openedx/core/djangoapps/django_comment_common/migrations/0003_enable_forums.py
Python
agpl-3.0
849
# -*- coding: utf-8 -*- # ########################################################## # ## make sure administrator is on localhost # ########################################################### import os import socket import datetime import copy import gluon.contenttype import gluon.fileutils # ## critical --- make a ...
lucasdavila/web2py-appreport
controllers/appadmin.py
Python
lgpl-3.0
13,298
# Copyright 2014 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 ...
CSCI1200Course/csci1200OnlineCourse
modules/data_source_providers/rest_providers.py
Python
apache-2.0
14,940
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
redhat-openstack/trove
trove/db/sqlalchemy/migrate_repo/versions/006_dns_records.py
Python
apache-2.0
1,320
#!/usr/bin/env python # # 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 # ...
ted-ross/qpid-dispatch
tools/scraper/amqp_detail.py
Python
apache-2.0
50,089
# -*- coding: utf-8 -*- ############################################################################### # # ConfirmSubscription # Verifies that the endpoint owner wishes to receive messages by verifying the token sent during the Subscribe action. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Li...
jordanemedlock/psychtruths
temboo/core/Library/Amazon/SNS/ConfirmSubscription.py
Python
apache-2.0
4,739
""" A place for code to be called from the implementation of np.dtype String handling is much easier to do correctly in python. """ import numpy as np _kind_to_stem = { 'u': 'uint', 'i': 'int', 'c': 'complex', 'f': 'float', 'b': 'bool', 'V': 'void', 'O': 'object', 'M': 'datetime', ...
simongibbons/numpy
numpy/core/_dtype.py
Python
bsd-3-clause
9,843
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
dennisobrien/bokeh
bokeh/sampledata/commits.py
Python
bsd-3-clause
2,129
import datetime import uuid from decimal import Decimal from django.core import checks, exceptions, serializers from django.core.serializers.json import DjangoJSONEncoder from django.forms import CharField, Form, widgets from django.test.utils import isolate_apps from django.utils.html import escape from . import Pos...
uranusjr/django
tests/postgres_tests/test_json.py
Python
bsd-3-clause
13,888
#-*- coding: utf-8 -*- import inspect from django import forms from django.conf import settings as globalsettings from django.contrib.admin.widgets import ForeignKeyRawIdWidget from django.contrib.admin.sites import site from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import revers...
thomasbilk/django-filer
filer/fields/file.py
Python
bsd-3-clause
5,490
########################################################################## # # Copyright (c) 2010-2013, Image Engine Design 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: # # * Redis...
code-google-com/cortex-vfx
test/IECoreHoudini/ToHoudiniCurvesConverter.py
Python
bsd-3-clause
45,988
# -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # 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, dist...
bl4ckdu5t/registron
tests/interactive/test_pyqt4.py
Python
mit
1,490
# coding: utf-8 from __future__ import absolute_import import flask import auth import config import model import util from main import app twitter_config = dict( access_token_url='https://api.twitter.com/oauth/access_token', authorize_url='https://api.twitter.com/oauth/authorize', base_url='https://api.twit...
gmist/ctm-5studio
main/auth/twitter.py
Python
mit
1,468
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2014 Alex Forencich 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...
elopezga/ErrorRate
ivi/lecroy/lecroyBaseScope.py
Python
mit
71,778
# -*- Mode: Python; py-indent-offset: 4 -*- # pygobject - Python bindings for the GObject library # Copyright (C) 2012 Simon Feltman # # gi/_signalhelper.py: GObject signal binding decorator object # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General ...
yasoob/PythonRSSReader
venv/lib/python2.7/dist-packages/gi/_signalhelper.py
Python
mit
9,776
# LIBRARIES from django.db import models, connections, connection as default_connection from django.db.models.sql.datastructures import EmptyResultSet from django.db.models.query import Q from google.appengine.api import datastore # DJANGAE from djangae.db.backends.appengine.query import transform_query, Query, WhereN...
Ali-aqrabawi/ezclinic
lib/djangae/tests/test_query_transform.py
Python
mit
20,523