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
mathslinux/ceilometer
ceilometer/network/services/fwaas.py
9
3063
# # Copyright 2014 Cisco Systems,Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
odyaka341/django-page-cms
doc/conf.py
5
6433
# -*- coding: utf-8 -*- # # django-page-cms documentation build configuration file, created by # sphinx-quickstart on Sun Jul 19 23:15:46 2009. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't...
bsd-3-clause
Dapid/scipy
scipy/optimize/linesearch.py
61
24200
""" Functions --------- .. autosummary:: :toctree: generated/ line_search_armijo line_search_wolfe1 line_search_wolfe2 scalar_search_wolfe1 scalar_search_wolfe2 """ from __future__ import division, print_function, absolute_import from warnings import warn from scipy.optimize import minpack2 i...
bsd-3-clause
ykim362/mxnet
python/mxnet/gluon/data/dataset.py
4
2943
# 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 u...
apache-2.0
webmasterraj/GaSiProMo
flask/lib/python2.7/site-packages/shapely/geometry/polygon.py
5
16303
"""Polygons and their linear ring components """ import sys if sys.version_info[0] < 3: range = xrange from ctypes import c_double, c_void_p, cast, POINTER from ctypes import ArgumentError import weakref from shapely.algorithms.cga import signed_area from shapely.coords import required from shapely.geos import ...
gpl-2.0
avedaee/DIRAC
DataManagementSystem/Client/ReplicaContainers.py
1
4513
# $HeadURL$ __RCSID__ = "$Id$" """ This module contains three classes associated to Replicas. The Replica class contains simply three member elements: SE, PFN and Status and provides access methods for each (inluding type checking). The CatalogReplica class inherits the Replica class. The PhysicalReplica...
gpl-3.0
MartynShaw/audacity
lib-src/lv2/sratom/waflib/Tools/d_config.py
316
1208
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file from waflib import Utils from waflib.Configure import conf @conf def d_platform_flags(self): v=self.env if not v.DEST_OS: v.DEST_OS=Utils.unversioned_sys_platform() binfm...
gpl-2.0
Acehaidrey/incubator-airflow
airflow/providers/microsoft/azure/secrets/azure_key_vault.py
7
6445
# 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 u...
apache-2.0
zaina/nova
plugins/xenserver/networking/etc/xensource/scripts/ovs_configure_vif_flows.py
99
10338
#!/usr/bin/env python # Copyright 2011 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-...
apache-2.0
erikrose/oedipus
oedipus/results.py
1
4275
class SearchResults(object): """Results in the order in which they came out of Sphinx Since Sphinx stores no non-numerical attributes, we have to reach into the DB to pull them out. """ def __init__(self, type, ids, fields): self.type = type # Sphinx may return IDs of objects since...
bsd-3-clause
arjunasuresh3/Mypykoans
python 2/koans/about_monkey_patching.py
1
1451
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Related to AboutOpenClasses in the Ruby Koans # from runner.koan import * class AboutMonkeyPatching(Koan): class Dog(object): def bark(self): return "WOOF" def test_as_defined_dogs_do_bark(self): fido = self.Dog() self...
mit
vbtdung/DCTCP-assignment
dctcp-assignment/util/plot_tcpprobe.py
3
2603
from helper import * from collections import defaultdict import argparse parser = argparse.ArgumentParser() parser.add_argument('-p', '--port', dest="port", default='5001') parser.add_argument('-f', dest="files", nargs='+', required=True) parser.add_argument('-o', '--out', dest="out", default=None) parser.add_argument...
unlicense
siouka/dmind
plugin.video.veetle/flvlib/astypes.py
98
8332
import os import calendar import datetime import logging from primitives import * from constants import * from helpers import OrderedAttrDict, utc """ The AS types and their FLV representations. """ log = logging.getLogger('flvlib.astypes') class MalformedFLV(Exception): pass # Number def get_number(f, max_...
gpl-2.0
ColinIanKing/autotest
client/shared/test_utils/mock_demo.py
7
3155
#!/usr/bin/python __author__ = "raphtee@google.com (Travis Miller)" import mock, mock_demo_MUT class MyError(Exception): pass class A(object): var = 8 def __init__(self): self.x = 0 def method1(self): self.x += 1 return self.x def method2(self, y): return y * ...
gpl-2.0
cccfran/sympy
sympy/assumptions/handlers/calculus.py
18
8089
""" This module contains query handlers responsible for calculus queries: infinitesimal, bounded, etc. """ from __future__ import print_function, division from sympy.logic.boolalg import conjuncts from sympy.assumptions import Q, ask from sympy.assumptions.handlers import CommonHandler class AskInfinitesimalHandler(...
bsd-3-clause
NeCTAR-RC/neutron
neutron/api/rpc/handlers/metadata_rpc.py
58
1561
# Copyright (c) 2014 OpenStack Foundation. # # 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
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/pygame/tests/test_utils/run_tests.py
6
12020
import sys if __name__ == '__main__': sys.exit("This module is for import only") test_pkg_name = '.'.join(__name__.split('.')[0:-2]) is_pygame_pkg = test_pkg_name == 'pygame.tests' test_runner_mod = test_pkg_name + '.test_utils.test_runner' if is_pygame_pkg: from pygame.tests.test_utils import import_submodu...
gpl-3.0
Tagar/incubator-airflow
airflow/hooks/oracle_hook.py
3
6157
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
TalShafir/ansible
lib/ansible/modules/system/locale_gen.py
50
7255
#!/usr/bin/python # -*- coding: utf-8 -*- # 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
strukturag/vlc-2.1
extras/misc/mpris.py
117
9763
#!/usr/bin/env python # -*- coding: utf8 -*- # # Copyright © 2006-2011 Rafaël Carré <funman at videolanorg> # # 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, ...
gpl-2.0
strint/tensorflow
tensorflow/contrib/framework/python/framework/experimental.py
179
2476
# 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
Eficent/account-invoice-reporting
__unported__/invoice_report_assemble/res_config.py
10
1813
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Vaucher # Copyright 2013 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
agpl-3.0
havt/odoo
addons/delivery/delivery.py
64
13497
# -*- 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
darkleons/lama
addons/document/test_cindex.py
444
1553
#!/usr/bin/python import sys import os import glob import time import logging from optparse import OptionParser logging.basicConfig(level=logging.DEBUG) parser = OptionParser() parser.add_option("-q", "--quiet", action="store_false", dest="verbose", default=True, help="don't prin...
agpl-3.0
CameronLonsdale/sec-tools
python2/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py
360
18615
from __future__ import absolute_import from contextlib import contextmanager import zlib import io from socket import timeout as SocketTimeout from socket import error as SocketError from ._collections import HTTPHeaderDict from .exceptions import ( ProtocolError, DecodeError, ReadTimeoutError, ResponseNotChunked ...
mit
jbtule/keyczar
cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Tool/tex.py
19
25091
"""SCons.Tool.tex Tool-specific initialization for TeX. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permiss...
apache-2.0
tiagocoutinho/bliss
examples/ct2/card/acq1.py
1
5788
""" ESRF-BCU acquisition with internal master: counter 11 counts the acquisition time (using internal clock); counter 12 counts the number of points """ import os import sys import time import pprint import logging import argparse import datetime import numpy from bliss.controllers.ct2.card import (P201Card, Clock, ...
lgpl-3.0
j-griffith/cinder
cinder/tests/unit/db/test_purge.py
3
17492
# Copyright (C) 2015 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 ...
apache-2.0
amyvmiwei/kbengine
kbe/src/lib/python/Lib/idlelib/PathBrowser.py
10
2877
import os import sys import importlib.machinery from idlelib.TreeWidget import TreeItem from idlelib.ClassBrowser import ClassBrowser, ModuleBrowserTreeItem class PathBrowser(ClassBrowser): def __init__(self, flist): self.init(flist) def settitle(self): self.top.wm_title("Path Browser") ...
lgpl-3.0
rbalda/neural_ocr
env/lib/python2.7/site-packages/matplotlib/compat/subprocess.py
19
2827
""" A replacement wrapper around the subprocess module, with a number of work-arounds: - Provides the check_output function (which subprocess only provides from Python 2.7 onwards). - Provides a stub implementation of subprocess members on Google App Engine (which are missing in subprocess). Instead of importing s...
mit
jaggu303619/asylum
openerp/addons/l10n_it/__openerp__.py
165
2072
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010 # OpenERP Italian Community (<http://www.openerp-italia.org>) # Servabit srl # Agile Business Group sagl # Domsense srl # Albato...
agpl-3.0
open-homeautomation/home-assistant
homeassistant/components/tts/__init__.py
3
16938
""" Provide functionality to TTS. For more details about this component, please refer to the documentation at https://home-assistant.io/components/tts/ """ import asyncio import ctypes import functools as ft import hashlib import logging import mimetypes import os import re import io from aiohttp import web import vo...
apache-2.0
alanljj/connector-telephony
asterisk_click2dial/scripts/set_name_agi.py
8
17048
#! /usr/bin/python # -*- encoding: utf-8 -*- # Copyright (C) 2010-2015 Alexis de Lattre <alexis.delattre@akretion.com> # # 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...
agpl-3.0
leeseuljeong/leeseulstack_neutron
neutron/plugins/openvswitch/common/constants.py
11
2390
# Copyright (c) 2012 OpenStack Foundation. # # 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
RHavar/bitcoin
test/functional/p2p_leak.py
14
5283
#!/usr/bin/env python3 # Copyright (c) 2017-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test message sending before handshake completion. A node should never send anything other than VERSION...
mit
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Demo/tkinter/matt/menu-simple.py
12
3251
from Tkinter import * # some vocabulary to keep from getting confused. This terminology # is something I cooked up for this file, but follows the man pages # pretty closely # # # # This is a MENUBUTTON # V # +-------------+ # | | # # +------------++------------++------------+ # | || ...
mit
vikatory/kbengine
kbe/src/lib/python/Lib/test/test_abc.py
80
13652
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Unit tests for abc.py.""" import unittest from test import support import abc from inspect import isabstract class TestLegacyAPI(unittest.TestCase): def test_abstractproperty_basics(self): @abc.abstr...
lgpl-3.0
EricSB/nupic
tests/integration/nupic/algorithms/monitor_mixin/temporal_memory_monitor_mixin_test.py
5
7606
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
ccortezb/troposphere
troposphere/autoscaling.py
16
9610
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSHelperFn, AWSObject, AWSProperty, Ref, FindInMap from .validators import boolean, integer from . import cloudformation EC2_INSTANCE_LAUNCH = "autoscaling:EC2_INSTANCE_LAUNCH" EC2_INSTAN...
bsd-2-clause
FluidityProject/fluidity
tests/mms_p1dgp2_stressform_br_sp/mms_p1dgp2_stressform_rb_sp_tools.py
6
1028
from math import sin, cos, tanh, pi, e, sqrt def u(X): return cos(X[0]) + cos(X[1]) def v(X): return X[1]*sin(X[0]) def nu(X): return -1.20*sin(0.300*X[0]*X[1]) + 1.20*sin(1.70*X[0]) + 1.40*cos(1.10*X[1]) + 4.00 def forcing_u(X): return -(cos(X[0]) - cos(X[1]))*(-1.20*sin(0.300*X[0]*X[1]) + 1.20*sin...
lgpl-2.1
chauhanhardik/populo
cms/djangoapps/contentstore/tests/test_import.py
59
12689
# -*- coding: utf-8 -*- # pylint: disable=protected-access """ Tests for import_course_from_xml using the mongo modulestore. """ from django.test.client import Client from django.test.utils import override_settings from django.conf import settings import ddt import copy from openedx.core.djangoapps.content.course_str...
agpl-3.0
BonexGu/Blik2D-SDK
Blik2D/addon/tensorflow-1.2.1_for_blik/tensorflow/contrib/learn/python/learn/dataframe/transforms/difference.py
90
2389
# 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...
mit
Deepakkothandan/ansible
lib/ansible/cli/__init__.py
4
38410
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016, Toshio Kuratomi <tkuratomi@ansible.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, eithe...
gpl-3.0
beni55/edx-platform
common/djangoapps/util/memcache.py
251
1344
""" This module provides a KEY_FUNCTION suitable for use with a memcache backend so that we can cache any keys, not just ones that memcache would ordinarily accept """ from django.utils.encoding import smart_str import hashlib import urllib def fasthash(string): """ Hashes `string` into a string representatio...
agpl-3.0
raajitr/django_hangman
env/lib/python2.7/site-packages/django/core/cache/backends/base.py
57
9737
"Base Cache class." from __future__ import unicode_literals import time import warnings from django.core.exceptions import DjangoRuntimeWarning, ImproperlyConfigured from django.utils.module_loading import import_string class InvalidCacheBackendError(ImproperlyConfigured): pass class CacheKeyWarning(DjangoRun...
mit
eirannejad/pyRevit
pyrevitlib/pyrevit/versionmgr/upgrade.py
1
1082
"""Perform upgrades between version, e.g. adding a new config parameter""" #pylint: disable=W0611 import os import os.path as op from pyrevit.coreutils import appdata def upgrade_user_config(user_config): #pylint: disable=W0613 """Upgarde user configurations. Args: user_config (:obj:`pyrevit.userc...
gpl-3.0
AndrewGrossman/django
tests/template_tests/filter_tests/test_dictsortreversed.py
342
1066
from django.template.defaultfilters import dictsortreversed from django.test import SimpleTestCase class FunctionTests(SimpleTestCase): def test_sort(self): sorted_dicts = dictsortreversed( [{'age': 23, 'name': 'Barbara-Ann'}, {'age': 63, 'name': 'Ra Ra Rasputin'}, {...
bsd-3-clause
wtsi-hgi/docker-icat
tests/test_builds.py
1
3327
import logging import os import unittest from abc import ABCMeta from typing import List, Optional, Tuple, Union import docker from hgicommon.docker.client import create_client from hgicommon.helpers import create_random_string from hgicommon.testing import create_tests, TestUsingObject, ObjectTypeUsedInTest from tes...
gpl-3.0
tedlaz/pyted
misthodosia/m13a/fmy.py
1
2802
# -*- coding: utf-8 -*- ''' Created on 16 Ιαν 2013 @author: tedlaz ''' from utils import dec as d def f13(poso): poso = d(poso) ekp = d(0) if poso < d(21500): ekp = d(2100) elif poso < d(22500): ekp = d(2000) elif poso < d(23500): ekp = d(1900) el...
gpl-3.0
igemsoftware/SYSU-Software2013
project/Python27_32/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. ...
mit
gangadhar-kadam/nassimlib
webnotes/utils/file_manager.py
33
6643
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import webnotes import os, base64, re from webnotes.utils import cstr, cint, get_site_path from webnotes import _ from webnotes import conf class MaxFileSizeReachedError(webn...
mit
Sorsly/subtle
google-cloud-sdk/lib/surface/genomics/variantsets/list.py
3
2113
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
mit
iDTLabssl/hr
hr_unported/hr_payroll_register_report/__openerp__.py
20
1512
# -*- coding:utf-8 -*- # # # Copyright (C) 2011,2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # 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...
agpl-3.0
mkieszek/odoo
addons/hr_payroll/wizard/hr_payroll_contribution_register_report.py
47
1128
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import time from datetime import datetime from dateutil import relativedelta from openerp.osv import fields, osv class payslip_lines_contribution_register(osv.osv_memory): _name = 'payslip.lines.contribution.regist...
agpl-3.0
sonali0901/zulip
zerver/management/commands/dump_messages.py
7
1529
from __future__ import absolute_import from __future__ import print_function from typing import Any from optparse import make_option from django.core.management.base import BaseCommand, CommandParser from zerver.models import get_realm, Message, Realm, Stream, Recipient import datetime import time class Command(Bas...
apache-2.0
ltiao/networkx
networkx/algorithms/bipartite/tests/test_basic.py
14
3970
#!/usr/bin/env python from nose.tools import * from nose import SkipTest from nose.plugins.attrib import attr import networkx as nx from networkx.algorithms import bipartite class TestBipartiteBasic: def test_is_bipartite(self): assert_true(bipartite.is_bipartite(nx.path_graph(4))) assert_true(bip...
bsd-3-clause
chouseknecht/ansible
test/units/executor/test_task_executor.py
5
23759
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
zhouzhenghui/python-for-android
python3-alpha/python3-src/Lib/test/test_imp.py
48
13451
import imp import os import os.path import shutil import sys import unittest from test import support import importlib class LockTests(unittest.TestCase): """Very basic test of import lock functions.""" def verify_lock_state(self, expected): self.assertEqual(imp.lock_held(), expected, ...
apache-2.0
miguelparaiso/OdooAccessible
addons/mail/mail_message.py
141
47462
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
tuxfux-hlp-notes/python-batches
archieves/batch-62/files/myenv/lib/python2.7/site-packages/pip/commands/list.py
339
11369
from __future__ import absolute_import import json import logging import warnings try: from itertools import zip_longest except ImportError: from itertools import izip_longest as zip_longest from pip._vendor import six from pip.basecommand import Command from pip.exceptions import CommandError from pip.index...
gpl-3.0
perchrn/TaktPlayer
gui/configurationGui/CurveGui.py
1
32833
''' Created on 27. dec. 2012 @author: pcn ''' import wx from widgets.PcnImageButton import PcnImageButton from widgets.PcnCurveDisplayWindget import PcnCurveDisplayWidget from widgets.PcnEvents import EVT_DOUBLE_CLICK_EVENT, EVT_MOUSE_MOVE_EVENT from configurationGui.UtilityDialogs import updateChoices fro...
gpl-2.0
andykimpe/chromium-test-npapi
tools/telemetry/telemetry/value/string.py
10
2139
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry import value as value_module from telemetry.value import list_of_string_values class StringValue(value_module.Value): def __init__(self, pa...
bsd-3-clause
endlessm/chromium-browser
third_party/logilab/logilab/astroid/brain/py2gi.py
66
4619
"""Astroid hooks for the Python 2 GObject introspection bindings. Helps with understanding everything imported from 'gi.repository' """ import inspect import itertools import sys import re from astroid import MANAGER, AstroidBuildingException from astroid.builder import AstroidBuilder _inspected_modules = {} _ide...
bsd-3-clause
khushboo9293/mailman3
src/mailman/app/tests/test_membership.py
7
10736
# Copyright (C) 2011-2015 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # # GNU Mailman 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 you...
gpl-2.0
ondra-novak/blink
Tools/Scripts/webkitpy/common/net/unittestresults.py
155
2347
# Copyright (c) 2012, Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the...
bsd-3-clause
tlatzko/spmcluster
.tox/2.6-cover/lib/python2.6/site-packages/pip/_vendor/__init__.py
252
2508
""" pip._vendor is for vendoring dependencies of pip to prevent needing pip to depend on something external. Files inside of pip._vendor should be considered immutable and should only be updated to versions from upstream. """ from __future__ import absolute_import import glob import os.path import sys # Downstream r...
bsd-2-clause
MarcoFalke/bitcoin
test/functional/wallet_create_tx.py
6
3341
#!/usr/bin/env python3 # Copyright (c) 2018-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( asse...
mit
mrkm4ntr/incubator-airflow
airflow/providers/amazon/aws/sensors/sagemaker_endpoint.py
7
2048
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
pombredanne/rekall
rekall-core/rekall/plugins/windows/kpcr.py
7
3975
# Rekall Memory Forensics # # Copyright 2013 Google Inc. All Rights Reserved. # # Authors: # Michael Cohen <scudette@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2...
gpl-2.0
rbalda/neural_ocr
env/lib/python2.7/site-packages/pybrain/rl/environments/functions/function.py
3
1960
__author__ = 'Tom Schaul, tom@idsia.ch' from scipy import zeros, array, ndarray from pybrain.rl.environments import Environment from pybrain.structure.parametercontainer import ParameterContainer from pybrain.rl.environments.fitnessevaluator import FitnessEvaluator class FunctionEnvironment(Environment, FitnessEval...
mit
xpclove/autofp
strategy/strategy_neutron_tof.py
1
2601
'''strategy setting file, note: this is an important file. You should be careful when modifying the file. Please keep the format. The words is case sensitive. You can modify parameters group order in 'param_order' and parameters group in 'param_group'. ''' strategy={ "neutron_tof":{ # task type ...
gpl-3.0
akhilari7/pa-dude
lib/python2.7/site-packages/django/views/defaults.py
339
3567
from django import http from django.template import Context, Engine, TemplateDoesNotExist, loader from django.utils import six from django.utils.encoding import force_text from django.views.decorators.csrf import requires_csrf_token # This can be called when CsrfViewMiddleware.process_view has not run, # therefore ne...
mit
randymxj/OpenPythonSensor
lib_mpu6050/lib_mpu6050.py
2
4879
#!/usr/bin/python import time, datetime, math from ops_i2cbase import I2CBase # =========================================================================== # MPU6050 Class # # Ported from http://blog.bitify.co.uk/2013/11/reading-data-from-mpu-6050-on-raspberry.html # ==================================================...
mit
np/alot
alot/settings/checks.py
9
4769
# Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file import mailbox import re from urwid import AttrSpec, AttrSpecError from urlparse import urlparse from validate import VdtTypeError from...
gpl-3.0
halvertoluke/edx-platform
cms/djangoapps/contentstore/management/commands/force_publish.py
61
3385
""" Script for force publishing a course """ from django.core.management.base import BaseCommand, CommandError from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from .prompt import query_y...
agpl-3.0
wschwa/Mr-Orange-Sick-Beard
lib/requests/packages/chardet2/gb2312freq.py
323
36001
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
gpl-3.0
johndbritton/gitviz
dulwich/dulwich/server.py
2
29132
# server.py -- Implementation of the server side git protocols # Copyright (C) 2008 John Carr <john.carr@unrouted.co.uk> # # 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; version 2 # or (at your...
mit
spesmilo/electrum
electrum/tests/test_lnrouter.py
1
40777
from math import inf import unittest import tempfile import shutil import asyncio from electrum.util import bh2u, bfh, create_and_start_event_loop from electrum.lnutil import ShortChannelID from electrum.lnonion import (OnionHopsDataSingle, new_onion_packet, process_onion_packet, _decode_...
mit
arnedesmedt/dotfiles
.config/sublime-text-3/Packages.symlinkfollow/pygments/all/pygments/formatters/rtf.py
50
5049
# -*- coding: utf-8 -*- """ pygments.formatters.rtf ~~~~~~~~~~~~~~~~~~~~~~~ A formatter that generates RTF files. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pygments.util import get_i...
mit
bbsan2k/nzbToMedia
libs/unidecode/x094.py
252
4661
data = ( 'Kui ', # 0x00 'Si ', # 0x01 'Liu ', # 0x02 'Nao ', # 0x03 'Heng ', # 0x04 'Pie ', # 0x05 'Sui ', # 0x06 'Fan ', # 0x07 'Qiao ', # 0x08 'Quan ', # 0x09 'Yang ', # 0x0a 'Tang ', # 0x0b 'Xiang ', # 0x0c 'Jue ', # 0x0d 'Jiao ', # 0x0e 'Zun ', # 0x0f 'Liao ', # 0x...
gpl-3.0
Shrhawk/edx-platform
lms/djangoapps/mobile_api/social_facebook/preferences/views.py
86
1597
""" Views for users sharing preferences """ from rest_framework import generics, status from rest_framework.response import Response from openedx.core.djangoapps.user_api.preferences.api import get_user_preferences, set_user_preference from ...utils import mobile_view from . import serializers @mobile_view() class ...
agpl-3.0
batxes/4c2vhic
Six_zebra_models/Six_zebra_models_final_output_0.1_-0.1_13000/Six_zebra_models9343.py
2
13928
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
gpl-3.0
ycaihua/scikit-learn
sklearn/preprocessing/tests/test_imputation.py
28
11950
import numpy as np from scipy import sparse from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_raises from sklearn.utils.testing import assert_false from sklearn.utils.testing import assert_true from sklearn.preprocessing.imputa...
bsd-3-clause
Sorsly/subtle
google-cloud-sdk/platform/gsutil/third_party/apitools/run_pylint.py
3
8173
# # Copyright 2015 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 or agreed to in writing...
mit
alexmogavero/home-assistant
homeassistant/components/device_tracker/mikrotik.py
4
5539
""" Support for Mikrotik routers as device tracker. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/device_tracker.mikrotik/ """ import logging import threading from datetime import timedelta import voluptuous as vol import homeassistant.helpers.config_...
apache-2.0
jkenn99/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/checkout/diff_parser_unittest.py
124
8145
# Copyright (C) 2009 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
SamStudio8/scikit-bio
skbio/sequence/tests/test_sequence.py
2
106092
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
bsd-3-clause
angr/angr
angr/analyses/decompiler/optimization_passes/mod_simplifier.py
1
2880
import logging from ailment import Expr from ... import AnalysesHub from .engine_base import SimplifierAILEngine, SimplifierAILState from .optimization_pass import OptimizationPass, OptimizationPassStage _l = logging.getLogger(name=__name__) class ModSimplifierAILEngine(SimplifierAILEngine): def _ail_handle_Su...
bsd-2-clause
Team-Blackout/EvilZ.213.BLACKOUT_edition
tools/perf/scripts/python/check-perf-trace.py
11214
2503
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
gpl-2.0
WhireCrow/openwrt-mt7620
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/lib2to3/tests/test_pytree.py
131
17346
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Unit tests for pytree.py. NOTE: Please *don't* add doc strings to individual test methods! In verbose mode, printing of the module, class and method name is much more helpful than printing of (the first line of) the...
gpl-2.0
nash-x/hws
neutron/db/migration/alembic_migrations/agent_init_ops.py
17
1725
# Copyright 2014 OpenStack Foundation # # 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
mark-adams/python-social-auth
social/backends/mineid.py
72
1257
from social.backends.oauth import BaseOAuth2 class MineIDOAuth2(BaseOAuth2): """MineID OAuth2 authentication backend""" name = 'mineid' _AUTHORIZATION_URL = '%(scheme)s://%(host)s/oauth/authorize' _ACCESS_TOKEN_URL = '%(scheme)s://%(host)s/oauth/access_token' ACCESS_TOKEN_METHOD = 'POST' SCOPE...
bsd-3-clause
sajuptpm/murano
murano/dsl/typespec.py
3
2113
# Copyright (c) 2014 Mirantis, 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
jpburstrom/sampleman
mutagen/ogg.py
5
17692
# Copyright 2006 Joe Wreschnig # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # $Id: ogg.py 3975 2007-01-13 21:51:17Z piman $ """Read and write Ogg bitstreams and pages. This mo...
gpl-3.0
d40223223/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/_csv.py
639
21705
"""CSV parsing and writing. [Copied from PyPy https://bitbucket-assetroot.s3.amazonaws.com/pypy/pypy/1400171824.19/641/_csv.py?Signature=cc%2Bc8m06cBMbsxt2e15XXXUDACk%3D&Expires=1404136251&AWSAccessKeyId=0EMWEFSGA12Z1HF1TZ82 and adapted to Python 3 syntax for Brython] This module provides classes that assist in the ...
gpl-3.0
hassanabidpk/django
django/conf/locale/eo/formats.py
504
2335
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'j\-\a \d\e F Y' # '26-a ...
bsd-3-clause
BeyondTheClouds/nova
nova/tests/unit/api/openstack/compute/test_shelve.py
8
6956
# 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
saurabh6790/medsynaptic1-app
patches/may_2013/p02_update_valuation_rate.py
30
1376
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes def execute(): from stock.stock_ledger import update_entries_after item_warehouse = [] # update valuation_rate in transaction doc...
agpl-3.0
ThirdProject/android_external_chromium_org
components/policy/tools/syntax_check_policy_template_json.py
51
18860
#!/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. ''' Checks a policy_templates.json file for conformity to its syntax specification. ''' import json import optparse import os impo...
bsd-3-clause
resmo/ansible
lib/ansible/plugins/connection/lxd.py
74
4629
# (c) 2016 Matt Clay <matt@mystile.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 = """ author: Matt Clay <matt@mystile.com> conne...
gpl-3.0