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
dduan/swift
benchmark/scripts/perf_test_driver/perf_test_driver.py
11
4323
#!/usr/bin/env python # ===--- perf_test_driver.py ---------------------------------------------===// # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See ...
apache-2.0
marcoserafini/h-store
third_party/python/boto/mturk/price.py
52
1960
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
gpl-3.0
IronLanguages/ironpython2
Src/StdLib/Lib/distutils/tests/test_util.py
2
2394
"""Tests for distutils.util.""" import os import sys import unittest from test.test_support import run_unittest, swap_attr from distutils.errors import DistutilsByteCompileError from distutils.tests import support from distutils import util # used to patch _environ_checked from distutils.util import (byte_compile, gro...
apache-2.0
ivoflipse/devide
modules/writers/module_index.py
7
3943
class batchConverter: kits = ['vtk_kit', 'wx_kit'] cats = ['Readers','Writers','Converters'] keywords = ['batch','convert','read','write','vti','mha','gipl'] help = """Batch converts image volume files from one type to another. Source and target types can be VTK ImageData (.vti), MetaImage (.mha), ...
bsd-3-clause
pap/nupic
tests/integration/nupic/opf/opf_checkpoint_test/opf_checkpoint_test.py
23
16466
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
agpl-3.0
xwolf12/androguard
androguard/core/api_specific_resources/aosp_permissions/aosp_permissions_api18.py
15
85092
#!/usr/bin/python # -*- coding: utf-8 -*- ################################################# ### Extracted from platform version: 4.3.1 ################################################# AOSP_PERMISSIONS = { 'android.permission.REMOTE_AUDIO_PLAYBACK': { 'permissionGroup': 'android.permission-group.SYSTEM_TOO...
apache-2.0
darkleons/lama
addons/l10n_nl/__openerp__.py
164
6120
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2009 Veritos - Jan Verlaan - www.veritos.nl # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential # con...
agpl-3.0
liberorbis/libernext
env/lib/python2.7/site-packages/unidecode/x060.py
250
4642
data = ( 'Huai ', # 0x00 'Tai ', # 0x01 'Song ', # 0x02 'Wu ', # 0x03 'Ou ', # 0x04 'Chang ', # 0x05 'Chuang ', # 0x06 'Ju ', # 0x07 'Yi ', # 0x08 'Bao ', # 0x09 'Chao ', # 0x0a 'Min ', # 0x0b 'Pei ', # 0x0c 'Zuo ', # 0x0d 'Zen ', # 0x0e 'Yang ', # 0x0f 'Kou ', # 0x10 ...
gpl-2.0
stuartbfox/Diamond
src/collectors/smart/test/testsmart.py
26
6990
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import call from mock import patch from diamond.collector import Collector from...
mit
IntelLabs/numba
numba/cuda/printimpl.py
5
2478
from functools import singledispatch from llvmlite import ir from numba.core import types, cgutils from numba.core.imputils import Registry from numba.cuda import nvvmutils registry = Registry() lower = registry.lower voidptr = ir.PointerType(ir.IntType(8)) # NOTE: we don't use @lower here since print_item() doesn'...
bsd-2-clause
freedesktop-unofficial-mirror/papyon
papyon/msnp2p/constants.py
3
2335
# -*- coding: utf-8 -*- # # papyon - a python client library for Msn # # Copyright (C) 2007 Ole André Vadla Ravnås <oleavr@gmail.com> # Copyright (C) 2008 Richard Spiers <richard.spiers@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public Lic...
gpl-2.0
matbra/bokeh
examples/compat/mpl/listcollection.py
34
1602
from matplotlib.collections import LineCollection import matplotlib.pyplot as plt import numpy as np from bokeh import mpl from bokeh.plotting import output_file, show def make_segments(x, y): ''' Create list of line segments from x and y coordinates. ''' points = np.array([x, y]).T.reshape(-1, 1, 2...
bsd-3-clause
kblin/supybot-gsoc
test/test_irclib.py
2
18812
### # Copyright (c) 2002-2005, Jeremiah Fincher # 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 co...
bsd-3-clause
xzturn/tensorflow
tensorflow/python/data/benchmarks/map_benchmark.py
2
3371
# 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
zhangjunli177/sahara
sahara/tests/integration/tests/edp.py
10
14129
# Copyright (c) 2013 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 or agreed to in writ...
apache-2.0
ShawnPengxy/Flask-madeBlog
site-packages/sqlalchemy/dialects/postgresql/json.py
21
12168
# postgresql/json.py # Copyright (C) 2005-2015 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 from __future__ import absolute_import import json from .base import ischema_nam...
mit
yongshengwang/hue
build/env/lib/python2.7/site-packages/boto-2.38.0-py2.7.egg/boto/vpc/vpc.py
135
7868
# Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/ # # 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, modi...
apache-2.0
dfunckt/django
django/contrib/auth/admin.py
50
8989
from django.conf import settings from django.conf.urls import url from django.contrib import admin, messages from django.contrib.admin.options import IS_POPUP_VAR from django.contrib.admin.utils import unquote from django.contrib.auth import update_session_auth_hash from django.contrib.auth.forms import ( AdminPass...
bsd-3-clause
amenonsen/ansible
lib/ansible/module_utils/exoscale.py
96
5159
# -*- coding: utf-8 -*- # Copyright (c) 2016, René Moser <mail@renemoser.net> # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) import os from ansible.module_utils.six.moves import configparser from ansible.module_utils.six import integer_types, string_types fr...
gpl-3.0
SpatialMetabolomics/maori-upload
webapp/app.py
1
7885
import os from os.path import dirname, exists, isdir, join, splitext import base64 import hmac import hashlib import json import boto3 import tempfile import re import tornado.ioloop import tornado.web from tornado.options import define, options from datetime import datetime as dt import yaml from notify import post_t...
apache-2.0
b0ttl3z/SickRage
lib/sqlalchemy/orm/persistence.py
75
41879
# orm/persistence.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 """private module containing functions used to emit INSERT, UPDATE and DELETE state...
gpl-3.0
dfalt974/SickRage
lib/guessit/test/test_api_unicode_literals.py
28
2292
#!/usr/bin/env python # -*- coding: utf-8 -*- # pylint: disable=no-self-use, pointless-statement, missing-docstring, invalid-name, pointless-string-statement from __future__ import unicode_literals import os import pytest import six from ..api import guessit, properties, GuessitException __location__ = os.path.re...
gpl-3.0
UnrememberMe/pants
src/python/pants/build_graph/target_addressable.py
11
4329
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging from...
apache-2.0
kwailamchan/programming-languages
python/pygame/tetris/lib/shape.py
3
8684
#!/usr/bin/env python # -*- coding: utf-8 -*- import random import pygame from pygame.locals import * import util class Tile: def __init__(self, color, image = None): self.color = color self.image = image class Shape(object): SHAPE_WIDTH = 4 SHAPE_HEIGHT = 4 SHAPES = ( ...
mit
markslwong/tensorflow
tensorflow/python/debug/cli/profile_analyzer_cli_test.py
5
9891
# 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
MSOpenTech/edx-platform
common/djangoapps/third_party_auth/provider.py
27
8757
"""Third-party auth provider definitions. Loaded by Django's settings mechanism. Consequently, this module must not invoke the Django armature. """ from social.backends import google, linkedin, facebook _DEFAULT_ICON_CLASS = 'fa-signin' class BaseProvider(object): """Abstract base class for third-party auth pr...
agpl-3.0
RafRaf/django-post_office
post_office/south_migrations/0008_auto__del_index_log_date__del_index_log_status__del_index_email_priori.py
10
4601
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing index on 'Log', fields ['date'] db.delete_index(u'post_office_...
mit
sergey-shandar/autorest
src/generator/AutoRest.Python.Tests/Expected/AcceptanceTests/ParameterFlattening/setup.py
28
1109
# 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
kkouer/PcGcs
Lib/site-packages/scipy/stats/kde.py
55
9964
#------------------------------------------------------------------------------- # # Define classes for (uni/multi)-variate kernel density estimation. # # Currently, only Gaussian kernels are implemented. # # Written by: Robert Kern # # Date: 2004-08-09 # # Modified: 2005-02-10 by Robert Kern. # Contr...
gpl-3.0
hmen89/odoo
openerp/addons/base/tests/test_ir_filters.py
285
11000
# -*- coding: utf-8 -*- import functools from openerp import exceptions from openerp.tests import common def noid(d): """ Removes values that are not relevant for the test comparisons """ d.pop('id', None) d.pop('action_id', None) return d class FiltersCase(common.TransactionCase): def build(self...
agpl-3.0
Valloric/ycmd
ycmd/completers/language_server/generic_lsp_completer.py
1
1922
# Copyright (C) 2019 ycmd contributors # # This file is part of ycmd. # # ycmd 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. # # ycmd...
gpl-3.0
timothyparez/PyBitmessage
src/pyelliptic/openssl.py
4
18771
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 Yann GUIBET <yannguibet@gmail.com> # See LICENSE for details. # # Software slightly changed by Jonathan Warren <bitmessage at-symbol jonwarren.org> import sys import ctypes OpenSSL = None class CipherName: def __init__(self, name, pointer, b...
mit
bsmithyman/galoshes
galoshes/meta.py
1
7934
''' Low-level programming constructs for key-value stores Originally developed as part of Zephyr https://zephyr.space/ ''' from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import super from future import s...
mit
anisotropi4/goldfinch
bin/dump-tree.py
1
1613
#!/usr/bin/python3 import xml.etree.cElementTree as ET import sys import argparse parser = argparse.ArgumentParser(description='Strip namespace and a list of xml-tags in a tsv format') parser.add_argument('--path', dest='path', type=str, default='', help='output directory file') parser.add_argume...
mit
rvalyi/OpenUpgrade
addons/website_event_sale/controllers/main.py
54
2827
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
hn8841182/2015cd_midterm
static/Brython3.1.0-20150301-090019/Lib/unittest/main.py
739
10385
"""Unittest main program""" import sys import optparse import os from . import loader, runner from .signals import installHandler __unittest = True FAILFAST = " -f, --failfast Stop on first failure\n" CATCHBREAK = " -c, --catch Catch control-C and display results\n" BUFFEROUTPUT = " -b, --buffer ...
gpl-3.0
btrzecia/AliPhysics
PWGJE/EMCALJetTasks/Tracks/analysis/Draw/DrawTriggerEfficienciesMC.py
41
6454
#************************************************************************** #* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * #* * #* Author: The ALICE Off-line Project. * #* Contributors ...
bsd-3-clause
biolink/ontobio
tests/test_enrich.py
1
1478
from ontobio.ontol_factory import OntologyFactory from ontobio.assoc_factory import AssociationSetFactory from ontobio.assocmodel import AssociationSet import logging import random CVP = 'MP:0004084' # cardiomyopathy MUS = 'NCBITaxon:10090' def test_construct(): """ enrichment test build a gene set from ...
bsd-3-clause
mohammed-alfatih/servo
python/mach/mach/dispatcher.py
50
19395
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import absolute_import, unicode_literals import argparse import difflib import sys from operator impor...
mpl-2.0
apavlenko/opencv
samples/python2/watershed.py
8
2209
#!/usr/bin/env python ''' Watershed segmentation ========= This program demonstrates the watershed segmentation algorithm in OpenCV: watershed(). Usage ----- watershed.py [image filename] Keys ---- 1-7 - switch marker color SPACE - update segmentation r - reset a - toggle autoupdate ESC - exit...
bsd-3-clause
etingof/pyasn1-modules
pyasn1_modules/rfc7773.py
13
1315
# # This file is part of pyasn1-modules software. # # Created by Russ Housley with some assistance from asn1ate v.0.6.0. # # Copyright (c) 2019, Vigil Security, LLC # License: http://snmplabs.com/pyasn1/license.html # # Authentication Context Certificate Extension # # ASN.1 source from: # https://www.rfc-editor.org/rfc...
bsd-2-clause
pranalik/frappe-bb
frappe/setup_logging.py
30
1580
import frappe import logging import logging.config import os import json from pprint import pformat class ContextFilter(logging.Filter): """ This is a filter which injects request information (if available) into the log. """ def filter(self, record): record.form_dict = pformat(getattr(frappe.local, 'form_dict',...
mit
ag-wood/ansible-modules-extras
monitoring/airbrake_deployment.py
94
3894
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2013 Bruce Pennypacker <bruce@pennypacker.org> # # 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...
gpl-3.0
pydio/pydio-sync
src/pydio/res/i18n/html_strings.py
1
9431
def _(a_string): return a_string var_1=_('How can I find my server URL?') var_2=_('The server URL is the adress that you can see in your browser when accessing Pydio via the web.') var_3=_('It starts with http or https depending on your server configuration.') var_4=_('If you are logged in Pydio and you see the last pa...
gpl-3.0
willthames/ansible
test/runner/lib/import_analysis.py
177
8617
"""Analyze python import statements.""" from __future__ import absolute_import, print_function import ast import os from lib.util import ( display, ApplicationError, ) VIRTUAL_PACKAGES = set([ 'ansible.module_utils.six', ]) def get_python_module_utils_imports(compile_targets): """Return a dictiona...
gpl-3.0
MoKee/android_kernel_lge_gproj
scripts/rt-tester/rt-tester.py
11005
5307
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # 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. # import os import sys import getopt import sh...
gpl-2.0
Neurita/boyle
boyle/files/utils.py
1
1412
# coding=utf-8 """ Utilities for file management. """ # ------------------------------------------------------------------------------ # Author: Alexandre Manhaes Savio <alexsavio@gmail.com> # # 2015, Alexandre Manhaes Savio # Use this at your own risk! # ----------------------------------------------------------------...
bsd-3-clause
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/pyshared/ibus/interface/inotifications.py
6
2026
# vim:set et sts=4 sw=4: # # ibus - The Input Bus # # Copyright(c) 2007-2010 Peng Huang <shawn.p.huang@gmail.com> # Copyright(c) 2007-2010 Red Hat, Inc. # # This library 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 Softw...
gpl-3.0
zhulangen/TeamTalk
win-client/3rdParty/src/json/devtools/antglob.py
247
7750
#!/usr/bin/env python # encoding: utf-8 # Baptiste Lepilleur, 2009 from dircache import listdir import re import fnmatch import os.path # These fnmatch expressions are used by default to prune the directory tree # while doing the recursive traversal in the glob_impl method of glob function. prune_dirs = '.git .bzr ....
apache-2.0
toontownfunserver/Panda3D-1.9.0
direct/test/ModelScreenShot.py
2
2413
import direct from pandac.PandaModules import loadPrcFileData from direct.showbase.DirectObject import DirectObject from direct.directbase.DirectStart import * from pandac.PandaModules import * import direct.gui.DirectGuiGlobals as DGG from direct.gui.DirectGui import * from direct.task import Task from direct.direct...
bsd-3-clause
wangcy6/storm_app
frame/c++/grpc-master/tools/run_tests/sanity/check_sources_and_headers.py
5
3176
#!/usr/bin/env python # Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
lucienfostier/gaffer
python/GafferOSLTest/OSLImageTest.py
4
25359
########################################################################## # # Copyright (c) 2013-2015, John Haddon. 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 ...
bsd-3-clause
haoyunfeix/crosswalk-test-suite
apptools/apptools-manifest-tests/tests_android.py
12
8702
#!/usr/bin/env python # coding=utf-8 # # Copyright (c) 2016 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of c...
bsd-3-clause
sgenoud/scikit-learn
sklearn/cluster/tests/test_dbscan.py
3
2890
""" Tests for DBSCAN clustering algorithm """ import pickle import numpy as np from numpy.testing import assert_equal from scipy.spatial import distance from sklearn.cluster.dbscan_ import DBSCAN, dbscan from .common import generate_clustered_data n_clusters = 3 X = generate_clustered_data(n_clusters=n_clusters) ...
bsd-3-clause
bbc/kamaelia
Sketches/MPS/Axon.DSL/Axon/DSL/MultiAIMBot.py
6
7340
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
apache-2.0
hguemar/cinder
cinder/api/contrib/admin_actions.py
1
11497
# Copyright 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 a...
apache-2.0
litedesk/litedesk-webserver-provision
src/provisioning/models.py
1
20144
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2014, Deutsche Telekom AG - Laboratories (T-Labs) # # 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...
apache-2.0
276361270/sqlalchemy
test/ext/test_extendedattr.py
26
19792
from sqlalchemy.testing import eq_, assert_raises, assert_raises_message, ne_ from sqlalchemy import util import sqlalchemy as sa from sqlalchemy.orm import class_mapper from sqlalchemy.orm import attributes from sqlalchemy.orm.attributes import set_attribute, \ get_attribute, del_attribute from sqlalchemy.orm.inst...
mit
sriprasanna/django-1.3.1
django/db/backends/oracle/introspection.py
210
5106
from django.db.backends import BaseDatabaseIntrospection import cx_Oracle import re foreign_key_re = re.compile(r"\sCONSTRAINT `[^`]*` FOREIGN KEY \(`([^`]*)`\) REFERENCES `([^`]*)` \(`([^`]*)`\)") class DatabaseIntrospection(BaseDatabaseIntrospection): # Maps type objects to Django Field types. data_types_re...
bsd-3-clause
dotskapes/wikiSkapes
controllers/appadmin.py
5
13165
# -*- coding: utf-8 -*- # ########################################################## # ## make sure administrator is on localhost # ########################################################### import os import socket import datetime import copy import gluon.contenttype import gluon.fileutils # ## critical --- make a ...
mit
WangKaimin/sublime-evernote
lib/pygments/sphinxext.py
62
4459
# -*- coding: utf-8 -*- """ pygments.sphinxext ~~~~~~~~~~~~~~~~~~ Sphinx extension to generate automatic documentation of lexers, formatters and filters. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print...
mit
pspacek/ansible-modules-extras
packaging/os/urpmi.py
18
5979
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2013, Philippe Makowski # Written by Philippe Makowski <philippem@mageia.org> # Based on apt module written by Matthew Williams <matthew@flowroute.com> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Pu...
gpl-3.0
geordanr/pylint
test/input/func_w0613.py
4
1085
# pylint: disable=R0903 """test unused argument """ __revision__ = 1 def function(arg=1): """ignore arg""" class AAAA: """dummy class""" def method(self, arg): """dummy method""" print self def __init__(self): pass @classmethod def selected(cls, *args, **kwargs): ...
gpl-2.0
chronicwaffle/PokemonGo-DesktopMap
app/pywin/Lib/mailbox.py
21
81240
"""Read/write support for Maildir, mbox, MH, Babyl, and MMDF mailboxes.""" # Notes for authors of new mailbox subclasses: # # Remember to fsync() changes to disk before closing a modified file # or returning from a flush() method. See functions _sync_flush() and # _sync_close(). import sys import os import time impo...
mit
Eric-Zhong/odoo
addons/payment_paypal/models/res_company.py
422
1752
# -*- coding: utf-8 -*- from openerp.osv import fields, osv class ResCompany(osv.Model): _inherit = "res.company" def _get_paypal_account(self, cr, uid, ids, name, arg, context=None): Acquirer = self.pool['payment.acquirer'] company_id = self.pool['res.users'].browse(cr, uid, uid, context=co...
agpl-3.0
inares/edx-platform
common/djangoapps/student/tests/test_email.py
23
17978
import json import django.db import unittest from student.tests.factories import UserFactory, RegistrationFactory, PendingEmailChangeFactory from student.views import ( reactivation_email_for_user, do_email_change_request, confirm_email_change, validate_new_email, SETTING_CHANGE_INITIATED ) from student.model...
agpl-3.0
heyglen/network_tech
lib/iana/ripe/clean_attribute_name.py
2
3202
# Copyright 2019 Glen Harmon BASE_OBJECT_ATTRIBUTE_MAP = { 'descr': 'description', 'source': 'source', 'created': 'created', 'last-modified': 'modified', 'org': 'organisation', 'admin-c': 'admin_contact', 'tech-c': 'technical_contact', 'mnt-by': 'main...
apache-2.0
wbyne/QGIS
python/qsci_apis/generate_console_pap.py
12
3340
# -*- coding:utf-8 -*- """ /*************************************************************************** Module to generate prepared APIs for calltips and auto-completion. ------------------- begin : 2013-08-29 copyright : (C) 2013 Larry Shaffer email ...
gpl-2.0
maxdeliso/elevatorSim
Lib/plat-freebsd7/IN.py
344
12956
# Generated by h2py from /usr/include/netinet/in.h # Included from sys/cdefs.h __GNUCLIKE_ASM = 3 __GNUCLIKE_ASM = 2 __GNUCLIKE___TYPEOF = 1 __GNUCLIKE___OFFSETOF = 1 __GNUCLIKE___SECTION = 1 __GNUCLIKE_ATTRIBUTE_MODE_DI = 1 __GNUCLIKE_CTOR_SECTION_HANDLING = 1 __GNUCLIKE_BUILTIN_CONSTANT_P = 1 __GNUCLIKE_BUILTIN_VARA...
bsd-2-clause
davidh-ssec/pyresample
pyresample/test/test_kd_tree.py
1
44711
from __future__ import with_statement import os import sys import six import numpy as np from pyresample import geometry, kd_tree, utils from pyresample.test.utils import catch_warnings if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest class Test(unittest.TestCase): @cl...
lgpl-3.0
bender-bot/bender
bender/_tests/test_main.py
1
2381
from io import StringIO import pkg_resources import pytest import threading import bender._main from bender.backbones.console import BenderConsole from bender.decorators import backbone_start from bender.testing import VolatileBrain, DumbMessage @pytest.mark.timeout(3.0) def test_main(mock): stdout = StringIO() ...
lgpl-3.0
fnouama/intellij-community
python/lib/Lib/encodings/cp875.py
593
13110
""" Python Character Mapping Codec cp875 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP875.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input...
apache-2.0
aaltay/beam
sdks/python/apache_beam/runners/portability/spark_runner_test.py
1
6533
# # 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
cdrooom/odoo
addons/account_budget/__openerp__.py
7
3013
# -*- 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
bobobox/ansible
lib/ansible/modules/network/f5/bigip_selfip.py
16
21456
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2016 F5 Networks Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # ...
gpl-3.0
adkerr/tempest
tempest/common/generate_sample_tempest.py
3
1512
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 IBM Corp. # 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/licen...
apache-2.0
noba3/KoTos
addons/script.module.urlresolver/lib/urlresolver/plugins/xvidstage.py
3
2330
""" urlresolver XBMC Addon Copyright (C) 2011 t0mm0 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 distribute...
gpl-2.0
rahushen/ansible
test/units/modules/network/nso/nso_module.py
19
3900
# Copyright (c) 2017 Cisco and/or its affiliates. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
gpl-3.0
gaccardo/buxfer_api
api/reporter.py
1
16970
import os import math from reportlab.pdfgen import canvas from reportlab.graphics.shapes import Drawing from reportlab.graphics.charts.piecharts import Pie from reportlab.graphics.charts.legends import Legend from reportlab.lib.colors import black, red, purple, green, \ maroon, brown, pink, white, HexColor from re...
gpl-2.0
akeyong/vnpy
vn.trader/language/english/text.py
8
3178
# encoding: UTF-8 SAVE_DATA = 'Save Data' CONTRACT_SYMBOL = 'Symbol' CONTRACT_NAME = 'Name' LAST_PRICE = 'Last' PRE_CLOSE_PRICE = 'PreClose' VOLUME = 'Volume' OPEN_INTEREST = 'Open Interest' OPEN_PRICE = 'Open' HIGH_PRICE = 'High' LOW_PRICE = 'Low' TIME = 'Time' GATEWAY = 'Gateway' CONTENT = 'Content' ERROR_CODE = u...
mit
andreesg/bda.plone.checkout
src/bda/plone/checkout/__init__.py
2
2972
import logging from node.utils import UNSET from node.utils import instance_property from zope.component import adapter from zope.i18nmessageid import MessageFactory from zope.interface import Interface from zope.interface import implementer from zope.publisher.interfaces.browser import IBrowserRequest from bda.plone.c...
bsd-3-clause
kxliugang/edx-platform
lms/djangoapps/courseware/tests/test_view_authentication.py
89
17038
import datetime import pytz from django.core.urlresolvers import reverse from mock import patch from nose.plugins.attrib import attr from courseware.access import has_access from courseware.tests.helpers import CourseAccessTestMixin, LoginEnrollmentTestCase from courseware.tests.factories import ( BetaTesterFacto...
agpl-3.0
stephanie-wang/ray
python/ray/tune/suggest/variant_generator.py
1
8452
import copy import logging import numpy import random from ray.tune import TuneError from ray.tune.sample import sample_from logger = logging.getLogger(__name__) def generate_variants(unresolved_spec): """Generates variants from a spec (dict) with unresolved values. There are two types of unresolved values...
apache-2.0
punalpatel/st2
contrib/packs/actions/check_auto_deploy_repo.py
2
2019
#!/usr/bin/env python # 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 "Licens...
apache-2.0
PokeHunterProject/pogom-linux
pogom/pgoapi/protos/POGOProtos/Networking/Responses/FortDetailsResponse_pb2.py
6
8582
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Networking/Responses/FortDetailsResponse.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from...
mit
mattpap/sympy-polys
sympy/solvers/ode.py
1
115902
""" This module contains dsolve() and different helper functions that it uses. dsolve() solves ordinary differential equations. See the docstring on the various functions for their uses. Note that partial differential equations support is in pde.py. Note that ode_hint() functions have docstrings describing their vari...
bsd-3-clause
ArcherSys/ArcherSys
Lib/site-packages/win32com/test/testAccess.py
6
5688
# # This assumes that you have MSAccess and DAO installed. # You need to run makepy.py over "msaccess.tlb" and # "dao3032.dll", and ensure the generated files are on the # path. # You can run this with no args, and a test database will be generated. # You can optionally pass a dbname on the command line, in which c...
mit
rwl/PyCIM
CIM14/IEC61968/AssetModels/ToWindingSpec.py
1
6782
# Copyright (C) 2010-2011 Richard Lincoln # # 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...
mit
abhikumar22/MYBLOG
blg/Lib/site-packages/django-1.11.7-py3.6.egg/django/contrib/gis/gdal/prototypes/generation.py
50
4363
""" This module contains functions that generate ctypes prototypes for the GDAL routines. """ from ctypes import c_char_p, c_double, c_int, c_int64, c_void_p from functools import partial from django.contrib.gis.gdal.prototypes.errcheck import ( check_arg_errcode, check_const_string, check_errcode, check_geom, ...
gpl-3.0
VendCoin/VendCoin
qa/rpc-tests/txn_doublespend.py
152
4968
#!/usr/bin/env python2 # Copyright (c) 2014 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 proper accounting with malleable transactions # from test_framework import BitcoinTestFramework from...
mit
flyher/pymo
android/pgs4a-0.9.6/python-install/lib/python2.7/test/test_quopri.py
133
7484
from test import test_support import unittest import sys, cStringIO, subprocess import quopri ENCSAMPLE = """\ Here's a bunch of special=20 =A1=A2=A3=A4=A5=A6=A7=A8=A9 =AA=AB=AC=AD=AE=AF=B0=B1=B2=B3 =B4=B5=B6=B7=B8=B9=BA=BB=BC=BD=BE =BF=C0=C1=C2=C3=C4=C5=C6 =C7=C8=C9=CA=CB=CC=CD=CE=CF =D0=D1=D2=D3=D4=D5=D6=D7 =D8=...
mit
walterbender/infoslicer
infoslicer/widgets/Gallery_View.py
1
8660
# Copyright (C) IBM Corporation 2008 from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GObject from gi.repository import GdkPixbuf import os import cPickle import logging from Editable_Textbox import Editable_Textbox from infoslicer.processing.Article_Data import * from ...
gpl-2.0
flwh/KK_mt6589_iq451
prebuilts/python/darwin-x86/2.7.5/lib/python2.7/plat-mac/cfmfile.py
40
5721
"""codefragments.py -- wrapper to modify code fragments.""" # (c) 1998, Just van Rossum, Letterror __version__ = "0.8b3" __author__ = "jvr" import warnings warnings.warnpy3k("the cfmfile module is deprecated and is removed in 3,0", stacklevel=2) import Carbon.File import struct from Carbon import Res ...
gpl-2.0
sysbot/CouchPotatoServer
libs/bs4/builder/_htmlparser.py
412
8839
"""Use the HTMLParser library to parse HTML files that aren't too bad.""" __all__ = [ 'HTMLParserTreeBuilder', ] from HTMLParser import ( HTMLParser, HTMLParseError, ) import sys import warnings # Starting in Python 3.2, the HTMLParser constructor takes a 'strict' # argument, which we'd like to s...
gpl-3.0
larsmans/numpy
numpy/_import_tools.py
15
13265
from __future__ import division, absolute_import, print_function import os import sys import warnings __all__ = ['PackageLoader'] class PackageLoader(object): def __init__(self, verbose=False, infunc=False): """ Manages loading packages. """ if infunc: _level = 2 else...
bsd-3-clause
sankhesh/VTK
IO/EnSight/Testing/Python/EnSightNfacedASCII.py
20
1510
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # create a rendering window and renderer ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren1) renWin.StereoCapableWindowOn() iren = vtk.vtkRenderWindowInte...
bsd-3-clause
mingjian2049/zstack-utility
zstacklib/zstacklib/utils/bash.py
2
3756
import subprocess import functools import json from jinja2 import Template from zstacklib.utils import log import inspect import time import re from progress_report import WatchThread_1 from zstacklib.utils import linux logger = log.get_logger(__name__) class BashError(Exception): '''bash error''' def __collect_...
apache-2.0
FireWRT/OpenWrt-Firefly-Libraries
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python3.4/encodings/shift_jis_2004.py
816
1059
# # shift_jis_2004.py: Python Unicode Codec for SHIFT_JIS_2004 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('shift_jis_2004') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEnc...
gpl-2.0
mrchristine/dbc-notebooks
tools/pyspark_sync/workspace.py
1
12134
import base64 import argparse import json import requests import sys import os import fnmatch WS_LIST = "/workspace/list" WS_STATUS = "/workspace/get-status" WS_MKDIRS = "/workspace/mkdirs" WS_IMPORT = "/workspace/import" WS_EXPORT = "/workspace/export" LS_ZONES = "/clusters/list-zones" error_401 = """ Credentials ar...
apache-2.0
dsfsdgsbngfggb/odoo
addons/website_blog/__init__.py
373
1036
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0