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
import unittest from conans.test.utils.tools import TestServer, TestClient from conans.model.ref import ConanFileReference import os from conans.test.utils.cpp_test_files import cpp_hello_conan_files from conans.paths import CONANFILE, CONANFILE_TXT from conans.util.files import load generator = """ from conans.model...
birsoyo/conan
conans/test/generators/custom_generator_test.py
Python
mit
3,848
# filter the store data # remove the redundant store's name import csv import re import unicodedata import sys reload(sys) import operator sys.setdefaultencoding("utf-8") root = "/Users/lily/workspace/find_best_mall/yelp_crawler" dir = root + "/dataset" file = dir + "/store.csv" final_file = dir + "/tmp_yelp.csv" def...
rlowrance/find_best_mall
yelp_crawler/filter.py
Python
mit
4,773
import test.support, unittest from test.support import TESTFN, unlink import os, sys class CodingTest(unittest.TestCase): def test_bad_coding(self): module_name = 'bad_coding' self.verify_bad_module(module_name) def test_bad_coding2(self): module_name = 'bad_coding2' self.veri...
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.0/Lib/test/test_coding.py
Python
mit
1,683
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import logging import os from datetime import datetime try: from subvertpy import ra, SubversionException, __version__ from subvertpy.client import Client as SVNClient, api_version, get_config has_svn_backend = (__version__ ...
sgallagher/reviewboard
reviewboard/scmtools/svn/subvertpy.py
Python
mit
10,969
# Time: O(n^2) # Space: O(1) # # Given an array S of n integers, # find three integers in S such that the sum is closest to a given number, target. # Return the sum of the three integers. # You may assume that each input would have exactly one solution. # # For example, given array S = {-1 2 1 -4}, and target = 1. ...
yiwen-luo/LeetCode
Python/3sum-closest.py
Python
mit
1,346
# -*- coding: utf-8 -*- """ Copyright (c) 2012 University of Oxford 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, modif...
benosteen/django-databank
src/frontend/utils/_old/ident_md.py
Python
mit
1,379
import logging import re from lxml import etree import requests from regparser.federalregister import fetch_notice_json from regparser.history.delays import modify_effective_dates from regparser.notice.build import build_notice CFR_BULK_URL = ("http://www.gpo.gov/fdsys/bulkdata/CFR/{year}/title-{title}/" ...
grapesmoker/regulations-parser
regparser/history/annual.py
Python
cc0-1.0
3,599
from collections import namedtuple from constraint import Problem from regparser.tree.depth import markers, rules from regparser.tree.depth.pair_rules import pair_rules from regparser.tree.struct import Node # A paragraph's type, index, depth assignment ParAssignment = namedtuple('ParAssignment', ('typ', 'idx', 'dep...
tadhg-ohiggins/regulations-parser
regparser/tree/depth/derive.py
Python
cc0-1.0
5,957
############################################################################### # This file is part of openWNS (open Wireless Network Simulator) # _____________________________________________________________________________ # # Copyright (C) 2004-2007 # Chair of Communication Networks (ComNets) # Kopernikusstr. 16, D-...
creasyw/IMTAphy
wnsbase/playground/builtins/__init__.py
Python
gpl-2.0
1,457
# -*- coding: utf-8 -*- """ Tests for the pulp.server.db.model module. """ from mock import patch, Mock from mongoengine import ValidationError, DateTimeField, DictField, Document, IntField, StringField from pulp.common import error_codes, dateutils from pulp.common.compat import unittest from pulp.server.exception...
mibanescu/pulp
server/test/unit/server/db/test_model.py
Python
gpl-2.0
22,379
# See utils/checkpackagelib/readme.txt before editing this file. # There are already dependency checks during the build, so below check # functions don't need to check for things already checked by exploring the # menu options using "make menuconfig" and by running "make" with appropriate # packages enabled. import re...
snickl/buildroot-iu
utils/checkpackagelib/lib_mk.py
Python
gpl-2.0
9,279
# The MIT License (MIT) # Copyright (c) 2009 Max Polk # 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, ...
toha10/python-cudet
cudet/flock.py
Python
gpl-2.0
3,884
import httplib2, sys, traceback, cgi from django.http import HttpResponse, HttpResponsePermanentRedirect from django.http import HttpResponseServerError from django.template import Context, loader from autotest.client.shared import utils from autotest.frontend import views_common from autotest.frontend.afe import mode...
nacc/autotest
frontend/afe/views.py
Python
gpl-2.0
2,216
#! /usr/bin/env python """ Script to split a dataset into chunks of equal time """ import argparse from argparse import RawTextHelpFormatter import casacore.tables as pt import numpy as np import sys import os import shutil def main(dataset, blockl, local_dir=None, clobber=True): """ Split dataset into time c...
revoltek/factor
factor/scripts/chunk_by_time.py
Python
gpl-2.0
4,561
from gettext import gettext as _ import logging from pulp.plugins.util.publish_step import PublishStep, UnitPublishStep from pulp_openstack.common import constants from pulp_openstack.common import openstack_utils _logger = logging.getLogger(__name__) class GlancePublisher(PublishStep): """ Openstack Imag...
rbarlow/pulp_openstack
plugins/pulp_openstack/plugins/distributors/glance_publish_steps.py
Python
gpl-2.0
4,901
# Copyright 2001-2009 Brad Chapman. # Revisions copyright 2009-2010 by Peter Cock. # Revisions copyright 2009 by David Winter. # Revisions copyright 2009-2010 by Leighton Pritchard. # All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that ...
updownlife/multipleK
dependencies/biopython-1.65/build/lib.linux-x86_64-2.7/Bio/Emboss/Applications.py
Python
gpl-2.0
53,929
# coding: utf-8 from __future__ import unicode_literals import itertools import json import re from .common import InfoExtractor, SearchInfoExtractor from ..compat import ( compat_urllib_parse, compat_urlparse, ) from ..utils import ( clean_html, unescapeHTML, ExtractorError, int_or_none, ...
lzambella/Qyoutube-dl
youtube_dl/extractor/yahoo.py
Python
gpl-3.0
15,027
# Copyright 2014, 2018, 2019, 2020 Andrzej Cichocki # This file is part of pym2149. # # pym2149 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...
combatopera/pym2149
ymtests/__init__.py
Python
gpl-3.0
707
# ---------------------------------------------------------------------- # Copyright (C) 2012 Numenta Inc. All rights reserved. # # The information and source code contained herein is the # exclusive property of Numenta Inc. No part of this software # may be used, reproduced, stored or distributed in any form, # w...
chetan51/nupic
tests/integration/nupic/opf/opf_checkpoint_test/experiments/non_temporal_multi_step/base.py
Python
gpl-3.0
14,616
#!/usr/bin/env python3 # THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE. # Copyright (C) NIWA & British Crown (Met Office) & Contributors. # # 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...
cylc/cylc
tests/functional/xtriggers/02-persistence/faker_fail.py
Python
gpl-3.0
873
# Copyright (c) 2007 Enough Project. # See LICENSE for details. """The things a keymap does: 1. Pass given keys to 'next' keymap (considered more 'specific') which is stronger/overrides the keymap itself. 2. If the next keymap does not know the key, then it tries to handle it itself according to a map it holds th...
krfkeith/enough
gui/Keymap.py
Python
gpl-3.0
10,827
from utils import common, database from TestCase.MVSTestCase import * class TestAccount(MVSTestCaseBase): roles = () need_mine = False def test_0_new_account(self): '''create new account * 5000''' account_table_file = '/home/%s/.metaverse/mainnet/account_table' % common.get_username() ...
mvs-live/metaverse
test/test-rpc-v3/TestCase/Account/batch_account.py
Python
agpl-3.0
2,352
"""AttributetypeAdmin for Gstudio""" from datetime import datetime from django.forms import Media from django.contrib import admin from django.contrib.auth.models import User from django.utils.html import strip_tags from django.utils.text import truncate_words from django.conf.urls.defaults import url from django.conf...
gnowgi/gnowsys-studio
gstudio/admin/processtype.py
Python
agpl-3.0
16,358
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
sysadminmatmoz/odoo-clearcorp
product_invoice_report/__openerp__.py
Python
agpl-3.0
1,883
# Copyright (C) 2006-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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 of the License, or (a...
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/paramiko/config.py
Python
agpl-3.0
6,517
#! python # Python Serial Port Extension for Win32, Linux, BSD, Jython and .NET/Mono # serial driver for .NET/Mono (IronPython), .NET >= 2 # see __init__.py # # (C) 2008 Chris Liechti <cliechti@gmx.net> # this is distributed under a free software license, see license.txt import clr import System import System.IO.Ports...
madhuni/AstroBox
src/ext/makerbot_pyserial/serialcli.py
Python
agpl-3.0
10,048
"""Deprecated import support. Auto-generated by import_shims/generate_shims.sh.""" # pylint: disable=redefined-builtin,wrong-import-position,wildcard-import,useless-suppression,line-too-long from import_shims.warn import warn_deprecated_import warn_deprecated_import('contentstore.rest_api.v1.tests.test_views', 'cms.d...
eduNEXT/edunext-platform
import_shims/studio/contentstore/rest_api/v1/tests/test_views.py
Python
agpl-3.0
446
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. """ API for Shuup's Dynamic Configuration. Idea of the Dynamic Co...
suutari-ai/shoop
shuup/configuration.py
Python
agpl-3.0
4,388
import os import sys from flask import render_template # load a bunch of environment DEBUG = os.getenv('DEBUG') in ['True', 'true', '1', 'yes'] if DEBUG: SQLALCHEMY_ECHO = True TESTING = os.getenv('TESTING') in ['True', 'true', '1', 'yes'] SQLALCHEMY_DATABASE_URI = os.getenv('SQLALCHEMY_DATABASE_URI') or os.gete...
asm-products/formspree
formspree/settings.py
Python
agpl-3.0
2,551
#!/usr/bin/python """Test of radio buttons in Java's SwingSet2.""" from macaroon.playback import * import utils sequence = MacroSequence() ########################################################################## # We wait for the demo to come up and for focus to be on the toggle button # #sequence.append(WaitForW...
pvagner/orca
test/keystrokes/java/role_radio_button.py
Python
lgpl-2.1
16,318
# 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) class PyVsts(PythonPackage): """Python wrapper around the VSTS APIs.""" homepage = "https://github.com/Microsoft...
iulian787/spack
var/spack/repos/builtin/packages/py-vsts/package.py
Python
lgpl-2.1
623
import unittest import mock import SMBSR import xs_errors import XenAPI import vhdutil import util import errno class FakeSMBSR(SMBSR.SMBSR): uuid = None sr_ref = None mountpoint = None linkpath = None path = None session = None remoteserver = None def __init__(self, srcmd, none): ...
germanop/sm
tests/test_SMBSR.py
Python
lgpl-2.1
3,181
# encoding: utf-8 """ See if we have curses. """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software...
cloud9ers/gurumate
environment/lib/python2.7/site-packages/IPython/utils/cursesimport.py
Python
lgpl-3.0
1,091
# Skipping test_parser and test_all_fixers # because of running from lib2to3.tests import (test_fixers, test_pytree, test_util, test_refactor, test_main as test_main_) import unittest from test.support import run_unittest def suite(): tests = unittest.TestSuite() loader = un...
theheros/kbengine
kbe/res/scripts/common/Lib/test/test_lib2to3.py
Python
lgpl-3.0
604
# Copyright (c) 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
BeyondTheClouds/nova
nova/tests/unit/compute/test_resource_tracker.py
Python
apache-2.0
57,954
""" Functions to solve for antenna/station gain """ from processing_components.calibration.calibration import solve_gaintable
SKA-ScienceDataProcessor/algorithm-reference-library
wrappers/serial/calibration/calibration.py
Python
apache-2.0
127
#!/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...
xiangel/hue
apps/beeswax/src/beeswax/server/dbms.py
Python
apache-2.0
24,355
# 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...
thomasquintana/freepy
tests/fsm_tests.py
Python
apache-2.0
5,402
"""Configuration for ACLs.""" # Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer. # Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd. # Copyright (C) 2015--2019 The Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file e...
REANNZ/faucet
faucet/acl.py
Python
apache-2.0
33,575
"""Test the Uptime Robot init.""" from unittest.mock import patch from pytest import LogCaptureFixture from pyuptimerobot import UptimeRobotAuthenticationException, UptimeRobotException from homeassistant import config_entries from homeassistant.components.uptimerobot.const import ( COORDINATOR_UPDATE_INTERVAL, ...
Danielhiversen/home-assistant
tests/components/uptimerobot/test_init.py
Python
apache-2.0
6,982
# Copyright (c) 2010-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 agree...
kalrey/swift
swift/common/ring/utils.py
Python
apache-2.0
12,405
# -*- coding: utf-8 -*- # Copyright (c) 2009 Las Cumbres Observatory (www.lcogt.net) # Copyright (c) 2010 Jan Dittberner # # 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,...
dgoldin/snakebite
snakebite/channel.py
Python
apache-2.0
26,513
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
pierreg/tensorflow
tensorflow/examples/how_tos/reading_data/fully_connected_preloaded.py
Python
apache-2.0
5,787
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack 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 requir...
ioram7/keystone-federado-pgid2013
tests/test_cert_setup.py
Python
apache-2.0
3,259
# Copyright 2012 Nebula, 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...
rajalokan/nova
nova/api/openstack/compute/flavor_rxtx.py
Python
apache-2.0
1,768
# 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...
fengbeihong/tempest_automate_ironic
tempest/api/volume/test_volume_transfers.py
Python
apache-2.0
4,317
# -*- 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, Version 2.0 (the "Lice...
sparkslabs/kamaelia_
Sketches/JMB/DescartesTCTest/Wsgi/WsgiHandler.py
Python
apache-2.0
10,910
# 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...
resmo/cloudstack
test/integration/plugins/nuagevsp/test_nuage_sharednetwork_vpc_vm_monitor.py
Python
apache-2.0
30,062
"""Support for Nest Thermostat sensors for the legacy API.""" import logging from homeassistant.const import ( CONF_MONITORED_CONDITIONS, DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_TEMPERATURE, PERCENTAGE, STATE_OFF, TEMP_CELSIUS, TEMP_FAHRENHEIT, ) from . import CONF_SENSORS, DATA_NEST, DATA_NES...
sdague/home-assistant
homeassistant/components/nest/sensor_legacy.py
Python
apache-2.0
6,398
# Copyright (c) 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 ...
vijayendrabvs/ssl-neutron
neutron/plugins/ml2/plugin.py
Python
apache-2.0
35,120
from velox_deploy import *
kcompher/velox-modelserver
bin/cluster/fabfile.py
Python
apache-2.0
27
from __future__ import absolute_import, division, print_function, unicode_literals from decimal import Decimal from amaascore.corporate_actions.corporate_action import CorporateAction class Dividend(CorporateAction): def __init__(self, asset_manager_id, corporate_action_id, record_date, dividend_rate, dividend...
amaas-fintech/amaas-core-sdk-python
amaascore/corporate_actions/dividend.py
Python
apache-2.0
1,565
# 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...
ychfan/tensorflow
tensorflow/contrib/nccl/python/ops/nccl_ops_test.py
Python
apache-2.0
6,643
# coding=utf-8 # Copyright 2019 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
googleinterns/lasertagger
tagging_converter_test.py
Python
apache-2.0
4,946
""" VCS Link ######## Copyright (c) 2021 Nordic Semiconductor ASA SPDX-License-Identifier: Apache-2.0 Introduction ============ This Sphinx extension can be used to obtain the VCS URL for a given Sphinx page. This is useful, for example, when adding features like "Open on GitHub" on top of pages. The extension insta...
zephyrproject-rtos/zephyr
doc/_extensions/zephyr/vcs_link.py
Python
apache-2.0
2,232
# -*- coding: utf-8 -*- """ 14. Using a custom primary key By default, Django adds an ``"id"`` field to each model. But you can override this behavior by explicitly adding ``primary_key=True`` to a field. """ from django.conf import settings from django.db import models, transaction, IntegrityError from fields impor...
grangier/django-11599
tests/modeltests/custom_pk/models.py
Python
bsd-3-clause
5,234
from __future__ import absolute_import import abc class MinHashIndexBackendTestMixin(object): __meta__ = abc.ABCMeta @abc.abstractproperty def index(self): pass def test_basic(self): self.index.record("example", "1", [("index", "hello world")]) self.index.record("example", "...
mvaled/sentry
tests/sentry/similarity/backends/base.py
Python
bsd-3-clause
8,478
import numpy as np import pandas.util.testing as tm from pandas import (Series, date_range, DatetimeIndex, Index, RangeIndex, Float64Index) from .pandas_vb_common import setup # noqa class SetOperations(object): goal_time = 0.2 params = (['datetime', 'date_string', 'int', 'strings'], ...
kdebrab/pandas
asv_bench/benchmarks/index_object.py
Python
bsd-3-clause
5,080
#****************************************************************************** # Copyright (C) 2013 Kenneth L. Ho # 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...
grlee77/scipy
scipy/linalg/tests/test_interpolative.py
Python
bsd-3-clause
8,973
#!/usr/bin/env python # -*- coding: utf-8 -*- from pytest import importorskip from translate.convert import po2sub from translate.convert import test_convert from translate.misc import wStringIO from translate.storage import po # Technically subtitles can also use an older gaupol importorskip("aeidon") class Test...
staranjeet/fjord
vendor/packages/translate-toolkit/translate/convert/test_po2sub.py
Python
bsd-3-clause
2,446
# -*- coding: utf-8 -*- # Copyright (C) 2012, Almar Klein # # Visvis is distributed under the terms of the (new) BSD License. # The full license can be found in 'license.txt'. """ Module baseWibjects Defines the Box class and the DraggableBox class. """ import OpenGL.GL as gl from visvis.core import Wibject from v...
pbfy0/visvis
core/baseWibjects.py
Python
bsd-3-clause
5,953
# 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 unittest from telemetry.page import page_set import page_sets class PageSetsUnittest(unittest.TestCase): """Verfies that all the pagesets in th...
timopulkkinen/BubbleFish
tools/perf/page_sets/page_sets_unittest.py
Python
bsd-3-clause
643
from datetime import datetime, timedelta from django.core.files.storage import default_storage as storage import olympia.core.logger from olympia import amo from olympia.activity.models import ActivityLog from olympia.addons.models import Addon from olympia.addons.tasks import delete_addons from olympia.amo.utils imp...
mozilla/olympia
src/olympia/amo/cron.py
Python
bsd-3-clause
3,247
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'mqingyn' __version__ = '1.7.4' version = tuple(map(int, __version__.split('.'))) from settings_manager import settings from webserver import Server, run from exception import ConfigError, ArgumentError from urlhelper import Url, route, include from utils imp...
ListFranz/torngas
torngas/__init__.py
Python
bsd-3-clause
495
from mimetypes import guess_type from django.contrib.syndication.views import Feed from django.utils.feedgenerator import Atom1Feed from django.http import Http404 from django.template import TemplateDoesNotExist, RequestContext, NodeList from ella.core.models import Listing, Category from ella.core.conf import core_...
petrlosa/ella
ella/core/feeds.py
Python
bsd-3-clause
4,034
from __future__ import absolute_import from sentry.testutils import TestCase from .util import invalid_schema from sentry.api.validators.sentry_apps.schema import validate_component class TestImageSchemaValidation(TestCase): def setUp(self): self.schema = { "type": "image", "url"...
mvaled/sentry
tests/sentry/api/validators/sentry_apps/test_image.py
Python
bsd-3-clause
966
"""Test template specific functionality. Make sure tables expose their functionality to templates right. This generally about testing "out"-functionality of the tables, whether via templates or otherwise. Whether a test belongs here or, say, in ``test_basic``, is not always a clear-cut decision. """ from django.temp...
commtrack/commtrack-core
apps/django_tables/tests/test_templates.py
Python
bsd-3-clause
5,249
import json from django.contrib.auth.decorators import user_passes_test try: from django.urls import reverse except ImportError: from django.core.urlresolvers import reverse from django.http import HttpResponse from django.shortcuts import render from crits.core.user_tools import user_can_view_data from crits...
Magicked/crits
crits/dashboards/views.py
Python
mit
14,127
# -*- coding: utf-8 -*- """ pygments.lexers.text ~~~~~~~~~~~~~~~~~~~~ Lexers for non-source code file types. :copyright: 2006-2008 by Armin Ronacher, Georg Brandl, Tim Hatch <tim@timhatch.com>, Ronny Pfannschmidt, Dennis Kaarsemaker, Kuma...
caihaibin/Blog
externals/pygments/lexers/text.py
Python
mit
54,336
import copy from hearthbreaker.tags.base import Status, Action, Aura, Condition, AuraUntil, CardQuery, \ CARD_SOURCE, Effect, Buff, BuffUntil, Amount, Picker, Selector from hearthbreaker.tags.condition import IsSecret from hearthbreaker.tags.selector import AllPicker, ConstantSelector class Give(Action): def ...
Ragowit/hearthbreaker
hearthbreaker/tags/action.py
Python
mit
20,965
#!/usr/bin/env python ############# # CSQ: Consequence|Codons|Amino_acids|Gene|hgnc|Feature|EXON|polyphen|sift|Protein_position|BIOTYPE # missense_variant|gAg/gTg|E/V|ENSG00000188157||ENST00000379370|12/36|probably_damaging(0.932)|deleterious(0.02)|728/2045_protein_coding # nc_transcript_variant|||ENSG00000116254|CHD...
bgossele/geminicassandra
geminicassandra/vep.py
Python
mit
11,612
""" homeassistant.components.sensor.efergy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Monitors home energy use as measured by an efergy engage hub using its (unofficial, undocumented) API. Configuration: To use the efergy sensor you will need to add something like the following to your config/configurati...
teodoc/home-assistant
homeassistant/components/sensor/efergy.py
Python
mit
4,293
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
SUSE/azure-sdk-for-python
azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_protection_policy.py
Python
mit
1,955
# Copyright 2009-2015 MongoDB, 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 writin...
neharejanjeva/techstitution
venv/lib/python2.7/site-packages/pymongo/collection.py
Python
cc0-1.0
104,519
from django.template import loader from regulations.generator.layers.base import InlineLayer from regulations.generator.section_url import SectionUrl from regulations.generator.layers import utils from ..node_types import to_markup_id class DefinitionsLayer(InlineLayer): shorthand = 'terms' data_source = 'te...
18F/regulations-site
regulations/generator/layers/definitions.py
Python
cc0-1.0
1,632
# do some tests here before we import # Right version of Scientific? from ase.test import NotAvailable import os try: import Scientific version = Scientific.__version__.split(".") print 'Found ScientificPython version: ',Scientific.__version__ if map(int,version) < [2,8]: print 'ScientificPython...
JConwayAWT/PGSS14CC
lib/python/multimetallics/ase/test/jacapo/jacapo.py
Python
gpl-2.0
1,380
#!/bin/python import os, subprocess import logging from autotest.client import test from autotest.client.shared import error class perl_Carp_Clan(test.test): """ Autotest module for testing basic functionality of perl_Carp_Clan @author Kumuda G <kumuda.govind@in.ibm.com> ##...
PoornimaNayak/autotest-client-tests
linux-tools/perl_Carp_Clan/perl_Carp_Clan.py
Python
gpl-2.0
1,270
#!/usr/bin/env python # # Copyright (c) 2016 Apple 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: # 1. Redistributions of source code must retain the above copyright # notice, this list o...
teamfx/openjfx-8u-dev-rt
modules/web/src/main/native/Source/JavaScriptCore/Scripts/builtins/builtins_generate_wrapper_implementation.py
Python
gpl-2.0
2,485
# Copyright (c) 2003-2005 Maxim Sobolev. All rights reserved. # Copyright (c) 2006-2007 Sippy Software, Inc. All rights reserved. # # This file is part of SIPPY, a free RFC3261 SIP stack and B2BUA. # # SIPPY is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
samrussell/sippy
sippy/ESipHeaderIgnore.py
Python
gpl-2.0
1,217
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # 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 # w...
nanocell/lsync
python/boto/route53/connection.py
Python
gpl-3.0
13,538
#!/usr/bin/env python #JSON {"lot": "RKS/6-31G(d)", #JSON "scf": "EDIIS2SCFSolver", #JSON "er": "cholesky", #JSON "difficulty": 5, #JSON "description": "Basic RKS DFT example with hyrbid GGA exhange-correlation functional (B3LYP)"} import numpy as np from horton import * # pylint: disable=wildcard-import,unused-w...
QuantumElephant/horton
data/examples/hf_dft/rks_water_hybgga.py
Python
gpl-3.0
3,728
# coding=utf-8 """ InaSAFE Disaster risk assessment tool developed by AusAid and World Bank - **Template Composition Test Cases.** Contact : ole.moller.nielsen@gmail.com .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as publishe...
cchristelis/inasafe
safe/report/test/test_template_composition.py
Python
gpl-3.0
4,573
""" Copyright 2007, 2008, 2009 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...
michaelld/gnuradio
grc/gui/canvas/connection.py
Python
gpl-3.0
8,832
from binary import * from bitcoin import * from client import * from models import * from transaction import * from zmqbase import MAX_UINT32 from twisted.internet import reactor def select_network(network): import config if "test" in network.lower(): config.chain = config.testnet_chain else: ...
cpacia/python-libbitcoinclient
obelisk/__init__.py
Python
agpl-3.0
423
"""station_analytics_update Revision ID: 1cb4253a8bc6 Revises: 2972360b9a6f Create Date: 2014-04-27 13:01:26.309272 """ # revision identifiers, used by Alembic. revision = '1cb4253a8bc6' down_revision = '2972360b9a6f' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('radio_station',...
andaluri/rootio_web
alembic/versions/1cb4253a8bc6_station_analytics_up.py
Python
agpl-3.0
472
from sympy import (Abs, C, Dummy, Max, Min, Rational, Float, S, Symbol, cos, oo, pi, simplify, sqrt, symbols) from sympy.geometry import (Circle, Curve, Ellipse, GeometryError, Line, Point, Polygon, Ray, RegularPolygon, Segment, Triangle, are_si...
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/sympy/geometry/tests/test_geometry.py
Python
agpl-3.0
24,875
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 ChriCar Beteiligungs- und Beratungs- GmbH (<http://www.camptocamp.at>) # # Thi...
VitalPet/c2c-rd-addons
hr_timesheet_product/__openerp__.py
Python
agpl-3.0
1,555
# # Copyright (c) 2001 - 2015 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge...
stefanklug/mapnik
scons/scons-local-2.3.6/SCons/Options/PackageOption.py
Python
lgpl-2.1
1,995
# ------------------------------------------------------------------------------ # This file is part of PyTango (http://pytango.rtfd.io) # # Copyright 2006-2012 CELLS / ALBA Synchrotron, Bellaterra, Spain # Copyright 2013-2014 European Synchrotron Radiation Facility, Grenoble, France # # Distributed under the terms of ...
jairomoldes/PyTango
tango/exception.py
Python
lgpl-3.0
6,718
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
NSAmelchev/ignite
modules/ducktests/tests/ignitetest/tests/__init__.py
Python
apache-2.0
2,355
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Functional tests for ZFS filesystem implementation. These tests require the ability to create a new ZFS storage pool (using ``zpool``) and the ability to interact with that pool (using ``zfs``). Further coverage is provided in :module:`flocker.volume.t...
jml/flocker
flocker/volume/functional/test_filesystems_zfs.py
Python
apache-2.0
19,664
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
UTSA-ICS/keystone-SID
keystone/common/dependency.py
Python
apache-2.0
10,620
# 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...
cloudbase/nova-virtualbox
nova/api/openstack/compute/plugins/v3/keypairs.py
Python
apache-2.0
7,665
from vt_manager.communication.sfa.util.xrn import urn_to_hrn from vt_manager.communication.sfa.util.method import Method from vt_manager.communication.sfa.util.parameter import Parameter, Mixed class reset_slice(Method): """ Reset the specified slice @param cred credential string specifying the rig...
dana-i2cat/felix
vt_manager/src/python/vt_manager/communication/sfa/methods/reset_slice.py
Python
apache-2.0
1,080
#!/usr/bin/python # # 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 b...
wubr2000/googleads-python-lib
examples/adwords/v201502/optimization/estimate_keyword_traffic.py
Python
apache-2.0
4,307
# -*- coding: utf-8 -*- # Copyright 2011 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...
imzers/gsutil-with-php
gslib/commands/mv.py
Python
apache-2.0
5,678
# Copyright (c) 2012 NTT DOCOMO, 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 requ...
houshengbo/nova_vmware_compute_driver
nova/tests/baremetal/db/test_bm_interface.py
Python
apache-2.0
2,308
# Copyright (C) 2008 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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 of the License, or (at you...
mytliulei/DCNRobotInstallPackages
windows/win32/paramiko-1.14.0/tests/test_auth.py
Python
apache-2.0
8,501
# -*- coding: utf-8 -*- # Copyright 2014, 2015 OpenMarket 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 applica...
illicitonion/synapse
synapse/events/validator.py
Python
apache-2.0
2,913
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
yk5/incubator-airflow
airflow/api/common/experimental/mark_tasks.py
Python
apache-2.0
8,610