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
from entity_reader import EntityReader import textract from dataset_importer.utils import HandleDatasetImportException class DocXReader(EntityReader): @staticmethod def get_features(**kwargs): directory = kwargs['directory'] for file_path in DocXReader.get_file_list(directory, 'docx'): ...
texta-tk/texta
dataset_importer/document_reader/readers/entity/docx_reader.py
Python
gpl-3.0
870
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
sharifmamun/ansible
lib/ansible/plugins/strategies/__init__.py
Python
gpl-3.0
23,205
#!/usr/bin/python # # Copyright (c) 2017 Zim Kalinowski, <zikalino@microsoft.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
konstruktoid/ansible-upstream
lib/ansible/modules/cloud/azure/azure_rm_postgresqlserver.py
Python
gpl-3.0
13,248
""" Test some SBValue APIs. """ import os, time import re import unittest2 import lldb, lldbutil from lldbtest import * class ValueAPITestCase(TestBase): mydir = os.path.join("python_api", "value") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test @dsym_tes...
s20121035/rk3288_android5.1_repo
external/lldb/test/python_api/value/TestValueAPI.py
Python
gpl-3.0
5,371
import numpy as np from mathutils import Matrix, Vector import bpy from bpy.props import FloatProperty, EnumProperty, BoolProperty, IntProperty from sverchok.node_tree import SverchCustomTreeNode from sverchok.data_structure import updateNode, zip_long_repeat, ensure_nesting_level from sverchok.utils.curve import SvC...
DolphinDream/sverchok
nodes/curve/zero_twist_frame.py
Python
gpl-3.0
4,460
# -*- coding: utf-8 -*- import system_tests class FujiTags(metaclass=system_tests.CaseMeta): filesAndExpectedOutput = [ ("FujiTagsDRangeAutoRating1.jpg", """Exif.Fujifilm.ShadowTone SLong 1 0 Exif.Fujifilm.HighlightTone SLong 1 0 Exif.Fujifilm.Rating ...
AlienCowEatCake/ImageViewer
src/ThirdParty/Exiv2/exiv2-0.27.5-Source/tests/bugfixes/github/test_fuji_tags.py
Python
gpl-3.0
2,665
# Your search indexes here. # See: http://django-haystack.readthedocs.org/en/latest/searchindex_api.html
labhackercd/colab-edemocracia-plugin
src/colab_edemocracia/search_indexes.py
Python
gpl-3.0
107
import copy import datetime import json import logging import os import re import subprocess import sys import time import uuid import warnings from elastalert.alerts import Alerter, BasicMatchString, DateTimeEncoder from elastalert.util import EAException from elastalert.util import elastalert_logger from elastalert...
thomashaw/SecGen
modules/utilities/unix/logging/elastalert/files/exec_alerter.py
Python
gpl-3.0
2,223
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
XeCycle/indico
bin/utils/zodb/sizeIncreasing_stats.py
Python
gpl-3.0
4,918
# coding=utf-8 import os.path as op from .. import nodes def remove_dead(nodelist): """ Remove nodes that no longer exist. """ paths = [node["path"] for node in nodelist] for path in paths: if not op.exists(path): nodes.remove(nodelist, path) return nodelist def register(pip...
termoshtt/DataProcessor
lib/dataprocessor/pipes/remove_dead.py
Python
gpl-3.0
473
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
cschenck/blender_sim
fluid_sim_deps/blender-2.69/2.69/scripts/startup/bl_ui/properties_data_lamp.py
Python
gpl-3.0
12,966
# -*- coding: utf-8 -*- from __future__ import division __version__ = "0.4.9" # # This file is part of the open-source MarkWrite application. # # 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, ei...
isolver/OpenHandWrite
src/markwrite/markwrite/__init__.py
Python
gpl-3.0
1,763
# Copyright (c) 2013 AnsibleWorks, Inc. # # This file is part of Ansible Commander. # # Ansible Commander 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. # # Ansible Commander is di...
mmoya/ansible-commander
lib/main/base_views.py
Python
gpl-3.0
13,613
""" Copyright 2014-2021 Vincent Texier <vit@free.fr> DuniterPy 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. DuniterPy is distributed in...
ucoin-io/ucoin-python-api
duniterpy/documents/__init__.py
Python
gpl-3.0
1,119
""" Copyright 2018 Akshay Agrawal 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...
SteveDiamond/cvxpy
cvxpy/atoms/prod.py
Python
gpl-3.0
4,052
#!/usr/bin/env python # POCSAG Multichannel Realtime Decoder # Copyright (c) 2012 iZsh -- izsh at fail0verflow.com # # 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 Lice...
ckuethe/pocsag-mrt
pocsag-mrt.py
Python
gpl-3.0
19,511
# Copyright (C) 2016 ycmd contributors. # # This file is part of ycmd. # # ycmd 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. # # ycm...
indianajohn/ycmd
ycmd/tests/completer_test.py
Python
gpl-3.0
2,001
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2017-2020 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 S...
The-Compiler/qutebrowser
qutebrowser/mainwindow/statusbar/backforward.py
Python
gpl-3.0
1,784
#-*- coding: utf-8 -*- # #copyright 2010 Dominik "Socek" Długajczyk # #This file is part of Gadu History. # #Gadu History 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 ...
socek/Gadu-History
lib/gui/text.py
Python
gpl-3.0
7,499
# 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/. """Signing, verification and key support for MAR files.""" from construct import Int32ub from construct import Int64ub fr...
mozilla/build-mar
src/mardor/signing.py
Python
mpl-2.0
6,416
#!/usr/bin/python import os from test_action_runner import TestActionRunner def main(): print 'This is example!' for var in ['TEST_PRE_VAR', 'TEST_VAR', 'TEST_POST_VAR', 'TEAM']: if var in os.environ: print '[%s] is [%s]' % (var, os.environ[var]) else: print 'No [%s]'...
zapion/combo-runner
examples/test/run_test.py
Python
mpl-2.0
673
""" Provide connection with Marketplace API """ import json import logging import time import urllib import oauth2 as oauth import requests log = logging.getLogger('marketplace.%s' % __name__) class NotExpectedStatusCode(requests.exceptions.HTTPError): """ Raise if status code returned from API is not the expe...
bobsilverberg/Marketplace.Python
marketplace/connection.py
Python
mpl-2.0
2,912
""" Tests for Blocks Views """ import json import ddt from django.test import RequestFactory, TestCase from django.core.urlresolvers import reverse import httpretty from student.tests.factories import UserFactory from third_party_auth.tests.utils import ThirdPartyOAuthTestMixin, ThirdPartyOAuthTestMixinGoogle from ...
devs1991/test_edx_docmode
lms/djangoapps/oauth_dispatch/tests/test_views.py
Python
agpl-3.0
8,685
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, 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. import os from django.core.exceptions import ImproperlyConfigured from shu...
hrayr-artunyan/shuup
shuup_workbench/settings/__init__.py
Python
agpl-3.0
1,393
# -*- encoding: utf-8 -*- # Odoo, Open Source Management Solution # Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es> # # 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 versio...
Antiun/odoo-grupoesoc-addons
partner_projects/__openerp__.py
Python
agpl-3.0
1,264
# -*- coding: utf-8 -*- ########################################################################## # # # Copyright 2015 Lorenzo Battistini - Agile Business Group # # About license, see __openerp__.py ...
Eficent/manufacture-reporting
mrp_repair_layout/__init__.py
Python
agpl-3.0
496
"""DuplicateAnalysis uses Analysis as it's base. Until that's fixed there is some confusion. """ from openerp import fields, models from base_olims_model import BaseOLiMSModel from fields.string_field import StringField from fields.widget.widget import StringWidget from fields.boolean_field import BooleanField from op...
yasir1brahim/OLiMS
models/duplicateanalysis.py
Python
agpl-3.0
6,784
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under ...
andhit-r/koi_base
ar_base_perusahaan/object_module/status_perusahaan.py
Python
agpl-3.0
1,459
import json from graphviz import Digraph with open('events.json') as events_file: events = json.load(events_file) handlers = events["handlers"] flows = events["flows"] publishable = events["publishable"] missions = events["missions"] process_conclusion = events["process_conclusion"] def is_publishable(name): ...
renatomassaro/Helix
graph.py
Python
agpl-3.0
2,645
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
uclouvain/OSIS-Louvain
program_management/publisher.py
Python
agpl-3.0
1,375
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
kawula-openerp-indonesia/koi_base
ar_base_waktu/date_tools.py
Python
agpl-3.0
2,281
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can redistribute it and/or mo...
Rademade/taiga-back
taiga/projects/services/transfer.py
Python
agpl-3.0
3,556
""" Tests for the Shopping Cart Models """ from factory import DjangoModelFactory from mock import patch from django.core import mail from django.conf import settings from django.db import DatabaseError from django.test import TestCase from django.test.utils import override_settings from xmodule.modulestore.tests.dja...
morpheby/levelup-by
lms/djangoapps/shoppingcart/tests/test_models.py
Python
agpl-3.0
13,026
# -*- coding: utf-8 -*- """Video is ungraded Xmodule for support video content. It's new improved video module, which support additional feature: - Can play non-YouTube video sources via in-browser HTML5 video player. - YouTube defaults to HTML5 mode from the start. - Speed changes in both YouTube and non-YouTube video...
jbzdak/edx-platform
common/lib/xmodule/xmodule/video_module/video_module.py
Python
agpl-3.0
39,080
#!env/python3 # coding: utf-8 import os from core.framework.common import * from core.framework.postgresql import * Report = Base.classes.report
REGOVAR/regovar-server
annso/core/model/report.py
Python
agpl-3.0
151
# -*- coding: utf-8 -*- """ ZUGBRUECKE Calling routines in Windows DLLs from Python scripts running on unixlike systems https://github.com/pleiszenburg/zugbruecke tests/test_callback_optional.py: Optional callback routines as arguments Required to run on platform / side: [UNIX, WINE] Copyright (C) 2017-2019 Seb...
pleiszenburg/zugbruecke
tests/test_callback_optional.py
Python
lgpl-2.1
3,143
#!/usr/bin/python # A very simple process to combine the floating base estimate # with the kinematics and output the combined message # input: POSE_BODY, FORCE_TORQUE and CORE_ROBOT_STATE output: EST_ROBOT_STATE # import os,sys import lcm import time from lcm import LCM from math import * import numpy as np import ma...
mitdrc/pronto
motion_estimate/scripts/state-sync-simple.py
Python
lgpl-2.1
2,596
# -*- coding: utf-8 -*- # Copyright (C) 2015 KillerInstinct # # 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 your option) any later version. # # This p...
lixiangning888/whole_project
modules/signatures_merge_tmp/darkcomet_regkeys.py
Python
lgpl-3.0
1,454
import sys def setup(core, object): object.setStfFilename('static_item_n') object.setStfName('item_necklace_set_medic_utility_a_01_01') object.setDetailFilename('static_item_d') object.setDetailName('item_necklace_set_medic_utility_a_01_01') object.setStringAttribute('class_required', 'Medic') object.setIntAttri...
ProjectSWGCore/NGECore2
scripts/object/tangible/wearables/necklace/item_necklace_set_medic_utility_a_01_01.py
Python
lgpl-3.0
1,055
# -*- coding: utf-8 -*- from django.conf.urls.defaults import patterns, url urlpatterns = patterns('djanjinja_test.shortcuts.views', url(r'^plain/$', 'plain', name='shortcuts-plain'), url(r'^context/$', 'context', name='shortcuts-context'), url(r'^req_context/$', 'req_context', name='shortcuts-req_contex...
adamnfish/DjanJinja2
djanjinja_test/shortcuts/urls.py
Python
unlicense
396
import unittest import tempfile import inspect import shutil import sys import os import re from os.path import basename, dirname, exists, join, normpath from robot.errors import DataError from robot.utils import abspath, JYTHON, WINDOWS, PY3 from robot.utils.importer import Importer, ByPathImporter from robot.utils.a...
alexandrul-ci/robotframework
utest/utils/test_importer_util.py
Python
apache-2.0
20,230
# Copyright 2010-2012 Institut Mines-Telecom # # 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...
MarouenMechtri/CNG-Manager
pyocni/TDD/fake_Data/entities.py
Python
apache-2.0
5,785
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from django.utils import text assert "42" == text.slugify(42)
tdyas/pants
contrib/mypy/examples/src/python/mypy_plugin/invalid.py
Python
apache-2.0
195
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for the Virtual Hard Disk image path specification implementation.""" import unittest from dfvfs.path import vhdi_path_spec from tests.path import test_lib class VHDIPathSpecTest(test_lib.PathSpecTestCase): """Tests for the Virtual Hard Disk image path speci...
joachimmetz/dfvfs
tests/path/vhdi_path_spec.py
Python
apache-2.0
1,141
# Copyright (c) 2020 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/utils/download.py
Python
apache-2.0
11,957
# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
maisem/test-infra
gubernator/filters.py
Python
apache-2.0
6,694
import datetime import difflib import flask import flask.json import sqlalchemy import pytz from www import server from www import login @server.app.route('/history') @login.require_mod def history(session): page = flask.request.values.get('page', 'all') assert page in ('responses', 'explanations', 'spam', 'link_s...
andreasots/lrrbot
www/history.py
Python
apache-2.0
7,065
from __future__ import division from __future__ import print_function from past.utils import old_div import sys sys.path.insert(1, "../../../") import h2o from tests import pyunit_utils from h2o.estimators.glm import H2OGeneralizedLinearEstimator as glm # In this test, I will check and make sure the scoring history me...
michalkurka/h2o-3
h2o-py/tests/testdir_algos/glm/pyunit_PUBDEV_7968_scoring_history_glm_multinomial_lambda_search_generate_scoring_history_cv.py
Python
apache-2.0
3,914
async def prep(wallet_handle, my_vk, their_vk, msg): msg = bytes(msg, "utf-8") encrypted = await crypto.auth_crypt(wallet_handle, my_vk, their_vk, msg) # encrypted = await crypto.anon_crypt(their_vk, msg) print('encrypted = %s' % repr(encrypted)) with open('message.dat', 'wb') as f: f.write(...
Artemkaaas/indy-sdk
docs/how-tos/send-secure-msg/python/step5.py
Python
apache-2.0
361
import unittest, time, sys sys.path.extend(['.','..','py']) import h2o, h2o_cmd, h2o_hosts, h2o_glm, h2o_import as h2i import h2o_browse as h2b argcaseList = [ { 'response': 106, 'family': 'gaussian', 'lambda': 1.0E-5, 'max_iter': 50, 'n_folds': 0, 'alpha': 1, ...
janezhango/BigDataMachineLearning
py/testdir_single_jvm/test_GLM2_hhp107_01_browse.py
Python
apache-2.0
1,588
# Copyright 2013-2014 Massachusetts Open Cloud Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the # License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
henn/hil
tests/deployment/native_networks.py
Python
apache-2.0
4,640
import sys from textwrap import dedent import py import pytest import tox import tox.config from tox.config import * # noqa from tox.venv import VirtualEnv class TestVenvConfig: def test_config_parsing_minimal(self, tmpdir, newconfig): config = newconfig([], """ [testenv:py1] """) ...
kimh/circleci-python-sandbox
tox/tests/test_config.py
Python
apache-2.0
60,658
from __future__ import unicode_literals from __future__ import absolute_import import logging import json import requests from pypuppetdb.errors import ( ImproperlyConfiguredError, EmptyResponseError, UnsupportedVersionError, APIError, ) log = logging.getLogger(__name__) API_VERSIONS = { 2:...
amwilson/pypuppetdb
pypuppetdb/api/__init__.py
Python
apache-2.0
13,470
import copy, time from threading import RLock from . import ac_server_protocol from .ac_server_helpers import DictToClass class ACUdpMonitor: def __init__(self): # pluginId = 0 -> this plugin # pluginId = 1 -> proxied plugin self.HistoryInfo = DictToClass self.InfoRequest ...
minolin/acplugins
acplugins4python/acplugins4python/ac_server_udp_monitor.py
Python
apache-2.0
5,801
# Copyright (c) 2014 VMware, 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...
jumpstarter-io/nova
nova/virt/vmwareapi/constants.py
Python
apache-2.0
1,183
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tool to validate artifact definitions.""" import argparse import glob import logging import os import sys from artifacts import definitions from artifacts import errors from artifacts import reader from artifacts import registry class ArtifactDefinitionsValidator(obj...
joachimmetz/artifacts
tools/validator.py
Python
apache-2.0
21,190
"""Core classes and exceptions for Simple-Salesforce""" # has to be defined prior to login import DEFAULT_API_VERSION = '38.0' import logging import warnings import requests import json import re from collections import namedtuple try: from urlparse import urlparse, urljoin except ImportError: # Python 3+ ...
kawamon/hue
desktop/core/ext-py/simple-salesforce-0.74.2/simple_salesforce/api.py
Python
apache-2.0
32,017
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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 wr...
rgrover/mbed
tools/options.py
Python
apache-2.0
2,276
# -*- coding: utf-8 -*- from nose import tools as nt from framework.auth.core import Auth from api.base.settings.defaults import API_BASE from api_tests import utils as api_utils from tests.base import ApiTestCase from osf_tests.factories import ( ProjectFactory, AuthUserFactory, ) class TestFileFiltering(...
monikagrabowska/osf.io
api_tests/files/views/test_file_list.py
Python
apache-2.0
4,210
# # 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...
apache/airflow
airflow/migrations/versions/127d2bf2dfa7_add_dag_id_state_index_on_dag_run_table.py
Python
apache-2.0
1,300
# Copyright 2016 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 applicable law or ag...
YoshikawaMasashi/magenta
magenta/music/sequences_lib_test.py
Python
apache-2.0
22,295
# Copyright (c) 2021 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...
luotao1/Paddle
python/paddle/fluid/tests/unittests/check_nan_inf_base_dygraph.py
Python
apache-2.0
3,187
# 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/airflow
airflow/providers/amazon/aws/sensors/batch.py
Python
apache-2.0
2,895
from django import template register = template.Library() @register.filter(name='re_poject_vector') def re_poject_vector(lists): print lists #return dict['file_name'] @register.filter(name='file_format') def re_rpoject_raster(dict): return dict['file_format']
gismanli/gisweb
gisweb_app/templatetags/re-project.py
Python
apache-2.0
275
# Copyright 2020 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
googleapis/python-aiplatform
.sample_configs/param_handlers/get_model_evaluation_text_sentiment_analysis_sample.py
Python
apache-2.0
736
# SPDX-License-Identifier: Apache-2.0 # Copyright Contributors to the Rez Project """ Functions for converting python distributions to rez packages. """ from __future__ import print_function from rez.exceptions import RezSystemError import pkg_resources import shutil import sys import os import os.path import textwr...
instinct-vfx/rez
src/rez/utils/py_dist.py
Python
apache-2.0
8,287
# sql/operators.py # Copyright (C) 2005-2020 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php # This module is part of SQLAlchemy and is released under # the MIT License: http:/...
kawamon/hue
desktop/core/ext-py/SQLAlchemy-1.3.17/lib/sqlalchemy/sql/operators.py
Python
apache-2.0
42,548
import ast import json import hashlib import urllib import base64 from django.test import TestCase from django.conf import settings from django.core.urlresolvers import reverse from lrs import models, views class ActivityProfileTests(TestCase): test_activityId1 = 'act:act-1' test_activityId2 = 'act:act-2' ...
ELSUru/ADL_LRS
lrs/tests/ActivityProfileTests.py
Python
apache-2.0
33,532
# -*- coding: utf-8 -*- # Copyright 2014 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
prmtl/fuel-web
nailgun/nailgun/api/v1/validators/graph.py
Python
apache-2.0
3,521
__author__ = 'greg' import random import math import sys import gc steps = ["centered_in_crosshairs", "subtracted", "circular", "centered_in_host"] gc.set_debug(gc.DEBUG_LEAK) def create_annotations(): annotations = [] end_point = random.randint(0,4) for i in range(end_point): annotations.append({...
zooniverse/aggregation
Stargazing_2015/loadtesting.py
Python
apache-2.0
2,065
#!/usr/bin/env python # Copyright 2016 Criteo # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
Thib17/biggraphite
biggraphite/accessor_cache.py
Python
apache-2.0
3,879
# 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...
openstack/python-openstackclient
openstackclient/tests/functional/compute/v2/test_aggregate.py
Python
apache-2.0
5,960
import datetime from unittest import mock from django.conf import settings from django.core import mail from django.utils.timezone import now from confirmation.models import ( Confirmation, confirmation_url, create_confirmation_link, generate_key, ) from zerver.lib.actions import ( do_deactivate_r...
zulip/zulip
zerver/tests/test_email_change.py
Python
apache-2.0
10,810
#!/usr/bin/env python # # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
frlen/simian
src/simian/mac/munki/handlers/pkgsinfo.py
Python
apache-2.0
7,437
################################################################################ # 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...
lincoln-lil/flink
flink-python/pyflink/table/tests/test_udf.py
Python
apache-2.0
38,764
# Copyright 2012 Anton Beloglazov # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
fr34k8/openstack-neat
neat/locals/overload/mhod/bruteforce.py
Python
apache-2.0
3,071
import unittest import re class RegularExpressionRegression(unittest.TestCase): def test_basic(self): frp = re.compile(r'old') self.assertEqual('Something new', frp.sub('new', 'Something old')) def test_search(self): self.assertEqual(re.search("(abc){1}", ""), None) self.asser...
tempbottle/dlr
Src/Hosts/Silverlight/Tests/tests/regressions/test_re.py
Python
apache-2.0
1,710
# Copyright 2013 IBM Corp # # Author: Tong Li <litong01@us.ibm.com> # # 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 ...
shaunaks/python-monasca
monasca/dispatcher/__init__.py
Python
apache-2.0
849
""" Current Fabric version constant plus version pretty-print method. This functionality is contained in its own module to prevent circular import problems with ``__init__.py`` (which is loaded by setup.py during installation, which in turn needs access to this version information.) """ from subprocess import Popen, P...
alex/fabric
fabric/version.py
Python
bsd-2-clause
2,985
import unittest from openrunlog import models, util fbid = '1264253926' email = 'dtwwtd@gmail.com' class BCryptTests(unittest.TestCase): def test_bcrypt(self): password = 'password' self.assertTrue(util.check_pwd(password, util.hash_pwd(password))) class ImageHTMLTests(unittest.TestCase): ...
JsonChiu/openrunlog
openrunlog/tests/test_util.py
Python
bsd-2-clause
1,673
from django.conf.urls.defaults import * from django.contrib import admin urlpatterns = patterns('', (r"^housekeeping/statistics/", "housekeeping.statistics.stats"), # /housekeeping/repair_mptt/contacts_and_people.Entity/ (r"^housekeeping/repair_mptt/(?P<slug>[-\w\\.]+)/$", "housekeeping.repair_mptt.fix"),...
evildmp/Arkestra
housekeeping/urls.py
Python
bsd-2-clause
731
""" Commands provided by the smt tool. Each command corresponds to a function in this module. :copyright: Copyright 2006-2015 by the Sumatra team, see doc/authors.txt :license: BSD 2-clause, see LICENSE for details. """ from __future__ import print_function from __future__ import unicode_literals from builtins impor...
dpad/sumatra
sumatra/commands.py
Python
bsd-2-clause
38,454
#Swami skel module for the Swami Control Panel LightDMConf = "/etc/lightdm/lightdm.conf" XsessionsDir = "/usr/share/xsessions" import esudo.esudo as esudo from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL from efl import elementary from efl.elementary.button import Button from efl.elementary.box import Box from ...
JeffHoogland/swami
swami_lightdm/swami_lightdm.py
Python
bsd-2-clause
4,525
import numpy from scipy.sparse import issparse import Orange.data from Orange.statistics import distribution, basic_stats from Orange.util import Reprable from .transformation import Transformation, Lookup __all__ = ["ReplaceUnknowns", "Average", "DoNotImpute", "DropInstances", "Model", "AsValue", "Random"...
cheral/orange3
Orange/preprocess/impute.py
Python
bsd-2-clause
11,137
# Licensed under a 3-clause BSD style license - see PYFITS.rst import sys import mmap import warnings import numpy as np from .base import DELAYED, _ValidHDU, ExtensionHDU, BITPIX2DTYPE, DTYPE2BITPIX from astropy.io.fits.header import Header from astropy.io.fits.util import _is_pseudo_unsigned, _unsigned_zero, _is_i...
aleksandr-bakanov/astropy
astropy/io/fits/hdu/image.py
Python
bsd-3-clause
46,543
from __future__ import unicode_literals from importlib import import_module from django.conf import settings from ahem.loader import notification_registry from ahem.settings import AHEM_BACKENDS def get_notification(notification_name): return notification_registry[notification_name]() def get_backend(backend...
vintasoftware/Ahem
ahem/utils.py
Python
bsd-3-clause
1,219
# -*- coding: utf-8 -*- from django.conf.urls import patterns, include, url from django.contrib.admin.views.decorators import staff_member_required from django_lean.experiments.views import experiment_details, list_experiments urlpatterns = patterns('django_lean.experiments.views', url(r'^(?P<experiment_name>.+)...
uhuramedia/django-lean
django_lean/experiments/admin_urls.py
Python
bsd-3-clause
503
from django.test import TestCase from django.urls import reverse from django.utils.text import slugify from .wagtail_tests import WagtailTestUtils class WagtailPageTests(WagtailTestUtils, TestCase): """ A set of asserts to help write tests for your own Wagtail site. """ def setUp(self): supe...
wagtail/wagtail
wagtail/tests/utils/page_tests.py
Python
bsd-3-clause
5,707
#!/usr/bin/env python # -*- coding: latin-1 -*- ''' Nose test generators Need function load / save / roundtrip tests ''' from __future__ import division, print_function, absolute_import import os from os.path import join as pjoin, dirname from glob import glob from io import BytesIO from tempfile import mkdtemp fro...
jsilter/scipy
scipy/io/matlab/tests/test_mio.py
Python
bsd-3-clause
36,362
import os import random from datetime import datetime from inspect import isclass import warnings import logging from io import BytesIO try: from importlib import import_module except ImportError: # Compatibility with Python 2.6. from django.utils.importlib import import_module import django from django.ut...
anderdl/test3repo
photologue/models.py
Python
bsd-3-clause
36,475
""" IT-specific Form helpers """ from django.newforms import ValidationError from django.newforms.fields import Field, RegexField, Select, EMPTY_VALUES from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_unicode from django.contrib.localflavor.it.util import ssn_check_digit,...
diofeher/django-nfa
django/contrib/localflavor/it/forms.py
Python
bsd-3-clause
2,985
from pressgang.actions.exceptions import ActionError class BlogAdditionError(ActionError): """An error that occurred during the adding of sub-blogs to a blog.""" pass
oberlin/pressgang
pressgang/actions/install/addblogs/exceptions.py
Python
bsd-3-clause
171
#!/usr/bin/env python # Copyright 2017 The Dart project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # This script creates a qemu image manifest for Fuchsia that contains the # Dart tree. In particular in contains Dart's test suite,...
dartino/dart-sdk
tools/gen_fuchsia_test_manifest.py
Python
bsd-3-clause
2,795
#!/usr/bin/env python # Copyright 2015, 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 o...
a11r/grpc
tools/run_tests/run_tests.py
Python
bsd-3-clause
55,359
from numpy import arange, pi, zeros, exp from scipy import * from spectralTransform import specTrans2d; import inversion; class specDiffusion(object): def __init__(self, numPointsX, numPointsY,alpha, nu,\ order = 8., length = 2*pi, xType='Fourier', yType='Fourier'): # nu is the higher "order"...
JoyMonteiro/parSpectral
pspec/diffusion.py
Python
bsd-3-clause
1,310
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import re import tablemanager.models import django.utils.timezone import django.core.validators class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateMode...
parksandwildlife/borgcollector
tablemanager/migrations/0001_initial.py
Python
bsd-3-clause
17,682
#!/usr/bin/env python def igs_test(dry_run, target_dir, exp_name, group='', param_l=[]): from scripts.conf.conf import machine_info from scripts.pluto.pluto_utils import run_pluto_test import itertools, os, pickle from os.path import join as jpath target_dir = jpath(os.path.abspath("."),target_dir) # ma...
tareqmalas/girih
scripts/pluto/test_pluto_increasing_grid_size.py
Python
bsd-3-clause
4,390
from __future__ import print_function import os import subprocess import unittest class TestUnknownInitializerTypes(unittest.TestCase): def test_unknown_initializer_types(self): output = None if os.environ['ROS_PYTHON_VERSION'] == '2': output = subprocess.check_output( ...
openhumanoids/exotica
exotica_python/test/test_no_unknown_initializer_types.py
Python
bsd-3-clause
857
# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-11-02 09:50 from __future__ import unicode_literals from django.db import migrations, models import contentstore.models class Migration(migrations.Migration): dependencies = [("contentstore", "0006_messageset_channel")] operations = [ mi...
praekelt/seed-stage-based-messaging
contentstore/migrations/0007_auto_20171102_0950.py
Python
bsd-3-clause
608
""" Set of tools to read SDF format. First coded: 20111227 by Tiago Pereira (tiago.pereira@nasa.gov) """ import numpy as np class SDFHeader: def __init__(self, filename, verbose=False): self.verbose = verbose self.query(filename) def query(self, filename, verbose=False): ''' Queries...
ITA-Solar/helita
helita/io/sdf.py
Python
bsd-3-clause
3,207