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
turbokongen/home-assistant
tests/components/tasmota/test_mixins.py
8
1574
"""The tests for the Tasmota mixins.""" import copy import json from unittest.mock import call from hatasmota.const import CONF_MAC from hatasmota.utils import config_get_state_online, get_topic_tele_will from homeassistant.components.tasmota.const import DEFAULT_PREFIX from .test_common import DEFAULT_CONFIG from ...
apache-2.0
mmmavis/lightbeam-bedrock-website
bin/crontab/gen-crons.py
70
1205
#!/usr/bin/env python import os from optparse import OptionParser from jinja2 import Template HEADER = '!!AUTO-GENERATED!! Edit bin/crontab/crontab.tpl instead.' TEMPLATE = open(os.path.join(os.path.dirname(__file__), 'crontab.tpl')).read() def main(): parser = OptionParser() parser.add_option('-w', '--web...
mpl-2.0
pspe/root
interpreter/llvm/src/examples/Kaleidoscope/MCJIT/complete/genk-timing.py
108
11103
#!/usr/bin/env python import sys import random class TimingScriptGenerator: """Used to generate a bash script which will invoke the toy and time it""" def __init__(self, scriptname, outputname): self.timeFile = outputname self.shfile = open(scriptname, 'w') self.shfile.write("echo \"\"...
lgpl-2.1
zsoltdudas/lis-tempest
tempest/api/object_storage/test_container_quotas.py
6
4590
# Copyright 2013 Cloudwatt # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
apache-2.0
3dfxsoftware/cbss-addons
lunch/wizard/lunch_cancel.py
440
1274
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2012 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
gpl-2.0
florian-dacosta/OCB
addons/stock_picking_wave/__init__.py
374
1105
# -*- 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
rmcgibbo/scipy
scipy/weave/examples/array3d.py
100
2521
""" A simple example to show how to access a 3D numpy array. One example shows how to access the numpy array using blitz type converters and the other shows how it can be done without using blitz by accessing the numpy array data directly. """ from __future__ import absolute_import, print_function import scipy.weave...
bsd-3-clause
patriciolobos/desa8
openerp/addons/website_certification/__init__.py
385
1030
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-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
cdgallahue/atomic-turbine
web/lib/python2.7/site-packages/pip/commands/__init__.py
344
2244
""" Package containing all pip commands """ from __future__ import absolute_import from pip.commands.completion import CompletionCommand from pip.commands.download import DownloadCommand from pip.commands.freeze import FreezeCommand from pip.commands.hash import HashCommand from pip.commands.help import HelpCommand fr...
mit
altai/altai-api
tests/basic.py
1
4377
# vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab smarttab autoindent # Altai API Service # Copyright (C) 2012-2013 Grid Dynamics Consulting Services, Inc # All Rights Reserved # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License ...
lgpl-2.1
s0undt3ch/Deluge
deluge/pluginmanagerbase.py
8
7806
# # pluginmanagerbase.py # # Copyright (C) 2007 Andrew Resch <andrewresch@gmail.com> # # Deluge is free software. # # You may 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 l...
gpl-3.0
freeitaly/Trading-System
vn.sgit/pyscript/generate_struct.py
18
1965
# encoding: UTF-8 __author__ = 'CHENXY' from sgit_data_type import * import re def main(): """主函数""" fcpp = open('SgitFtdcUserApiStruct.h', 'r') fpy = open('sgit_struct.py', 'w') fpy.write('# encoding: UTF-8\n') fpy.write('\n') fpy.write('structDict = {}\n') fpy.write('\n') for no, ...
mit
MatthewShao/mitmproxy
test/mitmproxy/proxy/protocol/test_http1.py
6
3325
from unittest import mock import pytest from mitmproxy.test import tflow from mitmproxy.net.http import http1 from mitmproxy.net.tcp import TCPClient from mitmproxy.test.tutils import treq from ... import tservers class TestHTTPFlow: def test_repr(self): f = tflow.tflow(resp=True, err=True) asse...
mit
gspilio/nova
nova/api/openstack/extensions.py
7
13312
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation # Copyright 2011 Justin Santa Barbara # 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 L...
apache-2.0
bikong2/django
tests/model_regress/tests.py
326
8962
from __future__ import unicode_literals import datetime from operator import attrgetter from django.core.exceptions import ValidationError from django.db import router from django.db.models.sql import InsertQuery from django.test import TestCase, skipUnlessDBFeature from django.utils import six from django.utils.time...
bsd-3-clause
windedge/odoo
addons/account/report/account_aged_partner_balance.py
152
21511
# -*- 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
xiaoyaozi5566/DynamicCache
src/arch/x86/isa/insts/simd128/floating_point/data_transfer/move_non_temporal.py
86
2162
# 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
paulla/photomaton
setup.py
1
1536
# -*- coding: utf-8 -*- from setuptools import setup, find_packages import os version = '0.1.dev0' here = os.path.abspath(os.path.dirname(__file__)) def read_file(*pathes): path = os.path.join(here, *pathes) if os.path.isfile(path): with open(path, 'r') as desc_file: return desc_file.re...
mit
axbaretto/beam
venv/lib/python2.7/encodings/ptcp154.py
647
8950
""" Python Character Mapping Codec generated from 'PTCP154.txt' with gencodec.py. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. (c) Copyright 2000 Guido van Rossum. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,err...
apache-2.0
summanlp/gensim
gensim/models/ldamodel.py
1
53431
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2011 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ **For a faster implementation of LDA (parallelized for multicore machines), see** :mod:`gensim.models.ldamulticore`. Latent Dirich...
lgpl-2.1
talele08/appengine-mapreduce
python/test/mapreduce/api/map_job/model_datastore_input_reader_test.py
15
8510
#!/usr/bin/env python """Model Datastore Input Reader tests for the map_job API.""" # os_compat must be first to ensure timezones are UTC. # pylint: disable=g-bad-import-order from google.appengine.tools import os_compat # pylint: disable=unused-import import datetime import unittest from google.appengine.ext import...
apache-2.0
mifit/miexpert
mi_bng.py
1
55765
###################################################################### # # # Runs 'bind-n-grind' automation including refinement data # # preparation, MR, refinement, rigid-ligand fitting and MIFit launch # # ...
gpl-3.0
gptech/ansible
lib/ansible/modules/net_tools/nmcli.py
12
41936
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Chris Long <alcamie@gmail.com> <chlong@redhat.com> # # This file is a module for Ansible that interacts with Network Manager # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by #...
gpl-3.0
vietanh85/mongo-connector
mongo_connector/doc_managers/doc_manager_base.py
33
5701
# Copyright 2013-2014 MongoDB, 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 writin...
apache-2.0
tghw/gotr-bowl
libs/paramiko/dsskey.py
7
6726
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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 (a...
bsd-3-clause
RGreinacher/AmbiGrid
system/networkInterface.py
1
5800
#!/usr/local/bin/python3.4 # -*- coding: utf-8 -*- # Read the README.md for a basic understanding of the server API. # import python libs import json import asyncio import socket from autobahn.asyncio.websocket import WebSocketServerProtocol from autobahn.asyncio.websocket import WebSocketServerFactory # import proj...
mit
IT-Department-Projects/OOAD-Project
Flask_App/oakcrest/lib/python2.7/site-packages/pip/_vendor/colorama/winterm.py
578
6290
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. from . import win32 # from wincon.h class WinColor(object): BLACK = 0 BLUE = 1 GREEN = 2 CYAN = 3 RED = 4 MAGENTA = 5 YELLOW = 6 GREY = 7 # from wincon.h class WinStyle(object): NORMAL ...
mit
jpverkamp/dnsscan
dnsscan_threads.py
1
2216
#!/usr/bin/env python import os import sys import dns.resolver import Queue import time import threading # Various settings numthreads = 150 resultList = [] wq = Queue.Queue() # Prefix to yield def prefix_to_ips(prefix): if '/' in prefix: ip, size = prefix.split('/') else: ip = prefix ...
mit
joshimio/blog
node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/formatters/svg.py
362
5867
# -*- coding: utf-8 -*- """ pygments.formatters.svg ~~~~~~~~~~~~~~~~~~~~~~~ Formatter for SVG output. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pygments.util import get_bool_opt, get...
mit
onitake/ansible
test/integration/targets/azure_rm_keyvault/lookup_plugins/azure_service_principal_attribute.py
84
3519
# (c) 2018 Yunge Zhu, <yungez@microsoft.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ lookup: azure_service_principal_attribute req...
gpl-3.0
Teamxrtc/webrtc-streaming-node
third_party/webrtc/src/chromium/src/build/android/gyp/pack_relocations.py
34
3683
#!/usr/bin/env python # # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Pack relocations in a library (or copy unchanged). If --enable-packing and --configuration-name=='Release', invoke the relocation...
mit
Azure/azure-sdk-for-python
sdk/synapse/azure-synapse/azure/synapse/accesscontrol/aio/_access_control_client_async.py
1
2504
# 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
GamesDoneQuick/django-paypal
paypal/pro/tests/test_pro.py
1
12369
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals from decimal import Decimal import mock from django.contrib.auth import get_user_model from django.forms import ValidationError from django.test import TestCase from django.test.client import RequestFactory from django.test.utils import...
mit
OpenCL/GEGL-OpenCL-old
tests/python/test-gegl-color.py
7
3300
#!/usr/bin/env python """ This file is part of GEGL * * GEGL 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 3 of the License, or (at your option) any later version. * * GEGL is ...
lgpl-3.0
phoebusliang/parallel-lettuce
tests/integration/lib/Django-1.2.5/tests/regressiontests/views/tests/defaults.py
39
3922
from os import path from django.conf import settings from django.test import TestCase from django.contrib.contenttypes.models import ContentType from regressiontests.views.models import Author, Article, UrlArticle class DefaultsTests(TestCase): """Test django views in django/views/defaults.py""" fixtures = [...
gpl-3.0
Antiun/c2c-rd-addons
c2c_product_price_unit/__init__.py
4
1244
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 ChriCar Beteiligungs- und Beratungs- GmbH (<http://www.camptocamp.at>) # # Thi...
agpl-3.0
ojengwa/odoo
odoo.py
257
5618
#!/usr/bin/env python #---------------------------------------------------------- # odoo cli # # To install your odoo development environement type: # # wget -O- https://raw.githubusercontent.com/odoo/odoo/8.0/odoo.py | python # # The setup_* subcommands used to boostrap odoo are defined here inline and may # only depe...
agpl-3.0
Jayflux/servo
tests/wpt/mozilla/tests/mozilla/referrer-policy/generic/tools/generate.py
53
7650
#!/usr/bin/env python import os, sys, json from common_paths import * import spec_validator import argparse def expand_test_expansion_pattern(spec_test_expansion, test_expansion_schema): expansion = {} for artifact in spec_test_expansion: artifact_value = spec_test_expansion[artifact] if arti...
mpl-2.0
JioCloud/contrail-neutron-plugin
neutron_plugin_contrail/plugins/opencontrail/contrail_plugin_ipam.py
10
3050
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2014 Juniper Networks. 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.o...
apache-2.0
thawatchai/mrkimontour
appengine-django/lib/django/db/migrations/operations/models.py
290
21735
from __future__ import unicode_literals from django.db import models from django.db.migrations.operations.base import Operation from django.db.migrations.state import ModelState from django.db.models.options import normalize_together from django.utils import six from django.utils.functional import cached_property cl...
gpl-2.0
CristianBB/SickRage
lib/github/GitCommit.py
74
5226
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
omriiluz/ansible-modules-core
cloud/amazon/elasticache_subnet_group.py
107
5473
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
greyshell/Exploit-Dev
badchar_detection_automated/badchar_detection_HPNNM_B.07.53.py
1
10148
#!/usr/bin/env python2 # reference: CTP/OSCE # author: greyshell # description: identify good and bad chars in HPNNM-B.07.53 # dependency: python version: 2.7.x, pyenv-win==1.2.2, pywin32==218, WMI==1.4.9, pydbg # 1) download the `dependency.zip` file. # 2) extract the `pydbg.zip` inside your python `lib\site-package...
mit
iulian787/spack
var/spack/repos/builtin/packages/bedtools2/package.py
1
1337
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Bedtools2(Package): """Collectively, the bedtools utilities are a swiss-army knife of ...
lgpl-2.1
windyuuy/opera
chromium/src/third_party/chromite/buildbot/portage_utilities_unittest.py
2
25507
#!/usr/bin/python # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for portage_utilities.py.""" import fileinput import mox import os import sys import constants if __name__ == '__ma...
bsd-3-clause
varuntiwari27/rally
rally/plugins/openstack/scenarios/fuel/environments.py
5
3334
# All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
hanicker/odoo
addons/base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py
384
4146
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gene...
agpl-3.0
tlodge/dataware.nox
src/nox/coreapps/examples/countdown.py
10
1618
# Copyright 2008 (C) Nicira, Inc. # # This file is part of NOX. # # NOX 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. # # NOX is d...
gpl-3.0
okuchaiev/f-lm
data_utils_test.py
2
1148
import unittest from data_utils import Vocabulary, Dataset class DataUtilsTestCase(unittest.TestCase): def test_vocabulary(self): vocab = Vocabulary.from_file("testdata/test_vocab.txt") self.assertEqual(vocab.num_tokens, 1000) self.assertEqual(vocab.s_id, 2) self.assertEqual(vocab...
mit
ehashman/oh-mainline
vendor/packages/twisted/twisted/conch/unix.py
20
15784
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from twisted.cred import portal from twisted.python import components, log from twisted.internet.error import ProcessExitedAlready from zope import interface from ssh import session, forwarding, filetransfer from ssh.filetransfer import FXF_READ, ...
agpl-3.0
amwelch/a10sdk-python
a10sdk/core/delete/delete_health_external.py
2
1033
from a10sdk.common.A10BaseClass import A10BaseClass class HealthExternal(A10BaseClass): """ :param file_name: {"description": "Specify the Program Name", "format": "string", "minLength": 1, "optional": true, "maxLength": 31, "type": "string"} :param DeviceProxy: The device proxy for REST operations an...
apache-2.0
redbaron/ansible
lib/ansible/runner/lookup_plugins/file.py
153
2413
# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.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
ccrome/linux-caleb-dev
scripts/gdb/linux/tasks.py
630
2892
# # gdb helper commands and functions for Linux kernel debugging # # task & thread tools # # Copyright (c) Siemens AG, 2011-2013 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb from linux import utils task_type = utils.CachedType(...
gpl-2.0
ChronoMonochrome/android_kernel_ste-3.4
tools/perf/scripts/python/sched-migration.py
11215
11670
#!/usr/bin/python # # Cpu task migration overview toy # # Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com> # # perf script event handlers have been generated by perf script -g python # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Fre...
gpl-2.0
pombredanne/pants
src/python/pants/source/filespec.py
4
1665
# coding=utf-8 # Copyright 2017 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import re def glob...
apache-2.0
thekingofkings/focusread
libs/dns/rdtypes/nsbase.py
18
2851
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
mit
hanicker/odoo
addons/website_sale/controllers/main.py
20
43301
# -*- coding: utf-8 -*- import werkzeug from openerp import SUPERUSER_ID from openerp import http from openerp.http import request from openerp.tools.translate import _ from openerp.addons.website.models.website import slug from openerp.addons.web.controllers.main import login_redirect PPG = 20 # Products Per Page PP...
agpl-3.0
yzl0083/orange
Orange/OrangeCanvas/canvas/tests/test_layout.py
13
2566
import time from PyQt4.QtGui import QGraphicsView, QPainter, QPainterPath from ...gui.test import QAppTestCase from ..layout import AnchorLayout from ..scene import CanvasScene from ..items import NodeItem, LinkItem class TestAnchorLayout(QAppTestCase): def setUp(self): QAppTestCase.setUp(self) ...
gpl-3.0
blueboxgroup/nova
nova/api/openstack/compute/schemas/v3/multinic.py
90
1571
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
apache-2.0
jostmey/MaxSnippetModel
dataplumbing_synthetic_data.py
1
2627
######################################################################################### # Author: Jared L. Ostmeyer # Date Started: 2016-07-26 # Environment: Python3 # License: See LICENSE # Purpose: Generate synthetic dataset and create interfaces for piping the data to the model. # Note: Overwrite "dataplumbi...
bsd-3-clause
D4wN/brickv
src/brickv/plugin_system/plugins/red/program_page_csharp.py
1
9064
# -*- coding: utf-8 -*- """ RED Plugin Copyright (C) 2014 Olaf Lüke <olaf@tinkerforge.com> Copyright (C) 2014-2015 Matthias Bolte <matthias@tinkerforge.com> program_page_csharp.py: Program Wizard C# Page This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public ...
gpl-2.0
JingJunYin/tensorflow
tensorflow/contrib/keras/api/keras/utils/__init__.py
51
2105
# 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
gioman/QGIS
python/plugins/processing/algs/gdal/roughness.py
1
2919
# -*- coding: utf-8 -*- """ *************************************************************************** roughness.py --------------------- Date : October 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com ***************...
gpl-2.0
miniupnp/rust
src/etc/snapshot.py
37
8006
# Copyright 2011-2015 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or ht...
apache-2.0
endlessm/chromium-browser
third_party/google_input_tools/third_party/closure_library/closure/bin/scopify.py
329
6785
#!/usr/bin/python # # 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 # # ...
bsd-3-clause
stone5495/NewsBlur
vendor/tweepy/parsers.py
74
2622
# Tweepy # Copyright 2009-2010 Joshua Roesslein # See LICENSE for details. from tweepy.models import ModelFactory from tweepy.utils import import_simplejson from tweepy.error import TweepError class Parser(object): def parse(self, method, payload): """ Parse the response payload and return the r...
mit
h2oai/h2o
py/testdir_single_jvm/notest_GLM2_weight_nan_fail.py
9
1512
import unittest, random, sys, time sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_glm, h2o_import as h2i class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod def setUpClass(cls): global SEED SEED = h2o.setup_random_seed(...
apache-2.0
GGXH/python_koans
python_koans/python2/koans/about_dice_project.py
94
1895
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * import random class DiceSet(object): def __init__(self): self._values = None @property def values(self): return self._values def roll(self, n): # Needs implementing! # Tip: random.randint(min, m...
mit
pelson/numpy
numpy/doc/constants.py
94
8888
""" ========= Constants ========= Numpy includes several constants: %(constant_list)s """ # # Note: the docstring is autogenerated. # import textwrap, re # Maintain same format as in numpy.add_newdocs constants = [] def add_newdoc(module, name, doc): constants.append((name, doc)) add_newdoc('numpy', 'Inf', ...
bsd-3-clause
numpy/numpy
numpy/core/code_generators/numpy_api.py
11
20211
"""Here we define the exported functions, types, etc... which need to be exported through a global C pointer. Each dictionary contains name -> index pair. Whenever you change one index, you break the ABI (and the ABI version number should be incremented). Whenever you add an item to one of the dict, the API needs to ...
bsd-3-clause
nemomobile-graveyard/mcompositor
tests/functional/test19.py
4
1948
#!/usr/bin/python # Check that initial_state==IconicState windows can be raised/activated. #* Test steps # * show an initial_state==IconicState application window # * activate it # * check that it's on top # * close it # * show an initial_state==IconicState application window # * raise it #* Post-conditions # ...
lgpl-2.1
djgagne/scikit-learn
sklearn/metrics/__init__.py
214
3440
""" The :mod:`sklearn.metrics` module includes score functions, performance metrics and pairwise metrics and distance computations. """ from .ranking import auc from .ranking import average_precision_score from .ranking import coverage_error from .ranking import label_ranking_average_precision_score from .ranking imp...
bsd-3-clause
mike820324/microProxy
microproxy/test/viewer/test_formatter.py
1
20945
import StringIO import gzip import mock from pygments.token import Token import unittest from microproxy.context import HttpHeaders from microproxy.viewer.formatter import ( CssFormatter, ConsoleFormatter, HtmlFormatter, JsFormatter, JsonFormatter, PlainTextFormatter, TuiFormatter, URLEncodedFormatter, Xml...
mit
yrizk/django-blog
blogvenv/lib/python3.4/site-packages/pkg_resources/_vendor/packaging/__about__.py
257
1073
# Copyright 2014 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
apache-2.0
box/ClusterRunner
app/web_framework/cluster_master_application.py
1
18073
import http.client import os import urllib.parse import tornado.web import prometheus_client from app.master.slave import SlaveRegistry from app.util import analytics from app.util import log from app.util.conf.configuration import Configuration from app.util.decorators import authenticated from app.util.exceptions i...
apache-2.0
overtherain/scriptfile
software/googleAppEngine/lib/grizzled/grizzled/test/text/TestStr2Bool.py
19
1741
#!/usr/bin/python2.4 # $Id: 99b27c0fb42453577338855a901665a65a027dd4 $ # # Nose program for testing grizzled.file classes/functions # --------------------------------------------------------------------------- # Imports # --------------------------------------------------------------------------- import google3 from ...
mit
kiniou/qtile
libqtile/widget/yahoo_weather.py
2
5080
# -*- coding:utf-8 -*- # Copyright (c) 2011-2012 dmpayton # Copyright (c) 2011 Kenji_Takahashi # Copyright (c) 2011 Mounier Florian # Copyright (c) 2012, 2014-2015 Tycho Andersen # Copyright (c) 2013 David R. Andersen # Copyright (c) 2013 Tao Sauvage # Copyright (c) 2014 Sean Vig # # Permission is hereby granted, free ...
mit
torufuru/oolhackathon
ryu/tests/unit/packet/test_slow.py
29
45511
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # # 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 appli...
apache-2.0
CEG-FYP-OpenStack/scheduler
nova/cmd/cells.py
9
1357
# Copyright (c) 2012 Rackspace Hosting # 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 req...
apache-2.0
karkinosw/django-calaccess-raw-data
calaccess_raw/admin/__init__.py
29
4140
from calaccess_raw.admin.base import BaseAdmin from calaccess_raw.admin.campaign import ( CvrSoCdAdmin, Cvr2SoCdAdmin, CvrCampaignDisclosureCdAdmin, Cvr2CampaignDisclosureCdAdmin, RcptCdAdmin, Cvr3VerificationInfoCdAdmin, LoanCdAdmin, S401CdAdmin, ExpnCdAdmin, F495P2CdAdmin, ...
mit
archf/ansible
lib/ansible/module_utils/netcli.py
87
9650
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
mfcovington/djangocms-genome-browser
setup.py
1
2128
import os import sys from setuptools import setup if sys.version_info < (3, 2): print("Sorry, djangocms-genome-browser currently requires Python 3.2+.") sys.exit(1) # From: https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/ def read(*paths): """Build a file path from *paths* and re...
bsd-3-clause
Netscape007/kacak
lib/mimikatz.py
8
1560
__VERSION__ = '2.0' __AUTHOR__ = 'Galkan' __DATE__ = '2014' try: import sys import re from lib.common import * except ImportError,e: import sys sys.stdout.write("%s\n" %e) sys.exit(1) class Mimikatz: def __init__(self, mimikatz_file): self.mimikatz_file = mimikatz_file self.mimi...
mit
royc1/gpdb
gpMgmt/bin/gppylib/commands/san.py
30
1954
#!/usr/bin/env python # # Copyright (c) Greenplum Inc 2008. All Rights Reserved. # # Greenplum SAN related utility commands from gppylib.commands.base import * from gppylib.util.san_utils import SAN_CMDS #----------mount --------------- class Mount(Command): """Retrieves mount points.""" def __init__(sel...
apache-2.0
wunderlins/learning
python/django/lib/python2.7/site-packages/pip/req/req_set.py
53
32312
from __future__ import absolute_import from collections import defaultdict from itertools import chain import logging import os from pip._vendor import pkg_resources from pip._vendor import requests from pip.compat import expanduser from pip.download import (is_file_url, is_dir_url, is_vcs_url, url_to_path, ...
gpl-2.0
ssov/python-calc
ci/appveyor-bootstrap.py
9
4444
""" AppVeyor will at least have few Pythons around so there's no point of implementing a bootstrapper in PowerShell. This is a port of https://github.com/pypa/python-packaging-user-guide/blob/master/source/code/install.ps1 with various fixes and improvements that just weren't feasible to implement in PowerShell. """ f...
bsd-2-clause
jirikuncar/invenio-upgrader
invenio_upgrader/logging.py
20
2014
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2012, 2013, 2014 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 optio...
gpl-2.0
edwardzhou1980/bite-project
deps/gdata-python-client/samples/oauth/oauth_on_appengine/appengine_utilities/cron.py
129
18386
""" Copyright (c) 2008, appengine-utilities project 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 ...
apache-2.0
fujita/ryu
ryu/services/protocols/zebra/event.py
4
3530
# Copyright (C) 2017 Nippon Telegraph and Telephone Corporation. # # 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 appli...
apache-2.0
bulldy80/gyp_unofficial
test/msvs/external_builder/gyptest-all.py
260
1878
#!/usr/bin/env python # Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that msvs_external_builder being set will invoke the provided msvs_external_builder_build_cmd and msvs_external_builder_clean_c...
bsd-3-clause
qfma/ohnolog-dc
ase-estimation/parallel-bamsort-location.py
1
1424
#!/usr/bin/python # -*- coding: utf-8 -*- # # parallel-bamsort-location.py #============================================================================== import argparse import sys import os # Make utilities folder available sys.path.append(os.path.abspath("../")) from utilities.runner import exec_commands from ...
mit
michelts/lettuce
tests/integration/lib/Django-1.3/tests/regressiontests/inline_formsets/tests.py
51
6157
from django.forms.models import inlineformset_factory from django.test import TestCase from regressiontests.inline_formsets.models import Poet, Poem, School, Parent, Child class DeletionTests(TestCase): def test_deletion(self): PoemFormSet = inlineformset_factory(Poet, Poem, can_delete=True) poe...
gpl-3.0
aaronsp777/radishdisplay
display/firmware/stamp_revision.py
1
1652
#!/usr/bin/python2.4 # # Copyright 2009 Google 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
odoomrp/odoomrp-wip
purchase_landed_cost/__openerp__.py
8
1451
# -*- coding: utf-8 -*- # Copyright 2013 Joaquín Gutierrez # Copyright 2014-2017 Pedro M. Baeza <pedro.baeza@tecnativa.com> # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3 { 'name': 'Purchase landed costs - Alternative option', 'version': '8.0.2.5.0', "author": "OdooMRP team," "Ava...
agpl-3.0
renanrodm/namebench
nb_third_party/graphy/backends/google_chart_api/encoders.py
230
14800
#!/usr/bin/python2.4 # # Copyright 2008 Google 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 o...
apache-2.0
tayfun/django
django/contrib/gis/gdal/__init__.py
327
2635
""" This module houses ctypes interfaces for GDAL objects. The following GDAL objects are supported: CoordTransform: Used for coordinate transformations from one spatial reference system to another. Driver: Wraps an OGR data source driver. DataSource: Wrapper for the OGR data source object, supports OGR-su...
bsd-3-clause
socrateslee/pytumblr
tests/test_pytumblr.py
1
12769
from __future__ import unicode_literals from future import standard_library standard_library.install_aliases() import unittest import mock import json import pytumblr from urllib.parse import parse_qs import sys if sys.version_info < (2, 7): # python 2.6 may show ssl warnings, which we don't care about for these te...
apache-2.0
nuclearmistake/repo
subcmds/download.py
3
3325
# # Copyright (C) 2008 The Android Open Source Project # # 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 la...
apache-2.0
pradyunsg/pip
src/pip/_vendor/appdirs.py
22
25907
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2005-2010 ActiveState Software Inc. # Copyright (c) 2013 Eddy Petrișor """Utilities for determining application-specific dirs. See <http://github.com/ActiveState/appdirs> for details and usage. """ # Dev Notes: # - MSDN on where to store app data files: # ...
mit
superberny70/pelisalacarta
python/main-classic/servers/zippyshare.py
2
2457
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para zippyshare # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ # ------------------------------------------------------------ import re from core import httptools from core import ...
gpl-3.0