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
earshel/PokeyPyManager
POGOProtos/Settings/Master/IapSettings_pb2.py
16
4839
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Settings/Master/IapSettings.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.proto...
mit
jyogi/purvar-agent
tests/checks/integration/test_gearmand.py
46
2041
# 3rd party from nose.plugins.attrib import attr # Agent from checks import AgentCheck from tests.checks.common import AgentCheckTest @attr(requires='gearman') class GearmanTestCase(AgentCheckTest): CHECK_NAME = "gearmand" def test_metrics(self): tags = ['first_tag', 'second_tag'] service_ch...
bsd-3-clause
ojengwa/talk
venv/lib/python2.7/site-packages/django_filters/views.py
56
3632
from __future__ import absolute_import from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from django.views.generic import View from django.views.generic.list import MultipleObjectMixin from django.views.generic.list import MultipleObjectTemplateResponseMixin from .filterset...
mit
philippjfr/bokeh
examples/models/file/data_tables.py
9
3295
from bokeh.document import Document from bokeh.models import ColumnDataSource, DataRange1d, Plot, LinearAxis, Grid, Circle, HoverTool, BoxSelectTool from bokeh.models.widgets import DataTable, TableColumn, StringFormatter, NumberFormatter, StringEditor, IntEditor, NumberEditor, SelectEditor from bokeh.models.layouts im...
bsd-3-clause
hgl888/chromium-crosswalk
tools/telemetry/telemetry/core/platform/profiling_controller_backend.py
16
1761
# 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. from telemetry.core.platform.profiler import profiler_finder class ProfilingControllerBackend(object): def __init__(self, platform_backend, browser_backen...
bsd-3-clause
philippegabriel/xen
tools/pygrub/src/LiloConf.py
55
5243
# #LiloConf.py # import sys, re, os import logging import GrubConf class LiloImage(object): def __init__(self, lines, path): self.reset(lines, path) def __repr__(self): return ("title: %s\n" " root: %s\n" " kernel: %s\n" " args: %s\n" ...
gpl-2.0
RaoUmer/django
tests/regressiontests/utils/http.py
41
6263
from datetime import datetime import sys from django.http import HttpResponse, utils from django.test import RequestFactory from django.utils.datastructures import MultiValueDict from django.utils import http from django.utils import six from django.utils import unittest class TestUtilsHttp(unittest.TestCase): ...
bsd-3-clause
stevekuznetsov/ansible
lib/ansible/modules/notification/mqtt.py
16
6860
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, 2014, Jan-Piet Mens <jpmens () 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...
gpl-3.0
Newman101/scipy
scipy/special/tests/test_basic.py
17
132165
# this program corresponds to special.py ### Means test is not done yet # E Means test is giving error (E) # F Means test is failing (F) # EF Means test is giving error and Failing #! Means test is segfaulting # 8 Means test runs forever ### test_besselpoly ### test_mathieu_a ### test_mathieu_even_coef ##...
bsd-3-clause
forslund/mycroft-core
mycroft/session/__init__.py
4
2407
# Copyright 2017 Mycroft AI 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 writin...
apache-2.0
sbalde/edxplatform
openedx/core/djangoapps/user_api/migrations/0002_auto__add_usercoursetags__add_unique_usercoursetags_user_course_id_key.py
114
5638
# -*- 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 model 'UserCourseTags' db.create_table('user_api_usercoursetags', ( ('id', self.gf('dja...
agpl-3.0
vCentre/vFRP-6233
frappe/desk/report_dump.py
54
2841
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import json import copy @frappe.whitelist() def get_data(doctypes, last_modified): data_map = {} for dump_report_map in frappe.get_hooks().dump_report_map: dat...
mit
Shedino/SherpaHighLevel
catkin_ws/src/casy_rover/mavlink/pymavlink/build/scripts-2.7/magfit_delta.py
2
4535
#!/usr/bin/python ''' fit best estimate of magnetometer offsets using the algorithm from Bill Premerlani ''' import sys, time, os, math # command line option handling from optparse import OptionParser parser = OptionParser("magfit_delta.py [options]") parser.add_option("--no-timestamps",dest="notimestamps", action='...
bsd-3-clause
millen1m/flask-restplus-server-example
app/modules/auth/models.py
1
3854
# encoding: utf-8 """ OAuth2 provider models. It is based on the code from the example: https://github.com/lepture/example-oauth2-server More details are available here: * http://flask-oauthlib.readthedocs.org/en/latest/oauth2.html * http://lepture.com/en/2013/create-oauth-server """ import enum from sqlalchemy_util...
mit
nanolearningllc/edx-platform-cypress-2
common/test/acceptance/tests/video/test_video_events.py
50
13897
"""Ensure videos emit proper events""" import datetime import json import ddt import unittest from ..helpers import EventsTestMixin from .test_video_module import VideoBaseTest from ...pages.lms.video.video import _parse_time_str from openedx.core.lib.tests.assertions.events import assert_event_matches, assert_event...
agpl-3.0
40223112/w16test
static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_discovery.py
785
13838
import os import re import sys import unittest class TestableTestProgram(unittest.TestProgram): module = '__main__' exit = True defaultTest = failfast = catchbreak = buffer = None verbosity = 1 progName = '' testRunner = testLoader = None def __init__(self): pass class TestDisc...
agpl-3.0
battlemidget/conjure-up
conjureup/controllers/newcloud/gui.py
1
6549
import json import os import os.path as path from functools import partial from subprocess import check_output import petname from conjureup import async, controllers, juju, utils from conjureup.api.models import model_info from conjureup.app_config import app from conjureup.models.provider import Schema from conjure...
mit
olgabrani/synnefo
snf-cyclades-app/synnefo/userdata/util.py
9
1974
# Copyright (C) 2010-2014 GRNET S.A. # # 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 program is distributed i...
gpl-3.0
sernaleon/charlie
Android/www/Blockly/i18n/create_messages.py
18
5189
#!/usr/bin/python # Generate .js files defining Blockly core and language messages. # # Copyright 2013 Google Inc. # https://blockly.googlecode.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 Lice...
apache-2.0
DeltaEpsilon-HackFMI2/FMICalendar-REST
venv/lib/python2.7/site-packages/django/views/decorators/csrf.py
120
2841
import warnings from django.middleware.csrf import CsrfViewMiddleware, get_token from django.utils.decorators import decorator_from_middleware, available_attrs from functools import wraps csrf_protect = decorator_from_middleware(CsrfViewMiddleware) csrf_protect.__name__ = "csrf_protect" csrf_protect.__doc__ = """ Thi...
mit
ikaee/bfr-attendant
facerecognitionlibrary/jni-build/jni/include/tensorflow/python/ops/sparse_ops.py
21
65964
# 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
AuyaJackie/odoo
addons/account_asset/wizard/wizard_asset_compute.py
382
2518
# -*- encoding: 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 t...
agpl-3.0
martynovp/edx-platform
lms/djangoapps/django_comment_client/tests/test_middleware.py
134
1878
import django.http from django.test import TestCase from nose.plugins.attrib import attr import json import lms.lib.comment_client import django_comment_client.middleware as middleware @attr('shard_1') class AjaxExceptionTestCase(TestCase): def setUp(self): super(AjaxExceptionTestCase, self).setUp() ...
agpl-3.0
darrowco/quality
node_modules/node-gyp/gyp/PRESUBMIT.py
1369
3662
# 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. """Top-level presubmit script for GYP. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit API built...
mit
MeteorAdminz/autopep8
test/suite/utf-8.py
55
2557
# -*- coding: utf-8 -*- class Rectangle(Blob): def __init__(self, width, height, color='black', emphasis=None, highlight=0): if width == 0 and height == 0 and \ color == 'red' and emphasis == 'strong' or \ highlight > 100: ...
mit
guschmue/tensorflow
tensorflow/python/keras/_impl/keras/layers/core_test.py
4
7222
# 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
helldorado/ansible
lib/ansible/plugins/strategy/host_pinned.py
75
1963
# (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
heri/openaccess
browser-ext/third_party/firefox-addon-sdk/python-lib/cuddlefish/tests/test_property_parser.py
37
3063
# 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/. import unittest from cuddlefish.property_parser import parse, MalformedLocaleFileError class TestParser(unittest.TestC...
gpl-3.0
erebus/erebus
erebus/util/__init__.py
1
2167
# !/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of Erebus, a web dashboard for tor relays. # # :copyright: (c) 2015, The Tor Project, Inc. # (c) 2015, Damian Johnson # (c) 2015, Cristobal Leiva # # :license: See LICENSE for licensing information. """ General purpose u...
bsd-3-clause
aYukiSekiguchi/ACCESS-Chromium
third_party/tlslite/tlslite/utils/OpenSSL_RSAKey.py
359
5014
"""OpenSSL/M2Crypto RSA implementation.""" from cryptomath import * from RSAKey import * from Python_RSAKey import Python_RSAKey #copied from M2Crypto.util.py, so when we load the local copy of m2 #we can still use it def password_callback(v, prompt1='Enter private key passphrase:', prompt...
bsd-3-clause
wangjun/xunlei-lixian
lixian_commands/delete.py
10
1239
from lixian_commands.util import * from lixian_cli_parser import * from lixian_config import get_config from lixian_encoding import default_encoding from lixian_colors import colors import lixian_help import lixian_query @command_line_parser(help=lixian_help.delete) @with_parser(parse_login) @with_parser(parse_colors...
mit
thunderace/newtifry
appengine/mako/ext/extract.py
60
3882
import re from mako import compat from mako import lexer from mako import parsetree class MessageExtractor(object): def process_file(self, fileobj): template_node = lexer.Lexer( fileobj.read(), input_encoding=self.config['encoding']).parse() for extracted in self.extract_no...
apache-2.0
171121130/SWI
venv/Lib/site-packages/odf/element.py
2
21290
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2007-2010 Søren Roug, European Environment Agency # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the L...
mit
jef-n/QGIS
python/pyplugin_installer/version_compare.py
30
7602
""" /*************************************************************************** Plugin Installer module Plugin version comparison functions ------------------- Date : 2008-11-24 Copyright : (C) 2008 by Borys...
gpl-2.0
RuudBurger/CouchPotatoServer
libs/caper/parsers/anime.py
81
2347
# Copyright 2013 Dean Gardiner <gardiner91@gmail.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 applicable law or a...
gpl-3.0
andrewnc/scikit-learn
sklearn/cross_decomposition/tests/test_pls.py
215
11427
import numpy as np from sklearn.utils.testing import (assert_array_almost_equal, assert_array_equal, assert_true, assert_raise_message) from sklearn.datasets import load_linnerud from sklearn.cross_decomposition import pls_ from nose.tools import assert_equal def test_pls(): d =...
bsd-3-clause
nt/code-jam-ruby
gcj_clear_contest.py
1
2210
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2011 Google 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
HelloLily/hellolily
lily/contacts/documents.py
1
2522
from lily.accounts.models import Account from django_elasticsearch_dsl import DocType, Index, IntegerField, ObjectField from lily.search.fields import CharField, EmailAddressField, PhoneNumberField from lily.tags.models import Tag from lily.utils.models.models import EmailAddress, PhoneNumber from .models import Cont...
agpl-3.0
xutian/avocado-vt
selftests/unit/test_virsh.py
8
12854
#!/usr/bin/python import unittest import logging import os import sys from avocado.utils import process # simple magic for using scripts within a source tree basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if os.path.isdir(os.path.join(basedir, 'virttest')): sys.path.append(basedir) def ...
gpl-2.0
matijapretnar/projekt-tomo
web/users/migrations/0005_auto_20190328_1457.py
2
1223
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2019-03-28 14:57 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0004_auto_20161004_0927'), ] operations = [ ...
agpl-3.0
chrxr/wagtail
wagtail/wagtailadmin/tests/test_rich_text.py
3
7407
from __future__ import absolute_import, unicode_literals from django.conf import settings from django.core.urlresolvers import reverse from django.test import TestCase from django.test.utils import override_settings from wagtail.tests.testapp.rich_text import CustomRichTextArea from wagtail.tests.utils import Wagtail...
bsd-3-clause
Maistho/CouchPotatoServer
couchpotato/core/notifications/androidpn.py
17
2293
import traceback from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.logger import CPLog from couchpotato.core.notifications.base import Notification log = CPLog(__name__) autoload = 'AndroidPN' class AndroidPN(Notification): def notify(self, message = '', data = None, listener = No...
gpl-3.0
alexmojaki/funcfinder
funcfinder/__init__.py
1
9712
from bdb import Bdb import inspect from itertools import imap, dropwhile, permutations import pydoc import re import sys import traceback import timeit import wrapt import funcfinder.answers import funcfinder.questions from utils import TryImportError def search_questions(terms): if isinstance(terms, basestring...
mit
unioslo/cerebrum
Cerebrum/utils/pidcontext.py
1
1737
#!/usr/bin/env python # encoding: utf-8 # # Copyright 2018 University of Oslo, Norway # # This file is part of Cerebrum. # # Cerebrum 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 Lic...
gpl-2.0
popazerty/SDG-e2
lib/python/Components/FileList.py
19
14902
import os import re from MenuList import MenuList from Components.Harddisk import harddiskmanager from Tools.Directories import SCOPE_CURRENT_SKIN, resolveFilename, fileExists from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, \ eServiceReference, eServiceCenter, gFont from Tools.LoadPixmap import LoadPixm...
gpl-2.0
Triton3D/loto
2_get_stats_from_tickets.py
1
1772
# Модуль сбора статистики присутствия чисел в билетах Русское Лото import os import time import sys dir=".\\tickets\\" files=os.listdir(dir) numbers_list=[i for i in range(1,91)] number_stats={numbers_list[i]:0 for i in range(0,90) } print("Найдено "+str(len(files))+" файлов билетов.\nНомер первого билета: " + \ ...
gpl-3.0
apuapaquola/rf
rf/__init__.py
1
7155
#!/usr/bin/env python """ rf - A framework for collaborative data analysis Copyright (C) 2015 Apuã Paquola <apuapaquola@gmail.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, eit...
gpl-3.0
varunnaganathan/django
tests/gis_tests/geoapp/test_sitemaps.py
123
2631
from __future__ import unicode_literals import zipfile from io import BytesIO from xml.dom import minidom from django.conf import settings from django.contrib.sites.models import Site from django.test import ( TestCase, modify_settings, override_settings, skipUnlessDBFeature, ) from .models import City, Country ...
bsd-3-clause
theDarkForce/plask
plask/flask/testsuite/testing.py
561
7411
# -*- coding: utf-8 -*- """ flask.testsuite.testing ~~~~~~~~~~~~~~~~~~~~~~~ Test client and more. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import flask import unittest from flask.testsuite import FlaskTestCase from flask._compat import text_type c...
lgpl-3.0
zasdfgbnm/tensorflow
tensorflow/python/keras/_impl/keras/optimizers.py
1
26966
# 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
yast/yast-python-bindings
examples/BarGraph3.py
1
3392
#!/usr/bin/env python # encoding: utf-8 # Advanced BarGraph example: # # Create a dialog with a BarGraph with a number of segments # and a "+" and a "-" button for each segment. import copy from yast import import_module import_module('UI') from yast import * import ycpbuiltins class BarGraph3Client: def main(sel...
gpl-2.0
wkeeling/ansible
test/units/modules/core/test_apt.py
6
1505
import collections import os import sys from ansible.compat.tests import mock from ansible.compat.tests import unittest try: from ansible.modules.core.packaging.os.apt import ( expand_pkgspec_from_fnmatches, ) except: # Need some more module_utils work (porting urls.py) before we can test # mo...
gpl-3.0
infobloxopen/neutron
neutron/tests/tempest/services/identity/v3/json/policy_client.py
23
2468
# Copyright 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 # # Unless requ...
apache-2.0
repotvsupertuga/tvsupertuga.repository
script.module.streamtvsupertuga/lib/resources/lib/sources/en/ddlspot.py
1
5137
# -*- coding: utf-8 -*- ''' Eggman Add-on **Created by Tempest** This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any late...
gpl-2.0
huobaowangxi/scikit-learn
sklearn/mixture/tests/test_gmm.py
200
17427
import unittest import copy import sys from nose.tools import assert_true import numpy as np from numpy.testing import (assert_array_equal, assert_array_almost_equal, assert_raises) from scipy import stats from sklearn import mixture from sklearn.datasets.samples_generator import make_spd_ma...
bsd-3-clause
RefugeeMatchmaking/HackZurich
GAE_Playground/libs/decorator.py
6
16260
# ######################### LICENSE ############################ # # Copyright (c) 2005-2015, Michele Simionato # 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 so...
mit
mlskit/astromlskit
FRONTEND/doefront3.py
3
2435
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'fractionalui.ui' # # Created: Wed Apr 08 07:10:07 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except A...
gpl-3.0
bwbeach/ansible
lib/ansible/playbook/attribute.py
7
1338
# (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
heisencoder/route-finder
third_party/lib/python/django/contrib/gis/geos/collections.py
219
4667
""" This module houses the Geometry Collection objects: GeometryCollection, MultiPoint, MultiLineString, and MultiPolygon """ from ctypes import c_int, c_uint, byref from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos.libgeos i...
mit
arivarton/workhours
stamp/config.py
1
10075
"""Handling of config settings and files.""" import os import sys import re from datetime import datetime import yaml from .constants import DATA_DIR, INVOICE_DIR from .helpers import error_handler from .exceptions import ConfigValueError __all__ = ['Config'] class ConfigValue(object): """Template for setting...
gpl-3.0
schlueter/ansible
lib/ansible/modules/network/avi/avi_authprofile.py
41
5005
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses...
gpl-3.0
inasafe/inasafe
safe/common/custom_logging.py
3
7256
# coding=utf-8 """ InaSAFE Disaster risk assessment tool developed by AusAid - **Logging related code.** Contact : ole.moller.nielsen@gmail.com .. note:: 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 Softw...
gpl-3.0
Workday/OpenFrame
tools/telemetry/telemetry/page/shared_page_state_unittest.py
1
4249
# 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 tempfile import unittest from telemetry.internal import story_runner from telemetry.page import page from telemetry.page import page_test from teleme...
bsd-3-clause
roadmapper/ansible
lib/ansible/modules/cloud/azure/azure_rm_loganalyticsworkspace.py
2
11331
#!/usr/bin/python # # Copyright (c) 2019 Yuwei Zhou, <yuwzho@microsoft.com> # # 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
tima/ansible
lib/ansible/module_utils/network/f5/bigiq.py
2
1361
# -*- 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 try: from f5.bigiq import ManagementRoot from icontrol.exceptions i...
gpl-3.0
raags/ansible-modules-core
cloud/openstack/_quantum_router_gateway.py
58
7565
#!/usr/bin/python #coding: utf-8 -*- # (c) 2013, Benno Joy <benno@ansible.com> # # This module 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 ...
gpl-3.0
nan86150/ImageFusion
lib/python2.7/site-packages/numpy/polynomial/hermite.py
36
55853
""" Objects for dealing with Hermite series. This module provides a number of objects (mostly functions) useful for dealing with Hermite series, including a `Hermite` class that encapsulates the usual arithmetic operations. (General information on how this module represents and works with such polynomials is in the d...
mit
ptisserand/ansible
contrib/inventory/nova.py
109
7029
#!/usr/bin/env python # (c) 2012, Marco Vito Moscaritolo <marco@agavee.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 # ...
gpl-3.0
edmorley/django
tests/serializers/test_xml.py
44
4779
from xml.dom import minidom from django.core import serializers from django.core.serializers.xml_serializer import DTDForbidden from django.test import TestCase, TransactionTestCase from .tests import SerializersTestBase, SerializersTransactionTestBase class XmlSerializerTestCase(SerializersTestBase, TestCase): ...
bsd-3-clause
shreyas111/Multimedia_CS523_Project1
inception5h.py
5
6371
######################################################################## # # The Inception Model 5h for TensorFlow. # # This variant of the Inception model is easier to use for DeepDream # and other imaging techniques. This is because it allows the input # image to be any size, and the optimized images are also prettie...
mit
aaronzirbes/ansible
test/units/executor/test_task_executor.py
33
9880
# (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
eyalfa/spark
examples/src/main/python/mllib/random_forest_classification_example.py
106
2572
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
pwarren/AGDeviceControl
agdevicecontrol/thirdparty/site-packages/darwin/twisted/test/test_logfile.py
19
6844
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.trial import unittest # system imports import os, shutil, time # twisted imports from twisted.python import logfile class LogFileTestCase(unittest.TestCase): """Test the rotating log file.""" def setUp(sel...
gpl-2.0
kevclarx/ansible
lib/ansible/module_utils/facts.py
5
171157
# (c) 2012, 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) any lat...
gpl-3.0
pyca/pynacl
docs/vectors/python/argondriver.py
2
4700
#!/usr/bin/python # from __future__ import division, print_function import argparse import json import random import string import subprocess import sys class argonRunner(object): GOODCHARS = string.ascii_letters + string.digits def __init__(self, args): self.exe = args.exe self.mnsaltlen = ...
apache-2.0
rytaft/h-store
third_party/python/boto/mturk/question.py
11
15235
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
gpl-3.0
vrv/tensorflow
tensorflow/python/kernel_tests/edit_distance_op_test.py
139
8145
# 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
hydrospanner/DForurm
DForurm/env/Lib/site-packages/django/contrib/gis/gdal/field.py
112
6735
from ctypes import byref, c_int from datetime import date, datetime, time from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import GDALException from django.contrib.gis.gdal.prototypes import ds as capi from django.utils.encoding import force_text # For more information, see the OG...
mit
skevy/django
tests/modeltests/reserved_names/tests.py
92
1671
import datetime from django.test import TestCase from models import Thing class ReservedNameTests(TestCase): def generate(self): day1 = datetime.date(2005, 1, 1) t = Thing.objects.create(when='a', join='b', like='c', drop='d', alter='e', having='f', where=day1, has_hyphen='h') ...
bsd-3-clause
aspiers/gertty
gertty/search/parser.py
1
14100
# 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 required by applicabl...
apache-2.0
stackforge/python-solumclient
solumclient/common/base.py
1
3402
# Copyright 2013 - Noorul Islam K M # # 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 w...
apache-2.0
vgrem/Office365-REST-Python-Client
office365/runtime/client_object.py
1
6459
import copy from office365.runtime.client_value import ClientValue from office365.runtime.odata.json_light_format import JsonLightFormat from office365.runtime.odata.odata_query_options import QueryOptions class ClientObject(object): def __init__(self, context, resource_path=None, parent_collection=None, namesp...
mit
mtrbean/scipy
scipy/stats/mstats_basic.py
8
68598
""" An extension of scipy.stats.stats to support masked arrays """ # Original author (2007): Pierre GF Gerard-Marchant # TODO : f_value_wilks_lambda looks botched... what are dfnum & dfden for ? # TODO : ttest_rel looks botched: what are x1,x2,v1,v2 for ? # TODO : reimplement ksonesamp from __future__ import divisi...
bsd-3-clause
bpramod/azure-linux-extensions
Diagnostic/Utils/XmlUtil.py
5
2369
#!/usr/bin/env python # # Azure Linux extension # # Copyright (c) Microsoft Corporation # All rights reserved. # MIT License # 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 re...
apache-2.0
magopian/olympia
apps/reviews/feeds.py
15
2542
from django.contrib.syndication.views import Feed from django.shortcuts import get_object_or_404 from tower import ugettext as _ from amo import helpers from addons.models import Addon, Review import urllib class ReviewsRss(Feed): addon = None def get_object(self, request, addon_id=None): """Get...
bsd-3-clause
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/aio/operations/_usages_operations.py
1
5201
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
akurtakov/Pydev
plugins/org.python.pydev.core/pysrc/_pydev_bundle/pydev_monkey.py
1
23007
# License: EPL import os import sys import traceback try: xrange except: xrange = range #=============================================================================== # Things that are dependent on having the pydevd debugger #=============================================================================== d...
epl-1.0
dreamsxin/kbengine
kbe/src/lib/python/Lib/test/test_crypt.py
91
1084
from test import support import unittest crypt = support.import_module('crypt') class CryptTestCase(unittest.TestCase): def test_crypt(self): c = crypt.crypt('mypassword', 'ab') if support.verbose: print('Test encryption: ', c) def test_salt(self): self.assertEqual(len(cr...
lgpl-3.0
hydroshare/hydroshare_temp
hs_core/tests/api/native/test_publish_resource.py
1
2615
__author__ = 'Tian Gan' ## unit test for publish_resource() from resource.py ## Note: # It can't test if the edit_groups are empty now, # as the edit_group can't be assigned any value when creating a resource from django.test import TestCase from django.contrib.auth.models import User, Group from hs_core import hydr...
bsd-3-clause
espadrine/opera
chromium/src/third_party/scons-2.0.1/engine/SCons/Tool/packaging/rpm.py
61
13485
"""SCons.Tool.Packaging.rpm The rpm packager. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # 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 ...
bsd-3-clause
markYoungH/chromium.src
tools/android/findbugs_plugin/test/run_findbugs_plugin_tests.py
109
1401
#!/usr/bin/env python # # 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. # This is used to test the findbugs plugin, it calls # build/android/pylib/utils/findbugs.py to analyze the classes in # org.chro...
bsd-3-clause
un33k/robotframework
src/robot/utils/encodingsniffer.py
25
3239
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
apache-2.0
phihag/youtube-dl
youtube_dl/extractor/localnews8.py
87
1728
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class LocalNews8IE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?localnews8\.com/(?:[^/]+/)*(?P<display_id>[^/]+)/(?P<id>[0-9]+)' _TEST = { 'url': 'http://www.localnews8.com/news/rexburg-business-...
unlicense
WaveBlocks/WaveBlocksND
WaveBlocksND/Plot/plotcm.py
1
1716
"""The WaveBlocks Project Function for plotting complex matrices with the phase of the entries encoded into the usual color code. @author: R. Bourquin @copyright: Copyright (C) 2011, 2012, 2016 R. Bourquin @license: Modified BSD License """ from matplotlib.pyplot import gca from matplotlib import ticker from WaveBl...
bsd-3-clause
xianai/Ultra-KSM-Head
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
1927
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
gpl-2.0
Fusion-Devices/android_device_xiaomi_cancro
releasetools.py
6
1443
# # Copyright (C) 2015 The CyanogenMod 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
gpl-2.0
yaoandw/joke
Pods/AVOSCloudCrashReporting/Breakpad/src/tools/gyp/test/mac/gyptest-rpath.py
242
1310
#!/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 LD_DYLIB_INSTALL_NAME and DYLIB_INSTALL_NAME_BASE are handled correctly. """ import TestGyp import re import subprocess ...
mit
ToontownUprising/src
toontown/effects/BlastEffect.py
6
1346
from pandac.PandaModules import * from direct.interval.IntervalGlobal import * from EffectController import EffectController class BlastEffect(NodePath, EffectController): def __init__(self): NodePath.__init__(self, 'BlastEffect') EffectController.__init__(self) self.fadeTime = 0.15 ...
mit
wyc/django
django/contrib/postgres/aggregates/statistics.py
493
2033
from django.db.models import FloatField, IntegerField from django.db.models.aggregates import Aggregate __all__ = [ 'CovarPop', 'Corr', 'RegrAvgX', 'RegrAvgY', 'RegrCount', 'RegrIntercept', 'RegrR2', 'RegrSlope', 'RegrSXX', 'RegrSXY', 'RegrSYY', 'StatAggregate', ] class StatAggregate(Aggregate): def __in...
bsd-3-clause
quiltdata/quilt
lambdas/pkgevents/index.py
1
2667
import itertools import json import re import boto3 from t4_lambda_shared.utils import get_quilt_logger EXPECTED_POINTER_SIZE = 64 event_bridge = boto3.client('events') s3 = boto3.client('s3') logger = get_quilt_logger() class PutEventsException(Exception): pass class EventsQueue: MAX_SIZE = 10 def...
apache-2.0