repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
qmagico/sampleappqm
refs/heads/master
src/django/utils/log.py
97
import logging import traceback from django.conf import settings from django.core import mail from django.views.debug import ExceptionReporter, get_exception_reporter_filter # Make sure a NullHandler is available # This was added in Python 2.7/3.2 try: from logging import NullHandler except ImportError: class...
Innovahn/odoo.old
refs/heads/master
openerp/addons/base/ir/ir_qweb.py
4
# -*- coding: utf-8 -*- import collections import cStringIO import datetime import hashlib import json import itertools import logging import math import os import re import sys import textwrap import uuid from subprocess import Popen, PIPE from urlparse import urlparse import babel import babel.dates import werkzeug ...
makinacorpus/Geotrek
refs/heads/master
geotrek/maintenance/migrations/0014_auto_20200316_1245.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2020-03-16 11:45 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion def intervention_sgnage_infrastructure(apps, schema_editor): InterventionModel = apps.get_model('maintenance', 'Intervention'...
devdelay/home-assistant
refs/heads/dev
homeassistant/components/notify/demo.py
12
""" Demo notification service. For more details about this platform, please refer to the documentation https://home-assistant.io/components/demo/ """ from homeassistant.components.notify import ATTR_TITLE, BaseNotificationService EVENT_NOTIFY = "notify" def get_service(hass, config): """Get the demo notificatio...
mjschultz/ansible-modules-extras
refs/heads/devel
cloud/profitbricks/profitbricks_nic.py
132
#!/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...
chris-chris/tensorflow
refs/heads/master
tensorflow/contrib/rnn/python/tools/checkpoint_convert_test.py
30
# 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...
alanquillin/ryu
refs/heads/master
ryu/services/protocols/bgp/bmp.py
13
# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
michaelaye/vispy
refs/heads/master
vispy/glsl/__init__.py
8
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- import os import os.p...
Mappy/mapnik
refs/heads/master
scons/scons-local-2.3.0/SCons/Memoize.py
11
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation # # 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, incl...
shenzebang/scikit-learn
refs/heads/master
sklearn/decomposition/setup.py
100
import os import numpy from numpy.distutils.misc_util import Configuration def configuration(parent_package="", top_path=None): config = Configuration("decomposition", parent_package, top_path) libraries = [] if os.name == 'posix': libraries.append('m') config.add_extension("_online_lda", ...
sdgathman/cjdns
refs/heads/master
contrib/python/cjdnsadmin/adminTools.py
7
#!/usr/bin/env python2 # You may redistribute this program and/or modify it under the terms of # the GNU General Public License as published by the Free Software Foundation, # either version 3 of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
phalax4/CarnotKE
refs/heads/master
jyhton/lib-python/2.7/distutils/core.py
75
"""distutils.core The only module that needs to be imported to use the Distutils; provides the 'setup' function (which is to be called from the setup script). Also indirectly provides the Distribution and Command classes, although they are really defined in distutils.dist and distutils.cmd. """ __revision__ = "$Id$"...
dmitrinesterenko/cs294
refs/heads/master
hw2/plot.py
1
import seaborn as sns import pandas as pd import matplotlib.pyplot as plt import json import os """ Using the plotter: Call it from the command line, and supply it with logdirs to experiments. Suppose you ran an experiment with name 'test', and you ran 'test' for 10 random seeds. The runner code stored it in the dir...
CTSRD-SOAAP/chromium-42.0.2311.135
refs/heads/master
tools/telemetry/telemetry/core/video_unittest.py
12
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import os import unittest from telemetry import decorators from telemetry.image_processing import image_util from telemetry.core import platf...
da1z/intellij-community
refs/heads/master
python/testData/refactoring/introduceVariable/substringInExpression.after.py
83
a = 'foo' print(('%sbar' % a).upper())
codepython/Diamond
refs/heads/master
src/collectors/aurora/test/testaurora.py
17
#!/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 patch from diamond.collector import Collector from aurora import A...
felinx/poweredsites
refs/heads/master
poweredsites/libs/webkit2png.py
1
# -*- coding: utf-8 -*- # # webkit2png.py # # Creates screenshots of webpages using by QtWebkit. # # Copyright (c) 2008 Roland Tapken <roland@dau-sicher.de> # # 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...
111pontes/ydk-py
refs/heads/master
cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_asr9k_xbar_oper.py
1
""" Cisco_IOS_XR_asr9k_xbar_oper This module contains a collection of YANG definitions for Cisco IOS\-XR asr9k\-xbar package operational data. This module contains definitions for the following management objects\: cross\-bar\-stats\: Crossbar stats operational data Copyright (c) 2013\-2016 by Cisco Systems, Inc....
kushalbhola/MyStuff
refs/heads/master
Practice/PythonApplication/env/Lib/site-packages/pandas/tests/frame/test_query_eval.py
2
from io import StringIO import operator import numpy as np import pytest import pandas.util._test_decorators as td import pandas as pd from pandas import DataFrame, Index, MultiIndex, Series, date_range from pandas.core.computation.check import _NUMEXPR_INSTALLED from pandas.tests.frame.common import TestData from p...
hbarghi/VirtualBattery1
refs/heads/master
src/visualizer/visualizer/core.py
59
# -*- Mode: python; coding: utf-8 -*- from __future__ import division #from __future__ import with_statement LAYOUT_ALGORITHM = 'neato' # ['neato'|'dot'|'twopi'|'circo'|'fdp'|'nop'] REPRESENT_CHANNELS_AS_NODES = 1 DEFAULT_NODE_SIZE = 3.0 # default node size in meters DEFAULT_TRANSMISSIONS_MEMORY = 5 # default number o...
sencha/chromium-spacewalk
refs/heads/master
tools/telemetry/telemetry/page/actions/scroll_unittest.py
33
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os from telemetry.page.actions import scroll from telemetry.unittest import tab_test_case from telemetry.unittest import test class ScrollActionTes...
ychen820/microblog
refs/heads/master
y/google-cloud-sdk/platform/google_appengine/google/appengine/_internal/django/utils/dateformat.py
23
""" PHP date() style date formatting See http://www.php.net/date for format strings Usage: >>> import datetime >>> d = datetime.datetime.now() >>> df = DateFormat(d) >>> print df.format('jS F Y H:i') 7th October 2003 11:39 >>> """ import re import time import calendar from google.appengine._internal.django.utils.date...
andela-ooladayo/django
refs/heads/master
django/conf/locale/ml/formats.py
1007
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'N j, Y' TIME_FORMAT = 'P' DATETIM...
mttr/django
refs/heads/master
django/contrib/syndication/apps.py
590
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class SyndicationConfig(AppConfig): name = 'django.contrib.syndication' verbose_name = _("Syndication")
EichlerLab/chm1_scripts
refs/heads/master
Inversions/PrintInvDup.py
2
#!/usr/bin/env python import sys def Close(a,b,l): return (abs(a-b) < l) inFile = open(sys.argv[1]) leftFile = open(sys.argv[2], 'w') rightFile = open(sys.argv[3], 'w') while True: l1 = inFile.readline() l2 = inFile.readline() if (l1 == "" or l2 == ""): break v1 = l1.split() v2 = l2...
mbohlool/client-python
refs/heads/master
kubernetes/test/test_v1_event_list.py
1
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
liorvh/raspberry_pwn
refs/heads/master
src/pentest/voiper/sulley/impacket/uuid.py
8
# Copyright (c) 2003-2006 CORE Security Technologies # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # $Id: uuid.py,v 1.4 2006/05/23 21:19:26 gera Exp $ # # Description: # Generate UUID compliant with h...
40223219/w16_test
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/html/parser.py
737
"""A parser for HTML and XHTML.""" # This file is based on sgmllib.py, but the API is slightly different. # XXX There should be a way to distinguish between PCDATA (parsed # character data -- the normal case), RCDATA (replaceable character # data -- only char and entity references and end tags are special) # and CDAT...
Shrews/PyGerrit
refs/heads/master
webapp/django/contrib/gis/tests/test_gdal_srs.py
83
import unittest from django.contrib.gis.gdal import SpatialReference, CoordTransform, OGRException, SRSException class TestSRS: def __init__(self, wkt, **kwargs): self.wkt = wkt for key, value in kwargs.items(): setattr(self, key, value) # Some Spatial Reference examples srlist = (Test...
tmerrick1/spack
refs/heads/develop
var/spack/repos/builtin/packages/libdmx/package.py
5
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
oscaro/django
refs/heads/oscaro-backports-1.7.10
tests/validation/tests.py
4
from __future__ import unicode_literals from django import forms from django.core.exceptions import NON_FIELD_ERRORS from django.test import TestCase from . import ValidationTestCase from .models import (Author, Article, ModelToValidate, GenericIPAddressTestModel, GenericIPAddrUnpackUniqueTest) class BaseModelV...
davidzchen/tensorflow
refs/heads/master
tensorflow/python/ops/distributions/uniform.py
22
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
meteozond/django-rq
refs/heads/master
django_rq/test_settings.py
1
# -*- coding: utf-8 -*- SECRET_KEY = 'a' # Detect whether either django-redis or django-redis-cache is installed. This # is only really used to conditionally configure options for the unit tests. # In actually usage, no such check is necessary. try: import redis_cache if hasattr(redis_cache, 'get_redis_connec...
louisLouL/pair_trading
refs/heads/master
capstone_env/lib/python3.6/site-packages/quandl/model/datatable.py
1
from quandl.operations.get import GetOperation from quandl.operations.list import ListOperation from quandl.util import Util from .model_base import ModelBase from .data import Data class Datatable(GetOperation, ListOperation, ModelBase): @classmethod def get_path(cls): return "%s/metadata" % cls.def...
vipins/ccccms
refs/heads/master
env/Lib/site-packages/pip/vendor/distlib/index.py
79
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # import hashlib import itertools import logging import os import shutil import socket from string import ascii_lowercase import subprocess impo...
yuantailing/edx-forum-search
refs/heads/master
cleanup.py
1
# -*- coding: UTF-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import json import six rep_struct = [{ 'created_at': six.text_type, 'body': six.text_type, 'children': [{ 'created_at': six...
nert-gu/Xposition
refs/heads/master
src/wiki/migrations/0004_merge_20190702_0004.py
1
# Generated by Django 2.1 on 2019-07-02 04:04 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('wiki', '0002_urlpath_moved_to'), ('wiki', '0003_auto_20170819_0708'), ] operations = [ ]
AbsentMoniker/ECE463Honors
refs/heads/master
web2py/gluon/fileutils.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) """ import storage import os import re import tarfile import glob import time import datetime import loggin...
atsolakid/edx-platform
refs/heads/master
common/test/acceptance/tests/lms/test_lms_courseware.py
41
# -*- coding: utf-8 -*- """ End-to-end tests for the LMS. """ import time from ..helpers import UniqueCourseTest from ...pages.studio.auto_auth import AutoAuthPage from ...pages.studio.overview import CourseOutlinePage from ...pages.lms.courseware import CoursewarePage, CoursewareSequentialTabPage from ...pages.lms.co...
osama-haggag/movie-time
refs/heads/master
manage.py
1
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "movie_time.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that t...
3dfxsoftware/cbss-addons
refs/heads/master
hr_holidays/tests/common.py
389
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
rsvip/Django
refs/heads/master
tests/template_tests/filter_tests/test_floatformat.py
345
# -*- coding: utf-8 -*- from __future__ import unicode_literals from decimal import Decimal, localcontext from unittest import expectedFailure from django.template.defaultfilters import floatformat from django.test import SimpleTestCase from django.utils import six from django.utils.safestring import mark_safe from ...
sushramesh/lwc
refs/heads/master
lib/python2.7/site-packages/pip/vcs/bazaar.py
280
from __future__ import absolute_import import logging import os import tempfile import re # TODO: Get this into six.moves.urllib.parse try: from urllib import parse as urllib_parse except ImportError: import urlparse as urllib_parse from pip.utils import rmtree, display_path from pip.vcs import vcs, VersionC...
sudovijay/youtube-dl
refs/heads/master
youtube_dl/extractor/moniker.py
33
# coding: utf-8 from __future__ import unicode_literals import os.path import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, ) from ..utils import ExtractorError class MonikerIE(InfoExtractor): IE_DESC = 'allmyvideos.net and vidspot.net' _VALI...
gurneyalex/odoo
refs/heads/13.0-improve_sale_coupon_perf
addons/website_sale_coupon/controllers/__init__.py
1535
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import main
UstadMobile/exelearning-extjs5-mirror
refs/heads/master
twisted/web/widgets.py
14
# -*- test-case-name: twisted.web.test.test_web -*- # # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """This module is DEPRECATED.""" import warnings warnings.warn("This module is deprecated, please use Woven instead.", DeprecationWarning) # System Imports import string, time, typ...
aonotas/chainer
refs/heads/master
tests/chainer_tests/links_tests/connection_tests/test_n_step_gru.py
1
import unittest import numpy import chainer from chainer.backends import cuda from chainer import gradient_check from chainer import links from chainer import testing from chainer.testing import attr def sigmoid(x): return numpy.tanh(x * 0.5) * 0.5 + 0.5 @testing.parameterize(*testing.product({ 'hidden_no...
40223209/2015cdbg5_0420
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/base64.py
733
#! /usr/bin/env python3 """RFC 3548: Base16, Base32, Base64 Data Encodings""" # Modified 04-Oct-1995 by Jack Jansen to use binascii module # Modified 30-Dec-2003 by Barry Warsaw to add full RFC 3548 support # Modified 22-May-2007 by Guido van Rossum to use bytes everywhere import re import struct import binascii _...
gcblue/gcblue
refs/heads/master
scripts/Amram_Utilities.py
1
#relocating my utility scripts. i'm beginning to have a few of them, and would like to try and avoid having to constantly refer back and forth between my files, and overgrow my core files. import sys, os, math, re, datetime from os.path import dirname, abspath, join, normpath sys.path.append(abspath(join(dirname(__fil...
jeanmask/opps
refs/heads/master
tests/channels/test_forms.py
5
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.test import TestCase from django.contrib.sites.models import Site from django.contrib.auth import get_user_model from opps.channels.models import Channel from opps.channels.forms import ChannelAdminForm class ChannelFormTest(TestCase): def setUp(self): ...
wesm/ibis
refs/heads/master
ibis/expr/tests/test_array.py
1
import pytest import ibis import ibis.expr.datatypes as dt @pytest.mark.parametrize( ['arg', 'type'], [ ([1, 2, 3], dt.Array(dt.int8)), ([1, 2, 3.0], dt.Array(dt.double)), (['a', 'b', 'c'], dt.Array(dt.string)) ] ) def test_array_literal(arg, type): x = ibis.literal(arg) as...
blueburningcoder/nupic
refs/heads/master
examples/opf/tools/sp_plotter.py
34
#! /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...
limnick/pokerbot
refs/heads/master
card.py
1
# # Copyright (C) 2004-2007 Paul Rotering # # 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, or # (at your option) any later version. # # This p...
alexmorozov/django
refs/heads/master
tests/serializers/test_natural.py
69
from __future__ import unicode_literals from django.core import serializers from django.db import connection from django.test import TestCase from .models import FKDataNaturalKey, NaturalKeyAnchor from .tests import register_tests class NaturalKeySerializerTests(TestCase): pass def natural_key_serializer_test...
Metaswitch/calico-nova
refs/heads/calico-readme
nova/tests/unit/test_cinder.py
55
# Copyright 2011 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 l...
pixie-lang/pixie
refs/heads/master
pixie/vm/c_api.py
1
from rpython.rlib.entrypoint import entrypoint_highlevel from rpython.rtyper.lltypesystem import rffi, lltype from rpython.rtyper.lltypesystem.lloperation import llop @entrypoint_highlevel('main', [rffi.CCHARP], c_name='pixie_init') def pypy_execute_source(ll_progname): from target import init_vm progname = r...
kaiweifan/neutron
refs/heads/vip5
neutron/services/firewall/drivers/varmour/__init__.py
267
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apac...
ocefpaf/iris
refs/heads/master
lib/iris/tests/unit/fileformats/pp_load_rules/test_convert.py
5
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """Unit tests for :func:`iris.fileformats.pp_load_rules.convert`.""" # Import iris.tests first so that some things can be init...
p0psicles/SickRage
refs/heads/master
lib/bencode/bencode.py
60
# The contents of this file are subject to the BitTorrent Open Source License # Version 1.1 (the License). You may not copy or use this file, in either # source code or executable form, except in compliance with the License. You # may obtain a copy of the License at http://www.bittorrent.com/license/. # # Software di...
Jeff-Tian/mybnb
refs/heads/master
Python27/Lib/site-packages/pip/_vendor/requests/packages/chardet/gb2312prober.py
2993
######################## 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...
web30s/odoo-9.0c-20160402
refs/heads/master
hello/templates/openerp/addons/website_links/__init__.py
70
# -*- coding: utf-8 -*- import controller
alangwansui/mtl_ordercenter
refs/heads/master
openerp/addons/sale_journal/__openerp__.py
119
# -*- 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...
cades/qualitybots
refs/heads/master
src/appengine/models/bots_user.py
26
#!/usr/bin/python2.4 # # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
sergio-incaser/odoo
refs/heads/8.0
openerp/addons/base/workflow/workflow.py
199
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2014 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
pedro2d10/SickRage-FR
refs/heads/develop
lib/requests/packages/chardet/codingstatemachine.py
2930
######################## 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...
unnikrishnankgs/va
refs/heads/master
venv/lib/python3.5/site-packages/external/org_html5lib/html5lib/tests/test_treeadapters.py
451
from __future__ import absolute_import, division, unicode_literals from . import support # flake8: noqa import html5lib from html5lib.treeadapters import sax from html5lib.treewalkers import getTreeWalker def test_to_sax(): handler = support.TracingSaxHandler() tree = html5lib.parse("""<html xml:lang="en">...
catapult-project/catapult-csm
refs/heads/master
third_party/mock/mock.py
424
# mock.py # Test tools for mocking and patching. # Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # mock 1.0 # http://www.voidspace.org.uk/python/mock/ # Released subject to the BSD License # Please see http://www.voidspace.org.uk/python/license.shtml # Scripts m...
tseaver/google-cloud-python
refs/heads/master
speech/google/cloud/speech_v1/proto/cloud_speech_pb2_grpc.py
2
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.cloud.speech_v1.proto import ( cloud_speech_pb2 as google_dot_cloud_dot_speech__v1_dot_proto_dot_cloud__speech__pb2, ) from google.longrunning import ( operations_pb2 as google_dot_longrunning_dot_operations__pb2, ) ...
fuzzpedal/django-allauth
refs/heads/master
allauth/socialaccount/tests.py
16
import random try: from urllib.parse import urlparse, parse_qs except ImportError: from urlparse import urlparse, parse_qs import warnings import json from django.test.utils import override_settings from django.test import TestCase from django.core.urlresolvers import reverse from django.test.client import Req...
dysya92/monkeys
refs/heads/master
flask/lib/python2.7/site-packages/flask/testsuite/regression.py
563
# -*- coding: utf-8 -*- """ flask.testsuite.regression ~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests regressions. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import gc import sys import flask import threading import unittest from werkzeug.exceptions impor...
Xoin/Europa-Engine-Shield-Converter
refs/heads/master
EUConverter.py
1
import Image import argparse import sys parser = argparse.ArgumentParser() parser.add_argument("-t", dest='type', help="Type of shield to use, HOI2 DH Biger V, defaults to HOI2") parser.add_argument("-f", dest='file', help="File to use, automaically resizes, recommended to use a 70 by 44 px file for best quality") par...
vhaasteren/pysolvepulsar
refs/heads/master
pysolvepulsar/rankreduced.py
1
# rankreduced.py -- Example of rank-reduced covariance matrices for time-domain # approaches # # Rutger van Haasteren, July 7 2014, Pasadena # # Requirements: matplotlib, numpy, scipy # # When using this code, please cite "van Haasteren & Vallisneri (2014) from __future__ import division import num...
fsb4000/bitcoin
refs/heads/master
qa/rpc-tests/p2p-fullblocktest.py
9
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import ComparisonTestFramework from test_framework.util import * from ...
malb/pyme
refs/heads/master
pyme/callbacks.py
1
# $Id$ # Copyright (C) 2004 Igor Belyi <belyi@users.sourceforge.net> # Copyright (C) 2002 John Goerzen <jgoerzen@complete.org> # # 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 Software Foundation; e...
ASCrookes/django
refs/heads/master
django/template/loader.py
196
import warnings from django.utils.deprecation import RemovedInDjango110Warning from . import engines from .backends.django import DjangoTemplates from .engine import ( _context_instance_undefined, _dictionary_undefined, _dirs_undefined, ) from .exceptions import TemplateDoesNotExist from .loaders import base de...
foreni-packages/golismero
refs/heads/master
thirdparty_libs/django/db/models/fields/proxy.py
634
""" Field-like classes that aren't really fields. It's easier to use objects that have the same attributes as fields sometimes (avoids a lot of special casing). """ from django.db.models import fields class OrderWrt(fields.IntegerField): """ A proxy for the _order database field that is used when Meta.ord...
xrg/django-static-gitified
refs/heads/master
tests/regressiontests/syndication/tests.py
34
from __future__ import absolute_import from xml.dom import minidom from django.contrib.syndication import views from django.core.exceptions import ImproperlyConfigured from django.test import TestCase from django.utils import tzinfo from django.utils.feedgenerator import rfc2822_date, rfc3339_date from .models impor...
jarjun/EmergencyTextToVoiceCall
refs/heads/master
app/__init__.py
1
from flask import Flask app = Flask(__name__) app.config.from_object('config') from app import views
ChilliCreative/trellis
refs/heads/master
lib/trellis/plugins/vars/vars.py
4
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible import __version__ from ansible.errors import AnsibleError if __version__.startswith('1'): raise AnsibleError('Trellis no longer supports Ansible 1.x. Please upgrade to Ansible 2.x.') # These imports will produce...
vileopratama/vitech
refs/heads/master
src/addons/link_tracker/controller/main.py
35
# -*- coding: utf-8 -*- import werkzeug from openerp.addons.web import http from openerp.http import request class link_tracker(http.Controller): @http.route('/r/<string:code>', type='http', auth='none', website=True) def full_url_redirect(self, code, **post): request.env['link.tracker.click'].add_cl...
Gagaro/django
refs/heads/master
tests/template_tests/syntax_tests/test_builtins.py
521
from django.test import SimpleTestCase from ..utils import setup class BuiltinsTests(SimpleTestCase): @setup({'builtins01': '{{ True }}'}) def test_builtins01(self): output = self.engine.render_to_string('builtins01') self.assertEqual(output, 'True') @setup({'builtins02': '{{ False }}'}...
saurabh6790/medsyn-app
refs/heads/master
stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.py
30
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import webnotes from webnotes.utils import getdate, flt def execute(filters=None): if not filters: filters = {} float_preceision = webnotes.conn.get_default("float_preceision") conditi...
rjschwei/azure-sdk-for-python
refs/heads/master
azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/trusted_id_provider_paged.py
3
# 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 ...
akita8/scrapper
refs/heads/master
autoapp.py
1
"""Module used to start the gunicorn server.""" from backend.app import app
ZuluPro/abdallah
refs/heads/master
abdallah/tests/test_rest_viewsets.py
1
import mock from rest_framework.test import APITestCase as TestCase from rest_framework.reverse import reverse from abdallah import models class ViewSetProjectTest(TestCase): def setUp(self): self.project = models.Project.objects.create( name='abdallah', url='https://github.com/Zul...
Djlavoy/scrapy
refs/heads/master
scrapy/contrib/loader/common.py
144
import warnings from scrapy.exceptions import ScrapyDeprecationWarning warnings.warn("Module `scrapy.contrib.loader.common` is deprecated, " "use `scrapy.loader.common` instead", ScrapyDeprecationWarning, stacklevel=2) from scrapy.loader.common import *
open-synergy/vertical-association
refs/heads/8.0
membership_prorrate_variable_period/models/product_template.py
1
# -*- coding: utf-8 -*- # Copyright 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com> # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html import math import datetime import calendar from dateutil.relativedelta import relativedelta from openerp import models, exceptions, api, _ class ProductTemplate...
FedericoCeratto/debian-python-logging-tree
refs/heads/master
logging_tree/format.py
1
"""Routines that pretty-print a hierarchy of logging `Node` objects.""" import logging.handlers import sys if sys.version_info < (2, 6): next = lambda generator: generator.next() # supply a missing builtin def printout(node=None): """Print a tree of loggers, given a `Node` from `logging_tree.nodes`. I...
agry/NGECore2
refs/heads/master
scripts/object/tangible/loot/npc_loot/shoe_soul_generic.py
85615
import sys def setup(core, object): return
agry/NGECore2
refs/heads/master
scripts/object/mobile/dressed_diva_human_female_01.py
85615
import sys def setup(core, object): return
agry/NGECore2
refs/heads/master
scripts/object/tangible/holiday/love_day/loveday_romance_target_spawner.py
85615
import sys def setup(core, object): return
ammaradil/fibonacci
refs/heads/master
Lib/site-packages/django/contrib/syndication/views.py
85
from __future__ import unicode_literals from calendar import timegm from django.conf import settings from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.http import Http404, HttpResponse from django.template import Templat...
h3biomed/ansible
refs/heads/h3
lib/ansible/plugins/connection/kubectl.py
11
# Based on the docker connection plugin # # Connection plugin for configuring kubernetes containers with kubectl # (c) 2017, XuXinkun <xuxinkun@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 publis...
anthonydillon/horizon
refs/heads/master
openstack_dashboard/dashboards/admin/hypervisors/views.py
48
# Copyright 2013 B1 Systems GmbH # # 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 ag...
udp3f/gemini
refs/heads/master
gemini/gim.py
3
#!/usr/bin/env python from __future__ import absolute_import, print_function import sys from collections import Counter, defaultdict from . import GeminiQuery from . import sql_utils try: from compiler import compile except ImportError: basestring = str from .gemini_constants import * from .gemini_bcolz impor...
lukecwik/incubator-beam
refs/heads/master
sdks/python/apache_beam/examples/cookbook/bigquery_side_input.py
2
# # 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...
candy7393/VTK
refs/heads/master
IO/XML/Testing/Python/TestEmptyXML.py
11
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import vtk from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # List of types and corresponding file extensions. types = [[ 'ImageData', 'vti'], ['RectilinearGrid', 'vtr'], ['StructuredGrid', 'vts'], [...
Java1Guy/ansible-modules-extras
refs/heads/devel
clustering/consul_acl.py
23
#!/usr/bin/python # # (c) 2015, Steve Gargan <steve.gargan@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...
zzrcxb/Pugoo
refs/heads/master
DataManagement/converter.py
1
import re import json from .__init__ import * from .file_errors import * from .gobase import GoBase import os # need to catch IOError def SGF2Json(sgf, labels, filename): # result > 0 black win result < 0, white win if not os.path.exists(tmp_path): os.makedirs(tmp_path) if labels['HA'] != 0: ...
biggihs/python-pptx
refs/heads/master
tests/parts/test_slide.py
1
# encoding: utf-8 """ Test suite for pptx.parts.slide module """ from __future__ import ( absolute_import, division, print_function, unicode_literals ) import pytest from pptx.chart.data import ChartData from pptx.enum.base import EnumValue from pptx.opc.constants import CONTENT_TYPE as CT, RELATIONSHIP_TYPE as...