repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
kerr-huang/SL4A
refs/heads/master
python/src/Lib/test/inspect_fodder2.py
214
# line 1 def wrap(foo=None): def wrapper(func): return func return wrapper # line 7 def replace(func): def insteadfunc(): print 'hello' return insteadfunc # line 13 @wrap() @wrap(wrap) def wrapped(): pass # line 19 @replace def gone(): pass # line 24 oll = lambda m: m # line...
saradbowman/osf.io
refs/heads/develop
osf/migrations/0017_auto_20170419_1323.py
28
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-04-19 18:23 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('osf', '0016_preprintprovider_domain_redirect_enabled'), ] operations = [ migra...
telwertowski/Books-Mac-OS-X
refs/heads/master
Books/Library of Congress.plugin/Contents/Resources/PyZ3950/SRWDiagnostics.py
30
# Base Class class SRWDiagnostic (Exception): """ Base Diagnostic Class""" code = 0 uri = "info:srw/diagnostic/1/" details = "" message = "" surrogate = 0 fatal = 1 def __str__(self): return "%s [%s]: %s" % (self.uri, self.message, self.details) # NB 'Need' name for seri...
UIKit0/shaka-player
refs/heads/master
third_party/gjslint/closure_linter-2.3.13/closure_linter/common/position.py
285
#!/usr/bin/env python # # Copyright 2008 The Closure Linter 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 #...
notriddle/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome.py
7
from .base import Browser, ExecutorBrowser, require_arg from .base import get_timeout_multiplier # noqa: F401 from ..webdriver_server import ChromeDriverServer from ..executors import executor_kwargs as base_executor_kwargs from ..executors.executorwebdriver import (WebDriverTestharnessExecutor, # noqa: F401 ...
illicitonion/givabit
refs/heads/master
lib/sdks/google_appengine_1.7.1/google_appengine/lib/django_1_2/django/contrib/databrowse/datastructures.py
312
""" These classes are light wrappers around Django's database API that provide convenience functionality and permalink functions for the databrowse app. """ from django.db import models from django.utils import formats from django.utils.text import capfirst from django.utils.encoding import smart_unicode, smart_str, i...
mosafwat/InterviewTool
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/win_tool.py
1417
#!/usr/bin/env python # 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. """Utility functions for Windows builds. These functions are executed via gyp-win-tool when using the ninja generator. """ import os impor...
benthomasson/ansible
refs/heads/devel
test/units/module_utils/test_distribution_version.py
47
# -*- coding: utf-8 -*- # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distr...
1905410/Misago
refs/heads/master
misago/conf/tests/test_admin_views.py
1
from django.core.urlresolvers import reverse from misago.admin.testutils import AdminTestCase from ..models import SettingsGroup class AdminSettingsViewsTests(AdminTestCase): def test_link_registered(self): """admin index view contains settings link""" response = self.client.get(reverse('misago:...
bitomule/ReactiveSwiftRealm
refs/heads/master
Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/external/catch/scripts/approve.py
46
#!/usr/bin/env python from __future__ import print_function import os import sys import shutil import glob from scriptCommon import catchPath rootPath = os.path.join( catchPath, 'projects/SelfTest/Baselines' ) if len(sys.argv) > 1: files = [os.path.join( rootPath, f ) for f in sys.argv[1:]] else: files = glob.g...
dagwieers/ansible
refs/heads/devel
lib/ansible/modules/cloud/azure/azure_rm_devtestlabvirtualmachine_info.py
1
#!/usr/bin/python # # Copyright (c) 2019 Zim Kalinowski, (@zikalino) # # 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', ...
erinspace/osf.io
refs/heads/develop
osf/migrations/0121_remove_waffle_flags.py
14
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-07-23 13:16 from __future__ import unicode_literals from waffle.models import Flag from django.db import migrations EMBER_WAFFLE_PAGES = [ 'dashboard', 'home', ] def format_ember_waffle_flag_name(page): return 'ember_{}_page'.format(page) def...
felipevolpone/speakerfight
refs/heads/master
api/urls.py
1
from django.conf.urls import url from api.views import RetrieveEventView urlpatterns = [ url(u'^events/(?P<slug>.+)/$', RetrieveEventView.as_view()), ]
fa7ad/xopen-file
refs/heads/master
setup.py
1
"""Setupttols config for xopen-file.""" # Always prefer setuptools over distutils from os import path from setuptools import setup, find_packages # To use a consistent encoding here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.rst'), encodi...
SGCreations/Flask
refs/heads/master
Work/Trivia - Module 5/env/Lib/site-packages/flask/testsuite/examples.py
620
# -*- coding: utf-8 -*- """ flask.testsuite.examples ~~~~~~~~~~~~~~~~~~~~~~~~ Tests the examples. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import unittest from flask.testsuite import add_to_path def setup_path(): example_path = os.pat...
pk-sam/tizen-extensions-crosswalk
refs/heads/master
tools/gyp/pylib/gyp/input.py
14
# 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. from compiler.ast import Const from compiler.ast import Dict from compiler.ast import Discard from compiler.ast import List from compiler.ast import Module from co...
akshaykarle/veewee
refs/heads/master
lib/python/parallels_sdk_check.py
36
import sys import prlsdkapi prlsdk = prlsdkapi.prlsdk consts = prlsdkapi.prlsdk.consts # Initialize the Parallels API Library prlsdk.InitializeSDK(consts.PAM_DESKTOP_MAC) # Obtain a server object identifying the Parallels Service. server = prlsdkapi.Server() # Log in. (local as we do Parallels Desktop login_job=ser...
BackupGGCode/python-for-android
refs/heads/master
python-build/python-libs/ase/android.py
86
# Copyright (C) 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 agreed to in writing, ...
sysalexis/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py
949
######################## 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...
insiderr/insiderr-app
refs/heads/master
ios-patches/basemodules/twisted/test/reflect_helper_VE.py
164
# Helper for a test_reflect test raise ValueError("Stuff is broken and things")
Foxfanmedium/python_training
refs/heads/master
OnlineCoursera/mail_ru/Python_1/env/Lib/site-packages/traitlets/utils/bunch.py
15
"""Yet another implementation of bunch attribute-access of items on a dict. """ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. class Bunch(dict): """A dict with attribute-access""" def __getattr__(self, key): try: return self.__getitem...
evolvIQ/iqserialization
refs/heads/master
Contrib/splitstream/setup.py
1
#!/usr/bin/env python # -*- coding: utf-8 -* import os from setuptools import setup, Extension ROOT_DIR = os.path.dirname(__file__) SOURCE_DIR = os.path.join(ROOT_DIR) test_requirements = [] requirements = [] setup( name="splitstream", url="https://github.com/evolvIQ/splitstream", author="Rickard Lyreniu...
jamesls/boto
refs/heads/develop
boto/glacier/utils.py
32
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
tgroh/incubator-beam
refs/heads/master
sdks/python/apache_beam/runners/worker/worker_id_interceptor_test.py
9
# # 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...
d0gZpAw/p2pool-doged
refs/heads/master
p2pool/__init__.py
278
import os import re import sys import traceback import subprocess def check_output(*popenargs, **kwargs): process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs) output, unused_err = process.communicate() retcode = process.poll() if retcode: raise ValueError((retcode, output)) ...
catapult-project/catapult-csm
refs/heads/master
telemetry/third_party/modulegraph/modulegraph_tests/testpkg-relimport2/pkg/__init__.py
23
from . import mod1 from .mod2 import *
kbussell/django-auditlog
refs/heads/master
src/auditlog_tests/__init__.py
4
default_app_config = 'auditlog_tests.apps.AuditlogTestConfig'
lightwang1/beets
refs/heads/master
beets/util/confit.py
22
# This file is part of Confit. # Copyright 2015, Adrian Sampson. # # 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,...
balajikris/autorest
refs/heads/master
src/generator/AutoRest.Python.Tests/Expected/AcceptanceTests/Url/autoresturltestservice/credentials.py
687
# 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 ...
arakashic/shadowsocks
refs/heads/master
tests/nose_plugin.py
1072
#!/usr/bin/env python # # 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 by applicable law or ...
inventree/InvenTree
refs/heads/master
InvenTree/stock/migrations/0061_auto_20210511_0911.py
2
# Generated by Django 3.2 on 2021-05-10 23:11 import re from django.db import migrations from InvenTree.status_codes import StockHistoryCode def update_history(apps, schema_editor): """ Update each existing StockItemTracking object, convert the recorded "quantity" to a delta """ StockItem = ap...
befelix/GPy
refs/heads/devel
GPy/testing/svgp_tests.py
15
import numpy as np import scipy as sp import GPy class SVGP_nonconvex(np.testing.TestCase): """ Inference in the SVGP with a student-T likelihood """ def setUp(self): X = np.linspace(0,10,100).reshape(-1,1) Z = np.linspace(0,10,10).reshape(-1,1) Y = np.sin(X) + np.random.randn(*...
biomodels/MODEL1305240000
refs/heads/master
MODEL1305240000/__init__.py
1209
from model import *
TianpeiLuke/GPy
refs/heads/master
GPy/mappings/__init__.py
4
# Copyright (c) 2013, 2014 GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) from kernel import Kernel from linear import Linear from mlp import MLP #from rbf import RBF
saurabh6790/omn-lib
refs/heads/master
wnf.py
10
#!/usr/bin/env python2.7 # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import sys if __name__=="__main__": sys.path = [".", "lib", "app"] + sys.path import webnotes def main(): parsed_args = webnotes._dict(vars(setup...
Tesora/tesora-horizon
refs/heads/master
openstack_dashboard/test/settings.py
2
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
hendradarwin/VTK
refs/heads/master
ThirdParty/Twisted/twisted/conch/openssh_compat/primes.py
69
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. # """ Parsing for the moduli file, which contains Diffie-Hellman prime groups. Maintainer: Paul Swartz """ def parseModuliFile(filename): lines = open(filename).readlines() primes = {} for l in lines: l = l.strip() ...
vdloo/raptiformica
refs/heads/master
tests/unit/raptiformica/settings/meshnet/test_update_neighbours_config.py
1
from raptiformica.settings.meshnet import update_neighbours_config from tests.testcase import TestCase class TestUpdateNeighboursConfig(TestCase): def setUp(self): self.cjdns = self.set_up_patch('raptiformica.settings.meshnet.cjdns') self.get_last_advertised = self.set_up_patch( 'rapti...
40223137/2015cbaa
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/collections/__init__.py
625
#__all__ = ['deque', 'defaultdict', 'Counter'] from _collections import deque, defaultdict #from itertools import repeat as _repeat, chain as _chain, starmap as _starmap __all__ = ['deque', 'defaultdict', 'namedtuple', 'UserDict', 'UserList', 'UserString', 'Counter', 'OrderedDict'] # For bootstrapping re...
nineties/py-videocore
refs/heads/master
videocore/mailbox.py
1
"""Wrapper of mailBox property interface.""" import os from array import array from ctypes import c_void_p from struct import calcsize, pack_into, unpack_from from fcntl import ioctl from ioctl_opt import IOWR IOCTL_MAILBOX = IOWR(100, 0, c_void_p) # Use static constant length buffer to avoid unnecessary copy. # Se...
rapilabs/django
refs/heads/master
django/contrib/messages/constants.py
837
DEBUG = 10 INFO = 20 SUCCESS = 25 WARNING = 30 ERROR = 40 DEFAULT_TAGS = { DEBUG: 'debug', INFO: 'info', SUCCESS: 'success', WARNING: 'warning', ERROR: 'error', } DEFAULT_LEVELS = { 'DEBUG': DEBUG, 'INFO': INFO, 'SUCCESS': SUCCESS, 'WARNING': WARNING, 'ERROR': ERROR, }
moritz9/redash
refs/heads/master
old_migrations/0001_allow_delete_query.py
20
from playhouse.migrate import PostgresqlMigrator, migrate from redash.models import db from redash import models if __name__ == '__main__': db.connect_db() migrator = PostgresqlMigrator(db.database) with db.database.transaction(): migrate( migrator.add_column('queries', 'is_archived',...
brain-tec/bank-statement-reconcile
refs/heads/8.0
setup/account_reconcile_prepare_account/odoo_addons/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
airanmehr/cssvm
refs/heads/master
python/eval.py
1
from numpy import array, arange, sum, append from operator import itemgetter from matplotlib import pyplot def get_perror(deci, label, Pn, Pp): neg, pos, neg_err, pos_err = 0., 0., 0., 0. for (f,y) in zip(deci,label): if y>0: pos+=1 if f* y <= 0: pos_err+...
hungdt/scf_dmft
refs/heads/master
triqs_interface.py
1
import pytriqs.operators as triqs_ops import pytriqs.operators.util as triqs_ops_util import pytriqs.applications.impurity_solvers.cthyb_mod as triqs_solver import pytriqs.gf.local as triqs_gf from pytriqs.archive import HDFArchive import pytriqs.utility.mpi as mpi import os import sys import time from numpy import *...
dragosbdi/p2pool
refs/heads/master
wstools/c14n.py
290
#! /usr/bin/env python '''XML Canonicalization Patches Applied to xml.dom.ext.c14n: http://sourceforge.net/projects/pyxml/ [ 1444526 ] c14n.py: http://www.w3.org/TR/xml-exc-c14n/ fix -- includes [ 829905 ] c14n.py fix for bug #825115, Date Submitted: 2003-10-24 23:43 -- include dep...
taosheng/jarvis
refs/heads/master
chatbot/src/wikiChat.py
1
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- import json import requests import sys #import jieba #import jieba.posseg as pseg import re def findWiki( word): url = u'https://zh.wikipedia.org/w/api.php?uselang=zh-tw&action=query&prop=extracts&format=xml&exintro=&redirects=&titles={0}' r = requests.get(ur...
durai145/youtube-dl
refs/heads/master
youtube_dl/extractor/rte.py
108
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( float_or_none, ) class RteIE(InfoExtractor): _VALID_URL = r'http?://(?:www\.)?rte\.ie/player/[^/]{2,3}/show/(?P<id>[0-9]+)/' _TEST = { 'url': 'http://www.rte.ie/player/de/show/10363114...
Datera/python-sdk
refs/heads/v1.2
src/dfs_sdk/base.py
1
""" Base classes for endpoint and entitys """ import json import collections import sys import os from .exceptions import _ApiResponseError from .exceptions import SdkEntityNotFound from .exceptions import SdkEndpointNotFound from .connection import dat_version_gte from .constants import PYTHON_3_0_0_HEXVERSION __cop...
belimawr/django-filer
refs/heads/develop
filer/migrations/0001_initial.py
19
# -*- coding: utf-8 -*- import datetime import south from south.db import db from south.v2 import SchemaMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() us...
SlimRemix/android_external_chromium_org
refs/heads/lp5.1
third_party/cython/src/Cython/Compiler/TreeFragment.py
96
# # TreeFragments - parsing of strings to trees # import re from StringIO import StringIO from Scanning import PyrexScanner, StringSourceDescriptor from Symtab import ModuleScope import PyrexTypes from Visitor import VisitorTransform from Nodes import Node, StatListNode from ExprNodes import NameNode import Parsing im...
Eksmo/calibre
refs/heads/master
src/calibre/gui2/store/stores/mobileread/adv_search_builder_ui.py
1
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/gugu/w/calibre/src/calibre/gui2/store/stores/mobileread/adv_search_builder.ui' # # Created: Thu Jul 19 23:32:29 2012 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import Q...
shenzebang/scikit-learn
refs/heads/master
sklearn/ensemble/tests/test_weight_boosting.py
22
"""Testing for the boost module (sklearn.ensemble.boost).""" import numpy as np from sklearn.utils.testing import assert_array_equal, assert_array_less from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_equal, assert_true from sklearn.utils.testing import assert_raises...
Azure/azure-sdk-for-python
refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_network_interfaces_operations.py
1
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
Basis/pip
refs/heads/develop
pip/_vendor/requests/packages/charade/sjisprober.py
1182
######################## 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...
jmehnle/ansible
refs/heads/devel
lib/ansible/modules/remote_management/hpilo/hponcfg.py
66
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Dag Wieers <dag@wieers.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, ...
peter-jang/ansible
refs/heads/devel
examples/scripts/yaml_to_ini.py
133
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
niavlys/kivy
refs/heads/master
kivy/tests/visual_test_label.py
37
from kivy.app import runTouchApp from kivy.uix.gridlayout import GridLayout from kivy.properties import StringProperty from kivy.lang import Builder from kivy.utils import get_hex_from_color, get_random_color import timeit import re import random from functools import partial def layout_perf(label, repeat): if re...
tseaver/google-cloud-python
refs/heads/master
test_utils/test_utils/retry.py
17
# Copyright 2016 Google LLC # # 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, s...
fredericlepied/ansible
refs/heads/devel
test/units/module_utils/test_network_common.py
17
# -*- coding: utf-8 -*- # # (c) 2017 Red Hat, 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 # (at your option) any later ...
scottpurdy/nupic.vision
refs/heads/master
src/nupic/vision/regions/ImageSensorExplorers/SpiralSweep.py
2
# ---------------------------------------------------------------------- # 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 apply: # # This progra...
jeffreylu9/django-cms
refs/heads/wlsite
cms/templatetags/cms_tags.py
13
# -*- coding: utf-8 -*- from datetime import datetime from itertools import chain from copy import copy try: from collections import OrderedDict except ImportError: from django.utils.datastructures import SortedDict as OrderedDict from django import template from django.conf import settings from django.contr...
kromain/chromium-tools
refs/heads/master
third_party/logilab/astng/node_classes.py
16
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # copyright 2003-2010 Sylvain Thenault, all rights reserved. # contact mailto:thenault@gmail.com # # This file is part of logilab-astng. # # logilab-astng is free software: you can redi...
xujun10110/weevely3
refs/heads/master
modules/system/extensions.py
16
from core.vectors import PhpCode from core.module import Module from core import messages import random class Extensions(Module): """Collect PHP and webserver extension list.""" def init(self): self.register_info( { 'author': [ 'Emilio Pinna' ...
Stavitsky/nova
refs/heads/master
nova/db/sqlalchemy/migrate_repo/versions/261_placeholder.py
810
# 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...
tonyzzz/androguard
refs/heads/master
demos/androguard_ANALYSIS.py
38
#!/usr/bin/env python import sys, hashlib PATH_INSTALL = "./" sys.path.append(PATH_INSTALL + "./") from androguard.core.androgen import AndroguardS from androguard.core.analysis import analysis OUTPUT = "./output/" #TEST = 'examples/java/test/orig/Test1.class' #TEST = 'examples/java/Demo1/orig/DES.class' #TEST = ...
seclinch/swampdragon
refs/heads/master
tests/test_base_router_default_verbs.py
13
from swampdragon.route_handler import BaseRouter from swampdragon.testing.dragon_testcase import DragonTestCase class FooRouter(BaseRouter): route_name = 'foo' class TestBaseRouter(DragonTestCase): def setUp(self): self.router = FooRouter(self.connection) def test_get_list(self): with s...
harshita-gupta/Harvard-FRSEM-Catalog-2016-17
refs/heads/master
flask/lib/python2.7/site-packages/requests/packages/chardet/langcyrillicmodel.py
2761
######################## 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...
wchan/tensorflow
refs/heads/master
tensorflow/python/training/session_manager_test.py
2
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
victorfontes/django-mailer-2
refs/heads/master
django_mailer/constants.py
2
PRIORITY_EMAIL_NOW = 0 PRIORITY_HIGH = 1 PRIORITY_NORMAL = 3 PRIORITY_LOW = 5 RESULT_SENT = 0 RESULT_SKIPPED = 1 RESULT_FAILED = 2
VisTrails/VisTrails
refs/heads/v2.2
vistrails/packages/persistent_archive/common.py
2
############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2013-2014, NYU-Poly. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary for...
voipir/python-sii
refs/heads/master
src/sii/lib/lib/syscall.py
1
""" Wrapping for all System Calls needed in this Library. TODO: * Break out lpstat stuff into own call. """ import os import re import tempfile import subprocess from .shell import which, cd __all__ = [ 'SystemCall', 'Ghostscript', 'Ps2Eps', 'PdfLaTeX', 'LP' ] class SystemCall(object): @...
wimnat/ansible
refs/heads/devel
test/lib/ansible_test/_data/sanity/code-smell/symlinks.py
66
#!/usr/bin/env python from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import sys def main(): root_dir = os.getcwd() + os.path.sep for path in sys.argv[1:] or sys.stdin.read().splitlines(): if not os.path.islink(path.rstrip(os.path.sep)): ...
probcomp/bayeslite
refs/heads/master
external/lemonade/dist/lemonade/configlist.py
1
''' Routines to processing a configuration list and building a state in the LEMON parser generator. ''' from ccruft import iterlinks from error import * from set import * from struct import * from table import * current = None # Top of list of configurations currentend = None # Last on list of configs basis ...
supriyantomaftuh/django
refs/heads/master
tests/pagination/tests.py
266
from __future__ import unicode_literals import unittest from datetime import datetime from django.core.paginator import ( EmptyPage, InvalidPage, PageNotAnInteger, Paginator, ) from django.test import TestCase from django.utils import six from .custom import ValidAdjacentNumsPaginator from .models import Article...
tempbottle/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/site-packages/pip/vcs/mercurial.py
392
import os import tempfile import re import sys from pip.util import call_subprocess from pip.util import display_path, rmtree from pip.log import logger from pip.vcs import vcs, VersionControl from pip.download import path_to_url from pip.backwardcompat import ConfigParser class Mercurial(VersionControl): name = ...
keisuke-umezawa/chainer
refs/heads/master
chainer/training/updaters/standard_updater.py
2
import six from chainer import backend from chainer.backends import cuda from chainer.dataset import convert from chainer.dataset import iterator as iterator_module from chainer.training import _updater class StandardUpdater(_updater.Updater): """Standard implementation of Updater. This is the standard imp...
RafaelPalomar/girder
refs/heads/master
plugins/worker/plugin_tests/worker_test.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware 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 ...
ghtmtt/QGIS
refs/heads/master
python/plugins/processing/algs/grass7/ext/v_vect_stats.py
45
# -*- coding: utf-8 -*- """ *************************************************************************** v_vect_stats.py --------------- Date : March 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr *******************************...
thanhuwng/namebench
refs/heads/master
tools/check_dns_servers.py
174
#!/usr/bin/env python # Copyright 2009 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...
clumsy/intellij-community
refs/heads/master
python/lib/Lib/distutils/command/build_scripts.py
97
"""distutils.command.build_scripts Implements the Distutils 'build_scripts' command.""" # This module should be kept compatible with Python 2.1. __revision__ = "$Id: build_scripts.py 59668 2008-01-02 18:59:36Z guido.van.rossum $" import sys, os, re from stat import ST_MODE from distutils import sysconfig from distu...
planbcoin/planbcoin
refs/heads/master
contrib/devtools/symbol-check.py
1
#!/usr/bin/env python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' A script to check that the (Linux) executables produced by gitian only contain allowed gcc, glibc and libstdc++...
vipul-sharma20/oh-mainline
refs/heads/master
vendor/packages/sphinx/sphinx/domains/std.py
15
# -*- coding: utf-8 -*- """ sphinx.domains.std ~~~~~~~~~~~~~~~~~~ The standard domain. :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import unicodedata from docutils import nodes from docutils.parsers.rst import directives ...
kdwink/intellij-community
refs/heads/master
python/testData/refactoring/changeSignature/kwArgs.before.py
83
def func(param, **kwargs): pass func(param=1, param2=1)
corona10/grumpy
refs/heads/master
grumpy-runtime-src/third_party/stdlib/test/test_mimetools.py
5
import unittest from test import test_support import string import StringIO #mimetools = test_support.import_module("mimetools", deprecated=True) import mimetools msgtext1 = mimetools.Message(StringIO.StringIO( """Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Foo! """))...
goliveirab/odoo
refs/heads/8.0
addons/account_check_writing/account.py
379
# -*- 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...
nateprewitt/pipenv
refs/heads/master
pipenv/patched/pip/_vendor/lockfile/sqlitelockfile.py
536
from __future__ import absolute_import, division import time import os try: unicode except NameError: unicode = str from . import LockBase, NotLocked, NotMyLock, LockTimeout, AlreadyLocked class SQLiteLockFile(LockBase): "Demonstrate SQL-based locking." testdb = None def __init__(self, path, ...
Bysmyyr/blink-crosswalk
refs/heads/master
Tools/Scripts/webkitpy/layout_tests/port/test.py
5
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
StephenWeber/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/ec2_snapshot_facts.py
47
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
MER-GROUP/intellij-community
refs/heads/master
python/testData/selectWord/escapeSequence/after1.py
83
s = 'Hello\n<selection>World</selection>!'
pombredanne/ctypesgen
refs/heads/master
ctypesgencore/parser/datacollectingparser.py
13
#!/usr/bin/env python """ DataCollectingParser subclasses ctypesparser.CtypesParser and builds Description objects from the CtypesType objects and other information from CtypesParser. After parsing is complete, a DescriptionCollection object can be retrieved by calling DataCollectingParser.data(). """ import ctypespa...
rajiteh/taiga-back
refs/heads/master
manage.py
790
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
skippbox/kmachine
refs/heads/kmachine
Godeps/_workspace/src/k8s.io/kubernetes/examples/job/work-queue-1/worker.py
6
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 appli...
chiraldev/rpn
refs/heads/develop
rpn/abstract.py
2
from collections import deque import re from decimal import Decimal, InvalidOperation from .exceptions import (BadExpressionError, MathDomainError, DivideByZeroError, UnacceptableToken, TooShortBadExpression, MathDomainError, ...
Rude-Enterprises/WDL-DiscordBot
refs/heads/master
cogs/stats.py
1
import random from discord.ext import commands import libraries as lb lb.all_time_playoff.name = "All time Playoffs" lb.season7.name = "Season 7" lb.season6.name = "Season 6" lb.season5.name = "Season 5" lb.season4.name = "Season 4" lb.season3.name = "Season 3" lb.season2.name = "Season 2" lb.season1.name = "Season 1"...
cega/pyfpdf
refs/heads/master
fpdf/fonts.py
24
#!/usr/bin/env python # -*- coding: latin-1 -*- # Fonts: fpdf_charwidths = {} fpdf_charwidths['courier']={} for i in range(0,256): fpdf_charwidths['courier'][chr(i)]=600 fpdf_charwidths['courierB']=fpdf_charwidths['courier'] fpdf_charwidths['courierI']=fpdf_charwidths['courier'] fpdf_ch...
Open-Power-System-Data/national_generation_capacity
refs/heads/master
functions/plots.py
1
import pandas as pd import math import bokeh.plotting as plt from bokeh.models import ColumnDataSource, Legend, LegendItem colormap = { 'Fossil fuels': 'Black', 'Lignite': '#754937', 'Hard coal': '#4d3e35', 'Oil': '#272724', 'Natural gas': '#e54213', 'Combined cycle': '#ff814b', 'Gas turb...
kenshay/ImageScript
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/django/forms/boundfield.py
8
from __future__ import unicode_literals import datetime import warnings from django.forms.utils import flatatt, pretty_name from django.forms.widgets import Textarea, TextInput from django.utils import six from django.utils.deprecation import RemovedInDjango21Warning from django.utils.encoding import force_text, pyth...
IntelLabs/numba
refs/heads/master
numba/tests/test_codegen.py
5
""" Tests for numba.core.codegen. """ import warnings import base64 import ctypes import pickle import re import subprocess import sys import weakref import llvmlite.binding as ll import unittest from numba import njit from numba.core.codegen import JITCPUCodegen from numba.core.compiler_lock import global_compiler...
dahlstrom-g/intellij-community
refs/heads/master
python/testData/formatter/trailingComment.py
71
# Whole-line commend that starts with whitespace. if True: #Trailing comment with no whitespace print 'Spam' # Trailing comment with excess whitespace