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
# 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...
yk5/incubator-airflow
airflow/contrib/kubernetes/kubernetes_request_factory/kubernetes_request_factory.py
Python
apache-2.0
6,584
# # 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 # ...
dims/cinder
cinder/tests/unit/api/contrib/test_volume_type_access.py
Python
apache-2.0
13,838
# Copyright 2016 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...
sbc100/yapf
yapftests/reformatter_pep8_test.py
Python
apache-2.0
17,252
from behave import * import icecream def before_all(context): context.app = icecream.app.test_client() context.icecream = icecream icecream.inititalize_redis()
Cantal0p3/nyu-devops-homework-1
features/environment.py
Python
apache-2.0
173
from gtk import * import sys import gview import string import gvutils import GtkExtra import time import os import gviewapp import gvplot import gdal sys.path.append('.') import ev_profile from quality_hist_tool import QualityHistogramROITool LYR_GENERIC = 0 LYR_LANDSAT8 = 1 LYR_SOURCE_TRACE = 2 LYR...
warmerdam/plcompositor
oev_tools/ev_mosaic_viewer.py
Python
apache-2.0
9,675
from __future__ import unicode_literals from lib2to3.fixer_base import BaseFix from .utils import node_text def get_previous_node(node): """ Return the node before this node. """ if node.prev_sibling: return node.prev_sibling if node.parent: return get_previous_node(node.parent) ...
michaelBenin/pep8ify
pep8ify/fixes/fix_whitespace_before_inline_comment.py
Python
apache-2.0
1,952
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2018, Exa Analytics Development Team # Distributed under the terms of the Apache License 2.0 # # exatomic documentation build configuration file, created by # sphinx-quickstart on Tue Jun 23 21:37:50 2015. # # This file is execfile()d with the current d...
avmarchenko/exatomic
docs/source/conf.py
Python
apache-2.0
13,060
"""Auto-generated file, do not edit by hand. SX metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_SX = PhoneMetadata(id='SX', country_code=None, international_prefix=None, general_desc=PhoneNumberDesc(national_number_pattern='9\\d{2}', possible_length=(3,)), em...
gencer/python-phonenumbers
python/phonenumbers/shortdata/region_SX.py
Python
apache-2.0
548
#!/usr/bin/env python """ @package mi.dataset.parser.test @file mi-dataset/mi/dataset/parser/test/test_fuelcell_eng_dcl.py @author Chris Goodrich @brief Test code for the fuelcell_eng_dcl parser Release notes: initial release """ __author__ = 'cgoodrich' import os from nose.plugins.attrib import attr from mi.core...
petercable/mi-dataset
mi/dataset/parser/test/test_fuelcell_eng_dcl.py
Python
bsd-2-clause
9,992
#!/usr/bin/env python """An example of generating a test database with a large number of semi-randomized responses. This is useful, for example, for reproducing issues that only occur with large caches. """ import logging from datetime import datetime, timedelta from os import urandom from os.path import getsize from r...
reclosedev/requests-cache
examples/generate_test_db.py
Python
bsd-2-clause
4,628
from datetime import timedelta from six import text_type from rest_framework.fields import DurationField from .utils import parse_duration, duration_decimal class DurationField(DurationField): def to_internal_value(self, value): if isinstance(value, timedelta): return value parsed =...
cdubz/timestrap
core/fields.py
Python
bsd-2-clause
593
from rest_framework import serializers as rest_serializers from geotrek.authent import models as authent_models class StructureSerializer(rest_serializers.ModelSerializer): class Meta: model = authent_models.Structure fields = ('id', 'name')
makinacorpus/Geotrek
geotrek/authent/serializers.py
Python
bsd-2-clause
265
"""Compressed Sparse graph algorithms""" __docformat__ = "restructuredtext en" __all__ = ['cs_graph_components'] import numpy as np from sparsetools import cs_graph_components as _cs_graph_components from csr import csr_matrix from base import isspmatrix _msg0 = 'x must be a symmetric square matrix!' _msg1 = _msg...
scipy/scipy-svn
scipy/sparse/csgraph.py
Python
bsd-3-clause
2,341
# Software License Agreement (BSD License) # # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # 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 ...
klmitch/python-jenkins
tests/test_plugins.py
Python
bsd-3-clause
13,759
# Copyright 2010 WebDriver committers # 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 ap...
softak/webfaction_demo
vendor-local/lib/python/selenium/webdriver/remote/errorhandler.py
Python
bsd-3-clause
6,176
import simplejson as json from bamboo.models.dataset import Dataset from bamboo.tests.controllers.test_abstract_datasets_update import\ TestAbstractDatasetsUpdate class TestDatasetsUpdateWithAggs(TestAbstractDatasetsUpdate): def setUp(self): TestAbstractDatasetsUpdate.setUp(self) self._creat...
pld/bamboo
bamboo/tests/controllers/test_datasets_update_with_aggs.py
Python
bsd-3-clause
2,876
#################################################################################$$ # Copyright (c) 2011,2012, Pacific Biosciences of California, Inc. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are...
PacificBiosciences/rDnaTools
src/pbrdna/rDnaResequencer.py
Python
bsd-3-clause
16,747
from __future__ import absolute_import import six import logging from .. import py3_errmsg logger = logging.getLogger(__name__) try: import enaml except ImportError: if six.PY3: logger.exception(py3_errmsg) else: raise else: from .model import (GetLastModel, DisplayHeaderModel, WatchF...
NSLS-II/replay
replay/search/__init__.py
Python
bsd-3-clause
527
# Copyright (c) 2015 - present Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import logging import o...
blzq/infer
infer/lib/python/inferlib/capture/ant.py
Python
bsd-3-clause
2,914
#!/usr/bin/env python3 import argparse import subprocess import os import sys import list_tests import fnmatch parser = argparse.ArgumentParser(add_help = False) parser.add_argument('--colobot-lint-exec', dest='colobot_lint_executable', required=True) parser.add_argument('--debug', dest='debug_flag', action='store_tru...
piotrdz/colobot-lint
Tests/run_tests.py
Python
bsd-3-clause
1,290
from faq.tests.test_admin import * from faq.tests.test_models import * from faq.tests.test_templatetags import * from faq.tests.test_views import *
Kirembu/django-helpline-faq
faq/tests/__init__.py
Python
bsd-3-clause
148
"""Collections of polygons and related utilities """ from ctypes import c_void_p, cast from shapely.geos import lgeos from shapely.geometry.base import BaseMultipartGeometry from shapely.geometry.polygon import Polygon, geos_polygon_from_py from shapely.geometry.proxy import CachingGeometryProxy __all__ = ['MultiPol...
aaronr/shapely
shapely/geometry/multipolygon.py
Python
bsd-3-clause
4,465
from collections import defaultdict from .._compat import PY2, with_metaclass, iteritems, to_unicode, to_bytes, string_types from .._gae import gae from ..helpers._internals import Dispatcher from ..helpers.regex import REGEX_TYPE representers = Dispatcher("representer") class for_type(object): def __init__(self...
web2py/pydal
pydal/representers/__init__.py
Python
bsd-3-clause
8,805
from __future__ import absolute_import, division, print_function from operator import getitem import numpy as np from .core import getarray from ..core import flatten from ..optimize import cull, fuse, inline_functions def optimize(dsk, keys, **kwargs): """ Optimize dask for array computation 1. Cull tas...
mikegraham/dask
dask/array/optimization.py
Python
bsd-3-clause
6,346
""" sentry.web.urls ~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import __all__ = ('urlpatterns',) from django.conf.urls import include, patterns, url from django.conf import settings from ...
nicholasserra/sentry
src/sentry/web/urls.py
Python
bsd-3-clause
18,988
# -*- coding: utf-8 -*- from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("wagtailcore", "0015_add_more_verbose_names"), ] operations = [ migrations.AlterField( model_name="page", name="url_path", field=m...
wagtail/wagtail
wagtail/core/migrations/0016_change_page_url_path_to_text_field.py
Python
bsd-3-clause
442
import sys import numpy from numpy.testing import (assert_, assert_equal, assert_array_equal, assert_array_almost_equal, assert_allclose, suppress_warnings) import pytest from pytest import raises as assert_raises import scipy.ndimage as ndimage from . import type...
WarrenWeckesser/scipy
scipy/ndimage/tests/test_interpolation.py
Python
bsd-3-clause
54,800
## Copyright (c) 2012-2015 Aldebaran Robotics. All rights reserved. ## Use of this source code is governed by a BSD-style license that can be ## found in the COPYING file. project = 'prebuild' master_doc = 'index'
dmerejkowsky/qibuild
python/qidoc/test/projects/world/source/conf.py
Python
bsd-3-clause
214
from django.db import models from pontoon.base.models import Translation class FailedCheck(models.Model): """ Store checks performed on translations if they failed. Severity of failed checks are expressed by subclasses of this model. """ class Library(models.TextChoices): PONTOON = "p",...
mathjazz/pontoon
pontoon/checks/models.py
Python
bsd-3-clause
1,177
class BuildError(Exception): def __init__(self, called_process_error): super(BuildError, self).__init__("Error when building test subject") self.command = called_process_error.lldb_extensions.get( "command", "<command unavailable>") self.build_error = called_process_error.lldb_e...
youtube/cobalt
third_party/llvm-project/lldb/packages/Python/lldbsuite/test_event/build_exception.py
Python
bsd-3-clause
709
""" Implements objects for calling Version APIs """ __author__ = 'Don Thorp' __email__ = 'don@donthorp.net' __since__ = '2012-03-23' import sys from . import api class AppVersions(api.APIRequest): def __init__(self, api_key, app_id): """Create the AppVersions request object for developers. :p...
gmr/hockeyapp
hockeyapp/version.py
Python
bsd-3-clause
4,696
import cPickle as pickle from geventmemcache import MemcacheError class MemcacheCodec(object): def decode(self, flags, encoded_value): assert False, "implement" #pragma: no cover def encode(self, value, flags): assert False, "implement" #pragma: no cover @classmethod def create(self,...
hrosenhorn/gevent-memcache
lib/geventmemcache/codec.py
Python
bsd-3-clause
2,039
import nose def start_response_111(status, headers): for header in headers: if header[0] == 'Content-Type': assert header[1] == 'application/vnd.ogc.wms_xml' assert status == '200 OK' def start_response_130(status, headers): for header in headers: if header[0] == 'Con...
pbabik/OGCServer
tests/testWsgi.py
Python
bsd-3-clause
1,893
#!/usr/bin/env python # 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. import logging import os import pickle import re import simplejson import autofill_dataset_converter import autofill_dataset_gener...
keishi/chromium
chrome/test/functional/autofill.py
Python
bsd-3-clause
41,065
from setuptools import setup, find_packages setup( name='django-vkontakte-groups-statistic', version=__import__('vkontakte_groups_statistic').__version__, description='Django implementation for vkontakte API Groups Statistic', long_description=open('README.md').read(), author='ramusus', author_...
ramusus/django-vkontakte-groups-statistic
setup.py
Python
bsd-3-clause
1,127
""" File Backends ------------------ Provides backends that deal with local filesystem access. """ from __future__ import with_statement from dogpile.cache.api import CacheBackend, NO_VALUE from contextlib import contextmanager from dogpile.cache import compat from dogpile.cache import util import os import fcntl _...
dprince/dogpile.cache
dogpile/cache/backends/file.py
Python
bsd-3-clause
9,009
# # This file is part of python-tdbus. Python-tdbus is free software # available under the terms of the MIT license. See the file "LICENSE" that # was provided together with this source file for the licensing terms. # # Copyright (c) 2012 the python-tdbus authors. See the file "AUTHORS" for a # complete list. from __f...
hmvp/python-tdbus
lib/tdbus/gevent.py
Python
mit
4,066
from ferrisnose import AppEngineWebTest from ferris.core import scaffold from ferris.core.controller import Controller, route from ferris.core.ndb import Model, ndb from ferris.components import pagination, search from ferris.behaviors import searchable from ferris.core import messages class Sprocket(Model): clas...
yowmamasita/social-listener-exam
ferris/tests/test_pagination.py
Python
mit
2,306
#!/usr/bin/env python # -*- coding: utf-8 -*- from . import NeuralLayer from deepy.utils import build_activation, FLOATX import numpy as np import theano import theano.tensor as T from collections import OrderedDict OUTPUT_TYPES = ["sequence", "one"] INPUT_TYPES = ["sequence", "one"] class RNN(NeuralLayer): """ ...
rldotai/deepy
deepy/layers/recurrent.py
Python
mit
6,446
# 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 ...
jeeftor/alfredToday
src/lib/googleapiclient/discovery.py
Python
mit
41,531
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime class Migration(migrations.Migration): dependencies = [ ('depot', '0002_lineitem'), ] operations = [ migrations.CreateModel( name='Order', fie...
kwailamchan/programming-languages
python/django/artdepot/artdepot/depot/migrations/0003_auto_20140930_2137.py
Python
mit
942
# -*- coding: utf-8 -*- # This file is part of the OpenSYMORO project. Please see # https://github.com/symoro/symoro/blob/master/LICENCE for the licence. """ This module contains the functions for the computation of Inertia matrix. """ import sympy from sympy import Matrix from pysymoro.geometry import compute_r...
galou/symoro
pysymoro/inertia.py
Python
mit
7,964
""" For detailed information please see http://shotgunsoftware.github.com/shotgunEvents/api.html Args based shared state ----------------------- This plugin demoes how three callbacks can share state through the args argument to registerCallback. The shared state stores two counters one (sequential) will be increm...
Nvizible/shotgunEvents
src/examplePlugins/sharedStateB.py
Python
mit
2,306
import re import sys import types import unittest import inspect import linecache import datetime import collections import os import shutil from os.path import normcase from test.support import run_unittest, TESTFN, DirsOnSysPath from test import inspect_fodder as mod from test import inspect_fodder2 as mod2 # C mo...
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.3.0/Lib/test/test_inspect.py
Python
mit
87,813
# encoding: utf-8 # # Copyright (c) 2014 Dean Jackson <deanishe@deanishe.net> # # MIT Licence. See http://opensource.org/licenses/MIT # # Created on 2014-02-15 # """ The :class:`Workflow` object is the main interface to this library. See :ref:`setup` in the :ref:`user-manual` for an example of how to set up your Pyth...
mixdesign/radioice-track
workflow/workflow.py
Python
mit
75,352
# -*- coding: utf-8 -*- """ Created on Mon Jul 27 15:38:51 2015 Function for creating dummy boundary map datas for use with extrapolator routines. @author: alex_ """ import numpy as np import math import matplotlib.pyplot as plt import random import sunpy.map as mp import re from astropy import units as u from datet...
Alex-Ian-Hamilton/solarbextrapolation
solarbextrapolation/example_data_generator.py
Python
mit
7,504
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'acq4/analysis/modules/MapImager/SpatialCorrelatorCtrlTemplate.ui' # # Created by: PyQt5 UI code generator 5.8.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): ...
pbmanis/acq4
acq4/analysis/modules/MapImager/SpatialCorrelatorCtrlTemplate_pyqt5.py
Python
mit
5,266
"""bubble - re-emit a log record with superdomain | bubble [field=host] [parts=3] adds 'superhost' field """ import sys,splunk.Intersplunk import re ipregex = r"(?P<ip>((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\.){3}(25[0-5]|2[0-4]\d|[01]\d\d|\d?\d))" ip_rex = re.compile(ipregex) def super_domain(host, output_parts)...
JustinAzoff/splunk-scripts
bubble.py
Python
mit
1,305
""" Given a collection of integers that might contain duplicates, nums, return all possible subsets. Note: The solution set must not contain duplicate subsets. For example, If nums = [1,2,2], a solution is: [ [2], [1], [1,2,2], [2,2], [1,2], [] ] """ def subsets_unique(nums): def backtrack(res, nu...
HoussemCharf/FunUtils
backtrack/subsets_unique.py
Python
mit
683
#!/usr/bin/env python3 # Copyright (c) 2017 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 the listsincelast RPC.""" from test_framework.test_framework import PivxTestFramework from test_framew...
Mrs-X/Darknet
test/functional/wallet_listsinceblock.py
Python
mit
9,552
from theano import tensor from theano.tensor.nnet import conv2d def weights_std(weights, mask_outputs=None): positions = tensor.arange(weights.shape[2]) expected = (weights * positions).sum(axis=2) expected2 = (weights * positions ** 2).sum(axis=2) result = (expected2 - expected ** 2) ** 0.5 if mas...
rizar/attention-lvcsr
lvsr/expressions.py
Python
mit
2,325
# The contents of this file are subject to the BitTorrent Open Source License # Version 1.0 (the License). You may not copy or use this file, in either # source code or executable form, except in compliance with the License. You # may obtain a copy of the License at http://www.bittorrent.com/license/. # # Software di...
rabimba/p2pScrapper
BitTorrent-5.2.2/BitTorrent/MultiTorrent.py
Python
mit
34,318
from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt map = Basemap(llcrnrlon=-10.5,llcrnrlat=33,urcrnrlon=10.,urcrnrlat=46., resolution='i', projection='cass', lat_0 = 39.5, lon_0 = 0.) map.shadedrelief() map.drawcoastlines() plt.show()
rveciana/BasemapTutorial
code_examples/backgrounds/shadedrelief.py
Python
cc0-1.0
273
# jhbuild - a tool to ease building collections of source packages # Copyright (C) 2001-2006 James Henstridge # Copyright (C) 2007 Marco Barisione <marco@barisione.org> # # hg.py: some code to handle various Mercurial operations # # This program is free software; you can redistribute it and/or modify # it under the...
silvermagic/jhbuild
jhbuild/versioncontrol/hg.py
Python
gpl-2.0
4,401
# Sample script for loading volume data. import voreen # usage: voreen.loadVolume(filepath, [name of VolumeSource processor]) voreen.loadVolume(voreen.getBasePath() + "/data/volumes/nucleon.dat", "VolumeSource")
Elima85/bccfccraycaster
data/scripts/loadvolume.py
Python
gpl-2.0
213
from __future__ import absolute_import, division, print_function, unicode_literals import re from qtpy.QtCore import Qt from qtpy.QtCore import QEvent from qtpy.QtCore import Signal from qtpy.QtGui import QMouseEvent from qtpy.QtGui import QSyntaxHighlighter from qtpy.QtGui import QTextCharFormat from qtpy.QtGui impor...
living180/git-cola
cola/widgets/spellcheck.py
Python
gpl-2.0
4,103
# 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 distributed in the hope that it will be useful, # but...
goodwinos/sos
sos/plugins/gdm.py
Python
gpl-2.0
1,110
# -*- coding: utf-8 -*- """ *************************************************************************** ModelerScene.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **************************...
innotechsoftware/Quantum-GIS
python/plugins/sextante/modeler/ModelerScene.py
Python
gpl-2.0
6,731
"""A simple hook that only prints a user-specified message""" from PyFoam.Infrastructure.RunHook import RunHook from PyFoam.ThirdParty.six import print_ class PrintMessageHook(RunHook): """Print a small message""" def __init__(self,runner,name): RunHook.__init__(self,runner,name) self.message...
takaakiaoki/PyFoam
PyFoam/Infrastructure/RunHooks/PrintMessageHook.py
Python
gpl-2.0
443
from zkpylons.tests.functional import * class TestTemplateController(ControllerTest): """Tests the Template controller and wiki integration.""" # Implementation def setUp(self): super(TestTemplateController, self).setUp() self.logged_in = False # create a user self.p = m...
jhesketh/zookeepr
zkpylons/tests/functional/test_template.py
Python
gpl-2.0
2,064
# # (c) 2015, Peter Sprygada <psprygada@ansible.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) any late...
hkariti/ansible
lib/ansible/utils/module_docs_fragments/iosxr.py
Python
gpl-3.0
3,401
# -*- coding: utf-8 -*- import pandas as pd import os import os.path as path import logging from oemof import network from oemof.solph import EnergySystem from oemof.solph.options import BinaryFlow, Investment from oemof.solph.plumbing import sequence from oemof.solph.network import (Bus, Source, Sink, Flow, LinearTra...
rl-institut/reegis_hp
reegis_hp/de21/scenario_tools.py
Python
gpl-3.0
22,415
""" parser.http.searchCharacterParser module (imdb package). This module provides the HTMLSearchCharacterParser class (and the search_character_parser instance), used to parse the results of a search for a given character. E.g., when searching for the name "Jesse James", the parsed page would be: http://akas.imdb....
nopjmp/SickRage
lib/imdb/parser/http/searchCharacterParser.py
Python
gpl-3.0
2,808
import numpy from numina.array.bpm import process_bpm_median def test_process_bpm(): data = numpy.zeros((10, 10), dtype='float32') + 3.0 mask = numpy.zeros((10, 10), dtype='int32') mask[3,3] = 1 result1 = process_bpm_median(data, mask) assert result1[3,3] == 3.0 result2, subs2 = process_...
guaix-ucm/numina
numina/array/tests/test_bpm.py
Python
gpl-3.0
1,012
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ################################################################################ # # Copyright (C) 2014 Daniel Rodriguez # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
mementum/deldosdevices
src/utils/widgets/lctrlsort.py
Python
gpl-3.0
3,371
# coding=utf-8 # Author: Ludovic Reenaers <ludovic.reenaers@gmail.com> # # URL: https://sickrage.github.io # # This file is part of SickRage. # # SickRage 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...
jackkiej/SickRage
sickbeard/providers/torrent9.py
Python
gpl-3.0
4,474
# assign inputs _skymtx, _analysisGrids, _analysisType_, _vmtxPar_, _dmtxPar_, reuseVmtx_, reuseDmtx_ = IN analysisRecipe = None #import honeybee #reload(honeybee.radiance.recipe.daylightcoeff.gridbased) #reload(honeybee.radiance.recipe.threephase.gridbased) #reload(honeybee.radiance.recipe.fivephase.gridbased) try: ...
ladybug-analysis-tools/honeybee-plus
plugin/src/fivephasegbrecipe_node.py
Python
gpl-3.0
906
import math import copy import random import pafy from . import g, c, config from .util import getxy, fmt_time, uea_pad, yt_datetime, F try: import qrcode import io HAS_QRCODE = True except ImportError: HAS_QRCODE = False # In the future, this could support more advanced features class Content: ...
jas32096/mps-youtube
mps_youtube/content.py
Python
gpl-3.0
8,740
""" pystrix.ami.dahdi ================= Provides classes meant to be fed to a `Manager` instance's `send_action()` function. Specifically, this module provides implementations for features specific to the DAHDI technology. Legal ----- This file is part of pystrix. pystrix is free software; you can redistribute it ...
nhtdata/pystrix
pystrix/ami/dahdi.py
Python
gpl-3.0
3,238
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino # # The licence is in the file __manifest__.py # ###################...
eicher31/compassion-modules
logging_compassion/wizards/subscribe_logs.py
Python
agpl-3.0
789
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2013 jmesteve All Rights Reserved # https://github.com/jmesteve # <jmesteve@me.com> # # This program is...
syci/ingadhoc-odoo-addons
warning_box/__openerp__.py
Python
agpl-3.0
1,526
# -*- coding: utf-8 -*- # Copyright(C) 2013 Julien Veyssier # # This file is part of weboob. # # weboob 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...
blckshrk/Weboob
weboob/capabilities/recipe.py
Python
agpl-3.0
6,695
#!/usr/bin/env python import unittest from test import test_support import socket import urllib import sys import os import time mimetools = test_support.import_module("mimetools", deprecated=True) def _open_with_retry(func, host, *args, **kwargs): # Connecting to remote hosts is flaky. Make it...
alanjw/GreenOpenERP-Win-X86
python/Lib/test/test_urllibnet.py
Python
agpl-3.0
8,057
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 Cubic ERP - Teradata SAC (<http://cubicerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the ...
Jgarcia-IAS/SAT
openerp/addons-extra/odoo-pruebas/odoo-server/addons-extra/account_transfer_advance/sale.py
Python
agpl-3.0
1,249
# # This file is part of Plinth. # # 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. # # This program is distribute...
harry-7/Plinth
plinth/modules/snapshot/__init__.py
Python
agpl-3.0
1,992
from tendrl.commons.message import Message as CommonMessage from tendrl.commons import objects class ClusterMessage(objects.BaseObject, CommonMessage): internal = True def __init__(self, **cluster_message): self._defs = {} CommonMessage.__init__(self, **cluster_message) objects.BaseO...
Tendrl/node_agent
tendrl/node_agent/objects/cluster_message/__init__.py
Python
lgpl-2.1
790
#!/usr/bin/env python # Copyright (c) 2002-2005 ActiveState Corp. # See LICENSE.txt for license details. # Author: # Trent Mick (TrentM@ActiveState.com) # # Home: # http://trentm.com/projects/which/ # http://code.google.com/p/which/ # # Copyright (c) 2002-2005 ActiveState Corp. # # Permission is hereby granted, f...
thiagoss/transmageddon
src/which.py
Python
lgpl-2.1
13,269
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
TheTimmy/spack
var/spack/repos/builtin/packages/py-coverage/package.py
Python
lgpl-2.1
1,639
from ..utility import expfit from unittest import TestCase import numpy as np class Test_expfit(TestCase): """ Tests for the expfit module. """ def test_expfit_returns_correct_relationship(self): """ Test whether or not expfit can model a simple one variable exponential relationship. ...
josephhardinee/PyDisdrometer
pydsd/tests/test_expfit.py
Python
lgpl-2.1
2,668
# Copyright (C) 2015 Brent Baude <bbaude@redhat.com> # Copyright (C) 2015 Red Hat Inc., Durham, North Carolina. # # 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 of the...
pthierry38/openscap-daemon
openscap_daemon/cve_scanner/scanner_error.py
Python
lgpl-2.1
913
#!/usr/bin/env python def pos_neg(a, b, negative): if negative: return a < 0 and b < 0 else: return (a < 0 and b > 0) or (a > 0 and b < 0) if __name__ == "__main__": # run some tests if run as script # (from the codingbat site -- not all, I got bored) assert pos_neg(1, -1, False) ...
weidnem/IntroPython2016
Solutions/Session01/codingbat/Warmup-1/pos_neg.py
Python
unlicense
736
from opentrons import instruments, containers, robot metadata = { 'protocolName': 'Testosaur', 'author': 'Opentrons <engineering@opentrons.com>', 'description': 'A variant on "Dinosaur" for testing', 'source': 'Opentrons Repository' } p200rack = containers.load('tiprack-200ul', '5', 'tiprack') # crea...
Opentrons/labware
api/tests/opentrons/data/testosaur-gen2.py
Python
apache-2.0
767
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
kevinlee12/oppia
core/tests/build_sources/extensions/base.py
Python
apache-2.0
10,783
# 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...
cpcloud/arrow
python/pyarrow/util.py
Python
apache-2.0
5,001
from build.management.commands.build_drugs import Command as BuildDrugs class Command(BuildDrugs): pass
cmunk/protwis
build_gpcr/management/commands/build_drugs.py
Python
apache-2.0
109
#!/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/RJL/Kamaelia/Community/RJL/Kamaelia/Protocol/HTTP/ErrorPages.py
Python
apache-2.0
3,275
#!/usr/bin/env python # # Copyright 2011 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...
rolepoint/appengine-mapreduce
python/src/mapreduce/mapper_pipeline.py
Python
apache-2.0
5,046
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Run the acceptance tests. """ import sys import os import yaml import json from pipes import quote as shell_quote from tempfile import mkdtemp from zope.interface import Interface, implementer from characteristic import attributes from eliot import add_...
achanda/flocker
admin/acceptance.py
Python
apache-2.0
32,426
# Copyright 2011 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 a...
Juniper/nova
nova/api/openstack/compute/rescue.py
Python
apache-2.0
4,187
from mpmath.libmp import * from mpmath import * import random
nsalomonis/AltAnalyze
stats_scripts/mpmath/tests/test_mpmath.py
Python
apache-2.0
62
#!/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/RJL/Packages/Examples/P2PStreamPeer/p2pstreampeer.py
Python
apache-2.0
10,507
"""Provides device automations for Fan.""" from __future__ import annotations import voluptuous as vol from homeassistant.components.automation import AutomationActionType from homeassistant.components.device_automation import toggle_entity from homeassistant.const import CONF_DOMAIN from homeassistant.core import CA...
kennedyshead/home-assistant
homeassistant/components/fan/device_trigger.py
Python
apache-2.0
1,252
""" This library is a wrapper of ftplib. It is convenient to move data from/to FTP. There is an example on how to use it (example/ftp_experiment_outputs.py) You can also find unittest for each class. Be aware that normal ftp do not provide secure communication. """ import os import random import ftplib import luigi ...
cpcloud/luigi
luigi/contrib/ftp.py
Python
apache-2.0
6,802
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import difflib from pants.engine.target import RegisteredTargetTypes from pants.engine.unions import UnionMembership from pants.help.help_info_extracter import HelpInfoExtracter from pant...
benjyw/pants
src/python/pants/help/flag_error_help_printer.py
Python
apache-2.0
2,804
# coding:utf-8 from nose.tools import * from mock import * from flanker.mime.message.headers import encodedword from flanker import utils from flanker.mime.message import errors, charsets def encoded_word_test(): def t(value): m = encodedword.encodedWord.match(value) return (m.group('charset'), m...
ad-m/flanker
tests/mime/message/headers/encodedword_test.py
Python
apache-2.0
7,339
"""Generate config flow file.""" import json from typing import Dict from .model import Config, Integration BASE = """ \"\"\"Automatically generated by hassfest. To update, run python3 -m script.hassfest \"\"\" # fmt: off FLOWS = {} """.strip() def validate_integration(integration: Integration): """Validate ...
leppa/home-assistant
script/hassfest/config_flow.py
Python
apache-2.0
2,621
# 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...
YanTangZhai/tf
tensorflow/python/kernel_tests/xent_op_test.py
Python
apache-2.0
5,860
# Copyright 2014 Mirantis, 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 ...
koder-ua/nailgun-fcert
nailgun/nailgun/test/unit/test_deployment_serializer.py
Python
apache-2.0
4,224
# Copyright 2014 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, s...
jonparrott/gcloud-python
core/google/cloud/_testing.py
Python
apache-2.0
3,434
''' pluginPackages test case (c) Copyright 2012 Mark V Systems Limited, All rights reserved. ''' def foo(): print ("imported packaged plug-in relative subdir imported 1.1/1") __pluginInfo__ = { 'name': 'Package Relative Import 1.1/1', 'version': '0.9', 'description': "This is a packaged rela...
sternshus/Arelle
arelle/examples/plugin/packagedImportTest/subdir/importTestImported111.py
Python
apache-2.0
603