repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
Jusedawg/SickRage
lib/sqlalchemy/ext/horizontal_shard.py
80
4902
# ext/horizontal_shard.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Horizontal sharding support. Defines a rudimental 'horizontal sharding' sy...
gpl-3.0
Eric-Zhong/odoo
addons/base_import/__openerp__.py
317
1227
{ 'name': 'Base import', 'description': """ New extensible file import for OpenERP ====================================== Re-implement openerp's file import system: * Server side, the previous system forces most of the logic into the client which duplicates the effort (between clients), makes the import s...
agpl-3.0
bckwltn/SickRage
autoProcessTV/lib/requests/packages/urllib3/__init__.py
650
1701
# urllib3/__init__.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ urllib3 - Thread-safe connection pooling and re-using. """ __author__ = 'Andrey Petrov (a...
gpl-3.0
mitodl/micromasters
exams/management/commands/resync_exam_profiles.py
1
1099
"""Command to force resync of ExamProfiles""" from django.core.management.base import BaseCommand from exams.models import ExamProfile class Command(BaseCommand): """Updates ExamProfile records to force a resync""" help = 'Updates ExamProfile records so that they resync' def add_arguments(self, parser)...
bsd-3-clause
dtschan/weblate
weblate/trans/checks/markup.py
1
5366
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2016 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.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 Foundation, eith...
gpl-3.0
willemneal/Docky
lib/pygments/lexers/basic.py
72
20306
# -*- coding: utf-8 -*- """ pygments.lexers.basic ~~~~~~~~~~~~~~~~~~~~~ Lexers for BASIC like languages (other than VB.net). :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, bygroups, d...
mit
funbaker/astropy
astropy/coordinates/builtin_frames/icrs_cirs_transforms.py
2
15685
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ Contains the transformation functions for getting from ICRS/HCRS to CIRS and anything in between (currently that means GCRS) """ import numpy as np from ... import units as u from ..baseframe import frame_transform_graph from ...
bsd-3-clause
MjAbuz/flask
flask/debughelpers.py
1
3503
# -*- coding: utf-8 -*- """ flask.debughelpers ~~~~~~~~~~~~~~~~~~ Various helpers to make the development experience better. 1 :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from ._compat import implements_to_string class UnexpectedUnicodeError(AssertionEr...
bsd-3-clause
samthor/intellij-community
python/helpers/epydoc/docstringparser.py
91
45421
# epydoc -- Docstring processing # # Copyright (C) 2005 Edward Loper # Author: Edward Loper <edloper@loper.org> # URL: <http://epydoc.sf.net> # # $Id: docstringparser.py 1689 2008-01-30 17:01:02Z edloper $ """ Parse docstrings and handle any fields it defines, such as C{@type} and C{@author}. Fields are used to descr...
apache-2.0
fstagni/DIRAC
AccountingSystem/Client/Types/PilotSubmission.py
2
1244
''' Accounting Type for Pilot Submission ''' from DIRAC.AccountingSystem.Client.Types.BaseAccountingType import BaseAccountingType __RCSID__ = "$Id$" class PilotSubmission(BaseAccountingType): ''' Accounting Type class for Pilot Submission ''' def __init__(self): BaseAccountingType.__init__(self) se...
gpl-3.0
jason406/MissionPlanner
ExtLibs/Mavlink/pymavlink/generator/lib/minixsv/xsvalXmlIf.py
79
4607
# # minixsv, Release 0.9.0 # file: xsvalXmlIf.py # # XML interface classes (derived wrapper classes) # # history: # 2007-07-04 rl created # # Copyright (c) 2004-2008 by Roland Leuthe. All rights reserved. # # -------------------------------------------------------------------- # The minixsv XML schema va...
gpl-3.0
bigswitch/neutron
neutron/tests/unit/api/rpc/callbacks/test_version_manager.py
4
7457
# 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 # d...
apache-2.0
dhruvsrivastava/OJ
flask/lib/python2.7/site-packages/whoosh/matching/wrappers.py
86
17446
# Copyright 2010 Matt Chaput. 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 notice, # this list of conditions and the...
bsd-3-clause
thomasmf/nomenine
src/core/runtime/clause/shape.py
1
2131
ROOT_SCOPE_METHOD( MD( 'Shape', 'SHAPE_FACTORY_single()' ), MS( ARG( CW( '::' ), CG( 'WORD', 'name' ), CG( 'CLAUSE', 'clause' ) ), """ $NOM( CONTEXT, $CA(UNION_new( $LISTNEW( nom_definition( $CA(WORD_new( "name" )), PARAM_name ), nom_definition( $CA(WORD_new( "clause" )), PARAM_clause ...
mit
bhargav2408/python-for-android
python-modules/twisted/twisted/python/modules.py
56
26367
# -*- test-case-name: twisted.test.test_modules -*- # Copyright (c) 2006-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ This module aims to provide a unified, object-oriented view of Python's runtime hierarchy. Python is a very dynamic language with wide variety of introspection utilities. However, ...
apache-2.0
trondhindenes/ansible
lib/ansible/modules/network/system/net_system.py
104
3068
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
mjec/wagtail
wagtail/tests/testapp/migrations/0005_streampage.py
22
1043
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import wagtail.wagtailcore.fields import wagtail.wagtailcore.blocks import wagtail.wagtailimages.blocks class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0001_squashed_0016_cha...
bsd-3-clause
TheTypoMaster/chromium-crosswalk
third_party/jinja2/tests.py
638
3444
# -*- coding: utf-8 -*- """ jinja2.tests ~~~~~~~~~~~~ Jinja test functions. Used with the "is" operator. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re from jinja2.runtime import Undefined from jinja2._compat import text_type, string_types, mappi...
bsd-3-clause
jjs0sbw/CSPLN
apps/scaffolding/win/web2py/gluon/contrib/pymysql/tests/test_SSCursor.py
46
3641
import sys try: from pymysql.tests import base import pymysql.cursors except: # For local testing from top-level directory, without installing sys.path.append('../pymysql') from pymysql.tests import base import pymysql.cursors class TestSSCursor(base.PyMySQLTestCase): def test_SSCursor(sel...
gpl-3.0
endlessm/chromium-browser
third_party/pyelftools/elftools/elf/gnuversions.py
17
8541
#------------------------------------------------------------------------------ # elftools: elf/gnuversions.py # # ELF sections # # Yann Rouillard (yann@pleiades.fr.eu.org) # This code is in the public domain #------------------------------------------------------------------------------ from ..construct import CString...
bsd-3-clause
mjzhou/monitor-core
gmond/python_modules/ssl/entropy.py
7
1363
# This module allows you to collect available entropy on your system. Why is # entropy important. # [http://www.chrissearle.org/node/326] # There are two random number sources on linux - /dev/random and /dev/urandom. # /dev/random will block if there is nothing left in the entropy bit bucket. # /dev/urandom uses ...
bsd-3-clause
lulandco/SickRage
lib/mako/template.py
39
26397
# mako/template.py # Copyright (C) 2006-2015 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Provides the Template class, a facade for parsing, generating and executing template strings, ...
gpl-3.0
StefanRijnhart/OpenUpgrade
addons/hr_recruitment/hr_recruitment.py
23
33759
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
consulo/consulo-python
plugin/src/main/dist/helpers/py3only/docutils/parsers/rst/languages/sv.py
49
4105
# $Id: sv.py 7119 2011-09-02 13:00:23Z milde $ # Author: Adam Chodorowski <chodorowski@users.sourceforge.net> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must...
apache-2.0
OpenPymeMx/OCB
addons/mail/wizard/invite.py
35
4418
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-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
synconics/odoo
addons/sale/report/invoice_report.py
336
1680
# -*- 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
olsonanl/transform
plugins/scripts/upload/trns_transform_Genbank_Genome_to_KBaseGenomes_ContigSet.py
3
3196
#!/usr/bin/env python import argparse import sys import os import time import traceback import sys import ctypes import subprocess from subprocess import Popen, PIPE import shutil from optparse import OptionParser from biokbase.workspace.client import Workspace import urllib import urllib2 import re import json desc1 ...
mit
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_06_01/models/security_group_network_interface_py3.py
1
1278
# 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 ...
mit
gacarrillor/QGIS
python/plugins/processing/algs/gdal/ClipRasterByExtent.py
15
7484
# -*- coding: utf-8 -*- """ *************************************************************************** ClipRasterByExtent.py --------------------- Date : September 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander bruy at gmail dot com ********...
gpl-2.0
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/dask/array/tests/test_creation.py
2
15491
import pytest pytest.importorskip('numpy') import numpy as np import pytest from toolz import concat import dask.array as da from dask.array.utils import assert_eq, same_keys @pytest.mark.parametrize( "funcname", [ "empty_like", "empty", "ones_like", "ones", "zeros_like", "zeros", ...
gpl-3.0
crazy-canux/xplugin_nagios
plugin/plugins/network/check_ibm_san_directors_crcs.py
1
8978
#!/usr/bin/env python2.7 # -*- coding: UTF-8 -*- #=============================================================================== # Name : check_ibm_san_directors_crcs.py # Authors : Canux CHENG <canuxcheng@gmail.com> # Description : Check IBM SAN Directors for CRCs on ports. #-------------------------...
gpl-2.0
mach0/QGIS
python/plugins/processing/tests/ParametersTest.py
12
39755
# -*- coding: utf-8 -*- """ *************************************************************************** ParametersTest --------------------- Date : May 2021 Copyright : (C) 2021 by René-Luc DHONT Email : rldhont at gmail dot com ****************************...
gpl-2.0
alxgu/ansible
test/units/module_utils/test_distro.py
47
1423
# (c) 2018 Adrian Likins <alikins@redhat.com> # Copyright (c) 2018 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # or # Apache License v2.0 (see http://www.apache.org/licenses/LICENSE-2.0) # # Dual licensed so any test cases could potentially be included ...
gpl-3.0
geektoni/shogun
applications/msplicer/content_sensors.py
7
1933
# This software is distributed under BSD 3-clause license (see LICENSE file). # # Authors: Soeren Sonnenburg, Gunnar Raetsch import numpy class content_sensors: def __init__(self, model): self.dict_weights_intron=numpy.array(model.dict_weights_intron, dtype=numpy.float64) self.dict_weights_coding=numpy.array(mod...
bsd-3-clause
rbruyere/appengine-mapreduce
python/test/mapreduce gcs/mapreduce/mapper_pipeline.py
6
4474
#!/usr/bin/env python # Copyright 2011 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 ...
apache-2.0
mirzawaqasahmed/avocado-vt
virttest/libvirt_xml/nwfilter_protocols/udplite.py
26
5843
""" udplite protocl support class(es) http://libvirt.org/formatnwfilter.html#nwfelemsRulesProtoMisc """ from virttest.libvirt_xml import accessors, xcepts from virttest.libvirt_xml.nwfilter_protocols import base class Udplite(base.TypedDeviceBase): """ Create new Udplite xml instances Properties: ...
gpl-2.0
yesudeep/old-milsalumni
app/properties.py
1
1446
#!/usr/bin/env python # -*- coding: utf-8 -*- from google.appengine.ext import db from base64 import b64encode, b64decode import decimal class DecimalProperty(db.Property): """ Stores decimal.Decimal values. """ data_type = decimal.Decimal def get_value_for_datastore(self, model_instance): ...
mit
ABcDexter/cython
Cython/Plex/Machines.py
8
8430
#======================================================================= # # Python Lexical Analyser # # Classes for building NFAs and DFAs # #======================================================================= from __future__ import absolute_import import sys from .Transitions import TransitionMap LOWEST_P...
apache-2.0
apieum/eventize
eventize/typing/modifiers.py
1
4014
# -*- coding: utf8 -*- from functools import partial from . import stack class Modifier(object): """Visitor with rollback""" def visit(self, visited): """do something on visited""" msg = "[method visit] %s can't visit %s" %(self, visited) raise NotImplementedError(msg) def visit_al...
lgpl-3.0
ondra-novak/chromium.src
native_client_sdk/src/tools/sel_ldr.py
43
5010
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Wrapper script for launching application within the sel_ldr. """ import optparse import os import subprocess import sys import cre...
bsd-3-clause
JshWright/home-assistant
tests/components/test_logger.py
24
3191
"""The tests for the Logger component.""" from collections import namedtuple import logging import unittest from homeassistant.setup import setup_component from homeassistant.components import logger from tests.common import get_test_home_assistant RECORD = namedtuple('record', ('name', 'levelno')) NO_LOGS_CONFIG =...
apache-2.0
damiansoriano/odoo
addons/membership/report/__init__.py
432
1079
# -*- 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
franticspider/phagea
python/PyPhagea.py
1
20781
""" Copyright (C) 2013-2015 Simon Hickinbotham, Hywl Williams, Susan Stepney This file is part of Phagea. Phagea 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 Li...
gpl-3.0
DuCorey/bokeh
scripts/build_upload.py
5
15380
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
bsd-3-clause
anryko/ansible
test/units/modules/network/f5/test_bigip_apm_policy_fetch.py
22
3752
# -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import pytest import sys if sys.version_info < (2...
gpl-3.0
elkingtonmcb/django
tests/shortcuts/views.py
252
3531
import os.path from django.shortcuts import render, render_to_response from django.template import Context, RequestContext from django.utils._os import upath dirs = (os.path.join(os.path.dirname(upath(__file__)), 'other_templates'),) def render_to_response_view(request): return render_to_response('shortcuts/ren...
bsd-3-clause
watonyweng/nova
nova/api/openstack/compute/legacy_v2/contrib/server_password.py
69
2380
# Copyright (c) 2012 Nebula, 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...
apache-2.0
mariansoban/ardupilot
Tools/autotest/param_metadata/param.py
6
5942
class Parameter(object): def __init__(self, name, real_path): self.name = name self.real_path = real_path class Vehicle(object): def __init__(self, name, path, truename=None): if truename is not None: self.truename = truename self.name = name self.path = pa...
gpl-3.0
influence-usa/django-calaccess-raw-data
calaccess_raw/management/commands/verifycalaccessrawfile.py
29
1075
from __future__ import unicode_literals from django.db.models.loading import get_model from django.core.management.base import LabelCommand from calaccess_raw.management.commands import CalAccessCommand class Command(CalAccessCommand, LabelCommand): help = 'Compare the number of records in a model against its sou...
mit
mikehearn/bitcoinxt
qa/rpc-tests/walletbackup.py
131
7291
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Exercise the wallet backup code. Ported from walletbackup.sh. Test case is: 4 nodes. 1 2 and 3 send ...
mit
cynngah/uofthacksIV
generate-jobs/lib/python2.7/site-packages/requests/sessions.py
115
26216
# -*- coding: utf-8 -*- """ requests.session ~~~~~~~~~~~~~~~~ This module provides a Session object to manage and persist settings across requests (cookies, auth, proxies). """ import os from collections import Mapping from datetime import datetime from .auth import _basic_auth_str from .compat import cookielib, Ord...
mit
orgito/ansible
lib/ansible/modules/network/aos/_aos_blueprint_param.py
17
13113
#!/usr/bin/python # # (c) 2017 Apstra Inc, <community@apstra.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 opt...
gpl-3.0
Workday/OpenFrame
tools/grit/grit/format/policy_templates/writers/json_writer_unittest.py
44
13991
#!/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. '''Unit tests for grit.format.policy_templates.writers.json_writer''' import os import sys if __name__ == '__main__': sys.path....
bsd-3-clause
prometheanfire/cloud-init
cloudinit/config/cc_update_hostname.py
2
1626
# vi: ts=4 expandtab # # Copyright (C) 2011 Canonical Ltd. # Copyright (C) 2012, 2013 Hewlett-Packard Development Company, L.P. # # Author: Scott Moser <scott.moser@canonical.com> # Author: Juerg Haefliger <juerg.haefliger@hp.com> # # This program is free software: you can redistribute it and/or modify #...
gpl-3.0
vivekmishra1991/scikit-learn
sklearn/utils/graph.py
289
6239
""" Graph utilities and algorithms Graphs are represented with their adjacency matrices, preferably using sparse matrices. """ # Authors: Aric Hagberg <hagberg@lanl.gov> # Gael Varoquaux <gael.varoquaux@normalesup.org> # Jake Vanderplas <vanderplas@astro.washington.edu> # License: BSD 3 clause impo...
bsd-3-clause
geopy/geopy
geopy/geocoders/opencage.py
1
8081
from functools import partial from urllib.parse import urlencode from geopy.exc import GeocoderServiceError from geopy.geocoders.base import DEFAULT_SENTINEL, ERROR_CODE_MAP, Geocoder from geopy.location import Location from geopy.util import logger __all__ = ("OpenCage", ) class OpenCage(Geocoder): """Geocoder...
mit
jayceyxc/hue
desktop/core/ext-py/httplib2-0.8/python2/httplib2/iri2uri.py
706
3828
""" iri2uri Converts an IRI to a URI. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __version__ = "1.0.0" __license__ = "MIT" __history__ = """ """ import urlparse # Convert an IRI to a URI following the rules in RFC 3987 # # The character...
apache-2.0
GrahamDumpleton/mod_wsgi-docker
demos/django-1.7/example/example/settings.py
2
2097
""" Django settings for example project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) im...
apache-2.0
mapr/hue
desktop/core/ext-py/Django-1.6.10/django/utils/unittest/suite.py
219
9301
"""TestSuite""" import sys import unittest from django.utils.unittest import case, util __unittest = True class BaseTestSuite(unittest.TestSuite): """A simple test suite that doesn't provide class or module shared fixtures. """ def __init__(self, tests=()): self._tests = [] self.addTests...
apache-2.0
40223144/2015cd_midterm
static/Brython3.1.0-20150301-090019/Lib/site-packages/pygame/draw.py
603
6456
from javascript import console from browser import timer import math class Queue: def __init__(self): self._list=[] def empty(self): return len(self._list) == 0 def put(self, element): self._list.append(element) def get(self): if len(self._list) == 0: raise BaseError ...
gpl-3.0
dreamllq/node
deps/v8/tools/try_perf.py
1
2165
#!/usr/bin/env python # Copyright 2014 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import os import subprocess import sys BOTS = { '--arm32': 'v8_arm32_perf_try', '--linux32': 'v8_linux32_perf_tr...
apache-2.0
sorenb-xlnx/linux-xlnx
tools/perf/scripts/python/syscall-counts.py
11181
1522
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0
zhouxiao-coder/Paddle
python/paddle/utils/preprocess_util.py
18
13149
# Copyright (c) 2016 PaddlePaddle 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 applic...
apache-2.0
speed-of-light/pyslider
lib/exp/tools/path_maker.py
1
1400
import os from lib import Dataset from lib.exp.tools import ToolHelper as TH class PathMaker(Dataset): def __init__(self, root, name): Dataset.__init__(self, root, name) def common_path(self, resource="stores", kvar="", ext="h5", asure=True): """ res: resource name in path kva...
agpl-3.0
didzis/AMRParsing
preprocessing.py
2
19002
#!/usr/bin/python import sys,argparse,re,os from stanfordnlp.corenlp import * from common.AMRGraph import * from pprint import pprint import cPickle as pickle from Aligner import Aligner from common.SpanGraph import SpanGraph from depparser import CharniakParser,StanfordDepParser,ClearDepParser,TurboDepParser, MateDepP...
gpl-2.0
40223101/2015final2
static/Brython3.1.3-20150514-095342/Lib/unittest/test/test_setups.py
791
16440
import io import sys import unittest def resultFactory(*_): return unittest.TestResult() class TestSetups(unittest.TestCase): def getRunner(self): return unittest.TextTestRunner(resultclass=resultFactory, stream=io.StringIO()) def runTests(self, *cases...
gpl-3.0
nanditav/15712-TensorFlow
tensorflow/contrib/learn/python/learn/dataframe/transforms/in_memory_source.py
82
6157
# 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
g19-hs/personfinder
tests/test_utils.py
8
9444
#!/usr/bin/python2.7 # encoding: utf-8 # Copyright 2010 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 ...
apache-2.0
powerjg/gem5-ci-test
src/mem/slicc/ast/TypeFieldEnumAST.py
26
2931
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # 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 co...
bsd-3-clause
noushadali/androguard
androxgmml.py
38
11141
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard 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,...
apache-2.0
xfstudio/shadowsocks
shadowsocks/tcprelay.py
922
28870
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # 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...
apache-2.0
2013Commons/HUE-SHARK
desktop/core/ext-py/Django-1.2.3/build/lib.linux-i686-2.7/django/contrib/formtools/wizard.py
6
10344
""" FormWizard class -- implements a multi-page form, validating between each step and storing the form's state as HTML hidden fields so that no state is stored on the server side. """ import cPickle as pickle from django import forms from django.conf import settings from django.http import Http404 from django.shortc...
apache-2.0
netroby/vitess
test/keyspace_util.py
8
2697
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2015, 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. """ This module allows you to bring up and tear down keyspaces. """ import os import environment import tablet import...
bsd-3-clause
PriceChild/ansible
lib/ansible/modules/windows/win_msg.py
32
3434
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk> # # 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, eith...
gpl-3.0
javelinanddart/kernel_zte_draconis
Documentation/target/tcm_mod_builder.py
4981
41422
#!/usr/bin/python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops...
gpl-2.0
RafaelRMachado/qtwebkit
Tools/Scripts/webkitpy/style/checkers/cpp.py
113
165357
# -*- coding: utf-8 -*- # # Copyright (C) 2009, 2010, 2012 Google Inc. All rights reserved. # Copyright (C) 2009 Torch Mobile Inc. # Copyright (C) 2009 Apple Inc. All rights reserved. # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) # # Redistribution and use in source and binary forms, with or without # modi...
gpl-2.0
edx/ease
docs/conf.py
2
8084
# -*- coding: utf-8 -*- # # ML API documentation build configuration file, created by # sphinx-quickstart on Fri Mar 1 09:51:10 2013. # # 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 file. # # All ...
agpl-3.0
zzzombat/lucid-python-django
django/middleware/http.py
154
1696
from django.core.exceptions import MiddlewareNotUsed from django.utils.http import http_date, parse_http_date_safe class ConditionalGetMiddleware(object): """ Handles conditional GET operations. If the response has a ETag or Last-Modified header, and the request has If-None-Match or If-Modified-Since, ...
bsd-3-clause
maciekcc/tensorflow
tensorflow/contrib/timeseries/examples/predict.py
69
5579
# 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
mezz64/home-assistant
homeassistant/components/alexa/smart_home.py
21
2080
"""Support for alexa Smart Home Skill API.""" import logging import homeassistant.core as ha from .const import API_DIRECTIVE, API_HEADER, EVENT_ALEXA_SMART_HOME from .errors import AlexaBridgeUnreachableError, AlexaError from .handlers import HANDLERS from .messages import AlexaDirective _LOGGER = logging.getLogger...
apache-2.0
sherazkasi/SabreSoftware
Lib/stat.py
179
1718
"""Constants/functions for interpreting results of os.stat() and os.lstat(). Suggested usage: from stat import * """ # Indices for stat struct members in the tuple returned by os.stat() ST_MODE = 0 ST_INO = 1 ST_DEV = 2 ST_NLINK = 3 ST_UID = 4 ST_GID = 5 ST_SIZE = 6 ST_ATIME = 7 ST_MTIME = 8 ST_CTIME = 9 ...
gpl-3.0
axinging/chromium-crosswalk
third_party/WebKit/Tools/Scripts/webkitpy/style/filter_unittest.py
3
9717
# Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com) # # 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 # notice, this list of conditions...
bsd-3-clause
stackforge/poppy
poppy/provider/fastly/driver.py
2
2821
# Copyright (c) 2014 Rackspace, 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 wr...
apache-2.0
openhatch/oh-mainline
vendor/packages/Django/django/contrib/localflavor/si/si_postalcodes.py
110
13147
# *-* coding: utf-8 *-* from __future__ import unicode_literals SI_POSTALCODES = [ (1000, 'Ljubljana'), (1215, 'Medvode'), (1216, 'Smlednik'), (1217, 'Vodice'), (1218, 'Komenda'), (1219, 'Laze v Tuhinju'), (1221, 'Motnik'), (1222, 'Trojane'), (1223, 'Blagovica'), (1225, 'Lukovic...
agpl-3.0
lushfuture/Phys-Comp
five-test/node_modules/johnny-five/junk/firmata-latest/node_modules/serialport/node_modules/node-gyp/legacy/tools/gyp/tools/pretty_sln.py
42
5099
#!/usr/bin/env python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Prints the information in a sln file in a diffable way. It first outputs each projects in alphabetical order with their dependenci...
mit
Amperture/twitch-sbc-integration
twitchapi/twitchapirun.py
1
2156
import requests import importlib import time import json import ConfigParser import logging import traceback from logging.handlers import RotatingFileHandler from datetime import datetime from twitchapi.krakenv5 import channels def twitchapi_handler(q_twitchbeagle, q_twitchapi): logger = logging.getLogger("Rota...
mit
opsdisk/pyrax
pyrax/image.py
12
24535
# -*- coding: utf-8 -*- # Copyright (c)2014 Rackspace US, 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/LIC...
apache-2.0
wwj718/edx-video
lms/envs/acceptance_static.py
1
2259
""" This config file extends the test environment configuration so that we can run the lettuce acceptance tests. """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files # pylint: disable=W0401, W0614 from .test import * # You need to start the ser...
agpl-3.0
danielfrg/datasciencebox
datasciencebox/cli/install.py
1
6874
from __future__ import absolute_import import click from datasciencebox.cli.main import cli, default_options @cli.group(short_help='Install packages, applications and more') @click.pass_context def install(ctx): pass @install.command('miniconda', short_help='Install miniconda in the instances') @click.option(...
apache-2.0
eSpaceEPFL/marsissharadviewer
pyqtgraphcore/flowchart/library/common.py
34
5832
# -*- coding: utf-8 -*- from ...Qt import QtCore, QtGui from ...widgets.SpinBox import SpinBox #from ...SignalProxy import SignalProxy from ...WidgetGroup import WidgetGroup #from ColorMapper import ColorMapper from ..Node import Node import numpy as np from ...widgets.ColorButton import ColorButton try: import met...
gpl-2.0
tiagofrepereira2012/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
repotvsupertuga/repo
plugin.video.zen/resources/lib/sources/miradetodo.py
4
3792
# -*- coding: utf-8 -*- ''' This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed i...
gpl-2.0
farhaanbukhsh/sympy
sympy/ntheory/continued_fraction.py
75
6975
from sympy.core.numbers import Integer, Rational def continued_fraction_periodic(p, q, d=0): r""" Find the periodic continued fraction expansion of a quadratic irrational. Compute the continued fraction expansion of a rational or a quadratic irrational number, i.e. `\frac{p + \sqrt{d}}{q}`, where ...
bsd-3-clause
KLSnRPA/omaha
standalone/standalone_installer.py
61
17007
#!/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 or ...
apache-2.0
liavkoren/djangoDev
django/shortcuts.py
78
5688
""" This module collects helper functions and classes that "span" multiple levels of MVC. In other words, these functions/classes introduce controlled coupling for convenience's sake. """ from django.template import loader, RequestContext from django.http import HttpResponse, Http404 from django.http import HttpRespons...
bsd-3-clause
alextruberg/custom_django
django/contrib/redirects/tests.py
215
2436
from django.conf import settings from django.contrib.sites.models import Site from django.core.exceptions import ImproperlyConfigured from django.test import TestCase from django.test.utils import override_settings from django.utils import six from .middleware import RedirectFallbackMiddleware from .models import Redi...
bsd-3-clause
arangodb/arangodb
3rdParty/V8/v7.9.317/tools/regexp-sequences.py
1
1894
#!/usr/bin/env python # Copyright 2019 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ python %prog trace-file Parses output generated by v8 with flag --trace-regexp-bytecodes and generates a list of the most common...
apache-2.0
supriyantomaftuh/django
tests/queryset_pickle/models.py
281
1904
import datetime from django.db import DJANGO_VERSION_PICKLE_KEY, models from django.utils import six from django.utils.translation import ugettext_lazy as _ def standalone_number(): return 1 class Numbers(object): @staticmethod def get_static_number(): return 2 class PreviousDjangoVersionQuer...
bsd-3-clause
zrhans/pythonanywhere
.virtualenvs/django19/lib/python3.4/site-packages/pip/utils/__init__.py
186
26814
from __future__ import absolute_import import contextlib import errno import locale import logging import re import os import posixpath import shutil import stat import subprocess import sys import tarfile import zipfile from pip.exceptions import InstallationError from pip.compat import console_to_str, stdlib_pkgs f...
apache-2.0
LoHChina/nova
nova/tests/unit/virt/vmwareapi/test_vim_util.py
36
3216
# Copyright (c) 2013 VMware, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0