repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
CourseTalk/edx-platform
common/djangoapps/third_party_auth/tasks.py
47
6565
# -*- coding: utf-8 -*- """ Code to manage fetching and storing the metadata of IdPs. """ from celery.task import task import datetime import dateutil.parser import logging from lxml import etree import requests from onelogin.saml2.utils import OneLogin_Saml2_Utils from third_party_auth.models import SAMLConfiguration...
agpl-3.0
jazzband/site
migrations/versions/9cbd7c1a6757_.py
1
1554
""" Revision ID: 9cbd7c1a6757 Revises: 31a627ff26d0 Create Date: 2018-05-18 19:31:27.158543 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "9cbd7c1a6757" down_revision = "31a627ff26d0" def upgrade(): op.add_column( "users", sa.Column( ...
mit
eecolella/GoToAnchor
searchengines/base.py
1
2227
import subprocess import re class Base: """ This is the base search engine class. Override it to define new search engines. """ SETTINGS = [ "path_to_executable", "mandatory_options", "common_options" ] HAS_COLUMN_INFO = re.compile('^[^:]+:\d+:\d+:') ...
gpl-2.0
rversteegen/commandergenius
project/jni/python/src/Tools/scripts/logmerge.py
94
5576
#! /usr/bin/env python """Consolidate a bunch of CVS or RCS logs read from stdin. Input should be the output of a CVS or RCS logging command, e.g. cvs log -rrelease14: which dumps all log messages from release1.4 upwards (assuming that release 1.4 was tagged with tag 'release14'). Note the trailing colon! Thi...
lgpl-2.1
mkollaro/taskrunner
tests/test_main.py
1
5729
#!/usr/bin/env python # # Copyright (c) 2013 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 appl...
apache-2.0
biocore/pyqi
pyqi/core/command.py
1
8636
#!/usr/bin/env python #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #--------------------------...
bsd-3-clause
damdam-s/OCB
addons/account/report/account_report.py
196
12831
# -*- 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
drasmuss/numpy
numpy/distutils/tests/test_fcompiler_intel.py
146
1224
from __future__ import division, absolute_import, print_function import numpy.distutils.fcompiler from numpy.testing import TestCase, run_module_suite, assert_ intel_32bit_version_strings = [ ("Intel(R) Fortran Intel(R) 32-bit Compiler Professional for applications" "running on Intel(R) 32, Version 11.1", '...
bsd-3-clause
lumenosys/lumenosys-adi-buildroot
support/scripts/kconfiglib.py
46
138316
# This is Kconfiglib, a Python library for scripting, debugging, and extracting # information from Kconfig-based configuration systems. To view the # documentation, run # # $ pydoc kconfiglib # # or, if you prefer HTML, # # $ pydoc -w kconfiglib # # The examples/ subdirectory contains examples, to be run with e.g. # ...
gpl-2.0
ypwalter/fxos-certsuite
mcts/web-platform-tests/tests/cors/resources/preflight.py
253
1238
def main(request, response): headers = [("Content-Type", "text/plain")] if "check" in request.GET: token = request.GET.first("token") value = request.server.stash.take(token) if value == None: body = "0" else: if request.GET.first("check", None) == "keep"...
mpl-2.0
MichaelSchreier/Kano
class_UI_NewItemDialog.py
1
1411
# -*- coding: utf-8 -*- """ Created on Wed Sep 21 19:58:14 2016 @author: Michael """ from PyQt5 import QtWidgets, QtGui from const_UI_stylesheets import * import os class NewItemDialog(QtWidgets.QDialog):#when using QtWidgets.QWidget background remains partially transparent def __init__(self, item_uuid=...
gpl-3.0
idjaw/keystone
keystone/contrib/oauth1/controllers.py
11
17190
# Copyright 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 in...
apache-2.0
dsaraujo/circulante
django/contrib/localflavor/id/forms.py
311
6834
""" ID-specific Form helpers """ import re import time from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, Select from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_unicode postcode_re = re.compil...
bsd-3-clause
Shanec132006/Lab4
lib/werkzeug/contrib/sessions.py
315
12423
# -*- coding: utf-8 -*- r""" werkzeug.contrib.sessions ~~~~~~~~~~~~~~~~~~~~~~~~~ This module contains some helper classes that help one to add session support to a python WSGI application. For full client-side session storage see :mod:`~werkzeug.contrib.securecookie` which implements a secure,...
apache-2.0
edx/ansible
lib/ansible/utils/cmd_functions.py
156
1959
# (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
dhermes/google-cloud-python
redis/tests/unit/gapic/v1beta1/test_cloud_redis_client_v1beta1.py
2
15125
# -*- coding: utf-8 -*- # # Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
esp8266-setup/esp8266-setup
esp8266_setup/project.py
1
2343
from __future__ import print_function import os import re from esp8266_setup.tools import BASE_DIR, current_user, replace_placeholders def make_project_makefile(mk, args): # Add the SDK libs as requested if args.sdk_libs is not None: libs = " ".join(args.sdk_libs.split(",")) m = re.search(r'^...
gpl-2.0
XiaominZhang/Big-Data-Benchmark-for-Big-Bench
engines/hive/queries/q04/variants/old/q4_reducer2.py
3
1885
#"INTEL CONFIDENTIAL" #Copyright 2015 Intel Corporation All Rights Reserved. # #The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its suppliers or licensors. Title to the Material remains with Intel Corporation or its suppliers an...
apache-2.0
richard-willowit/odoo
addons/point_of_sale/models/pos_category.py
16
2360
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, tools, _ class PosCategory(models.Model): _name = "pos.category" _description = "PoS Category" _order = "sequence, name" @api.constrains('parent_id') def _check_...
gpl-3.0
Jonekee/chromium.src
tools/site_compare/operators/equals_with_mask.py
189
1589
# Copyright (c) 2011 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. """Compare two images for equality, subject to a mask.""" from PIL import Image from PIL import ImageChops import os.path def Compare(file1, file2, *...
bsd-3-clause
arfoll/upm
examples/python/mq4.py
11
2255
#!/usr/bin/python # Author: Jon Trulson <jtrulson@ics.com> # Copyright (c) 2015 Intel Corporation. # # 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 l...
mit
chuan9/chromium-crosswalk
tools/telemetry/telemetry/core/platform/profiler/v8_profiler.py
5
1776
# Copyright 2013 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 logging import re import tempfile from telemetry.core.platform import profiler class V8Profiler(profiler.Profiler): _V8_ARG = '--js-flags=--logf...
bsd-3-clause
yueranyuan/vector_edu
wavelet_analysis.py
1
4265
import numpy as np import matplotlib.pyplot as plt from learntools.emotiv.data import segment_raw_data, gen_wavelet_features from learntools.emotiv.filter import filter_data from learntools.libs.wavelet import signal_to_wavelet def show_raw_wave(eeg): for channel in xrange(14): plt.plot(eeg[:, channel]) ...
mit
mancoast/CPythonPyc_test
cpython/241_test_normalization.py
20
2579
from test.test_support import verbose, TestFailed, TestSkipped, verify import sys import os from unicodedata import normalize TESTDATAFILE = "NormalizationTest-3.2.0" + os.extsep + "txt" # This search allows using a build directory just inside the source # directory, and saving just one copy of the test data in the s...
gpl-3.0
waheedahmed/edx-platform
openedx/core/djangoapps/user_api/course_tag/tests/test_api.py
14
1402
""" Test the user course tag API. """ from django.test import TestCase from student.tests.factories import UserFactory from nose.plugins.attrib import attr from openedx.core.djangoapps.user_api.course_tag import api as course_tag_api from opaque_keys.edx.locations import SlashSeparatedCourseKey @attr('shard_2') clas...
agpl-3.0
johankaito/fufuka
microblog/flask/venv/lib/python2.7/site-packages/kombu/tests/transport/test_sqlalchemy.py
30
2249
from __future__ import absolute_import from kombu import Connection from kombu.tests.case import Case, SkipTest, patch class test_sqlalchemy(Case): def setUp(self): try: import sqlalchemy # noqa except ImportError: raise SkipTest('sqlalchemy not installed') def test...
apache-2.0
petrutlucian94/nova_dev
nova/virt/cpu.py
3
3154
# 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
aldian/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/shape_test.py
102
27699
# 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
Gaia3D/QGIS
python/plugins/fTools/fTools.py
10
22480
# -*- coding: utf-8 -*- #----------------------------------------------------------- # # fTools # Copyright (C) 2008-2011 Carson Farmer # EMAIL: carson.farmer (at) gmail.com # WEB : http://www.ftools.ca/fTools.html # # A collection of data management and analysis tools for vector data # #-----------------------------...
gpl-2.0
nortikin/sverchok
old_nodes/viewer_bmesh.py
2
14938
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
gpl-3.0
GroestlCoin/electrum-grs
electrum_grs/gui/kivy/uix/gridview.py
41
6337
from kivy.uix.boxlayout import BoxLayout from kivy.adapters.dictadapter import DictAdapter from kivy.adapters.listadapter import ListAdapter from kivy.properties import ObjectProperty, ListProperty, AliasProperty from kivy.uix.listview import (ListItemButton, ListItemLabel, CompositeListItem, ...
gpl-3.0
ducminhkhoi/PrecipitationPrediction
main.py
1
12789
from __future__ import division import numpy as np import pandas as pd # import matplotlib as mpl # mpl.use('Agg') import matplotlib.pyplot as plt # plt.close('all') # Global variables train_data = [] train_labels = [] test_data = [] test_labels = [] list_features = [] X = [] Y = [] station = [] # Control mode var...
apache-2.0
joeythesaint/yocto-autobuilder
lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/trial/test/test_test_visitor.py
90
2282
from twisted.trial import unittest from twisted.trial.runner import TestSuite, suiteVisit pyunit = __import__('unittest') class MockVisitor(object): def __init__(self): self.calls = [] def __call__(self, testCase): self.calls.append(testCase) class TestTestVisitor(unittest.TestCase): ...
gpl-2.0
preinh/gmpe-smtk
smtk/hazard/conditional_simulation.py
1
9142
#!/usr/bin/env/python """ Example of conditional simulation of ground motion fields with the OQ-hazardlib """ import numpy as np from collections import OrderedDict from shapely import wkt from openquake.hazardlib.geo.point import Point from openquake.hazardlib.geo.surface import PlanarSurface from openquake.hazardli...
agpl-3.0
alexlo03/ansible
lib/ansible/utils/module_docs_fragments/netconf.py
29
3145
# # # 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 t...
gpl-3.0
greenoaktree/MissionPlanner
Lib/xml/sax/xmlreader.py
53
13013
"""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. XML...
gpl-3.0
blrm/openshift-tools
scripts/cloudhealth/cloudhealth.py
6
8849
# Copyright 2017 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 writing, so...
apache-2.0
alanjw/GreenOpenERP-Win-X86
python/Lib/site-packages/reportlab/lib/xmllib.py
3
26617
# A parser for XML, using the derived class as static DTD. # Author: Sjoerd Mullender. # sgmlop support added by fredrik@pythonware.com (May 19, 1998) __version__=''' $Id: xmllib.py 3660 2010-02-08 18:17:33Z damian $ ''' __doc__='''From before xmllib was in the Python standard library. Probably ought to be rem...
agpl-3.0
freshbooks/limbo
limbo/plugins/weather.py
8
1301
# -*- coding: utf-8 -*- """!weather <zip or place name> return the 5-day forecast""" try: from urllib import quote except ImportError: from urllib.request import quote import re import requests import time # http://openweathermap.org/weather-conditions iconmap = { "01": ":sunny:", "02": ":partly_sunny...
mit
zhangyage/Python-oldboy
day05/mysql_study/checkMySQL.py
1
1869
#!/usr/bin/python #coding: utf-8 # import sys import os import getopt import MySQLdb import logging dbhost='localhost' dbport=3306 dbuser='monitor' dbpassword='m0n1tor' def checkMySQL(): global dbhost global dbport global dbuser global dbpassword shortargs='h:P:' opts, args=getopt....
apache-2.0
n-west/gnuradio
gr-utils/python/modtool/templates.py
15
20594
# # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # #...
gpl-3.0
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/boto-2.38.0/boto/ec2/elb/listener.py
152
3377
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software wi...
mit
a-doumoulakis/tensorflow
tensorflow/contrib/learn/python/learn/preprocessing/categorical_vocabulary.py
63
4206
# 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
gitprouser/appengine-bottle-skeleton
lib/rsa/key.py
81
22867
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Un...
apache-2.0
pilou-/ansible
lib/ansible/modules/cloud/rackspace/rax_identity.py
151
2712
#!/usr/bin/python # Copyright: Ansible Project # 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
anthgur/servo
tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/edge.py
7
2706
from .base import Browser, ExecutorBrowser, require_arg from ..webdriver_server import EdgeDriverServer from ..executors import executor_kwargs as base_executor_kwargs from ..executors.executorselenium import (SeleniumTestharnessExecutor, SeleniumRefTestExecutor) from ..executo...
mpl-2.0
waytai/django
tests/settings_tests/tests.py
70
19848
import os import sys import unittest import warnings from types import ModuleType from django.conf import ENVIRONMENT_VARIABLE, LazySettings, Settings, settings from django.core.exceptions import ImproperlyConfigured from django.http import HttpRequest from django.test import ( SimpleTestCase, TestCase, Transactio...
bsd-3-clause
lafayette/JBTT
framework/python/Lib/bsddb/__init__.py
39
15689
#---------------------------------------------------------------------- # Copyright (c) 1999-2001, Digital Creations, Fredericksburg, VA, USA # and Andrew Kuchling. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following c...
mit
gptech/ansible
lib/ansible/modules/cloud/amazon/lambda.py
27
18948
#!/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
hocinebendou/bika.gsoc
bika/lims/browser/supplyorderfolder.py
5
2872
from bika.lims import bikaMessageFactory as _ from bika.lims.browser.bika_listing import BikaListingView from bika.lims.utils import t from operator import itemgetter from plone.app.layout.globals.interfaces import IViewView from zope.interface import implements class SupplyOrderFolderView(BikaListingView): impl...
mit
joone/chromium-crosswalk
tools/telemetry/third_party/webpagereplay/third_party/dns/rdtypes/nsbase.py
248
2995
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation 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 PROVIDED ...
bsd-3-clause
arenadata/ambari
ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/security.py
5
4780
# -*- coding: utf-8 -*- """ ambari_jinja2.testsuite.security ~~~~~~~~~~~~~~~~~~~~~~~~~ Checks the sandbox and other security features. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import os import time import tempfile import unittest from ambari_jinja2....
apache-2.0
orgito/ansible
lib/ansible/modules/network/fortios/fortios_webfilter_ips_urlfilter_cache_setting.py
7
7266
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2018 Fortinet, 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 Lic...
gpl-3.0
ammaritiz/pulp_puppet
pulp_puppet_plugins/pulp_puppet/plugins/distributors/installdistributor.py
2
16314
import errno from gettext import gettext as _ import logging import os import shutil import tarfile import tempfile from pulp.plugins.distributor import Distributor from pulp.server.controllers import repository as repo_controller from pulp.plugins.util.misc import get_parent_directory, mkdir from pulp_puppet.common ...
gpl-2.0
sgerhart/ansible
lib/ansible/constants.py
16
7696
# Copyright: (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os from ast import l...
mit
mdanielwork/intellij-community
python/lib/Lib/site-packages/django/contrib/messages/storage/fallback.py
627
2171
from django.contrib.messages.storage.base import BaseStorage from django.contrib.messages.storage.cookie import CookieStorage from django.contrib.messages.storage.session import SessionStorage class FallbackStorage(BaseStorage): """ Tries to store all messages in the first backend, storing any unstored mes...
apache-2.0
pymo/pymo
symbian/PythonForS60/module-repo/standard-modules/contextlib.py
91
4288
"""Utilities for with-statement contexts. See PEP 343.""" import sys __all__ = ["contextmanager", "nested", "closing"] class GeneratorContextManager(object): """Helper for @contextmanager decorator.""" def __init__(self, gen): self.gen = gen def __enter__(self): try: return...
mit
MaxTyutyunnikov/lino
obsolete/src/lino/apps/timings/timings_forms.py
1
1046
## Copyright 2005-2006 Luc Saffre ## This file is part of the Lino project. ## Lino is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later versio...
gpl-3.0
azunite/chrome_build
third_party/coverage/__init__.py
208
4505
"""Code coverage measurement for Python. Ned Batchelder http://nedbatchelder.com/code/coverage """ from coverage.version import __version__, __url__ from coverage.control import coverage, process_startup from coverage.data import CoverageData from coverage.cmdline import main, CoverageScript from coverage.misc impo...
bsd-3-clause
abhiQmar/servo
tests/wpt/web-platform-tests/tools/py/py/_path/svnwc.py
176
43848
""" svn-Command based Implementation of a Subversion WorkingCopy Path. SvnWCCommandPath is the main class. """ import os, sys, time, re, calendar import py import subprocess from py._path import common #----------------------------------------------------------- # Caching latest repository revision and repo-path...
mpl-2.0
jyotikamboj/container
dj-tests/dispatch/tests.py
8
6634
import gc import sys import time import unittest import weakref from types import TracebackType from django.dispatch import Signal, receiver if sys.platform.startswith('java'): def garbage_collect(): # Some JVM GCs will execute finalizers in a different thread, meaning # we need to wait for that ...
mit
xpansa/stock-logistics-workflow
picking_dispatch_wave/__openerp__.py
19
1680
# -*- coding: utf-8 -*- ############################################################################## # # Author: Alexandre Fayolle, Romain Deheele # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
agpl-3.0
dimaleks/uDeviceX
tests/common/hdf5_compare.py
1
1872
#!/usr/bin/env python3 """ Compare HDF5 files. """ import h5py import numpy as np def compare_pvs(*paths, rtol, ids_column='ids'): """Compare two or more dumps of a ParticleVector. The data is imported into numpy, sorted with respect to particle IDs and compared. Usage: ./hdf5_compare.py com...
gpl-3.0
jimsimon/sky_engine
mojo/devtools/common/android_gdb/session.py
2
10066
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Manages a debugging session with GDB. This module is meant to be imported from inside GDB. Once loaded, the |DebugSession| attaches GDB to a running Moj...
bsd-3-clause
googleapis/googleapis-gen
google/devtools/testing/v1/devtools-testing-v1-py/google/devtools/testing_v1/types/application_details.py
1
4338
# -*- 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
hynnet/openwrt-mt7620
staging_dir/host/lib/python2.7/lib-tk/test/test_tkinter/test_loadtk.py
129
1458
import os import sys import unittest from test import test_support from Tkinter import Tcl, TclError test_support.requires('gui') class TkLoadTest(unittest.TestCase): @unittest.skipIf('DISPLAY' not in os.environ, 'No $DISPLAY set.') def testLoadTk(self): tcl = Tcl() self.assertRaises(TclError...
gpl-2.0
dudepare/django
tests/custom_lookups/tests.py
177
22547
from __future__ import unicode_literals import contextlib import time import unittest from datetime import date, datetime from django.core.exceptions import FieldError from django.db import connection, models from django.test import TestCase, override_settings from django.utils import timezone from .models import Au...
bsd-3-clause
ahamilton55/ansible
lib/ansible/plugins/lookup/flattened.py
46
2482
# (c) 2013, Serge van Ginderachter <serge@vanginderachter.be> # # 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)...
gpl-3.0
spring-week-topos/horizon-week
openstack_dashboard/dashboards/admin/domains/urls.py
9
1089
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 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....
apache-2.0
drnextgis/QGIS
tests/src/python/test_qgscomposermapgrid.py
5
12664
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsComposerMap. .. 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 Software Foundation; either version 2 of the License, or (at your option) any later version. """ __a...
gpl-2.0
wrouesnel/ansible
lib/ansible/modules/cloud/amazon/ecs_attribute.py
72
10418
#!/usr/bin/python # Copyright: Ansible Project # 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
fishjord/gsutil
gslib/tests/test_logging.py
38
2924
# -*- coding: utf-8 -*- # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
apache-2.0
nagyistoce/edx-platform
common/lib/xmodule/xmodule/partitions/tests/test_partitions.py
9
15179
""" Test the partitions and partitions service """ from unittest import TestCase from mock import Mock from opaque_keys.edx.locations import SlashSeparatedCourseKey from stevedore.extension import Extension, ExtensionManager from xmodule.partitions.partitions import ( Group, UserPartition, UserPartitionError, No...
agpl-3.0
sam-tsai/django
scripts/manage_translations.py
277
7141
#!/usr/bin/env python # # This python file contains utility scripts to manage Django translations. # It has to be run inside the django git root directory. # # The following commands are available: # # * update_catalogs: check for new strings in core and contrib catalogs, and # output how much string...
bsd-3-clause
davidsoncolin/IMS
UI/GLMeshes.py
1
25019
#!/usr/bin/env python from OpenGL import GL from OpenGL.arrays import vbo from OpenGL.GL import shaders from PIL import Image import numpy as np import pyopencl as cl from GCore import State from UI import (COLOURS, DRAWOPT_DEFAULT, DRAWOPT_BONES, DRAWOPT_JOINTS, DRAWOPT_OFFSET, DRAWOPT_AXES, DRAWOPT_POINTS, DRA...
mit
katsikas/gnuradio
gr-uhd/swig/__init__.py
11
6322
# # Copyright 2010-2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version...
gpl-3.0
FNNDSC/cruntesting
launcher.py
1
6760
#!/usr/bin/env python ''' NAME launcher.py DESCRIPTION 'launcher.py' emulates the behaviour of a web-based launcher. This script will ssh to a remote host and execute the bash-based 'headnode.bash' script on that host. HISTORY 07 November 2014 o Initial design and coding. ''' ...
mit
vsoch/docfish
docfish/apps/api/urls.py
1
3245
''' Copyright (c) 2017 Vanessa Sochat 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, distribute...
mit
schumi2004/NOT_UPDATED_Sick-Beard-Dutch
sickbeard/processTV.py
1
15598
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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
zozo123/buildbot
master/buildbot/db/migrate/versions/023_increase_comments_property_lengths.py
3
1816
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-3.0
YoungjaeLee/linux-4.3-cxlbdev
scripts/gdb/linux/modules.py
774
2718
# # gdb helper commands and functions for Linux kernel debugging # # module tools # # Copyright (c) Siemens AG, 2013 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb from linux import cpus, utils module_type = utils.CachedType("str...
gpl-2.0
davidcusatis/horizon
openstack_dashboard/dashboards/identity/domains/constants.py
88
1055
# Copyright 2013 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
dpetzold/django
tests/template_backends/test_dummy.py
306
3603
# coding: utf-8 from __future__ import unicode_literals from django.forms import CharField, Form, Media from django.http import HttpRequest from django.middleware.csrf import CsrfViewMiddleware, get_token from django.template import TemplateDoesNotExist, TemplateSyntaxError from django.template.backends.dummy import ...
bsd-3-clause
mikelum/pyspeckit
examples/agn_example.py
3
5345
from __future__ import print_function # Test measurements class on an SDSS AGN spectrum import pyspeckit import astropy.units as u import numpy as np # Some lines Hbeta = 4862.721 OIIIa = 4960.295 OIIIb = 5008.239 NIIa = 6549.86 Halpha = 6564.614 NIIb = 6585.27 SIIa = 6718.29 SIIb = 6732.68 # Offsets between SII lin...
mit
batxes/4Cin
SHH_WT_models/SHH_WT_models_final_output_0.1_-0.1_11000/SHH_WT_models41149.py
4
17568
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
gpl-3.0
ktan2020/legacy-automation
win/Lib/cookielib.py
54
66246
"""HTTP cookie handling for web clients. This module has (now fairly distant) origins in Gisle Aas' Perl module HTTP::Cookies, from the libwww-perl library. Docstrings, comments and debug strings in this code refer to the attributes of the HTTP cookie system as cookie-attributes, to distinguish them clearly fr...
mit
tmatsuya/milkymist-ml401
cores/softusb/navre_regress/test_opcodes/test_SUB.py
5
3847
#! /usr/bin/env python ############################################################################### # # simulavr - A simulator for the Atmel AVR family of microcontrollers. # Copyright (C) 2001, 2002 Theodore A. Roth # # This program is free software; you can redistribute it and/or modify # it under the terms of th...
lgpl-3.0
HyperBaton/ansible
lib/ansible/modules/windows/win_group.py
52
1304
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2014, Chris Hoffman <choffman@chathamfinancial.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # this is a windows documentation stub. actual code lives in the .ps1 # file of the same name ANSIBLE_METADATA =...
gpl-3.0
auras76/32.1.A.1.163
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
pwnall/ansible-modules-core
web_infrastructure/htpasswd.py
28
8907
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Nimbis Services, Inc. # # 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
Thor77/youtube-dl
youtube_dl/extractor/iqiyi.py
18
12951
# coding: utf-8 from __future__ import unicode_literals import hashlib import itertools import re import time from .common import InfoExtractor from ..compat import ( compat_str, compat_urllib_parse_urlencode, ) from ..utils import ( clean_html, decode_packed_codes, get_element_by_id, get_elem...
unlicense
rananda/cfme_tests
cfme/tests/services/test_dynamicdd_dialogelement.py
1
3678
# -*- coding: utf-8 -*- import fauxfactory import pytest from cfme.services.catalogs.catalog_item import CatalogItem from cfme.automate.explorer.domain import DomainCollection from cfme.automate.service_dialogs import ServiceDialog from cfme.services.catalogs.catalog import Catalog from cfme.services.catalogs.service_...
gpl-2.0
zishell/shadowsocks
shadowsocks/server.py
652
4836
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
rstebbing/subdivision-regression
python/visualise_doosabin_regression.py
1
3303
########################################## # File: visualise_doosabin_regression.py # # Copyright Richard Stebbing 2015. # # Distributed under the MIT License. # # (See accompany file LICENSE or copy at # # http://opensource.org/licenses/MIT) # ########################################## # Imports ...
mit
candy7393/VTK
Filters/General/Testing/Python/testDataSetTriangleFilter.py
12
2303
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Create the RenderWindow, Renderer, and RenderWindowInteractor # ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.SetMultiSamples(0) renWin.AddRenderer(ren1) iren = vtk...
bsd-3-clause
jimi-c/ansible
lib/ansible/modules/network/illumos/dladm_etherstub.py
43
4160
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Adam Števko <adam.stevko@gmail.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
thesuperzapper/tensorflow
tensorflow/contrib/keras/python/keras/engine/__init__.py
58
1415
# 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
duongbaoduy/gtools
third_party/logilab/common/__init__.py
64
5103
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
bsd-3-clause
arskom/spyne
examples/arrays_simple_vs_complex.py
2
2995
#!/usr/bin/env python # encoding: utf8 # # Copyright © Burak Arslan <burak at arskom dot com dot tr>, # Arskom Ltd. http://www.arskom.com.tr # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
lgpl-2.1
openstack/nova
nova/tests/unit/virt/test_configdrive.py
2
2578
# Copyright 2014 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 by applicable law or agree...
apache-2.0