code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Simple unit test which makes various calls on the code generated model. Copyright 2007-2014 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt """ import pytest import omero import omero.clients from omero...
simleo/openmicroscopy
components/tools/OmeroPy/test/unit/test_model.py
Python
gpl-2.0
12,180
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # # 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 you...
SNoiraud/gramps
gramps/gen/filters/rules/family/_hasreltype.py
Python
gpl-2.0
2,354
import threading def worker(): """thread worker function""" print 'Worker' return threads = [] for i in range(5): t = threading.Thread(target=worker) threads.append(t) t.start()
arevaloarboled/Clases_2015
topics/threads/Examples/python/basic.py
Python
gpl-2.0
203
# -*- coding: utf-8 -*- # Copyright (C) 2010 Holoscopio Tecnologia # Author: Marcelo Jorge Vieira <metal@holoscopio.com> # Author: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as pu...
offlinehacker-playground/sltv
sltv/input/xinput.py
Python
gpl-2.0
2,132
# -*- coding: utf-8 -*- """ *==LICENSE==* CyanWorlds.com Engine - MMOG client, server and tools Copyright (C) 2011 Cyan Worlds, 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...
zrax/moul-scripts
Python/xLinkingBookDefs.py
Python
gpl-3.0
29,706
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.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 ANS...
thaumos/ansible
lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py
Python
gpl-3.0
97,131
# -*- 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 import os import json import pytest import sys from nose.plugins.skip i...
trondhindenes/ansible
test/units/modules/network/f5/test_bigip_trunk.py
Python
gpl-3.0
4,616
from test import test_support import unittest import codecs import sys, StringIO class Queue(object): """ queue: write bytes at one end, read bytes from the other end """ def __init__(self): self._buffer = "" def write(self, chars): self._buffer += chars def read(self, size=-1...
mancoast/CPythonPyc_test
cpython/242_test_codecs.py
Python
gpl-3.0
27,615
# -*- coding: utf-8 -*- ############################################################################## # # Author Joel Grand-Guillaume. Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
charbeljc/account-financial-tools
account_constraints/__openerp__.py
Python
agpl-3.0
2,620
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RAffxparser(RPackage): """Affymetrix File Parsing SDK Package for parsing Affymetr...
LLNL/spack
var/spack/repos/builtin/packages/r-affxparser/package.py
Python
lgpl-2.1
1,484
# Copyright (c) 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 requi...
yanheven/neutron
neutron/tests/tempest/common/credentials.py
Python
apache-2.0
2,822
from temboo.Library.Amazon.Marketplace.Orders.GetOrder import GetOrder, GetOrderInputSet, GetOrderResultSet, GetOrderChoreographyExecution from temboo.Library.Amazon.Marketplace.Orders.GetServiceStatus import GetServiceStatus, GetServiceStatusInputSet, GetServiceStatusResultSet, GetServiceStatusChoreographyExecution fr...
jordanemedlock/psychtruths
temboo/core/Library/Amazon/Marketplace/Orders/__init__.py
Python
apache-2.0
1,089
#!/usr/bin/env python # # Copyright 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. """Re-runs initial_sharding.py with a varbinary keyspace_id.""" from vtdb import keyrange_constants import base_sharding import initial_shar...
theskyinflames/bpulse-go-client
vendor/github.com/youtube/vitess/test/initial_sharding_bytes.py
Python
apache-2.0
553
# -*- coding: iso-8859-15 -*- # -*- Mode: Python; py-ident-offset: 4 -*- # vim:ts=4:sw=4:et # Copyright (c) M�rio Morgado # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retai...
yasharmaster/scancode-toolkit
src/packagedcode/pyrpm/rpm.py
Python
apache-2.0
10,566
#!/usr/bin/env python # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file ...
yanheven/glance
glance/cmd/registry.py
Python
apache-2.0
2,684
from ez_setup import use_setuptools use_setuptools() from setuptools import setup import versioneer import os def main(): this_directory = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(this_directory, 'README.rst'), 'r') as f: long_description = f.read() cmdclass = versioneer....
alubbock/pysb
setup.py
Python
bsd-2-clause
2,077
# -*- coding: utf-8 -*- """The ants module provides basic functions for interfacing with ants functions. Change directory to provide relative paths for doctests >>> import os >>> filepath = os.path.dirname( os.path.realpath( __file__ ) ) >>> datadir = os.path.realpath(os.path.join(filepath, '../testing/dat...
mick-d/nipype
nipype/interfaces/c3.py
Python
bsd-3-clause
1,785
#!/usr/bin/env python # # Copyright 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, th...
2coding/Codec
thirdparty/gtest-1.6.0/test/gtest_catch_exceptions_test.py
Python
bsd-3-clause
9,532
# coding = utf-8 __author__ = 'Forec' import xlwt import re book = xlwt.Workbook(encoding = 'utf-8', style_compression=0) sheet = book.add_sheet('student',cell_overwrite_ok = True) line = 0 info = re.compile(r'\"(\d+)\" : \"(.*?)\"') with open('city.txt',"r") as f: data = f.read() for x in info.findall(data): ...
luoxufeiyan/python
Forec/0015/0015.py
Python
mit
410
import ftplib import os import time import deepchem def main(): ftp = ftplib.FTP("ftp.ncbi.nih.gov") ftp.login("anonymous", "anonymous") # First download all SDF files. We need these to get smiles ftp.cwd("/pubchem/Compound/CURRENT-Full/SDF") data_dir = deepchem.utils.get_data_dir() sdf_dir = os.path.joi...
lilleswing/deepchem
contrib/pubchem_dataset/download_pubchem_ftp.py
Python
mit
1,644
#!/usr/bin/env python # This file is part of the OpenMV project. # Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com> # This work is licensed under the MIT license, see the file LICENSE for # details. """This module implements enough functionality to program the STM32F4xx over DFU, without requiring d...
glennrub/micropython
tools/pydfu.py
Python
mit
20,108
# encoding: utf-8 import sys import pytest class TestPasteCapture: @pytest.fixture def pastebinlist(self, monkeypatch, request): pastebinlist = [] plugin = request.config.pluginmanager.getplugin('pastebin') monkeypatch.setattr(plugin, 'create_new_paste', pastebinlist.append) re...
malinoff/pytest
testing/test_pastebin.py
Python
mit
3,847
import os import tempfile from tests.compat import unittest from evelink.cache.shelf import ShelveCache class ShelveCacheTestCase(unittest.TestCase): def setUp(self): self.cache_dir = tempfile.mkdtemp() self.cache_path = os.path.join(self.cache_dir, 'shelf') self.cache = ShelveCache(self...
bastianh/evelink
tests/cache/test_shelve.py
Python
mit
815
# =========================================================================== # eXe # Copyright 2004-2005, University of Auckland # Copyright 2004-2008 eXe Project, http://eXeLearning.org/ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as ...
kohnle-lernmodule/exe201based
exe/export/pages.py
Python
gpl-2.0
8,659
__author__ = 'Maximilian Bisani' __version__ = '$LastChangedRevision: 1691 $' __date__ = '$LastChangedDate: 2011-08-03 15:38:08 +0200 (Wed, 03 Aug 2011) $' __copyright__ = 'Copyright (c) 2004-2005 RWTH Aachen University' __license__ = """ This program is free software; you can redistribute it and/or modify...
KaranKamath/SequiturG2P
symbols.py
Python
gpl-2.0
2,130
# # Authors: # Pavel Brezina <pbrezina@redhat.com> # # Copyright (C) 2017 Red Hat # # 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 yo...
fidencio/sssd
src/sbus/codegen/sbus_Introspection.py
Python
gpl-3.0
9,617
import Orange iris = Orange.data.Table("iris") rndind = Orange.data.sample.SubsetIndices2(iris, p0=0.8) train = iris.select(rndind, 0) test = iris.select(rndind, 1) knn = Orange.classification.knn.kNNLearner(train, k=10) for i in range(5): instance = test.random_example() print instance.getclass(), knn(instan...
jlegendary/orange
docs/reference/rst/code/knnExample1.py
Python
gpl-3.0
324
""" start a gui for a binary lennard jones cluster. All that is really needed to start a gui is define a system and call run_gui system = BLJCluster(natoms, ntypeA) run_gui(system) """ import sys from PyQt4 import QtGui from pele.systems import BLJCluster from pele.gui import run_gui from _blj_dialog impo...
kjs73/pele
examples/gui/bljsystem.py
Python
gpl-3.0
2,178
from django.contrib import admin from .models import Permission, Role, BookRole, BookSkeleton admin.site.register(Permission) admin.site.register(Role) admin.site.register(BookRole) admin.site.register(BookSkeleton)
eos87/Booktype
lib/booktype/apps/core/admin.py
Python
agpl-3.0
217
# -*- coding: utf-8 -*- # This file is part of pygal # # A python svg graph plotting library # Copyright © 2012-2015 Kozea # # 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...
supracd/pygal
pygal/maps/__init__.py
Python
lgpl-3.0
813
#!/usr/bin/env python3 # Copyright 2013-2014 The Meson development team # 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...
amaniak/meson
depfixer.py
Python
apache-2.0
10,688
# Copyright (C) 2014, Hitachi, Ltd. # # 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...
hybrid-storage-dev/cinder-fs-111t-hybrid-cherry
volume/drivers/hitachi/hbsd_iscsi.py
Python
apache-2.0
16,385
# Copyright 2013-2015 Blockbridge Networks, 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 appl...
Hybrid-Cloud/cinder
cinder/volume/drivers/blockbridge.py
Python
apache-2.0
21,860
# Copyright 2015 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 required by applicable law or a...
ivano666/tensorflow
tensorflow/python/kernel_tests/bitcast_op_test.py
Python
apache-2.0
2,305
# # 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...
apache/incubator-airflow
tests/providers/google/cloud/operators/test_dataflow_system.py
Python
apache-2.0
14,915
# 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...
HybridF5/tempest_debug
tempest/services/orchestration/json/orchestration_client.py
Python
apache-2.0
16,844
# Copyright 2014: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
gluke77/rally
rally/plugins/common/sla/outliers.py
Python
apache-2.0
4,530
from __future__ import nested_scopes import traceback import os try: from urllib import quote except: from urllib.parse import quote # @UnresolvedImport import inspect from _pydevd_bundle.pydevd_constants import IS_PY3K import sys from _pydev_bundle import pydev_log def save_main_module(file, module_name):...
asedunov/intellij-community
python/helpers/pydev/_pydevd_bundle/pydevd_utils.py
Python
apache-2.0
7,871
# 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...
ChrisHirsch/robotframework
src/robot/running/usererrorhandler.py
Python
apache-2.0
1,478
# All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
aplanas/rally
tests/unit/plugins/openstack/scenarios/ceilometer/test_utils.py
Python
apache-2.0
13,257
# Copyright 2017 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...
tensorflow/tensorflow
tensorflow/python/grappler/cost_analyzer_test.py
Python
apache-2.0
6,685
# -*- coding:utf-8 -*- # Copyright 2015 NEC Corporation. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License...
haizawa/odenos
src/test/python/org/o3project/odenos/core/component/network/flow/basic/test_flow_action.py
Python
apache-2.0
1,561
"""Tests for futures.py.""" import concurrent.futures import threading import unittest import unittest.mock import asyncio from asyncio import test_utils def _fakefunc(f): return f class FutureTests(unittest.TestCase): def setUp(self): self.loop = test_utils.TestLoop() asyncio.set_event_l...
bslatkin/pycon2014
lib/asyncio-0.4.1/tests/test_futures.py
Python
apache-2.0
11,378
# Copyright 2017 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...
benoitsteiner/tensorflow-opencl
tensorflow/contrib/eager/python/datasets.py
Python
apache-2.0
3,562
# All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software #...
afaheem88/tempest_neutron
tempest/api/image/v2/test_images_tags_negative.py
Python
apache-2.0
1,715
# -*- coding: utf-8 -*- # Copyright (c) 2013, Roboterclub Aachen e.V. # All Rights Reserved. # # The file is part of the xpcc library and is released under the 3-clause BSD # license. See the file `LICENSE` for the full license governing this code. class ParameterDB: """ Parameter Data Base Manages Parameters """ ...
dergraaf/xpcc
tools/device_files/parameters.py
Python
bsd-3-clause
3,905
# -*- coding: UTF-8 -*- #------------------------------------------------------------------------------ # file: fields.py # License: LICENSE.TXT # Author: Ioannis Tziakos # # Copyright (c) 2011, Enthought, Inc. # All rights reserved. #------------------------------------------------------------------------------ i...
ContinuumIO/ashiba
enaml/docs/source/sphinxext/refactordoc/fields.py
Python
bsd-3-clause
8,370
# This file is part of Viper - https://github.com/viper-framework/viper # See the file 'LICENSE' for copying permission. import hashlib import zipfile from viper.common.abstracts import Module from viper.core.session import __sessions__ class Jar(Module): cmd = 'jar' description = 'Parse Java JAR archives' ...
cwtaylor/viper
viper/modules/jar.py
Python
bsd-3-clause
1,994
# -*- coding: utf-8 -*- #------------------------------------------------------------------------- # drawElements Quality Program utilities # -------------------------------------- # # Copyright 2015 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use t...
endlessm/chromium-browser
third_party/angle/third_party/VK-GL-CTS/src/scripts/khr_util/format.py
Python
bsd-3-clause
3,242
import collections from django.conf import settings from django.contrib.auth.models import User, Group from django.core.cache import cache from django.contrib import messages from django.shortcuts import render, redirect from django.db import transaction from django.db.models import Q from funfactory.urlresolvers imp...
zofuthan/airmozilla
airmozilla/manage/views/users.py
Python
bsd-3-clause
3,960
from __future__ import division, print_function, unicode_literals # This code is so you can run the samples without installing the package import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) # testinfo = "s, q" tags = "menu, menu_valign, menu_halign" from pyglet import image from p...
vyscond/cocos
test/test_menu_centered.py
Python
bsd-3-clause
1,329
################################################################################ # Copyright (C) 2015 Surfacingx # # # # This Program is free software; you can redistribute it and/or modify ...
repotvsupertuga/tvsupertuga.repository
script.module.projectx.wizard/resources/libs/downloader.py
Python
gpl-2.0
3,248
# # regexes.py: anaconda regular expressions # # Copyright (C) 2013 Red Hat, Inc. All rights reserved. # # 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 # (...
cgwalters/anaconda
pyanaconda/regexes.py
Python
gpl-2.0
7,533
#!/usr/bin/env python # -*- coding: utf-8 -*- # generated by wxGlade 0.6.3 on Fri Dec 16 03:13:38 2011 import wx, wx.richtext, wx.grid, wx.lib.intctrl import sys, os, re # Climb the tree to find out where we are p = os.path.abspath(__file__) t = "" while t != "src": (p, t) = os.path.split(p) if p == "": ...
VerifiableRobotics/LTLMoP
src/lib/configEditor.py
Python
gpl-3.0
64,636
import sqlite3 conn = sqlite3.connect('spider.sqlite') cur = conn.cursor() cur.execute('''UPDATE Pages SET new_rank=1.0, old_rank=0.0''') conn.commit() cur.close() print "All pages set to a rank of 1.0"
shril/PageRank
spreset.py
Python
gpl-3.0
207
## ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2012 Bert Vermeulen <bert@biot.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 2 of the Lice...
DreamSourceLab/DSView
libsigrokdecode4DSL/decoders/edid/__init__.py
Python
gpl-3.0
1,316
""" Generic framework path manipulation """ import re __all__ = ["framework_info"] _STRICT_FRAMEWORK_RE = re.compile( r"""(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>[-_A-Za-z0-9]+).framework/ (?:Versions/(?P<version>[^/]+)/)? (?P=shortname) (?:_(?P<suffix>[^_]+))? )$ """ ) def framew...
etherkit/OpenBeacon2
macos/venv/lib/python3.8/site-packages/macholib/framework.py
Python
gpl-3.0
1,125
""" Helper Methods """ import six def _get_key(key_or_id, key_cls): """ Helper method to get a course/usage key either from a string or a key_cls, where the key_cls (CourseKey or UsageKey) will simply be returned. """ return ( key_cls.from_string(key_or_id) if isinstance(key_or_id,...
ESOedX/edx-platform
lms/djangoapps/utils.py
Python
agpl-3.0
368
"""Views for items (modules).""" from __future__ import absolute_import import hashlib import logging from uuid import uuid4 from datetime import datetime from pytz import UTC import json from collections import OrderedDict from functools import partial from static_replace import replace_static_urls from xmodule_modi...
jazkarta/edx-platform-for-isc
cms/djangoapps/contentstore/views/item.py
Python
agpl-3.0
49,511
""" Database models for the LTI provider feature. This app uses migrations. If you make changes to this model, be sure to create an appropriate migration file and check it in at the same time as your model changes. To do that, 1. Go to the edx-platform dir 2. ./manage.py lms schemamigration lti_provider --auto "descr...
JCBarahona/edX
lms/djangoapps/lti_provider/models.py
Python
agpl-3.0
5,760
# -*- 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...
pedrobaeza/odoo
addons/mrp_byproduct/mrp_byproduct.py
Python
agpl-3.0
8,828
__author__ = 'dehora'
dehora/parsel
plymouth/__init__.py
Python
apache-2.0
22
"""Provides functionality to interact with image processing services.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.const import ATTR_ENTITY_ID, ATTR_NAME, CONF_ENTITY_ID, CONF_NAME from homeassistant.core import callback from homeassistant.exceptions impo...
tboyce021/home-assistant
homeassistant/components/image_processing/__init__.py
Python
apache-2.0
6,082
import gzip import io import docker from docker import auth from .api_test import BaseAPIClientTest, fake_request, url_prefix class BuildTest(BaseAPIClientTest): def test_build_container(self): script = io.BytesIO('\n'.join([ 'FROM busybox', 'RUN mkdir -p /tmp/test', ...
vpetersson/docker-py
tests/unit/api_build_test.py
Python
apache-2.0
5,217
# # 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, software # distributed under ...
apache/aurora
src/test/python/apache/aurora/client/cli/test_cron.py
Python
apache-2.0
8,687
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: dan@reciprocitylabs.com # Maintained By: dan@reciprocitylabs.com EXTENSIONS = ['ggrc_workflows']
hyperNURb/ggrc-core
src/ggrc_workflows/settings/development.py
Python
apache-2.0
270
from twisted.internet import defer from twisted.trial import unittest from twisted.trial import runner, reporter, util from twisted.trial.test import detests class TestSetUp(unittest.TestCase): def _loadSuite(self, klass): loader = runner.TestLoader() r = reporter.TestResult() s = loader.l...
nlloyd/SubliminalCollaborator
libs/twisted/trial/test/test_deferred.py
Python
apache-2.0
8,003
try: import thread except ImportError: import _thread as thread thread.start_new_thread(lambda: 42, ()) x = 1000000 while True: y = x z = x + 1 x = z + 1
DinoV/PTVS
Python/Tests/TestData/DebuggerProject/InfiniteRunThreadingInited.py
Python
apache-2.0
177
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc.converters import errors from integration.ggrc import converters class TestBasicCsvImport(converters.TestCase): def setUp(self): converters.TestCase.setUp(self) self.client.get("/login...
NejcZupec/ggrc-core
test/integration/ggrc/converters/test_import_delete.py
Python
apache-2.0
744
"""Python module which parses and emits TOML. Released under the MIT license. """ from toml import encoder from toml import decoder __version__ = "0.10.2" _spec_ = "0.5.0" load = decoder.load loads = decoder.loads TomlDecoder = decoder.TomlDecoder TomlDecodeError = decoder.TomlDecodeError TomlPreserveCommentDecoder...
ruchee/vimrc
vimfiles/bundle/vim-python/submodules/toml/toml/__init__.py
Python
mit
723
#!/usr/bin/env python """ This package is intentionally empty. The \ifpdf command is implemented in the TeX/Primitives package. """
nibrahim/PlasTeX
plasTeX/Packages/ifpdf.py
Python
mit
135
#!/usr/bin/env python3 class ColorText: # Reset reset = '\033[0m' # Text Reset # Regular Colors black = '\033[30m' # black red = '\033[31m' # red green = '\033[32m' # green yellow = '\033[33m' # yellow blue = '\033[34m' # blue purple = '\...
nickjhathaway/mongodbExp
scripts/pyUtils/color_text.py
Python
gpl-2.0
3,148
import sys from gnucash import * from gnucash import _sw_app_utils from gnucash import _sw_core_utils from gnucash._sw_core_utils import gnc_prefs_is_extra_enabled, gnc_prefs_is_debugging_enabled from gi import require_version require_version('Gtk', '3.0') from gi.repository import Gtk import os sys.path.append(os.pat...
muehlburger/gnucash
gnucash/python/init.py
Python
gpl-2.0
4,709
#!/usr/bin/env python # -*- coding: utf-8 -*- # Script takes a CSV list of users and does a 'bulk' insertion into mysql. # # Copyright (C) 2009 Simone Piccardi # # 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...
skamayker/docker_mail
postfixadmin/ADDITIONS/import_users_from_csv.py
Python
gpl-2.0
6,787
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
alexlo03/ansible
lib/ansible/modules/cloud/google/gcp_storage_bucket_access_control.py
Python
gpl-3.0
12,479
# (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...
wfxiang08/ansible
lib/ansible/plugins/callback/__init__.py
Python
gpl-3.0
6,672
import argparse parser = argparse.ArgumentParser() parser.add_argument("--interactive", action="store_true") args = parser.parse_args() import trajoptpy import openravepy as rave import numpy as np import json import trajoptpy.math_utils as mu import trajoptpy.kin_utils as ku def move_arm_to_grasp(xyz_targ, quat_tar...
DeadSocks/trajopt
unmaintained_examples/grasp_approach.py
Python
bsd-2-clause
2,369
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import cint def execute(filters=None): if not filters: filters ={} days_since_last_order = filters.get("days_...
gangadhar-kadam/nassimapp
selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.py
Python
agpl-3.0
1,985
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Nicira Networks, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apac...
oeeagle/quantum
neutron/plugins/nicira/extensions/maclearning.py
Python
apache-2.0
1,838
#!/usr/bin/python # # Copyright 2011 LightKeeper 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 l...
matiasherranz/keyczar
python/tests/keyczar_tests/util_test.py
Python
apache-2.0
7,078
# Lint as: python3 # Copyright 2020 The Bazel 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 requir...
twitter-forks/bazel
tools/ctexplain/types_test.py
Python
apache-2.0
2,530
# # epydoc -- HTML output generator # Edward Loper # # Created [01/30/01 05:18 PM] # $Id: html.py 1812 2009-02-03 21:31:04Z edloper $ # """ The HTML output generator for epydoc. The main interface provided by this module is the L{HTMLWriter} class. @todo: Add a cache to L{HTMLWriter.url()}? """ __docformat__ = 'epyt...
yencarnacion/jaikuengine
vendor/epydoc/docwriter/html.py
Python
apache-2.0
145,214
from django.utils.encoding import smart_unicode def ssn_check_digit(value): "Calculate Italian social security number check digit." ssn_even_chars = { '0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': 6, 'H': 7, ...
rebost/django
django/contrib/localflavor/it/util.py
Python
bsd-3-clause
1,800
# 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. """Environment setup and teardown for remote devices.""" import logging import os import random import sys from pylib import constants from pylib.base impo...
jaruba/chromium.src
build/android/pylib/remote/device/remote_device_environment.py
Python
bsd-3-clause
6,592
""" Test cdflib functions versus mpmath, if available. The following functions still need tests: - ncfdtr - ncfdtri - ncfdtridfn - ncfdtridfd - ncfdtrinc - nbdtrik - nbdtrin - nrdtrimn - nrdtrisd - pdtrik - nctdtr - nctdtrit - nctdtridf - nctdtrinc """ from __future__ import division, print_function, absolute_import...
surhudm/scipy
scipy/special/tests/test_cdflib.py
Python
bsd-3-clause
11,339
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
scheib/chromium
third_party/blink/tools/blinkpy/tool/mock_tool.py
Python
bsd-3-clause
1,739
#!/usr/bin/env python2.7 from PyQt4 import QtCore, QtGui class MigrationWizardIntroPage(QtGui.QWizardPage): def __init__(self): super(QtGui.QWizardPage, self).__init__() self.setTitle("Migrating configuration") label = QtGui.QLabel("This wizard will help you to migrate your configuration. ...
timothyparez/PyBitmessage
src/bitmessageqt/migrationwizard.py
Python
mit
2,437
######################################################################## # # File Name: HTMLTextAreaElement # # ### This file is automatically generated by GenerateHtml.py. ### DO NOT EDIT! """ WWW: http://4suite.com/4DOM e-mail: support@4suite.com Copyright (c) 2000 Fourthought Inc, USA. All Ri...
alanjw/GreenOpenERP-Win-X86
python/Lib/site-packages/_xmlplus/dom/html/HTMLTextAreaElement.py
Python
agpl-3.0
4,989
# 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.page import page as page_module from telemetry.page import shared_page_state from telemetry import story class KeySearchMobilePage(page_modul...
js0701/chromium-crosswalk
tools/perf/page_sets/key_search_mobile.py
Python
bsd-3-clause
2,523
########################################################################## # # Copyright (c) 2013, Image Engine Design 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: # # * Redistrib...
appleseedhq/gaffer
python/GafferUI/BackdropUI.py
Python
bsd-3-clause
4,084
## @file # This file is used to define a class object to describe a package # # Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which accompanies this # distribution. The...
carmark/vbox
src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/UPT/Object/POM/PackageObject.py
Python
gpl-2.0
5,091
#!/usr/bin/env python """FAQ wizard bootstrap.""" # This is a longer version of the bootstrap script given at the end of # faqwin.py; it prints timing statistics at the end of the regular CGI # script's output (so you can monitor how it is doing). # This script should be placed in your cgi-bin directory and made # e...
teeple/pns_server
work/install/Python-2.7.4/Tools/faqwiz/faqw.py
Python
gpl-2.0
1,086
#!/usr/bin/env python from nose.tools import * import networkx as nx from networkx.algorithms.components import biconnected from networkx import NetworkXNotImplemented def assert_components_equal(x,y): sx = set((frozenset([frozenset(e) for e in c]) for c in x)) sy = set((frozenset([frozenset(e) for e in c]) fo...
jni/networkx
networkx/algorithms/components/tests/test_biconnected.py
Python
bsd-3-clause
6,615
import sys if sys.version_info < (3, 7): from ._opacity import OpacityValidator from ._color import ColorValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] ...
plotly/python-api
packages/python/plotly/plotly/validators/histogram/unselected/marker/__init__.py
Python
mit
325
# ---------------------------------------------------------------------------- # Copyright 2015 Nervana Systems 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.o...
chetan51/neon
neon/layers/__init__.py
Python
apache-2.0
1,116
########################################################################## # # Copyright (c) 2011, Image Engine Design 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: # # * Redistribu...
code-google-com/cortex-vfx
contrib/IECoreArnold/python/IECoreArnold/__init__.py
Python
bsd-3-clause
1,852
# -*- coding: utf-8 -*- # # Inv Unit Tests # # To run this script use: # python web2py.py -S eden -M -R applications/eden/modules/unit_tests/s3db/inv.py # import unittest import datetime from gluon import * from gluon.storage import Storage from unit_tests import run_suite # =========================================...
flavour/eden
modules/unit_tests/s3db/inv.py
Python
mit
1,041
from sympy.integrals.transforms import (mellin_transform, inverse_mellin_transform, laplace_transform, inverse_laplace_transform, fourier_transform, inverse_fourier_transform, sine_transform, inverse_sine_transform, cosine_transform, inverse_cosine_transform, hankel_transform, inverse_hankel_transfo...
wolfram74/numerical_methods_iserles_notes
venv/lib/python2.7/site-packages/sympy/integrals/tests/test_transforms.py
Python
mit
31,213
from blue import *
phalax4/CarnotKE
jyhton/tests/java/org/python/indexer/data/pkg/other/color/bleu.py
Python
apache-2.0
19
# Copyright 2015 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 required by applicable law or a...
Avinash-Raj/appengine-django-skeleton
todo/tests.py
Python
bsd-3-clause
692