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
ros2/rosidl
rosidl_adapter/test/test_cli_extensions.py
1
2779
# Copyright 2021 Open Source Robotics Foundation, 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...
apache-2.0
ThiagoGarciaAlves/erpnext
erpnext/stock/doctype/item_attribute/item_attribute.py
17
1275
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe import _ class ItemAttribute(Document): def validate(self): self.valid...
agpl-3.0
glogiotatidis/oneanddone
oneanddone/users/urls.py
3
1193
# 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/. from django.conf.urls import patterns, url from oneanddone.users import views urlpatterns = patterns('', url(r'^lo...
mpl-2.0
seandavi/pelican-plugins
better_figures_and_images/better_figures_and_images.py
21
3057
""" Better Figures & Images ------------------------ This plugin: - Adds a style="width: ???px; height: auto;" to each image in the content - Also adds the width of the contained image to any parent div.figures. - If RESPONSIVE_IMAGES == True, also adds style="max-width: 100%;" - Corrects alt text: if alt == imag...
agpl-3.0
huoxudong125/poedit
deps/boost/tools/build/test/core_parallel_actions.py
45
1595
#!/usr/bin/python # Copyright 2006 Rene Rivera. # Copyright 2011 Steven Watanabe # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) import BoostBuild t = BoostBuild.Tester(pass_toolset=0, pass_d0=False) t.write("sleep.bat", ...
mit
aerler/GeoPy
src/plotting/figure.py
1
25914
''' Created on Dec 11, 2014 A custom Figure class that provides some specialized functions and uses a custom Axes class. @author: Andre R. Erler, GPL v3 ''' # external imports from warnings import warn from matplotlib.figure import Figure, SubplotBase, subplot_class_factory import numpy as np # internal imports from...
gpl-3.0
guineawheek/spock
spock/mcmap/smpmap.py
1
7569
""" Used for storing map data Chunks are packed in X, Z, Y order The array walks down X, every 16 elements you enter a new Z-level ex. [0] - [15] are X = 0-15, Z = 0, Y = 0 [16] - [31] are X = 0-15, Z = 1, Y = 0 and so on Every 256 elements you enter a new Y-level ex. [0]-[255] are X = 0-15, Z = 0-15, Y = 0 [256]-[51...
mit
inclement/vispy
vispy/util/wrappers.py
6
5398
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ Some wrappers to avoid circular imports, or make certain calls easier. The idea of a 'global' vispy.use function is that although vispy.app and vispy.gloo.gl can be used i...
bsd-3-clause
viru/ansible-modules-core
web_infrastructure/django_manage.py
55
11331
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Scott Anderson <scottanderson42@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 o...
gpl-3.0
brchiu/tensorflow
tensorflow/tools/git/gen_git_source.py
7
11652
# 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
egonw/citeulike
plugins/python/daum.py
2
2165
#!/usr/bin/env python # coding: utf-8 # Fetch EndNote citation from Daum reference search # Seo Sanghyeon import re, urllib, sys import socket socket.setdefaulttimeout(15) def url_to_docid(url): match = re.search(r'ref.daum.net/item/(\d+)', url) if match: return int(match.group(1)) def grab_enw(do...
bsd-3-clause
Kraxi/YTplaylist
venv/Lib/site-packages/jinja2/filters.py
329
30115
# -*- coding: utf-8 -*- """ jinja2.filters ~~~~~~~~~~~~~~ Bundled jinja filters. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import math from random import choice from operator import itemgetter from itertools import groupby from jinja2.utils...
gpl-2.0
mikeboers/PyHAML
haml/codegen.py
2
3818
from itertools import chain import cgi import collections import re from six import string_types from six.moves import xrange from . import runtime class GeneratorSentinal(object): def __init__(self, **kwargs): self.__dict__.update(**kwargs) def __repr__(self): if hasattr(self,...
bsd-3-clause
Bioeden/dbMayaTextureToolkit
mttProxy.py
1
3324
# Python import import re import os # PySide import from PySide.QtCore import Qt from PySide.QtGui import QSortFilterProxyModel # Maya import from maya import cmds # custom import from mttConfig import ( MTTSettings, NODE_NAME, NODE_REFERENCE, FILE_STATE, NODE_FILE) class MTTProxy(QSortFilterProxyModel): def ...
mit
lucas-flowers/snutree
examples/custom/custom_module.py
1
2077
from itertools import product from voluptuous import Schema, Required, Coerce from snutree.utilities.voluptuous import NonEmptyString from snutree.tree import Member def to_Members(dicts, **conf): Class.initialize_names(conf['start_year'], conf['last_year'] + 1) yield from (SubMember.from_dict(dct) for dct in ...
gpl-3.0
IronLanguages/ironpython2
Src/StdLib/Lib/test/test_htmlparser.py
45
25329
"""Tests for HTMLParser.py.""" import HTMLParser import pprint import unittest from test import test_support class EventCollector(HTMLParser.HTMLParser): def __init__(self): self.events = [] self.append = self.events.append HTMLParser.HTMLParser.__init__(self) def get_events(self): ...
apache-2.0
savoirfairelinux/django
django/utils/six.py
73
30502
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 Benjamin Peterson # # 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 with...
bsd-3-clause
coyiotis/py_nms_snmp
agent/snmpagent.py
1
7640
from pysnmp.carrier.asynsock.dispatch import AsynsockDispatcher from pysnmp.carrier.asynsock.dgram import udp, udp6 from pyasn1.codec.ber import encoder, decoder from pysnmp.proto import api import time, bisect from mon_stats import getDiskSpace, getRAMinfo, getCPUuse, getHostname class SysDescr: name = (1,3,6,1,2...
mit
ClaudioGranatiero/ClyphX_CG
ClyphX/ClyphXTriggers.py
1
12830
""" # Copyright (C) 2013-2015 Stray <stray411@hotmail.com> # # 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 your option) any later version. # ...
gpl-2.0
skycucumber/Messaging-Gateway
webapp/venv/lib/python2.7/site-packages/sqlalchemy/dialects/mssql/pymssql.py
10
2978
# mssql/pymssql.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mssql+pymssql :name: pymssql :dbapi: pymssql :connects...
gpl-2.0
noahwilliamsson/micropython
tests/extmod/uctypes_native_le.py
59
2037
# This test is exactly like uctypes_le.py, but uses native structure layout. # Codepaths for packed vs native structures are different. This test only works # on little-endian machine (no matter if 32 or 64 bit). import sys import uctypes if sys.byteorder != "little": print("SKIP") sys.exit() desc = { "s...
mit
shsingh/netmiko
netmiko/cisco/cisco_wlc_ssh.py
3
5415
"""Netmiko Cisco WLC support.""" from __future__ import print_function from __future__ import unicode_literals import time from netmiko.base_connection import BaseConnection class CiscoWlcSSH(BaseConnection): """Netmiko Cisco WLC support.""" def special_login_handler(self, delay_factor=1): ''' ...
mit
steveandroulakis/mytardis
tardis/tardis_portal/metsstruct.py
2
2585
''' A module which holds the METS structure objects. The objects here are lightweight as they only keep metadata keys (IDs) instead of the actual metadata values. .. moduleauthor:: Gerson Galang <gerson.galang@versi.edu.au> ''' import logging logger = logging.getLogger(__name__) class Experiment(): def __in...
bsd-3-clause
madan96/sympy
sympy/physics/quantum/tests/test_qapply.py
95
4141
from sympy import I, Integer, sqrt, symbols from sympy.physics.quantum.anticommutator import AntiCommutator from sympy.physics.quantum.commutator import Commutator from sympy.physics.quantum.constants import hbar from sympy.physics.quantum.dagger import Dagger from sympy.physics.quantum.gate import H from sympy.physic...
bsd-3-clause
Voluntarynet/BitmessageKit
BitmessageKit/Vendor/static-python/Lib/test/test_whichdb.py
91
1799
#! /usr/bin/env python """Test script for the whichdb module based on test_anydbm.py """ import os import test.test_support import unittest import whichdb import glob _fname = test.test_support.TESTFN # Silence Py3k warning anydbm = test.test_support.import_module('anydbm', deprecated=True) def _delete_files(): ...
mit
arista-eosplus/ansible
contrib/inventory/windows_azure.py
64
11151
#!/usr/bin/env python ''' Windows Azure external inventory script ======================================= Generates inventory that Ansible can understand by making API request to Windows Azure using the azure python library. NOTE: This script assumes Ansible is being executed where azure is already installed. p...
gpl-3.0
GuilhermeGSousa/ardupilot
Tools/LogAnalyzer/tests/TestAutotune.py
265
4748
from LogAnalyzer import Test,TestResult import DataflashLog # from ArduCopter/defines.h AUTOTUNE_INITIALISED = 30 AUTOTUNE_OFF = 31 AUTOTUNE_RESTART = 32 AUTOTUNE_SUCCESS = 33 AUTOTUNE_FAILED = 34 AUTOTUNE_REACHED_LIMIT = 35 AUTOTUNE_PILOT_TESTING = 36 AUTOTUN...
gpl-3.0
anchore/anchore-engine
tests/functional/services/api/archives/conftest.py
1
3484
import pytest from tests.functional.services.api.conftest import USER_API_CONFS from tests.functional import get_logger from tests.functional.services.api.images import ( wait_for_image_to_analyze, get_image_id, get_image_digest, ) from tests.functional.services.utils.http_utils import ( http_post, ...
apache-2.0
gdementen/xlwings
xlwings/tests/udfs/udf_tests.py
1
16102
from datetime import datetime, date import sys if sys.version_info >= (2, 7): from nose.tools import assert_dict_equal import xlwings as xw try: import numpy as np from numpy.testing import assert_array_equal def nparray_equal(a, b): try: assert_array_equal(a, b) except Asse...
bsd-3-clause
modulexcite/blink
LayoutTests/http/tests/websocket/invalid-encode-length_wsh.py
42
1134
import re import struct from mod_pywebsocket import common def web_socket_do_extra_handshake(request): pass def web_socket_transfer_data(request): match = re.search(r'\?case=(\d+_\d+)$', request.ws_resource) if match is None: msgutil.send_message(request, 'FAIL: Query value is incorrect or missi...
bsd-3-clause
kleetus/bitcoin
qa/rpc-tests/rawtransactions.py
25
5874
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test re-org scenarios with a mempool that contains transactions # that spend (directly or indirectly)...
mit
alu042/edx-platform
cms/djangoapps/contentstore/management/commands/import.py
62
2085
""" Script for importing courseware from XML format """ from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django_comment_common.utils import (seed_permissions_roles, are_permissions_roles_seeded) from xmodule.modulestore.xml...
agpl-3.0
geimer/easybuild-framework
easybuild/scripts/port_easyblock.py
3
14161
#!/usr/bin/env python ## # Copyright 2009-2014 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the He...
gpl-2.0
nanoporetech/nanonet
nanonet/caller_2d/align_kmers.py
1
9549
import numpy as np from math import log import pkg_resources from nanonet.util import all_kmers, kmers_to_annotated_sequence from nanonet.caller_2d.pair_align.pair_align import Aligner def _load_substitution_matrix(fname): """ Loads an unwrapped representation of a substitution matrix. :param fname: Fil...
mpl-2.0
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/django-1.8.2/tests/template_tests/filter_tests/test_pluralize.py
430
1200
from decimal import Decimal from django.template.defaultfilters import pluralize from django.test import SimpleTestCase class FunctionTests(SimpleTestCase): def test_integers(self): self.assertEqual(pluralize(1), '') self.assertEqual(pluralize(0), 's') self.assertEqual(pluralize(2), 's')...
mit
rajashreer7/autotest-client-tests
linux-tools/hmaccalc/hmaccalc.py
4
1413
#!/bin/python import os, subprocess import logging from autotest.client import test from autotest.client.shared import error class hmaccalc(test.test): """ Autotest module for testing basic functionality of hmaccalc @author Athira Rajeev <atrajeev@in.ibm.com> ## """ ...
gpl-2.0
wakermahmud/docker-registry
depends/docker-registry-core/docker_registry/core/lru.py
35
3504
# -*- coding: utf-8 -*- # Copyright (c) 2014 Docker. # # 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
MonamAgarwal/final
GTG/backends/backend_launchpad.py
2
14890
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Getting Things GNOME! - a personal organizer for the GNOME desktop # Copyright (c) 2008-2013 - Lionel Dricot & Bertrand Rousseau # # This program is free software: you can redistribute it and/or modify it under # t...
gpl-3.0
balazssimon/ml-playground
udemy/lazyprogrammer/deep-reinforcement-learning-python/mountaincar/pg_tf_random.py
1
6813
import gym import os import sys import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from gym import wrappers from datetime import datetime from q_learning import plot_running_avg, FeatureTransformer # so you can test different architectures class HiddenLayer: def __init__(self, M1, M2, f=tf.n...
apache-2.0
neurodata/ndgrutedb
MR-OCP/MROCPdjango/computation/executors/run_csc_to_graphml_on_dir.py
2
1874
#!/usr/bin/env python # Copyright 2014 Open Connectome Project (http://openconnecto.me) # # 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 # #...
apache-2.0
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/eggs/kombu-3.0.13-py2.7.egg/kombu/transport/__init__.py
23
3667
""" kombu.transport =============== Built-in transports. """ from __future__ import absolute_import from kombu.five import string_t from kombu.syn import _detect_environment from kombu.utils import symbol_by_name def supports_librabbitmq(): if _detect_environment() == 'default': try: import...
gpl-3.0
ff94315/hiwifi-openwrt-HC5661-HC5761
staging_dir/host/lib/python2.7/os2emxpath.py
192
4603
# Module 'os2emxpath' -- common operations on OS/2 pathnames """Common pathname manipulations, OS/2 EMX version. Instead of importing this module directly, import os and refer to this module as os.path. """ import os import stat from genericpath import * from ntpath import (expanduser, expandvars, isabs, islink, spli...
gpl-2.0
LABSN/expyfun
examples/stimuli/simple_video.py
2
1083
# -*- coding: utf-8 -*- """ ========================= Video playing made simple ========================= This shows how to play a video file in expyfun. It requires that FFmpeg (for Pyglet >= 1.4) or AVBin (otherwise) has already been installed. @author: drmccloy """ from expyfun import (ExperimentController, fetch...
bsd-3-clause
aristanetworks/arista-ovs-quantum
quantum/tests/unit/test_auth.py
8
3998
import unittest import webob from quantum import auth class QuantumKeystoneContextTestCase(unittest.TestCase): def setUp(self): super(QuantumKeystoneContextTestCase, self).setUp() @webob.dec.wsgify def fake_app(req): self.context = req.environ['quantum.context'] ...
apache-2.0
tmc/django-smart-serializers
smart_serializers/python.py
1
5055
""" A Python "serializer". Doesn't do much serializing per se -- just converts to and from basic Python data types (lists, dicts, strings, etc.). Useful as a basis for other serializers. """ from django.conf import settings from django.db import models from django.core.exceptions import ValidationError from django.cor...
bsd-2-clause
Tisseo/navitia
source/jormungandr/tests/proxy_realtime_tests.py
2
21938
# coding=utf-8 # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility an...
agpl-3.0
ntuecon/server
pyenv/Lib/site-packages/django/contrib/admin/migrations/0001_initial.py
419
1958
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.contrib.admin.models from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('conten...
bsd-3-clause
JavaRabbit/CS496_capstone
appengine/standard/Capstone_inPython/reportlab/pdfbase/pdfutils.py
3
9884
#Copyright ReportLab Europe Ltd. 2000-2017 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/pdfbase/pdfutils.py __version__='3.3.0' __doc__='' # pdfutils.py - everything to do with images, streams, # compression, and some constants import sys...
apache-2.0
jacegem/lotto-store
lib/future/backports/email/quoprimime.py
82
10923
# Copyright (C) 2001-2006 Python Software Foundation # Author: Ben Gertzfield # Contact: email-sig@python.org """Quoted-printable content transfer encoding per RFCs 2045-2047. This module handles the content transfer encoding method defined in RFC 2045 to encode US ASCII-like 8-bit data called `quoted-printable'. It...
apache-2.0
sirpercival/kivy
doc/sources/conf.py
9
6233
# -*- coding: utf-8 -*- # # Kivy documentation build configuration file, created by # sphinx-quickstart on Wed Jan 21 22:37:12 2009. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleable...
mit
pletzer/three.js
utils/converters/ctm/join_ctm.py
399
2521
"""Join multiple binary files into single file and generate JSON snippet with offsets ------------------------------------- How to use ------------------------------------- python join_ctm.py -i "part_*.ctm" -o joined.ctm [-j offsets.js] Will read multiple files following wildcard pattern (ordered lexicographically)...
mit
wilebeast/FireFox-OS
B2G/gecko/media/webrtc/trunk/tools/gyp/test/cflags/gyptest-cflags.py
74
1559
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies build of an executable with C++ define specified by a gyp define, and the use of the environment during regeneration when the g...
apache-2.0
upsuper/servo
tests/wpt/mozilla/tests/webgl/tools/import-conformance-tests.py
18
5368
#!/usr/bin/env python import os import subprocess import sys import tempfile import shutil import bisect import argparse KHRONOS_REPO_URL = "https://github.com/KhronosGroup/WebGL.git" # Patches for conformance tests 1.0.x PATCHES_1X = [ ("js-test-pre.patch", "resources/js-test-pre.js"), ("unit.patch", "confor...
mpl-2.0
denny820909/builder
lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/names/test/test_names.py
6
33926
# -*- test-case-name: twisted.names.test.test_names -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases for twisted.names. """ import socket, operator, copy from StringIO import StringIO from twisted.trial import unittest from twisted.internet import reactor, defer, error from...
mit
mchaparro/intercambios
intercambios/migrations/0002_update_regalos.py
1
7638
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding unique constraint on 'Regalo', fields ['opcion_regalo'] db.create_unique(u'intercambios_regalo', ['...
apache-2.0
letconex/MMT
cli/mmt/cluster.py
1
23223
import json as js import logging import multiprocessing import os import random import subprocess import tempfile import time import requests import cli from cli import mmt_javamain, IllegalArgumentException from cli.libs import fileutils, daemon, shell from cli.mmt import BilingualCorpus, TMXCorpus, FileParallelCorp...
apache-2.0
eblade/images4
images/database.py
1
3169
#!/usr/bin/env python3 import os, logging, threading from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.schema import CreateTable import hashlib FILENAME = 'images.db' module_local = threading.local() module_local.engin...
mit
jendap/tensorflow
tensorflow/python/data/experimental/ops/stats_aggregator.py
4
3361
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
sinkuri256/python-for-android
python-modules/twisted/twisted/web/tap.py
49
8523
# Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Support for creating a service which runs a web server. """ import os # Twisted Imports from twisted.web import server, static, twcgi, script, demo, distrib, wsgi from twisted.internet import interfaces, reactor from twisted.python...
apache-2.0
ClimbsRocks/scikit-learn
sklearn/feature_extraction/tests/test_dict_vectorizer.py
110
3768
# Authors: Lars Buitinck # Dan Blanchard <dblanchard@ets.org> # License: BSD 3 clause from random import Random import numpy as np import scipy.sparse as sp from numpy.testing import assert_array_equal from sklearn.utils.testing import (assert_equal, assert_in, assert_false...
bsd-3-clause
sawyerhanlon/Picture
picture.py
1
1913
""" picture.py Author: Sawyer Hanlon Credit: J.C. Assignment: Use the ggame library to "paint" a graphical picture of something (e.g. a house, a face or landscape). Use at least: 1. Three different Color objects. 2. Ten different Sprite objects. 3. One (or more) RectangleAsset objects. 4. One (or more) CircleAsset o...
mit
open-power-ref-design-toolkit/opsmgr
opsmgr/inventory/rack_mgr.py
2
13937
# Copyright 2016, IBM US, 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...
apache-2.0
Epirex/android_external_chromium_org
chrome/common/extensions/docs/server2/datastore_models.py
86
1191
# 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 cPickle import traceback from appengine_wrappers import db # A collection of the data store models used throughout the server. # These values are gl...
bsd-3-clause
geminateCoder/Character-Archive-Website
Lib/site-packages/passlib/tests/test_hosts.py
6
3922
"""test passlib.hosts""" #============================================================================= # imports #============================================================================= from __future__ import with_statement # core import logging; log = logging.getLogger(__name__) import warnings # site # pkg fro...
cc0-1.0
ff94315/hiwifi-openwrt-HC5661-HC5761
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/test/test_profile.py
133
8031
"""Test suite for the profile module.""" import sys import pstats import unittest from StringIO import StringIO from test.test_support import run_unittest import profile from test.profilee import testfunc, timer class ProfileTest(unittest.TestCase): profilerclass = profile.Profile methodnames = ['print_sta...
gpl-2.0
cloudera/hue
desktop/libs/indexer/src/indexer/tests.py
2
4201
#!/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
CS-SI/QGIS
python/plugins/processing/algs/saga/SagaNameDecorator.py
11
8711
# -*- coding: utf-8 -*- """ *************************************************************************** SagaGroupNameDecorator.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ****************...
gpl-2.0
ProfessionalIT/professionalit-webiste
sdk/google_appengine/lib/rsa/rsa/transform.py
216
6848
# -*- 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
lgpl-3.0
ramoslin02/TeamTalk
win-client/3rdParty/src/json/scons-tools/targz.py
264
3055
"""tarball Tool-specific initialization for tarball. """ ## Commands to tackle a command based implementation: ##to unpack on the fly... ##gunzip < FILE.tar.gz | tar xvf - ##to pack on the fly... ##tar cvf - FILE-LIST | gzip -c > FILE.tar.gz import os.path import SCons.Builder import SCons.Node.FS import SCons.Ut...
apache-2.0
cc272309126/panda3d
direct/src/interval/SoundInterval.py
8
6591
"""SoundInterval module: contains the SoundInterval class""" __all__ = ['SoundInterval'] from panda3d.core import * from panda3d.direct import * from direct.directnotify.DirectNotifyGlobal import * import Interval import random class SoundInterval(Interval.Interval): # Name counter soundNum = 1 # create ...
bsd-3-clause
endlessm/chromium-browser
third_party/llvm/lldb/test/API/commands/gui/basic/TestGuiBasic.py
1
2168
""" Test that the 'gui' displays the help window and basic UI. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test.lldbpexpect import PExpectTest class BasicGuiCommandTest(PExpectTest): mydir = TestBase.compute_mydir(__file__) # PExpect uses many...
bsd-3-clause
endlessm/chromium-browser
third_party/catapult/telemetry/telemetry/internal/actions/play_unittest.py
1
5056
# 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. from telemetry import decorators from telemetry.internal.actions import play from telemetry.testing import tab_test_case import py_utils AUDIO_1_PLAYING_C...
bsd-3-clause
sabi0/intellij-community
python/helpers/python-skeletons/lettuce/terrain.py
28
1530
# coding=utf-8 """ Lettuce terrain hooks: http://lettuce.it/reference/terrain.html """ __author__ = 'Ilya.Kazakevich' class __When(object): @staticmethod def all(function): """ Runs before/after all features, scenarios and steps """ pass @staticmethod def each_step(fun...
apache-2.0
pyokagan/gyp
test/win/gyptest-link-subsystem.py
239
1241
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Make sure subsystem setting is extracted properly. """ import TestGyp import sys if sys.platform == 'win32': test = TestGyp.TestGyp...
bsd-3-clause
popazerty/bh1
lib/python/Screens/About.py
1
3139
from Screen import Screen from Components.ActionMap import ActionMap from Components.Sources.StaticText import StaticText from Components.Harddisk import harddiskmanager from Components.NimManager import nimmanager from Components.About import about import os from Tools.DreamboxHardware import getFPVersion class Abou...
gpl-2.0
kaporzhu/stock
companies/models.py
2
2486
# -*- coding: utf-8 -*- from django.core.cache import cache from django.db import models import requests class Company(models.Model): name = models.CharField(max_length=128) symbol = models.CharField(max_length=8, db_index=True) code = models.CharField(max_length=16, db_index=True) @property def...
mit
tonk/ansible
test/support/network-integration/collections/ansible_collections/vyos/vyos/plugins/module_utils/network/vyos/argspec/interfaces/interfaces.py
47
2109
# Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ############################################# # WARNING # ############################################# # # This file is auto generated by the resource # module bu...
gpl-3.0
DevKhater/YallaWebSite
vendor/sonata-project/admin-bundle/Resources/doc/conf.py
77
7893
# -*- coding: utf-8 -*- # # IoC documentation build configuration file, created by # sphinx-quickstart on Fri Mar 29 01:43:00 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All con...
mit
bpatyi/simpleCRM
crm/abstracts.py
1
3370
import phonenumbers from django.db import models from base.abstracts import ( AbstractBaseModel, CleanableModel ) from crm.enums import ( Gender, FamilyStatus, EducationLevel, EntityType ) from django_countries.fields import CountryField class AbstractCompanyModel(AbstractBaseModel): na...
mit
Nowheresly/odoo
addons/procurement/__openerp__.py
267
2661
# -*- 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
svn2github/libtorrent-rasterbar-trunk
examples/run_benchmarks.py
11
14923
import sys import os import resource import shutil import shlex import time import subprocess import random import signal import hashlib # this is a disk I/O benchmark script. It runs menchmarks # over different filesystems, different cache sizes and # different number of peers (can be used to find a reasonable # rang...
bsd-3-clause
windedge/odoo
addons/gamification/models/res_users.py
386
4010
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
agpl-3.0
shaufi10/odoo
addons/hr/hr.py
65
20401
# -*- 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
Azure/azure-sdk-for-python
sdk/translation/azure-ai-translation-document/samples/async_samples/sample_list_translations_with_filters_async.py
1
3301
# coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ """ FILE: sample_list_translations_with_filters_async.py DESCRIPTION: This sample demonstrates how to list all the submitted translation operations ...
mit
bstell/TachyFont
run_time/src/gae_server/third_party/old-fonttools-master/Lib/fontTools/ttLib/tables/otConverters.py
6
11751
from __future__ import print_function, division, absolute_import from fontTools.misc.py23 import * from fontTools.misc.textTools import safeEval from fontTools.misc.fixedTools import fixedToFloat as fi2fl, floatToFixed as fl2fi from .otBase import ValueRecordFactory def buildConverters(tableSpec, tableNamespace): ""...
apache-2.0
Mozta/pagina-diagnostijuego
venv/lib/python2.7/site-packages/django/test/signals.py
41
5724
import os import threading import time import warnings from django.apps import apps from django.core.signals import setting_changed from django.db import connections, router from django.db.utils import ConnectionRouter from django.dispatch import Signal, receiver from django.utils import timezone from django.utils.fun...
gpl-3.0
ryfeus/lambda-packs
Tensorflow_OpenCV_Nightly/source/tensorflow/python/ops/clip_ops.py
67
10704
# 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...
mit
dstockwell/blink
Tools/Scripts/webkitpy/layout_tests/port/android.py
6
61087
# Copyright (C) 2012 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 ...
bsd-3-clause
Brain888/OpenMineMods
Utils/Updater.py
1
2000
import shutil from PyQt5.QtCore import QThread, pyqtSignal from requests import get from os import path, makedirs, remove, listdir from sys import platform from zipfile import ZipFile from GUI.Downloader import FileDownloaderWindow from GUI.Strings import Strings from API.CurseAPI import CurseAPI from Utils.Utils im...
agpl-3.0
ZGainsforth/StoichiometryFitter
ConfigData/phase Carbon.py
1
1602
from __future__ import division __author__ = 'Zack Gainsforth' __copyright__ = 'Copyright 2017, Zack Gainsforth' __email__ = 'zsg@gainsforth.com' from numpy import * if __name__ != '__main__': import PhysicsBasics as pb def AnalyzePhase(AtPct=None, WtPct=None, OxWtPct=None, OByStoich=None): """ Carbon analys...
epl-1.0
double12gzh/nova
nova/keymgr/single_key_mgr.py
69
2539
# Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # 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/...
apache-2.0
BuildingLink/sentry
tests/sentry/models/test_release.py
1
5570
from __future__ import absolute_import from sentry.models import ( Commit, Group, GroupRelease, GroupResolution, Release, ReleaseCommit, ReleaseEnvironment, ReleaseProject ) from sentry.testutils import TestCase class MergeReleasesTest(TestCase): def test_simple(self): org = self.create_organiza...
bsd-3-clause
supergarotinho/ambari-mongodb
package/alerts/alert_shards_not_in_mongos_list.py
1
1397
#!/usr/bin/env python import logging import traceback import commands MONGODB_KEY = '{{mongodb}}' MONGOD_KEY = '{{mongod}}' MONGOCONF_KEY = '{{mongo-conf}}' MONGOS_KEY = '{{mongos}}' logger = logging.getLogger('ambari_alerts') def get_tokens(): """ Returns a tuple of tokens in the format {{site/property}} that ...
bsd-3-clause
blazek/QGIS
tests/src/python/test_qgslayoutitemcombobox.py
19
9461
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsLayoutItemComboBox .. 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. ...
gpl-2.0
Macemann/Georgetown-Capstone
app/Graph_stats.py
1
5030
''' Script to create Graph Statistics Statistics are dumped to disk for app ease __author__ = Ryan Stephany __purpose__ Georgetown Data Analytics ''' import os import pickle import networkx as nx import community import matplotlib.pyplot as plt from operator import itemgetter MODELS_PATH = os.path.join(os.path.a...
mit
vectorijk/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/mod_pywebsocket/_stream_base.py
652
5978
# Copyright 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...
mpl-2.0
aflaxman/pymc-cod-correct
src/tests.py
1
3462
""" Tests """ # matplotlib will open windows during testing unless you do the following import matplotlib matplotlib.use("AGG") import pylab as pl import pymc as mc import models reload(models) import data reload(data) import graphics reload(graphics) class TestClass: def setUp(self): self.X = data.sim_...
gpl-3.0
kasbah/sooperlooper
src/test_plugin/testdef_simple_state_after_record.py
2
2021
import time import testdef_simple_state from nose_parameterized import parameterized class simpleStateTestsAfterRecord(testdef_simple_state.simpleStateTest): def setUp(self): testdef_simple_state.simpleStateTest.setUp(self) self.engine.request("RECORD") self.engine.request("RECORD") d...
gpl-2.0
pamfilos/invenio
modules/bibfield/lib/functions/get_persistent_identifiers_keys.py
9
1825
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2013 CERN. ## ## Invenio 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) a...
gpl-2.0
TomoakiNagahara/wakatime-unity
Editor/WakaTime/client/wakatime/packages/pygments_py2/pygments/lexers/_mapping.py
29
45610
# -*- coding: utf-8 -*- """ pygments.lexers._mapping ~~~~~~~~~~~~~~~~~~~~~~~~ Lexer mapping definitions. This file is generated by itself. Everytime you change something on a builtin lexer definition, run this script from the lexers folder to update it. Do not alter the LEXERS dictionary by ha...
cc0-1.0