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
""" This module houses ctypes interfaces for GDAL objects. The following GDAL objects are supported: CoordTransform: Used for coordinate transformations from one spatial reference system to another. Driver: Wraps an OGR data source driver. DataSource: Wrapper for the OGR data source object, supports OGR-su...
rebost/django
django/contrib/gis/gdal/__init__.py
Python
bsd-3-clause
2,164
from django.conf import settings MODEL_TREE = getattr(settings, 'SITETREE_MODEL_TREE', 'sitetree.Tree') MODEL_TREE_ITEM = getattr(settings, 'SITETREE_MODEL_TREE_ITEM', 'sitetree.TreeItem') APP_MODULE_NAME = getattr(settings, 'SITETREE_APP_MODULE_NAME', 'sitetrees') UNRESOLVED_ITEM_MARKER = getattr(settings, 'SITETR...
RamezIssac/django-sitetree
sitetree/settings.py
Python
bsd-3-clause
1,085
"""add vendor, opportunity, category models Revision ID: 29562eda8fbc Revises: 3473ff14af7e Create Date: 2015-05-28 02:31:47.039725 """ # revision identifiers, used by Alembic. revision = '29562eda8fbc' down_revision = '3473ff14af7e' from alembic import op import sqlalchemy as sa def upgrade(): ### commands a...
CityofPittsburgh/pittsburgh-purchasing-suite
migrations/versions/29562eda8fbc_add_vendor_opportunity_category_models.py
Python
bsd-3-clause
3,927
import copy import logging import os import sys import threading import urllib from netlib import tcp, http, certutils, websockets from netlib.exceptions import HttpException, HttpReadDisconnect, TcpTimeout, TcpDisconnect, \ TlsException from . import version, app, language, utils, log, protocols import language....
ikoz/mitmproxy
pathod/pathod.py
Python
mit
16,060
import clr clr.AddReference('RevitAPI') from Autodesk.Revit.DB import * def GetPhases(item): if hasattr(item, "CreatedPhaseId"): return item.Document.GetElement(item.CreatedPhaseId), item.Document.GetElement(item.DemolishedPhaseId) else: return None, None items = UnwrapElement(IN[0]) if isinstance(IN[0], list): ...
andydandy74/ClockworkForDynamo
nodes/2.x/python/Element.Phases.py
Python
mit
401
"""Generate a Python dict from input tags from a treebank, in str. As of this version, only treebanks following the Penn notation are supported. """ def set_path(dicts, keys, v): """Helper function for modifying nested dictionaries :param dicts: dict: the given dictionary :param keys: list str: path to a...
D-K-E/cltk
src/cltk/tag/treebanks.py
Python
mit
1,796
from django.contrib import admin from .models import Message admin.site.register(Message)
Pylvax/django
project/starter_app/admin.py
Python
mit
92
__doc__="""An experimental SVG renderer for the ReportLab graphics framework. This will create SVG code from the ReportLab Graphics API (RLG). To read existing SVG code and convert it into ReportLab graphics objects download the svglib module here: http://python.net/~gherman/#svglib """ import math, types, sys, os...
fergalmoran/Chrome2Kindle
server/reportlab/graphics/renderSVG.py
Python
mit
30,282
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals, division import os, os.path import re import sys from pprint import pprint, pformat
msztolcman/ff
test/mocks/__init__.py
Python
mit
190
# -*- coding: utf-8 -*- # # This file is part of Invenio-Previewer-ISPY # Copyright (C) 2014 CERN # # Invenio-Previewer-ISPY 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, o...
tpmccauley/invenio-previewer-ispy
tests/__init__.py
Python
gpl-2.0
871
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2007 Zsolt Foldvari # Copyright (C) 2009 Benny Malengier # Copyright (C) 2009 Brian Matherly # Copyright (C) 2010 Peter Landgren # Copyright (C) 2010 Jakim Friant # Copyright ...
jralls/gramps
gramps/plugins/lib/libcairodoc.py
Python
gpl-2.0
62,883
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2011 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """Scikit learn interface for :class:`~gensim.models.hdpmodel.HdpModel`. Follows scikit-learn API conventions to facilitate using gensi...
midnightradio/gensim
gensim/sklearn_api/hdp.py
Python
gpl-3.0
8,719
#!/usr/bin/env python # # Copyright 2018 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import gr, gr_unittest, blocks from multiprocessing import Process import numpy # This block just exists to pass data through and throw an excepti...
jdemel/gnuradio
gnuradio-runtime/python/gnuradio/gr/qa_uncaught_exception.py
Python
gpl-3.0
2,500
#!/usr/bin/python # (c) 2016, NetApp, Inc # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
haad/ansible-modules-extras
storage/netapp/netapp_e_storage_system.py
Python
gpl-3.0
11,444
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015 Leandro Toledo de Souza <leandrotoeldodesouza@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by # the ...
tino/python-telegram-bot
telegram/contact.py
Python
gpl-3.0
1,745
import os from six import text_type from tests.support.asserts import assert_same_element, assert_success from tests.support.inline import inline def execute_async_script(session, script, args=None): if args is None: args = [] body = {"script": script, "args": args} return session.transport.sen...
asajeffrey/servo
tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/collections.py
Python
mpl-2.0
4,669
# -*- 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...
addition-it-solutions/project-all
addons/account_followup/account_followup.py
Python
agpl-3.0
28,847
"""LTI integration tests""" import json from collections import OrderedDict import mock import oauthlib import six from django.conf import settings from django.urls import reverse from six import text_type from lms.djangoapps.courseware.tests.helpers import BaseTestXmodule from lms.djangoapps.courseware.views.views...
edx-solutions/edx-platform
lms/djangoapps/courseware/tests/test_lti_integration.py
Python
agpl-3.0
9,264
# 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 Folly(CMakePackage): """Folly (acronymed loosely after Facebook Open Source Library) is a...
LLNL/spack
var/spack/repos/builtin/packages/folly/package.py
Python
lgpl-2.1
1,952
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """Unit tests for the :class:`iris.coord_systems.LambertConformal` class.""" # Import iris.tests first so that some things can...
SciTools/iris
lib/iris/tests/unit/coord_systems/test_LambertConformal.py
Python
lgpl-3.0
3,143
""" A reader for corpora whose documents are in MTE format. """ import os from functools import reduce from nltk import compat from nltk.corpus.reader import concat, TaggedCorpusReader lxmlAvailable = False try: from lxml import etree lxmlAvailable = True except ImportError: #first try c version of Element...
jwacalex/MULTEX-EAST-PoS-Tagger
mte.py
Python
lgpl-3.0
12,810
import errno import fnmatch import json import os import re import subprocess import sys MODULE_XML_START = """<?xml version="1.0" encoding="UTF-8"?> <module type="%(type)s" version="4">""" MODULE_XML_END = """ </module> """ ANDROID_FACET = """ <component name="FacetManager"> <facet type="android" name="Andro...
thinkernel/buck
src/com/facebook/buck/command/intellij.py
Python
apache-2.0
15,347
# Copyright 2015, Ansible, Inc. # Luke Sneeringer <lsneeringer@ansible.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 requi...
jangsutsr/tower-cli
lib/tower_cli/utils/command.py
Python
apache-2.0
1,677
# 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...
llhe/tensorflow
tensorflow/tools/docs/generate_lib_test.py
Python
apache-2.0
5,039
# Copyright 2018 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...
kevin-coder/tensorflow-fork
tensorflow/python/compiler/tensorrt/test/batch_matmul_test.py
Python
apache-2.0
3,185
# 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...
freedomtan/tensorflow
tensorflow/python/training/ftrl.py
Python
apache-2.0
13,362
# -*- coding: utf-8 -*- ############################################################################### # # GetSellerTransactions # Retrieves order line item (transaction) information for the authenticated user only. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache Licens...
jordanemedlock/psychtruths
temboo/core/Library/eBay/Trading/GetSellerTransactions.py
Python
apache-2.0
7,981
# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation. # # 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...
iwaseyusuke/ryu
ryu/services/protocols/bgp/net_ctrl.py
Python
apache-2.0
15,431
# Copyright (c) 2016-present, Facebook, 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...
davinwang/caffe2
caffe2/python/operator_test/rebatching_queue_test.py
Python
apache-2.0
9,823
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted ...
DoubleNegativeVisualEffects/gaffer
python/GafferUI/Slider.py
Python
bsd-3-clause
14,206
""" crypto.aes AES Encryption Algorithm The AES algorithm is just Rijndael algorithm restricted to the default blockSize of 128 bits. Copyright (c) 2002 by Paul A. Lambert Read LICENSE.txt for license information. 2002-06-01 """ from crypto.cipher.rijndael import Rijndael from crypto.cipher...
realms-team/basestation-fw
libs/smartmeshsdk-REL-1.3.0.1/external_libs/cryptopy/crypto/cipher/aes.py
Python
bsd-3-clause
1,002
from django.db.models import ObjectDoesNotExist from django.db.models.fields.related import ForeignKey, ReverseSingleRelatedObjectDescriptor from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.generic import GenericForeignKey from django.contrib.sites.models import SITE_CACHE, Si...
WhiskeyMedia/ella
ella/core/cache/fields.py
Python
bsd-3-clause
3,839
""" sentry.plugins.sentry_interface_types.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import six import sentry from sentry.plugins import regist...
ifduyue/sentry
src/sentry/plugins/sentry_interface_types/models.py
Python
bsd-3-clause
998
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains convenience functions for coordinate-related functionality. This is generally just wrapping around the object-oriented coordinates framework, but it is useful for some users who are used to more functional interfaces. """ import...
pllim/astropy
astropy/coordinates/funcs.py
Python
bsd-3-clause
13,747
""" PySCeS - Python Simulator for Cellular Systems (http://pysces.sourceforge.net) Copyright (C) 2004-2015 B.G. Olivier, J.M. Rohwer, J.-H.S Hofmeyr all rights reserved, Brett G. Olivier (bgoli@users.sourceforge.net) Triple-J Group for Molecular Cell Physiology Stellenbosch University, South Africa. Permiss...
asttra/pysces
pysces/tests/__init__.py
Python
bsd-3-clause
622
""" 33. get_or_create() ``get_or_create()`` does what it says: it tries to look up an object with the given parameters. If an object isn't found, it creates one with the given parameters. """ from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compa...
jyotsna1820/django
tests/get_or_create/models.py
Python
bsd-3-clause
1,518
import os #import zipfile # zipfile.open() is only available in Python 2.6, so we use the future version from django.core.files.uploadedfile import SimpleUploadedFile from filer.utils import zipfile def unzip(file): """ Take a path to a zipfile and checks if it is a valid zip file and returns... """ ...
ojii/django-filer
filer/utils/zip.py
Python
mit
916
'''Test module to thest the xmllib module. Sjoerd Mullender ''' from test_support import verbose testdoc = """\ <?xml version="1.0" encoding="UTF-8" standalone='yes' ?> <!-- comments aren't allowed before the <?xml?> tag, but they are allowed before the <!DOCTYPE> tag --> <!DOCTYPE greeting [ <!ELEMENT gree...
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.1/Lib/test/test_xmllib.py
Python
mit
532
from functools import partial from urllib.parse import urlencode try: from geopy.geocoders import GeoNames from geopy.geocoders.base import DEFAULT_SENTINEL from geopy.util import logger class rlp_GeoNames(GeoNames): enable = True geocode_path = '/mapbender/geoportal/gaz_geom_mobile...
flavour/eden
modules/templates/historic/RLPPTM/rlpgeonames.py
Python
mit
3,489
#!/usr/bin/env python # Copyright 2016 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. """A script to recover devices in a known bad state.""" import argparse import logging import os import psutil import signal import sy...
cricketclubucd/davisdragons
platform-tools/systrace/catapult/devil/devil/android/tools/device_recovery.py
Python
mit
7,578
from __future__ import unicode_literals, division, absolute_import import re import logging from flexget import plugin from flexget.event import event from flexget.utils.imdb import extract_id, make_url log = logging.getLogger('metainfo_imdb_url') class MetainfoImdbUrl(object): """ Scan entry informatio...
patsissons/Flexget
flexget/plugins/metainfo/imdb_url.py
Python
mit
1,526
## # Copyright (c) 2015 Forschungszentrum Juelich GmbH, Germany # # 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 # notic...
torbjoernk/easybuild-framework
easybuild/tools/module_naming_scheme/categorized_hmns.py
Python
gpl-2.0
4,235
# Partname: ATmega8535 # generated automatically, do not edit MCUREGS = { 'ADMUX': '&39', 'ADMUX_REFS': '$C0', 'ADMUX_ADLAR': '$20', 'ADMUX_MUX': '$1F', 'ADCSRA': '&38', 'ADCSRA_ADEN': '$80', 'ADCSRA_ADSC': '$40', 'ADCSRA_ADATE': '$20', 'ADCSRA_ADIF': '$10', 'ADCSRA_ADIE': '$08', 'ADCSRA_A...
lowfatcomputing/amforth
core/devices/atmega8535/device.py
Python
gpl-2.0
4,349
#!/usr/bin/env python # -*- coding: utf-8 -*- # # $Id$ # # Copyright 2010 Glencoe Software, Inc. All rights reserved. # Use is subject to license terms supplied in LICENSE.txt # # Hudson launcher script which properly launches the script # on the right system. This is used by most jobs via: # # cd src # cd docs # ...
jballanc/openmicroscopy
docs/hudson/launcher.py
Python
gpl-2.0
4,193
# -*- coding: utf-8 -*- # # two_neurons.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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...
magnastrazh/NEUCOGAR
nest/serotonin/research/C/nest-2.10.0/examples/nest/gap_junction/two_neurons.py
Python
gpl-2.0
2,414
# This file is part of Tryton & Nereid. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. import warnings from werkzeug._internal import _missing from flask.wrappers import Request as RequestBase, Response as ResponseBase from flask.ext.login import current...
priyankarani/nereid
nereid/wrappers.py
Python
gpl-3.0
4,148
############################################################################### #cyn.in is an open source Collaborative Knowledge Management Appliance that #enables teams to seamlessly work together on files, documents and content in #a secure central environment. # #cyn.in v2 an open source appliance is distrib...
cynapse/cynin
src/ubify.cyninv2theme/ubify/cyninv2theme/browser/addcontentselector.py
Python
gpl-3.0
3,531
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # 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 #...
wrouesnel/ansible
lib/ansible/modules/cloud/ovirt/ovirt_hosts.py
Python
gpl-3.0
22,692
"""Generated message classes for compute version v1. API for the Google Compute Engine service. """ from protorpc import messages from googlecloudapis.apitools.base.py import encoding package = 'compute' class AccessConfig(messages.Message): """An access configuration attached to an instance's network interfac...
harshilasu/LinkurApp
y/google-cloud-sdk/lib/googlecloudapis/compute/v1/compute_v1_messages.py
Python
gpl-3.0
211,698
import re import requests import bs4 from cloudbot import hook from cloudbot.util import web try: import cfscrape except ImportError: cfscrape = None class SteamError(Exception): pass def percentage(part, whole): return 100 * float(part) / float(whole) CALC_URL = "https://steamdb.info/calculato...
CrushAndRun/Cloudbot-Fluke
plugins/steamdb.py
Python
gpl-3.0
3,494
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'OdooBot for livechat', 'version': '1.0', 'category': 'Productivity/Discuss', 'summary': 'Add livechat support for OdooBot', 'description': "", 'website': 'https://www.odoo.com/page/disc...
ygol/odoo
addons/im_livechat_mail_bot/__manifest__.py
Python
agpl-3.0
449
# Copyright 2013 John Jarvis <john@jarv.org> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
stvstnfrd/configuration
playbooks/callback_plugins/sqs.py
Python
agpl-3.0
6,158
# -*- coding: utf-8 -*- ############################################################################## # # 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 L...
odoomrp/odoomrp-wip
product_pricelist_rules/models/product.py
Python
agpl-3.0
3,039
############################################################################## # MDTraj: A Python Library for Loading, Saving, and Manipulating # Molecular Dynamics Trajectories. # Copyright 2012-2013 Stanford University and the Authors # Authors: Christoph Klein # Contributors: # # MDTraj is free software: yo...
swails/mdtraj
mdtraj/tests/test_xyz.py
Python
lgpl-2.1
3,492
""" Demo platform for the vacuum component. For more details about this platform, please refer to the documentation https://home-assistant.io/components/demo/ """ import logging from homeassistant.components.vacuum import ( ATTR_CLEANED_AREA, SUPPORT_BATTERY, SUPPORT_CLEAN_SPOT, SUPPORT_FAN_SPEED, SUPPORT_LOC...
HydrelioxGitHub/home-assistant
homeassistant/components/vacuum/demo.py
Python
apache-2.0
10,494
# Copyright 2012 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...
tobegit3hub/cinder_docker
cinder/tests/unit/api/contrib/test_services.py
Python
apache-2.0
24,584
# -*- coding: utf-8 -*- ############################################################################### # # SearchForUsers # Searches for a specified Bugzilla user. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use th...
jordanemedlock/psychtruths
temboo/core/Library/Bugzilla/SearchForUsers.py
Python
apache-2.0
3,807
# -*- coding: utf-8 -*- ############################################################################### # # CopyObject # Makes a copy of an existing object in S3 Storage. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not ...
jordanemedlock/psychtruths
temboo/core/Library/Amazon/S3/CopyObject.py
Python
apache-2.0
9,236
#!/usr/bin/env ambari-python-wrap ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (th...
arenadata/ambari
ambari-server/src/main/python/ambari_server/BackupRestore.py
Python
apache-2.0
6,601
""" Provides functionality for multidimensional usage of scalar-functions. Read the vectorize docstring for more details. """ def apply_on_element(f, args, kwargs, n): """ Returns a structure with the same dimension as the specified argument, where each basic element is replaced by the function f applied ...
hazelnusse/sympy-old
sympy/core/multidimensional.py
Python
bsd-3-clause
4,002
from __future__ import division, absolute_import, print_function import warnings import sys import collections import operator import numpy as np import numpy.core.numeric as _nx from numpy.core import linspace, atleast_1d, atleast_2d from numpy.core.numeric import ( ones, zeros, arange, concatenate, array, asarr...
jankoslavic/numpy
numpy/lib/function_base.py
Python
bsd-3-clause
132,305
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from nipype.testing import assert_equal from nipype.interfaces.fsl.epi import EPIDeWarp def test_EPIDeWarp_inputs(): input_map = dict(args=dict(argstr='%s', ), cleanup=dict(argstr='--cleanup', ), dph_file=dict(argstr='--dph %s', mandatory=Tr...
mick-d/nipype_source
nipype/interfaces/fsl/tests/test_auto_EPIDeWarp.py
Python
bsd-3-clause
1,781
import collections.abc import copy import datetime import decimal import math import operator import uuid import warnings from base64 import b64decode, b64encode from functools import partialmethod, total_ordering from django import forms from django.apps import apps from django.conf import settings from django.core i...
ar4s/django
django/db/models/fields/__init__.py
Python
bsd-3-clause
90,874
# Example script that performs a set of (small) live requests versus the live PML WPS service from owslib.wps import WebProcessingService, monitorExecution # instantiate WPS client verbose = False wps = WebProcessingService('http://rsg.pml.ac.uk/wps/vector.cgi', verbose=verbose, skip_caps=True) # 1) GetCapabilities ...
tomkralidis/OWSLib
examples/wps-pml-script-2.py
Python
bsd-3-clause
2,097
#! /usr/bin/python from WN_exp import * from WN_evaluation import * if theano.config.floatX == 'float32': sys.stderr.write("""WARNING: Detected floatX=float32 in the configuration. This might result in NaN in embeddings after several epochs. """) launch(op='TransE', dataset='WN', simfn='L1', ndim=20, nhid=20, mar...
while519/SME
WN/WN_TransE.py
Python
bsd-3-clause
604
# Convenience functions def ind_max(x): m = max(x) return x.index(m) # Need access to random numbers import random # Definitions of bandit arms from arms.adversarial import * from arms.bernoulli import * from arms.normal import * # Definitions of bandit algorithms from algorithms.epsilon_greedy.standard import *...
SalemAmeen/BanditsBook
python/core.py
Python
mit
657
#!/usr/bin/env python # # Copyright 2012 the V8 project authors. 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 # noti...
kingland/go-v8
v8-3.28/tools/run-tests.py
Python
mit
22,223
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2006 Donald N. Allingham # # 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 you...
beernarrd/gramps
gramps/gui/editors/displaytabs/srcattrembedlist.py
Python
gpl-2.0
5,553
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2010, 2011, 2012 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at yo...
AlbertoPeon/invenio
modules/miscutil/lib/plotextractor_unit_tests.py
Python
gpl-2.0
15,778
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'template.ui' # # Created: Sun Sep 18 19:19:10 2016 # by: pyside2-uic running on PySide2 2.0.0~alpha0 # # WARNING! All changes made in this file will be lost! from PySide2 import QtCore, QtGui, QtWidgets class Ui_Form(object): def...
SpaceGroupUCL/qgisSpaceSyntaxToolkit
esstoolkit/external/pyqtgraph/console/template_pyside2.py
Python
gpl-3.0
6,517
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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,...
drglove/SickRage
sickbeard/notifiers/libnotify.py
Python
gpl-3.0
5,007
# 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 https://mozilla.org/MPL/2.0/. from selenium.webdriver.common.by import By from pages.base import BaseRegion class DownloadButton(BaseRegion): ...
mozilla/bedrock
tests/pages/regions/download_button.py
Python
mpl-2.0
947
# -*- coding: utf-8 -*- ############################################################################## # # This module uses OpenERP, Open Source Management Solution Framework. # Copyright (C) 2012-Today Serpent Consulting Services (<http://www.serpentcs.com>) # # This program is free software: you can redistri...
kurkop/server-tools
__unported__/mass_editing/wizard/__init__.py
Python
agpl-3.0
1,106
"""Ensure we can parse events sent to us from the segment.io webhook integration""" from datetime import datetime import json from ddt import ddt, data from freezegun import freeze_time from mock import patch, sentinel from django.contrib.auth.models import User from django.test import TestCase from django.test.clie...
jelugbo/tundex
common/djangoapps/track/views/tests/test_segmentio.py
Python
agpl-3.0
10,966
from django.test import TestCase from django.core import mail from django.contrib.auth.models import User from userena.models import UserenaSignup from userena import settings as userena_settings from guardian.shortcuts import get_perms import datetime, re class UserenaManagerTests(TestCase): """ Test the manag...
pirata-cat/agora-ciudadana
userena/tests/managers.py
Python
agpl-3.0
6,047
from OpenGL.raw.WGL.VERSION.WGL_1_0 import * wglUseFontBitmaps = wglUseFontBitmapsW
stack-of-tasks/rbdlpy
tutorial/lib/python2.7/site-packages/OpenGL/WGL/__init__.py
Python
lgpl-3.0
85
# -*- Mode:Python -*- ########################################################################## # # # This file is part of AVANGO. # # ...
vrsys/avangong
examples/avango-utils/load_pcd.py
Python
lgpl-3.0
3,367
# partial unit test for gmpy2 threaded mpz functionality # relies on Tim Peters' "doctest.py" test-driver import gmpy2 as _g, doctest, sys, operator, gc, queue, threading from functools import reduce __test__={} def _tf(N=2, _K=1234**5678): """Takes about 100ms on a first-generation Macbook Pro""" for i in ra...
andreamartire/gmpy
test3/gmpy_test_thr.py
Python
lgpl-3.0
3,614
# pylint: disable=missing-docstring,unused-import,import-error, wildcard-import,unused-wildcard-import,redefined-builtin,no-name-in-module,ungrouped-imports,wrong-import-order from time import sleep, sleep # [reimported] from lala import missing, missing # [reimported] import missing1 import missing1 # [reimpor...
arju88nair/projectCulminate
venv/lib/python3.5/site-packages/pylint/test/functional/reimported.py
Python
apache-2.0
540
# Copyright 2021 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...
tensorflow/tensorflow
tensorflow/python/distribute/v1/input_lib.py
Python
apache-2.0
16,205
# Copyright 2015 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...
sachinpro/sachinpro.github.io
tensorflow/python/framework/tensor_util.py
Python
apache-2.0
23,028
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010-2011 OpenStack LLC. # 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...
tylertian/Openstack
openstack F/cinder/cinder/api/openstack/volume/views/limits.py
Python
apache-2.0
3,478
# # 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...
xsm110/Apache-Beam
sdks/python/apache_beam/utils/counters.py
Python
apache-2.0
6,154
# Copyright 2012 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...
nikesh-mahalka/cinder
cinder/api/contrib/services.py
Python
apache-2.0
7,673
#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "Li...
wileeam/airflow
airflow/security/utils.py
Python
apache-2.0
2,840
from __future__ import unicode_literals import cgi import codecs import logging import re import sys from io import BytesIO from django import http from django.conf import settings from django.core import signals from django.core.handlers import base from django.urls import set_script_prefix from django.utils import ...
filias/django
django/core/handlers/wsgi.py
Python
bsd-3-clause
9,048
#!/usr/bin/python # -*- coding: latin-1 -*- usage = """\ usage: %prog [options] connection_string Unit tests for SQL Server. To use, pass a connection string as the parameter. The tests will create and drop tables t1 and t2 as necessary. These run using the version from the 'build' directory, not the version instal...
FlipperPA/pyodbc
tests2/sqlservertests.py
Python
mit
54,094
"""Test kytos.core.websocket module.""" import logging from copy import copy from unittest import TestCase from unittest.mock import Mock from kytos.core.logs import LogManager class TestWebSocketLog(TestCase): """Test special requirements for web socket logging.""" def test_no_requests_logging(self): ...
kytos/kytos
tests/unit/test_core/test_websocket.py
Python
mit
1,046
## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup # fetch values from package.xml setup_args = generate_distutils_setup( packages=['naoqi_driver'], package_dir={'': 'src'}) setup(**setup_args)
LCAS/spqrel_tools
ros_ws/src/naoqi_bridge/naoqi_driver_py/setup.py
Python
mit
311
"""Loading, parsing and storing of completion configurations.""" from __future__ import annotations import abc import dataclasses import os import typing as t from .constants import ( CONTROLLER_PYTHON_VERSIONS, SUPPORTED_PYTHON_VERSIONS, ) from .util import ( ANSIBLE_TEST_DATA_ROOT, read_lines_witho...
nitzmahone/ansible
test/lib/ansible_test/_internal/completion.py
Python
gpl-3.0
8,217
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' External inventory script for Scaleway ==================================== Shamelessly copied from an existing inventory script. This script generates an inventory that Ansible can understand by making API requests to Scaleway API Requires some python libraries, en...
Nitaco/ansible
contrib/inventory/scaleway.py
Python
gpl-3.0
7,193
# 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 urlparse import parse_qs, urlparse from django.conf.urls import RegexURLPattern from django.test import TestCase fr...
CSCI-462-01-2017/bedrock
bedrock/redirects/tests/test_util.py
Python
mpl-2.0
16,002
# -*- coding: utf-8 -*- """ sphinx.util.png ~~~~~~~~~~~~~~~ PNG image manipulation helpers. :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import struct import binascii from sphinx.util.pycompat import b LEN_IEND = 12 LEN_DEPTH = 22 ...
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/sphinx/util/png.py
Python
agpl-3.0
1,652
#!/usr/bin/env python # Copyright (C) 2015 Swift Navigation Inc. # Contact: Bhaskar Mookerji <mookerji@swiftnav.com> # # This source is subject to the license found in the file 'LICENSE' which must # be be distributed together with this source. All other rights reserved. # # THIS CODE AND INFORMATION IS PROVIDED "AS IS...
paparazzi/libsbp
python/bench/memory.py
Python
lgpl-3.0
1,036
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GL import _types as _cs # End users want this... from OpenGL.raw.GL._types import * from OpenGL.raw.GL import _errors from OpenGL.constant import Constant as _C import ctypes _...
stack-of-tasks/rbdlpy
tutorial/lib/python2.7/site-packages/OpenGL/raw/GL/ARB/texture_swizzle.py
Python
lgpl-3.0
781
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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-...
jessicalucci/NovaOrc
nova/api/openstack/compute/contrib/used_limits.py
Python
apache-2.0
2,963
from novaclient.v1_1 import limits from novaclient.tests import utils from novaclient.tests.v1_1 import fakes cs = fakes.FakeClient() class LimitsTest(utils.TestCase): def test_get_limits(self): obj = cs.limits.get() cs.assert_called('GET', '/limits') self.assertTrue(isinstance(obj, li...
tylertian/Openstack
openstack F/python-novaclient/novaclient/tests/v1_1/test_limits.py
Python
apache-2.0
2,505
# encoding: utf-8 """ (C) 2012 by Maho (?ukasz Mach) License: GPL Poor man's i18n support for Pyjamas. _("identifier") returns you translated version of "identifier". If you want original (English) version, just do nothing. If you want other language (eg. PL), please import translation_pl in...
pombredanne/pyjs
pyjswidgets/pyjamas/locale.py
Python
apache-2.0
685
#!/usr/bin/env python # # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
YueLinHo/Subversion
tools/bdb/whatis-rep.py
Python
apache-2.0
2,467
"""Collects and displays information to the user.""" from __future__ import print_function import collections import logging import os import Queue import sys import textwrap import zope.interface from letsencrypt import interfaces from letsencrypt import le_util logger = logging.getLogger(__name__) class Report...
xgin/letsencrypt
letsencrypt/reporter.py
Python
apache-2.0
3,253