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
ouyanghy/nanopi2
tools/perf/scripts/python/futex-contention.py
11261
1486
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
gpl-2.0
rainslytherin/ansible
lib/ansible/runner/connection_plugins/ssh.py
104
19988
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
gpl-3.0
Upward-Spiral-Science/team1
code/test_assumptions.py
1
1525
import numpy as np import matplotlib.pyplot as plt import urllib2 #%matplotlib inline sample_size = 1000 np.random.seed(1) url = ('https://raw.githubusercontent.com/Upward-Spiral-Science' '/data/master/syn-density/output.csv') data = urllib2.urlopen(url) csv = np.genfromtxt(data, delimiter=",")[1:] csv_rand ...
apache-2.0
enkripsi/gyp
test/msvs/list_excluded/gyptest-all.py
347
1292
#!/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 that msvs_list_excluded_files=0 doesn't list files that would normally be in _excluded_files, and that if that flag is not set,...
bsd-3-clause
pombredanne/http-repo.gem5.org-gem5-
tests/configs/base_config.py
6
10647
# Copyright (c) 2012-2013 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functiona...
bsd-3-clause
crtrott/lammps
python/examples/viz_atomeye.py
25
1913
#!/usr/bin/env python -i # preceeding line should have path for Python on your machine # viz_atomeye.py # Purpose: viz running LAMMPS simulation via AtomEye # Syntax: viz_atomeye.py in.lammps Nfreq Nsteps # in.lammps = LAMMPS input script # Nfreq = dump and viz shapshot every this many steps # ...
gpl-2.0
neraliu/tainted-phantomjs
src/breakpad/src/tools/gyp/gyptest.py
137
7245
#!/usr/bin/env python # Copyright (c) 2009 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. __doc__ = """ gyptest.py -- test runner for GYP tests. """ import os import optparse import subprocess import sys class CommandRunner: "...
bsd-3-clause
ar7z1/ansible
lib/ansible/modules/commands/expect.py
21
7569
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Matt Martz <matt@sivel.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
tmerrick1/spack
lib/spack/spack/test/cmd/view.py
4
6749
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
SUSE/kiwi
kiwi/storage/raid_device.py
1
4198
# Copyright (c) 2015 SUSE Linux GmbH. All rights reserved. # # This file is part of kiwi. # # kiwi 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 la...
gpl-3.0
kisna72/django
django/db/models/query_utils.py
184
11574
""" Various data structures used in query construction. Factored out from django.db.models.query to avoid making the main module very large and/or so that they can be used by other modules without getting into circular import difficulties. """ from __future__ import unicode_literals from collections import namedtuple...
bsd-3-clause
samba-team/samba
python/samba/provision/__init__.py
1
99121
# Unix SMB/CIFS implementation. # backend code for provisioning a Samba AD server # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007-2012 # Copyright (C) Andrew Bartlett <abartlet@samba.org> 2008-2009 # Copyright (C) Oliver Liebel <oliver@itc.li> 2008-2009 # # Based on the original in EJS: # Copyright (C) Andrew ...
gpl-3.0
fvpolpeta/devide
modules/writers/DICOMWriter.py
7
6671
# Copyright (c) Charl P. Botha, TU Delft # All rights reserved. # See COPYRIGHT for details. # Random development notes: # * SetFileDimensionality(2) if you want multiple slices written from # a single volume # * just generate im%05d.dcm filenames, as many as there are slices # * study / series UIDs are auto generat...
bsd-3-clause
pgaref/ZooEmbedded
src/contrib/zkpython/src/test/connection_test.py
30
4965
#!/usr/bin/python # # 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 # "Lic...
apache-2.0
40223145c2g18/c2g18
wsgi/static/Brython2.1.0-20140419-113919/Lib/string.py
734
9410
"""A collection of string constants. Public module variables: whitespace -- a string containing all ASCII whitespace ascii_lowercase -- a string containing all ASCII lowercase letters ascii_uppercase -- a string containing all ASCII uppercase letters ascii_letters -- a string containing all ASCII letters digits -- a ...
gpl-2.0
lsqtongxin/django
django/contrib/gis/sitemaps/views.py
341
2421
from __future__ import unicode_literals from django.apps import apps from django.contrib.gis.db.models.fields import GeometryField from django.contrib.gis.db.models.functions import AsKML, Transform from django.contrib.gis.shortcuts import render_to_kml, render_to_kmz from django.core.exceptions import FieldDoesNotExi...
bsd-3-clause
FreekingDean/home-assistant
homeassistant/components/sensor/cups.py
25
4535
""" Details about printers which are connected to CUPS. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.cups/ """ import logging from datetime import timedelta import voluptuous as vol import homeassistant.helpers.config_validation as cv from hom...
mit
rahuldhote/scikit-learn
examples/gaussian_process/gp_diabetes_dataset.py
223
1976
#!/usr/bin/python # -*- coding: utf-8 -*- """ ======================================================================== Gaussian Processes regression: goodness-of-fit on the 'diabetes' dataset ======================================================================== In this example, we fit a Gaussian Process model onto...
bsd-3-clause
KWierso/treeherder
tests/model/test_suite_public_name.py
1
4454
import pytest from django.db.utils import IntegrityError SAME_SUITE_PUBLIC_NAME = 'same suite name' SAME_TEST_PUBLIC_NAME = 'same test name' SAME_SUITE = 'same suite' SAME_TEST = 'same test' @pytest.mark.parametrize("suite_public_name, suite_public_name_2," "test_public_name, test_public_nam...
mpl-2.0
caot/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/tests/geoapp/test_regress.py
258
1500
import os, unittest from django.contrib.gis.tests.utils import no_mysql, no_oracle, no_postgis, no_spatialite from django.contrib.gis.shortcuts import render_to_kmz from models import City class GeoRegressionTests(unittest.TestCase): def test01_update(self): "Testing GeoQuerySet.update(), see #10411." ...
apache-2.0
jspraul/bite-project
deps/closure/closure-library/closure/bin/scopify.py
125
6316
#!/usr/bin/python2.4 # # Copyright 2010 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 #...
apache-2.0
bmi-forum/bmi-pyre
Snac/pyre/Inlet.py
5
3206
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # <LicenseText> # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # class Inlet(object): def __init__(self): self._handle = None return def impose(sel...
gpl-2.0
richardfergie/googleads-python-lib
googleads/adwords.py
4
35332
# Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
ldjebran/robottelo
tests/foreman/ui/test_sync.py
2
5841
"""Test class for Custom Sync UI :Requirement: Sync :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: Repositories :TestType: Functional :CaseImportance: High :Upstream: No """ import pytest from fauxfactory import gen_string from nailgun import entities from robottelo import manifests from robo...
gpl-3.0
AmrThabet/CouchPotatoServer
libs/bs4/testing.py
440
24510
"""Helper classes for tests.""" import copy import functools import unittest from unittest import TestCase from bs4 import BeautifulSoup from bs4.element import ( CharsetMetaAttributeValue, Comment, ContentMetaAttributeValue, Doctype, SoupStrainer, ) from bs4.builder import HTMLParserTreeBuilder d...
gpl-3.0
bit-trade-one/SoundModuleAP
lib-src/lv2/lv2/waflib/Tools/dmd.py
8
1562
#! /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 sys from waflib.Tools import ar,d from waflib.Configure import conf @conf def find_dmd(conf): conf.find_program(['dmd','dmd2','ldc'],var='D') out=conf.cmd_a...
gpl-2.0
projectcalico/calico-neutron
neutron/tests/unit/vmware/nsxlib/test_router.py
21
46835
# Copyright (c) 2014 VMware, 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 writi...
apache-2.0
kau-masa/Komi_SmartAlarmClock
src/actions/Alert.py
9
1526
from bottle import Bottle, route, run, template, static_file, get, jinja2_template as template, post, request, response, redirect import json import requests import runtime import actions """ Alert """ defaultInputParams = {'sound':'', 'message':'', 'loop':False} defaultOutputParams = {} sim_parameters = dict() # R...
bsd-3-clause
bigdatauniversity/edx-platform
lms/djangoapps/courseware/management/commands/dump_course_structure.py
30
4044
""" A Django command that dumps the structure of a course as a JSON object. The resulting JSON object has one entry for each module in the course: { "$module_url": { "category": "$module_category", "children": [$module_children_urls... ], "metadata": {$module_metadata} }, "$module_url": .... ... ...
agpl-3.0
jihyun-kim/heekscnc
pycnc/wxNiceTextCtrl.py
25
2065
import wx import HeeksCNC class DoubleCtrl(wx.TextCtrl): def __init__(self, parent, id = wx.ID_ANY, factor = 1.0): wx.TextCtrl.__init__(self, parent, id) self.factor = factor def GetValue(self): try: return float(wx.TextCtrl.GetValue(self))/self.factor excep...
bsd-3-clause
z0by/django
django/contrib/gis/utils/ogrinspect.py
73
9136
""" This module is for inspecting OGR data sources and generating either models for GeoDjango and/or mapping dictionaries for use with the `LayerMapping` utility. """ from django.contrib.gis.gdal import DataSource from django.contrib.gis.gdal.field import ( OFTDate, OFTDateTime, OFTInteger, OFTInteger64, OFTReal, O...
bsd-3-clause
sharma1nitish/phantomjs
src/qt/qtwebkit/Tools/TestResultServer/generate_builders_json.py
119
4429
#!/usr/bin/env python # 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 ...
bsd-3-clause
pcm17/tensorflow
tensorflow/contrib/learn/python/learn/tests/dataframe/dataframe_test.py
62
3753
# 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
me-systeme/gsv8pypi
GSV6_FrameRouter.py
1
5296
# -*- coding: utf-8 -*- __author__ = 'Dennis Rump' ############################################################################### # # The MIT License (MIT) # # Copyright (c) 2015 Dennis Rump # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation...
mit
skycucumber/restful
python/venv/lib/python2.7/site-packages/pip/_vendor/distlib/version.py
166
21803
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2013 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """ Implementation of a flexible versioning scheme providing support for PEP-386, distribute-compatible and semantic versioning. """ import logging import re from .compat import string_types ...
gpl-2.0
hashems/Mobile-Cloud-Development-Projects
appengine/flexible/mailjet/main.py
7
2148
# Copyright 2016 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...
apache-2.0
jmargeta/scikit-learn
sklearn/utils/class_weight.py
3
2062
# Authors: Andreas Mueller # License: Simplified BSD import numpy as np from .fixes import bincount def compute_class_weight(class_weight, classes, y_ind): """Estimate class weights for unbalanced datasets. Parameters ---------- class_weight : dict, 'auto' or None If 'auto', class weights w...
bsd-3-clause
jbair34/moose
python/PresentationBuilder/slides/DjangoWikiSlide.py
19
3421
import os, re, urllib from ..images import DjangoWikiImage from ..slides import RemarkSlide ## # A slide for wiki content from a Djanjo Wiki (https://github.com/django-wiki/django-wiki) class DjangoWikiSlide(RemarkSlide): @staticmethod def validParams(): params = RemarkSlide.validParams() return params ...
lgpl-2.1
rushiagr/keystone
keystone/common/cache/backends/noop.py
30
1426
# Copyright 2013 Metacloud # # 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, s...
apache-2.0
wdzhou/mantid
Framework/PythonInterface/test/python/mantid/geometry/UnitCellTest.py
3
3081
from __future__ import (absolute_import, division, print_function) import unittest import testhelpers from mantid.geometry import UnitCell, AngleUnits from mantid.kernel import V3D import numpy as np class UnitCellTest(unittest.TestCase): def test_invalid_parameters_throw(self): self.assertRaises(Runtime...
gpl-3.0
FRidh/scipy
scipy/spatial/tests/test_kdtree.py
15
24484
# Copyright Anne M. Archibald 2008 # Released under the scipy license from __future__ import division, print_function, absolute_import from numpy.testing import (assert_equal, assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_, run_module_suite) import numpy as np from scipy.spatial impo...
bsd-3-clause
agdestine/machine-learning
code/abaloneUtils.py
5
4299
# utils # Utility functions for handling data # # Author: Benjamin Bengfort <bbengfort@districtdatalabs.com> # Created: Thu Feb 26 17:47:35 2015 -0500 # # Copyright (C) 2015 District Data Labs # For license information, see LICENSE.txt # # ID: utils.py [] benjamin@bengfort.com $ """ Utility functions for handling d...
mit
pravsripad/mne-python
setup.py
4
4660
#!/usr/bin/env python # Copyright (C) 2011-2020 Alexandre Gramfort # <alexandre.gramfort@inria.fr> import os import os.path as op from setuptools import setup # get the version (don't import mne here, so dependencies are not needed) version = None with open(op.join('mne', '_version.py'), 'r') as fid: for line i...
bsd-3-clause
hbrunn/OpenUpgrade
openerp/osv/orm.py
9
262287
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
thesuperzapper/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/wishart_test.py
38
14437
# 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
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/django/shortcuts/__init__.py
254
4642
""" This module collects helper functions and classes that "span" multiple levels of MVC. In other words, these functions/classes introduce controlled coupling for convenience's sake. """ from django.template import loader, RequestContext from django.http import HttpResponse, Http404 from django.http import HttpRespon...
agpl-3.0
ychfan/tensorflow
tensorflow/python/ops/distributions/identity_bijector.py
73
1840
# 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
perillamint/Kite2
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
3246
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
gpl-2.0
ol-loginov/intellij-community
python/lib/Lib/encodings/ascii.py
858
1248
""" Python 'ascii' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to methods. This is intended. ...
apache-2.0
ycaihua/kbengine
kbe/src/lib/python/Lib/test/test_xml_etree_c.py
80
3005
# xml.etree test for cElementTree import sys, struct from test import support from test.support import import_fresh_module import types import unittest cET = import_fresh_module('xml.etree.ElementTree', fresh=['_elementtree']) cET_alias = import_fresh_module('xml.etree.cElementTree', ...
lgpl-3.0
vmindru/ansible
test/units/modules/network/enos/enos_module.py
31
3229
# Copyright (C) 2017 Lenovo, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansi...
gpl-3.0
wemanuel/smry
smry/server-auth/ls/google-cloud-sdk/lib/requests/packages/urllib3/response.py
196
12240
import zlib import io from socket import timeout as SocketTimeout from ._collections import HTTPHeaderDict from .exceptions import ProtocolError, DecodeError, ReadTimeoutError from .packages.six import string_types as basestring, binary_type, PY3 from .connection import HTTPException, BaseSSLError from .util.response ...
apache-2.0
rbaindourov/v8-inspector
Source/chrome/tools/metrics/histograms/PRESUBMIT.py
43
1430
# 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. """ See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details on the presubmit API built into depot_tools. """ def Check...
bsd-3-clause
pjg101/SickRage
lib/github/tests/Label.py
8
2813
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
cesarmarinhorj/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/checkout/scm/detection.py
164
3834
# Copyright (c) 2009, 2010, 2011 Google Inc. All rights reserved. # Copyright (c) 2009 Apple 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 reta...
bsd-3-clause
orchidinfosys/odoo
addons/l10n_be_hr_payroll/l10n_be_hr_payroll.py
47
2143
#-*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp.osv import fields, osv import openerp.addons.decimal_precision as dp class hr_contract_be(osv.osv): _inherit = 'hr.contract' _columns = { 'travel_reimbursement_amount': fields.float('Reimbur...
gpl-3.0
WorldMG/production-email
lib/flask/logging.py
838
1398
# -*- coding: utf-8 -*- """ flask.logging ~~~~~~~~~~~~~ Implements the logging support for Flask. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from logging import getLogger, StreamHandler, Formatter, getLoggerClas...
apache-2.0
awkspace/ansible
lib/ansible/modules/network/f5/bigip_monitor_external.py
14
23275
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
imsparsh/python-for-android
python3-alpha/python3-src/Lib/test/test_msilib.py
172
1468
""" Test suite for the code in msilib """ import unittest import os from test.support import run_unittest, import_module msilib = import_module('msilib') class Test_make_id(unittest.TestCase): #http://msdn.microsoft.com/en-us/library/aa369212(v=vs.85).aspx """The Identifier data type is a text string. Identifi...
apache-2.0
P2poolBrasil/p2pool-dilmacoin
nattraverso/ipdiscover.py
288
4180
""" Generic methods to retreive the IP address of the local machine. TODO: Example @author: Raphael Slinckx @copyright: Copyright 2005 @license: LGPL @contact: U{raphael@slinckx.net<mailto:raphael@slinckx.net>} @version: 0.1.0 """ __revision__ = "$id" import random, socket, logging, itertools from twisted.internet...
gpl-3.0
chacoroot/planetary
addons/project/tests/test_project_flow.py
116
8790
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
agpl-3.0
wq/wq.io
itertable/loaders.py
1
4908
from __future__ import print_function import requests try: # Python 2 (uses str) from StringIO import StringIO except ImportError: # Python 3 (Python 2 equivalent uses unicode) from io import StringIO from io import BytesIO from .version import VERSION from .exceptions import LoadFailed from zipfile imp...
mit
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.1/Lib/lib-old/cmp.py
14
1975
"""Efficiently compare files, boolean outcome only (equal / not equal). Tricks (used in this order): - Files with identical type, size & mtime are assumed to be clones - Files with different type or size cannot be identical - We keep a cache of outcomes of earlier comparisons - We don't fork a process ...
mit
holdenk/spark
python/pyspark/sql/tests/test_datasources.py
22
7577
# # 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 us...
apache-2.0
AttakornP/request_manager
request_manager/request_manager/settings/local.py
1
1799
"""Development settings and globals.""" from os.path import join, normpath from base import * ########## DEBUG CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = True # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug TEMPLATE_DEBUG = DEBUG ########## END...
mit
Teagan42/home-assistant
tests/components/nuheat/test_init.py
5
1461
"""NuHeat component tests.""" import unittest from unittest.mock import patch from homeassistant.components import nuheat from tests.common import MockDependency, get_test_home_assistant VALID_CONFIG = { "nuheat": {"username": "warm", "password": "feet", "devices": "thermostat123"} } class TestNuHeat(unittest....
apache-2.0
iRGBit/QGIS
python/plugins/processing/algs/gdal/ogrinfo.py
8
2423
# -*- coding: utf-8 -*- """ *************************************************************************** ogrinfo.py --------------------- Date : November 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *****************************...
gpl-2.0
NathanW2/QGIS
python/plugins/db_manager/db_plugins/vlayers/connector.py
9
13705
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : Virtual layers plugin for DB Manager Date : December 2015 copyright : (C) 2015 by Hugo Mercier email : hugo dot mercier at oslandia dot com *******...
gpl-2.0
tornadozou/tensorflow
tensorflow/contrib/bayesflow/python/kernel_tests/stochastic_graph_test.py
76
10239
# 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
elegion/djangodash2012
fortuitus/settings_gondor.py
1
1571
import os import urlparse from .settings import * # NOQA DEBUG = False TEMPLATE_DEBUG = DEBUG if 'GONDOR_DATABASE_URL' in os.environ: urlparse.uses_netloc.append('postgres') url = urlparse.urlparse(os.environ['GONDOR_DATABASE_URL']) DATABASES = { 'default': { 'ENGINE': { ...
mit
saneyuki/servo
tests/wpt/web-platform-tests/mathml/tools/radicals.py
101
3622
#!/usr/bin/python from utils import mathfont import fontforge def createStretchyRadical(aFont): radicalCodePoint = 0x221a mathfont.createSquareGlyph(aFont, radicalCodePoint) g = aFont.createChar(-1, "size1") mathfont.drawRectangleGlyph(g, mathfont.em, 2 * mathfont.em, 0) g = aFont.createChar(-1, "...
mpl-2.0
schets/LILAC
src/integrator/.ycm_extra_conf.py
21
6201
# This file is NOT licensed under the GPLv3, which is the license for the rest # of YouCompleteMe. # # Here's the license text for this file: # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either...
bsd-3-clause
suiyuan2009/tensorflow
tensorflow/tools/docs/doc_generator_visitor.py
68
8418
# 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
dmccue/ansible
v1/ansible/runner/lookup_plugins/flattened.py
122
2428
# (c) 2013, Serge van Ginderachter <serge@vanginderachter.be> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option)...
gpl-3.0
peterbe/bramble
vendor-local/lib/python/werkzeug/templates.py
95
13713
# -*- coding: utf-8 -*- r""" werkzeug.templates ~~~~~~~~~~~~~~~~~~ A minimal template engine. :copyright: (c) 2011 by the Werkzeug Team, see AUTHORS for more details. :license: BSD License. """ import sys import re import __builtin__ as builtins from compiler import ast, parse from compiler.pycode...
mpl-2.0
shsingh/ansible
lib/ansible/modules/cloud/vmware/_vmware_host_feature_facts.py
21
4460
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@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 ANSIBLE_METADATA = { 'metadata_...
gpl-3.0
defionscode/ansible
test/units/modules/network/nxos/test_nxos_evpn_vni.py
50
2906
# (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
gpl-3.0
tequa/ammisoft
ammimain/WinPython-64bit-2.7.13.1Zero/python-2.7.13.amd64/Lib/fractions.py
252
22390
# Originally contributed by Sjoerd Mullender. # Significantly modified by Jeffrey Yasskin <jyasskin at gmail.com>. """Rational, infinite-precision, real numbers.""" from __future__ import division from decimal import Decimal import math import numbers import operator import re __all__ = ['Fraction', 'gcd'] Rational...
bsd-3-clause
cliffe/SecGen
modules/utilities/unix/labtainers/files/Labtainers-master/distrib/publish_grader.py
2
2715
#!/usr/bin/env python import os import sys import argparse sys.path.append('../scripts/labtainer-student/bin') import labutils import ParseLabtainerConfig import LabtainerLogging import VersionInfo def relabel(image, version, base_image, base_id, registry): with open('./dfile', 'w') as fh: fh.write('FROM %s...
gpl-3.0
srottem/indy-sdk
wrappers/python/tests/pairwise/test_set_pairwise_metadata.py
2
2428
from indy import IndyError from indy import pairwise import pytest import json from indy.error import ErrorCode @pytest.mark.asyncio async def test_set_pairwise_metadata_works(wallet_handle, identity_my2, identity_trustee1, metadata): (my_did, _) = identity_my2 (their_did, _) = identity_trustee1 await ...
apache-2.0
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/gtts/tts.py
4
6388
# -*- coding: utf-8 -*- import re, requests, warnings from six.moves import urllib from requests.packages.urllib3.exceptions import InsecureRequestWarning from gtts_token.gtts_token import Token class gTTS: """ gTTS (Google Text to Speech): an interface to Google's Text to Speech API """ # Google TTS API supp...
gpl-3.0
ulikoehler/UliEngineering
UliEngineering/SignalProcessing/Resampling.py
1
9018
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Utilities for selecting and finding specific attributes in datasets """ import math import functools import numpy as np import bisect import concurrent.futures import scipy.interpolate from UliEngineering.Utils.Concurrency import QueuedThreadExecutor from .Utils import...
apache-2.0
DavidNorman/tensorflow
tensorflow/python/training/adagrad_da.py
15
7491
# 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
lokeshjindal15/gem5_transform
src/arch/x86/isa/insts/general_purpose/data_transfer/xchg.py
89
3288
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
Azure/azure-sdk-for-python
sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/models/_models_py3.py
1
295755
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
robintw/scikit-image
skimage/feature/_daisy.py
19
9777
import numpy as np from scipy import sqrt, pi, arctan2, cos, sin, exp from scipy.ndimage import gaussian_filter from .. import img_as_float, draw from ..color import gray2rgb from .._shared.utils import assert_nD def daisy(img, step=4, radius=15, rings=3, histograms=8, orientations=8, normalization='l1', si...
bsd-3-clause
bottydim/detect-credit-card-fraud
ccfd_dnn/model_weight.py
1
20628
import os os.environ['CUDA_LAUNCH_BLOCKING'] = '1' import pandas as pd import matplotlib import numpy as np import math import matplotlib.pyplot as plt from sklearn.preprocessing import Imputer from sklearn.cross_validation import train_test_split from sklearn import preprocessing import plotly.tools as tls import pand...
mit
jagg81/translate-toolkit
build/lib.linux-x86_64-2.6/translate/lang/kn.py
4
1094
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008 Zuza Software Foundation # # This file is part of translate. # # translate is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of t...
gpl-2.0
eiginn/platformio
platformio/builder/scripts/titiva.py
3
1759
# Copyright 2014-2016 Ivan Kravets <me@ikravets.com> # # 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
heeraj123/oh-mainline
mysite/customs/management/commands/export_bug_trackers.py
15
1197
# This file is part of OpenHatch. # Copyright (C) 2012 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
GbalsaC/bitnamiP
venv/src/edx-submissions/submissions/tests/test_models.py
1
5673
""" Tests for submission models. """ from django.test import TestCase from submissions.models import Submission, Score, ScoreSummary, StudentItem class TestScoreSummary(TestCase): """ Test selection of options from a rubric. """ def test_latest(self): item = StudentItem.objects.create( ...
agpl-3.0
benoitsteiner/tensorflow-opencl
tensorflow/contrib/quantization/python/array_ops.py
178
1156
# 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
brandonPurvis/osf.io
website/files/models/dataverse.py
39
1543
from framework.auth.core import _get_current_user from website.files.models.base import File, Folder, FileNode, FileVersion __all__ = ('DataverseFile', 'DataverseFolder', 'DataverseFileNode') class DataverseFileNode(FileNode): provider = 'dataverse' class DataverseFolder(DataverseFileNode, Folder): pass ...
apache-2.0
TheTypoMaster/my-vim-set-mac
.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/jedi/test/test_evaluate/test_buildout_detection.py
13
2751
import os from textwrap import dedent from jedi._compatibility import u from jedi.evaluate.sys_path import (_get_parent_dir_with_file, _get_buildout_scripts, sys_path_with_modifications, _check_module) from jedi...
gpl-2.0
takeshineshiro/nova
nova/tests/unit/api/openstack/compute/contrib/test_keypairs.py
3
20933
# Copyright 2011 Eldar Nugaev # 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 ...
apache-2.0
dostavro/dotfiles
sublime2/Packages/SublimeCodeIntel/libs/codeintel2/database/resource.py
2
5541
#!python # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (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.mozilla.org/MPL/ #...
mit
HugoKuo/keystone-essex3
keystone/backends/ldap/__init__.py
2
1094
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 OpenStack LLC. # 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
Alwnikrotikz/los-cocos
cocos/__init__.py
3
4046
# ---------------------------------------------------------------------------- # cocos2d # Copyright (c) 2008-2012 Daniel Moisset, Ricardo Quesada, Rayentray Tappa, # Lucio Torre # Copyright (c) 2009-2014 Richard Jones, Claudio Canepa # All rights reserved. # # Redistribution and use in source and binary forms, with o...
bsd-3-clause
double12gzh/nova
nova/api/openstack/compute/contrib/flavor_disabled.py
79
2223
# Copyright 2012 Nebula, 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...
apache-2.0
benoitsteiner/tensorflow-xsmm
tensorflow/contrib/kfac/python/ops/fisher_factors.py
13
66803
# 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