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 pytest
class TestNcftp:
@pytest.mark.complete("ncftp ")
def test_1(self, completion):
assert completion
@pytest.mark.complete("ncftp -", require_cmd=True)
def test_2(self, completion):
assert completion
| algorythmic/bash-completion | test/t/test_ncftp.py | Python | gpl-2.0 | 245 |
###############################################################################
# Name: nsistags.py #
# Purpose: Generate Tags for Nullsoft Installer Scripts #
# Author: Cody Precord <cprecord@editra.org> #
... | garrettcap/Bulletproof-Backup | wx/tools/Editra/plugins/codebrowser/codebrowser/gentag/nsistags.py | Python | gpl-2.0 | 3,752 |
# Standard
import os
import sys
# Third Party
import numpy as np
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import seaborn as sns
import pyfilm as pf
from skimage.measure import label
from skimage import filters
plt.rcParams.update({'figure.autolayout': True})
mpl.rcParams['axes.unicode_mi... | ferdinandvwyk/gs2_analysis | structure_analysis.py | Python | gpl-2.0 | 4,637 |
# -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 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 ve... | chokribr/inveniotest | modules/websearch/lib/websearch_regression_tests.py | Python | gpl-2.0 | 256,725 |
#=======================================================================
#
# Python Lexical Analyser
#
# Exception classes
#
#=======================================================================
import exceptions
class PlexError(exceptions.Exception):
message = ""
class PlexTypeError(PlexError, TypeError):
... | onoga/wm | src/gnue/common/external/plex/Errors.py | Python | gpl-2.0 | 1,109 |
from miasm2.core.asmblock import disasmEngine
from miasm2.arch.msp430.arch import mn_msp430
class dis_msp430(disasmEngine):
def __init__(self, bs=None, **kwargs):
super(dis_msp430, self).__init__(mn_msp430, None, bs, **kwargs)
| stephengroat/miasm | miasm2/arch/msp430/disasm.py | Python | gpl-2.0 | 242 |
# -*- encoding: utf-8 -*-
from django.contrib import admin
from .models import ZoteroExtractorLog
### ZoteroExtractorLogAdmin
####################################################################################################
class ZoteroExtractorLogAdmin(admin.ModelAdmin):
model = ZoteroExtractorLog
... | morelab/labman_ud | labman_ud/extractors/zotero/admin.py | Python | gpl-3.0 | 970 |
__VERSION__="ete2-2.2rev1026"
# -*- coding: utf-8 -*-
# #START_LICENSE###########################################################
#
#
# This file is part of the Environment for Tree Exploration program
# (ETE). http://ete.cgenomics.org
#
# ETE is free software: you can redistribute it and/or modify it
# under the t... | zhangjiajie/tax_benchmark | script/ete2/clustering/__init__.py | Python | gpl-3.0 | 1,549 |
# Purpose: ac1009 table entries
# Created: 16.03.2011
# Copyright (C) 2011, Manfred Moitzi
# License: MIT License
from __future__ import unicode_literals
__author__ = "mozman <mozman@gmx.at>"
from ..entity import GenericWrapper
from ..tags import DXFTag
from ..classifiedtags import ClassifiedTags
from ..dxfattr import... | lautr3k/RepRap-iTopie | odmt/ezdxf/ac1009/tableentries.py | Python | gpl-3.0 | 8,896 |
#!/usr/bin/python
# python code for interfacing to VC0706 cameras and grabbing a photo
# pretty basic stuff
# written by ladyada. MIT license
# revisions for Raspberrry Pi by Gordon Rush
import serial
BAUD = 38400
# this is the port on the Raspberry Pi; it will be different for serial ports on other systems.
PORT = ... | felipehfj/Arduino | libraries/Adafruit_VC0706_Serial_Camera_Library/raspi_camera.py | Python | gpl-3.0 | 3,977 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2015-12-07 02:11
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inventory', '0001_initial'),
]
operations = [
migrations.AlterField(
... | kkoci/orthosie | inventory/migrations/0002_auto_20151206_2111.py | Python | gpl-3.0 | 438 |
from netfields import InetAddressField, CidrAddressField
from django.db import models
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from nodeshot.core.base.models import BaseAccessLevel
from ..managers import NetAccessLevelM... | sephiroth6/nodeshot | nodeshot/networking/net/models/ip.py | Python | gpl-3.0 | 2,430 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-09-12 15:08
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Malwar... | brj424/nector | malware/migrations/0001_initial.py | Python | gpl-3.0 | 1,104 |
# coding=utf-8
"""
Class used for representing tIntermediateCatchEvent of BPMN 2.0 graph
"""
import graph.classes.events.catch_event_type as catch_event
class IntermediateCatchEvent(catch_event.CatchEvent):
"""
Class used for representing tIntermediateCatchEvent of BPMN 2.0 graph
"""
def __init__(sel... | krisss2121/bpmn-python | bpmn_python/graph/classes/events/intermediate_catch_event_type.py | Python | gpl-3.0 | 478 |
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2015-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
# Copyright 2015-2018 Alexander Cogneau (acogneau) <alexander.cogneau@gmail.com>:
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
#... | t-wissmann/qutebrowser | tests/unit/misc/test_autoupdate.py | Python | gpl-3.0 | 2,969 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
JWT tokens (for web interface, mostly, as all peer operations function on
public key cryptography)
JWT tokens can be one of:
* Good
* Expired
* Invalid
And granting them should not take database access. They are meant to
figure out if a user is auth'd without using t... | Thetoxicarcade/ac | congredi/auth/test/test_token.py | Python | gpl-3.0 | 1,288 |
"""
LLDB AppKit formatters
part of The LLVM Compiler Infrastructure
This file is distributed under the University of Illinois Open Source
License. See LICENSE.TXT for details.
"""
# example summary provider for NSMachPort
# the real summary is now C++ code built into LLDB
import lldb
import ctypes
import lldb.runtime.... | s20121035/rk3288_android5.1_repo | external/lldb/examples/summaries/cocoa/NSMachPort.py | Python | gpl-3.0 | 3,980 |
#Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/__init__.py
__version__=''' $Id$ '''
__doc__="""The Reportlab PDF generation library."""
Version = "2.7"
import sys
if sys.version_info[0:2] < (2, 7)... | TaskEvolution/Task-Coach-Evolution | taskcoach/taskcoachlib/thirdparty/src/reportlab/__init__.py | Python | gpl-3.0 | 1,715 |
../../../../../../share/pyshared/ubuntuone-storage-protocol/ubuntuone/storageprotocol/delta.py | Alberto-Beralix/Beralix | i386-squashfs-root/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol/ubuntuone/storageprotocol/delta.py | Python | gpl-3.0 | 94 |
# Copyright 2012 the rootpy developers
# distributed under the terms of the GNU General Public License
from __future__ import absolute_import
import ROOT
from . import log; log = log[__name__]
from .. import QROOT, asrootpy
from ..base import NamedObject
from ..extern.six import string_types
__all__ = [
'DataSet... | kreczko/rootpy | rootpy/stats/dataset.py | Python | gpl-3.0 | 1,394 |
from __future__ import absolute_import, unicode_literals
from django.conf import settings as django_settings
SLUG = 'macros'
APP_LABEL = 'wiki'
METHODS = getattr(
django_settings,
'WIKI_PLUGINS_METHODS',
('article_list',
'toc',
))
| NablaWebkom/django-wiki | wiki/plugins/macros/settings.py | Python | gpl-3.0 | 256 |
if __name__ == "__main__":
try:
from mvc.ui.widgets import Application
except ImportError:
from mvc.ui.console import Application
from mvc.widgets import app
from mvc.widgets import initialize
app.widgetapp = Application()
initialize(app.widgetapp)
| pculture/mirovideoconverter3 | mvc/__main__.py | Python | gpl-3.0 | 289 |
'''
pysplat 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.
pysplat is distributed in the hope that it will be useful,
but WITHOUT ANY WARRA... | pointhi/PySplat | PySplat/util/__init__.py | Python | gpl-3.0 | 682 |
# -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.
from django.contrib.auth.models import BaseU... | Finntack/pootle | pootle/apps/accounts/managers.py | Python | gpl-3.0 | 3,836 |
"""
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2011 Nathanael C. Fritz
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
from sleekxmpp.stanza import StreamFeatures
from sleekxmpp.xmlstream import ElementBase, StanzaBase, ET
from sleekxmpp.xmlstream import register... | TheGurke/Progenitus | sleekxmpp/features/feature_mechanisms/stanza/failure.py | Python | gpl-3.0 | 2,500 |
# Copyright (C) 2001-2017 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ... | pbaesse/Sissens | lib/python2.7/site-packages/eventlet/support/dns/rdataset.py | Python | gpl-3.0 | 11,374 |
"""Update vulnerability sources."""
from selinon import StoragePool
from f8a_worker.base import BaseTask
from f8a_worker.enums import EcosystemBackend
from f8a_worker.models import Ecosystem
from f8a_worker.solver import get_ecosystem_solver, OSSIndexDependencyParser
from f8a_worker.workers import CVEcheckerTask
clas... | miteshvp/fabric8-analytics-worker | f8a_worker/workers/cvedbsync.py | Python | gpl-3.0 | 4,809 |
# -*- coding: utf-8 -*
import os, StringIO, sys, traceback, tempfile, random, shutil
from status import OutputStatus
from sagenb.misc.format import format_for_pexpect
from worksheet_process import WorksheetProcess
from sagenb.misc.misc import (walltime,
set_restrictive_permissions, set_pe... | topisani/sagenb | sagenb/interfaces/expect.py | Python | gpl-3.0 | 14,073 |
from numpy import linspace, array, arange, tile, dot, zeros
from .gaussian import Gaussian
from ..utils import rk4
class BasisFunctions(object):
def __init__(self, n_basis, duration, dt, sigma):
self.n_basis = n_basis
means = linspace(0, duration, n_basis)
# FIXME:
variances = du... | flowersteam/explauto | explauto/models/motor_primitive.py | Python | gpl-3.0 | 2,072 |
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2015-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Sof... | NoctuaNivalis/qutebrowser | tests/unit/config/test_configexc.py | Python | gpl-3.0 | 3,233 |
# Copyright (C) 2010-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo 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 v... | espressomd/espresso | samples/visualization_cellsystem.py | Python | gpl-3.0 | 2,509 |
# -*- coding: utf-8 -*-
# Copyright (C) 2014 Universidade de Aveiro, DETI/IEETA, Bioinformatics Group - http://bioinformatics.ua.pt/
#
# 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 vers... | bioinformatics-ua/catalogue | emif/developer/urls.py | Python | gpl-3.0 | 3,165 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import budgetdatapackage
import datapackage
import datetime
from nose.tools import raises
from datapackage import compat
class TestBudgetResourc... | trickvi/budgetdatapackage | tests/test_resource.py | Python | gpl-3.0 | 3,567 |
#!/usr/bin/python3
# https://bugzilla.altlinux.org/show_bug.cgi?id=33532
#!/usr/bin/env -S python3 -u
# -*- coding: utf-8 -*-
#
# A simple message-sending script
# TODO: When error: No handlers could be found for logger "pyxmpp.Client"
import os, sys
# python-module-pyxmpp
from pyxmpp2.jid import JID
from pyxmpp2.ja... | vitlav/korinf | share/eterbuild/korinf/helpers/send_via_pyxmpp.py | Python | agpl-3.0 | 849 |
#! usr/bin/env python
# coding: utf8
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
"""metalex is general tool for lexicographic and metalexicographic activities
Copyright (C) 2017 by Elvis MBONING
This program is free software: you can redistri... | Levis0045/MetaLex | metalex/xmlised/makeBalise.py | Python | agpl-3.0 | 26,115 |
# -*- coding: utf-8 -*-
import cgitb
import fnmatch
import io
import logging
import click
import pyjsdoc
import pyjsparser
import sys
from .parser.parser import ModuleMatcher
from .parser.visitor import Visitor, SKIP
from . import jsdoc
class Printer(Visitor):
def __init__(self, level=0):
super(Printer,... | Aravinthu/odoo | doc/_extensions/autojsdoc/__main__.py | Python | agpl-3.0 | 4,294 |
import os
import sys
from src import impl as rlcs
import utils as ut
import analysis as anls
import matplotlib.pyplot as plt
import logging
import pickle as pkl
import time
config = ut.loadConfig('config')
sylbSimFolder=config['sylbSimFolder']
transFolder=config['transFolder']
lblDir=config['lblDir']
onsDir=config['o... | swapnilgt/percPatternDiscovery | rlcs/preAnalysisRun.py | Python | agpl-3.0 | 1,024 |
# -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from shoop.api.factories import viewset_factory
from shoop.core.api.orders i... | janusnic/shoop | shoop/core/api/__init__.py | Python | agpl-3.0 | 983 |
# coding: utf-8
from django.contrib import admin
from hub.models import ExtraUserDetail
from .models import AuthorizedApplication
# Register your models here.
admin.site.register(AuthorizedApplication)
admin.site.register(ExtraUserDetail)
| onaio/kpi | kpi/admin.py | Python | agpl-3.0 | 241 |
# 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 Libidl(AutotoolsPackage):
"""libraries for Interface Definition Language files"""
ho... | iulian787/spack | var/spack/repos/builtin/packages/libidl/package.py | Python | lgpl-2.1 | 614 |
#!/usr/bin/python3
import os, sys, random
pandoraPath = os.getenv('PANDORAPATH', '/usr/local/pandora')
sys.path.append(pandoraPath+'/bin')
sys.path.append(pandoraPath+'/lib')
from pyPandora import Config, World, Agent, SizeInt
class MyAgent(Agent):
gatheredResources = 0
def __init__(self, id):
Age... | montanier/pandora | docs/tutorials/01_src/tutorial_pyPandora.py | Python | lgpl-3.0 | 2,012 |
import unittest
import json
from datetime import datetime
from pymongo import MongoClient
from apps.basic_resource import server
from apps.basic_resource.documents import Article, Comment, Vote
class ResourcePostListFieldItemListField(unittest.TestCase):
"""
Test if a HTTP POST that adds entries to a listfiel... | gitaarik/monkful | tests/tests/basic_resource/post_listfield_item_listfield.py | Python | lgpl-3.0 | 4,664 |
import sys
from services.spawn import MobileTemplate
from services.spawn import WeaponTemplate
from resources.datatables import WeaponType
from resources.datatables import Difficulty
from resources.datatables import Options
from java.util import Vector
def addTemplate(core):
mobileTemplate = MobileTemplate()
mobi... | ProjectSWGCore/NGECore2 | scripts/mobiles/naboo/narglatch_sick.py | Python | lgpl-3.0 | 1,632 |
import sys
from services.spawn import MobileTemplate
from services.spawn import WeaponTemplate
from resources.datatables import WeaponType
from resources.datatables import Difficulty
from resources.datatables import Options
from java.util import Vector
def addTemplate(core):
mobileTemplate = MobileTemplate()
mobi... | agry/NGECore2 | scripts/mobiles/tatooine/water_thief.py | Python | lgpl-3.0 | 1,333 |
from charm.toolbox.pairinggroup import PairingGroup,GT,extract_key
from charm.toolbox.symcrypto import AuthenticatedCryptoAbstraction
from charm.toolbox.ABEnc import ABEnc
from charm.schemes.abenc.abenc_lsw08 import KPabe
debug = False
class HybridABEnc(ABEnc):
"""
>>> from charm.schemes.abenc.abenc_lsw08 imp... | JHUISI/charm | charm/adapters/kpabenc_adapt_hybrid.py | Python | lgpl-3.0 | 2,476 |
from colour import *
from cartesian import *
from timeit import *
def test_colour():
b = colour_create(0, 0, 0, 0)
for i in range(1, 100000):
c = colour_create(.5, .5, .5, 0)
b = colour_add(b, c)
def test_cartesian():
b = cartesian_create(0, 0, 0)
for i in range(1, 50000):
c ... | stinchjack/Python-Raytracer | raytracer/misc/speed.py | Python | lgpl-3.0 | 608 |
from __future__ import unicode_literals
import re
from .mtv import MTVServicesInfoExtractor
from ..utils import (
compat_str,
compat_urllib_parse,
ExtractorError,
float_or_none,
unified_strdate,
)
class ComedyCentralIE(MTVServicesInfoExtractor):
_VALID_URL = r'''(?x)https?://(?:www\.)?cc\.co... | svagionitis/youtube-dl | youtube_dl/extractor/comedycentral.py | Python | unlicense | 9,941 |
# Copyright (c) 2018 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/test_maxout_op.py | Python | apache-2.0 | 5,104 |
# Copyright 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 writing, softwa... | mambocab/python-driver | tests/integration/cqlengine/statements/test_update_statement.py | Python | apache-2.0 | 3,975 |
# Copyright 2015 Intel 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 requir... | nikesh-mahalka/nova | nova/tests/functional/test_legacy_v2_compatible_wrapper.py | Python | apache-2.0 | 3,299 |
__author__ = 'lorenzo'
#
# http://stackoverflow.com/a/29681061/2536357
#
from google.appengine.ext import vendor
# Add any libraries installed in the "lib" folder.
vendor.add('lib')
# run from the project root:
# pip install -t lib -r requirements.txt
# Uncomment if appstat is on
#def webapp_add_wsgi_middleware(app)... | Mec-iS/semantic-data-chronos | appengine_config.py | Python | apache-2.0 | 441 |
#----------------------------------------------------------------------
# Copyright (c) 2008 Board of Trustees, Princeton University
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without restriction, i... | dana-i2cat/felix | modules/resource/manager/stitching-entity/src/handler/geni/v3/extensions/sfa/trust/gid.py | Python | apache-2.0 | 10,122 |
# ==================================================================================================
# Copyright 2011 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | foursquare/commons-old | src/python/twitter/pants/targets/python_tests.py | Python | apache-2.0 | 1,972 |
# coding: utf-8
'''
Name : ThammeGowda Narayanaswamy
USCID: 2074669439
'''
import math
from scipy.stats import multivariate_normal
import numpy as np
from matplotlib import pyplot as plt
import matplotlib.patches as mpatches
import scipy as sp
from scipy import spatial
from scipy import stats
from pprint import pprin... | thammegowda/algos | usc-csci-ml/hw5/src/CSCI567_hw5_fall16.py | Python | apache-2.0 | 9,745 |
# -*- coding: utf-8 -*-
import logging
if __name__ == '__main__':
logging.basicConfig()
_log = logging.getLogger(__name__)
import pyxb.binding.generate
import pyxb.utils.domutils
from xml.dom import Node
import os.path
xst = '''<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:ele... | CantemoInternal/pyxb | tests/trac/test-trac-0218.py | Python | apache-2.0 | 1,347 |
# 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... | bluebreezecf/kafka | tests/kafkatest/services/mirror_maker.py | Python | apache-2.0 | 8,150 |
# Copyright 2014 Red Hat, 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 a... | orbitfp7/nova | nova/tests/unit/test_hacking.py | Python | apache-2.0 | 22,417 |
"""
Test how many times newly loaded binaries are notified;
they should be delivered in batches instead of one-by-one.
"""
from __future__ import print_function
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class ModuleLoadedNotifysTest... | google/llvm-propeller | lldb/test/API/functionalities/target-new-solib-notifications/TestModuleLoadedNotifys.py | Python | apache-2.0 | 4,739 |
import types
import unittest
from collections import namedtuple
import os
import sys
import tempfile
from zipfile import ZipFile, ZipInfo
from utils import jar_utils
sys.path.append('tests/unit/')
import mock
from plugins.systems.config_container_crawler import ConfigContainerCrawler
from plugins.systems.config_host... | canturkisci/agentless-system-crawler | tests/unit/test_plugins.py | Python | apache-2.0 | 72,595 |
"""Worker implementation."""
from __future__ import absolute_import, unicode_literals
from .worker import WorkController
__all__ = ('WorkController',)
| kawamon/hue | desktop/core/ext-py/celery-4.2.1/celery/worker/__init__.py | Python | apache-2.0 | 152 |
import click
def incomplete(package):
click.echo('{} packages not yet implemented'.format(package))
@click.group()
def run():
'''Build packages inside Docker containers.'''
pass
@click.command()
@click.option('--image', '-i', help='image to build in', required=True)
def rpm(image):
package = click.st... | carlwgeorge/pnc | pnc.cli/pnc/cli/__init__.py | Python | apache-2.0 | 850 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import django.utils.timezone
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
('orchestra', '0023_assignment_failed'),
]
operations = [
migrations.AddFiel... | b12io/orchestra | orchestra/migrations/0024_auto_20160325_1916.py | Python | apache-2.0 | 1,224 |
import threading
import time
import re
from openflow.optin_manager.sfa.openflow_utils.CreateOFSliver import CreateOFSliver
from openflow.optin_manager.sfa.openflow_utils.sliver_status import get_sliver_status
from openflow.optin_manager.sfa.openflow_utils.delete_slice import delete_slice
from openflow.optin_manager.sfa... | dana-i2cat/felix | optin_manager/src/python/openflow/optin_manager/sfa/drivers/OFShell.py | Python | apache-2.0 | 8,320 |
# 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
# distributed under the... | priya-pp/Tacker | releasenotes/source/conf.py | Python | apache-2.0 | 8,504 |
#!/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... | apache/bloodhound | installer/setup.py | Python | apache-2.0 | 1,462 |
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: dan@reciprocitylabs.com
# Maintained By: vraj@reciprocitylabs.com
from ggrc import db
from ggrc.models.mixins import (
deferred, Noted, Describ... | hyperNURb/ggrc-core | src/ggrc/models/response.py | Python | apache-2.0 | 5,096 |
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2011,2013 Contributor
#
# 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 t... | stdweird/aquilon | lib/python2.6/aquilon/worker/commands/show_rack_rack.py | Python | apache-2.0 | 1,055 |
# 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 appli... | PaddlePaddle/Paddle | python/paddle/fluid/tests/unittests/test_parallel_executor_seresnext_with_reduce_cpu.py | Python | apache-2.0 | 4,150 |
from a10sdk.common.A10BaseClass import A10BaseClass
class PortReservation(A10BaseClass):
"""Class Description::
DS-Lite Static Port Reservation.
Class port-reservation supports CRUD Operations and inherits from `common/A10BaseClass`.
This class is the `"PARENT"` class for this module.`
:par... | amwelch/a10sdk-python | a10sdk/core/cgnv6/cgnv6_ds_lite_port_reservation.py | Python | apache-2.0 | 2,890 |
# ===============================================================================
# Copyright 2014 Jake Ross
#
# 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... | USGSDenverPychron/pychron | pychron/entry/mass_spec_reverter.py | Python | apache-2.0 | 8,096 |
# coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from textwrap import... | sameerparekh/pants | tests/python/pants_test/backend/core/tasks/test_filter.py | Python | apache-2.0 | 9,825 |
# Copyright 2010 OpenStack Foundation
# Copyright 2011 Piston Cloud Computing, 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.apach... | nkrinner/nova | nova/api/openstack/compute/servers.py | Python | apache-2.0 | 61,851 |
# 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
# distributed under the... | openstack/nova | nova/tests/functional/regressions/test_bug_1896463.py | Python | apache-2.0 | 9,311 |
from pgshovel.interfaces.common_pb2 import (
Column,
Row,
Snapshot,
Timestamp,
)
from pgshovel.utilities.conversions import (
RowConverter,
to_snapshot,
to_timestamp,
)
from tests.pgshovel.streams.fixtures import reserialize
def test_row_conversion():
converter = RowConverter(sorted=Tr... | fuziontech/pgshovel | tests/pgshovel/utilities/conversions.py | Python | apache-2.0 | 1,467 |
# ===============================================================================
# Copyright 2012 Jake Ross
#
# 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/licens... | USGSDenverPychron/pychron | pychron/processing/unmix.py | Python | apache-2.0 | 4,643 |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | DinoCow/airflow | tests/cli/commands/test_webserver_command.py | Python | apache-2.0 | 18,370 |
# -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# 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 ... | les69/calvin-base | calvin/calvinsys/events/timer.py | Python | apache-2.0 | 2,309 |
#!/usr/bin/python
import io
import os
import unittest
import logging
import uuid
from mediafire import MediaFireApi, MediaFireUploader, UploadSession
from mediafire.uploader import UPLOAD_SIMPLE_LIMIT_BYTES
APP_ID = '42511'
MEDIAFIRE_EMAIL = os.environ.get('MEDIAFIRE_EMAIL')
MEDIAFIRE_PASSWORD = os.environ.get('MEDI... | MediaFire/mediafire-python-open-sdk | tests/test_smoke.py | Python | bsd-2-clause | 2,879 |
from nose.tools import (assert_is_none, assert_is_instance, assert_in,
assert_is_not_none, assert_true, assert_false,
assert_equal)
from datetime import datetime
from mongoengine import connect
from qirest_client.model.subject import Subject
from qirest_client.model.uom i... | ohsu-qin/qirest | qirest/test/unit/test_seed.py | Python | bsd-2-clause | 19,873 |
import rppy
import numpy as np
import matplotlib.pyplot as plt
vp1 = 3000
vs1 = 1500
p1 = 2000
e1_1 = 0.0
d1_1 = 0.0
y1_1 = 0.0
e2_1 = 0.0
d2_1 = 0.0
y2_1 = 0.0
d3_1 = 0.0
chi1 = 0.0
C1 = rppy.reflectivity.Cij(vp1, vs1, p1, e1_1, d1_1, y1_1, e2_1, d2_1, y2_1, d3_1)
vp2 = 4000
vs2 = 2000
p2 = 2200
e1_2 = 0.0
d1_2 = 0.... | shear/rppy | temp_test_ortho.py | Python | bsd-2-clause | 1,170 |
"""
WSGI config for skeleton project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION``... | universalcore/unicore-cms-django | project/wsgi.py | Python | bsd-2-clause | 1,424 |
from invoke import task, Collection
@task
def toplevel(ctx):
pass
@task
def subtask(ctx):
pass
ns = Collection(
toplevel,
Collection('a', subtask,
Collection('nother', subtask)
)
)
| mkusz/invoke | tests/_support/deeper_ns_list.py | Python | bsd-2-clause | 212 |
from cStringIO import StringIO
from datetime import datetime
from unidecode import unidecode
from handler import Patobj, PatentHandler
import re
import uuid
import xml.sax
import xml_util
import xml_driver
xml_string = 'ipg050104.xml'
xh = xml_driver.XMLHandler()
parser = xml_driver.make_parser()
parser.setContentHan... | namunu/MBS_Patent | parser_test/test.py | Python | bsd-2-clause | 962 |
# --------------------------------------------------------------------------------------
# Copyright 2016, Benedikt J. Daurer, Filipe R.N.C. Maia, Max F. Hantke, Carl Nettelblad
# Hummingbird is distributed under the terms of the Simplified BSD License.
# ----------------------------------------------------------------... | SPIhub/hummingbird | src/backend/lcls.py | Python | bsd-2-clause | 28,140 |
plot_data.apply(transform_utm_to_wgs, axis=1) | jorisvandenbossche/DS-python-data-analysis | notebooks/_solutions/case2_observations_processing20.py | Python | bsd-3-clause | 45 |
"""
Test basic DataFrame functionality.
"""
import pandas as pd
import pytest
import weld.grizzly as gr
def get_frames(cls, strings):
"""
Returns two DataFrames for testing binary operators.
The DataFrames have columns of overlapping/different names, types, etc.
"""
df1 = pd.DataFrame({
... | weld-project/weld | weld-python/tests/grizzly/core/test_frame.py | Python | bsd-3-clause | 3,167 |
"""
compressible-specific boundary conditions. Here, in particular, we
implement an HSE BC in the vertical direction.
Note: the pyro BC routines operate on a single variable at a time, so
some work will necessarily be repeated.
Also note: we may come in here with the aux_data (source terms), so
we'll do a special ca... | zingale/pyro2 | compressible/BC.py | Python | bsd-3-clause | 8,919 |
#!/usr/bin/env vpython3
# Copyright 2013 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.
"""Unit tests for owners_finder.py."""
import os
import sys
import unittest
if sys.version_info.major == 2:
import mock
else:
f... | CoherentLabs/depot_tools | tests/owners_finder_test.py | Python | bsd-3-clause | 9,645 |
from activitystreams import Activity, Object, MediaLink, ActionLink, Link
import re
import datetime
import time
class AtomActivity(Activity):
pass
# This is a weird enum-like thing.
class ObjectParseMode(object):
def __init__(self, reprstring):
self.reprstring = reprstring
def __repr__(self... | lmorchard/badger | libs/activitystreams/atom.py | Python | bsd-3-clause | 8,938 |
r"""
=====================================================================
The Johnson-Lindenstrauss bound for embedding with random projections
=====================================================================
The `Johnson-Lindenstrauss lemma`_ states that any high dimensional
dataset can be randomly projected i... | bnaul/scikit-learn | examples/miscellaneous/plot_johnson_lindenstrauss_bound.py | Python | bsd-3-clause | 7,785 |
#!/usr/bin/env python
# Software License Agreement (BSD License)
#
# Copyright (c) 2012, Willow Garage, 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... | vladrotea/rosbridge_suite | rosbridge_server/scripts/rosbridge_udp.py | Python | bsd-3-clause | 4,996 |
from bson import ObjectId
import simplejson as json
from eve.tests import TestBase
from eve.tests.test_settings import MONGO_DBNAME
from eve.tests.utils import DummyEvent
from eve import STATUS_OK, LAST_UPDATED, ID_FIELD, ISSUES, STATUS, ETAG
from eve.methods.patch import patch_internal
class TestPatch(TestBase):
... | jzorrof/eve | eve/tests/methods/patch.py | Python | bsd-3-clause | 25,507 |
#!/usr/bin/python
# Copyright (c) 2013 The Native Client 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 argparse
import collections
import datetime
import email.mime.text
import getpass
import os
import re
import smtplib
import... | wilsonianb/nacl_contracts | build/update_pnacl_tool_revisions.py | Python | bsd-3-clause | 16,688 |
"""
Copyright (c) 2011, The MITRE Corporation.
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 of conditions and the... | nemonik/Intellect | intellect/examples/testing/Test.py | Python | bsd-3-clause | 2,750 |
from django.views.generic import *
| akx/coffin | coffin/views/generic/__init__.py | Python | bsd-3-clause | 35 |
"""News Tests"""
| hlzz/dotfiles | graphics/VTK-7.0.0/ThirdParty/Twisted/twisted/news/test/__init__.py | Python | bsd-3-clause | 18 |
from django.contrib.gis.geos import GEOSGeometry, LinearRing, Polygon, Point
from django.contrib.gis.maps.google.gmap import GoogleMapException
from math import pi, sin, cos, log, exp, atan
# Constants used for degree to radian conversion, and vice-versa.
DTOR = pi / 180.
RTOD = 180. / pi
def get_width_height(envelop... | hugs/django | django/contrib/gis/maps/google/zoom.py | Python | bsd-3-clause | 6,509 |
import calendar
import json
from datetime import datetime
from time import gmtime, time
from urlparse import parse_qsl, urlparse
from wsgiref.handlers import format_date_time
import jwt
from browserid.errors import ExpiredSignatureError
from django_statsd.clients import statsd
from receipts import certs
from lib.cef_... | andymckay/zamboni | services/verify.py | Python | bsd-3-clause | 14,089 |
from math import sqrt
import numpy as np
from scipy._lib._util import _validate_int
from scipy.optimize import brentq
from scipy.special import ndtri
from ._discrete_distns import binom
from ._common import ConfidenceInterval
class BinomTestResult:
"""
Result of `scipy.stats.binomtest`.
Attributes
--... | e-q/scipy | scipy/stats/_binomtest.py | Python | bsd-3-clause | 13,154 |
import re
from collections import namedtuple
import sqlparse
from django.db.backends.base.introspection import (
BaseDatabaseIntrospection, FieldInfo as BaseFieldInfo, TableInfo,
)
from django.db.models import Index
from django.utils.regex_helper import _lazy_re_compile
FieldInfo = namedtuple('FieldInfo', BaseFi... | kaedroho/django | django/db/backends/sqlite3/introspection.py | Python | bsd-3-clause | 18,452 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.