repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
onitake/ansible
refs/heads/devel
contrib/inventory/docker.py
11
#!/usr/bin/env python # # (c) 2016 Paul Durivage <paul.durivage@gmail.com> # Chris Houseknecht <house@redhat.com> # James Tanner <jtanner@redhat.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 Lic...
crackerhead/nemio-flask-old
refs/heads/master
lib/python2.7/site-packages/flask/signals.py
783
# -*- coding: utf-8 -*- """ flask.signals ~~~~~~~~~~~~~ Implements signals based on blinker if available, otherwise falls silently back to a noop :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ signals_available = False try: from blinker import Name...
pbeeler/android_external_skia
refs/heads/sm-jb-mr1
bench/bench_compare.py
27
''' Created on May 16, 2011 @author: bungeman ''' import sys import getopt import bench_util def usage(): """Prints simple usage information.""" print '-o <file> the old bench output file.' print '-n <file> the new bench output file.' print '-h causes headers to be output.' print '-f <fieldSp...
tonylixu/python-tools
refs/heads/master
python3/pysysadmin/setup.py
1
""" setup.py contains the module/package that will be installed has been packaged and distributed with Distutils """ from setuptools import setup setup( name = 'pysysadmin', description = 'Python system admin scripts', author = 'Tony Li Xu', author_email = 'tonylixu@gmail.com', license = 'Apache', ...
bitcraft/pyglet
refs/heads/master
tests/interactive/window/_window_caption.py
1
"""Test that the window caption can be set. Expected behaviour: Two windows will be opened, one with the caption "Window caption 1" counting up every second; the other with a Unicode string including some non-ASCII characters. Press escape or close either window to finished the test. """ import time...
douban/code
refs/heads/master
dispatches/notifications/new_commits.py
3
#!/usr/bin/env python # -*- coding: utf-8 -*- from dispatches.notifications import NotificationDispatcher from vilya.libs.mailer import Mail, MailContext from vilya.models.mute import Mute #from vilya.models.actions.pull_commit import PullCommit # feed will need EMAIL_TITLE = "[%s] %s (#%s)" IN_REPLY_TO = '<%s-pull-...
pigeonflight/strider-plone
refs/heads/master
docker/appengine/lib/django-0.96/django/contrib/admin/templatetags/__init__.py
12133432
computersalat/ansible
refs/heads/devel
test/units/ansible_test/ci/__init__.py
12133432
CSC301H-Fall2013/JuakStore
refs/heads/master
site-packages/tests/regressiontests/signals_regress/__init__.py
12133432
manassolanki/erpnext
refs/heads/develop
erpnext/hotels/doctype/__init__.py
12133432
OpenWinCon/OpenWinNet
refs/heads/master
web-gui/myvenv/lib/python3.4/site-packages/django/conf/locale/sk/__init__.py
12133432
shubhdev/openedx
refs/heads/master
common/test/acceptance/pages/lms/account_settings.py
128
""" Base class for account settings page. """ from . import BASE_URL from bok_choy.page_object import PageObject from bok_choy.promise import EmptyPromise from .fields import FieldsMixin class AccountSettingsPage(FieldsMixin, PageObject): """ Tests for Account Settings Page. """ url = "{base}/{sett...
IvanGavran/scrapy
refs/heads/master
tests/test_spidermiddleware_depth.py
136
from unittest import TestCase from scrapy.spidermiddlewares.depth import DepthMiddleware from scrapy.http import Response, Request from scrapy.spiders import Spider from scrapy.statscollectors import StatsCollector from scrapy.utils.test import get_crawler class TestDepthMiddleware(TestCase): def setUp(self): ...
Sarah-Alsinan/muypicky
refs/heads/master
lib/python3.6/site-packages/django/core/cache/backends/locmem.py
586
"Thread-safe in-memory cache backend." import time from contextlib import contextmanager from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache from django.utils.synch import RWLock try: from django.utils.six.moves import cPickle as pickle except ImportError: import pickle # Global in-memor...
Azure/azure-sdk-for-python
refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline
sdk/keyvault/azure-keyvault-keys/tests/test_keys_async.py
1
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import asyncio import codecs from dateutil import parser as date_parse import functools import json import logging from azure.core.exceptions import ResourceExistsError...
vidgizmo/sublime-filterlines-with-invert
refs/heads/master
fold.py
1
import re import sublime import sublime_plugin from .filter import PromptFilterToLinesCommand from .filter import FilterToLinesCommand class PromptFoldToLinesCommand(PromptFilterToLinesCommand): def run(self, search_type='string'): self._run(search_type, "fold_to_lines", "Fold") class FoldToLinesComman...
zhouzhenghui/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/test/test_isinstance.py
59
# Tests some corner cases with isinstance() and issubclass(). While these # tests use new style classes and properties, they actually do whitebox # testing of error conditions uncovered when using extension types. import unittest from test import support import sys class TestIsInstanceExceptions(unittest.TestCase...
47lining/ansible
refs/heads/devel
lib/ansible/runner/action_plugins/win_template.py
9
# (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...
DivineHime/seishirou
refs/heads/master
lib/pip/_vendor/distlib/_backport/shutil.py
395
# -*- coding: utf-8 -*- # # Copyright (C) 2012 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """Utility functions for copying and archiving files and directory trees. XXX The functions here don't copy the resource fork or other metadata on Mac. """ import os import sys import stat from os...
charlesvdv/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/py/py/_path/common.py
171
""" """ import os, sys, posixpath import py # Moved from local.py. iswin32 = sys.platform == "win32" or (getattr(os, '_name', False) == 'nt') class Checkers: _depend_on_existence = 'exists', 'link', 'dir', 'file' def __init__(self, path): self.path = path def dir(self): raise NotImplemen...
allotria/intellij-community
refs/heads/master
plugins/hg4idea/testData/bin/mercurial/verify.py
93
# verify.py - repository integrity checking for Mercurial # # Copyright 2006, 2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from node import nullid, short from i18n import _ import os import r...
jorik041/plaso
refs/heads/master
plaso/formatters/firefox.py
3
# -*- coding: utf-8 -*- """The Mozilla Firefox history event formatter.""" from plaso.formatters import interface from plaso.formatters import manager from plaso.lib import errors class FirefoxBookmarkAnnotationFormatter(interface.ConditionalEventFormatter): """The Firefox bookmark annotation event formatter.""" ...
bufferapp/buffer-django-nonrel
refs/heads/master
django/db/backends/postgresql/__init__.py
12133432
TechBK/horizon-dev
refs/heads/master
openstack_dashboard/dashboards/techbk_head/newpanel/__init__.py
12133432
ademuk/django-oscar
refs/heads/master
tests/_site/apps/customer/migrations/__init__.py
12133432
alrusdi/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/django/bin/__init__.py
12133432
cpodlesny/lisbon
refs/heads/master
src/offer/__init__.py
12133432
mbauskar/internal-hr
refs/heads/develop
erpnext/hr/doctype/hr_settings/__init__.py
12133432
hamzehd/edx-platform
refs/heads/master
lms/djangoapps/survey/views.py
79
""" View endpoints for Survey """ import logging import json from django.contrib.auth.decorators import login_required from django.http import ( HttpResponse, HttpResponseRedirect, HttpResponseNotFound ) from django.core.urlresolvers import reverse from django.views.decorators.http import require_POST from django...
palerdot/calibre
refs/heads/master
src/calibre/utils/socket_inheritance.py
5
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai from __future__ import (unicode_literals, division, absolute_import, print_function) ''' Created on 29 Nov 2013 @author: charles Code taken from https://mail.python.org/pipermail/python-dev/2007-June/073745.ht...
karolciba/playground
refs/heads/master
neural/trex.py
1
width = 1200 height_down = 25 height_up = 200 # 250 # with scores
Evervolv/android_external_chromium_org
refs/heads/kitkat
chrome/android/host_driven_tests/DummyTest.py
23
# Copyright (c) 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. import os from pylib.host_driven import test_case from pylib.host_driven import tests_annotations class DummyTest(test_case.HostDrivenTestCase): """...
googleads/google-ads-python
refs/heads/master
google/ads/googleads/v7/services/services/ad_service/transports/base.py
1
# -*- coding: utf-8 -*- # Copyright 2020 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...
mhils/mitmproxy
refs/heads/master
examples/contrib/remote-debug.py
4
""" This script enables remote debugging of the mitmproxy console *UI* with PyCharm. For general debugging purposes, it is easier to just debug mitmdump within PyCharm. Usage: - pip install pydevd on the mitmproxy machine - Open the Run/Debug Configuration dialog box in PyCharm, and select the Python Rem...
sergiofasilva/WebRealTimeEngine
refs/heads/master
webrealtimeengine/controllers/items.py
1
# -*- coding: utf-8 -*- ''' Created on 4 de Set de 2013 @author: Sergio Silva ''' import logging import traceback import time import json import handler from random import randint from handler import Handler from collections import namedtuple class Items(Handler): @handler.response_page_format() def get(s...
hurricup/intellij-community
refs/heads/master
python/testData/dotNet/import_class_from_module_alias.py
80
import clr clr.AddReferenceByPartialName("PythonLibs") from c<caret>om.just.like.java import LikeJavaClass as MyClass print MyClass
igor-rangel7l/igorrangelteste.repository
refs/heads/master
script.module.urlresolver/lib/urlresolver/plugins/videowood.py
1
""" urlresolver XBMC Addon Copyright (C) 2015 tknorris 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. ...
davidcusatis/horizon
refs/heads/master
openstack_dashboard/dashboards/project/vpn/workflows.py
11
# Copyright 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 agre...
xionzz/earthquake
refs/heads/master
venv/lib/python2.7/site-packages/numpy/distutils/command/build.py
53
from __future__ import division, absolute_import, print_function import os import sys from distutils.command.build import build as old_build from distutils.util import get_platform from numpy.distutils.command.config_compiler import show_fortran_compilers class build(old_build): sub_commands = [('config_cc', ...
ebukoz/thrive
refs/heads/develop
erpnext/accounts/doctype/cash_flow_mapping/__init__.py
12133432
retomerz/intellij-community
refs/heads/master
python/testData/psi/Ellipsis.py
83
d[...] = 1
xeBuz/Ordbogen
refs/heads/master
app/models/tokens.py
1
import time from app import db, app from datetime import datetime, timedelta from werkzeug.security import gen_salt from app.models.users import Users from .base import BaseModel def generate_key(): return gen_salt(60) def generate_expiration(): expiration = datetime.now() + timedelta(hours=app.config['TOKE...
Vvucinic/Wander
refs/heads/master
venv_2_7/lib/python2.7/site-packages/Django-1.9-py2.7.egg/django/contrib/gis/gdal/error.py
535
""" This module houses the GDAL & SRS Exception objects, and the check_err() routine which checks the status code returned by GDAL/OGR methods. """ # #### GDAL & SRS Exceptions #### class GDALException(Exception): pass # Legacy name OGRException = GDALException class SRSException(Exception): pass cla...
ingokegel/intellij-community
refs/heads/master
python/testData/formatter/fStringFragmentWrappingSplitInsideExpression_after.py
12
s = f'aaaaaa' \ f'{oct(42)}'
hippyvm/hippyvm
refs/heads/master
testing/test_refcount.py
2
import py from hippy.objects.base import W_Root from testing.test_interpreter import BaseTestInterpreter class TestRefCount(BaseTestInterpreter): @py.test.yield_fixture(autouse=True) def note_copies(self): def note_making_a_copy(array): self.space.ec.interpreter.writestr(array.var_dump(se...
open-switch/ops-quagga
refs/heads/master
ops-tests/feature/bgp/test_bgp_ft_ip_community_list.py
2
# -*- coding: utf-8 -*- # (C) Copyright 2015 Hewlett Packard Enterprise Development LP # 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.a...
nox/servo
refs/heads/master
components/script/dom/bindings/codegen/parser/tests/test_extended_attributes.py
149
import WebIDL def WebIDLTest(parser, harness): parser.parse(""" [NoInterfaceObject] interface TestExtendedAttr { [Unforgeable] readonly attribute byte b; }; """) results = parser.finish() parser = parser.reset() parser.parse(""" [Pref="foo.bar",Pref=flop]...
zhengjue/mytornado
refs/heads/master
omserver/OMserverweb/manage.py
1
#!/usr/bin/env python import os import sys if __name__ == "__main__": <<<<<<< HEAD # os.environ.setdefault("DJANGO_SETTINGS_MODULE", "OMserverweb.settings") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") ======= os.environ.setdefault("DJANGO_SETTINGS_MODULE", "OMserverweb.settings") # os...
mixmar91/whatsapp
refs/heads/master
yowsup/layers/protocol_contacts/protocolentities/test_notification_contact_update.py
68
from yowsup.layers.protocol_contacts.protocolentities import UpdateContactNotificationProtocolEntity from yowsup.structs.protocolentity import ProtocolEntityTest import time import unittest entity = UpdateContactNotificationProtocolEntity("1234", "jid@s.whatsapp.net", i...
yamila-moreno/django
refs/heads/master
tests/test_discovery_sample/pattern_tests.py
641
from unittest import TestCase class Test(TestCase): def test_sample(self): self.assertEqual(1, 1)
kybriainfotech/iSocioCRM
refs/heads/8.0
addons/website_livechat/models/__init__.py
427
import website
ettm2012/MissionPlanner
refs/heads/master
Lib/site-packages/scipy/stats/tests/test_continuous_extra.py
53
# contains additional tests for continuous distributions # # NOTE: one test, _est_cont_skip, that is renamed so that nose doesn't # run it, # 6 distributions return nan for entropy # truncnorm fails by design for private method _ppf test import numpy.testing as npt import numpy as np from scipy imp...
marc-white/ads
refs/heads/master
ads/sandbox.py
4
""" Sandbox environment that wraps relevant classes so that they receive mock responses rather than contact the live API """ import re from ads import search from .search import SearchQuery as _SearchQuery, Article as _Article from .metrics import MetricsQuery as _MetricsQuery from .export import ExportQuery as _Expo...
andris210296/andris-projeto
refs/heads/master
backend/venv/lib/python2.7/site-packages/unidecode/x022.py
165
data = ( '[?]', # 0x00 '[?]', # 0x01 '[?]', # 0x02 '[?]', # 0x03 '[?]', # 0x04 '[?]', # 0x05 '[?]', # 0x06 '[?]', # 0x07 '[?]', # 0x08 '[?]', # 0x09 '[?]', # 0x0a '[?]', # 0x0b '[?]', # 0x0c '[?]', # 0x0d '[?]', # 0x0e '[?]', # 0x0f '[?]', # 0x10 '[?]', # 0x11 '-', ...
OpenAcademy-OpenStack/nova-scheduler
refs/heads/master
nova/virt/images.py
15
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in complianc...
LarryHillyer/PoolHost
refs/heads/master
PoolHost/env/Lib/site-packages/django/db/models/fields/__init__.py
33
# -*- coding: utf-8 -*- from __future__ import unicode_literals import collections import copy import datetime import decimal import itertools import uuid import warnings from base64 import b64decode, b64encode from functools import total_ordering from django import forms from django.apps import apps from django.conf...
kidchang/compassv2-api
refs/heads/master
compass/tasks/__init__.py
48
# Copyright 2014 Huawei Technologies Co. Ltd # # 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...
JohnLZeller/jenkinsapi
refs/heads/master
jenkinsapi/executor.py
10
""" Module for jenkinsapi Executer class """ from jenkinsapi.jenkinsbase import JenkinsBase import logging log = logging.getLogger(__name__) class Executor(JenkinsBase): """ Class to hold information on nodes that are attached as slaves to the master jenkins instance """ def __init__(self, bas...
NiclasEriksen/py-towerwars
refs/heads/master
src/numpy/lib/polynomial.py
35
""" Functions to operate on polynomials. """ from __future__ import division, absolute_import, print_function __all__ = ['poly', 'roots', 'polyint', 'polyder', 'polyadd', 'polysub', 'polymul', 'polydiv', 'polyval', 'poly1d', 'polyfit', 'RankWarning'] import re import warnings import numpy.core....
PRIMEDesigner15/PRIMEDesigner15
refs/heads/master
dependencies/Lib/test/unittests/test_codeop.py
118
""" Test cases for codeop.py Nick Mathewson """ import unittest from test.support import run_unittest, is_jython from codeop import compile_command, PyCF_DONT_IMPLY_DEDENT import io if is_jython: import sys def unify_callables(d): for n,v in d.items(): if hasattr(v, '__call__'): ...
palerdot/calibre
refs/heads/master
src/calibre/gui2/convert/pdf_input.py
24
# -*- coding: utf-8 -*- __license__ = 'GPL 3' __copyright__ = '2009, John Schember <john@nachtimwald.com>' __docformat__ = 'restructuredtext en' from calibre.gui2.convert.pdf_input_ui import Ui_Form from calibre.gui2.convert import Widget, QDoubleSpinBox class PluginWidget(Widget, Ui_Form): TITLE = _('PDF Input...
oorestisime/debsources
refs/heads/master
debsources/plugins/hook_sloccount.py
5
# Copyright (C) 2013-2015 The Debsources developers <info@sources.debian.net>. # See the AUTHORS file at the top-level directory of this distribution and at # https://anonscm.debian.org/gitweb/?p=qa/debsources.git;a=blob;f=AUTHORS;hb=HEAD # # This file is part of Debsources. Debsources is free software: you can # redi...
shipci/boto
refs/heads/develop
boto/mashups/server.py
153
# 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...
caioserra/apiAdwords
refs/heads/master
examples/adspygoogle/dfp/v201208/get_orders_by_statement.py
4
#!/usr/bin/python # # Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
JoaoVasques/aws-devtool
refs/heads/master
eb/macosx/python3/lib/aws/requests/packages/oauthlib/common.py
74
# -*- coding: utf-8 -*- from __future__ import absolute_import """ oauthlib.common ~~~~~~~~~~~~~~ This module provides data structures and utilities common to all implementations of OAuth. """ import random import re import string import time import urllib import urlparse UNICODE_ASCII_CHARACTER_SET = (string.ascii...
akretion/l10n-belgium
refs/heads/8.0
account_companyweb/model/__init__.py
6
# -*- coding: utf-8 -*- # ############################################################################## # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Genera...
heke123/chromium-crosswalk
refs/heads/master
chrome/common/extensions/docs/server2/permissions_data_source.py
37
# 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. from itertools import ifilter from operator import itemgetter from data_source import DataSource from extensions_paths import PRIVATE_TEMPLATES from future ...
liboyin/algo-prac
refs/heads/master
mathematics/roman_nums.py
1
from bisect import bisect_left N = 13 # up to 3999 DEC = [1, 4, 5, 9, 10, 40, 50, 90, 100, 400, 500, 900, 1000] ROM = ['I', 'IV', 'V', 'IX', 'X', 'XL', 'L', 'XC', 'C', 'CD', 'D', 'CM', 'M'] def dec_to_roman(x): assert 0 <= x <= 3999 r = [] while x > 0: i = bisect_left(DEC, x) if i == N or...
mjoe/spksrc
refs/heads/develop
spk/subliminal/src/app/setup.py
42
#!/usr/local/subliminal/env/bin/python from application import db, direct if __name__ == '__main__': db.setup() subliminal = direct.Subliminal() subliminal.setup()
liosha2007/temporary-groupdocs-python-sdk
refs/heads/master
groupdocs/models/UserInfoResult.py
2
#!/usr/bin/env python """ Copyright 2012 GroupDocs. 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...
Hironsan/Brain_Hacker
refs/heads/master
tests/models/__init__.py
1349
# -*- coding: utf-8 -*-
eon01/vagrant_nodejs
refs/heads/master
salt/formulas/vim/files/pyflakes/ftplugin/python/pyflakes/pyflakes/test/test_undefined_names.py
40
from _ast import PyCF_ONLY_AST from twisted.trial.unittest import TestCase from pyflakes import messages as m, checker from pyflakes.test import harness class Test(harness.Test): def test_undefined(self): self.flakes('bar', m.UndefinedName) def test_definedInListComp(self): self.flakes('[a...
pastebt/you-get
refs/heads/web
tests/test.py
20
#!/usr/bin/env python import unittest from you_get import * from you_get.extractors import * from you_get.common import * class YouGetTests(unittest.TestCase): def test_freesound(self): freesound.download("http://www.freesound.org/people/Corsica_S/sounds/184419/", info_only=True) def test_magisto(s...
passalis/sef
refs/heads/master
setup.py
1
from setuptools import setup from sef_dr.version import __version__ setup( name='PySEF', version=__version__, author='N. Passalis', author_email='passalis@csd.auth.gr', packages=['sef_dr',], url='https://github.com/passalis/sef', license='LICENSE.txt', description='Package that implemen...
ksmit799/Toontown-Source
refs/heads/master
toontown/estate/DistributedAnimatedStatuary.py
6
from pandac.PandaModules import NodePath from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.estate import DistributedStatuary from toontown.estate import GardenGlobals from direct.actor import Actor class DistributedAnimatedStatuary(DistributedStatuary.Distri...
anilmuthineni/tensorflow
refs/heads/master
tensorflow/python/training/training_ops_test.py
53
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
gsehub/edx-platform
refs/heads/gsehub-release
openedx/core/djangoapps/password_policy/settings/common.py
24
""" Default settings for the password_policy app. """ def plugin_settings(settings): """ Adds default settings for the password_policy app. """ # Settings for managing the rollout of password policy compliance enforcement. settings.PASSWORD_POLICY_COMPLIANCE_ROLLOUT_CONFIG = { # Global swi...
jc0n/scrapy
refs/heads/master
scrapy/core/scheduler.py
20
import os import json import logging from os.path import join, exists from scrapy.utils.reqser import request_to_dict, request_from_dict from scrapy.utils.misc import load_object from scrapy.utils.job import job_dir logger = logging.getLogger(__name__) class Scheduler(object): def __init__(self, dupefilter, jo...
openfun/edx-platform
refs/heads/master
common/djangoapps/course_modes/migrations/__init__.py
12133432
Paul-Jouhaud/url_shortener
refs/heads/master
urlShortenerServer/urlShortenerServer/__init__.py
12133432
rimbalinux/LMD3
refs/heads/master
django/contrib/localflavor/it/__init__.py
12133432
cmunk/protwis
refs/heads/master
build/__init__.py
12133432
ryanahall/django
refs/heads/master
django/contrib/messages/apps.py
591
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class MessagesConfig(AppConfig): name = 'django.contrib.messages' verbose_name = _("Messages")
benbox69/pyload
refs/heads/stable
module/plugins/hoster/LinksnappyCom.py
12
# -*- coding: utf-8 -*- import re import urlparse from module.common.json_layer import json_loads, json_dumps from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class LinksnappyCom(MultiHoster): __name__ = "LinksnappyCom" __type__ = "hoster" __version__ = "0.11" __stat...
wuhengzhi/chromium-crosswalk
refs/heads/master
tools/variations/fieldtrial_util.py
10
# Copyright 2015 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. import json import sys def _hex(ch): hv = hex(ord(ch)).replace('0x', '') hv.zfill(2) return hv.upper() # URL escapes the delimiter characters from t...
Vignesh2208/Awlsim
refs/heads/master
awlsim/core/util.py
2
# -*- coding: utf-8 -*- # # AWL simulator - utility functions # # Copyright 2012-2015 Michael Buesch <m@bues.ch> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License...
jmartinm/invenio
refs/heads/master
modules/webmessage/lib/webmessage_unit_tests.py
16
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at yo...
yewang15215/django
refs/heads/master
tests/validation/test_picklable.py
576
import pickle from unittest import TestCase from django.core.exceptions import ValidationError class PickableValidationErrorTestCase(TestCase): def test_validationerror_is_picklable(self): original = ValidationError('a', code='something') unpickled = pickle.loads(pickle.dumps(original)) ...
timthelion/FreeCAD
refs/heads/master
src/Mod/Sketcher/TestSketcherApp.py
27
# (c) Juergen Riegel (FreeCAD@juergen-riegel.net) 2011 LGPL * # * # This file is part of the FreeCAD CAx development system. * # * # This pro...
t0mk/ansible
refs/heads/devel
lib/ansible/modules/cloud/ovirt/ovirt_host_pm.py
8
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 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 #...
siosio/intellij-community
refs/heads/master
python/testData/completion/superInitParams.after.py
83
class B: def __init__(self, auno=True): pass class C(B): pass c = C(auno=)
Osmose/kitsune
refs/heads/master
kitsune/customercare/tests/test_helpers.py
17
from datetime import datetime from nose.tools import eq_ from kitsune.customercare.helpers import isotime, round_percent, utctimesince from kitsune.sumo.tests import TestCase def test_isotime(): """Test isotime helper.""" time = datetime(2009, 12, 25, 10, 11, 12) eq_(isotime(time), '2009-12-25T18:11:12Z...
joshbohde/scikit-learn
refs/heads/master
sklearn/linear_model/tests/test_omp.py
1
# Author: Vlad Niculae # License: BSD style import warnings import numpy as np from nose.tools import assert_raises from numpy.testing import assert_equal, assert_array_almost_equal from .. import orthogonal_mp, orthogonal_mp_gram, OrthogonalMatchingPursuit from ...utils.fixes import count_nonzero from ...datasets i...
liris/websocket-client
refs/heads/master
setup.py
1
import sys from setuptools import setup import pkg_resources VERSION = "0.57.0" NAME = "websocket_client" install_requires = ["six"] tests_require = [] if sys.version_info[0] == 2 and sys.version_info[1] < 7: tests_require.append('unittest2==0.8.0') insecure_pythons = '2.6, ' + ', '.join("2.7.{pv}".format(...
petemounce/ansible
refs/heads/devel
lib/ansible/template/template.py
70
# (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...
RohitDas/cubeproject
refs/heads/master
manage.py
27
#!/usr/bin/env python # 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 ...
Gabrielcarvfer/NS3
refs/heads/master
src/core/examples/sample-rng-plot.py
12
# -*- Mode:Python; -*- # /* # * 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 # * # * This program is distributed in the hope that it will be useful, # * but WITHOUT ANY WARRA...
bensternthal/bedrock
refs/heads/master
bedrock/redirects/urls.py
5
# 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 django.conf import settings from django.conf.urls import patterns from bedrock.base.helpers import static from pip...
adfinis-forks/aptly
refs/heads/master
system/t09_repo/drop.py
14
from lib import BaseTest class DropRepo1Test(BaseTest): """ drop repo: regular drop """ fixtureCmds = [ "aptly repo create repo1", ] runCmd = "aptly repo drop repo1" def check(self): self.check_output() self.check_cmd_output("aptly repo show repo1", "repo-show", ex...
hbrunn/OCB
refs/heads/8.0
addons/base_import/tests/__init__.py
317
from . import test_cases