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
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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/LICEN...
citrix-openstack-build/trove
trove/openstack/common/rpc/impl_kombu.py
Python
apache-2.0
32,685
input = """ :- not b. b :- a, not a. a v c. """ output = """ """
Yarrick13/hwasp
tests/wasp1/AllAnswerSets/choice_30.test.py
Python
apache-2.0
66
# 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...
kaiping/incubator-singa
examples/imagenet/densenet/convert.py
Python
apache-2.0
3,187
''' author@esilgard ''' # Copyright (c) 2013-2016 Fred Hutchinson Cancer Research Center # # 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 # #...
LabKey/argos_nlp
nlp_engine.py
Python
apache-2.0
6,574
# 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...
noironetworks/neutron
neutron/agent/l2/l2_agent_extensions_manager.py
Python
apache-2.0
2,311
from Foundation import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSMetaData (TestCase): def testConstants(self): self.assertIsInstance(NSMetadataQueryDidStartGatheringNotification, unicode) self.assertIsInstance(NSMetadataQueryGatheringP...
albertz/music-player
mac/pyobjc-framework-Cocoa/PyObjCTest/test_nsmetadata.py
Python
bsd-2-clause
2,524
import pydev_log import traceback import pydevd_resolver from pydevd_constants import * #@UnusedWildImport from types import * #@UnusedWildImport try: from urllib import quote except: from urllib.parse import quote #@UnresolvedImport try: from xml.sax.saxutils import escape def makeValidXmlValue(s): ...
akiokio/centralfitestoque
src/.pycharm_helpers/pydev/pydevd_xml.py
Python
bsd-2-clause
6,287
# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE)
DataDog/integrations-extras
traefik/tests/__init__.py
Python
bsd-3-clause
107
from .. utils import TranspileTestCase, BuiltinFunctionTestCase class AbsTests(TranspileTestCase): def test_abs_not_implemented(self): self.assertCodeExecution(""" class NotAbsLike: pass x = NotAbsLike() try: print(abs(x)) exc...
pombredanne/voc
tests/builtins/test_abs.py
Python
bsd-3-clause
566
from __future__ import absolute_import import six from base64 import b64encode from django.core.urlresolvers import reverse from sentry.models import UserAvatar from sentry.testutils import APITestCase class UserAvatarTest(APITestCase): def test_get(self): user = self.create_user(email='a@example.com')...
JackDanger/sentry
tests/sentry/api/endpoints/test_user_avatar.py
Python
bsd-3-clause
2,972
import json import httplib from conpaas.core import https def _check(response): code, body = response if code != httplib.OK: raise Exception('Received http response code %d' % (code)) data = json.loads(body) if data['error']: raise Exception(data['error']) else: return data['result'] def check_agent_proce...
ema/conpaas
conpaas-services/src/conpaas/services/helloworld/agent/client.py
Python
bsd-3-clause
679
from __future__ import absolute_import, unicode_literals import datetime import pytest from case import MagicMock, call, patch, skip from kombu import Connection from kombu.five import Empty def _create_mock_connection(url='', **kwargs): from kombu.transport import mongodb # noqa class _Channel(mongodb.C...
pexip/os-kombu
t/unit/transport/test_mongodb.py
Python
bsd-3-clause
16,952
# -*- coding: utf-8 -*- """ .. _plot_montage: Plotting sensor layouts of EEG systems ====================================== This example illustrates how to load all the EEG system montages shipped in MNE-python, and display it on fsaverage template. """ # noqa: D205, D400 # Authors: Alexandre Gramfort <alexandre.gra...
Teekuningas/mne-python
examples/visualization/plot_montage.py
Python
bsd-3-clause
2,108
# Copyright (c) 2017 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 os import posixpath import re from collections import defaultdict def uniform_path_format(native_path): """Alters the path if needed to be se...
nwjs/chromium.src
tools/checkteamtags/owners_file_tags.py
Python
bsd-3-clause
7,900
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, publish, ...
Distrotech/scons
test/Entry.py
Python
mit
1,860
import optparse import os import shutil import sys import unittest from itertools import izip from . import util from . import stats #============================================================================= # common utility functions for testing def clean_dir(path): if os.path.exists(path): shutil...
wutron/compbio
rasmus/testing.py
Python
mit
3,789
#!/usr/bin/env python import argparse import errno import hashlib import os import shutil import subprocess import sys import tempfile from io import StringIO from lib.config import PLATFORM, get_target_arch, get_env_var, s3_config, \ get_zip_name from lib.util import electron_gyp, execute, ge...
rreimann/electron
script/upload.py
Python
mit
8,894
""" Add an excerpt field to the page. """ from __future__ import absolute_import, unicode_literals from django.db import models from django.utils.translation import ugettext_lazy as _ from feincms import extensions class Extension(extensions.Extension): def handle_model(self): self.model.add_to_class( ...
mcmaxwell/idea_digital_agency
idea/feincms/module/page/extensions/excerpt.py
Python
mit
754
# $Id$ # -*- coding: utf8 -*- # Authors: David Goodger <goodger@python.org>; Ueli Schlaepfer; Günter Milde # Maintainer: docutils-develop@lists.sourceforge.net # Copyright: This module has been placed in the public domain. """ Transforms needed by most or all documents: - `Decorations`: Generate a document's header &...
Lyleo/OmniMarkupPreviewer
OmniMarkupLib/Renderers/libs/python3/docutils/transforms/universal.py
Python
mit
10,307
from __future__ import unicode_literals, division, absolute_import import logging from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from flexget import plugin from flexget.event import event try: # NOTE: Importing other plugins is discouraged! from flexget.components.parsing.par...
gazpachoking/Flexget
flexget/plugins/metainfo/metainfo_movie.py
Python
mit
1,939
""" Dtella - Google Spreadsheets Puller Module Copyright (C) 2008 Dtella Labs (http://dtella.org) Copyright (C) 2008 Paul Marks (http://pmarks.net) $Id$ 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 Foundat...
pmarks-net/dtella
dtella/modules/pull_gdata.py
Python
gpl-2.0
1,879
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 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 ...
egabancho/invenio
invenio/modules/sequencegenerator/backend.py
Python
gpl-2.0
2,606
# -*- coding: utf-8 -*- # Copyright (C) 2014 - Garrett Regier # # 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. # ...
VIVEKLUCKY1848/gedit-plugins-1
plugins/git/git/workerthread.py
Python
gpl-2.0
4,422
############################################################################### # ilastik: interactive learning and segmentation toolkit # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/or # mod...
nielsbuwen/ilastik
tests/test_applets/objectClassification/testPrediction.py
Python
gpl-3.0
15,423
# Copyright (C) 2009 by Ning Shi and Andy Pavlo # Brown University # # 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, cop...
ifcharming/original2.0
tests/scripts/xml2/xmlparser.py
Python
gpl-3.0
6,723
from docutils.parsers.rst import Directive, directives from docutils import nodes from docutils.parsers.rst.directives.admonitions import BaseAdmonition from sphinx.util import compat compat.make_admonition = BaseAdmonition from sphinx import addnodes from sphinx.locale import _ class bestpractice(nodes.Admonition, ...
takeit/web-publisher
docs/_extensions/sensio/sphinx/bestpractice.py
Python
agpl-3.0
1,458
# Copyright 2013-2021 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 PyAzureMgmtDeploymentmanager(PythonPackage): """Microsoft Azure Deployment Manager Client Library for Python.""...
LLNL/spack
var/spack/repos/builtin/packages/py-azure-mgmt-deploymentmanager/package.py
Python
lgpl-2.1
877
############################################################################## # Copyright (c) 2017, Los Alamos National Security, LLC # Produced at the Los Alamos National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # # For details, ...
skosukhin/spack
var/spack/repos/builtin/packages/yajl/package.py
Python
lgpl-2.1
1,554
"""Test suite for abdt_branch.""" # ============================================================================= # TEST PLAN # ----------------------------------------------------------------------------- # Here we detail the things we are concerned to test and specify which tests # c...
cs-shadow/phabricator-tools
py/abd/abdt_branch__t.py
Python
apache-2.0
10,066
from extractors.extract_website import ExtractWebsite from datawakestreams.extractors.extractor_bolt import ExtractorBolt class WebsiteBolt(ExtractorBolt): name ='website_extractor' def __init__(self): ExtractorBolt.__init__(self) self.extractor = ExtractWebsite()
Sotera/Datawake-Legacy
memex-datawake-stream/src/datawakestreams/extractors/website_bolt.py
Python
apache-2.0
293
#!/usr/bin/env python # -*- encoding: 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...
mycFelix/heron
heronpy/connectors/pulsar/pulsarspout.py
Python
apache-2.0
5,438
# Copyright (c) 2010-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 required by applicable law or agreed to ...
VictorLowther/swift
swift/common/direct_client.py
Python
apache-2.0
18,186
import sys from Boxing import Box, dump_exception, load_exception from ModuleNetProxy import RootImporter from Lib import raise_exception, AttrFrontend FRAME_REQUEST = 1 FRAME_RESULT = 2 FRAME_EXCEPTION = 3 class Connection(object): """ the rpyc connection layer (protocol and APIs). generally speaking, the o...
eBay/restcommander
play-1.2.4/python/Lib/site-packages/Rpyc/Connection.py
Python
apache-2.0
6,944
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # 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...
whitepages/nova
nova/tests/functional/api_sample_tests/test_quota_sets.py
Python
apache-2.0
4,046
from __future__ import print_function import time import argparse import grpc from jaeger_client import Config from grpc_opentracing import open_tracing_client_interceptor from grpc_opentracing.grpcext import intercept_channel import command_line_pb2 def run(): parser = argparse.ArgumentParser() parser.ad...
johnbelamaric/themis
vendor/github.com/grpc-ecosystem/grpc-opentracing/python/examples/trivial/trivial_client.py
Python
apache-2.0
1,218
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 2013 Kitware 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 cop...
manthey/girder
girder/utility/config.py
Python
apache-2.0
2,764
################################################################################ # 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...
jinglining/flink
flink-python/pyflink/fn_execution/tests/test_process_mode_boot.py
Python
apache-2.0
6,732
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
spektom/incubator-airflow
tests/test_core.py
Python
apache-2.0
18,421
# 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...
allenlavoie/tensorflow
tensorflow/python/ops/image_ops.py
Python
apache-2.0
2,576
""" author: Lalit Jain, lalitkumarjj@gmail.com modified: Chris Fernandez, chris2fernandez@gmail.com last updated: 05/27/2015 A module for replicating the 25 total arms with 8 arms shown at a time tuple bandits pure exploration experiments from the NEXT paper. Usage: python experiment_tuple_n25k8.py """ import os, sys...
kgjamieson/NEXT-psych
examples/cartoon_tuple_n25k8/experiment_tuple_n25k8.py
Python
apache-2.0
4,671
#!/usr/bin/python # # 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 b...
coxmediagroup/googleads-python-lib
examples/dfp/v201411/placement_service/update_placements.py
Python
apache-2.0
2,284
# Copyright 2013-2016 DataStax, 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 writi...
Richard-Mathie/cassandra_benchmark
vendor/github.com/datastax/python-driver/tests/integration/cqlengine/columns/test_validation.py
Python
apache-2.0
21,274
#!/usr/bin/env python import os from mi.logging import log from mi.dataset.parser.zplsc_c import ZplscCParser from mi.dataset.dataset_parser import DataSetDriverConfigKeys from mi.dataset.driver.zplsc_c.resource import RESOURCE_PATH __author__ = 'Rene Gelinas' MODULE_NAME = 'mi.dataset.parser.zplsc_c' CLASS_NAME = ...
renegelinas/mi-instrument
mi/dataset/parser/test/test_zplsc_c_echogram.py
Python
bsd-2-clause
1,302
import asyncio import inspect import warnings from asgiref.sync import sync_to_async class RemovedInDjango41Warning(DeprecationWarning): pass class RemovedInDjango50Warning(PendingDeprecationWarning): pass RemovedInNextVersionWarning = RemovedInDjango41Warning class warn_about_renamed_method: def _...
elena/django
django/utils/deprecation.py
Python
bsd-3-clause
4,818
from OpenGL import GL import numpy from depths import DepthOffset from pymclevel import BoundingBox from config import config from albow.translate import _ class EditorTool(object): surfaceBuild = False panel = None optionsPanel = None toolIconName = None worldTooltipText = None previewRendere...
gpmidi/MCEdit-Unified
editortools/editortool.py
Python
isc
8,663
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import ast import os.path import platform import re import sys class Config(object): '''A Config contains a dictionary that species a build configuratio...
junhuac/MQUIC
src/mojo/tools/mopy/config.py
Python
mit
4,103
""" For a detailed gene table and a summary gene table """ #!/usr/bin/env python from collections import defaultdict filename = 'detailed_gene_table_v75' detailed_out = open(filename, 'w') file = 'summary_gene_table_v75' summary_out = open(file, 'w') # write out files for detailed and summary gene table detailed_...
brentp/gemini
gemini/annotation_provenance/gene_table/combined_gene_table.py
Python
mit
9,693
import re import chardet import sys RE_CHARSET = re.compile(br'<meta.*?charset=["\']*(.+?)["\'>]', flags=re.I) RE_PRAGMA = re.compile(br'<meta.*?content=["\']*;?charset=(.+?)["\'>]', flags=re.I) RE_XML = re.compile(br'^<\?xml.*?encoding=["\']*(.+?)["\'>]') CHARSETS = { 'big5': 'big5hkscs', 'gb2312': 'gb18030...
AlphaCluster/NewsBlur
vendor/readability/encoding.py
Python
mit
2,034
# # Copyright (C) 2010 Stanislav Bohm # # This file is part of Kaira. # # Kaira is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3 of the License, or # (at your option) any later versi...
MrPablozOne/kaira
gui/cmdutils.py
Python
gpl-3.0
2,053
# (c) 2014 Michael DeHaan, <michael@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 later ve...
j-carl/ansible
lib/ansible/parsing/mod_args.py
Python
gpl-3.0
13,925
# -*- coding: utf-8 -*- from module.plugins.internal.XFSAccount import XFSAccount class OpenloadCo(XFSAccount): __name__ = "OpenloadCo" __type__ = "account" __version__ = "0.02" __status__ = "testing" __description__ = """Openload.co account plugin""" __license__ = "GPLv3" __a...
Guidobelix/pyload
module/plugins/accounts/OpenloadCo.py
Python
gpl-3.0
413
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import re import subprocess from unittest import skipIf from odoo import tools from . import lint_case RULES = ('{' '"no-undef": "error",' '"no-restricted-globals": ["error", "event", "se...
jeremiahyan/odoo
odoo/addons/test_lint/tests/test_eslint.py
Python
gpl-3.0
1,842
""" This config file runs the simplest dev environment using sqlite, and db-based sessions. Assumes structure: /envroot/ /db # This is where it'll write the database file /edx-platform # The location of this repo /log # Where we're going to write log files """ # We intentionally define lot...
c0710204/edx-platform
lms/envs/test.py
Python
agpl-3.0
12,700
#!/usr/bin/env python # -*- coding: utf-8 -*- """setup.py: setuptools control.""" import ez_setup ez_setup.use_setuptools() from os.path import dirname, abspath, join from setuptools import setup BASE_DIR = join(dirname(abspath(__file__)), 'orka/orka.py') import orka requires = ['kamaki','paramiko','requests','PyYA...
grnet/e-science
orka/setup.py
Python
agpl-3.0
676
from sys import version_info from functools import reduce from operator import mul from flask_babel import gettext if version_info[0] == 3: unicode = str keywords = ('min', 'max', 'avg', 'sum', 'prod') # required answerer function # can return a list of results (...
asciimoo/searx
searx/answerers/statistics/answerer.py
Python
agpl-3.0
1,243
""" Unit tests for the stem.version.Version parsing and class. """ import unittest import stem.util.system import stem.version from stem.version import Version from test import mocking TOR_VERSION_OUTPUT = """Mar 22 23:09:37.088 [notice] Tor v0.2.2.35 \ (git-73ff13ab3cc9570d). This is experimental software. Do not ...
wfn/stem
test/unit/version.py
Python
lgpl-3.0
9,206
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, int_or_none, ) class EaglePlatformIE(InfoExtractor): _VALID_URL = r'''(?x) (?: eagleplatform:(?P<custom_host>[^/]+):| ...
amishb/youtube-dl
youtube_dl/extractor/eagleplatform.py
Python
unlicense
3,435
import datetime class Store: def parse(self,line): fields=line.split('\t') self.id = fields[0] self.name = fields[1] return self def __repr__(self): return "Store: id=%s \t name=%s"%(self.id,self.name) class Product: def parse(self,line): fields=line.split('\t') self.id = fields[0] self.name = fi...
sk-rai/Intro-to-SPARK-with-Python
code/sales/sales_schema.py
Python
unlicense
899
"""Utilities for defining models """ import operator from typing import Any, Callable, Type class KeyBasedCompareMixin: """Provides comparison capabilities that is based on a key""" __slots__ = ["_compare_key", "_defining_class"] def __init__(self, key, defining_class): # type: (Any, Type[KeyBa...
google/material-design-icons
update/venv/lib/python3.9/site-packages/pip/_internal/utils/models.py
Python
apache-2.0
1,329
# 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...
Acehaidrey/incubator-airflow
kubernetes_tests/test_kubernetes_executor.py
Python
apache-2.0
2,909
# # Copyright (c) 2015 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
yasharmaster/scancode-toolkit
src/packagedcode/phpcomposer.py
Python
apache-2.0
11,144
# Copyright 2012 NEC Corporation. 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 ...
virtualopensystems/neutron
neutron/tests/unit/nec/test_db.py
Python
apache-2.0
7,264
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
jumpstarter-io/keystone
keystone/contrib/oauth1/controllers.py
Python
apache-2.0
17,478
# -*- coding: utf-8 -*- ############################################################################### # # DeleteOrganization # Deletes an existing organization. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this...
jordanemedlock/psychtruths
temboo/core/Library/Zendesk/Organizations/DeleteOrganization.py
Python
apache-2.0
4,028
from feedly.feed_managers.base import Feedly from feedly.feeds.base import UserBaseFeed from feedly.feeds.redis import RedisFeed from feedly.tests.managers.base import BaseFeedlyTest import pytest class RedisUserBaseFeed(UserBaseFeed, RedisFeed): pass class RedisFeedly(Feedly): feed_classes = { 'fee...
Anislav/Stream-Framework
feedly/tests/managers/redis.py
Python
bsd-3-clause
493
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ This module contains classes that help to emulate xcodebuild behavior on top of other build systems, such as make and ninja. """ import gyp.common import os.p...
MIPS/external-chromium_org-tools-gyp
pylib/gyp/xcode_emulation.py
Python
bsd-3-clause
44,910
import os import re from django.conf import global_settings, settings from django.contrib.sites.models import Site, RequestSite from django.contrib.auth.models import User from django.core import mail from django.core.exceptions import SuspiciousOperation from django.core.urlresolvers import reverse, NoReverseMatch fr...
nuodb/nuodb-django
test/auth/tests/views.py
Python
bsd-3-clause
22,169
# -*- coding: utf-8 -*- """ ********** Exceptions ********** Base exceptions and errors for NetworkX. """ __author__ = """Aric Hagberg (hagberg@lanl.gov)\nPieter Swart (swart@lanl.gov)\nDan Schult(dschult@colgate.edu)\nLoïc Séguin-C. <loicseguin@gmail.com>""" # Copyright (C) 2004-2016 by # Aric Hagberg <hagberg...
SanketDG/networkx
networkx/exception.py
Python
bsd-3-clause
1,828
############################################################################## # Copyright 2009, Gerhard Weis # 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 ...
Nexenta/s3-tests
virtualenv/lib/python2.7/site-packages/isodate/tests/test_time.py
Python
mit
6,554
"package1.subpackage.module"
metachris/py2app
py2app_tests/basic_app_with_encoding/package1/subpackage/module.py
Python
mit
29
#!/usr/bin/python # 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 required by appli...
omererdem/honeything
src/cwmp/google3.py
Python
gpl-3.0
964
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import time import shutil import logging import Queue from threading import Thread, Lock from lib.cuckoo.common.config import Config from li...
liorvh/CuckooSploit
lib/cuckoo/core/scheduler.py
Python
gpl-3.0
21,948
""" This file is part of py-sonic. py-sonic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. py-sonic is distributed in the hope that it wil...
ties/py-sonic
libsonic/errors.py
Python
gpl-3.0
1,413
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2014 Thomas Voegtlin # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at y...
Kefkius/electrum-frc
lib/network_proxy.py
Python
gpl-3.0
7,346
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2005-2010 (ita) """ ConfigSet: a special dict The values put in :py:class:`ConfigSet` must be lists """ import copy, re, os from waflib import Logs, Utils re_imp = re.compile('^(#)*?([^#=]*?)\ =\ (.*?)$', re.M) class ConfigSet(object): """ A dict that honor ...
evancich/apm_motor
modules/waf/waflib/ConfigSet.py
Python
gpl-3.0
8,007
"""timezone at metavj level Revision ID: 224621d9edde Revises: 14346346596e Create Date: 2015-12-21 16:52:30.275508 """ # revision identifiers, used by Alembic. revision = '224621d9edde' down_revision = '5a590ae95255' from alembic import op import sqlalchemy as sa import geoalchemy2 as ga def upgrade(): op.cr...
TeXitoi/navitia
source/sql/alembic/versions/224621d9edde_timezone_at_metavj_level.py
Python
agpl-3.0
1,446
# # bloom.py # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # """Bloom filter support""" from __future__ import absolute_import, division, print_function, unicode_literals import struct import sys import math import bit...
Roasbeef/seneca
python-bitcoinlib/bitcoin/bloom.py
Python
unlicense
5,793
"""The test for the threshold sensor platform.""" import unittest from homeassistant.setup import setup_component from homeassistant.const import ( ATTR_UNIT_OF_MEASUREMENT, STATE_UNKNOWN, TEMP_CELSIUS) from tests.common import get_test_home_assistant class TestThresholdSensor(unittest.TestCase): """Tes...
persandstrom/home-assistant
tests/components/binary_sensor/test_threshold.py
Python
apache-2.0
13,704
from __future__ import print_function import csv import os import random import re import urllib3 from urllib.parse import parse_qs, urlparse, unquote, urlencode, quote from locust import HttpLocust, TaskSet, task, TaskSequence, seq_task, between # SAML IdP Host HOST = "https://axman000.local:8443" # Run weighting f...
leleuj/cas
etc/loadtests/locust/cas5/bothLocust.py
Python
apache-2.0
9,997
import io import zipfile from tornado import testing from waterbutler.core import streams from waterbutler.core.utils import AsyncIterator from tests import utils class TestZipHandler(utils.HandlerTestCase): HOOK_PATH = 'waterbutler.server.api.v0.zip.ZipHandler._send_hook' @testing.gen_test def test_...
TomBaxter/waterbutler
tests/server/api/v0/test_zip.py
Python
apache-2.0
919
# Copyright 2013-2016 DataStax, 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 writi...
Richard-Mathie/cassandra_benchmark
vendor/github.com/datastax/python-driver/tests/unit/test_exception.py
Python
apache-2.0
2,375
import orjson from django.core.exceptions import ValidationError from django.db.utils import IntegrityError from zerver.lib.actions import ( do_change_realm_domain, do_change_user_role, do_create_realm, do_remove_realm_domain, do_set_realm_property, ) from zerver.lib.domains import validate_domain ...
andersk/zulip
zerver/tests/test_realm_domains.py
Python
apache-2.0
7,224
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import absolute_import import os import sys import tempfile import warnings import numpy from numpy import testing as npt import tables from tables import Atom, ClosedNodeError, NoSuchNodeError from tables.utils import byteorders from ta...
gdementen/PyTables
tables/tests/test_array.py
Python
bsd-3-clause
95,636
from __future__ import unicode_literals import re from functools import partial from importlib import import_module from inspect import getargspec, getcallargs import warnings from django.apps import apps from django.conf import settings from django.template.context import (BaseContext, Context, RequestContext, # NO...
olasitarska/django
django/template/base.py
Python
bsd-3-clause
50,676
"""Test interact and interactive.""" #----------------------------------------------------------------------------- # Copyright (C) 2014 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. #---------------...
WillisXChen/django-oscar
oscar/lib/python2.7/site-packages/IPython/html/widgets/tests/test_interaction.py
Python
bsd-3-clause
13,235
import sys import pytest from netaddr import INET_PTON, AddrFormatError from netaddr.strategy import ipv4 def test_strategy_ipv4(): b = '11000000.00000000.00000010.00000001' i = 3221225985 t = (192, 0, 2, 1) s = '192.0.2.1' bin_val = '0b11000000000000000000001000000001' assert ipv4.bits_to_...
jonathanwcrane/netaddr
test/strategy/test_ipv4_strategy.py
Python
bsd-3-clause
2,753
# -*- coding: utf-8 -*- # # jQuery File Upload Plugin GAE Python Example 2.1.1 # https://github.com/blueimp/jQuery-File-Upload # # Copyright 2011, Sebastian Tschan # https://blueimp.net # # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT # from __future__ import with_statement fro...
guillaume-boutin/learning-builderengine
themes/user_dashboard/assets/plugins/jquery-file-upload/server/gae-python/main.py
Python
mit
6,014
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2012 Jonathan Esterhazy <jonathan.esterhazy at gmail.com> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html # # HDP inference code is adapted from the onlinehdp.py script by # Chong Wang (chongw at cs.princeton.edu). # http://www.c...
krishna11888/ai
third_party/gensim/gensim/models/hdpmodel.py
Python
gpl-2.0
23,000
from Components.HTMLComponent import HTMLComponent from Components.GUIComponent import GUIComponent from Screen import Screen from Components.ActionMap import ActionMap from Components.Label import Label from ServiceReference import ServiceReference from enigma import eListboxPythonMultiContent, eListbox, gFont, iServi...
popazerty/SDG-e2
lib/python/Screens/ServiceInfo.py
Python
gpl-2.0
10,356
""" The simple harness interface """ __author__ = """Copyright Andy Whitcroft, Martin J. Bligh 2006""" import os, harness, time class harness_simple(harness.harness): """ The simple server harness Properties: job The job object for this job """ def __init__(self,...
libvirt/autotest
client/bin/harness_simple.py
Python
gpl-2.0
974
# Author: Marvin Pinto <me@marvinp.ca> # Author: Dennis Lutter <lad1337@gmail.com> # Author: Shawn Conroyd <mongo527@gmail.com> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard is free software: you can redistribute it and/or modify # it under the terms of the GNU General P...
imajes/Sick-Beard
sickbeard/notifiers/boxcar2.py
Python
gpl-3.0
5,011
#!/usr/bin/env python # # Copyright 2008, Google 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: # # * Redistributions of source code must retain the above copyright # notice, this list...
TextusData/Mover
thirdparty/protobuf-2.2.0/gtest/test/gtest_env_var_test.py
Python
gpl-3.0
3,472
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, 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...
david-ragazzi/nupic
nupic/research/monitor_mixin/monitor_mixin_base.py
Python
gpl-3.0
5,503
# Amara, universalsubtitles.org # # Copyright (C) 2013 Participatory Culture Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your ...
ofer43211/unisubs
apps/comments/__init__.py
Python
agpl-3.0
763
""" Kickass Torrent (Videos, Music, Files) @website https://kickass.so @provide-api no (nothing found) @using-api no @results HTML (using search portal) @stable yes (HTML can change) @parse url, title, content, seed, leech, magnetlink """ from urlparse import urljoin from cgi import escap...
framasoft/searx
searx/engines/kickass.py
Python
agpl-3.0
3,732
# -*- coding: utf-8 -*- # Copyright(C) 2014 Romain Bignon # # 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 opti...
laurent-george/weboob
weboob/browser/filters/__init__.py
Python
agpl-3.0
729
#!/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License")...
arenadata/ambari
ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HDFS/package/alerts/alert_checkpoint_time.py
Python
apache-2.0
10,596
# 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...
silenceli/nova
nova/tests/unit/api/openstack/compute/contrib/test_multinic.py
Python
apache-2.0
7,255
#!/usr/bin/env python # --- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (th...
kyungmi/webida-server
src/ext/cordova-weinre/weinre.build/scripts/build-target-scripts.py
Python
apache-2.0
5,339
#!/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License");...
radicalbit/ambari
contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat_client.py
Python
apache-2.0
2,941