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
Mobii/twilio-python
twilio/rest/resources/phone_numbers.py
11
11396
import re from twilio.exceptions import TwilioException from .util import change_dict_key, transform_params from .util import UNSET_TIMEOUT from . import InstanceResource, ListResource TYPES = {"local": "Local", "tollfree": "TollFree", "mobile": "Mobile"} class AvailablePhoneNumber(InstanceResource): """ An av...
mit
yland/coala-bears
tests/c_languages/CSharpLintBearTest.py
9
1079
import os from queue import Queue from shutil import which from unittest.case import skipIf from bears.c_languages.CSharpLintBear import CSharpLintBear from tests.LocalBearTestHelper import LocalBearTestHelper from coalib.settings.Section import Section @skipIf(which('mcs') is None, 'mono mcs is not installed') clas...
agpl-3.0
ascii1011/basecat
apps/projects/views.py
1
1061
import json from django.http import HttpResponse from django.shortcuts import redirect, render, get_object_or_404 from django.template import RequestContext from django.conf import settings from django.core.urlresolvers import reverse from django.views.generic import TemplateView from django.core.context_processors i...
gpl-2.0
goldeneye-source/ges-python
lib/test/test_source_encoding.py
67
5223
# -*- coding: koi8-r -*- import unittest from test.support import TESTFN, unlink, unload import importlib import os import sys import subprocess class SourceEncodingTest(unittest.TestCase): def test_pep263(self): self.assertEqual( "ðÉÔÏÎ".encode("utf-8"), b'\xd0\x9f\xd0\xb8\xd1\x8...
gpl-3.0
sarvex/tensorflow
tensorflow/lite/testing/op_tests/reverse_v2.py
15
2182
# Copyright 2019 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
ayes/bsmapp
allauth/socialaccount/providers/openid/migrations/0002_tosocialaccount.py
82
7741
# encoding: utf-8 from south.v2 import DataMigration class Migration(DataMigration): depends_on = (('socialaccount', '0002_genericmodels'),) def forwards(self, orm): for acc in orm.OpenIDAccount.objects.all(): sacc = acc.socialaccount_ptr sacc.uid = acc.identity sa...
gpl-3.0
guijomatos/SickRage
lib/unrar2/windows.py
51
11781
# Copyright (c) 2003-2005 Jimmy Retzlaff, 2008 Konstantin Yegupov # # 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 limitation the rights to use, copy...
gpl-3.0
graetzer/arangodb
3rdParty/V8/v5.7.0.0/tools/gyp/test/win/gyptest-macro-targetfilename.py
34
1256
#!/usr/bin/env python # Copyright (c) 2014 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. """ Make sure macro expansion of $(TargetFileName) is handled. """ import TestGyp import os import sys if sys.platform == 'win32': prin...
apache-2.0
sgiavasis/nipype
nipype/interfaces/fsl/tests/test_auto_ApplyXfm.py
10
4025
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from ....testing import assert_equal from ..preprocess import ApplyXfm def test_ApplyXfm_inputs(): input_map = dict(angle_rep=dict(argstr='-anglerep %s', ), apply_isoxfm=dict(argstr='-applyisoxfm %f', xor=['apply_xfm'], ), apply_xfm=dict(ar...
bsd-3-clause
su2code/SU2
Common/src/toolboxes/MMS/CreateMMSSourceTerms/CMMSIncEulerSolution.py
1
2911
#!/usr/bin/env python ## \file CMMSIncEulerSolution.py # \brief Python script that generates the source terms for a # manufactured solution for the incompressible Euler eqns. # \author T. Economon # \version 7.1.1 "Blackbird" # # The current SU2 release has been coordinated by the # SU2 International Devel...
lgpl-2.1
ariabuckles/pyobjc-framework-Cocoa
PyObjCTest/test_nsobjectcontroller.py
3
1049
from AppKit import * from PyObjCTools.TestSupport import * class TestNSObjectController (TestCase): def testMethods(self): self.assertResultIsBOOL(NSObjectController.automaticallyPreparesContent) self.assertArgIsBOOL(NSObjectController.setAutomaticallyPreparesContent_, 0) self.assertResultI...
mit
aroche/django
django/contrib/gis/db/backends/oracle/schema.py
608
4050
from django.contrib.gis.db.models.fields import GeometryField from django.db.backends.oracle.schema import DatabaseSchemaEditor from django.db.backends.utils import truncate_name class OracleGISSchemaEditor(DatabaseSchemaEditor): sql_add_geometry_metadata = (""" INSERT INTO USER_SDO_GEOM_METADATA ...
bsd-3-clause
printedheart/h2o-3
py2/testdir_rapids/test_xl_basic.py
21
4477
import unittest, random, sys, time sys.path.extend(['.','..','../..','py']) import h2o2 as h2o import h2o_cmd, h2o_import as h2i, h2o_xl from h2o_xl import DF, Xbase, Key, KeyIndexed, Assign, Fcn from h2o_test import dump_json, verboseprint class Basic(unittest.TestCase): def tearDown(self): h2o.check_sa...
apache-2.0
gcq/pyth
extra_parse.py
1
2227
# To be included in pyth.py class PythParseError(Exception): def __init__(self, active_char, rest_code): self.active_char = active_char self.rest_code = rest_code def __str__(self): return "%s is not implemented, %d from the end." % \ (self.active_char, len(self.rest_code...
mit
jessrosenfield/pants
tests/python/pants_test/invalidation/test_cache_manager.py
5
4756
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import shutil import...
apache-2.0
kostyrevaa/ansible-modules-core
files/stat.py
94
13076
#!/usr/bin/python # 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. # # Ansible is distributed...
gpl-3.0
MichaelNedzelsky/intellij-community
python/lib/Lib/collections/__init__.py
81
5531
from _collections import defaultdict, deque from operator import itemgetter as _itemgetter from keyword import iskeyword as _iskeyword import sys as _sys __all__ = ['defaultdict', 'deque', 'namedtuple'] def namedtuple(typename, field_names, verbose=False): """Returns a new subclass of tuple with named fields. ...
apache-2.0
scottdangelo/RemoveVolumeMangerLocks
cinder/openstack/common/scheduler/base_handler.py
26
1760
# Copyright (c) 2011-2013 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 # # U...
apache-2.0
fredj/ngeo
buildtools/closure/source.py
166
3325
# Copyright 2009 The Closure Library 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 a...
mit
nelmiux/CarnotKE
jyhton/lib-python/2.7/plat-mac/Carbon/Fonts.py
81
1398
# Generated from 'Fonts.h' def FOUR_CHAR_CODE(x): return x kNilOptions = 0 systemFont = 0 applFont = 1 kFMDefaultOptions = kNilOptions kFMDefaultActivationContext = kFMDefaultOptions kFMGlobalActivationContext = 0x00000001 kFMLocalActivationContext = kFMDefaultActivationContext kFMDefaultIterationScope = kFMDefaultOpt...
apache-2.0
thedrow/faker
faker/providers/person/nl_NL/__init__.py
21
22069
# coding=utf-8 from __future__ import unicode_literals from .. import Provider as PersonProvider class Provider(PersonProvider): # conforming to http://nl.wikipedia.org/wiki/Achternaam#Naamswijziging and # http://en.wikipedia.org/wiki/Dutch_name#Dutch_naming_law_.28surnames.29 # by adding a "-" between t...
mit
quickresolve/accel.ai
flask-aws/lib/python2.7/site-packages/cement/core/config.py
4
6782
"""Cement core config module.""" import os from ..core import interface, handler from ..utils.fs import abspath from ..utils.misc import minimal_logger LOG = minimal_logger(__name__) def config_validator(klass, obj): """Validates a handler implementation against the IConfig interface.""" members = [ ...
mit
larssono/synapsePythonClient
synapseclient/remote_file_storage_wrappers.py
2
7501
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals try: from urllib.parse import urlparse from urllib.parse import urlunparse from urllib.parse import quote from urllib.parse import unquote except ImportEr...
apache-2.0
EricMuller/mynotes-backend
requirements/twisted/Twisted-17.1.0/build/lib.linux-x86_64-3.5/twisted/python/test/test_dist3.py
13
1858
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.python.dist3}. """ from __future__ import absolute_import, division import os import twisted from twisted.trial.unittest import TestCase from twisted.python.compat import _PY3 from twisted.python._setup import notPortedM...
mit
jopohl/urh
src/urh/dev/PCAP.py
2
2179
import os import struct import time from urh.util.Logger import logger from urh.signalprocessing.Message import Message class PCAP(object): def __init__(self): self.timestamp_sec = None self.timestamp_nsec = None def reset_timestamp(self): self.timestamp_sec = None self.time...
gpl-3.0
popazerty/e2
lib/python/Components/SelectionList.py
5
2669
from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT, RT_VALIGN_CENTER, getDesktop from MenuList import MenuList from Tools.Directories import resolveFilename, SCOPE_ACTIVE_SKIN from Tools.LoadPixmap import LoadPixmap selectiononpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_ACTIVE_SKIN, "ic...
gpl-2.0
40223234/2015cd_midterm2
static/Brython3.1.1-20150328-091302/Lib/functools.py
730
13596
"""functools.py - Tools for working with functions and callable objects """ # Python module wrapper for _functools C module # to allow utilities written in Python to be added # to the functools module. # Written by Nick Coghlan <ncoghlan at gmail.com> # and Raymond Hettinger <python at rcn.com> # Copyright (C) 2006-2...
agpl-3.0
torhve/django-avatar
setup.py
32
5535
from setuptools import setup, find_packages version = '2.0a1' LONG_DESCRIPTION = """ Using django-avatar =================== Basics ------ To integrate ``django-avatar`` with your site, there are relatively few things that are required. A minimal integration can work like this: 1. List this application in the `...
bsd-3-clause
hubsaysnuaa/odoo
addons/account/report/account_partner_balance.py
286
11049
# -*- 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
wjiangjay/origin
vendor/github.com/getsentry/raven-go/docs/_sentryext/verify-docs.py
37
3300
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This can be run as a commit hook to ensure that the rst files do not contain some of the more frustrating issues for federated doc support. """ import os import re import sys import errno import subprocess _ref_target_re = re.compile(r'^\.\.\s+_([^:]+):') _doc_ref_re ...
apache-2.0
ntruchsess/Arduino-1
arduino-core/src/processing/app/i18n/python/requests/cookies.py
209
14024
# -*- coding: utf-8 -*- """ Compatibility code to be able to use `cookielib.CookieJar` with requests. requests.utils imports from here, so be careful with imports. """ import collections from .compat import cookielib, urlparse, Morsel try: import threading # grr, pyflakes: this fixes "redefinition of unused...
lgpl-2.1
manashmndl/bluebrain
src/www/apps/blockly/i18n/common.py
204
7619
#!/usr/bin/python # Code shared by translation conversion scripts. # # Copyright 2013 Google Inc. # https://developers.google.com/blockly/ # # 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 # #...
mit
bjodah/chempy
chempy/_util.py
1
2437
# -*- coding: utf-8 -*- from functools import reduce from operator import mul, add try: import numpy as np from numpy import any as _any def prodpow(bases, exponents): """ Examples -------- >>> prodpow([2, 3], np.array([[0, 1], [1, 2]])) array([ 3, 18]) ""...
bsd-2-clause
garyjs/Newfiesautodialer
newfies/api/api_playgrounds/gateway_playground.py
4
8560
# # Newfies-Dialer License # http://www.newfies-dialer.org # # 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/. # # Copyright (C) 2011-2013 Star2Billing S.L. # # The Initia...
mpl-2.0
theflakes/fsf
fsf-server/modules/EXTRACT_EMBEDDED.py
1
3044
#!/usr/bin/python # # Author: Jason Batchelor # Company: Emerson # Description: Carve embedded files and return buffer # relies heavily on hachoir_subfile for most of the heavy # lifting. # Date: 5/13/15 ''' Copyright 2015 Emerson Electric Co. Licensed under the Apache License, Version 2.0 (the "License"); y...
apache-2.0
npuichigo/ttsflow
third_party/tensorflow/tensorflow/contrib/training/python/training/resample.py
63
6037
# 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
valentin-krasontovitsch/ansible
contrib/inventory/zone.py
196
1490
#!/usr/bin/env python # (c) 2015, Dagobert Michelsen <dam@baltic-online.de> # # 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 # ...
gpl-3.0
ClearwaterCore/pjsip-upstream
tests/pjsua/scripts-recvfrom/215_reg_good_multi_ok.py
59
1105
# $Id: 215_reg_good_multi_ok.py 2392 2008-12-22 18:54:58Z bennylp $ import inc_sip as sip import inc_sdp as sdp pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \ "--username theuser1 --realm python1 --password passwd --next-cred " + \ "--username theuser2 --realm python2 --password passwd "...
gpl-2.0
jazcollins/models
domain_adaptation/domain_separation/models.py
16
16217
# 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 applicab...
apache-2.0
grycap/clues
addons/one/configcli.py
3
3018
#!/usr/bin/env python # # CLUES - Cluster Energy Saving System # Copyright (C) 2015 - GRyCAP - Universitat Politecnica de Valencia # # 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 versi...
gpl-3.0
theolind/pymysensors
mysensors/handler.py
1
8600
"""Implement message handlers.""" import calendar import logging import time from .const import SYSTEM_CHILD_ID from .sensor import ChildSensor from .util import Registry _LOGGER = logging.getLogger(__name__) HANDLERS = Registry() def handle_smartsleep(msg): """Process a message before going back to smartsleep...
mit
newerthcom/savagerebirth
libs/python-2.72/Lib/idlelib/MultiCall.py
45
17464
""" MultiCall - a class which inherits its methods from a Tkinter widget (Text, for example), but enables multiple calls of functions per virtual event - all matching events will be called, not only the most specific one. This is done by wrapping the event functions - event_add, event_delete and event_info. MultiCall r...
gpl-2.0
Julian/Ivoire
ivoire/result.py
1
7237
from __future__ import unicode_literals from unittest import TestResult import sys import time from ivoire.compat import indent class ExampleResult(TestResult): """ Track the outcomes of example runs. """ def __init__(self, formatter): super(ExampleResult, self).__init__() self.form...
mit
GuidoBR/python-skyfield
skyfield/nutationlib.py
2
172368
"""Routines that compute Earth nutation.""" from numpy import array, cos, fmod, sin, outer, tensordot, zeros from .constants import ASEC2RAD, ASEC360, DEG2RAD, TAU, PSI_COR, EPS_COR, T0 def compute_nutation(jd): """Generate the nutation rotations for JulianDate `jd`. If the Julian date is scalar, a simple ``(...
mit
stonegithubs/odoo
addons/base_import/test_models.py
399
2289
from openerp.osv import orm, fields def name(n): return 'base_import.tests.models.%s' % n class char(orm.Model): _name = name('char') _columns = { 'value': fields.char('unknown') } class char_required(orm.Model): _name = name('char.required') _columns = { 'value': fields.char('u...
agpl-3.0
cbclab/MDT
mdt/cli_scripts/mdt_init_user_settings.py
1
1432
#!/usr/bin/env python # PYTHON_ARGCOMPLETE_OK """This script is meant to update your home folder with the latest MDT models.""" import argparse import textwrap import mdt from mdt.lib.shell_utils import BasicShellApplication __author__ = 'Robbert Harms' __date__ = "2015-08-18" __maintainer__ = "Robbert Harms" __email_...
lgpl-3.0
fabriziocosta/EDeNseq
src/eigen-eigen-3.20/scripts/relicense.py
315
2368
# This file is part of Eigen, a lightweight C++ template library # for linear algebra. # # Copyright (C) 2012 Keir Mierle <mierle@gmail.com> # # 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://m...
apache-2.0
adit-chandra/tensorflow
tensorflow/lite/testing/op_tests/reverse_v2.py
3
2102
# Copyright 2019 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
sysadmin75/ansible
lib/ansible/plugins/filter/mathstuff.py
9
8097
# Copyright 2014, Brian Coca <bcoca@ansible.com> # Copyright 2017, Ken Celenza <ken@networktocode.com> # Copyright 2017, Jason Edelman <jason@networktocode.com> # Copyright 2017, Ansible Project # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of ...
gpl-3.0
benoitsteiner/tensorflow-xsmm
tensorflow/python/ops/list_ops.py
14
3645
# 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
badock/nova
nova/tests/integrated/v3/test_keypairs.py
12
3153
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
apache-2.0
uclouvain/OSIS-Louvain
program_management/tests/views/test_perms.py
1
7363
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
jokajak/itweb
data/env/lib/python2.6/site-packages/zope.interface-3.6.1-py2.6-linux-x86_64.egg/zope/interface/interfaces.py
50
24669
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
gpl-3.0
madrang/pyTSon-AudioBot
requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py
285
5702
"""The match_hostname() function from Python 3.3.3, essential when using SSL.""" # Note: This file is under the PSF license as the code comes from the python # stdlib. http://docs.python.org/3/license.html import re import sys # ipaddress has been backported to 2.6+ in pypi. If it is installed on the # system, us...
gpl-3.0
hydroshare/hydroshare_temp
ga_applications/migrations/0003_auto__add_field_application_left_sidebar_html__add_field_application_r.py
2
13671
# -*- 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 'Application.left_sidebar_html' db.add_column(u'ga_applications_application', 'left_sidebar_h...
bsd-3-clause
masayukig/tempest
tempest/tests/lib/common/test_preprov_creds.py
1
23755
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
infilect/ml-course1
week4/im2txt/im2txt/show_and_tell_model_test.py
27
6834
# 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...
mit
igel-kun/pyload
module/lib/jinja2/sandbox.py
284
9423
# -*- coding: utf-8 -*- """ jinja2.sandbox ~~~~~~~~~~~~~~ Adds a sandbox layer to Jinja as it was the default behavior in the old Jinja 1 releases. This sandbox is slightly different from Jinja 1 as the default behavior is easier to use. The behavior can be changed by subclassing the environm...
gpl-3.0
rajarshi/case-studies
co-morbidity.py
1
5585
import cPickle as pickle import random, sys, collections, csv from itertools import * from collections import Counter def flatten(x): result = [] for el in x: if hasattr(el, "__iter__") and not isinstance(el, basestring): result.extend(flatten(el)) else: result.append(el...
apache-2.0
metacloud/python-neutronclient
neutronclient/tests/unit/fw/test_cli20_firewallpolicy.py
7
9149
# Copyright 2013 Big Switch Networks 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 r...
apache-2.0
bhairavmehta95/flashcard-helper-alexa-skill
venv/lib/python2.7/site-packages/gunicorn/arbiter.py
19
19218
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. from __future__ import print_function import errno import os import random import select import signal import sys import time import traceback from gunicorn.errors import HaltServer, AppImpor...
mit
debayanray/ironic_backup
ironic/db/sqlalchemy/alembic/versions/3bea56f25597_add_unique_constraint_to_instance_uuid.py
18
1239
# Copyright 2014 Red Hat, 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...
apache-2.0
theflofly/tensorflow
tensorflow/python/kernel_tests/identity_op_py_test.py
13
2837
# 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
matthew-tucker/mne-python
examples/io/plot_epochs_to_data_frame.py
5
8820
""" ================================= Export epochs to Pandas DataFrame ================================= In this example the pandas exporter will be used to produce a DataFrame object. After exploring some basic features a split-apply-combine work flow will be conducted to examine the latencies of the response maxima...
bsd-3-clause
digimarc/django
tests/sitemaps_tests/base.py
380
1079
from django.apps import apps from django.contrib.sites.models import Site from django.core.cache import cache from django.test import TestCase, modify_settings, override_settings from .models import I18nTestModel, TestModel @modify_settings(INSTALLED_APPS={'append': 'django.contrib.sitemaps'}) @override_settings(ROO...
bsd-3-clause
ex/js
src/zebra/zebra.py
1
7623
##-------------------------------------- class Generator( object ): def __init__( self, name, elements ): self.name = name self.elements = elements self.next = None self.generated = None self.fixed = None self.unfixed = None self.constrains = [] self....
mit
abimannans/scikit-learn
examples/exercises/plot_iris_exercise.py
323
1602
""" ================================ SVM Exercise ================================ A tutorial exercise for using different SVM kernels. This exercise is used in the :ref:`using_kernels_tut` part of the :ref:`supervised_learning_tut` section of the :ref:`stat_learn_tut_index`. """ print(__doc__) import numpy as np i...
bsd-3-clause
abdellatifkarroum/odoo
openerp/modules/__init__.py
352
1516
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
agpl-3.0
EvaSDK/sqlalchemy
test/aaa_profiling/test_pool.py
27
1673
from sqlalchemy.testing import fixtures, AssertsExecutionResults, profiling from sqlalchemy.pool import QueuePool from sqlalchemy import pool as pool_module pool = None class QueuePoolTest(fixtures.TestBase, AssertsExecutionResults): __requires__ = 'cpython', class Connection(object): def rollback(...
mit
k3nnyfr/s2a_fr-nsis
s2a/Python/Lib/xml/sax/xmlreader.py
119
12632
"""An XML Reader is the SAX 2 name for an XML parser. XML Parsers should be based on this code. """ import handler from _exceptions import SAXNotSupportedException, SAXNotRecognizedException # ===== XMLREADER ===== class XMLReader: """Interface for reading an XML document using callbacks. XMLReader is the...
gpl-3.0
aperigault/ansible
lib/ansible/modules/network/skydive/skydive_capture.py
43
5174
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2019, Ansible by Red Hat, 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', ...
gpl-3.0
jhona22baz/blog-flask
python2.7/lib/python2.7/site-packages/openid/extensions/ax.py
166
26382
# -*- test-case-name: openid.test.test_ax -*- """Implements the OpenID Attribute Exchange specification, version 1.0. @since: 2.1.0 """ __all__ = [ 'AttributeRequest', 'FetchRequest', 'FetchResponse', 'StoreRequest', 'StoreResponse', ] from openid import extension from openid.server.trustroot...
mit
mgit-at/ansible
lib/ansible/modules/network/aci/msc_role.py
7
5513
#!/usr/bin/python # -*- coding: utf-8 -*- # 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'], ...
gpl-3.0
Fiware/cloud.PaaS
test/acceptance/tools/productrinstanceequest.py
4
4682
# -*- coding: utf-8 -*- # Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U # # This file is part of FI-WARE project. # # 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: # # h...
apache-2.0
openzim/gutenberg
gutenbergtozim/s3.py
1
3406
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 nu import os import zipfile import pathlib from kiwixstorage import KiwixStorage from pif import get_public_ip from . import logger, TMP_FOLDER from .utils import archive_name_for def s3_credentials_ok(s3_url_with_credentials): logger.in...
gpl-3.0
noodle-learns-programming/python-social-auth
social/tests/backends/oauth.py
77
4538
import requests from httpretty import HTTPretty from social.p3 import urlparse from social.utils import parse_qs, url_add_parameters from social.tests.models import User from social.tests.backends.base import BaseBackendTest class BaseOAuthTest(BaseBackendTest): backend = None backend_path = None user_...
bsd-3-clause
a0c/odoo
openerp/addons/test_converter/tests/test_html.py
61
13714
# -*- encoding: utf-8 -*- import json import os import datetime from lxml import etree from openerp.tests import common from openerp.tools import html_escape as e from openerp.addons.base.ir import ir_qweb directory = os.path.dirname(__file__) class TestExport(common.TransactionCase): _model = None def set...
agpl-3.0
ruebot/iaTorrent
conf.py
1
7738
# -*- coding: utf-8 -*- # # iaTorrent documentation build configuration file, created by # sphinx-quickstart on Mon Sep 2 10:20:59 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
unlicense
jjmiranda/edx-platform
lms/djangoapps/ccx/migrations/0001_initial.py
50
1587
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings import xmodule_django.models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations ...
agpl-3.0
TakeshiTseng/ryu
ryu/tests/integrated/common/quagga.py
2
11814
# Copyright (C) 2015 Nippon Telegraph and Telephone Corporation. # # This is based on the following # https://github.com/osrg/gobgp/test/lib/quagga.py # # 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...
apache-2.0
adalke/rdkit
External/INCHI-API/python/inchi.py
4
6215
# $Id$ # # Copyright (c) 2011, Novartis Institutes for BioMedical Research 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...
bsd-3-clause
scalable-networks/ext
gnuradio-3.7.0.1/gr-qtgui/apps/usrp_display_qtgui.py
91
12017
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'usrp_display_qtgui.ui' # # Created: Thu Jul 16 22:06:24 2009 # by: PyQt4 UI code generator 4.4.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_MainWindow(object): def setupUi(sel...
gpl-2.0
googleads/google-ads-python
google/ads/googleads/v7/resources/types/extension_feed_item.py
1
8244
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
dilawar/moose-full
moose-gui/plugins/NeuroKitEditor.py
2
11841
#!/usr/bin/env python # -*- coding: utf-8 -*- """ NeuroKitEditor for NeuroKit plugin. """ __author__ = "Aviral Goel" __credits__ = ["Upi Lab"] __license__ = "GPL3" __version__ = "1.0.0" __maintainer__ = "Aviral Goel" __email__ = "goel.aviral@gmail.com" __status__ = "Developm...
gpl-2.0
mape90/VetApp
models/animal.py
1
6735
#!/usr/bin/python # -*- coding: utf-8 ''' This file is part of VetApp. VetApp 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 ver...
gpl-3.0
double-y/django
tests/user_commands/tests.py
205
7165
import os from django.apps import apps from django.core import management from django.core.management import BaseCommand, CommandError, find_commands from django.core.management.utils import find_command, popen_wrapper from django.db import connection from django.test import SimpleTestCase, ignore_warnings, override_s...
bsd-3-clause
HoracioAlvarado/fwd
venv/Lib/site-packages/pip/basecommand.py
92
11429
"""Base Command class, and related routines""" from __future__ import absolute_import import logging import os import sys import optparse import warnings from pip import cmdoptions from pip.index import PackageFinder from pip.locations import running_under_virtualenv from pip.download import PipSession from pip.excep...
mit
scylladb/scylla-cluster-tests
sdcm/ycsb_thread.py
1
12302
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be usefu...
agpl-3.0
Lysxia/dissemin
notification/views.py
1
1714
from django.shortcuts import render from rest_framework import viewsets from rest_framework.decorators import api_view, detail_route from rest_framework.response import Response from django.contrib.auth.decorators import login_required from .serializers import NotificationSerializer from .backends.exceptions import N...
agpl-3.0
gcd0318/python-oauth2
oauth2/store/memcache.py
6
4338
# -*- coding: utf-8 -*- import memcache from oauth2.datatype import AccessToken, AuthorizationCode from oauth2.error import AccessTokenNotFound, AuthCodeNotFound from oauth2.store import AccessTokenStore, AuthCodeStore class TokenStore(AccessTokenStore, AuthCodeStore): """ Uses memcache to store access token...
mit
ahmadiga/min_edx
common/djangoapps/enrollment/serializers.py
43
3386
""" Serializers for all Course Enrollment related return objects. """ import logging from rest_framework import serializers from course_modes.models import CourseMode from student.models import CourseEnrollment log = logging.getLogger(__name__) class StringListField(serializers.CharField): """Custom Serialize...
agpl-3.0
oceanobservatories/mi-dataset
mi/dataset/parser/test/test_rasfl_a_subcon.py
3
4837
#!/usr/bin/env python """ @package mi.dataset.parser.test.test_rasfl_a_subcon @fid marine-integrations/mi/dataset/parser/test/test_rasfl_a_subcon.py @author Rachel Manoni @brief Test code for RASFL data parser """ __author__ = 'Rachel Manoni' import os from mi.core.log import get_logger log = get_logger() from nose.p...
bsd-2-clause
Alexander-M-Waldman/local_currency_site
lib/python2.7/site-packages/requests/packages/urllib3/util/response.py
515
2165
from __future__ import absolute_import from ..packages.six.moves import http_client as httplib from ..exceptions import HeaderParsingError def is_fp_closed(obj): """ Checks whether a given file-like object is closed. :param obj: The file-like object to check. """ try: # Check vi...
gpl-3.0
embecosm/binutils-gdb
gdb/testsuite/gdb.perf/lib/perftest/measure.py
41
4507
# Copyright (C) 2013-2014 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This progr...
gpl-2.0
zaccoz/odoo
addons/report_webkit/company.py
431
2562
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who...
agpl-3.0
ar7z1/ansible
lib/ansible/utils/module_docs_fragments/k8s_resource_options.py
16
1787
# # Copyright 2018 Red Hat | Ansible # # 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
ml6973/Course
tf-hands-on/slim/python/slim/model_analyzer.py
23
3506
# 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
ZENGXH/scikit-learn
examples/plot_johnson_lindenstrauss_bound.py
134
7452
""" ===================================================================== The Johnson-Lindenstrauss bound for embedding with random projections ===================================================================== The `Johnson-Lindenstrauss lemma`_ states that any high dimensional dataset can be randomly projected in...
bsd-3-clause
ychen820/microblog
flask/lib/python2.7/site-packages/pip/_vendor/progress/counter.py
404
1529
# -*- coding: utf-8 -*- # Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS P...
bsd-3-clause
jhonatajh/mtasa-blue
vendor/google-breakpad/src/tools/gyp/test/library/gyptest-shared-obj-install-path.py
289
1180
#!/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. """ Verifies that .so files that are order only dependencies are specified by their install location rather than by their alias. """ # Pyth...
gpl-3.0