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
ldhwin/pywinauto
pywinauto/tests/comboboxdroppedheight.py
17
2469
# GUI Application automation and testing library # Copyright (C) 2006 Mark Mc Mahon # # 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 License, or (at you...
lgpl-2.1
dendisuhubdy/diffusion-mri
Python/src/flt_utils.py
2
3548
#!/usr/bin/env python #coding=utf-8 import os import numpy import array from utils import * from mhd_utils import * def read_flt_file(filename): """ Read the diffusion signals from a flt file. Usage: (dsize, data) = read_flt_file(filename) please see example below for explanation. A flt...
mit
ronakkhunt/kuma
vendor/packages/logilab/astng/exceptions.py
27
1650
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as publis...
mpl-2.0
afaheem88/rally
rally/plugins/openstack/scenarios/zaqar/basic.py
7
2394
# Copyright (c) 2014 Red Hat, 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 writ...
apache-2.0
rosmo/ansible
lib/ansible/modules/network/netvisor/pn_role.py
35
6334
#!/usr/bin/python # Copyright: (c) 2018, Pluribus Networks # 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': ['...
gpl-3.0
FreakofKnuth/Nanoinformatics
LSI/ScratchModelRunners/LsiIndustrialHygiene.py
2
4446
from sys import argv import numpy from gensim import corpora, models, similarities from gensim.corpora import MmCorpus from nltk.corpus import stopwords import os from pprint import pprint from numpy import median # Enables ease of recall in the future modelFile = '.' + os.sep + 'IndustrialHygieneModel' os.makedirs(m...
apache-2.0
ragupta-git/ImcSdk
imcsdk/mometa/lsboot/LsbootBootSecurity.py
1
3558
"""This module contains the general information for LsbootBootSecurity ManagedObject.""" from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class LsbootBootSecurityConsts: SECURE_BOOT_DISABLED = "Disabled" SECURE_BOOT_ENABLED = "Enabled" ...
apache-2.0
cyberden/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/teachertube.py
17
4695
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( qualities, determine_ext, ) class TeacherTubeIE(InfoExtractor): IE_NAME = 'teachertube' IE_DESC = 'teachertube.com videos' _VALID_URL = r'https?://(?:www\.)?teachert...
gpl-3.0
KonradBreitsprecher/espresso
testsuite/tests_common.py
1
16337
from __future__ import print_function import os import numpy as np try: import vtk from vtk.util.numpy_support import vtk_to_numpy except BaseException: pass def calculate_vtk_max_pointwise_difference(file1, file2, tol=1e-6): arrays = [0] * 2 reader = vtk.vtkStructuredPointsReader() for i, fn...
gpl-3.0
GehenHe/Recognize-Face-on-Android
tensorflow/contrib/learn/python/learn/__init__.py
4
2547
# 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
matthiasdiener/spack
var/spack/repos/builtin/packages/archer/package.py
5
1930
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
sssllliang/silverberry
lib/requests/packages/chardet/charsetprober.py
3127
1902
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
apache-2.0
manics/openmicroscopy
components/tools/OmeroPy/test/integration/test_reimport.py
5
9627
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2014-2015 Glencoe Software, Inc. All Rights Reserved. # Use is subject to license terms supplied in LICENSE.txt # # 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...
gpl-2.0
pranner/CMPUT410-Lab6-Django
v1/lib/python2.7/site-packages/django/contrib/gis/sitemaps/views.py
52
4914
from __future__ import unicode_literals import warnings from django.apps import apps from django.http import HttpResponse, Http404 from django.template import loader from django.contrib.sites.shortcuts import get_current_site from django.core import urlresolvers from django.core.paginator import EmptyPage, PageNotAnI...
apache-2.0
PongPi/isl-odoo
addons/l10n_in_hr_payroll/wizard/hr_yearly_salary_detail.py
374
2376
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP SA (<http://openerp.com>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under th...
agpl-3.0
DirtyDev/DirtyKernel-ANDROID
scripts/rt-tester/rt-tester.py
11005
5307
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt import sh...
gpl-2.0
maohongyuan/kbengine
kbe/src/lib/python/Lib/idlelib/RemoteDebugger.py
137
12029
"""Support for remote Python debugging. Some ASCII art to describe the structure: IN PYTHON SUBPROCESS # IN IDLE PROCESS # # oid='gui_adapter' +----------+ # +------------+ ...
lgpl-3.0
openstack/zaqar
zaqar/transport/wsgi/v2_0/claims.py
1
7469
# Copyright (c) 2013 Rackspace, 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 wr...
apache-2.0
rbalda/neural_ocr
env/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/setup.py
76
1480
#!/usr/bin/env python from __future__ import division, print_function, absolute_import from os.path import join def configuration(parent_package='',top_path=None): from numpy.distutils.system_info import get_info, NotFoundError from numpy.distutils.misc_util import Configuration from scipy._build_utils i...
mit
hanlind/nova
nova/tests/unit/notifications/objects/test_service.py
8
3429
# Copyright (c) 2016 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
tupamba/kardex
node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
896
91092
# Copyright (c) 2013 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. # Notes: # # This is all roughly based on the Makefile system used by the Linux # kernel, but is a non-recursive make -- we put the entire dependency # graph in fr...
mit
TeamBliss-Devices/android_kernel_samsung_jflte
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
1935
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
gpl-2.0
jrclaramunt/django-cms
cms/test_utils/project/emailuserapp/forms.py
14
3583
# -*- coding: utf-8 -*- from django import forms from django.contrib.auth.forms import ReadOnlyPasswordHashField from cms.utils.compat.dj import get_user_model from .models import EmailUser class UserCreationForm(forms.ModelForm): """ A form for creating a new user, including the required email and passw...
bsd-3-clause
nathanaevitas/odoo
openerp/addons/website_forum/models/forum.py
233
38491
# -*- coding: utf-8 -*- from datetime import datetime import uuid from werkzeug.exceptions import Forbidden import logging import openerp from openerp import api, tools from openerp import SUPERUSER_ID from openerp.addons.website.models.website import slug from openerp.exceptions import Warning from openerp.osv impo...
agpl-3.0
xray7224/PyPump
setup.py
1
2459
## # Copyright (C) 2013 Jessica T. (Tsyesika) <xray7224@googlemail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
gpl-3.0
erwilan/ansible
lib/ansible/modules/cloud/amazon/ec2_lc.py
41
14036
#!/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
normtown/SickRage
lib/sqlalchemy/ext/instrumentation.py
80
14672
"""Extensible class instrumentation. The :mod:`sqlalchemy.ext.instrumentation` package provides for alternate systems of class instrumentation within the ORM. Class instrumentation refers to how the ORM places attributes on the class which maintain data and track changes to that data, as well as event hooks installed...
gpl-3.0
SUSE/azure-sdk-for-python
azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/user_secret_store_fragment.py
3
1083
# 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 ...
mit
haridsv/pip
pip/req/req_install.py
180
43096
from __future__ import absolute_import import logging import os import re import shutil import sys import tempfile import warnings import zipfile from distutils.util import change_root from distutils import sysconfig from email.parser import FeedParser from pip._vendor import pkg_resources, six from pip._vendor.dist...
mit
rcbuild-info/scrape
rcbi/rcbi/spiders/StoneBlueAirlines.py
1
2844
import scrapy from scrapy import log from scrapy.spiders import CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor from rcbi.items import Part import os import urlparse import urllib MANUFACTURERS = ["Cobra", "DTF-UHF", "EMAX", "FatShark", "Foxeer", "FrSky", "Gemfan", "ImmersionRC", "XHover"] CORRECT =...
apache-2.0
DmitryADP/diff_qc750
external/webkit/Tools/Scripts/webkitpy/common/net/failuremap_unittest.py
15
3662
# Copyright (c) 2010 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
TinghuiWang/pyActLearn
pyActLearn/CASAS/stat_features.py
1
21308
import abc import logging import numpy as np from ..logging import logging_name logger = logging.getLogger(__name__) # region Abstract FeatureRoutineTemplate Class class FeatureRoutineTemplate(metaclass=abc.ABCMeta): """Feature Routine Class A routine that calculate statistical features every time the windo...
bsd-3-clause
KousikaGanesh/purchaseandInventory
openerp/addons/project/__openerp__.py
46
3184
# -*- 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
youssef-emad/shogun
examples/undocumented/python_modular/kernel_comm_ulong_string_modular.py
26
1450
#!/usr/bin/env python from tools.load import LoadMatrix lm=LoadMatrix() traindat =lm.load_dna('../data/fm_train_dna.dat') testdat = lm.load_dna('../data/fm_test_dna.dat') parameter_list = [[traindat,testdat,3,0,False ],[traindat,testdat,4,0,False]] def kernel_comm_ulong_string_modular (fm_train_dna=traindat,fm_test_...
gpl-3.0
wndhydrnt/airflow
tests/dags/test_backfill_pooled_tasks.py
15
1283
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
romankagan/DDBWorkbench
python/lib/Lib/wsgiref/handlers.py
104
15596
"""Base classes for server/gateway implementations""" from types import StringType from util import FileWrapper, guess_scheme, is_hop_by_hop from headers import Headers import sys, os, time __all__ = ['BaseHandler', 'SimpleHandler', 'BaseCGIHandler', 'CGIHandler'] try: dict except NameError: def dict(items)...
apache-2.0
Cisco-Talos/pyrebox
pyrebox_test/test_12_load_remove_module.py
1
3452
# ------------------------------------------------------------------------------- # # Copyright (C) 2018 Cisco Talos Security Intelligence and Research Group # # PyREBox: Python scriptable Reverse Engineering Sandbox # Author: Xabier Ugarte-Pedrero # # This program is free software; you can redistribute it and/...
gpl-2.0
darkleons/BE
addons/l10n_pa/__init__.py
2120
1456
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2011 Cubic ERP - Teradata SAC. (http://cubicerp.com). # # WARNING: This program as such is intended to be used by professional # programmers who take t...
agpl-3.0
hyiltiz/youtube-dl
youtube_dl/extractor/wsj.py
104
3431
# encoding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, unified_strdate, ) class WSJIE(InfoExtractor): _VALID_URL = r'https?://video-api\.wsj\.com/api-video/player/iframe\.html\?guid=(?P<id>[a-zA-Z0-9-]+)' IE_DESC = 'Wall Street J...
unlicense
Jannes123/inasafe
safe/impact_functions/inundation/flood_raster_population/parameter_definitions.py
10
2338
# coding=utf-8 """InaSAFE Disaster risk tool by Australian Aid - Parameter definition for Flood Vector on Building QGIS IF 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 ...
gpl-3.0
Alwnikrotikz/cortex-vfx
test/IECoreHoudini/procedurals/sphereProcedural/sphereProcedural-1.py
12
3090
########################################################################## # # Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios), # its affiliates and/or its licensors. # # Copyright (c) 2011, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms...
bsd-3-clause
andrewyoung1991/scons
test/Install/tool.py
5
1745
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, modify, merge, publish, ...
mit
randynobx/ansible
test/units/parsing/yaml/test_dumper.py
28
2126
# coding: utf-8 # 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 i...
gpl-3.0
e-gob/plataforma-kioscos-autoatencion
scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/network/avi/avi_snmptrapprofile.py
27
3396
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # # # 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...
bsd-3-clause
trankmichael/scipy
scipy/_lib/_testutils.py
39
1035
""" Generic test utilities and decorators. """ from __future__ import division, print_function, absolute_import import os import sys from numpy.testing import dec __all__ = ['knownfailure_overridable', 'suppressed_stdout'] def knownfailure_overridable(msg=None): if not msg: msg = "Undiagnosed issues ...
bsd-3-clause
msegado/edx-platform
common/lib/xmodule/xmodule/tests/test_import_static.py
208
1949
""" Tests that check that we ignore the appropriate files when importing courses. """ import unittest from mock import Mock from xmodule.modulestore.xml_importer import import_static_content from opaque_keys.edx.locations import SlashSeparatedCourseKey from xmodule.tests import DATA_DIR class IgnoredFilesTestCase(uni...
agpl-3.0
XCage15/privacyidea
privacyidea/lib/resolvers/SQLIdResolver.py
3
27000
# -*- coding: utf-8 -*- # # Copyright (C) 2014 Cornelius Kölbel # License: AGPLv3 # contact: cornelius@privacyidea.org # # This code is free software; you can redistribute it and/or # modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE # License as published by the Free Software Foundation; either #...
agpl-3.0
gangadharkadam/v6_erp
erpnext/stock/report/stock_balance/stock_balance.py
6
4399
# 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 from frappe import _ from frappe.utils import flt, getdate def execute(filters=None): if not filters: filters = {} validate_filters(f...
agpl-3.0
pjryan126/solid-start-careers
store/api/zillow/venv/lib/python2.7/site-packages/pandas/tseries/tests/test_converter.py
1
5709
from datetime import datetime, date import nose import numpy as np from numpy.testing import assert_almost_equal as np_assert_almost_equal from pandas import Timestamp, Period from pandas.compat import u import pandas.util.testing as tm from pandas.tseries.offsets import Second, Milli, Micro try: import pandas.t...
gpl-2.0
jaspreetw/tempest
tempest/api/compute/volumes/test_attach_volume.py
7
5629
# Copyright 2013 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
apache-2.0
CydarLtd/ansible
contrib/inventory/stacki.py
78
6285
#!/usr/bin/env python # Copyright (c) 2016, Hugh Ma <hugh.ma@flextronics.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 v...
gpl-3.0
clumsy/intellij-community
python/lib/Lib/encodings/palmos.py
647
2936
""" Python Character Mapping Codec for PalmOS 3.5. Written by Sjoerd Mullender (sjoerd@acm.org); based on iso8859_15.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,inp...
apache-2.0
Kiiv/Sick-Beard
lib/hachoir_metadata/riff.py
90
7707
""" Extract metadata from RIFF file format: AVI video and WAV sound. """ from lib.hachoir_metadata.metadata import Metadata, MultipleMetadata, registerExtractor from lib.hachoir_metadata.safe import fault_tolerant, getValue from lib.hachoir_parser.container.riff import RiffFile from lib.hachoir_parser.video.fourcc imp...
gpl-3.0
mrh1997/pyclibrary
pyclibrary/c_library.py
2
22466
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright 2015 by PyCLibrary Authors, see AUTHORS for more details. # # Distributed under the terms of the MIT/X11 license. # # The full license is in the file LICENCE, distributed with this software. # -----------...
mit
jacquerie/inspire-next
tests/acceptance/conftest.py
2
4197
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014-2017 CERN. # # INSPIRE 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 ...
gpl-3.0
anryko/ansible
test/units/modules/network/eos/test_eos_banner.py
13
3600
# 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 in the hope that ...
gpl-3.0
bakhtout/odoo-educ
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
robin900/sqlalchemy
examples/large_collection/large_collection.py
32
3291
from sqlalchemy import (MetaData, Table, Column, Integer, String, ForeignKey, create_engine) from sqlalchemy.orm import (mapper, relationship, sessionmaker) meta = MetaData() org_table = Table('organizations', meta, Column('org_id', Integer, primary_key=True), Column('org_name', Stri...
mit
diNard/Saw
sample.py
1
1850
from saw.saw import Saw import datetime import sys from saw.node import Node with open('test.txt', 'r') as content_file: text = content_file.read() start_time = datetime.datetime.now() saw = Saw.load(text) end_time = datetime.datetime.now() print 'Time of text load - ' + str(end_time - start_time) print saw.s...
mit
openmips/stbgui
lib/python/Plugins/SystemPlugins/Satfinder/plugin.py
1
25198
from enigma import eDVBResourceManager, eDVBFrontendParametersSatellite, eDVBFrontendParametersTerrestrial from Screens.ScanSetup import ScanSetup, buildTerTransponder from Screens.ServiceScan import ServiceScan from Screens.MessageBox import MessageBox from Plugins.Plugin import PluginDescriptor from Components.Sour...
gpl-2.0
robinro/ansible
lib/ansible/module_utils/facts/network/linux.py
62
16129
# 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 in the hope that ...
gpl-3.0
plotly/python-api
packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/colorbar/_title.py
2
6793
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatterpolargl.marker.colorbar" _path_str = "scatterpolargl.marker.colorbar.title" _valid_pro...
mit
wimnat/ansible-modules-core
network/netvisor/pn_vrouterbgp.py
30
14947
#!/usr/bin/python """ PN-CLI vrouter-bgp-add/vrouter-bgp-remove/vrouter-bgp-modify """ # # 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 Lice...
gpl-3.0
hastexo/edx-platform
common/test/acceptance/pages/lms/matlab_problem.py
54
1077
""" Matlab Problem Page. """ from bok_choy.page_object import PageObject class MatlabProblemPage(PageObject): """ View of matlab problem page. """ url = None def is_browser_on_page(self): return self.q(css='.ungraded-matlab-result').present @property def problem_name(self): ...
agpl-3.0
iAmMrinal0/reddit
Schedulizer-ModTeam/schedulizerm.py
1
15974
#/u/GoldenSights import traceback from dateutil.parser import parse as dateparse import string import datetime import time import praw import sqlite3 import re """ USER CONFIG """ USERAGENT = "" #Describe the bot and what it does. Include your username USERNAME = "GoldenSights" #This is the bot's username PASSWORD = ...
mit
mwobensmith/tls-canary
tests/__init__.py
1
2091
# 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 logging import shutil import tempfile import tlscanary.firefox_downloader as fd import tlscanary.firefox_extract...
mpl-2.0
srinath-chakravarthy/ovito
doc/python/example_snippets/msd_calculation.py
1
1301
from ovito.io import import_file, export_file from ovito.modifiers import PythonScriptModifier, CalculateDisplacementsModifier import numpy # Load input data and create an ObjectNode with a data pipeline. node = import_file("simulation.dump", multiple_frames = True) # Calculate per-particle displacements with respect...
gpl-3.0
librato/librato-python-web
test/flask_/state_app.py
1
1771
# Copyright (c) 2015. Librato, 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 a...
bsd-3-clause
dasMalle/AScriptADay2016
January/25-TicTacToe/TickTackToe.py
1
1166
game= [[0, 0, 0], [0, 0, 0], [0, 0, 0]] def Winner(g, p): if g[1][1] == p: return (g[0][0] == p and g[2][2] == p) \ or (g[1][0] == p and g[1][2] == p) \ or (g[0][1] == p and g[2][1] == p)\ or (g[0][2] == p and g[2][0] == p) else: retu...
gpl-2.0
ooovector/qtlab_replacement
interleaved_benchmarking.py
1
6934
from . import sweep import numpy as np import matplotlib.pyplot as plt class interleaved_benchmarking: def __init__(self, measurer, set_seq, interleavers = None, random_sequence_num=8): self.measurer = measurer self.set_seq = set_seq self.interleavers = {} if interleavers is not None: for name, gate in in...
gpl-3.0
vilorious/pyload
module/gui/XMLParser.py
41
2149
# -*- coding: utf-8 -*- """ 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 in ...
gpl-3.0
infobloxopen/infoblox-netmri
infoblox_netmri/api/broker/v2_10_0/spm_interfaces_default_grid_broker.py
14
6417
from ..broker import Broker class SpmInterfacesDefaultGridBroker(Broker): controller = "spm_interfaces_default_grids" def index(self, **kwargs): """Lists the available spm interfaces default grids. Any of the inputs listed may be be used to narrow the list; other inputs will be ignored. Of the variou...
apache-2.0
fusionbox/mezzanine
mezzanine/conf/context_processors.py
9
2053
from __future__ import unicode_literals from mezzanine.utils.cache import (cache_key_prefix, cache_installed, cache_get, cache_set) # Deprecated settings and their defaults. DEPRECATED = { "PAGES_MENU_SHOW_ALL": True } class TemplateSettings(dict): """ Dict wrapper for...
bsd-2-clause
theshadowx/enigma2
lib/python/Plugins/SystemPlugins/OSD3DSetup/plugin.py
2
6170
from Screens.Screen import Screen from Components.ConfigList import ConfigListScreen from Components.config import config, ConfigSubsection, ConfigInteger, ConfigSelection, ConfigSlider, getConfigListEntry modelist = {"off": _("Off"), "auto": _("Auto"), "sidebyside": _("Side by Side"), "topandbottom": _("Top and Botto...
gpl-2.0
justinmuller/buck
third-party/py/pex/pex/sorter.py
55
1403
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from .package import EggPackage, SourcePackage, WheelPackage class Sorter(object): DEFAULT_PACKAGE_PRECEDENCE = ( WheelPackage, EggPackage, SourcePackage, ) @cla...
apache-2.0
adafruit/micropython
tests/float/cmath_fun.py
23
1646
# test the functions imported from cmath try: from cmath import * except ImportError: print("SKIP") raise SystemExit # make sure these constants exist in cmath print("%.5g" % e) print("%.5g" % pi) test_values_non_zero = [] base_values = (0.0, 0.5, 1.2345, 10.) for r in base_values: for i in base_valu...
mit
bluemini/kuma
vendor/packages/translate/storage/xml_extract/test_unit_tree.py
26
3131
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2002-2006 Zuza Software Foundation # # This file is part of translate. # # translate 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...
mpl-2.0
yk5/incubator-airflow
tests/ti_deps/deps/test_trigger_rule_dep.py
15
9106
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
pwong-mapr/private-hue
desktop/core/src/desktop/log/__init__.py
3
5500
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
aleaxit/pysolper
permit/lib/dist/jinja2/utils.py
64
18630
# -*- coding: utf-8 -*- """ jinja2.utils ~~~~~~~~~~~~ Utility functions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import sys import errno try: from thread import allocate_lock except ImportError: from dummy_thread import allocate_lo...
apache-2.0
sumeetsk/NEXT
apps/PoolBasedTripletMDS/algs/CrowdKernel/CrowdKernel.py
3
5533
""" CrowdKernel algorithm of the Online Learning Library for Next.Discovery author: Lalit Jain, kevin.g.jamieson@gmail.com last updated: 4/22/2015 """ import numpy import numpy.random from apps.PoolBasedTripletMDS.algs.CrowdKernel import utilsCrowdKernel import time class CrowdKernel: def initExp(self,butler,n,d,f...
apache-2.0
jramapuram/LifelongVAE
lifelong_vae.py
1
45371
import os import sys import datetime import numpy as np import tensorflow as tf import tensorflow.contrib.slim as slim import tensorflow.contrib.distributions as distributions # from tensorflow.python.training.moving_averages import weighted_moving_average from reparameterizations import gumbel_reparmeterization, gauss...
mit
Syrcon/servo
tests/wpt/web-platform-tests/tools/pytest/testing/test_argcomplete.py
179
3582
from __future__ import with_statement import py, pytest # test for _argcomplete but not specific for any application def equal_with_bash(prefix, ffc, fc, out=None): res = ffc(prefix) res_bash = set(fc(prefix)) retval = set(res) == res_bash if out: out.write('equal_with_bash %s %s\n' % (retval,...
mpl-2.0
PetrDlouhy/django
django/db/models/sql/aggregates.py
76
4841
""" Classes to represent the default SQL aggregate functions """ import copy import warnings from django.db.models.fields import FloatField, IntegerField from django.db.models.lookups import RegisterLookupMixin from django.utils.deprecation import RemovedInDjango20Warning from django.utils.functional import cached_pro...
bsd-3-clause
glove747/liberty-neutron
neutron/api/rpc/agentnotifiers/dhcp_rpc_agent_api.py
29
8270
# Copyright (c) 2013 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
apache-2.0
ApuliaSoftware/odoo
addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py
381
2572
# -*- 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
rhinstaller/blivet
blivet/static_data/mpath_info.py
1
2225
# # Copyright (C) 2016 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU Lesser General Public License v.2, or (at your option) any later # version. This program is distributed in the hope that it ...
lgpl-2.1
jonjozwiak/openstack-detective
roles/glance/files/check_rabbitmq.py
11
1800
#!/usr/bin/env python # Check to validate rabbitmq connectivity # This is an alternative to the management plugin and rabbitmqadmin # Note rabbitmqadmin is available from http://<rabbitmq>:15672/cli/ # and should be saved in /usr/local/bin # # Usage: check_rabbit.py --host myhost --port 5672 --user myuser --password my...
apache-2.0
marcoantoniooliveira/labweb
oscar/lib/python2.7/site-packages/IPython/core/magics/extension.py
2
3447
"""Implementation of magic functions for the extension machinery. """ #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distrib...
bsd-3-clause
PerkinsRay/pox
pox/log/color.py
46
5311
# Copyright 2011 James McCauley # # 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 writi...
apache-2.0
Dipsomaniac/peewee
playhouse/tests/test_pool.py
12
11971
import heapq import psycopg2 # Trigger import error if not installed. import threading import time from peewee import * from peewee import savepoint from peewee import transaction from playhouse.pool import * from playhouse.tests.base import database_initializer from playhouse.tests.base import PeeweeTestCase class...
mit
donnadionne/grpc
test/cpp/naming/gen_build_yaml.py
2
2916
#!/usr/bin/env python2.7 # Copyright 2015 gRPC authors. # # 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 la...
apache-2.0
bjornsturmberg/EMUstack
examples/simo_011-single_interface-dispersive.py
2
4116
""" simo_011-single_interface-dispersive.py is a simulation example for EMUstack. Copyright (C) 2015 Bjorn Sturmberg 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
gdgellatly/OCB1
addons/mail/mail_alias.py
14
11562
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
yawnosnorous/python-for-android
python-build/python-libs/gdata/build/lib/gdata/service.py
136
67387
#!/usr/bin/python # # Copyright (C) 2006,2008 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 required by applicable...
apache-2.0
chrsrds/scikit-learn
sklearn/linear_model/logistic.py
1
91847
""" Logistic Regression """ # Author: Gael Varoquaux <gael.varoquaux@normalesup.org> # Fabian Pedregosa <f@bianp.net> # Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Manoj Kumar <manojkumarsivaraj334@gmail.com> # Lars Buitinck # Simon Wu <s8wu@uwaterloo.ca> # ...
bsd-3-clause
nvoron23/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_importhooks.py
56
8330
import sys import imp import os import unittest from test import test_support test_src = """\ def get_name(): return __name__ def get_file(): return __file__ """ absimp = "import sub\n" relimp = "from . import sub\n" deeprelimp = "from .... import sub\n" futimp = "from __future__ import absolute_import\n" r...
apache-2.0
hantek/pylearn2
pylearn2/training_algorithms/tests/test_default.py
44
1798
import numpy as np from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix from pylearn2.models.rbm import RBM from pylearn2.models.s3c import S3C, E_Step, Grad_M_Step from pylearn2.training_algorithms.default import DefaultTrainingAlgorithm from pylearn2.training_algorithms.training_algorithm import NoBat...
bsd-3-clause
slisson/intellij-community
python/lib/Lib/site-packages/django/contrib/admindocs/urls.py
336
1089
from django.conf.urls.defaults import * from django.contrib.admindocs import views urlpatterns = patterns('', url('^$', views.doc_index, name='django-admindocs-docroot' ), url('^bookmarklets/$', views.bookmarklets, name='django-admindocs-bookmarklets' ), url('^tags/$...
apache-2.0
johnboxall/django-bloom
bloom/sms/lib/upside/connector.py
4
3531
# Bloom SMS component Upside Connector # # Kevin Tom # Copyright 2008 Handi Mobility # www.handimobility.ca from django.conf import settings from bloom.sms.lib.upside.Authentication_client import * from bloom.sms.lib.upside.SMS_client import * class UpsideConnector: def __init__(self, username, passw...
gpl-3.0