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
# pylint: disable=too-many-public-methods """Test for letsencrypt_apache.configurator.""" import os import shutil import socket import unittest import mock from acme import challenges from letsencrypt import achallenges from letsencrypt import errors from letsencrypt.tests import acme_util from letsencrypt_apache ...
goofwear/letsencrypt
letsencrypt-apache/letsencrypt_apache/tests/configurator_test.py
Python
apache-2.0
36,390
# Copyright (c) 2012-2016 Seafile Ltd. import os import re import time import urllib.request, urllib.parse, urllib.error import urllib.parse import requests import hashlib import logging import uuid import posixpath try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET...
miurahr/seahub
seahub/wopi/utils.py
Python
apache-2.0
7,039
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
mahak/neutron
neutron/tests/unit/agent/linux/test_pd.py
Python
apache-2.0
5,483
# Copyright (c) 2019 PaddlePaddle 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 app...
luotao1/Paddle
python/paddle/fluid/tests/unittests/c_comm_init_op.py
Python
apache-2.0
2,478
#!/usr/bin/env python3 # Copyright 2016 The Meson development team # 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 appli...
ernestask/meson
mesonrewriter.py
Python
apache-2.0
1,119
try: import siconos.kernel as SK except (ImportError): print('Could not import Siconos.* module') import numpy class MyR(SK.FirstOrderNonLinearR): # \brief Constructor # # \param is a (optional) def __init__(self, C, B): SK.FirstOrderNonLinearR.__init__(self) self._kappa = ...
bremond/siconos
examples/Control/Zhuravlev/MyR.py
Python
apache-2.0
1,219
import time from pykka import ActorRegistry, ThreadingActor def time_it(func): start = time.time() func() print('%s took %.3fs' % (func.func_name, time.time() - start)) class SomeObject(object): pykka_traversable = False cat = 'bar.cat' def func(self): pass class AnActor(Threadin...
tamland/pykka
tests/performance.py
Python
apache-2.0
1,389
# 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...
deepakgupta1313/models
street/python/nn_ops.py
Python
apache-2.0
9,191
"""Support for WeMo humidifier.""" import asyncio from datetime import timedelta import logging import async_timeout import voluptuous as vol from homeassistant.components.fan import ( SPEED_HIGH, SPEED_LOW, SPEED_MEDIUM, SPEED_OFF, SUPPORT_SET_SPEED, FanEntity, ) from homeassistant.const impo...
postlund/home-assistant
homeassistant/components/wemo/fan.py
Python
apache-2.0
10,476
#!/usr/bin/python # Copyright 2011 Lockheed Martin ''' Script to parse Learning registry data model and validate JSON objects against the parse models. Created on Feb 15, 2011 @author: John Poyau ''' import re, codecs, json, logging from pyparsing import * from os import path log = logging.getLogger(__name__) ...
jimklo/LearningRegistry
LR/lr/lib/model_parser1.py
Python
apache-2.0
27,713
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import absolute_import import os import re import traceback from .printer import print_err, colors from typing import cast, Any, Callable, Dict, List, Optional, Tuple RuleList = List[Dict[str, Any]] # mypy currently requires Aliases at ...
Galexrt/zulip
tools/linter_lib/custom_check.py
Python
apache-2.0
33,023
import contextlib import unittest import pytest from kazoo.client import KazooClient from kazoo.handlers import utils from kazoo.protocol import states as kazoo_states from kazoo.tests import test_client from kazoo.tests import test_lock from kazoo.tests import util as test_util try: import eventlet from eve...
cloudera/hue
desktop/core/ext-py/kazoo-2.8.0/kazoo/tests/test_eventlet_handler.py
Python
apache-2.0
5,757
"""The tests for the Home Assistant HTTP component.""" # pylint: disable=protected-access from ipaddress import ip_address from unittest.mock import patch, mock_open import requests from homeassistant import bootstrap, const import homeassistant.components.http as http from homeassistant.components.http.const import ...
open-homeautomation/home-assistant
tests/components/http/test_ban.py
Python
apache-2.0
3,902
''' @author: quarkonics, SyZhao ''' import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.test_state as test_state import zstacklib.utils.ssh as ssh import os test_stub = test_lib.lib_get_test_stub() test_obj_dict = test_state.TestStateDict() ...
zstackorg/zstack-woodpecker
integrationtest/vm/virt_plus/volume/test_sharable_vol_vm_suspend_resume.py
Python
apache-2.0
6,369
# 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 ...
magic0704/oslo.db
oslo_db/exception.py
Python
apache-2.0
8,109
import functools import operator import uuid from collections import OrderedDict from datetime import date, datetime, time from decimal import Decimal from operator import methodcaller import numpy as np import pandas as pd import pytest import toolz import ibis import ibis.common.exceptions as com import ibis.expr.a...
cpcloud/ibis
ibis/tests/expr/test_value_exprs.py
Python
apache-2.0
40,233
"""Test to verify that Home Assistant core works.""" # pylint: disable=protected-access import asyncio import functools import logging import os import unittest from unittest.mock import patch, MagicMock from datetime import datetime, timedelta from tempfile import TemporaryDirectory import voluptuous as vol import py...
joopert/home-assistant
tests/test_core.py
Python
apache-2.0
36,305
# Copyright (c) 2013 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 agreed to in writ...
crobby/sahara
sahara/api/v11.py
Python
apache-2.0
10,383
# 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...
tongwang01/tensorflow
tensorflow/contrib/learn/python/learn/estimators/dynamic_rnn_estimator.py
Python
apache-2.0
34,039
# 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...
nathanbjenx/cairis
cairis/core/Location.py
Python
apache-2.0
1,304
import urllib import urllib2 import logging import base64 import zlib import bz2 import datetime import re import os import socks import json import cookielib from urllib2 import HTTPError from utils import DictDiffer # Non standard imports, try to reduce if possible import pytz from socksipyhandler import SocksiPyH...
golding/Josefin
python/byteport/clients.py
Python
bsd-2-clause
23,171
# encoding: utf-8 # module pwd # from (built-in) # by generator 1.130 """ This module provides access to the Unix password database. It is available on all Unix versions. Password database entries are reported as 7-tuples containing the following items from the password database (see `<pwd.h>'), in order: pw_name, pw_...
akiokio/centralfitestoque
src/.pycharm_helpers/python_stubs/-1807332816/pwd.py
Python
bsd-2-clause
4,819
#!/usr/bin/env python '''====================================================== Created by: D. Spencer Maughan Last updated: March 2015 File name: angle_estimation_tuner2015.py Organization: RISC Lab, Utah State University ======================================================''' import roslib; ...
riscmaster/risc_maap
risc_estimation/src/angle_estimation_tuner2015.py
Python
bsd-2-clause
3,514
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import io import os import warnings from nose.plugins.attrib import attr import numpy as np from matplotlib.testing.decorators import (image_comparison, ...
unnikrishnankgs/va
venv/lib/python3.5/site-packages/matplotlib/tests/test_image.py
Python
bsd-2-clause
24,569
# Copyright 2008-2009 Owen Taylor # # This file is part of Reinteract and distributed under the terms # of the BSD license. See the file COPYING in the Reinteract # distribution for full details. # ######################################################################## import os import gobject import gtk import pang...
johnrizzo1/reinteract
lib/reinteract/worksheet_editor.py
Python
bsd-2-clause
3,514
""" Fast Lomb-Scargle Algorithm, following Press & Rybicki 1989 """ from __future__ import print_function, division __all__ = ['LombScargleFast'] import warnings import numpy as np from .lomb_scargle import LombScargle # Precomputed factorials FACTORIALS = [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800] ...
moreati/gatspy
gatspy/periodic/lomb_scargle_fast.py
Python
bsd-2-clause
14,611
# -*- coding: utf-8 -*- # pylint: disable-msg=E1101,W0612 from copy import copy, deepcopy from warnings import catch_warnings import pytest import numpy as np import pandas as pd from pandas.core.dtypes.common import is_scalar from pandas import (Series, DataFrame, Panel, date_range, Panel4D, ...
zfrenchee/pandas
pandas/tests/generic/test_generic.py
Python
bsd-3-clause
35,620
"""Tests for mool.common.utils.hive_reducer_shim.""" import common.utils.hive_reducer_shim as hive_reducer_shim TEST_OUTPUT_KEY = 'key_count' class _MemStdout(object): """In memory mockup of sys.stdout.""" def __init__(self): """Initializer.""" self.data = [] def write(self, text): ...
jkumarrf/mool
code_root/common/utils/hive_reducer_shim_test.py
Python
bsd-3-clause
3,010
http_response_codes = { 100: 'Continue', 101: 'Switching Protocols', 200: 'OK', 201: 'Created', 202: 'Accepted', 203: 'Non-Authoritative Information', 204: 'No Content', 205: 'Reset Content', 206: 'Partial Content', 300: 'Multiple Choices', 301: 'Moved Permanently', 302: ...
akatrevorjay/python-icap
icap/errors.py
Python
bsd-3-clause
2,962
# -*- coding: utf-8 -*- """ Display system RAM and CPU utilization. Configuration parameters: - format: output format string - high_threshold: percent to consider CPU or RAM usage as 'high load' - med_threshold: percent to consider CPU or RAM usage as 'medium load' Format of status string placeholders: ...
goto-bus-stop/py3status
py3status/modules/sysdata.py
Python
bsd-3-clause
5,528
import argparse import sys import os mSpeed = None inoffx = 0 inoffy = 0 inoffz = 0 inscalex = 1 inscaley = 1 inscalez = 1 outoffx = 0 outoffy = 0 outoffz = 0 outscalex = 1 outscaley = 1 outscalez = 1 parser = argparse.ArgumentParser( description='Rescale and offset a gcode file' ) parser.add_argument( "infilename"...
DweebsUnited/CodeMonkey
ToPeeCAAAW/adapter.py
Python
bsd-3-clause
5,008
""" Defines the publicly accessible items of the Chaco API. """ # This just imports the key datamodel classes into the top-level package # namespace for convenience. from base import NumericalSequenceTrait, PointTrait, ImageTrait, DimensionTrait, \ SortOrderTrait, bin_search, reverse_map_1d, right_shi...
burnpanck/chaco
chaco/api.py
Python
bsd-3-clause
4,151
import numpy as np import scipy as sp import nibabel as nib import numpy.linalg as npl from numpy.testing import (assert_array_equal, assert_array_almost_equal, assert_almost_equal, assert_equal, assert_raises) f...
nilgoyyou/dipy
dipy/align/tests/test_imaffine.py
Python
bsd-3-clause
27,426
#!/usr/bin/env python # # Copyright (C) 2013-2014 Mikkel Krautz <mikkel@krautz.dk> # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # - Redistributions of source code must retain the above co...
ccpgames/mumble-releng
tools/sign-msi.py
Python
bsd-3-clause
14,679
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: device/platform_id.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflectio...
endlessm/chromium-browser
third_party/chromite/api/gen/device/platform_id_pb2.py
Python
bsd-3-clause
2,068
# coding=utf-8 # Copyright 2021 TF.Text 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 law or ag...
scheib/chromium
third_party/tensorflow-text/src/tensorflow_text/python/ops/item_selector_ops.py
Python
bsd-3-clause
13,999
""" WSGI config for core project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS...
manti-by/POD
app/core/wsgi.py
Python
bsd-3-clause
389
from .models import * #from .forms import * from .views import * #from .constants import *
team294/surfmanage
surfmanage/hours/__init__.py
Python
bsd-3-clause
91
""" Plugin for probing snmp """ from framework.dependency_management.dependency_resolver import ServiceLocator DESCRIPTION = " SNMP Probing " def run(PluginInfo): resource = ServiceLocator.get_component("resource").GetResources('BruteSnmpProbeMethods') return ServiceLocator.get_component("plugin_helper").C...
DarKnight24/owtf
plugins/network/bruteforce/snmp@PTES-010.py
Python
bsd-3-clause
383
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging, os.path, unittest from twisted.internet import reactor from scrapy.exceptions import CloseSpider from scraper.models import Event from scraper.scraper_test import EventSpider, ScraperTest from dynamic_scraper.models import SchedulerRunti...
DeanSherwin/django-dynamic-scraper
tests/scraper/scraper_run_test.py
Python
bsd-3-clause
10,199
#!/usr/bin/env python import time import sys file_template = """ /* generated on %(when)s */ enum _oursqlx_exception_type _oursqlx_exc_from_errno(int err) { switch (err) { %(code)s default: if (err >= ER_ERROR_FIRST && err <= ER_ERROR_LAST) return _oursqlx_ProgrammingError; ...
LukeCarrier/py3k-oursql
exception_generator.py
Python
bsd-3-clause
5,791
# (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...
e-gob/plataforma-kioscos-autoatencion
scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/plugins/action/__init__.py
Python
bsd-3-clause
46,433
import llvm.core as llc from llvm.core import Builder, ATTR_NO_CAPTURE #, Module from llvm.core import Type as lltype from .. import config, prims, syntax from .. analysis import may_escape from .. ndtypes import BoolT, FloatT, SignedT, UnsignedT, ScalarT, NoneT, Float64 from .. ndtypes import Int32, Int64, PtrT, ...
pombredanne/parakeet
parakeet/llvm_backend/compiler.py
Python
bsd-3-clause
21,947
########################## LICENCE ############################### # Copyright (c) 2005-2012, Michele Simionato # 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 so...
teonlamont/mne-python
mne/externals/decorator.py
Python
bsd-3-clause
10,716
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.. :changelog:', ...
transientlunatic/pulsar_telescope
setup.py
Python
bsd-3-clause
1,685
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larson.eric.d@gmail.com> # Jaakko Leppakangas <jaeilepp@student.jyu.fi> # Daniel McCloy <dan@mccloy.info> # # ...
mne-tools/mne-python
mne/viz/tests/test_epochs.py
Python
bsd-3-clause
17,192
def calculate_total(books): pass
mweb/python
exercises/book-store/book_store.py
Python
mit
37
class Solution(object): def lexicalOrder(self, n): """ :type n: int :rtype: List[int] """ lst = [] def dfs(lst, k): if k <= n: lst.append(k) p = 10 * k if p <= n: for i in range(10): ...
Mlieou/oj_solutions
leetcode/python/ex_386.py
Python
mit
445
# This file is part of beets. # Copyright 2013, Adrian Sampson. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, ...
google-code-export/beets
beets/plugins.py
Python
mit
11,680
'''This module will configure and initialize the database using the SQLAlchemy ORM. We only need to run this script once per database creation. ''' from os.path import dirname, abspath, join from <your_app_name> import db #for the config section _cwd = dirname(abspath(__file__)) SQLALCHEMY_DATABASE_URI = 'sqlit...
razzius/PyClassLessons
instructors/course-2015/flask-cont/examples/snippets/init_db.py
Python
mit
491
import image_registration from image_registration.fft_tools import * from pylab import * noise_taper = True imsize=100 xsh=3.75 ysh=1.2 image = image_registration.tests.make_extended(imsize) offset_image_taper = image_registration.tests.make_offset_extended(image, xsh, ysh, noise=0.5, noise_taper=True) offset_image = ...
dattalab/d_code
imaging/alignment/image_registration/image_registration/tests/debug_test.py
Python
mit
6,355
# View more python learning tutorial on my Youtube and Youku channel!!! # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg # Youku video tutorial: http://i.youku.com/pythontutorial import threading #def main(): # print(threading.active_count()) # print(threading.enumerate()) # s...
wangwei7175878/tutorials
threadingTUT/thread2_add_thread.py
Python
mit
582
# -*- coding: utf-8 -*- """ .. module:: test_auth """ from django.conf import settings from django.test import Client from django.test import TestCase from apps.volontulo.tests import common class TestLogout(TestCase): """Class responsible for testing user logout view.""" @classmethod def setUpTestDat...
magul/volontulo
backend/apps/volontulo/tests/views/test_auth.py
Python
mit
1,268
#!/usr/bin/env python """Distutils setup file, used to install or test 'setuptools'""" import sys import os import textwrap # Allow to run setup.py from another directory. os.chdir(os.path.dirname(os.path.abspath(__file__))) src_root = None from distutils.util import convert_path command_ns = {} init_path = convert...
aldryn/heroku-buildpack-python
vendor/setuptools-1.1/setup.py
Python
mit
8,560
# coding=utf-8 __author__ = 'Yuheng Chen' from Request.Request import Request import Handler.Handler from Logger.Logger import baseLogger from Handler.Handler import BaseHandler import urls from tornado.iostream import StreamClosedError class Connection(object): ''' Connection is the base Class for server an...
SergioChan/SCTornado-TCP
Server/Connection/Connection.py
Python
mit
1,792
#!/usr/bin/python import urllib2 import os import sys import time if len(sys.argv) != 3: print "USAGE: fetch_genome.py <genome_id_list> <out_dir>" sys.exit(1) url_template = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&id=%s&rettype=gb&retmode=text" os.mkdir(sys.argv[2]) l_failed...
soil-microbiome/refsoil
scripts/downloading-genomes/fetch-genomes-gbk.py
Python
mit
1,535
#!/usr/bin/env python3 # Copyright (c) 2016-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 label RPCs. RPCs tested are: - getaccountaddress - getaddressesbyaccount/getaddressesbyla...
rawodb/bitcoin
test/functional/wallet_labels.py
Python
mit
10,814
from .types import Timestamp, Namespace __version__ = "0.4.18"
mediawiki-utilities/python-mediawiki-utilities
mw/__init__.py
Python
mit
64
from orator.orm import Factory factory = Factory()
kreopt/aioweb
test_project/tests/factories/__init__.py
Python
mit
51
# -*- coding: utf-8 -*- """ *************************************************************************** self.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **********************************...
nextgis/NextGIS_QGIS_open
python/plugins/processing/algs/gdal/warp.py
Python
gpl-2.0
7,116
# This file is part of Buildbot. Buildbot 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 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
tardyp/buildbot
master/buildbot/test/unit/www/test_service.py
Python
gpl-2.0
10,379
""" Unit tests for layout functions. """ import sys from nose import SkipTest from nose.tools import assert_equal import networkx as nx class TestLayout(object): numpy=1 # nosetests attribute, use nosetests -a 'not numpy' to skip test @classmethod def setupClass(cls): global numpy tr...
ChristianKniep/QNIB
serverfiles/usr/local/lib/networkx-1.6/networkx/drawing/tests/test_layout.py
Python
gpl-2.0
1,871
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at yo...
lnielsen/invenio
invenio/modules/scheduler/tasklets/bst_send_email.py
Python
gpl-2.0
3,060
#!/usr/bin/python import baseclass import unittest from mock import acceptance class LVMTestCase(baseclass.DevicelibsTestCase): def testLVM(self): _LOOP_DEV0 = self._loopMap[self._LOOP_DEVICES[0]] _LOOP_DEV1 = self._loopMap[self._LOOP_DEVICES[1]] import storage.devicelibs.lvm as lvm ...
kalev/anaconda
tests/storage_test/devicelibs_test/lvm_test.py
Python
gpl-2.0
7,068
#!/usr/bin/env python import sys, os.path, json # Compare the esptool stub loaders to freshly built ones # in the build directory # # (Used by Travis to verify the stubs are up to date.) if __name__ == "__main__": same = True sys.path.append("..") import esptool old_8266_stub = esptool.ESP8266ROM.STU...
LongHairedHacker/esptool
flasher_stub/compare_stubs.py
Python
gpl-2.0
858
""" Copyright 2008-2012 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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 l...
glneo/gnuradio-davisaf
grc/python/Port.py
Python
gpl-3.0
7,385
from questions import * class Question(RandomizedQuestion): module = __file__ video = 'comparison-test' forum = 10088 title = 'apply the comparison test to analyze convergence' textbook = 'section:comparison-test' def good_enough(self): for i in range(self.cutoff,30): if se...
kisonecat/sequences-and-series
quizzes/applyComparisonTest/__init__.py
Python
gpl-3.0
1,862
# -*- encoding: utf-8 -*- """Test class for the capsule CLI.""" from robottelo.test import CLITestCase class CapsuleTestCase(CLITestCase): """Tests for capsule functionality.""" def provision_through_capsule(self): """@Test: User can provision through a capsule @Feature: Capsules @S...
apagac/robottelo
tests/foreman/cli/test_capsule.py
Python
gpl-3.0
5,242
# -*- coding: utf-8 -*- ''' GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a fre...
CuonDeveloper/cuon
cuon_client/cuon/bin/Cuon.py
Python
gpl-3.0
88,908
# Generated by Django 3.0.7 on 2020-09-04 09:21 import json from django.db import migrations def fix_enforced_checks(apps, schema_editor): Component = apps.get_model("trans", "Component") db_alias = schema_editor.connection.alias for component in Component.objects.using(db_alias).filter( enforce...
nijel/weblate
weblate/trans/migrations/0096_fix_enforced_checks.py
Python
gpl-3.0
774
# (C) British Crown Copyright 2014 - 2016, Met Office # # This file is part of Biggus. # # Biggus is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) a...
pelson/biggus
biggus/tests/unit/init/test_size.py
Python
gpl-3.0
1,978
#!/usr/bin/python # -*- coding: utf8 -*- # 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, or (at your option) any later # version. # # This program is distributed in the hope th...
rubenbalde/pyafipws
wslpg.py
Python
gpl-3.0
203,231
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
chetan51/nupic
examples/opf/experiments/anomaly/temporal/saw_big/description.py
Python
gpl-3.0
14,492
# -*- coding: utf-8 -*- # ##### 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. # # ...
Microvellum/Fluid-Designer
win64-vc/2.78/Python/bin/2.78/scripts/addons_contrib/space_view3d_cursor_control/history.py
Python
gpl-3.0
9,299
# coding=utf-8 __author__ = "Gina Häußge <osd@foosel.net>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' import logging import os import threading import urllib import time import subprocess import fnmatch import datetime import sys import octoprint.util as util from octopr...
StealthMicro/OctoPi-Makerbot
octoprint/timelapse.py
Python
agpl-3.0
8,850
# Copyright 2010-2015 RethinkDB, all rights reserved. import errno import json import numbers import socket import struct import time import ssl import collections try: from importlib import import_module except ImportError: def import_module(name, package=None): # song & dance needed to do relative im...
RubenKelevra/rethinkdb
drivers/python/rethinkdb/net.py
Python
agpl-3.0
22,566
""" URLs for the certificates app. """ from django.conf import settings from django.urls import path, re_path from lms.djangoapps.certificates import views app_name = 'certificates' urlpatterns = [ # Certificates HTML view end point to render web certs by user and course re_path( fr'^user/(?P<user_i...
edx/edx-platform
lms/djangoapps/certificates/urls.py
Python
agpl-3.0
1,240
##################################################################################### # # Copyright (c) Crossbar.io Technologies GmbH # # Unless a separate license agreement exists between you and Crossbar.io GmbH (e.g. # you have purchased a commercial license), the license terms below apply. # # Should you enter ...
NinjaMSP/crossbar
crossbar/adapter/mqtt/_utils.py
Python
agpl-3.0
3,222
""" FramaLibre (It) @website https://framalibre.org/ @provide-api no @using-api no @results HTML @stable no (HTML can change) @parse url, title, content, thumbnail, img_src """ from cgi import escape from lxml import html from searx.engines.xpath import extract_text from searx.url_utils i...
misnyo/searx
searx/engines/framalibre.py
Python
agpl-3.0
2,032
# 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) """Tests various features of :py:class:`spack.util.prefix.Prefix`""" from spack.util.prefix import Prefix def test_pref...
iulian787/spack
lib/spack/spack/test/util/prefix.py
Python
lgpl-2.1
2,216
# 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 PyEphem(PythonPackage): """PyEphem provides an ephem Python package for performing hig...
rspavel/spack
var/spack/repos/builtin/packages/py-ephem/package.py
Python
lgpl-2.1
591
#!/usr/bin/env python from peacock.Input.ExecutableInfo import ExecutableInfo from peacock.Input.InputTree import InputTree import os from peacock.utils import Testing from PyQt5 import QtWidgets class Tests(Testing.PeacockTester): qapp = QtWidgets.QApplication([]) def setUp(self): super(Tests, self)....
Chuban/moose
python/peacock/tests/input_tab/InputTree/test_InputTree.py
Python
lgpl-2.1
5,736
############################################################################## # 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/r-ggrepel/package.py
Python
lgpl-2.1
1,724
# 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 PyPkgconfig(PythonPackage): """Interface Python with pkg-config.""" homepage = "http:...
rspavel/spack
var/spack/repos/builtin/packages/py-pkgconfig/package.py
Python
lgpl-2.1
1,038
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2010 Canonical # # Authors: # Michael Vogt # # 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. # # This program is distribute...
sti-lyneos/shop
softwarecenter/backend/ubuntusso.py
Python
lgpl-3.0
8,443
import os import numpy as np import scipy as sp from scipy import optimize import numpy.linalg as la #import cvxmod as cvxm #import cvxopt as cvxo from string import * from crlb import * class RSSLocation(object): """ A RSSALocation contains: 1- a set of RadioNodes (RN) with associated position accuracie...
buguen/pylayers
pylayers/location/algebraic/rss.py
Python
lgpl-3.0
17,812
# 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...
Laurawly/tvm-1
python/tvm/topi/testing/dilate_python.py
Python
apache-2.0
2,131
# Copyright 2014 PerfKitBenchmarker 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 appli...
AdamIsrael/PerfKitBenchmarker
tests/linux_benchmarks/hpcc_benchmark_test.py
Python
apache-2.0
1,801
# # 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/network/route.py
Python
apache-2.0
24,676
# Copyright 2008-2015 Nokia Solutions and Networks # # 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...
fingeronthebutton/RIDE
src/robotide/widgets/button.py
Python
apache-2.0
992
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is subject to the terms and conditions defined in # file 'LICENSE.md', which is part of this source code package. # from kubernetes_py.models.v1beta1.SubresourceReference import SubresourceReference class HorizontalPodAutoscalerSpec(object): """ ht...
mnubo/kubernetes-py
kubernetes_py/models/v1/HorizontalPodAutoscalerSpec.py
Python
apache-2.0
3,574
from django.core.urlresolvers import resolve from django.http import HttpRequest from django.http import QueryDict from django.test import TestCase from django.test import Client from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout from landpage.views import privacy im...
donnydevito/py-academicstoday
academicstoday_project/landpage/tests/test_privacy.py
Python
apache-2.0
1,156
# """ Functions that define and manipulate images. Images are just data and a World Coordinate System. """ from processing_components.image.iterators import image_null_iter from processing_components.image.iterators import image_raster_iter from processing_components.image.iterators import image_channel_iter
SKA-ScienceDataProcessor/algorithm-reference-library
wrappers/serial/image/iterators.py
Python
apache-2.0
309
# 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/db/migration/alembic_migrations/versions/fuel_5_1.py
Python
apache-2.0
9,013
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('midburn', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='camp', name='moop_co...
Midburn/Midburn-ThemeCamps
midburn/migrations/0002_auto_20151209_1240.py
Python
apache-2.0
613
""" Base class for Pipeline API unittests. """ from functools import wraps from unittest import TestCase from numpy import arange, prod from pandas import date_range, Int64Index, DataFrame from six import iteritems from zipline.finance.trading import TradingEnvironment from zipline.pipeline.engine import SimplePipel...
jimgoo/zipline-fork
tests/pipeline/base.py
Python
apache-2.0
4,053
from base import DatadogBaseAction from datadog import api class DatadogCreateComment(DatadogBaseAction): def _run(self, **kwargs): return api.Comment.create(**kwargs) class DatadogDeleteComment(DatadogBaseAction): def _run(self, **kwargs): return api.Comment.delete(kwargs.pop("comment_id"))...
tonybaloney/st2contrib
packs/datadog/actions/lib/comments.py
Python
apache-2.0
468
# -*- coding: utf-8 -*- import pdb import logging as mod_logging import json as mod_json import oneapi.utils as mod_utils class FieldConverter: def __init__(self, json_field_name=None): self.json_field_name = json_field_name # Filled later while registering the model: self.object_field...
infobip/oneapi-python
oneapi/object.py
Python
apache-2.0
5,935
# Copyright 2013 Centrin Data Systems Ltd. # # 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...
NeCTAR-RC/horizon
openstack_dashboard/dashboards/settings/password/tests.py
Python
apache-2.0
3,206
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
lukecwik/incubator-beam
sdks/python/apache_beam/runners/portability/portable_runner.py
Python
apache-2.0
24,196