repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
nitzmahone/ansible
lib/ansible/modules/cloud/amazon/ecs_cluster.py
25
7340
#!/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
upliftaero/MissionPlanner
Lib/site-packages/numpy/polynomial/polytemplate.py
53
22374
""" Template for the Chebyshev and Polynomial classes. This module houses a Python string module Template object (see, e.g., http://docs.python.org/library/string.html#template-strings) used by the `polynomial` and `chebyshev` modules to implement their respective `Polynomial` and `Chebyshev` classes. It provides a m...
gpl-3.0
w1ll1am23/home-assistant
homeassistant/components/flume/__init__.py
4
2809
"""The flume integration.""" import asyncio from functools import partial import logging from pyflume import FlumeAuth, FlumeDeviceList from requests import Session from requests.exceptions import RequestException from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( CONF_CLIENT_I...
apache-2.0
mezz64/home-assistant
homeassistant/components/airly/sensor.py
7
3877
"""Support for the Airly sensor service.""" from homeassistant.const import ( ATTR_ATTRIBUTION, ATTR_DEVICE_CLASS, CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, CONF_NAME, DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_PRESSURE, DEVICE_CLASS_TEMPERATURE, PERCENTAGE, PRESSURE_HPA, TEMP_CELSIUS, ...
apache-2.0
c0defreak/python-for-android
python3-alpha/python3-src/Lib/subprocess.py
43
62224
# subprocess - Subprocesses with accessible I/O streams # # For more information about this module, see PEP 324. # # Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se> # # Licensed to PSF under a Contributor Agreement. # See http://www.python.org/2.4/license for licensing details. r"""subprocess - Subpr...
apache-2.0
madan96/sympy
sympy/utilities/tests/test_decorator.py
39
1243
from sympy.utilities.decorator import threaded, xthreaded from sympy import Eq, Matrix from sympy.abc import x, y from sympy.core.decorators import wraps def test_threaded(): @threaded def function(expr, *args): return 2*expr + sum(args) assert function(Matrix([[x, y], [1, x]]), 1, 2) == \ ...
bsd-3-clause
Yarichi/Proyecto-DASI
Malmo/Python_Examples/MazeRunner.py
1
9848
# ------------------------------------------------------------------------------------------------ # Copyright (c) 2016 Microsoft 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 Softw...
gpl-2.0
ApuliaSoftware/odoo
addons/anonymization/__openerp__.py
260
2129
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
ndwei97/data-byte1
lib/flask/wrappers.py
773
6709
# -*- coding: utf-8 -*- """ flask.wrappers ~~~~~~~~~~~~~~ Implements the WSGI wrappers (request and response). :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase from werkzeug.exce...
apache-2.0
efortuna/AndroidSDKClone
ndk_experimental/prebuilt/linux-x86_64/lib/python2.7/test/test_tarfile.py
36
58027
# -*- coding: iso-8859-15 -*- import sys import os import shutil import StringIO from hashlib import md5 import errno import unittest import tarfile from test import test_support # Check for our compression modules. try: import gzip gzip.GzipFile except (ImportError, AttributeError): gzip = None try: ...
apache-2.0
NaturalGIS/QGIS
tests/src/python/test_layer_dependencies.py
10
14386
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsSnappingUtils (complement to C++-based tests) .. 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 ...
gpl-2.0
zwb800/home-assistant
tests/util/test_dt.py
28
4481
""" tests.test_util ~~~~~~~~~~~~~~~~~ Tests Home Assistant date util methods. """ # pylint: disable=too-many-public-methods import unittest from datetime import datetime, timedelta import homeassistant.util.dt as dt_util TEST_TIME_ZONE = 'America/Los_Angeles' class TestDateUtil(unittest.TestCase): """ Tests ut...
mit
meetmangukiya/coala
tests/settings/SectionFillingTest.py
25
3734
import unittest from pyprint.ConsolePrinter import ConsolePrinter from coalib.bears.GlobalBear import GlobalBear from coalib.bears.LocalBear import LocalBear from coala_utils.ContextManagers import simulate_console_inputs from coalib.output.ConsoleInteraction import acquire_settings from coalib.output.printers.LogPri...
agpl-3.0
fengbeihong/tempest_automate_ironic
tempest/services/identity/v3/json/endpoints_client.py
10
3347
# 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
odejesush/tensorflow
tensorflow/python/training/training_util.py
22
3738
# 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
jviada/QuantEcon.py
quantecon/gridtools.py
6
2584
""" Filename: gridtools.py Authors: Pablo Winant Implements cartesian products and regular cartesian grids. """ import numpy from numba import njit def cartesian(nodes, order='C'): '''Cartesian product of a list of arrays Parameters: ----------- nodes: (list of 1d-arrays) order: ('C' or 'F') or...
bsd-3-clause
paaschpa/badcomputering
docutils/parsers/rst/languages/ru.py
6
5293
# $Id: ru.py 6460 2010-10-29 22:18:44Z milde $ # Author: Roman Suzi <rnd@onego.ru> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translated for each l...
bsd-3-clause
igemsoftware2017/USTC-Software-2017
biohub/abacus/views.py
1
1421
from rest_framework import views, permissions, parsers from rest_framework.exceptions import ValidationError from rest_framework.response import Response from .handlers import get_handler, query from .result import AbacusAsyncResult from .security import validate_signature class StartView(views.APIView): permiss...
gpl-3.0
be-cloud-be/horizon-addons
website/website_analytics_piwik/__openerp__.py
7
1455
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2015 Therp BV <http://therp.nl>. # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
agpl-3.0
Agana/MyBlogAgain
django/contrib/gis/gdal/prototypes/srs.py
321
3378
from ctypes import c_char_p, c_int, c_void_p, POINTER from django.contrib.gis.gdal.libgdal import lgdal, std_call from django.contrib.gis.gdal.prototypes.generation import \ const_string_output, double_output, int_output, \ srs_output, string_output, void_output ## Shortcut generation for routines with known p...
bsd-3-clause
cmtm/networkx
networkx/algorithms/shortest_paths/tests/test_generic.py
9
7280
from __future__ import division from nose.tools import assert_almost_equal from nose.tools import assert_equal from nose.tools import assert_false from nose.tools import assert_true from nose.tools import assert_raises from nose.tools import ok_ from nose.tools import raises import networkx as nx def validate_grid_...
bsd-3-clause
chrxr/wagtail
wagtail/wagtailcore/migrations/0031_add_page_view_restriction_types.py
5
1181
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-07 15:33 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auth', '0001_initial'), ('wagtailcore', '0030_index_on_pagerevision_created_at'), ...
bsd-3-clause
ar4s/django
tests/m2m_and_m2o/tests.py
5
2452
from django.db.models import Q from django.test import TestCase from .models import Issue, User, UnicodeReferenceModel class RelatedObjectTests(TestCase): def test_m2m_and_m2o(self): r = User.objects.create(username="russell") g = User.objects.create(username="gustav") i1 = Issue(num=1) ...
bsd-3-clause
wangwuli/autosvn
server/serversvn_develop.py
1
13384
#!/usr/bin/python # coding:utf-8 #211 #svn 目录为/var/svn 模式http:// 钩子网站目录为/var/usr/local/apache2/htdocs/ import socket, threading, os, re, MySQLdb, random import sys, os, time, atexit, string from signal import SIGTERM import ConfigParser class Daemon: def __init__(self, pidfile, stdin='/dev/null', stdout='/dev...
mit
joeyjojo/django_offline
src/django/contrib/gis/gdal/driver.py
411
2411
# prerequisites imports from ctypes import c_void_p from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import OGRException from django.contrib.gis.gdal.prototypes import ds as capi # For more information, see the OGR C API source code: # http://www.gdal.org/ogr/ogr__api_8h.html # # ...
mit
shakamunyi/ansible
lib/ansible/runner/action_plugins/set_fact.py
133
1754
# Copyright 2013 Dag Wieers <dag@wieers.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 later versio...
gpl-3.0
davidyezsetz/kuma
vendor/packages/ipython/IPython/Release.py
6
4136
# -*- coding: utf-8 -*- """Release data for the IPython project.""" #***************************************************************************** # Copyright (C) 2008-2009 The IPython Development Team # Copyright (C) 2001-2008 Fernando Perez <fperez@colorado.edu> # Copyright (c) 2001 Janko Hauser <...
mpl-2.0
emencia/emencia-django-bazar
bazar/utils/filefield.py
2
4553
# -*- coding: utf-8 -*- """ Utilitaires liés aux champs de fichiers dans les modèles de données """ from datetime import datetime as real_datetime from os import makedirs from os.path import basename, dirname, exists, isdir, join, splitext from django.conf import settings from django.utils.datetime_safe import strftim...
mit
jrversteegh/softsailor
deps/scipy-0.10.0b2/scipy/sparse/linalg/isolve/lsqr.py
3
17815
"""Sparse Equations and Least Squares. The original Fortran code was written by C. C. Paige and M. A. Saunders as described in C. C. Paige and M. A. Saunders, LSQR: An algorithm for sparse linear equations and sparse least squares, TOMS 8(1), 43--71 (1982). C. C. Paige and M. A. Saunders, Algorithm 583; LSQR: Sparse...
gpl-3.0
edison7500/django-leancloud-sms
leancloud/sms.py
1
2259
# coding=utf-8 import re import requests import json import logging from django.conf import settings from .exceptions import LeanCloudException, PhoneNumberException logger = logging.getLogger(__name__) headers = getattr(settings, 'LEANCLOUD_HEADERS') class LeanCloudSMS(object): cell_phone_match = re.compile('...
gpl-3.0
pyblish/pyblish-win
lib/Python27/Lib/encodings/cp875.py
593
13110
""" Python Character Mapping Codec cp875 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP875.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input...
lgpl-3.0
spanezz/egt
egtlib/commands.py
1
14169
import typing from typing import Type import egtlib from configparser import RawConfigParser from contextlib import contextmanager import os import datetime import sys import logging log = logging.getLogger(__name__) class CommandError(Exception): pass class Command: COMMANDS: typing.List[Type["Command"]] ...
gpl-3.0
lancezlin/ml_template_py
lib/python2.7/site-packages/nbconvert/filters/tests/test_markdown.py
6
6613
# coding: utf-8 """Tests for conversions from markdown to other formats""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import re from copy import copy from functools import partial from ipython_genutils.py3compat import string_types from ipython_genutils.testi...
mit
gjr80/weewx
bin/weeplot/utilities.py
2
24001
# # Copyright (c) 2009-2021 Tom Keffer <tkeffer@gmail.com> # # See the file LICENSE.txt for your full rights. # """Various utilities used by the plot package. """ from __future__ import absolute_import from __future__ import print_function from six.moves import zip try: from PIL import ImageFont, ImageColor...
gpl-3.0
pypot/scikit-learn
sklearn/preprocessing/tests/test_label.py
48
18419
import numpy as np from scipy.sparse import issparse from scipy.sparse import coo_matrix from scipy.sparse import csc_matrix from scipy.sparse import csr_matrix from scipy.sparse import dok_matrix from scipy.sparse import lil_matrix from sklearn.utils.multiclass import type_of_target from sklearn.utils.testing impor...
bsd-3-clause
biodrone/plex-desk
desk/flask/lib/python3.4/site-packages/tempita/__init__.py
17
39822
""" A small templating language This implements a small templating language. This language implements if/elif/else, for/continue/break, expressions, and blocks of Python code. The syntax is:: {{any expression (function calls etc)}} {{any expression | filter}} {{for x in y}}...{{endfor}} {{if x}}x{{elif y}}y...
mit
shoelzer/buildbot
master/buildbot/test/fake/pbmanager.py
10
1926
# 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-2.0
yapdns/yapdnsbeat
vendor/github.com/elastic/beats/winlogbeat/tests/system/test_wineventlog.py
2
10607
import sys import time import unittest from winlogbeat import WriteReadTest if sys.platform.startswith("win"): import win32evtlog import win32security """ Contains tests for reading from the Windows Event Log API (MS Vista and newer). """ @unittest.skipUnless(sys.platform.startswith("win"), "requires Window...
mit
i386x/doit
tests/test_text/test_fmt/test_format.py
1
26923
# -*- coding: utf-8 -*- #! \file ./tests/test_text/test_fmt/test_format.py #! \author Jiří Kučera, <sanczes@gmail.com> #! \stamp 2016-08-11 15:55:31 (UTC+01:00, DST+01:00) #! \project DoIt!: Tools and Libraries for Building DSLs #! \license MIT #! \version 0...
mit
xaxxon/v8toolkit
googletest/googlemock/test/gmock_test_utils.py
12
3664
# Copyright 2006, 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...
mit
tedder/ansible
lib/ansible/modules/monitoring/zabbix/zabbix_host_facts.py
13
7406
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) me@mimiko.me # 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', 'statu...
gpl-3.0
damiansoriano/odoo
addons/crm_partner_assign/__init__.py
364
1116
# -*- 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
shakakira/avplayer
libtorrent/parse_dht_rtt.py
41
1096
#! /usr/bin/env python import sys import os quantize = 100 max_rtt = 5000 f = open(sys.argv[1]) distribution = {} num_messages = 0 for i in range(0, max_rtt, quantize): distribution[i] = 0 for line in f: time = int(line.split('\t')[1]) if (time < 0 or time > max_rtt - quantize): continue num_messages += 1 tim...
gpl-3.0
danieljaouen/ansible
lib/ansible/plugins/cache/yaml.py
64
1905
# (c) 2017, Brian Coca # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' cache: yaml short_descriptio...
gpl-3.0
aliyun/oss-ftp
python27/win32/Tools/Scripts/pysource.py
94
3846
#!/usr/bin/env python """\ List python source files. There are three functions to check whether a file is a Python source, listed here with increasing complexity: - has_python_ext() checks whether a file name ends in '.py[w]'. - look_like_python() checks whether the file is not binary and either has the '.py[w]' e...
mit
koven2049/hdfs-cloudera-cdh3u3-production
src/contrib/hod/hodlib/Common/types.py
182
43056
#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 use thi...
apache-2.0
spmjc/plugin.video.freplay
resources/lib/channels/bfmtv.py
2
2866
#-*- coding: utf-8 -*- import urllib,urllib2 import json from datetime import datetime title=['BFM TV','BFM Business'] img=['bfmtv','bfmbusiness'] readyForUse=True urlToken={'bfmtv':'http://api.nextradiotv.com/bfmtv-android/4/', 'bfmbusiness':'http://api.nextradiotv.com/bfmbusiness-iphone/3/'} urlMenu={'bfmtv':'ht...
gpl-2.0
takeshineshiro/cinder
cinder/api/views/backups.py
7
3923
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # 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/LICEN...
apache-2.0
openhatch/oh-mainline
vendor/packages/Pygments/pygments/lexers/_robotframeworklexer.py
76
18600
# -*- coding: utf-8 -*- """ pygments.lexers._robotframeworklexer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexer for Robot Framework. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ # Copyright 2012 Nokia Siemens Networks Oyj # # License...
agpl-3.0
awkspace/ansible
test/units/modules/network/opx/opx_module.py
52
2604
# (c) 2018 Red Hat Inc. # # (c) 2018 Dell Inc. or its subsidiaries. All Rights Reserved. # # 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 Lic...
gpl-3.0
Cactuslegs/audacity-of-nope
lib-src/lv2/lilv/waflib/Scripting.py
63
10597
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,shlex,shutil,traceback,errno,sys,stat from waflib import Utils,Configure,Logs,Options,ConfigSet,Context,Errors,Build,Node build_dir_override=None no_climb_commands=[...
gpl-2.0
NEricN/RobotCSimulator
Python/App/Lib/site-packages/setuptools/dist.py
7
34239
__all__ = ['Distribution'] import re import os import sys import warnings import numbers import distutils.log import distutils.core import distutils.cmd import distutils.dist from distutils.core import Distribution as _Distribution from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, Distuti...
apache-2.0
omni5cience/django-inlineformfield
.tox/py27/lib/python2.7/site-packages/pip/_vendor/requests/structures.py
398
3575
# -*- coding: utf-8 -*- """ requests.structures ~~~~~~~~~~~~~~~~~~~ Data structures that power Requests. """ import os import collections from itertools import islice class IteratorProxy(object): """docstring for IteratorProxy""" def __init__(self, i): self.i = i # self.i = chain.from_iter...
mit
rwatson/chromium-capsicum
third_party/scons/scons-local/SCons/Subst.py
3
34882
"""SCons.Subst SCons string substitution. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software ...
bsd-3-clause
sudheesh001/oh-mainline
mysite/profile/management/commands/profile_ten_minutely_tasks.py
15
1170
# This file is part of OpenHatch. # Copyright (C) 2010 OpenHatch, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
agpl-3.0
tianzhihen/phantomjs
src/breakpad/src/tools/gyp/tools/pretty_gyp.py
148
4924
#!/usr/bin/env python # Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # This file pretty-prints the contents of a GYP file. import sys import re input = [] if len(sys.argv) > 1: input_f...
bsd-3-clause
dboonz/polymode
examples/ex7_birefringent_fiber.py
5
1761
from numpy import * from Polymode import * ## Waveguide Parameters: Nx=400,60 #number of radial & azimuthal points wl = 1.4 m0 = 1 ## Materials silica = Material.Silica() mhigh = Material.SiO2GeO2(0.25) #Silica with 20% Germania mlow = Material.SiO2Fl(0.011) #Silica with 1.1% Flourin...
gpl-3.0
ivanhorvath/openshift-tools
openshift/installer/vendored/openshift-ansible-3.9.40/roles/openshift_health_checker/test/logging_check_test.py
36
4908
import pytest import json from openshift_checks.logging.logging import LoggingCheck, MissingComponentPods, CouldNotUseOc task_vars_config_base = dict(openshift=dict(common=dict(config_base='/etc/origin'))) def canned_loggingcheck(exec_oc=None, execute_module=None): """Create a LoggingCheck object with canned ex...
apache-2.0
4shadoww/usploit
core/lib/requests/packages/chardet/constants.py
3008
1335
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
mit
PaddlePaddle/models
PaddleCV/tracking/pytracking/admin/environment.py
1
2051
import importlib import os class EnvSettings: def __init__(self): pytracking_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) self.results_path = '{}/tracking_results/'.format(pytracking_path) self.network_path = '{}/networks/'.format(pytracking_path) self.dat...
apache-2.0
antonok-edm/pmbootstrap
test/test_apk_static.py
2
5573
""" Copyright 2017 Oliver Smith This file is part of pmbootstrap. pmbootstrap 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. pmbootstrap ...
gpl-3.0
willcampbel/Sine-Cosine
ggame/sysdeps.py
227
1916
def module_exists(module_name): try: __import__(module_name) except ImportError: return False else: return True if module_exists('browser') and module_exists('javascript'): from browser import window, document from javascript import JSObject, JSConstructor GFX = JSObject(w...
mit
js0701/chromium-crosswalk
build/android/pylib/gtest/gtest_config.py
56
1489
# Copyright (c) 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. """Configuration file for android gtest suites.""" # Add new suites here before upgrading them to the stable list below. EXPERIMENTAL_TEST_SUITES = [ ...
bsd-3-clause
arush0311/coala
coalib/misc/Constants.py
18
4114
# -*- coding: utf-8 -*- import appdirs import os import re from coalib import VERSION THIS_IS_A_BUG = ('This is a bug. We are sorry for the inconvenience. ' 'Please contact the developers for assistance.') CRASH_MESSAGE = ('An unknown error occurred. This is a bug. We are ' 'sorry...
agpl-3.0
yeahwhat-mc/CloudBotLegacy
lib/tweepy/streaming.py
19
8363
# Tweepy # Copyright 2009-2010 Joshua Roesslein # See LICENSE for details. import httplib from socket import timeout from threading import Thread from time import sleep from tweepy.models import Status from tweepy.api import API from tweepy.error import TweepError from tweepy.utils import import_simplejson, urlencod...
gpl-3.0
pombredanne/bowerrecipe
bowerrecipe/__init__.py
2
1498
# -*- coding: utf-8 -*- import json import os import os.path import subprocess import zc.buildout class Recipe(object): def __init__(self, buildout, name, options): self.buildout, self.name, self.options = buildout, name, options if 'packages' not in options: raise zc.buildout.UserErr...
mit
lakshayg/tensorflow
tensorflow/python/kernel_tests/map_stage_op_test.py
36
21052
# 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...
apache-2.0
lakshayg/tensorflow
tensorflow/contrib/predictor/testing_common.py
93
4328
# 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
dewagter/paparazzi
sw/tools/calibration/calibrate_gyro.py
15
4623
#! /usr/bin/env python # Copyright (C) 2010 Antoine Drouin # # This file is part of Paparazzi. # # Paparazzi 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, or (at your option) # any later ...
gpl-2.0
gundalow/ansible-modules-extras
network/asa/asa_acl.py
11
7956
#!/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 distribut...
gpl-3.0
jy723/ardupilot
mk/PX4/Tools/gencpp/src/gencpp/__init__.py
214
9473
# Software License Agreement (BSD License) # # Copyright (c) 2011, Willow Garage, 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 ...
gpl-3.0
SlimDevs/kernel_lge_hammerhead
Documentation/target/tcm_mod_builder.py
4981
41422
#!/usr/bin/python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops...
gpl-2.0
campbe13/openhatch
vendor/packages/twisted/doc/core/benchmarks/deferreds.py
18
3990
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ See how fast deferreds are. This is mainly useful to compare cdefer.Deferred to defer.Deferred """ from twisted.internet import defer from timer import timeit benchmarkFuncs = [] def benchmarkFunc(iter, args=()): """ A decorator f...
agpl-3.0
bswartz/cinder
cinder/tests/unit/volume/drivers/netapp/dataontap/performance/test_perf_base.py
7
15420
# Copyright (c) 2016 Clinton Knight # 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...
apache-2.0
Pencroff/ai-hackathon-2017
Backend/venv/lib/python3.6/site-packages/wheel/test/test_tagopt.py
326
5927
""" Tests for the bdist_wheel tag options (--python-tag, --universal, and --plat-name) """ import sys import shutil import pytest import py.path import tempfile import subprocess SETUP_PY = """\ from setuptools import setup, Extension setup( name="Test", version="1.0", author_email="author@example.com", ...
mit
ShaolongHu/Nitrate
tcms/testplans/tests.py
1
4490
# -*- coding: utf-8 -*- import unittest from django.test.client import Client class PlanTests(unittest.TestCase): def setUp(self): self.c = Client() self.plan_id = 2256 self.status_codes = [301, 302] def test_plans(self): response = self.c.get('/plans/') try: ...
gpl-2.0
pleaseproject/python-for-android
python3-alpha/extra_modules/gdata/tlslite/errors.py
48
5796
"""Exception classes. @sort: TLSError, TLSAbruptCloseError, TLSAlert, TLSLocalAlert, TLSRemoteAlert, TLSAuthenticationError, TLSNoAuthenticationError, TLSAuthenticationTypeError, TLSFingerprintError, TLSAuthorizationError, TLSValidationError, TLSFaultError """ from .constants import AlertDescription, AlertLevel class...
apache-2.0
DaMonkey/hankypanky
cherrypy/test/test_wsgiapps.py
6
3819
from cherrypy.test import helper class WSGIGraftTests(helper.CPWebCase): def setup_server(): import os curdir = os.path.join(os.getcwd(), os.path.dirname(__file__)) import cherrypy def test_app(environ, start_response): status = '200 OK' r...
gpl-3.0
adamchainz/factory_boy
tests/cyclic/self_ref.py
7
1531
# -*- coding: utf-8 -*- # Copyright (c) 2011-2015 Raphaël Barrois # # 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...
mit
czhengsci/veidt
veidt/utils/data_selection.py
1
4503
# coding: utf-8 # Copyright (c) Materials Virtual Lab # Distributed under the terms of the BSD License. from __future__ import division, print_function, unicode_literals, \ absolute_import import random import numpy as np import pandas as pd from copy import copy from pymatgen import Structure class MonteCarloS...
bsd-3-clause
davygeek/vitess
test/vschema.py
1
4090
#!/usr/bin/env python # Copyright 2019 The Vitess Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
rickerc/nova_audit
nova/tests/objects/test_objects.py
3
26765
# Copyright 2013 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
to266/hyperspy
hyperspy/drawing/marker.py
2
4900
# -*- coding: utf-8 -*- # Copyright 2007-2016 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
gpl-3.0
varunarya10/boto
tests/integration/dynamodb2/test_highlevel.py
96
26329
# Copyright (c) 2013 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 without restriction, including # without limitation the right...
mit
fabioz/Pydev
plugins/org.python.pydev.core/pysrc/tests_python/test_pydevcoverage.py
2
2659
import os import re import sys import subprocess import tempfile import unittest #======================================================================================================================= # Test #============================================================================================================...
epl-1.0
bgris/ODL_bgris
lib/python3.5/idlelib/idle_test/test_widgetredir.py
2
4201
'''Test idlelib.WidgetRedirector. 100% coverage ''' from test.support import requires import unittest from idlelib.idle_test.mock_idle import Func from tkinter import Tk, Text, TclError from idlelib.WidgetRedirector import WidgetRedirector class InitCloseTest(unittest.TestCase): @classmethod def setUpClass(...
gpl-3.0
excid3/simpyl_shortener
manage.py
2
1179
#!/usr/bin/env python # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it...
gpl-3.0
nacl-webkit/chrome_deps
tools/heapcheck/chrome_tests.py
7
17723
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. ''' Runs various chrome tests through heapcheck_test.py. Most of this code is copied from ../valgrind/chrome_tests.py. TODO(glider...
bsd-3-clause
leoliujie/odoo
addons/mrp_byproduct/mrp_byproduct.py
150
8285
# -*- 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
rolandgeider/wger
wger/manager/migrations/0010_auto_20210102_1446.py
1
1206
# Generated by Django 3.1.3 on 2021-01-02 13:46 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('manager', '0009_auto_20201202_1559'), ] operations = [ migrations.AlterField( model_name='setting', name='rir', ...
agpl-3.0
alldrops/nic
wp-content/themes/nic/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
2779
1665
# Copyright (c) 2011 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. """gypsh output module gypsh is a GYP shell. It's not really a generator per se. All it does is fire up an interactive Python session with a few local variables...
gpl-2.0
Ahmad31/Web_Flask_Cassandra
flask/lib/python2.7/site-packages/sqlalchemy/dialects/oracle/zxjdbc.py
33
8112
# oracle/zxjdbc.py # Copyright (C) 2005-2017 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:: oracle+zxjdbc :name: zxJDBC for Jython :dbapi: zxjdbc ...
apache-2.0
superbobry/climin
test/test_linesearch.py
5
1261
import numpy as np from climin import linesearch def test_polyinterp(): """ polyinterp is used for interpolating functions based on function/derviative values. """ # points = np.array([ [0, 13675.4102446153, -51949952485403.5], [5.13158867008399e-10, 60596.6916564044, 40888428...
bsd-3-clause
bmos299/fabric
bddtests/gossip/message_pb2_grpc.py
2
2335
import grpc from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities import gossip.message_pb2 as gossip_dot_message__pb2 import gossip.message_pb2 as gossip_dot_message__pb2 import gossip.message_pb2 as gossip_dot_message__pb2 import gossip.message_pb2 as go...
apache-2.0
vrsys/avangong
examples/sound/openal/openal-test.py
1
4058
# -*- Mode:Python -*- ########################################################################## # # # This file is part of AVANGO. # # ...
lgpl-3.0
zomux/deepy
examples/attention_models/baseline_trainer.py
7
6516
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import numpy as np from numpy import linalg as LA from theano import tensor as T import theano from deepy.utils.functions import FLOATX from deepy.trainers import CustomizeTrainer from deepy.trainers.optimize import optimize_function class AttentionTrainer(Cu...
mit
ProfessionalIT/professionalit-webiste
sdk/google_appengine/lib/webob_0_9/webob/datastruct.py
35
1682
""" Contains some data structures. """ from webob.util.dictmixin import DictMixin class EnvironHeaders(DictMixin): """An object that represents the headers as present in a WSGI environment. This object is a wrapper (with no internal state) for a WSGI request object, representing the CGI-style HTTP_* ...
lgpl-3.0
larsonmpdx/grpc
src/python/grpcio_test/grpc_test/framework/interfaces/face/_blocking_invocation_inline_service.py
11
10786
# Copyright 2015, 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...
bsd-3-clause
Fireblend/chromium-crosswalk
third_party/google_input_tools/third_party/closure_library/closure/bin/build/closurebuilder.py
50
9284
#!/usr/bin/env python # # Copyright 2009 The Closure Library 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 ...
bsd-3-clause
a-parhom/edx-platform
cms/envs/openstack.py
3
1610
""" Settings for OpenStack deployments. """ # We import the aws settings because that's currently where the base settings are stored for all deployments. # TODO - fix this when aws.py is split/renamed. from .production import * # pylint: disable=wildcard-import, unused-wildcard-import SWIFT_AUTH_URL = AUTH_TOKENS.ge...
agpl-3.0