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 __future__ import division, absolute_import, print_function import numpy as np from . import format import sys import os import re import sys import itertools import warnings import weakref from operator import itemgetter from ._datasource import DataSource from ._compiled_base import packbits, unpackbits from ...
alephu5/Soundbyte
environment/lib/python3.3/site-packages/numpy/lib/npyio.py
Python
gpl-3.0
65,706
# igc2kmz color functions # Copyright (C) 2008 Tom Payne # # 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. ...
twpayne/igc2kmz
igc2kmz/color.py
Python
gpl-3.0
2,810
# # Copyright (c) 2014 Sylvain Peyrefitte # # This file is part of rdpy. # # rdpy 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. # # T...
ChrisTruncer/rdpy
test/test_protocol_rdp_tpkt.py
Python
gpl-3.0
4,095
# (C) British Crown Copyright 2010 - 2015, Met Office # # This file is part of Iris. # # Iris 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 l...
mo-g/iris
lib/iris/tests/test_analysis_calculus.py
Python
gpl-3.0
27,231
import humblewx import wx class VariablesExampleDialog(humblewx.Dialog): """ <BoxSizerVertical> <StaticText label="$(translated_label)" /> </BoxSizerVertical> """ def __init__(self, parent): humblewx.Dialog.__init__(self, humblewx.Controller, parent, { ...
rickardlindberg/humblewx
examples/variables.py
Python
gpl-3.0
504
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('datasources', '0007_auto_20140723_1342'), ] operations = [ migrations.RenameField( model_name='demographicdataso...
WorldBank-Transport/open-transit-indicators
python/django/datasources/migrations/0008_auto_20140723_1804.py
Python
gpl-3.0
606
# -*- coding: utf-8 -*- import re from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class VeohCom(SimpleHoster): __name__ = "VeohCom" __type__ = "hoster" __version__ = "0.23" __status__ = "testing" __pattern__ = r'http://(?:www\.)?veoh\.com/(tv/)?(watch|videos...
jansohn/pyload
module/plugins/hoster/VeohCom.py
Python
gpl-3.0
1,707
"""ServerFiles""" from __future__ import absolute_import import serverfiles try: from Orange.utils import environ except ImportError: from . import environ from orangecontrib.bio.utils import serverfile_path server_url = "http://orange.biolab.si/serverfiles-bio/" class ServerFiles(serverfiles.ServerFiles)...
ales-erjavec/orange-bio
orangecontrib/bio/utils/serverfiles.py
Python
gpl-3.0
1,481
# coding: utf-8 import unittest import os from datetime import datetime import logging from sqlalchemy.engine.reflection import Inspector from niamoto.testing import set_test_path set_test_path() from niamoto import log log.STREAM_LOGGING_LEVEL = logging.CRITICAL log.FILE_LOGGING_LEVEL = logging.DEBUG from niamo...
niamoto/niamoto-core
tests/raster/test_raster_manager.py
Python
gpl-3.0
5,480
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
spbguru/repo1
tests/unit/py2/nupic/encoders/scalar_test.py
Python
gpl-3.0
19,900
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-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 S...
NoctuaNivalis/qutebrowser
qutebrowser/__init__.py
Python
gpl-3.0
1,268
# -*- coding: utf-8 -*- import os import os.path from tempfile import mkdtemp from unittest import TestCase from outwiker.core.attachment import Attachment from outwiker.core.defines import PAGE_RESULT_HTML from outwiker.core.style import Style from outwiker.core.tree import WikiDocument from outwiker.gui.guiconfig i...
unreal666/outwiker
src/test/gui/wikipage/test_wikihtmlgenerator.py
Python
gpl-3.0
5,965
import os import codecs from django.conf import settings from django.db import models from django.db.models import Q from opencontext_py.apps.entities.uri.models import URImanagement from opencontext_py.apps.ldata.linkentities.models import LinkEntity from opencontext_py.apps.ocitems.manifest.models import Manifest fro...
portableant/open-context-py
opencontext_py/apps/edit/modcategories.py
Python
gpl-3.0
5,885
""" Abstract base class of basic types provides a generic type tester method. """ import os, time import re import lldb from lldbtest import * import lldbutil def Msg(var, val, using_frame_variable): return "'%s %s' matches the output (from compiled code): %s" % ( 'frame variable --show-types' if using_fr...
s20121035/rk3288_android5.1_repo
external/lldb/test/types/AbstractBase.py
Python
gpl-3.0
11,517
#!/usr/bin/env python ############################################################################ # # Copyright (C) 2012, 2013 PX4 Development Team. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are m...
jlnaudin/x-VTOLdrone
PixHawk_PX4/PX4Firmware/Tools/px_uploader.py
Python
gpl-3.0
24,258
from rule import Rule from opcodes import * """ Rule: mask = shlWorkaround(u256(-1) >> unsigned(A.d()), unsigned(B.d())) SHL(B, SHR(A, X)) -> AND(SH[L/R]([B - A / A - B], X), Mask) Requirements: A < BitWidth B < BitWidth """ rule = Rule() n_bits = 64 # Input vars X = BitVec('X', n_bits) A = BitVec('A', n_bits) B = ...
winsvega/solidity
test/formal/combine_shr_shl_by_constant_64.py
Python
gpl-3.0
735
# Copyright (C) 2015 Equinor ASA, Norway. # # The file 'test_field_config.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT 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 t...
Statoil/libres
python/tests/res/enkf/data/test_field_config.py
Python
gpl-3.0
1,005
# -*- coding: utf-8 -*- """ Cached Information ~~~~~~~~~~~~~~~~~~ Classes and methods to maintain any information that is stored outside the doctree. .. autoclass:: Cache :members: .. autoclass:: BibfileCache :members: .. autoclass:: BibliographyCache :members: ""...
talbrecht/pism_pik07
doc/site-packages/sphinxcontrib/bibtex/cache.py
Python
gpl-3.0
6,197
# This file is a part of MediaDrop (http://www.mediadrop.net), # Copyright 2009-2014 MediaDrop contributors # For the exact contribution history, see the git revision log. # The source code contained in this file is licensed under the GPLv3 or # (at your option) any later version. # See LICENSE.txt in the main project ...
kgao/MediaDrop
mediadrop/migrations/versions/005-16ed4c91d1aa-add_anonymous_and_authenticated_groups.py
Python
gpl-3.0
2,087
import click from .utils import init as _init from .utils import setup_env as _setup_env from .utils import new_site as _new_site from .utils import setup_backups as _setup_backups from .utils import setup_auto_update as _setup_auto_update from .utils import setup_sudoers as _setup_sudoers from .utils import start as ...
saurabh6790/phr-bench-repo
bench/cli.py
Python
gpl-3.0
14,438
# -*- coding: utf-8 -*- """ Public API for Panucci This module provides enough functionality to create a frontend to control Panucci as well as exporting a large portion of the Panucci API over D-Bus. """ from __future__ import absolute_import import dbus import logging from panucci import player from panucci impo...
gpodder/panucci
src/panucci/api.py
Python
gpl-3.0
8,323
# 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 selenium.webdriver.common.by import By from pages.base import BasePage from pages.regions.download_button import D...
ericawright/bedrock
tests/pages/firefox/new/platform.py
Python
mpl-2.0
1,328
from setuptools import find_packages, setup def findRequirements(): """ Read the requirements.txt file and parse into requirements for setup's install_requirements option. """ return [line.strip() for line in open('requirements.txt').readlines() if not line.startswith('#')] setup(name...
marionleborgne/cloudbrain_examples
setup.py
Python
agpl-3.0
677
# -*- coding: utf-8 -*- # Copyright (C) 2015 Luis Felipe Miléo - KMEE # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html import urllib import urllib2 import json from collections import namedtuple WS_SERVICOS = 0 WS_PRODUTOS = 1 WS_IBPT = { WS_SERVICOS: 'http://iws.ibpt.org.br/api/deolhonoimposto...
odoo-brazil/l10n-brazil-wip
l10n_br_account/sped/ibpt/deolhonoimposto.py
Python
agpl-3.0
1,962
# -*- encoding: utf-8 -*- ############################################################################## # # AvanzOSC, Avanzed Open Source Consulting # Copyright (C) 2011-2012 Iker Coranti (www.avanzosc.com). All Rights Reserved # # # This program is free software: you can redistribute it and/or modify #...
jaumemarti/l10n-spain-txerpa
__unported__/l10n_es_toponyms_region/wizard/__init__.py
Python
agpl-3.0
1,013
# -*- encoding: utf-8 -*- import re import string from unicodedata import normalize from lxml import etree from lxml.etree import ElementTree, Element, SubElement from datetime import datetime import time import netsvc from osv import fields, osv import decimal_precision as dp from tools.translate import _ class ac...
proge/openerp-pt_br
l10n_br_account/invoice.py
Python
agpl-3.0
120,444
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-03-05 14:48 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('order', '0022_historicalorderdiscount'), ] operations = [ migrations.CreateModel...
eduNEXT/edunext-ecommerce
ecommerce/extensions/order/migrations/0023_auto_20200305_1448.py
Python
agpl-3.0
1,921
########################################################################### # (C) Vrije Universiteit, Amsterdam (the Netherlands) # # # # This file is part of AmCAT - The Amsterdam Content Analysis Toolkit # # ...
tschmorleiz/amcat
amcat/forms/widgets.py
Python
agpl-3.0
2,586
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from six import iteritems from email_reply_parser import EmailReplyParser from frappe.utils import (flt, getdate, get...
gsnbng/erpnext
erpnext/projects/doctype/project/project.py
Python
agpl-3.0
16,359
# -*- coding: utf-8 -*- # Copyright(C) 2009-2011 Romain Bignon, Christophe Benz # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
yannrouillard/weboob
weboob/applications/monboob/monboob.py
Python
agpl-3.0
13,290
from unittest import skip from django.conf import settings # Runs each test in a transaction and flushes database: from django.test import RequestFactory, TestCase from lxml import etree as ET from lxml.builder import E from rest_framework.test import APIClient from iati.factory.utils import _create_test_activity ia...
zimmerman-zimmerman/OIPA
OIPA/api/export/tests/test_full_activity.py
Python
agpl-3.0
37,603
from django.http import * from django.shortcuts import render_to_response from django.template import RequestContext from django.db import IntegrityError from django.forms import ModelForm from gstudio.models import * from objectapp.models import * def context_member(request,reltit , memtit): member = [] su...
gnowgi/gnowsys-studio
objectapp/views/dynamicRT.py
Python
agpl-3.0
9,486
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-09-05 11:48 from __future__ import unicode_literals import uuid from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('reference', '0005_auto_20160902_1639'), ] operations = [ migratio...
uclouvain/OSIS-Louvain
reference/migrations/0006_add_uuid_field.py
Python
agpl-3.0
2,539
#!/usr/bin/env python # This file is part of VoltDB. # Copyright (C) 2008-2014 VoltDB Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at you...
eoneil1942/voltdb-4.7fix
src/catgen/catalog_utils/__init__.py
Python
agpl-3.0
1,341
# TODO: load settings.py here (for every env.) import os from dotenv import find_dotenv, load_dotenv from OIPA.settings import * # NOQA: F401, F403 load_dotenv(find_dotenv()) DATABASES = { 'default': { 'ENGINE': os.getenv( 'OIPA_DB_ENGINE', 'django.contrib.gis.db.backends.postgis' ...
openaid-IATI/OIPA
OIPA/OIPA/production_settings.py
Python
agpl-3.0
3,108
#!/usr/bin/env python # -*- coding: utf-8; tab-width: 4; indent-tabs-mode: t -*- # # NetProfile: Pyramid event subscribers # © Copyright 2013-2015 Alex 'Unik' Unigovsky # # This file is part of NetProfile. # NetProfile is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero Genera...
nikitos/npui
netprofile/netprofile/common/subscribers.py
Python
agpl-3.0
2,364
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015-2015: Alignak team, see AUTHORS.txt file for contributors # # This file is part of Alignak. # # Alignak 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 So...
gst/alignak
test/test_servicetpl_no_hostname.py
Python
agpl-3.0
2,892
# Copyright 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from . import stock_request_order from . import stock_picking_type
OCA/stock-logistics-warehouse
stock_request_picking_type/models/__init__.py
Python
agpl-3.0
179
# Generated by Django 2.2.13 on 2020-11-09 17:54 from django.db import migrations def keep_to_for(apps, schema_editor): Program = apps.get_model("pipeline", "Program") for program in Program.objects.all(): if program.keep: program.keep_for = -1 else: program.keep_for = ...
IQSS/gentb-site
apps/pipeline/migrations/0013_auto_20201109_1254.py
Python
agpl-3.0
748
# # ovirt-host-deploy -- ovirt host deployer # Copyright (C) 2012-2015 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your opt...
alonbl/ovirt-host-deploy
src/plugins/ovirt-host-deploy/vmconsole/packages.py
Python
lgpl-2.1
2,970
#!/usr/bin/env python from peacock.PeacockMainWindow import PeacockMainWindow from peacock.utils import Testing import argparse, os class Tests(Testing.PeacockTester): def newWidget(self, args=[]): parser = argparse.ArgumentParser() PeacockMainWindow.commandLineArgs(parser) w = PeacockMainW...
backmari/moose
python/peacock/tests/peacock_app/PeacockMainWindow/test_PeacockMainWindow.py
Python
lgpl-2.1
1,420
# Copyright 2012-2015, Damian Johnson and The Tor Project # See LICENSE for licensing information """ Package for parsing and processing descriptor data. **Module Overview:** :: parse_file - Parses the descriptors in a file. Descriptor - Common parent for all descriptor file types. |- get_path - location o...
FedericoCeratto/stem
stem/descriptor/__init__.py
Python
lgpl-3.0
31,596
# Copyright Cartopy Contributors # # This file is part of Cartopy and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. # # cython: embedsignature=True """ This module defines the Geodesic class which can interface with the Proj geodesic fu...
SciTools/cartopy
lib/cartopy/geodesic.py
Python
lgpl-3.0
8,059
# -*- coding: utf-8 -*- # # Moonstone is platform for processing of medical images (DICOM). # Copyright (C) 2009-2011 by Neppo Tecnologia da Informação LTDA # and Aevum Softwares LTDA # # This file is part of Moonstone. # # Moonstone is free software: you can redistribute it and/or modify # it under the terms of the GN...
aevum/moonstone
src/moonstone/utils/utils.py
Python
lgpl-3.0
1,082
# RUN: env ARTIQ_DUMP_IR=%t %python -m artiq.compiler.testbench.embedding +compile %s 2>%t # RUN: OutputCheck %s --file-to-check=%t.txt # XFAIL: * from artiq.language.core import * from artiq.language.types import * class foo: @kernel def bar(self): pass x = foo() @kernel def entrypoint(): # CHEC...
JQIamo/artiq
artiq/test/lit/devirtualization/method.py
Python
lgpl-3.0
363
import sys def isAlly(ally): return 0 def isEnemy(enemy): if enemy == 'corsec' or enemy == 'cor_swoop': return 1 return 0
ProjectSWGCore/NGECore2
scripts/faction/smashball.py
Python
lgpl-3.0
128
#!/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2013 Fabio Falcinelli # # 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 late...
JeansReal/django-ejabberd-bridge
setup.py
Python
lgpl-3.0
2,697
#!/usr/bin/env python import argparse import os import subprocess import sys from makegyp.core import command module_path = os.path.abspath(__file__) test_root_dir = os.path.dirname(module_path) def test_library(name): print '* Test %r...' % name # Determines the directory of the tested library: test_d...
olliwang/makegyp
tests/test.py
Python
lgpl-3.0
2,325
# Copyright 2014 NeuroData (http://neurodata.io) # # 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...
neurodata/ndstore
scripts/onetime/cassingest.py
Python
apache-2.0
2,658
# Copyright 2014 Huawei Technologies Co., LTD # All Rights Reserved. # # @author: Huawei Technologies Co., LTD # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://...
Hybrid-Cloud/badam
fs_patches_of_hybrid_cloud/cherry_for_B038/cinder_cascading_proxy_aws_snapshot_disaster_recovery/proxy/cinder_proxy.py
Python
apache-2.0
80,774
from __future__ import absolute_import from __future__ import unicode_literals import hashlib import json import logging import requests from pypuppetdb.api.base import BaseAPI, COMMAND_VERSION, ERROR_STRINGS from pypuppetdb.errors import (APIError, EmptyResponseError) log = logging.getLogger(__name__) class Comm...
puppet-community/pypuppetdb
pypuppetdb/api/command.py
Python
apache-2.0
3,377
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
deepakgupta1313/models
tutorials/rnn/seq2seq.py
Python
apache-2.0
952
# Copyright 2015 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 agre...
mahak/neutron
neutron/tests/unit/agent/linux/openvswitch_firewall/test_rules.py
Python
apache-2.0
21,451
#!/usr/bin/env python #============================================================================== # Copyright 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Amazon Software License (the "License"). You may not use # this file except in compliance with the License. A copy of the...
JoaoVasques/aws-devtool
eb/macosx/python3/scli/cli_parse.py
Python
apache-2.0
7,634
# -*- coding: utf-8 -*- import logging if __name__ == '__main__': logging.basicConfig() _log = logging.getLogger(__name__) import pyxb.binding.generate import pyxb.binding.datatypes as xs import pyxb.binding.basis import pyxb.utils.domutils import pyxb.binding.facets import os.path xsd='''<?xml version="1.0" encod...
pabigot/pyxb
tests/trac/test-trac-0190.py
Python
apache-2.0
2,294
#!/usr/bin/python # # 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 # dis...
apache/incubator-corinthia
experiments/dfwebserver/python/testSubprocess.py
Python
apache-2.0
1,667
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
citrix-openstack-build/trove
trove/extensions/account/views.py
Python
apache-2.0
1,652
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
aselle/tensorflow
tensorflow/python/eager/benchmarks_test.py
Python
apache-2.0
20,015
# Copyright 2014 Mellanox Technologies, Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
wolverineav/neutron
neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/common/test_config.py
Python
apache-2.0
5,542
################################################################################ # The Neural Network (NN) based Speech Synthesis System # https://github.com/CSTR-Edinburgh/merlin # # Centre for Speech Technology Research # University of Edinburgh, UK # ...
bajibabu/merlin
src/keras_lib/configuration.py
Python
apache-2.0
13,717
'''/* UVa problem: * * Topic: * * Level: * * Brief problem description: * * * * Solution Summary: * * * * Used Resources: * * * * I hereby certify that I have produced the following solution myself * using the resources listed above in accordance with the CMPUT 403 * collaboration po...
DT9/programming-problems
2017/uva/403/temp/UVa11462.py
Python
apache-2.0
499
# # 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...
airbnb/airflow
airflow/www/security.py
Python
apache-2.0
29,547
#!/usr/bin/env python ############################################################################ # # Copyright 2019 Samsung Electronics 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...
chanijjani/TizenRT
os/tools/mkbinheader.py
Python
apache-2.0
9,562
from modularodm import Q from rest_framework import generics, permissions as drf_permissions from rest_framework.exceptions import ValidationError, NotFound, PermissionDenied from framework.auth.oauth_scopes import CoreScopes from api.base import generic_bulk_views as bulk_views from api.base import permissions as ba...
caneruguz/osf.io
api/collections/views.py
Python
apache-2.0
30,089
# -*- coding: utf-8 -*- import pytest import threading import requests from tests.testserver.server import Server, consume_socket_content from .utils import override_environ def echo_response_handler(sock): """Simple handler that will take request and echo it back to requester.""" request_content = consume...
psf/requests
tests/test_lowlevel.py
Python
apache-2.0
14,885
# coding: utf-8 """ Kubeflow Pipelines API This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import s...
kubeflow/pipelines
backend/api/python_http_client/kfp_server_api/models/report_run_metrics_response_report_run_metric_result.py
Python
apache-2.0
6,705
# -*- coding: utf-8 -*- """SQLite database plugin related functions and classes for testing.""" import os from plaso.parsers import sqlite from plaso.storage.fake import writer as fake_writer from tests.parsers import test_lib class SQLitePluginTestCase(test_lib.ParserTestCase): """SQLite database plugin test ca...
joachimmetz/plaso
tests/parsers/sqlite_plugins/test_lib.py
Python
apache-2.0
3,324
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
chemelnucfin/tensorflow
tensorflow/contrib/receptive_field/python/util/parse_layer_parameters_test.py
Python
apache-2.0
7,276
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os from contextlib import contextmanager from textwrap import dedent from pants.base.build_environment import get_buildroot from pants.testutil.file_test_util import exact_files fr...
tdyas/pants
contrib/go/tests/python/pants_test/contrib/go/tasks/test_go_thrift_gen_integration.py
Python
apache-2.0
6,005
# Copyright 2009 the Melange 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 in wr...
MatthewWilkes/mw4068-packaging
scripts/release/util.py
Python
apache-2.0
6,624
import sys import time import random import commands import userinterface.Client as Client from taskbuffer.JobSpec import JobSpec from taskbuffer.FileSpec import FileSpec if len(sys.argv)>1: site = sys.argv[1] cloud = None else: site = None cloud = 'US' #cloud = 'TW' #Recent changes (BNL migrati...
RRCKI/panda-server
pandaserver/test/testSimulReco14.py
Python
apache-2.0
3,166
# Copyright (C) 2014 eNovance SAS <licensing@enovance.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 applicabl...
Juniper/ceilometer
ceilometer/network/statistics/opencontrail/client.py
Python
apache-2.0
3,667
#!/usr/bin/env python __author__ = 'greg' from cassandra.cluster import Cluster import numpy import matplotlib.pyplot as plt import datetime import csv import bisect import random import json import matplotlib.pyplot as plt def index(a, x): 'Locate the leftmost value exactly equal to x' i = bisect.bisect_left(...
zooniverse/aggregation
experimental/algorithms/blanks/user_analysis.py
Python
apache-2.0
2,084
# -*- coding: utf-8 -*- # 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, softw...
Frostman/SalaryZenAggregator_Old
salaryzenaggr/fetchers/alfa_currency_xml.py
Python
apache-2.0
2,577
# 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 agreed to in writing, s...
apporc/nova
nova/objects/image_meta.py
Python
apache-2.0
19,719
################################################################################ # 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...
aljoscha/flink
flink-python/pyflink/table/tests/test_udf.py
Python
apache-2.0
36,215
# 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 required by applicable law or a...
pklfz/fold
tensorflow_fold/loom/calculator_example/train.py
Python
apache-2.0
3,708
# Copyright (C) 2015 Hewlett-Packard Development Company, L.P. # # 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...
Tesora/tesora-nodepool
nodepool/tests/test_shade_integration.py
Python
apache-2.0
4,040
import os import sys import Image if(len(sys.argv) == 1): print "Please provide Image folder path as an argument." print "Usage: python thumbnail_factory.py <FolderPath>" sys.exit() rootdir = sys.argv[1] for root, subFolders, files in os.walk(rootdir): for filename in files: if "_thumbnail" in...
Bhamni/utilities
deprecated/scripts/thumbnail_factory.py
Python
apache-2.0
865
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
sebrandon1/tempest
tempest/tests/fake_config.py
Python
apache-2.0
4,758
#!/usr/bin/python # # Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
donspaulding/adspygoogle
examples/adspygoogle/dfp/v201204/custom_field_service/deactivate_all_line_item_custom_fields.py
Python
apache-2.0
2,861
from keystone.manage2 import base from keystone.manage2 import common from keystone.backends import models @common.arg('--id', required=False, help='a unique identifier used in URLs') @common.arg('--name', required=True, help='a unique username used for authentication') @common.arg('--email', requ...
HugoKuo/keystone-essex3
keystone/manage2/commands/create_user.py
Python
apache-2.0
1,662
# -*- coding: utf-8 -*- # # Copyright 2019 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...
tseaver/google-cloud-python
videointelligence/google/cloud/videointelligence_v1beta2/types.py
Python
apache-2.0
1,597
import gym from gym.spaces import Box, Discrete import numpy as np class SimpleCorridor(gym.Env): """Example of a custom env in which you have to walk down a corridor. You can configure the length of the corridor via the env config.""" def __init__(self, config): self.end_pos = config["corridor_...
richardliaw/ray
rllib/examples/env/simple_corridor.py
Python
apache-2.0
995
# Copyright 2012 Twitter # # 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, softw...
clutchio/clutch
stats/models.py
Python
apache-2.0
7,305
#!/usr/bin/env python3 # Copyright 2020 Anapaya Systems import http.server import time import threading from plumbum import cmd from acceptance.common import base from acceptance.common import docker from acceptance.common import scion class Test(base.TestBase): """ Constructs a simple Hidden Paths topolo...
netsec-ethz/scion
acceptance/hidden_paths/test.py
Python
apache-2.0
6,367
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
annarev/tensorflow
tensorflow/python/keras/utils/metrics_utils.py
Python
apache-2.0
21,928
import json import warnings import h5py import numpy as np from .. import options from ..database import db from .braindata import BrainData, VolumeData, VertexData, _hash default_cmap = options.config.get("basic", "default_cmap") def normalize(data): if isinstance(data, tuple): if len(data) == 3: ...
CVML/pycortex
cortex/dataset/views.py
Python
bsd-2-clause
10,357
# Simple test of probabilistic modelling # Calculates time to break through assuming plug flow from simplehydro import * from monte_carlo import * from conversion import * import matplotlib.pyplot as plt x = 10 # Distance, x (m) n = 0.3 # Effective porosity, n (-) K = 1e-7 # Hydraulic conductivi...
tachylyte/HydroGeoPy
EXAMPLES/exampleMonteCarloUni.py
Python
bsd-2-clause
1,242
import os from . import CoreSettings class Base17Settings(CoreSettings): # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.c...
rapilabs/django-classy-settings
cbs/base/django17.py
Python
bsd-2-clause
1,472
# # This file is part of pyasn1-modules software. # # Created by Russ Housley # Copyright (c) 2019, Vigil Security, LLC # License: http://snmplabs.com/pyasn1/license.html # import sys import unittest from pyasn1.codec.der.decoder import decode as der_decoder from pyasn1.codec.der.encoder import encode as der_encoder ...
etingof/pyasn1-modules
tests/test_rfc4010.py
Python
bsd-2-clause
5,879
import sys import time import re import socket import six from collections import deque from select import select from fabric.state import env, output, win32 from fabric.auth import get_password, set_password import fabric.network from fabric.network import ssh, normalize from fabric.exceptions import CommandTimeout ...
rodrigc/fabric
fabric/io.py
Python
bsd-2-clause
10,647
from __future__ import print_function import sys, time, random, os, json import six from six.moves.urllib.parse import urlencode from subprocess import Popen, PIPE from twisted.web.server import Site, NOT_DONE_YET from twisted.web.resource import Resource from twisted.internet import reactor, defer, ssl from scrapy imp...
CENDARI/scrapy
tests/mockserver.py
Python
bsd-3-clause
6,602
# Copyright (c) 2014, Salesforce.com, Inc. All rights reserved. # Copyright (c) 2015, Google, Inc. # # 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 ...
fritzo/loom
setup.py
Python
bsd-3-clause
3,709
#!/usr/bin/env python """ This module checks whether the unittests for every nodes exist. If [-l] option is specified, the result will be printed into log file 'check_unittests_logger_YYYY-MM-DD_HH-MM-SS.log' in the current directory. **Options** :-l: -- prints the result into log file :-log: -- prints the re...
pyspace/pyspace
pySPACE/tests/check_unittests.py
Python
bsd-3-clause
6,000
from satchmo.configuration import * from django.utils.translation import ugettext_lazy as _ # this is so that the translation utility will pick up the string gettext = lambda s: s _strings = (gettext('CreditCard'), gettext('Credit Card')) PAYMENT_MODULES = config_get('PAYMENT', 'MODULES') PAYMENT_MODULES.add_choice((...
roadhead/satchmo
satchmo/payment/modules/authorizenet/config.py
Python
bsd-3-clause
4,767
# -*- coding: utf-8 -*- """ Control your screen(s) layout easily. This modules allows you to handle your screens outputs directly from your bar! - Detect and propose every possible screen combinations - Switch between combinations using click events and mouse scroll - Activate the screen or screen combinat...
Shir0kamii/py3status
py3status/modules/xrandr.py
Python
bsd-3-clause
13,758
# -*- coding: utf-8 -*- from __future__ import unicode_literals import importlib import json import re import unittest from datetime import datetime from xml.dom import minidom from django.core import management, serializers from django.db import connection, transaction from django.test import ( SimpleTestCase, T...
jdelight/django
tests/serializers/tests.py
Python
bsd-3-clause
29,932
#!/usr/bin/env python from __future__ import print_function from builtins import input import sys import pmagpy.pmagplotlib as pmagplotlib import pmagpy.pmag as pmag def main(): """ NAME qqunf.py DESCRIPTION makes qq plot from input data against uniform distribution SYNTAX qqun...
lfairchild/PmagPy
programs/qqunf.py
Python
bsd-3-clause
1,916
__version_info__ = (0, 4, 2, 'a1') __version__ = '.'.join(map(str, __version_info__[:3])) if len(__version_info__) == 4: __version__ += __version_info__[-1]
pr-omethe-us/PyKED
pyked/_version.py
Python
bsd-3-clause
161