code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
# -*- coding: utf-8 -*- """ tiponpython Simulacion de ensayos de acuiferos Copyright 2012 Andres Pias This file is part of tiponpython. tiponpython 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 v...
fenixon/tiponpython
views/ingresarObservaciones.py
Python
gpl-3.0
5,555
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import common class TestHrHolidaysBase(common.TransactionCase): def setUp(self): super(TestHrHolidaysBase, self).setUp() Users = self.env['res.users'].with_context(no_reset_passwor...
ayepezv/GAD_ERP
addons/hr_holidays/tests/common.py
Python
gpl-3.0
1,704
from pycbc.types import zeros, complex64, complex128 import numpy as _np import ctypes import pycbc.scheme as _scheme from pycbc.libutils import get_ctypes_library from .core import _BaseFFT, _BaseIFFT from ..types import check_aligned # IMPORTANT NOTE TO PYCBC DEVELOPERS: # Because this module is loaded automatically...
ligo-cbc/pycbc
pycbc/fft/fftw.py
Python
gpl-3.0
22,427
# KicadModTree 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. # # KicadModTree is distributed in the hope that it will be useful, # bu...
pointhi/kicad-footprint-generator
KicadModTree/nodes/Node.py
Python
gpl-3.0
6,713
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2017 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
cprov/snapcraft
snaps_tests/demos_tests/test_hooks.py
Python
gpl-3.0
1,341
# -*- encoding: utf-8 -*- """Test class for Smart/Puppet Class Parameter :Requirement: Classparameters :CaseAutomation: Automated :CaseLevel: Component :CaseComponent: Puppet :TestType: Functional :Upstream: No """ import json from random import choice from fauxfactory import gen_boolean, gen_integer, gen_strin...
ldjebran/robottelo
tests/foreman/api/test_classparameters.py
Python
gpl-3.0
25,724
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'ImportFile.results_acoustid' db.add_column('importer_importfile', 'results_acoustid', ...
hzlf/openbroadcast
website/apps/importer/migrations/0009_auto__add_field_importfile_results_acoustid__add_field_importfile_resu.py
Python
gpl-3.0
8,507
from click.testing import CliRunner from gandi.cli.core.base import GandiModule from ..compat import unittest, mock from ..fixtures.api import Api from ..fixtures.mocks import MockObject class CommandTestCase(unittest.TestCase): base_mocks = [ ('gandi.cli.core.base.GandiModule.save', MockObject.blank_fu...
GPCsolutions/gandi.cli
gandi/cli/tests/commands/base.py
Python
gpl-3.0
1,238
__author__ = "jing" from scrapy.cmdline import execute execute()
BitTigerInst/Kumamon
zhihu/manage.py
Python
gpl-3.0
68
# -*- coding: utf-8 -*- # Copyright (C) 2012 VT SuperDARN Lab # Full license can be found in LICENSE.txt """tsyganenko module This modules containes the following object(s): Classes ------------------------------------------------------------- tsygTrace Wraps fortran subroutines in one convenient class -----------...
aburrell/davitpy
davitpy/models/tsyganenko/__init__.py
Python
gpl-3.0
21,946
#!/usr/bin/env python #Pools assigned OTUs with identical names and renumbers the remaining distinct #OTUs. Also allows filtering out OTUs with less than "min_cts" in at least #one sample. # Copyright (C) <2012> <Benjamin C. Smith> # # This program is free software: you can redistribute it and/or modify # it ...
benjsmith/mubiomics
scripts/pool_otus.py
Python
gpl-3.0
6,450
# coding: utf-8 from handlers import base from common import functions class IndexHandler(base.BaseHandler): def get(self, *args, **kwargs): self.render('index.html') class InfoHandler(base.SocketHandler): def on_message(self, message): data = functions.jsonToObject(message) if no...
tonybreak/Registered
handlers/index.py
Python
gpl-3.0
2,512
# -*- coding: utf-8 -*- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import absolute_import import pytest import requests from unittest.mock import ...
garbas/mozilla-releng-services
src/shipit_pipeline/tests/test_pipeline.py
Python
mpl-2.0
4,166
# -*- coding: utf-8 -*- # © 2016 Antiun Ingenieria S.L. - Antonio Espinosa # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import models from .hooks import post_init_hook
open-synergy/contract
contract_payment_mode/__init__.py
Python
agpl-3.0
201
#!/usr/bin/env python import os os.environ['DJANGO_SETTINGS_MODULE'] = 'alert.settings' import sys # append these to the path to make the dev machines and the server happy (respectively) execfile('/etc/courtlistener') sys.path.append(INSTALL_ROOT) from django import db from django.core.exceptions import MultipleObje...
shashi792/courtlistener
alert/corpus_importer/resource_org/import_f2.py
Python
agpl-3.0
23,715
#!env/python3 # coding: utf-8 import ipdb import os import json import datetime import uuid import psycopg2 import hashlib import asyncio import ped_parser from config import * from core.framework.common import * from core.model import * # ==================================================================...
REGOVAR/Annso
annso/core/annso/filter_manager.py
Python
agpl-3.0
34,605
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
HBEE/odoo-addons
report_extended_stock/__openerp__.py
Python
agpl-3.0
1,603
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt, cint, cstr from frappe import _ from frappe.model.mapper import get_mapped_doc from frappe.model.document i...
gsnbng/erpnext
erpnext/hr/doctype/salary_structure/salary_structure.py
Python
agpl-3.0
8,133
#!/usr/bin/env python import argparse import os import sys from loomengine import server from loomengine import verify_has_connection_settings, \ get_server_url, verify_server_is_running, get_token from loomengine_utils.connection import Connection from loomengine_utils.exceptions import LoomengineUtilsError cla...
StanfordBioinformatics/loom
client/loomengine/run_label.py
Python
agpl-3.0
7,876
# -*- 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...
ClearCorp/odoo-clearcorp
TODO-9.0/budget/stock.py
Python
agpl-3.0
3,050
# -*- coding: utf-8 -*- from __future__ import unicode_literals from datetime import datetime from django.utils import timezone from mock import patch import pytz from ureport.contacts.models import ContactField, Contact, ReportersCounter from ureport.contacts.tasks import fetch_contacts_task from ureport.locations.m...
eHealthAfrica/ureport
ureport/contacts/tests.py
Python
agpl-3.0
15,406
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license from bson i...
sivakuna-aap/superdesk
server/apps/archive/archive_test.py
Python
agpl-3.0
14,852
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.contrib.gis.db.models.fields class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.CreateModel( name...
ibamacsr/casv
casv/core/migrations/0002_areasoltura.py
Python
agpl-3.0
2,089
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('activities', '0004_manytomany_not_null'), ] operations = [ migrations.AddField( model_name='activity', ...
enjaz/enjaz
activities/migrations/0005_activity_is_approved.py
Python
agpl-3.0
587
#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that i...
ld3300/ola
python/examples/ola_artnet_params.py
Python
lgpl-2.1
1,591
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
mfherbst/spack
var/spack/repos/builtin/packages/fp16/package.py
Python
lgpl-2.1
1,604
# 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) from spack import * class PyBxPython(PythonPackage): """The bx-python project is a python library and associated set...
LLNL/spack
var/spack/repos/builtin/packages/py-bx-python/package.py
Python
lgpl-2.1
1,225
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...
ProjectSWGCore/NGECore2
scripts/mobiles/corellia/greck_smuggler.py
Python
lgpl-3.0
1,924
import re from vFense.operations._constants import vFensePlugins VALID_NOTIFICATION_PLUGINS = ( vFensePlugins.RV_PLUGIN, vFensePlugins.MONITORING_PLUGIN ) INSTALL = 'install' UNINSTALL = 'uninstall' REBOOT = 'reboot' SHUTDOWN = 'shutdown' PASS = 'pass' FAIL = 'fail' CPU = 'cpu' MEM = 'mem' FS = 'filesystem' VALID...
dtklein/vFense
tp/src/notifications/__init__.py
Python
lgpl-3.0
3,134
def itemTemplate(): return ['object/tangible/component/weapon/lightsaber/shared_lightsaber_module_force_crystal.iff'] def customItemName(): return "Shard Of The Serpent" def biolink(): return 1 def customColor1(): return 3 def lootDescriptor(): return 'rarebuffitem' def itemStats(): stats =['pro...
agry/NGECore2
scripts/loot/lootItems/rarelootchest/shard_of_the_serpent.py
Python
lgpl-3.0
538
import os import shutil from makegyp import formula from makegyp.core import gyp from makegyp.core import parser class Openssl(formula.Formula): parser = parser.GccParser() url = 'http://www.openssl.org/source/openssl-1.0.1e.tar.gz' sha256 = 'f74f15e8c8ff11aa3d5bb5f276d202ec18d7246e95f961db76054199c69c1a...
olliwang/makegyp
makegyp/formula/openssl.py
Python
lgpl-3.0
2,054
# -*- coding: iso-8859-1 -*- # # Copyright (C) 2009 Rene Liebscher # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 3 of the License, or (at your option) any # later ver...
arruda/pyfuzzy
fuzzy/doc/structure/dot/__init__.py
Python
lgpl-3.0
826
# This file was automatically generated by SWIG (http://www.swig.org). # Version 1.3.40 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. # This file is compatible with both classic and new-style classes. from sys import version_info if version_info >= (...
getvasanth/QtSpeech
festival/speech_tools/wrappers/python/EST_Track.py
Python
lgpl-3.0
8,370
from dynamic_graph.sot.application.stabilizer.scenarii.seqplay_lqr_twoDof_coupled_stabilizer import SeqPlayLqrTwoDofCoupledStabilizer from dynamic_graph.sot.application.stabilizer.scenarii.hrp2_lqr_twoDof_coupled_stabilizer import HRP2LqrTwoDofCoupledStabilizer from dynamic_graph.sot.core.meta_tasks import GainAdaptive...
amifsud/sot-stabilizer
src/dynamic_graph/sot/application/stabilizer/scenarii/seqplay_lqr_twoDof_coupled_stabilizer_hrp2.py
Python
lgpl-3.0
2,157
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'pyweed/gui/uic/SpinnerWidget.ui' # # Created by: PyQt5 UI code generator 5.6 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_SpinnerWidget(object): def setupUi(self, SpinnerW...
iris-edu/pyweed
pyweed/gui/uic/SpinnerWidget.py
Python
lgpl-3.0
2,674
import re from hashlib import sha256 from vFense.plugins.patching import AppsKey from vFense.plugins.patching._constants import CommonSeverityKeys def build_app_id(name, version): """ Return the 64 character hexdigest of the appid. The app_id is generated by creating a hexdigest based of the nam...
dtklein/vFense
tp/src/plugins/patching/utils/__init__.py
Python
lgpl-3.0
1,957
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2022 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...
psi4/psi4
psi4/driver/psifiles.py
Python
lgpl-3.0
10,284
#coding: utf-8 """ @Author: Well @Date: 2014 - 04 - 16 """ import time def login(self, username, password): browser = self.browser # 输入用户名 browser.find_element_by_id('user_login').send_keys(username) # 输入密码 browser.find_element_by_id('user_pass').send_keys(password) # 点击登录按钮 browser.find_...
neiltest/neil_test_selenium
selenium_test/test_case/login.py
Python
unlicense
433
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( extract_attributes, int_or_none, str_to_int, unified_strdate, url_or_none, ) class YouPornIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?youporn\.com/(?:watch|embed)/(?P<id>\d+)(?:...
rg3/youtube-dl
youtube_dl/extractor/youporn.py
Python
unlicense
7,294
#!/usr/bin/env python # # ESP8266 make firmware image # # Arguments: dir of *.bin # # (c) vad7 import argparse import os argp = argparse.ArgumentParser() argp.add_argument('flashsize', action='store', help='Flash size, kb') argp.add_argument('dir', action='store', help='Directory of *.bin') args = argp.parse_args() ...
vad7/PowerMeter
bin/make_firmware_image.py
Python
unlicense
1,000
import sublime import sublime_plugin from html.entities import codepoint2name as cp2n class EncodeHtmlEntities(sublime_plugin.TextCommand): def run(self, edit, **args): view = self.view for sel in view.sel(): buf = [] for pt in range(sel.begin(), sel.end()): ...
twolfson/sublime-files
Packages/HTML/encode_html_entities.py
Python
unlicense
764
#========================================================================== # # Copyright Insight Software Consortium # # 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...
daviddoria/itkHoughTransform
Wrapping/WrapITK/Languages/Python/Tests/SmoothingRecursiveGaussianImageFilter.py
Python
apache-2.0
1,366
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright [2010] [Anso Labs, 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 ...
movmov/cc
nova/objectstore/image.py
Python
apache-2.0
6,265
# 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...
alexpilotti/python-keystoneclient
keystoneclient/v3/contrib/oauth1/request_tokens.py
Python
apache-2.0
2,659
from gluon.storage import Storage settings = Storage() settings.migrate = True settings.title = 'Syndicate Metadata Service' settings.subtitle = 'Princeton University' settings.author = 'Jude Nelson' settings.author_email = 'jcnelson@cs.princeton.edu' settings.keywords = '' settings.description = 'Web front-end for th...
jcnelson/syndicate
old/md-service/SMDS/web2py/applications/SMDS/models/0.py
Python
apache-2.0
635
import responses import unittest from unittest import skipIf from unittest.mock import mock_open, patch, ANY, call from docopt import docopt, DocoptExit from io import StringIO from collections import OrderedDict import sys import nio_cli.cli as cli from nio_cli.commands.base import Base from nio.block.terminals impor...
nioinnovation/nio-cli
tests/test_cli.py
Python
apache-2.0
27,669
# 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 l...
zhangg/trove
trove/tests/unittests/guestagent/test_mongodb_manager.py
Python
apache-2.0
15,121
# -*- coding: utf-8 -*- """ CSS Selectors based on XPath ============================ This module supports selecting XML/HTML elements based on CSS selectors. See the `CSSSelector` class for details. :copyright: (c) 2007-2012 Ian Bicking and contributors. See AUTHORS for more deta...
frvannes16/Cops-Robbers-Coding-Challenge
src/competition_code/libs/cssselect/__init__.py
Python
apache-2.0
639
# 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...
apache/incubator-superset
superset/db_engine_specs/druid.py
Python
apache-2.0
4,908
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
sipplified/forge
forge/_version.py
Python
apache-2.0
18,448
# -*- coding: utf-8 -*- # # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
dhermes/google-cloud-python
dataproc/google/cloud/dataproc_v1beta2/gapic/transports/workflow_template_service_grpc_transport.py
Python
apache-2.0
8,646
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Defines various data containers for plotting a transect. This file is not used in the current version of `geotransect` but is kept here in case it's useful later. :copyright: 2015 Agile Geoscience :license: Apache 2.0 """ import sys import os import numpy as np from ...
kinverarity1/geotransect
profile_plot.py
Python
apache-2.0
4,222
''' Copyright 2015 University of Auckland 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 agre...
OpenCMISS/neon
src/opencmiss/neon/core/problems/constants.py
Python
apache-2.0
714
# Copyright 2014 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...
vishnu-kumar/ec2-api
ec2api/tests/functional/api/test_snapshots.py
Python
apache-2.0
10,696
# Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
derekchiang/keystone
keystone/openstack/common/rpc/zmq_receiver.py
Python
apache-2.0
1,154
"""The Hunter Douglas PowerView integration.""" import asyncio from datetime import timedelta import logging from aiopvapi.helpers.aiorequest import AioRequest from aiopvapi.helpers.constants import ATTR_ID from aiopvapi.helpers.tools import base64_to_unicode from aiopvapi.rooms import Rooms from aiopvapi.scenes impor...
turbokongen/home-assistant
homeassistant/components/hunterdouglas_powerview/__init__.py
Python
apache-2.0
5,873
#!/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...
ahmed-mahran/hue
apps/beeswax/src/beeswax/server/hive_server2_lib.py
Python
apache-2.0
38,037
from matplotlib.testing.decorators import cleanup from unittest import TestCase from nose_parameterized import parameterized import os import gzip from pandas import read_csv from pyfolio.utils import (to_utc, to_series) from pyfolio.tears import (create_full_tear_sheet, create_simple_tea...
quantopian/pyfolio
pyfolio/tests/test_tears.py
Python
apache-2.0
4,911
# Copyright (c) 2011-2016 Rackspace US, 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 ...
rackerlabs/lunr
lunr/common/lock.py
Python
apache-2.0
5,070
# 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 ...
apache/libcloud
libcloud/test/compute/test_hostvirtual.py
Python
apache-2.0
8,559
# Copyright 2021 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. PYTHON_VERSION_COMPATIBILITY = 'PY2+3' DEPS = [ 'cq', 'properties', 'step', ] def RunSteps(api): api.step('show properties', []) api....
luci/recipes-py
recipe_modules/cq/tests/mode_of_run.py
Python
apache-2.0
825
# Copyright 2013 IBM Corp. # 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...
queria/my-tempest
tempest/api/compute/servers/test_attach_interfaces.py
Python
apache-2.0
6,514
from django.conf import settings from django.utils.module_loading import import_string from .tracing import DjangoTracing from .tracing import initialize_global_tracer try: # Django >= 1.10 from django.utils.deprecation import MiddlewareMixin except ImportError: # Not required for Django <= 1.9, see: ...
kawamon/hue
desktop/core/ext-py/django_opentracing-1.1.0/django_opentracing/middleware.py
Python
apache-2.0
3,646
config = { "interfaces": { "google.bigtable.v2.Bigtable": { "retry_codes": { "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], "non_idempotent": [], }, "retry_params": { "default": { "initial_retry_dela...
dhermes/google-cloud-python
bigtable/google/cloud/bigtable_v2/gapic/bigtable_client_config.py
Python
apache-2.0
2,407
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2016-09-06 01:35 from __future__ import unicode_literals from django.db import migrations, models def load_settings(apps, schema_editor): Setting = apps.get_model("climate_data", "Setting") Setting( name="receiving_data", value="0" ).s...
qubs/data-centre
climate_data/migrations/0014_auto_20160906_0135.py
Python
apache-2.0
506
# Copyright 2011 OpenStack Foundation. # All Rights Reserved. # Copyright 2013 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/licens...
eayunstack/oslo.messaging
oslo/messaging/notify/notifier.py
Python
apache-2.0
11,163
#!/usr/bin/env python # Copyright (c) 2015 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/LIC...
chenyujie/hybrid-murano
tools/lintstack.py
Python
apache-2.0
6,700
# Copyright 2013 Josh Durgin # 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 a...
tomasdubec/openstack-cinder
cinder/tests/api/v1/test_volumes.py
Python
apache-2.0
33,659
# # actions.py: routines that actually run the svn client. # # Subversion is a tool for revision control. # See http://subversion.tigris.org for more information. # # ==================================================================== # Licensed to the Apache Software Foundation (ASF) under one # or more con...
wbond/subversion
subversion/tests/cmdline/svntest/actions.py
Python
apache-2.0
113,603
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
chamikaramj/incubator-beam
sdks/python/apache_beam/io/tfrecordio.py
Python
apache-2.0
10,445
################################################################################ # Copyright (c) 2015-2019 Skymind, Inc. # # This program and the accompanying materials are made available under the # terms of the Apache License, Version 2.0 which is available at # https://www.apache.org/licenses/LICENSE-2.0. # # Unless...
RobAltena/deeplearning4j
pydl4j/pydl4j/downloader.py
Python
apache-2.0
3,179
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. # COM interop utility module import sys import nt from iptest.assert_util import * from iptest.file_util ...
slozier/ironpython2
Src/IronPython/Lib/iptest/cominterop_util.py
Python
apache-2.0
24,101
import re # Python 2/3 compatibility hackery try: unicode except NameError: unicode = str def compile_url(url): clean_url = unicode(url).lstrip(u'/') return re.compile(clean_url) def compile_urls(urls): return [compile_url(expr) for expr in urls]
ghickman/incuna-auth
incuna_auth/middleware/utils.py
Python
bsd-2-clause
272
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from math import log import argh import numpy as np from chemreac import ReactionDiffusion from chemreac.integrate import run from chemreac.util.plotting import plot_solver_linear_error def efield_cb(x, ...
bjodah/chemreac
examples/steady_state.py
Python
bsd-2-clause
4,970
# Generated by Django 3.1.4 on 2020-12-15 15:58 from django.db import migrations def copy_labels(apps, schema_editor): Trek = apps.get_model('trekking', 'Trek') Label = apps.get_model('common', 'Label') for trek in Trek.objects.all(): for label in trek.labels.all(): label2, created =...
makinacorpus/Geotrek
geotrek/trekking/migrations/0024_copy_labels.py
Python
bsd-2-clause
649
#!/usr/bin/env python3 import canmatrix.formats from canmatrix.join import join_frame_by_signal_start_bit files = ["../test/db_B.dbc", "../test/db_A.dbc"] target = join_frame_by_signal_start_bit(files) # # export the new (target)-Matrix for example as .dbc: # canmatrix.formats.dumpp(target, "target.dbc") canmatrix....
ebroecker/canmatrix
examples/exampleJoin.py
Python
bsd-2-clause
357
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), url(r'', include('project.core.urls', namespace='core')), )
pombredanne/django-boilerplate-1
project/urls.py
Python
bsd-2-clause
248
"""Auxiliary functions.""" import cPickle as pickle import os import sys import gzip import urllib import numpy import theano import theano.tensor as T import theano.sandbox.cuda from athenet.utils import BIN_DIR, DATA_DIR def load_data_from_pickle(filename): """Load data from pickle file. :param filename...
heurezjusz/Athena
athenet/utils/misc.py
Python
bsd-2-clause
7,019
# encoding: utf-8 from django.db.utils import IntegrityError, DatabaseError try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() import datetime from south.db import db from south.v2 import SchemaMi...
zekone/dj_pybb
pybb/migrations/0023_auto__add_unique_pollansweruser_poll_answer_user.py
Python
bsd-2-clause
12,958
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opentrain.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
hasadna/OpenTrain
webserver/opentrain/manage.py
Python
bsd-3-clause
252
#!/usr/bin/env python # 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 glob import json import os import pipes import shutil import subprocess import sys script_dir = os.path.dirname(os.path.realpa...
ds-hwang/chromium-crosswalk
build/vs_toolchain.py
Python
bsd-3-clause
13,647
# @Float(label="Diameter of the circle ROI (pixel)", value=7) circle_diam from ij.plugin.frame import RoiManager from ij.gui import OvalRoi rm = RoiManager.getInstance() new_rois = [] for roi in rm.getRoisAsArray(): assert roi.getTypeAsString() == 'Point', "ROI needs to be a point" x_center = roi.getContainedPoint...
hadim/fiji_tools
src/main/resources/script_templates/Hadim_Scripts/ROI/Circle_ROI_Builder.py
Python
bsd-3-clause
587
#!/usr/bin/python # Copyright 2008-2010 WebDriver committers # Copyright 2008-2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
gx1997/chrome-loongson
third_party/webdriver/python/test/selenium/webdriver/common/correct_event_firing_tests.py
Python
bsd-3-clause
5,540
""" This module attempts to make it easy to create VTK-Python unittests. The module uses unittest for the test interface. For more documentation on what unittests are and how to use them, please read these: http://www.python.org/doc/current/lib/module-unittest.html http://www.diveintopython.org/roman_divein.h...
cjh1/vtkmodular
Wrapping/Python/vtk/test/Testing.py
Python
bsd-3-clause
17,259
#!/usr/bin/env python from distutils.core import setup DISTNAME = 'tract_querier' DESCRIPTION = \ 'WMQL: Query language for automatic tract extraction from '\ 'full-brain tractographies with '\ 'a registered template on top of them' LONG_DESCRIPTION = open('README.md').read() MAINTAINER = 'Demian Wasserman...
oesteban/tract_querier
setup.py
Python
bsd-3-clause
1,691
if __name__ == '__main__': import instance_occlsegm_lib dataset = instance_occlsegm_lib.datasets.apc.arc2017.JskARC2017DatasetV1( 'train') instance_occlsegm_lib.datasets.view_class_seg_dataset(dataset)
start-jsk/jsk_apc
demos/instance_occlsegm/tests/datasets_tests/apc_tests/arc2017_tests/jsk_tests/check_jsk_arc2017_v1_dataset.py
Python
bsd-3-clause
222
#!/usr/bin/env vpython3 # Copyright 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 collections import itertools import logging import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.d...
CoherentLabs/depot_tools
tests/gclient_eval_unittest.py
Python
bsd-3-clause
35,099
""" Problem Statement ----------------- Assume that there is a large data set of mostly unique samples where a hidden binary variable is dependent on the number of similar samples that exist in the set (i.e. a sample is called positive if it has many neighbors) and that our goal is to label all samples in this set. I...
escherba/lsh-hdc
lsh_hdc/ranking.py
Python
bsd-3-clause
19,946
#from https://github.com/serge-sans-paille/pythran/issues/1229 #runas import numpy as np; x = np.arange(3., 10.); empirical(x, 3., .5) import numpy as np #pythran export empirical(float[:], float, float) def empirical(ds, alpha, x): sds = np.sort(ds) ds_to_the_alpha = sds**alpha fractions = ds_to_the_alpha...
serge-sans-paille/pythran
pythran/tests/cases/empirical.py
Python
bsd-3-clause
678
import numpy as np from nose.tools import raises from skimage.filter import median_filter def test_00_00_zeros(): '''The median filter on an array of all zeros should be zero''' result = median_filter(np.zeros((10, 10)), 3, np.ones((10, 10), bool)) assert np.all(result == 0) def test_00_01_all_masked()...
chintak/scikit-image
skimage/filter/tests/test_ctmf.py
Python
bsd-3-clause
3,895
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'BatchLocationStatus.non_response' db.add_column(u'survey_batchlocationstatus', 'non_response...
antsmc2/mics
survey/migrations/0119_auto__add_field_batchlocationstatus_non_response.py
Python
bsd-3-clause
36,447
#!/usr/bin/python # -*- coding: utf-8 -*- # moldynplot.StateProbFigureManager.py # # Copyright (C) 2015-2017 Karl T Debiec # All rights reserved. # # This software may be modified and distributed under the terms of the # BSD license. See the LICENSE file for details. """ Generates one or more state probabilit...
KarlTDebiec/myplotspec_sim
moldynplot/StateProbFigureManager.py
Python
bsd-3-clause
7,284
from .. import fixtures import unittest import arbor as arb """ tests for (dynamically loaded) catalogues """ class recipe(arb.recipe): def __init__(self): arb.recipe.__init__(self) self.tree = arb.segment_tree() self.tree.append(arb.mnpos, (0, 0, 0, 10), (1, 0, 0, 10), 1) self.pro...
halfflat/nestmc-proto
python/test/unit/test_catalogues.py
Python
bsd-3-clause
2,948
# Author: Travis Oliphant # 1999 -- 2002 from __future__ import division, print_function, absolute_import import warnings import threading from . import sigtools from scipy._lib.six import callable from scipy._lib._version import NumpyVersion from scipy import linalg from scipy.fftpack import (fft, ifft, ifftshift, ...
witcxc/scipy
scipy/signal/signaltools.py
Python
bsd-3-clause
81,684
import inspect import cytoolz import toolz from types import BuiltinFunctionType from cytoolz import curry, identity, keyfilter, valfilter, merge_with @curry def isfrommod(modname, func): mod = getattr(func, '__module__', '') or '' return modname in mod def test_class_sigs(): """ Test that all ``cdef c...
ljwolf/cytoolz
cytoolz/tests/test_embedded_sigs.py
Python
bsd-3-clause
2,950
""" ================================================== Explicit feature map approximation for RBF kernels ================================================== .. currentmodule:: sklearn.kernel_approximation An example shows how to use :class:`RBFSampler` to appoximate the feature map of an RBF kernel for classification...
sgenoud/scikit-learn
examples/plot_kernel_approximation.py
Python
bsd-3-clause
6,494
"""django-cms-redirects""" VERSION = (1, 0, 6) __version__ = "1.0.6"
vovanbo/djangocms-redirects
cms_redirects/__init__.py
Python
bsd-3-clause
69
#!/usr/bin/env python import gtk import Editor def main(filenames=[]): """ start the editor, with a new empty document or load all *filenames* as tabs returns the tab object """ Editor.register_stock_icons() editor = Editor.EditorWindow() tabs = map(editor.load_document, filenames) ...
carloscanova/python-odml
odml/gui/__main__.py
Python
bsd-3-clause
845
# Merge stimuli information from spike2 mat file into Kwik file import h5py as h5 import tables import os import numpy as np import argparse import glob try: import simplejson as json except ImportError: import json from klusta_pipeline.dataio import load_recordings, save_info, load_digmark, load_stim_info from klu...
gentnerlab/klusta-pipeline
klusta_pipeline/merge_stim_kwik.py
Python
bsd-3-clause
7,008
""" Module for abstract serializer/unserializer base classes. """ try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.db import models from django.utils.encoding import smart_str, smart_unicode class SerializationError(Exception): """Something bad happened dur...
diofeher/django-nfa
django/core/serializers/base.py
Python
bsd-3-clause
5,533