repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
jshiv/turntable
test/lib/python2.7/site-packages/scipy/linalg/_interpolative_backend.py
143
44935
#****************************************************************************** # Copyright (C) 2013 Kenneth L. Ho # # 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 t...
mit
trabacus-softapps/openerp-8.0-cc
openerp/addons/payment_ogone/controllers/main.py
389
1179
# -*- coding: utf-8 -*- import logging import pprint import werkzeug from openerp import http, SUPERUSER_ID from openerp.http import request _logger = logging.getLogger(__name__) class OgoneController(http.Controller): _accept_url = '/payment/ogone/test/accept' _decline_url = '/payment/ogone/test/decline' ...
agpl-3.0
doganov/edx-platform
lms/djangoapps/course_api/tests/mixins.py
58
1069
""" Common mixins for Course API Tests """ from datetime import datetime from student.tests.factories import UserFactory from xmodule.modulestore.tests.factories import ToyCourseFactory TEST_PASSWORD = u'edx' class CourseApiFactoryMixin(object): """ Mixin to allow creation of test courses and users. "...
agpl-3.0
rjsamson/simplebeerservice
sbsunit/devices/ultrasonic_ranger.py
2
2027
''' Copyright 2014-2015 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at http://aws.amazon.com/apache2.0/ or in the "license" file accompany...
apache-2.0
bondj/kafka
tests/kafkatest/services/kafka/version.py
13
2051
# Copyright 2015 Confluent 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...
apache-2.0
jlongstaf/f5-openstack-lbaasv2-driver
test/dev/TestPluginRPC_2.py
5
4187
import datetime import json import netaddr import sys from time import time import uuid from pprint import pprint from oslo_config import cfg import oslo_messaging as messaging from neutron.api.v2 import attributes from neutron.common import constants as q_const from neutron.common import rpc as q_rpc from neutron i...
apache-2.0
utn-frm-si/reservas
app_reservas/migrations/0020_modificacion_visortv.py
2
1055
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): """ Modificación de atributos y relaciones de VisorTv. """ dependencies = [ ('app_reservas', '0019_bedelia_a_visortv'), ] operations = [ ...
mit
andela-jngatia/Just-Do-It
bucketlist/migrations/0002_auto_20160310_0740.py
1
3876
# -*- coding: utf-8 -*- # Generated by Django 1.9.3 on 2016-03-10 07:40 from __future__ import unicode_literals import django.contrib.auth.models import django.core.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('...
mit
RenolY2/Renol-IRC
IRCpackets/channel_PART.py
2
1157
ID = "PART" def execute(self, sendMsg, prefix, command, params): print "SOMEBODY LEFT CHANNEL:" print prefix print params part1 = prefix.partition("!") part2 = part1[2].partition("@") name = part1[0] ident = part2[0] host = part2[2] print "CHANNEL LEAVE" if param...
mit
jskew/gnuradio
gr-blocks/python/blocks/qa_cpp_py_binding.py
37
5381
#!/usr/bin/env python # # Copyright 2012,2013,2015 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your ...
gpl-3.0
coderbone/SickRage
lib/imdb/parser/sql/dbschema.py
117
20506
#-*- encoding: utf-8 -*- """ parser.sql.dbschema module (imdb.parser.sql package). This module provides the schema used to describe the layout of the database used by the imdb.parser.sql package; functions to create/drop tables and indexes are also provided. Copyright 2005-2012 Davide Alberani <da@erlug.linux.it> ...
gpl-3.0
zstackio/zstack-woodpecker
integrationtest/vm/virtualrouter/ipsec/test_create_ipsec_policy_auth_sha1_sha256.py
2
5770
''' Test IPsec creation with difference policyAuthAlgorithm on difference hosts (sha1/sha256) @author: Glody ''' import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.test_state as test_state import zstackwoodpecker.operations.ipsec_operations as...
apache-2.0
collects/VTK
Filters/Texture/Testing/Python/socbal.py
8
13419
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Create the RenderWindow, Renderer and both Actors # ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren1) iren = vtk.vtkRenderWindowInteractor() iren.SetR...
bsd-3-clause
bob123bob/Sick-Beard
lib/dateutil/tz.py
270
32741
""" Copyright (c) 2003-2007 Gustavo Niemeyer <gustavo@niemeyer.net> This module offers extensions to the standard python 2.3+ datetime module. """ __author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>" __license__ = "PSF License" import datetime import struct import time import sys import os relativedelta = None pa...
gpl-3.0
darafferty/factor
factor/pipeline/plugins/PipelineStep_matchDistFreqs.py
3
2012
import os import casacore.tables as pt from lofarpipe.support.data_map import DataMap, DataProduct def plugin_main(args, **kwargs): """ Matches a mapfile with one in which the MSs are distributed Parameters ---------- mapfile_in : str Filename of datamap containing MS files mapfile_di...
gpl-2.0
valentin-krasontovitsch/ansible
test/units/plugins/action/test_synchronize.py
45
8928
''' (Epdb) pprint(DeepDiff(self.final_task_vars, out_task_vars), indent=2) { 'dic_item_added': set([u"root['ansible_python_interpreter']"]), 'dic_item_removed': set([ u"root['hostvars']['127.0.0.1']", u"root['hostvars']['::1']", u"root['hostvars']['localhost']"]...
gpl-3.0
pavgup/pbkdf2-sha256
configure.py
3
21049
#!/usr/bin/env python # # Copyright 2001 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
apache-2.0
fujunwei/chromium-crosswalk
tools/telemetry/telemetry/core/platform/mac_platform_backend_unittest.py
9
1532
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import unittest from telemetry.core import platform as platform_module from telemetry.core.platform import platform_backend from telemetry import ...
bsd-3-clause
hadronproject/lpms
lpms/shelltools.py
1
11180
# Copyright 2009 - 2011 Burak Sezer <purak@hadronproject.org> # # This file is part of lpms # # lpms is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
thaim/ansible
lib/ansible/modules/storage/netapp/netapp_e_amg_role.py
52
7909
#!/usr/bin/python # (c) 2016, NetApp, 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
mit
erwilan/ansible
lib/ansible/modules/cloud/vmware/vca_nat.py
49
6957
#!/usr/bin/python # Copyright (c) 2015 VMware, 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 ...
gpl-3.0
ratschlab/oqtans_tools
EasySVM/0.3.3/build/lib/splicesites/tutorial_example.py
5
9236
#!/usr/bin/env python ############################################################################################# # # # This program is free software; you can redistribute it and/or modify # # it under t...
mit
CTSRD-SOAAP/chromium-42.0.2311.135
tools/telemetry/telemetry/wpr/archive_info_unittest.py
11
7834
# Copyright 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. import json import os import shutil import tempfile import unittest from telemetry.page import page from telemetry.unittest_util import system_stub from tele...
bsd-3-clause
christiangalsterer/httpbeat
vendor/github.com/elastic/beats/metricbeat/tests/system/test_processors.py
2
7911
import re import sys import metricbeat import unittest @unittest.skipUnless(re.match("(?i)win|linux|darwin|freebsd", sys.platform), "os") class TestProcessors(metricbeat.BaseTest): def test_drop_fields(self): self.render_config_template( modules=[{ "name": "system", ...
apache-2.0
mglukhikh/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/geos/mutable_list.py
405
10386
# Copyright (c) 2008-2009 Aryeh Leib Taurog, all rights reserved. # Released under the New BSD license. """ This module contains a base type which provides list-style mutations without specific data storage methods. See also http://www.aryehleib.com/MutableLists.html Author: Aryeh Leib Taurog. """ class ListMixin(obj...
apache-2.0
rockwolf/python
cece/flask/Lib/site-packages/werkzeug/testsuite/exceptions.py
100
3325
# -*- coding: utf-8 -*- """ werkzeug.testsuite.exceptions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The tests for the exception classes. TODO: - This is undertested. HTML is never checked :copyright: (c) 2013 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import unittest fro...
bsd-3-clause
Tennyson53/SUR
magnum/common/pythonk8sclient/client/models/V1beta3_ContainerStateWaiting.py
15
1400
#!/usr/bin/env python """ Copyright 2015 Reverb Technologies, 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 require...
apache-2.0
dick-ey/Drawing-Robot
Production/node_modules/node-gyp/gyp/buildbot/buildbot_run.py
1467
4228
#!/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. """Argument-less script to select what to run on the buildbots.""" import os import shutil import subprocess import sys BUILDBOT_DIR = os....
mit
alejandrosantana/server-tools
super_calendar/tests/test_super_calendar.py
37
6530
# -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Management Solution # # Copyright (c) All rights reserved: # (c) 2012 Agile Business Group sagl (<http://www.agilebg.com>) # (c) 2012 Domsense srl (<http://www.domse...
agpl-3.0
beobal/python-driver
tests/integration/cqlengine/statements/test_insert_statement.py
8
2134
# Copyright 2015 DataStax, 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...
apache-2.0
CristinaCristescu/root
interpreter/llvm/src/tools/clang/utils/check_cfc/obj_diff.py
58
3559
#!/usr/bin/env python2.7 from __future__ import print_function import argparse import difflib import filecmp import os import subprocess import sys disassembler = 'objdump' def keep_line(line): """Returns true for lines that should be compared in the disassembly output.""" return "file format" not in li...
lgpl-2.1
gerashegalov/Impala
tests/unittests/test_result_verifier.py
16
2138
# Copyright (c) 2012 Cloudera, 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 o...
apache-2.0
NetApp/cinder
cinder/tests/unit/group/test_groups_manager.py
4
31202
# Copyright (C) 2016 EMC Corporation. # 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...
apache-2.0
apanju/GMIO_Odoo
addons/account_payment/account_invoice.py
382
2377
# -*- 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
sorgerlab/belpy
indra/tests/test_uniprot_client.py
2
5351
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str from indra.databases import uniprot_client from indra.util import unicode_strs from nose.plugins.attrib import attr @attr('webservice') def test_query_protein_exists(): g = uniprot_client.query_protein('P00533'...
mit
MediffRobotics/DeepRobotics
DeepBrain/SockCommun_Brain_Rpi.py
1
2527
import math class BrainCommuViaSock: def __init__(self): self.Uparm_OldShiftingSteps=0; self.Elbow_OldShiftingSteps=0; def Elbow_Angles2Steps(self,Angle_Deg=0): #Init MovingSide_InitLength=231.03; # connect to motor ShortSideLength=50;#mm...
gpl-3.0
marcharper/stationary
stationary/utils/matrix_checks.py
1
1986
from .math_helpers import kl_divergence_dict from .graph import Graph from .edges import edges_to_edge_dict from nose.tools import assert_almost_equal def check_detailed_balance(edges, s, places=7): """ Check if the detailed balance condition is satisfied. Parameters ---------- edges: list of tu...
mit
mhostetter/gnuradio
grc/gui/Colors.py
17
1969
""" Copyright 2008,2013 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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 l...
gpl-3.0
kalilinuxoo7/bitsendupgrade
src/test/bctest.py
37
5167
# Copyright 2014 BitPay Inc. # Copyright 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from __future__ import division,print_function,unicode_literals import subprocess import os import json impor...
mit
citrix-openstack-build/nova
nova/availability_zones.py
10
4790
# Copyright (c) 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 ...
apache-2.0
simutrans/pak128
tools/split-vehicles.py
2
4796
#! /usr/bin/python # -*- coding: utf-8 -*- # # Vladimír Slávik 2009 - 2011 # Python 2.6, 3.1 # # for Simutrans # http://www.simutrans.com # # code is public domain # # read all dat files in all subfolders # weed out all except vehicles # reformat them and save aside # WARNING: malformed files break the script!...
artistic-2.0
tensorflow/cloud
src/python/tensorflow_cloud/tuner/vizier_client.py
1
19569
# Lint as: python3 # Copyright 2020 Google 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.org/licenses/LICENSE-2.0 # # Unless required by ...
apache-2.0
pamfilos/invenio
modules/miscutil/lib/remote_debugger.py
21
10317
## This file is part of Invenio. ## Copyright (C) 2011 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 version. ## ## Inv...
gpl-2.0
yashsharan/sympy
sympy/polys/tests/test_heuristicgcd.py
126
3554
from sympy.polys.rings import ring from sympy.polys.domains import ZZ from sympy.polys.heuristicgcd import heugcd def test_heugcd_univariate_integers(): R, x = ring("x", ZZ) f = x**4 + 8*x**3 + 21*x**2 + 22*x + 8 g = x**3 + 6*x**2 + 11*x + 6 h = x**2 + 3*x + 2 cff = x**2 + 5*x + 4 cfg = x + ...
bsd-3-clause
PongPi/isl-odoo
openerp/report/preprocess.py
443
4700
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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
opoplawski/cobbler
tests/cli/imports/test_redhat/redhat_import_test.py
16
1258
import os import sys import unittest from cobbler import utils from tests.cli.imports.import_base import CobblerImportTest from tests.cli.imports.import_base import create_import_func class Test_RedHat_Imports(CobblerImportTest): """ Tests imports of various distros """ pass distros = [ {"name":"rhel58-...
gpl-2.0
georgemarshall/django-rest-auth
rest_allauth/app_settings.py
1
1793
from django.conf import settings from .account.serializers import ( UserDetailsSerializer as DefaultUserDetailsSerializer, LoginSerializer as DefaultLoginSerializer, ChangePasswordSerializer as DefaultChangePasswordSerializer, SetPasswordSerializer as DefaultSetPasswordSerializer, EmailSerializer a...
mit
realms-team/basestation-fw
libs/smartmeshsdk-REL-1.3.0.1/libs/SmartMeshSDK/ApiDefinition/HartMgrDefinition.py
3
84634
'''API Definition for HART Manager XML API''' import ApiDefinition import xmlutils import re # Add a log handler for the HART Manager import logging class NullHandler(logging.Handler): def emit(self, record): pass log = logging.getLogger('HartManager') log.setLevel(logging.INFO) log.addHandler(NullHand...
bsd-3-clause
ismk/Python-Examples
temp3.py
1
1914
import sys import sqlite3 as lite import time con = lite.connect("passwords.db") cur = con.cursor() cur.execute("CREATE TABLE if not EXISTS passwords(site VARCHAR(50), username VARCHAR(20), password VARCHAR(20));") print ("\n***** Welcome to Passwords.py. *****\n\n") choice = None while choice == None...
mit
DreamerKing/LightweightHtmlWidgets
LightweightHtmlWidgets/bin/Release/Ipy.Lib/lib2to3/fixes/fix_except.py
326
3352
"""Fixer for except statements with named exceptions. The following cases will be converted: - "except E, T:" where T is a name: except E as T: - "except E, T:" where T is not a name, tuple or list: except E as t: T = t This is done because the target of an "except" clause must be a ...
gpl-3.0
technologiescollege/s2a_fr
s2a/Python/Lib/site-packages/setuptools/command/develop.py
32
5310
from setuptools.command.easy_install import easy_install from distutils.util import convert_path from pkg_resources import Distribution, PathMetadata, normalize_path from distutils import log from distutils.errors import * import sys, os, setuptools, glob class develop(easy_install): """Set up package for developm...
gpl-3.0
AnalogJ/lexicon
lexicon/providers/cloudns.py
1
8480
"""Provider module for CloudNS""" import logging import requests from lexicon.providers.base import Provider as BaseProvider LOGGER = logging.getLogger(__name__) NAMESERVER_DOMAINS = ["cloudns.net"] def provider_parser(subparser): """Configure provider parser for CloudNS""" identity_group = subparser.add_...
mit
ahmadio/edx-platform
lms/djangoapps/shoppingcart/migrations/0015_auto__del_field_invoice_purchase_order_number__del_field_invoice_compa.py
114
16995
# -*- 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): # Deleting field 'Invoice.purchase_order_number' db.delete_column('shoppingcart_invoice', 'purchase_order_nu...
agpl-3.0
spectralDNS/shenfun
docs/paper/CG/CGpaper_dirichlet.py
1
8842
""" This script has been used to compute the Dirichlet results of the paper Efficient spectral-Galerkin methods for second-order equations using different Chebyshev bases The results have been computed using Python 3.9 and Shenfun 3.1.1. The generalized Chebyshev-Tau results are computed with dedalus, and are as...
bsd-2-clause
patmcb/odoo
addons/l10n_nl/__init__.py
424
1413
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2009 Veritos - Jan Verlaan - www.veritos.nl # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential # con...
agpl-3.0
serialdoom/ansible
contrib/inventory/softlayer.py
150
6108
#!/usr/bin/env python """ SoftLayer external inventory script. The SoftLayer Python API client is required. Use `pip install softlayer` to install it. You have a few different options for configuring your username and api_key. You can pass environment variables (SL_USERNAME and SL_API_KEY). You can also write INI fil...
gpl-3.0
shakamunyi/ansible
test/units/playbook/test_play_context.py
28
6566
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
Zearin/python-parsimonious
parsimonious/exceptions.py
1
1517
class BadGrammar(Exception): """The rule definitions passed to Grammar contain syntax errors.""" class VisitationError(Exception): """Something went wrong while traversing a parse tree. This exception exists to augment an underlying exception with information about where in the parse tree the error o...
mit
suhussai/youtube-dl
youtube_dl/extractor/huffpost.py
132
2607
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( parse_duration, unified_strdate, ) class HuffPostIE(InfoExtractor): IE_DESC = 'Huffington Post' _VALID_URL = r'''(?x) https?://(embed\.)?live\.huffingtonpost\.com/ (?: ...
unlicense
ckan/ckanext-archiver
ckanext/archiver/helpers.py
3
1280
from ckan.plugins import toolkit as tk def archiver_resource_show(resource_id): data_dict = {'id': resource_id} return tk.get_action('archiver_resource_show')(data_dict) def archiver_is_resource_broken_html(resource): archival = resource.get('archiver') if not archival: return tk.literal('<!...
mit
shipci/boto
tests/unit/ec2/test_networkinterface.py
112
12575
#!/usr/bin/env python # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without ...
mit
MarkWh1te/xueqiu_predict
p3_env/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree.py
152
4597
from __future__ import absolute_import, division, unicode_literals try: from collections import OrderedDict except ImportError: try: from ordereddict import OrderedDict except ImportError: OrderedDict = dict import re from pip._vendor.six import text_type from . import _base from ..utils...
mit
romanz/python-trezor
trezorlib/tests/device_tests/test_msg_ontology_getaddress.py
3
1415
# This file is part of the Trezor project. # # Copyright (C) 2012-2018 SatoshiLabs and contributors # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 # as published by the Free Software Foundation. # # This library is distrib...
lgpl-3.0
KontorConsulting/odoo
addons/purchase/wizard/purchase_line_invoice.py
177
5258
# -*- 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
kevinr/750book-web
750book-web-env/lib/python2.7/site-packages/pip-0.7.2-py2.7.egg/pip/vcs/git.py
3
7384
import os import shutil import tempfile import re from pip import call_subprocess from pip.util import display_path from pip.vcs import vcs, VersionControl from pip.log import logger class Git(VersionControl): name = 'git' dirname = '.git' repo_name = 'clone' schemes = ('git', 'git+http', 'git+ssh', 'g...
mit
40223101/w17test
static/Brython3.1.0-20150301-090019/Lib/unittest/test/testmock/testpatch.py
739
53126
# Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ import os import sys import unittest from unittest.test.testmock import support from unittest.test.testmock.support import SomeClass, is_instance from unittest.mock import...
gpl-3.0
jpautom/scikit-learn
sklearn/linear_model/tests/test_perceptron.py
378
1815
import numpy as np import scipy.sparse as sp from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_raises from sklearn.utils import check_random_state from sklearn.datasets import load_iris from sklearn.linear_model import Pe...
bsd-3-clause
bricetebbs/signup
urls.py
1
1081
from django.conf.urls import patterns, url urlpatterns = patterns('', url ( regex = '^email/$', view = 'signup.views.signup_email', name = 'signup_email' ), url ( regex = '^logout/$', view = 'signup.views.signup_logout', name = 'signup_logout' )...
mit
royalharsh/grpc
src/python/grpcio_tests/tests/protoc_plugin/_split_definitions_test.py
15
14490
# Copyright 2016, 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
yangchaogit/shadowsocks
shadowsocks/eventloop.py
949
7288
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013-2015 clowwindy # # 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...
apache-2.0
highweb-project/highweb-webcl-html5spec
testing/legion/run_task.py
25
1720
#!/usr/bin/env python # Copyright 2015 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. """The main task entrypoint.""" import argparse import logging import socket import sys import time # pylint: disable=relative-import...
bsd-3-clause
kashif/scikit-learn
sklearn/model_selection/tests/test_search.py
23
30837
"""Test the search module""" from collections import Iterable, Sized from sklearn.externals.six.moves import cStringIO as StringIO from sklearn.externals.six.moves import xrange from itertools import chain, product import pickle import sys import numpy as np import scipy.sparse as sp from sklearn.utils.fixes import ...
bsd-3-clause
percy-g2/Novathor_xperia_u8500
6.2.A.1.100/external/webkit/Tools/Scripts/webkitpy/tool/bot/botinfo.py
20
2016
# 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 ...
gpl-2.0
razvanphp/arangodb
3rdParty/V8-3.31.74.1/third_party/python_26/Lib/site-packages/win32/scripts/regsetup.py
21
19756
# A tool to setup the Python registry. class error(Exception): pass import sys # at least we can count on this! def FileExists(fname): """Check if a file exists. Returns true or false. """ import os try: os.stat(fname) return 1 except os.error, details: return 0 def ...
apache-2.0
EnviroCentre/patterns-toolbox
setup.py
1
1042
# -*- coding: utf-8 -*- # Copyright 2015 Florenz A. P. Hollebrandse # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
apache-2.0
ff94315/hiwifi-openwrt-HC5661-HC5761
staging_dir/host/lib/python2.7/encodings/shift_jis_2004.py
816
1059
# # shift_jis_2004.py: Python Unicode Codec for SHIFT_JIS_2004 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('shift_jis_2004') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEnc...
gpl-2.0
vegitron/ansible
lib/ansible/plugins/cache/memory.py
275
1466
# (c) 2014, Brian Coca, Josh Drake, et al # # 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
ShawnPengxy/Flask-madeBlog
site-packages/sqlalchemy/types.py
21
1635
# types.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Compatibility namespace for sqlalchemy.sql.types. """ __all__ = ['TypeEngine', 'TypeDe...
mit
cool-runnings/CometVisu
utils/docutils/directives/widget_example.py
2
12638
# -*- coding: utf-8 -*- # copyright (c) 2010-2016, Christian Mayer and the CometVisu contributers. # # 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...
gpl-3.0
40223243/2015cd_midterm2
2015cd_midterm-master/static/Brython3.1.1-20150328-091302/Lib/errno.py
624
4096
""" This module makes available standard errno system symbols. The value of each symbol is the corresponding integer value, e.g., on most systems, errno.ENOENT equals the integer 2. The dictionary errno.errorcode maps numeric codes to symbol names, e.g., errno.errorcode[2] could be the string 'ENOENT'. Symbols that ar...
agpl-3.0
scitran/api
api/resolver.py
2
6563
""" Resolve an ambiguous path through the data hierarchy. """ from . import config from .web.errors import APINotFoundException class Node(object): # All lists obtained by the Resolver are sorted by the created timestamp, then the database ID as a fallback. # As neither property should ever change, this sort...
mit
sephii/djangocms-blog
djangocms_blog/models.py
2
12734
# -*- coding: utf-8 -*- from cms.models import CMSPlugin, PlaceholderField from django.conf import settings as dj_settings from django.core.urlresolvers import reverse from django.db import models from django.utils import timezone from django.utils.encoding import force_text, python_2_unicode_compatible from django.uti...
bsd-3-clause
sacnayak/ssnayak-byte-1
lib/flask/testsuite/__init__.py
564
7022
# -*- coding: utf-8 -*- """ flask.testsuite ~~~~~~~~~~~~~~~ Tests Flask itself. The majority of Flask is already tested as part of Werkzeug. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import print_function import os import sys im...
apache-2.0
Simran-B/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/mimify.py
304
15021
#! /usr/bin/env python """Mimification and unmimification of mail messages. Decode quoted-printable parts of a mail message or encode using quoted-printable. Usage: mimify(input, output) unmimify(input, output, decode_base64 = 0) to encode and decode respectively. Input and output may be the name of...
apache-2.0
chmberl/django-cms
cms/admin/settingsadmin.py
47
3428
# -*- coding: utf-8 -*- from functools import update_wrapper import json from django.conf.urls import url from django.contrib import admin from django.contrib.admin import ModelAdmin from django.contrib.auth.admin import csrf_protect_m from django.db import transaction from django.http import HttpResponseRedirect, Htt...
bsd-3-clause
ghchinoy/tensorflow
tensorflow/contrib/distributions/python/ops/batch_reshape.py
17
17486
# 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...
apache-2.0
pixbuffer/django-cms
cms/models/titlemodels.py
5
2904
# -*- coding: utf-8 -*- from django.db import models from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from cms.models.managers import TitleManager from cms.models.pagemodel import Page from cms.utils.helpers import reversion_register class Title(models.Model): language = m...
bsd-3-clause
rhyolight/nupic.son
app/html5lib/sanitizer.py
100
14472
import re from xml.sax.saxutils import escape, unescape from tokenizer import HTMLTokenizer from constants import tokenTypes class HTMLSanitizerMixin(object): """ sanitization of XHTML+MathML+SVG and of inline style attributes.""" acceptable_elements = ['a', 'abbr', 'acronym', 'address', 'area', 'art...
apache-2.0
di-unipi-socc/tosKer
tosker/docker_interface.py
1
9261
''' Docker interface module ''' import os from functools import wraps from os import path import six from docker import APIClient, errors from .graph.artifacts import Dockerfile from .graph.nodes import Container, Root, Volume from .helper import Logger _cli = None def _get_name(func): @wraps(func) def fun...
mit
SergiuMir/python-phonenumbers
python/phonenumbers/data/region_CX.py
7
1870
"""Auto-generated file, do not edit by hand. CX metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_CX = PhoneMetadata(id='CX', country_code=61, international_prefix='(?:14(?:1[14]|34|4[17]|[56]6|7[47]|88))?001[14-689]', general_desc=PhoneNumberDesc(national_number_p...
apache-2.0
nthiep/global-ssh-server
lib/python2.7/site-packages/django/contrib/sitemaps/views.py
93
2689
import warnings from django.contrib.sites.models import get_current_site from django.core import urlresolvers from django.core.paginator import EmptyPage, PageNotAnInteger from django.http import Http404 from django.template.response import TemplateResponse from django.utils import six def index(request, sitemaps, ...
agpl-3.0
Coldwings/Campanella-rapidfork
rapidfork/views/base.py
1
4552
# coding:utf-8 from datetime import datetime import decimal import json import six import logging import traceback from tornado import escape from tornado.web import RequestHandler, HTTPError def tojson(data, ensure_ascii=True, default=False, **kwargs): def serializable(obj): if isinstance(obj, decimal.De...
apache-2.0
JeffRoy/mi-dataset
mi/dataset/driver/cg_dcl_eng/dcl/test/test_cg_dcl_eng_dcl_recovered_driver.py
1
1070
#!/home/mworden/uframes/ooi/uframe-1.0/python/bin/python __author__ = 'mworden' from mi.core.log import get_logger log = get_logger() from mi.idk.config import Config import unittest import os from mi.dataset.driver.cg_dcl_eng.dcl.cg_dcl_eng_dcl_recovered_driver import parse from mi.dataset.dataset_driver import P...
bsd-2-clause
surkovalex/xbmc
lib/gtest/test/gtest_xml_test_utils.py
1815
8876
#!/usr/bin/env python # # Copyright 2006, 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...
gpl-2.0
rsvip/Django
tests/delete_regress/tests.py
182
13415
from __future__ import unicode_literals import datetime from django.conf import settings from django.db import DEFAULT_DB_ALIAS, models, transaction from django.db.utils import ConnectionHandler from django.test import TestCase, TransactionTestCase, skipUnlessDBFeature from .models import ( Award, AwardNote, Boo...
bsd-3-clause
gram526/VTK
Common/DataModel/Testing/Python/scalarColors.py
20
2624
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Color points with scalars # get the interactor ui ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren1) iren = vtk.vtkRenderWindowInteractor() iren.SetRen...
bsd-3-clause
atados/api
atados_core/models/legacy_address.py
1
3608
import pytz from django.db import models from datetime import datetime from pygeocoder import Geocoder from django.utils.translation import ugettext_lazy as _ from address import GoogleAddress class State(models.Model): name = models.CharField(_('name'), max_length=30) code = models.CharField(_('code'), max_l...
mit
swannapa/erpnext
erpnext/setup/setup_wizard/test_setup_wizard.py
3
1871
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, time from frappe.utils.selenium_testdriver import TestDriver def run_setup_wizard_test(): driver = TestDriver() frappe.db.set_default...
gpl-3.0
mozvip/CouchPotatoServer
libs/git/commit.py
110
3498
# Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com> # 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 li...
gpl-3.0
Kalyzee/edx-platform
lms/djangoapps/django_comment_client/management/commands/assign_role.py
251
1144
from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django_comment_common.models import Role from django.contrib.auth.models import User class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--remove', ac...
agpl-3.0