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
Jay-Jay-D/LeanSTP
Algorithm.Python/ScheduledUniverseSelectionModelRegressionAlgorithm.py
2
5460
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect 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 Lice...
apache-2.0
RT-Thread/rt-thread
bsp/stm32/stm32f107-uc-eval/rtconfig.py
28
4023
import os # toolchains options ARCH='arm' CPU='cortex-m3' CROSS_TOOL='gcc' # bsp lib config BSP_LIBRARY_TYPE = None if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') if os.getenv('RTT_ROOT'): RTT_ROOT = os.getenv('RTT_ROOT') # cross_tool provides the cross compiler # EXEC_PATH is the compiler execute...
apache-2.0
kdar/Wox
PythonHome/Lib/site-packages/pip/_vendor/requests/packages/chardet/gb2312prober.py
2994
1681
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Reserved. # # Con...
mit
jvoegele/picard
picard/ui/collectionmenu.py
2
3181
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2013 Michael Wiencek # # 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 Licens...
gpl-2.0
ctb/cvxpy
cvxpy/atoms/affine/upper_tri.py
11
2344
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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. CVXPY is distributed i...
gpl-3.0
nikhilprathapani/python-for-android
python-modules/zope/zope/interface/tests/test_interface.py
50
16077
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
apache-2.0
Kraymer/beets
beetsplug/bucket.py
13
8178
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Fabrice Laporte. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation ...
mit
jeffmurphy/cif-router
poc/cif-router.py
1
21349
#!/usr/bin/python # # # cif-router proof of concept # # cif-router [-p pubport] [-r routerport] [-m myname] [-h] # -p default: 5556 # -r default: 5555 # -m default: cif-router # # cif-router is a zmq device with the following sockets: # XPUB # for republishing messages # XSUB # ...
bsd-3-clause
liyu1990/sklearn
sklearn/linear_model/stochastic_gradient.py
31
50760
# Authors: Peter Prettenhofer <peter.prettenhofer@gmail.com> (main author) # Mathieu Blondel (partial_fit support) # # License: BSD 3 clause """Classification and regression using Stochastic Gradient Descent (SGD).""" import numpy as np from abc import ABCMeta, abstractmethod from ..externals.joblib import ...
bsd-3-clause
Timurdov/bionic
bionic/Lib/site-packages/pip-1.3.1-py2.7.egg/pip/backwardcompat/__init__.py
63
3519
"""Stuff that differs in different Python versions""" import os import imp import sys import site __all__ = ['WindowsError'] uses_pycache = hasattr(imp, 'cache_from_source') class NeverUsedException(Exception): """this exception should never be raised""" try: WindowsError = WindowsError except NameError: ...
apache-2.0
waytai/odoo
addons/sale_journal/__openerp__.py
262
2637
# -*- 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
Bismarrck/tensorflow
tensorflow/python/saved_model/saved_model_test.py
13
64354
# 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
EmilianStankov/Viridis-Media-Player
source/playlist_tests.py
1
1257
import unittest from playlist import Playlist, load_playlist_from_db class TestPlaylist(unittest.TestCase): """Playlist tests""" def setUp(self): self.pl = Playlist("playlist", ["song_one", "song_two"]) self.pl.save_to_db() def tearDown(self): self.pl.delete_from_db() def te...
gpl-3.0
fdouetteau/PyBabe
pybabe/pivot.py
1
2935
try: from collections import OrderedDict except: ## 2.6 Fallback from ordereddict import OrderedDict from base import StreamHeader, StreamFooter, BabeBase class OrderedDefaultdict(OrderedDict): def __init__(self, *args, **kwargs): newdefault = None newargs = () if args: ...
bsd-3-clause
rbn42/stiler
config.py
1
1027
WinBorder = 2 LeftPadding = 15 BottomPadding = 15 TopPadding = BottomPadding RightPadding = BottomPadding NavigateAcrossWorkspaces = True # availabe in Unity7 TempFile = "/dev/shm/.stiler_db" LockFile = "/dev/shm/.stiler.lock" # This is the congiguration that works for unity7. If you are using a # different Desktop ...
mit
MattFaus/CrowdTube-Connector
lib/gdata-2.0.18/tests/gdata_tests/apps/emailsettings/live_client_test.py
23
12853
#!/usr/bin/python # # Copyright 2010 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 b...
mit
doduytrung/odoo-8.0
addons/purchase/stock.py
6
15030
# -*- 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
janssen/kivy
kivy/garden/__init__.py
59
3061
''' Garden ====== .. versionadded:: 1.7.0 .. versionchanged:: 1.8.0 Garden is a project to centralize addons for Kivy maintained by users. You can find more information at `Kivy Garden <http://kivy-garden.github.io/>`_. All the garden packages are centralized on the `kivy-garden Github <https://github.com/kivy-garde...
mit
synconics/odoo
addons/account_budget/wizard/__init__.py
444
1196
# -*- 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
NikiStanchev/SoftUni
AngularFundamentals/Angular2/Redux/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py
1361
45045
# 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. r"""Code to validate and convert settings of the Microsoft build tools. This file contains code to validate and convert settings of the Microsoft build tools. Th...
mit
ltilve/ChromiumGStreamerBackend
chromecast/tools/build/generate_test_lists.py
32
4698
#!/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. """Helper script to generate unit test lists for the Chromecast build scripts. """ import glob import optparse import sys def Combin...
bsd-3-clause
ojii/sandlib
lib/lib_pypy/_ctypes/primitive.py
1
11496
import _ffi import _rawffi import weakref import sys SIMPLE_TYPE_CHARS = "cbBhHiIlLdfguzZqQPXOv?" from _ctypes.basics import _CData, _CDataMeta, cdata_from_address,\ CArgObject from _ctypes.builtin import ConvMode from _ctypes.array import Array from _ctypes.pointer import _Pointer, as_ffi_pointer #from _ctypes....
bsd-3-clause
LoHChina/nova
nova/tests/unit/virt/hyperv/test_rdpconsoleutils.py
83
1101
# Copyright 2013 Cloudbase Solutions Srl # # 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 ...
apache-2.0
skearnes/pylearn2
pylearn2/sandbox/cuda_convnet/tests/test_response_norm.py
4
1500
import numpy import theano from nose.plugins.skip import SkipTest from theano.tests.unittest_tools import verify_grad try: from pylearn2.sandbox.cuda_convnet.response_norm import ( CrossMapNorm, CrossMapNormUndo ) from theano.sandbox.cuda import CudaNdarrayType, CudaNdarray from theano....
bsd-3-clause
joe820730/xiaomi_aries_kernel
tools/perf/scripts/python/net_dropmonitor.py
4235
1554
# Monitor the system for dropped packets and proudce a report of drop locations and counts import os import sys sys.path.append(os.environ['PERF_EXEC_PATH'] + \ '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') from perf_trace_context import * from Core import * from Util import * drop_log = {} kallsyms = [] def...
gpl-2.0
bnsgeyer/Copter3_4
mk/VRBRAIN/Tools/genmsg/src/genmsg/gentools.py
51
6819
#! /usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of ...
gpl-3.0
M4sse/chromium.src
third_party/tlslite/tlslite/utils/openssl_aes.py
202
1944
# Author: Trevor Perrin # See the LICENSE file for legal information regarding use of this file. """OpenSSL/M2Crypto AES implementation.""" from .cryptomath import * from .aes import * if m2cryptoLoaded: def new(key, mode, IV): return OpenSSL_AES(key, mode, IV) class OpenSSL_AES(AES): def ...
bsd-3-clause
jss-emr/openerp-7-src
openerp/addons/hr_timesheet_invoice/wizard/hr_timesheet_analytic_profit.py
52
3163
# -*- 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
kubeflow/kubeflow
py/kubeflow/kubeflow/ci/common_ui_tests.py
1
4563
""""Argo Workflow for running frontend unit tests""" from kubeflow.kubeflow.ci import workflow_utils from kubeflow.testing import argo_build_util class Builder(workflow_utils.ArgoTestBuilder): def __init__(self, name=None, namespace=None, bucket=None, test_target_name=None, **kwargs): sup...
apache-2.0
mongolab/mongoctl
mongoctl/tests/sharded_test.py
1
2582
# The MIT License # Copyright (c) 2012 ObjectLabs Corporation # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, mo...
mit
jamasi/Xtal-xplore-R
gui/doublespinslider.py
1
3682
# -*- coding: utf-8 -*- """DoubleSpinSlider - a custom widget combining a slider with a spinbox Copyright (C) 2014 Jan M. Simons <marten@xtal.rwth-aachen.de> 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...
agpl-3.0
rbharath/deepchem
examples/qm9/qm9_tf_model.py
2
1512
""" Script that trains Tensorflow multitask models on QM9 dataset. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals import os import deepchem as dc import numpy as np from qm9_datasets import load_qm9 np.random.seed(123) qm9_tasks, datasets, transformer...
mit
TheTimmy/spack
lib/spack/spack/cmd/configure.py
2
3509
############################################################################## # Copyright (c) 2013-2017, 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
agileblaze/OpenStackTwoFactorAuthentication
horizon/openstack_dashboard/dashboards/project/instances/audit_tables.py
59
2391
# Copyright 2013 Metacloud, 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...
apache-2.0
pepetreshere/odoo
addons/account/tests/test_reconciliation_matching_rules.py
1
42618
# -*- coding: utf-8 -*- from freezegun import freeze_time from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests.common import Form from odoo.tests import tagged @tagged('post_install', '-at_install') class TestReconciliationMatchingRules(AccountTestInvoicingCommon): @classmetho...
agpl-3.0
bourreauEric/or-tools
examples/python/max_flow_taha.py
34
3443
# Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.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 ...
apache-2.0
epssy/hue
desktop/core/ext-py/elementtree/selftest.py
45
28405
# $Id: selftest.py 2326 2005-03-17 07:45:21Z fredrik $ # -*- coding: iso-8859-1 -*- # elementtree selftest program # this test script uses Python's "doctest" module to check that the # *test script* works as expected. # TODO: add more elementtree method tests # TODO: add xml/html parsing tests # TODO: etc import sys...
apache-2.0
denisenkom/django-sqlserver
tests/pagination/tests.py
1
15383
from __future__ import unicode_literals import unittest import warnings from datetime import datetime import django from django.core.paginator import ( EmptyPage, InvalidPage, PageNotAnInteger, Paginator, ) if django.VERSION >= (1, 11, 0): from django.core.paginator import UnorderedObjectListWarning from dja...
mit
adw0rd/lettuce-py3
lettuce/__init__.py
1
6767
# -*- coding: utf-8 -*- # <Lettuce - Behaviour Driven Development for python> # Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.org> # # 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 Foundatio...
gpl-3.0
CristianBB/SickRage
lib/imdb/parser/http/utils.py
59
34532
""" parser.http.utils module (imdb package). This module provides miscellaneous utilities used by the imdb.parser.http classes. Copyright 2004-2012 Davide Alberani <da@erlug.linux.it> 2008 H. Turgut Uyar <uyar@tekir.org> This program is free software; you can redistribute it and/or modify it under the...
gpl-3.0
arne-cl/pattern
pattern/text/en/modality.py
21
21985
#### PATTERN | EN | MOOD & MODALITY ################################################################ # -*- coding: utf-8 -*- # Copyright (c) 2010 University of Antwerp, Belgium # Author: Tom De Smedt <tom@organisms.be> # License: BSD (see LICENSE.txt for details). # http://www.clips.ua.ac.be/pages/pattern ### LIST FUN...
bsd-3-clause
dennybaa/st2
st2client/st2client/utils/date.py
7
1586
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
apache-2.0
sipwise/repoapi
repoapi/wsgi.py
1
1088
# Copyright (C) 2015 The Sipwise Team - http://sipwise.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 3 of the License, or (at your option) # any later version. # This prog...
gpl-3.0
mindnervestech/mnrp
addons/hr_timesheet_invoice/report/report_analytic.py
299
5164
# -*- 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...
agpl-3.0
ozburo/youtube-dl
youtube_dl/extractor/tf1.py
3
3073
# coding: utf-8 from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..utils import ( int_or_none, parse_iso8601, try_get, ) class TF1IE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?tf1\.fr/[^/]+/(?P<program_slug>[^/]+)/videos/(?P<id>[^/?&#]+)\.ht...
unlicense
sam-roth/Keypad
keypad/plugins/shell/bourne_model.py
1
4068
import subprocess import shlex from keypad.api import (Plugin, register_plugin, Filetype, Cursor) from keypad.abstract.code import IndentRetainingCodeModel, AbstractCompletionResults from keypad.core.syntaxlib import SyntaxHighlighter, lazy from keypad...
gpl-3.0
ehashman/oh-mainline
vendor/packages/docutils/docutils/transforms/peps.py
122
11065
# $Id: peps.py 6433 2010-09-28 08:21:25Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Transforms for PEP processing. - `Headers`: Used to transform a PEP's initial RFC-2822 header. It remains a field list, but some entries get processed. - ...
agpl-3.0
dmvieira/P.O.D.
func.py
1
5799
from mergesort import * def comeca(sequencia,entrada,entrada2,entrada3): div=open(entrada3,'w') t=open(entrada,'r') saida=open(entrada2,'w') x=t.readlines() if (x[-1][-1])<>'\n': comp=x[-1][-1] comp=comp+'\n' x.insert(-1,co...
gpl-3.0
tectronics/huhamhire-hosts
doc/dev/conf.py
23
8175
# -*- coding: utf-8 -*- # # huhamhire-hosts documentation build configuration file, created by # sphinx-quickstart on Tue Jan 14 10:49:55 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated fil...
gpl-3.0
cdriehuys/chmvh-website
chmvh_website/contact/forms.py
1
2333
import logging from smtplib import SMTPException from captcha.fields import ReCaptchaField from django import forms from django.conf import settings from django.core import mail from django.template import loader logger = logging.getLogger("chmvh_website.{0}".format(__name__)) class ContactForm(forms.Form): c...
mit
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/bx_python-0.7.1-py2.7-linux-x86_64.egg/bx/intervals/operations/concat.py
7
2623
""" Concatenate sets of intervals. Preserves format of the first input -- it is possible to concat two files that have different column orders. Of course, the meta-data of the second will be lost (and filled with a "."). If all of the files (GenomicInteralReaders) are the same format, sameformat=True will preserve al...
apache-2.0
blindpenguin/blackboard
node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py
1835
1748
#!/usr/bin/env python # Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """These functions are executed via gyp-flock-tool when using the Makefile generator. Used on systems that don't have a built-in flock.""" ...
gpl-3.0
Kevindeving/android_kernel_lge_gee
tools/perf/scripts/python/netdev-times.py
11271
15048
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
gpl-2.0
mvaled/OpenUpgrade
openerp/addons/base/ir/ir_sequence.py
83
14810
# -*- coding: 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 o...
agpl-3.0
isra17/DIE
DIE/UI/AboutScreen.py
7
1977
from idaapi import Form import os import DIE.Lib.DieConfig from sark.qt import QtGui, QtCore class AboutWindow(QtGui.QDialog): def __init__(self): super(AboutWindow, self).__init__() self.initUI() def initUI(self): config = DIE.Lib.DieConfig.get_config() sel...
mit
stevekuznetsov/ansible
lib/ansible/modules/cloud/cloudstack/cs_affinitygroup.py
48
7633
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # 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 Lice...
gpl-3.0
ghedsouza/snakebite
test/effective_user_test.py
7
1151
from minicluster_testbase import MiniClusterTestBase from snakebite.client import Client import os class EffectiveUserTest(MiniClusterTestBase): ERR_MSG_TOUCH = "org.apache.hadoop.security.AccessControlException\nPermission denied: user=__foobar" ERR_MSG_STAT = "`/foobar2': No such file or directory" VALI...
apache-2.0
gdsfactory/gdsfactory
pp/components/coupler.py
1
2755
import pp from pp.component import Component from pp.components.coupler_straight import coupler_straight from pp.components.coupler_symmetric import coupler_symmetric from pp.cross_section import get_waveguide_settings from pp.snap import assert_on_1nm_grid from pp.types import ComponentFactory @pp.cell_with_validato...
mit
40223104/2015cd_w17
static/Brython3.1.1-20150328-091302/Lib/urllib/parse.py
735
35170
"""Parse (absolute and relative) URLs. urlparse module is based upon the following RFC specifications. RFC 3986 (STD66): "Uniform Resource Identifiers" by T. Berners-Lee, R. Fielding and L. Masinter, January 2005. RFC 2732 : "Format for Literal IPv6 Addresses in URL's by R.Hinden, B.Carpenter and L.Masinter, Decemb...
gpl-3.0
Murali-group/GraphSpace
applications/uniprot/models.py
1
1246
from __future__ import unicode_literals from sqlalchemy import ForeignKeyConstraint, text from applications.users.models import * from django.conf import settings from graphspace.mixins import * Base = settings.BASE # ================== Table Definitions =================== # class UniprotAlias(IDMixin, TimeStamp...
gpl-2.0
yg257/Pangea
lib/boto-2.34.0/boto/gs/connection.py
157
5478
# Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # trib...
apache-2.0
GodBlessPP/2015cdb
static/Brython3.1.1-20150328-091302/Lib/heapq.py
628
18065
"""Heap queue algorithm (a.k.a. priority queue). Heaps are arrays for which a[k] <= a[2*k+1] and a[k] <= a[2*k+2] for all k, counting elements from 0. For the sake of comparison, non-existing elements are considered to be infinite. The interesting property of a heap is that a[0] is always its smallest element. Usag...
gpl-3.0
redhat-openstack/nova
nova/tests/api/openstack/compute/plugins/v3/test_extended_volumes.py
12
16239
# Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
tms/node-gyp
gyp/test/lib/TestCmd.py
330
52544
""" TestCmd.py: a testing framework for commands and scripts. The TestCmd module provides a framework for portable automated testing of executable commands and scripts (in any language, not just Python), especially commands and scripts that require file system interaction. In addition to running tests and evaluating...
mit
setjet/spark
examples/src/main/python/ml/kmeans_example.py
69
1828
# # 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
CodyTXR0KR/cyanideBot
cyanide_bot/bot_logic.py
2
9045
# -*- coding: utf-8 -*- ### cyanide_bot ### GNU/GPL v2 ### Author: Cody Rocker ### Author_email: cody.rocker.83@gmail.com ### 2016 #----------------------------------- # Requires: """ # - Python 3 """ # - imgurpython """ #----------------------------------- imp...
gpl-2.0
denisshockwave/image_processing_ocr_server
venv/lib/python2.7/site-packages/flask_wtf/i18n.py
117
1720
# coding: utf-8 """ flask_wtf.i18n ~~~~~~~~~~~~~~ Internationalization support for Flask WTF. :copyright: (c) 2013 by Hsiaoming Yang. """ from flask import _request_ctx_stack from flask_babel import get_locale from babel import support try: from wtforms.i18n import messages_path except ImportErro...
gpl-3.0
TobbeTripitaka/src
book/rsf/school/pydemo.py
3
1693
# ------------------------------------------------------------ # strings a='StPetersburg' len(a) a[0] a[4:7] b=a+' '+'workshop' print b c=b+2014 c=b+' '+str(2014) print c # ------------------------------------------------------------ # lists d = ['StPetersburg', 'workshop'] len(d) print d[0] print d[1] d.append('...
gpl-2.0
rohithredd94/Computer-Vision-using-OpenCV
Particle-Filter-Tracking/PF_Tracker.py
1
4110
import cv2 import numpy as mp from similarity import * from hist import * class PF_Tracker: def __init__(self, model, search_space, num_particles=100, state_dims=2, control_std=10, sim_std=20, alpha=0.0): self.model = model self.search_space = search_space[::-1] s...
mit
albertomurillo/ansible
test/integration/targets/module_precedence/lib_with_extension/ping.py
320
2144
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, 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...
gpl-3.0
weso/CWR-DataApi
tests/grammar/factory/record/test_publisher_territory.py
1
4905
# -*- coding: utf-8 -*- import unittest from pyparsing import ParseException from tests.utils.grammar import get_record_grammar """ CWR Publisher Territory of Control (SPT) grammar tests. The following cases are tested: """ __author__ = 'Bernardo Martínez Garrido' __license__ = 'MIT' __status__ = 'Development' c...
mit
2014c2g19/2014c2g19
w2/static/Brython2.0.0-20140209-164925/Lib/gc.py
743
3548
"""This module provides access to the garbage collector for reference cycles. enable() -- Enable automatic garbage collection. disable() -- Disable automatic garbage collection. isenabled() -- Returns true if automatic collection is enabled. collect() -- Do a full collection right now. get_count() -- Return the curren...
gpl-2.0
marcydoty/geraldo
site/newsite/site-geraldo/django/contrib/admindocs/views.py
15
15909
from django import template, templatetags from django.template import RequestContext from django.conf import settings from django.contrib.admin.views.decorators import staff_member_required from django.db import models from django.shortcuts import render_to_response from django.core.exceptions import ImproperlyConfigur...
lgpl-3.0
nwswanson/checkin
server/vendor/wtforms/utils.py
194
1504
class UnsetValue(object): """ An unset value. This is used in situations where a blank value like `None` is acceptable usually as the default value of a class variable or function parameter (iow, usually when `None` is a valid value.) """ def __str__(self): return '<unset value>' ...
mit
akarki15/mozillians
vendor-local/lib/python/tablib/packages/openpyxl3/writer/strings.py
55
2928
# file openpyxl/writer/strings.py # Copyright (c) 2010 openpyxl # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy,...
bsd-3-clause
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Lib/test/test_coercion.py
121
11399
import copy import unittest from test.test_support import run_unittest, TestFailed, check_warnings # Fake a number that implements numeric methods through __coerce__ class CoerceNumber: def __init__(self, arg): self.arg = arg def __repr__(self): return '<CoerceNumber %s>' % repr(self.arg) ...
mit
garg10may/youtube-dl
youtube_dl/extractor/dcn.py
34
2915
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, ) from ..utils import ( int_or_none, parse_iso8601, ) class DCNIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?dcndigital\.ae/(?:#/)?(?...
unlicense
ingadhoc/odoo
openerp/osv/orm.py
199
6222
import simplejson from lxml import etree from ..exceptions import except_orm from ..models import ( MetaModel, BaseModel, Model, TransientModel, AbstractModel, MAGIC_COLUMNS, LOG_ACCESS_COLUMNS, ) from openerp.tools.safe_eval import safe_eval as eval # extra definitions for backward compatibilit...
agpl-3.0
ychfan/tensorflow
tensorflow/contrib/labeled_tensor/__init__.py
144
4001
# 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
jwlawson/tensorflow
tensorflow/contrib/py2tf/api_test.py
3
2115
# 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
timduru/platform-external-chromium_org
tools/symsrc/pefile.py
187
139621
# -*- coding: Latin-1 -*- """pefile, Portable Executable reader module All the PE file basic structures are available with their default names as attributes of the instance returned. Processed elements such as the import table are made available with lowercase names, to differentiate them from the upper case basic s...
bsd-3-clause
pekeler/arangodb
3rdParty/V8-4.3.61/build/gyp/test/generator-output/gyptest-depth.py
232
1561
#!/usr/bin/env python # Copyright 2014 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 building a project hierarchy created when the --generator-output= and --depth= options is used to put the build configuration files...
apache-2.0
joelddiaz/openshift-tools
openshift/installer/vendored/openshift-ansible-3.4.40/filter_plugins/oo_filters.py
9
43540
#!/usr/bin/python # -*- coding: utf-8 -*- # vim: expandtab:tabstop=4:shiftwidth=4 """ Custom filters for use in openshift-ansible """ from ansible import errors from collections import Mapping from distutils.util import strtobool from distutils.version import LooseVersion from operator import itemgetter import OpenSSL...
apache-2.0
dc3-plaso/plaso
tests/storage/fake_storage.py
1
6205
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the fake storage.""" import unittest from plaso.containers import errors from plaso.containers import event_sources from plaso.containers import reports from plaso.containers import sessions from plaso.containers import tasks from plaso.lib import definitions fro...
apache-2.0
lastr2d2/lastchat
src/lib/web/db.py
16
42213
""" Database API (part of web.py) """ __all__ = [ "UnknownParamstyle", "UnknownDB", "TransactionError", "sqllist", "sqlors", "reparam", "sqlquote", "SQLQuery", "SQLParam", "sqlparam", "SQLLiteral", "sqlliteral", "database", 'DB', ] import time, os, urllib try: import datetime except ImportError: da...
gpl-2.0
staticlibs/android-ndk-r9d-arm-linux-androideabi-4.8
lib/python2.7/test/test_xdrlib.py
94
1597
from test import test_support import unittest import xdrlib class XDRTest(unittest.TestCase): def test_xdr(self): p = xdrlib.Packer() s = 'hello world' a = ['what', 'is', 'hapnin', 'doctor'] p.pack_int(42) p.pack_int(-17) p.pack_uint(9) p.pack_bool(True) ...
gpl-2.0
zchking/bill-data-collector
lib/getWeb/packages/chardet/big5freq.py
3133
82594
######################## 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...
apache-2.0
xisisu/RT-Xen
tools/python/xen/xend/MemoryPool.py
43
4567
#=========================================================================== # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope tha...
gpl-2.0
ella/django-ratings
django_ratings/aggregation.py
1
1768
""" This file is for aggregation records from Rating,Agg tables to Agg and TotalRate table """ import logging from datetime import datetime, timedelta from django_ratings.models import Rating, Agg, TotalRate logger = logging.getLogger('django_ratings') # aggregate ratings older than 2 years by year DELTA_TIME_YEAR ...
bsd-3-clause
mancoast/CPythonPyc_test
fail/321_test_funcattrs.py
56
10870
from test import support import types import unittest class FuncAttrsTest(unittest.TestCase): def setUp(self): class F: def a(self): pass def b(): return 3 self.fi = F() self.F = F self.b = b def cannot_set_attr(self, obj, name, v...
gpl-3.0
vikrant82/android_kernel_samsung_mondrianwifi
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
philsch/ansible
lib/ansible/utils/module_docs_fragments/asa.py
123
4186
# # (c) 2016, Peter Sprygada <psprygada@ansible.com> # (c) 2016, Patrick Ogenstad <@ogenstad> # # 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 th...
gpl-3.0
jjlee9/openthread
tools/harness-automation/cases/leader_5_1_1.py
16
1875
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notic...
bsd-3-clause
natcoin/natcoin
contrib/bitrpc/bitrpc.py
1
7836
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:9332") else: access = Ser...
mit
Boldie/gourmet
setup.py
4
12089
#!/bin/env python # # setup.py for Gourmet import sys import glob import os.path import os import fileinput import string from types import StringType, ListType, TupleType from distutils.command.build_py import build_py as _build_py from distutils.command.build_scripts import build_scripts as _build_scripts from dist...
gpl-2.0
krafczyk/spack
var/spack/repos/builtin/packages/chlorop/package.py
2
2274
############################################################################## # 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
Bysmyyr/chromium-crosswalk
third_party/protobuf/python/google/protobuf/internal/message_test.py
224
22295
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
bsd-3-clause
rogeriofalcone/libre
libre/apps/lock_manager/migrations/0001_initial.py
2
1308
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Lock' db.create_table('lock_manager_lock', ( ('id', self.gf('django.db.models.fi...
gpl-3.0
yebeloved/idapython
pywraps/py_expr.py
16
5381
# -------------------------------------------------------------------------- import os import sys import idaapi import _idaapi from sys import getrefcount import gc try: import pywraps pywraps_there = True _idaapi.pyw_register_idc_func = pywraps.pyw_register_idc_func _idaapi.pyw_unregis...
bsd-3-clause
KhronosGroup/COLLADA-CTS
StandardDataSets/collada/library_visual_scenes/visual_scene/extra/multiExtra/multiExtra.py
4
3846
# Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publ...
mit