repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
willu47/SALib
tests/test_cli_analyze.py
1
7726
import sys import subprocess from SALib.test_functions import Ishigami import numpy as np import re salib_cli = "./src/SALib/scripts/salib.py" ishigami_fp = "./src/SALib/test_functions/params/Ishigami.txt" if sys.version_info[0] == 2: subprocess.run = subprocess.call def test_delta(): cmd = "python {cli} sa...
mit
yjxtogo/horizon
horizon/__init__.py
85
2217
# Copyright 2012 Nebula, 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 agree...
apache-2.0
dneg/cortex
python/IECore/SWAReader.py
12
4885
########################################################################## # # Copyright (c) 2012, John Haddon. 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 sou...
bsd-3-clause
amith01994/intellij-community
python/lib/Lib/site-packages/django/contrib/flatpages/tests/csrf.py
94
3788
import os from django.conf import settings from django.contrib.auth.models import User from django.test import TestCase, Client class FlatpageCSRFTests(TestCase): fixtures = ['sample_flatpages'] urls = 'django.contrib.flatpages.tests.urls' def setUp(self): self.client = Client(enforce_csrf_checks=...
apache-2.0
rghe/ansible
test/units/modules/network/f5/test_bigip_wait.py
10
3828
# -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # 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 import os import json import pytest import sys from nose.plugins.skip imp...
gpl-3.0
chafique-delli/OpenUpgrade
addons/website_twitter/controllers/main.py
76
1637
from openerp.addons.web import http from openerp.addons.web.http import request from openerp.tools.translate import _ import json class Twitter(http.Controller): @http.route(['/twitter_reload'], type='json', auth="user", website=True) def twitter_reload(self): return request.website.fetch_favorite_twe...
agpl-3.0
JKRP/geonode
geonode/groups/search_indexes.py
27
1292
import json from django.conf import settings from haystack import indexes from geonode.groups.models import GroupProfile class GroupIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.CharField(document=True, use_template=True) title = indexes.CharField(boost=2) # https://github.com/toastdriv...
gpl-3.0
mclois/iteexe
twisted/test/test_pbfailure.py
16
6031
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.trial import unittest from twisted.spread import pb, flavors, jelly from twisted.internet import reactor, defer from twisted.python import log, failure ## # test exceptions ## class PoopError(Exception): pass class FailEr...
gpl-2.0
Zyell/home-assistant
tests/components/binary_sensor/test_template.py
3
4085
"""The tests for the Template Binary sensor platform.""" import unittest from unittest import mock from homeassistant.const import EVENT_STATE_CHANGED from homeassistant.components.binary_sensor import template from homeassistant.exceptions import TemplateError from tests.common import get_test_home_assistant class...
mit
kingvuplus/xrd-alliance
lib/python/Screens/Downloads.py
1
23946
from Plugins.Plugin import PluginDescriptor from Components.Sources.List import List from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmapAlphaTest from enigma import eTimer, quitMainloop, RT_HALIGN_LEFT, RT_VALIGN_CENTER, eListboxPythonMultiContent, eListbox, gFont, getDesktop, ePicLoad fr...
gpl-2.0
colford/sirf_receiver_frontend
sirfcontrol/sirfui.py
1
7631
# -*- coding: utf-8 -*- """ Created on Fri Feb 24 15:59:29 2017 @author: CFord """ import sys, math, signal from PyQt4 import QtGui, QtCore from PyQt4.QtGui import * from PyQt4.QtCore import * from collections import deque from sirfcontrol.sirf import SirfMessageReader # Globals to begin with port = "COM7" baud = 38...
gpl-3.0
pigeonflight/strider-plone
docker/appengine/lib/django-1.4/tests/modeltests/invalid_models/invalid_models/models.py
33
26337
#encoding=utf-8 """ 26. Invalid models This example exists purely to point out errors in models. """ from django.db import connection, models class FieldErrors(models.Model): charfield = models.CharField() charfield2 = models.CharField(max_length=-1) charfield3 = models.CharField(max_length="bad") d...
mit
Teamxrtc/webrtc-streaming-node
third_party/depot_tools/external_bin/gsutil/gsutil_4.15/gsutil/third_party/boto/tests/unit/ec2/test_securitygroup.py
112
8556
#!/usr/bin/env python from tests.compat import unittest from tests.unit import AWSMockServiceTestCase from boto.ec2.connection import EC2Connection from boto.ec2.securitygroup import SecurityGroup DESCRIBE_SECURITY_GROUP = br"""<?xml version="1.0" encoding="UTF-8"?> <DescribeSecurityGroupsResponse xmlns="http://ec2...
mit
south-coast-science/scs_core
tests/position/position_test.py
1
1174
#!/usr/bin/env python3 """ Created on 10 Feb 2021 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) Getting distance between two points based on latitude/longitude https://stackoverflow.com/questions/19412462/getting-distance-between-two-points-based-on-latitude-longitude """ from scs_core.position.positio...
mit
dbarbier/privot
python/test/t_FrankCopula_std.py
1
2700
#! /usr/bin/env python from openturns import * from math import * TESTPREAMBLE() RandomGenerator().SetSeed(0) try : # Instanciate one distribution object dim = 2 copula = FrankCopula(2.5) print "Copula " , repr(copula) print "Copula " , copula print "Mean " , repr(copula.getMean()) print ...
lgpl-3.0
pyfa-org/eos
tests/mod_builder/etree/affectee_filter/test_affectee_dom_grp.py
1
5818
# ============================================================================== # Copyright (C) 2011 Diego Duclos # Copyright (C) 2011-2018 Anton Vorobyov # # This file is part of Eos. # # Eos is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as publi...
lgpl-3.0
bertrand-l/LearnML
learnml/datasets/load.py
1
6085
# -*- coding: utf-8 -*- """ Utilities to load datasets from the `dataset` package. """ # Author: bertrand-l # License: BSD from __future__ import absolute_import, division, print_function, unicode_literals import os import numpy as np from .dataset import DataSet __all__ = ('load_faithful', 'load_iris', 'load_women'...
bsd-3-clause
2ndQuadrant/ansible
test/units/modules/storage/netapp/test_na_ontap_cifs_server.py
38
8705
# (c) 2018, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ''' unit tests ONTAP Ansible module: na_ontap_cifs_server ''' from __future__ import print_function import json import pytest from units.compat import unittest from units.compat.mock import patch from...
gpl-3.0
Fusion-Rom/android_external_chromium_org
ppapi/generators/idl_log.py
137
1271
# Copyright (c) 2012 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. """ Error and information logging for IDL """ import sys class IDLLog(object): """Captures and routes logging output. Caputres logging output and...
bsd-3-clause
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Lib/test/test_complex.py
32
27808
import unittest from test import test_support from random import random from math import atan2, isnan, copysign INF = float("inf") NAN = float("nan") # These tests ensure that complex math does the right thing class ComplexTest(unittest.TestCase): def assertAlmostEqual(self, a, b): if isinstance(a, comp...
mit
sysadminmatmoz/OCB
addons/website_blog/tests/test_website_blog_flow.py
45
2781
# -*- coding: utf-8 -*- from openerp.addons.website_blog.tests.common import TestWebsiteBlogCommon class TestWebsiteBlogFlow(TestWebsiteBlogCommon): def test_website_blog_followers(self): """ Test the flow of followers and notifications for blogs. Intended flow : - people subscribe to ...
agpl-3.0
AnishShah/tensorflow
tensorflow/contrib/keras/api/keras/datasets/imdb/__init__.py
39
1036
# Copyright 2016 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...
apache-2.0
40223117cda/2015cdaw13
static/Brython3.1.0-20150301-090019/Lib/site-packages/pygame/locals.py
603
1141
## pygame - Python Game Library ## Copyright (C) 2000-2003 Pete Shinners ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License...
gpl-3.0
tsabi/Odoo-tsabi-fixes
addons/subscription/subscription.py
337
8906
# -*- 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...
agpl-3.0
Novasoft-India/OperERP-AM-Motors
openerp/addons/account_asset/account_asset.py
14
29289
# -*- encoding: 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 G...
agpl-3.0
dset0x/invenio
invenio/modules/oauth2server/upgrades/oauth2server_2015_07_14_innodb.py
2
1644
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015 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 your option) any later...
gpl-2.0
caot/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/tests/distapp/models.py
406
1832
from django.contrib.gis.db import models class SouthTexasCity(models.Model): "City model on projected coordinate system for South Texas." name = models.CharField(max_length=30) point = models.PointField(srid=32140) objects = models.GeoManager() def __unicode__(self): return self.name class SouthTe...
apache-2.0
xodus7/tensorflow
tensorflow/contrib/learn/python/learn/learn_io/graph_io.py
39
37211
# Copyright 2016 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...
apache-2.0
davisagli/eye
eye/views.py
1
1372
import cgi import json import pprint from webob import Response from persistent import Persistent def as_json(context): """Return an object's representation as JSON""" info = { 'info': cgi.escape(pprint.pformat(context.context)), } return Response(content_type='application/json', body=json.dum...
mit
danilito19/django
tests/serializers/tests.py
118
30530
# -*- 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.core.serializers.base import ProgressBar from django.db import connection, transa...
bsd-3-clause
protatremy/buildbot
worker/buildbot_worker/exceptions.py
9
1155
# This file is part of Buildbot. Buildbot 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 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
slohse/ansible
test/units/modules/network/netscaler/test_netscaler_nitro_request.py
57
12941
# Copyright (c) 2017 Citrix Systems # # 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. # # ...
gpl-3.0
stack-of-tasks/rbdlpy
tutorial/lib/python2.7/site-packages/OpenGL/raw/GLES2/IMG/multisampled_render_to_texture.py
8
1173
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GLES2 import _types as _cs # End users want this... from OpenGL.raw.GLES2._types import * from OpenGL.raw.GLES2 import _errors from OpenGL.constant import Constant as _C import...
lgpl-3.0
Jgarcia-IAS/SAT
openerp/addons-extra/odoo-pruebas/odoo-server/addons/hw_posbox_upgrade/__openerp__.py
313
1696
# -*- 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...
agpl-3.0
NeblioTeam/neblio
test/functional/todo/p2p_unrequested_blocks.py
1
14460
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test processing of unrequested blocks. Setup: two nodes, node0+node1, not connected to each other. Nod...
mit
celery/kombu
t/mocks.py
2
4712
from itertools import count from unittest.mock import Mock from case import ContextMock from kombu.transport import base from kombu.utils import json def PromiseMock(*args, **kwargs): m = Mock(*args, **kwargs) def on_throw(exc=None, *args, **kwargs): if exc: raise exc raise ...
bsd-3-clause
igniteflow/codebase-python-api-client
codebase/utils.py
1
2236
import sys from codebase import logger from codebase.client import CodeBaseAPI class CodeBaseAPIUtils(CodeBaseAPI): def bulk_update_ticket_statuses(self, current_status_name, target_status_name): """ Example usage to set all "Approved for Dev" tp "Deployed to Dev": STATUS_TRANSITIONS = ...
mit
labcodes/django
tests/forms_tests/widget_tests/base.py
83
1134
from django.forms.renderers import DjangoTemplates, Jinja2 from django.test import SimpleTestCase try: import jinja2 except ImportError: jinja2 = None class WidgetTest(SimpleTestCase): beatles = (('J', 'John'), ('P', 'Paul'), ('G', 'George'), ('R', 'Ringo')) @classmethod def setUpClass(cls): ...
bsd-3-clause
sushramesh/lwc
lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/hebrewprober.py
2929
13359
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Shy Shalom # Portions created by the Initial Developer are Copyright (C) 2005 # the Initial Developer. All Rights Reserved. #...
mit
seize-the-dave/XlsxWriter
xlsxwriter/test/worksheet/test_cond_format13.py
8
4541
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ..helperfunctions import _xml_to_list from ...worksheet import Worksheet class TestAss...
bsd-2-clause
PrestonMonteWest/compmart
account/forms.py
1
5138
import datetime import re from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.forms.widgets import Widget, Select from django.utils import six from django.utils.dates import MONTHS from django.utils.safestring import mark_safe from .mod...
apache-2.0
asm-products/movie-database-service
ani/lib/python2.7/site-packages/Crypto/SelfTest/Util/test_Counter.py
117
7095
# -*- coding: utf-8 -*- # # SelfTest/Util/test_Counter: Self-test for the Crypto.Util.Counter module # # Written in 2009 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent t...
agpl-3.0
xuweiliang/Codelibrary
nova/virt/xenapi/volumeops.py
17
9667
# Copyright (c) 2010 Citrix Systems, Inc. # Copyright (c) 2013 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...
apache-2.0
puzan/ansible
lib/ansible/modules/cloud/google/gce_img.py
25
6737
#!/usr/bin/python # Copyright 2015 Google Inc. All Rights Reserved. # # 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 o...
gpl-3.0
abhattad4/Digi-Menu
tests/many_to_many/tests.py
58
19011
from __future__ import unicode_literals from django.db import transaction from django.test import TestCase from django.utils import six from .models import Article, Publication class ManyToManyTests(TestCase): def setUp(self): # Create a couple of Publications. self.p1 = Publication.objects.cre...
bsd-3-clause
Smart-Torvy/torvy-home-assistant
homeassistant/components/notify/ecobee.py
6
1245
""" Support for ecobee Send Message service. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.ecobee/ """ import logging import voluptuous as vol from homeassistant.components import ecobee from homeassistant.components.notify import ( BaseNot...
mit
brain-tec/l10n-switzerland
l10n_ch_bank/models/bank.py
2
1706
# Copyright 2014 Olivier Jossen brain-tec AG # Copyright 2014-2015 Guewen Baconnier (Camptocamp SA) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import models, fields class ResBank(models.Model): """ Inherit res.bank class in order to add swiss specific fields Fields from the ori...
agpl-3.0
htzy/bigfour
common/lib/calc/calc/tests/test_calc.py
190
20806
""" Unit tests for calc.py """ import unittest import numpy import calc from pyparsing import ParseException # numpy's default behavior when it evaluates a function outside its domain # is to raise a warning (not an exception) which is then printed to STDOUT. # To prevent this from polluting the output of the tests, ...
agpl-3.0
mcgachey/edx-platform
common/lib/xmodule/xmodule/modulestore/store_utilities.py
124
4490
import re import logging from collections import namedtuple import uuid def _prefix_only_url_replace_regex(pattern): """ Match urls in quotes pulling out the fields from pattern """ return re.compile(ur""" (?x) # flags=re.VERBOSE (?P<quote>\\?['"]) # the op...
agpl-3.0
chrwi/ardupilot
Tools/LogAnalyzer/DataflashLog.py
83
27803
# # Code to abstract the parsing of APM Dataflash log files, currently only used by the LogAnalyzer # # Initial code by Andrew Chapman (amchapman@gmail.com), 16th Jan 2014 # from __future__ import print_function import collections import os import numpy import bisect import sys import ctypes class Format(object): ...
gpl-3.0
infobloxopen/infoblox-netmri
infoblox_netmri/api/broker/v2_6_0/attribute_doc_broker.py
17
45632
from ..broker import Broker class AttributeDocBroker(Broker): controller = "attribute_docs" def show(self, **kwargs): """Shows the details for the specified attribute doc. **Inputs** | ``api version min:`` None | ``api version max:`` None | ``requi...
apache-2.0
spyder-ide/conda-manager
conda_manager/widgets/search.py
2
2652
# -*- coding:utf-8 -*- # # Copyright © 2015 The Spyder Development Team # Copyright © 2014 Gonzalo Peña-Castellanos (@goanpeca) # # Licensed under the terms of the MIT License """ """ # Standard library imports from __future__ import (absolute_import, division, print_function, unicode_literal...
mit
aldryn/aldryn-blog
aldryn_blog/search_indexes.py
1
1338
# -*- coding: utf-8 -*- from django.db.models import Q from django.template import RequestContext from aldryn_search.utils import get_index_base, strip_tags from .conf import settings from .models import Post class BlogIndex(get_index_base()): haystack_use_for_indexing = settings.ALDRYN_BLOG_SEARCH INDEX_T...
bsd-3-clause
hforge/itools
itools/database/backends/patchs.py
1
5600
# -*- coding: UTF-8 -*- # Copyright (C) 2020 Sylvain Taverne <sylvain@agicia.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 License, or # (at your option) any lat...
gpl-3.0
se4u/pylearn2
pylearn2/scripts/papers/maxout/svhn_preprocessing.py
55
2006
import os import logging import shutil from theano import config from pylearn2.datasets import preprocessing from pylearn2.datasets.svhn import SVHN from pylearn2.utils.string_utils import preprocess orig_path = preprocess('${PYLEARN2_DATA_PATH}/SVHN/format2') try: local_path = preprocess('${SVHN_LOCAL_PATH}') exc...
bsd-3-clause
AcalephStorage/ansible-modules-extras
network/f5/bigip_monitor_http.py
8
16585
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, serge van Ginderachter <serge@vanginderachter.be> # based on Matt Hite's bigip_pool module # (c) 2013, Matt Hite <mhite@hotmail.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...
gpl-3.0
asm-products/movie-database-service
ani/lib/python2.7/site-packages/pip/commands/uninstall.py
395
2203
from pip.req import InstallRequirement, RequirementSet, parse_requirements from pip.basecommand import Command from pip.exceptions import InstallationError class UninstallCommand(Command): """ Uninstall packages. pip is able to uninstall most installed packages. Known exceptions are: - Pure distutil...
agpl-3.0
eaplatanios/tensorflow
tensorflow/python/ops/rnn.py
3
62251
# 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...
apache-2.0
nvoron23/brython
src/Lib/pyre.py
115
15252
# # Secret Labs' Regular Expression Engine # # re-compatible interface for the sre matching engine # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # This version of the SRE library can be redistributed under CNRI's # Python 1.6 license. For any other use, please contact Secret Labs # AB (info@py...
bsd-3-clause
sirrice/scorpion
scorpion/sigmod/overlap.py
1
5112
import math import pdb import numpy as np import Orange from Orange.feature import Type as OType class OverlapPenalty(object): def __init__(self, domain, cdists, ddists, granularity=100): """ Args: domain: Orange.Domain object """ self.domain = domain self.cdists = cdists self.ddists ...
mit
nunogt/tempest
tempest/api/object_storage/test_object_temp_url_negative.py
15
3914
# Copyright (C) 2013 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...
apache-2.0
YingHsuan/termite_data_server
web2py/anyserver.py
19
12802
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) This file is based, although a rewrite, on MIT-licensed code from the Bottle web framework. """ import os ...
bsd-3-clause
UTSA-ICS/keystone-kerberos
keystone/common/cache/backends/noop.py
30
1426
# Copyright 2013 Metacloud # # 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...
apache-2.0
batxes/4Cin
Six_zebra_models/Six_zebra_models_final_output_0.1_-0.1_13000/mtx1_models/Six_zebra_models10386.py
4
13923
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
gpl-3.0
jorik041/phantomjs
src/breakpad/src/third_party/protobuf/protobuf/python/google/protobuf/internal/decoder.py
261
25883
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
bsd-3-clause
lreis2415/SEIMS
seims/__init__.py
1
1350
#! /usr/bin/env python # -*- coding: utf-8 -*- """@package pySEIMS Python APIs for SEIMS Preprocess, postprocess, parameters sensitivity, calibration, and scenario_analysis ------------------- author : Liangjun Zhu, Junzhi Liu copyright : (C) 2018-...
gpl-3.0
matthiasdiener/spack
var/spack/repos/builtin/packages/plumed/package.py
4
7313
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
sovietspy2/uzletiProject
python/Lib/encodings/iso2022_jp_2004.py
61
1112
# # iso2022_jp_2004.py: Python Unicode Codec for ISO2022_JP_2004 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_iso2022, codecs import _multibytecodec as mbc codec = _codecs_iso2022.getcodec('iso2022_jp_2004') class Codec(codecs.Codec): encode = codec.encode decode = codec.de...
gpl-3.0
forYali/yali
setup.py
1
4733
#!/usr/bin/env python # # Copyright (C) 2005-2010 TUBITAK/UEKAE # # 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. # # Pl...
gpl-2.0
qspin/qtaste
doc/src/docbkx/scripts/lib/PyGithub/github/PullRequest.py
72
23575
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Michael Stead <michael.stead@gmail.com> # # Copyright 2012 Vincent Jacques <vincent@vincent-ja...
lgpl-3.0
petteyg/intellij-community
python/lib/Lib/site-packages/django/utils/unittest/__init__.py
571
3069
""" unittest2 unittest2 is a backport of the new features added to the unittest testing framework in Python 2.7. It is tested to run on Python 2.4 - 2.6. To use unittest2 instead of unittest simply replace ``import unittest`` with ``import unittest2``. Copyright (c) 1999-2003 Steve Purcell Copyright (c) 2003-2010 P...
apache-2.0
infoclock/OlympicTracker
allauthdemo/demo/views.py
1
3564
import math from django.shortcuts import render from django.views import generic from allauthdemo.auth.models import DemoUser from allauthdemo.demo.models import Problem from fileupload.models import Submission from allauthdemo.demo.models import ContestParticipation class ProblemView(generic.ListView): model = Pr...
mit
Joev-/HoNCore
honcore/requester.py
1
3523
""" HoNCore. Python library providing connectivity and functionality with HoN's chat server. """ import hashlib, urllib2 from exceptions import * from httplib import BadStatusLine """ Sends requests to the HoN master servers. These are just basic HTTP get requests which return serialised php. A version of ...
unlicense
NaturalGIS/QGIS
tests/src/python/test_qgsnullsymbolrenderer.py
45
3186
# -*- coding: utf-8 -*- """ *************************************************************************** test_qgsnullsymbolrenderer.py ----------------------------- Date : April 2016 Copyright : (C) 2016 by Nyall Dawson Email : nyall dot dawson at gmail dot ...
gpl-2.0
gazpachoking/Flexget
flexget/components/notify/notifiers/email.py
4
7177
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from future.utils import text_to_native_str import logging import smtplib import socket import getpass from email.mime.multipart import MIMEMultipart from email.mime.text i...
mit
Yen-Chung-En/w16b_test
static/Brython3.1.3-20150514-095342/Lib/xml/sax/expatreader.py
870
14659
""" SAX driver for the pyexpat C module. This driver works with pyexpat.__version__ == '2.22'. """ version = "0.20" from xml.sax._exceptions import * from xml.sax.handler import feature_validation, feature_namespaces from xml.sax.handler import feature_namespace_prefixes from xml.sax.handler import feature_external_...
agpl-3.0
mancoast/CPythonPyc_test
fail/323_test_socket.py
1
76285
#!/usr/bin/env python3 import unittest from test import support import errno import io import socket import select import time import traceback import queue import sys import os import array import platform import contextlib from weakref import proxy import signal import math try: import fcntl except ImportError:...
gpl-3.0
melbit-kevinwessel/ansible-modules-extras
packaging/language/npm.py
73
8566
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Chris Hoffman <christopher.hoffman@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 ...
gpl-3.0
jschnurr/scrapyscript
tests/test_scrapyscript.py
1
2302
import unittest from scrapy.settings import Settings from scrapy.spiders import Spider import scrapy from scrapyscript import Job, Processor, ScrapyScriptException class MySpider(Spider): name = 'myspider' def start_requests(self): yield scrapy.Request(self.url) def parse(self, response): ...
mit
bkrukowski/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/config/ports_mock.py
121
2482
# Copyright (C) 2011 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 of conditions and the f...
bsd-3-clause
cbmoore/statsmodels
statsmodels/sandbox/tools/tools_pca.py
39
4142
# -*- coding: utf-8 -*- """Principal Component Analysis Created on Tue Sep 29 20:11:23 2009 Author: josef-pktd TODO : add class for better reuse of results """ import numpy as np def pca(data, keepdim=0, normalize=0, demean=True): '''principal components with eigenvector decomposition similar to princomp ...
bsd-3-clause
Metaswitch/calico-neutron
neutron/plugins/cisco/l3/rpc/devices_cfgagent_rpc_cb.py
16
2020
# Copyright 2014 Cisco Systems, 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 requir...
apache-2.0
solarpermit/solarpermit
website/migrations/0083_auto__add_field_view_view_type__add_field_view_user__add_field_view_ju.py
1
57706
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'View.view_type' db.add_column('website_view', 'view_type', self.gf('dj...
bsd-3-clause
chunywang/crosswalk-test-suite
embeddingapi/embedding-build-android-tests/gradle/crosswalk_online_gradle_build_app.py
18
2264
#!/usr/bin/env python # # Copyright (c) 2015 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of conditions and t...
bsd-3-clause
skycucumber/restful
python/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/filepost.py
551
2512
# urllib3/filepost.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import codecs import mimetypes from uuid import uuid4 from io import BytesIO from .packages ...
gpl-2.0
kieferbonk/xbmc-finnish-tv
plugin.video.yleareena/osx/Crypto/SelfTest/Protocol/test_rfc1751.py
132
2208
# # Test script for Crypto.Util.RFC1751. # # Part of the Python Cryptography Toolkit # # Written by Andrew Kuchling and others # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is ...
gpl-3.0
marionleborgne/nupic.research
projects/sequence_prediction/discrete_sequences/plotMultiplePrediction.py
12
3551
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
agpl-3.0
aladdinwang/django-cms
cms/plugins/picture/migrations/0012_auto__chg_field_picture_height__chg_field_picture_width.py
1
7553
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Picture.height' db.alter_column(u'cmsplugin_picture', 'height', self.gf('django.db.models...
bsd-3-clause
bbangert/velruse
velruse/providers/renren.py
3
4133
"""Renren Authentication Views""" from pyramid.httpexceptions import HTTPFound from pyramid.security import NO_PERMISSION_REQUIRED import requests from ..api import ( AuthenticationComplete, AuthenticationDenied, register_provider, ) from ..exceptions import ThirdPartyFailure from ..settings import Provid...
mit
klunwebale/odoo
addons/mail/wizard/mail_compose_message.py
218
20346
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
jiasir/playback
playback/cli/swift_storage.py
2
21875
import sys import logging import os from playback.cli.cliutil import priority from playback.api import SwiftStorage from cliff.command import Command def make_target(args): try: target = SwiftStorage(user=args.user, hosts=args.hosts.split(','), key_filename=args.key_filename, ...
mit
minorua/QGIS
python/testing/mocked.py
45
1873
# -*- coding: utf-8 -*- """ *************************************************************************** mocked --------------------- Date : January 2016 Copyright : (C) 2016 by Matthias Kuhn Email : matthias@opengis.ch **************************************...
gpl-2.0
skuda/client-python
kubernetes/test/test_autoscaling_v2alpha1_api.py
1
2946
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.6.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
apache-2.0
BonexGu/Blik2D-SDK
Blik2D/addon/tensorflow-1.2.1_for_blik/tensorflow/python/kernel_tests/one_hot_op_test.py
139
12639
# 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...
mit
dhoffman34/django
django/core/files/uploadedfile.py
91
4334
""" Classes representing uploaded files. """ import errno import os from io import BytesIO from django.conf import settings from django.core.files.base import File from django.core.files import temp as tempfile from django.utils.encoding import force_str __all__ = ('UploadedFile', 'TemporaryUploadedFile', 'InMemoryU...
bsd-3-clause
Glottotopia/aagd
moin/local/moin/MoinMoin/userprefs/suid.py
2
3485
# -*- coding: iso-8859-1 -*- """ MoinMoin - switch user form @copyright: 2001-2004 Juergen Hermann <jh@web.de>, 2003-2007 MoinMoin:ThomasWaldmann 2007 MoinMoin:JohannesBerg @license: GNU GPL, see COPYING for details. """ from MoinMoin import user, util, wikiu...
mit
MediaSapiens/wavesf
django/contrib/localflavor/se/forms.py
311
5623
# -*- coding: utf-8 -*- """ Swedish specific Form helpers """ import re from django import forms from django.utils.translation import ugettext_lazy as _ from django.core.validators import EMPTY_VALUES from django.contrib.localflavor.se.utils import (id_number_checksum, validate_id_birthday, format_personal_id_numbe...
bsd-3-clause
yunify/qingcloud-cli
qingcloud/cli/iaas_client/actions/s2/create_s2_account.py
1
3527
# ========================================================================= # Copyright 2012-present Yunify, Inc. # ------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this work except in compliance with the Licens...
apache-2.0
snnn/tensorflow
tensorflow/contrib/boosted_trees/python/kernel_tests/prediction_ops_test.py
25
59018
# 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...
apache-2.0
rocknamx8/rocknamx8.github.io
node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py
1569
23354
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utility functions to perform Xcode-style build steps. These functions are executed via gyp-mac-tool when using the Makefile generator. ""...
apache-2.0