repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
christiangalsterer/execbeat
refs/heads/master
vendor/github.com/elastic/beats/filebeat/tests/system/test_harvester.py
2
# coding=utf-8 from filebeat import BaseTest import os import codecs import time """ Test Harvesters """ class Test(BaseTest): def test_close_renamed(self): """ Checks that a file is closed when its renamed / rotated """ self.render_config_template( path=os.path.abs...
a-buck/airmozilla
refs/heads/master
airmozilla/manage/tests/test_pestering.py
3
import datetime from django.test import TestCase from django.core import mail from django.contrib.auth.models import Group, User from django.conf import settings from django.contrib.sites.models import Site from django.utils import timezone from funfactory.urlresolvers import reverse from nose.tools import eq_, ok_ ...
40223208/2015cdb_g4
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_break.py
785
import gc import io import os import sys import signal import weakref import unittest @unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill") @unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows") @unittest.skipIf(sys.platform == 'freebsd6', "Test kills regrtest on freebsd6 " "if threa...
livepy/portia
refs/heads/master
slybot/slybot/spider.py
12
from __future__ import absolute_import import json import re from operator import itemgetter from copy import deepcopy import itertools from six.moves.urllib_parse import urlparse from w3lib.http import basic_auth_header from scrapy.http import Request, HtmlResponse, FormRequest import six try: from scrapy.spide...
katrid/django
refs/heads/master
tests/forms_tests/urls.py
452
from django.conf.urls import url from .views import ArticleFormView urlpatterns = [ url(r'^model_form/(?P<pk>[0-9]+)/$', ArticleFormView.as_view(), name="article_form"), ]
aerickson/ansible
refs/heads/devel
lib/ansible/plugins/callback/json.py
118
# (c) 2016, Matt Martz <matt@sivel.net> # # 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. # ...
asm0dey/Flexget
refs/heads/master
flexget/utils/sqlalchemy_utils.py
6
""" Miscellaneous SQLAlchemy helpers. """ from __future__ import unicode_literals, division, absolute_import import logging from sqlalchemy import ColumnDefault, Sequence, Index from sqlalchemy.types import TypeEngine from sqlalchemy.schema import Table, MetaData from sqlalchemy.exc import NoSuchTableError, Operational...
sopier/django
refs/heads/master
django/contrib/humanize/templatetags/__init__.py
12133432
KimGlazebrook/wagtail-experiment
refs/heads/master
wagtail/wagtailembeds/templatetags/__init__.py
12133432
hdinsight/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/cache/__init__.py
12133432
WebMonitor/ZhihuMonitor
refs/heads/master
zhihu_fetch_info/Redis/redis_manage.py
1
#!/usr/bin/python # -*- coding: UTF-8 -*- import redis redis_conn = redis.Redis(host='123.207.100.124', port=9999, db=0, password='54A4D5E5131BB76124D661335EE6E6FE')
keedio/hue
refs/heads/master
desktop/core/ext-py/Paste-2.0.1/paste/progress.py
78
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php # (c) 2005 Clark C. Evans # This module is part of the Python Paste Project and is released under # the MIT License: http://www.opensource.org/licenses...
kissf-lu/jupyter_app
refs/heads/master
ipython/py36_simpy_sim/tool/items.py
1
# -*- coding: utf-8 -*- """ 作者:Ted 日期:2017-07-13 说明: 包裹 class 货物 class Uld class """ import simpy import pandas as pd __all__ = ["Package", "Truck", "Uld", "SmallBag", "SmallPackage", "Pipeline"] class Package: """包裹""" def __init__(self, env: simpy.Environment, attr: pd....
yfried/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/gcp_compute_https_health_check_facts.py
8
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
40423147/2017springcd_hw
refs/heads/gh-pages
plugin/tipue_search/__init__.py
371
from .tipue_search import *
citrix-openstack-build/horizon
refs/heads/master
openstack_dashboard/dashboards/settings/dashboard.py
10
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack Foundation # Copyright 2012 Nebula, 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://ww...
provaleks/o8
refs/heads/8.0
addons/mass_mailing/models/res_config.py
385
# -*- coding: utf-8 -*- from openerp.osv import fields, osv class MassMailingConfiguration(osv.TransientModel): _name = 'marketing.config.settings' _inherit = 'marketing.config.settings' _columns = { 'group_mass_mailing_campaign': fields.boolean( 'Manage Mass Mailing using Campaign',...
Beramos/QuestionHistCrit
refs/heads/master
questenv/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/misc.py
1428
# -*- coding: utf-8 -*- # # Copyright (C) 2012 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """Backports for individual classes and functions.""" import os import sys __all__ = ['cache_from_source', 'callable', 'fsencode'] try: from imp import cache_from_source except ImportError: ...
dwoods/gn-maps
refs/heads/master
geonode/layers/management/commands/updatelayers.py
6
######################################################################### # # Copyright (C) 2012 OpenPlans # # 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 #...
k0ste/ansible
refs/heads/devel
lib/ansible/parsing/yaml/loader.py
191
# (c) 2012-2014, 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) an...
ammarkhann/FinalSeniorCode
refs/heads/master
lib/python2.7/site-packages/django/contrib/gis/gdal/feature.py
439
from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import GDALException, OGRIndexError from django.contrib.gis.gdal.field import Field from django.contrib.gis.gdal.geometries import OGRGeometry, OGRGeomType from django.contrib.gis.gdal.prototypes import ds as capi, geom as geom_api fro...
wiki05/SublimeJEDI
refs/heads/master
jedi/__init__.py
4
""" Jedi is an autocompletion tool for Python that can be used in IDEs/editors. Jedi works. Jedi is fast. It understands all of the basic Python syntax elements including many builtin functions. Additionaly, Jedi suports two different goto functions and has support for renaming as well as Pydoc support and some other ...
duducosmos/pgs4a
refs/heads/master
python-install/lib/python2.7/tabnanny.py
394
#! /usr/bin/env python """The Tab Nanny despises ambiguous indentation. She knows no mercy. tabnanny -- Detection of ambiguous indentation For the time being this module is intended to be called as a script. However it is possible to import it into an IDE and use the function check() described below. Warning: The ...
ryfeus/lambda-packs
refs/heads/master
Tensorflow_LightGBM_Scipy_nightly/source/setuptools/command/install.py
529
from distutils.errors import DistutilsArgError import inspect import glob import warnings import platform import distutils.command.install as orig import setuptools # Prior to numpy 1.9, NumPy relies on the '_install' name, so provide it for # now. See https://github.com/pypa/setuptools/issues/199/ _install = orig.in...
bbsan2k/nzbToMedia
refs/heads/nightly
core/transmissionrpc/constants.py
4
# -*- coding: utf-8 -*- # Copyright (c) 2008-2013 Erik Svensson <erik.public@gmail.com> # Licensed under the MIT license. import logging from core.transmissionrpc.six import iteritems LOGGER = logging.getLogger('transmissionrpc') LOGGER.setLevel(logging.ERROR) def mirror_dict(source): """ Creates a diction...
ice9js/servo
refs/heads/master
tests/wpt/css-tests/tools/html5lib/doc/conf.py
436
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # html5lib documentation build configuration file, created by # sphinx-quickstart on Wed May 8 00:04:49 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # aut...
xuleiboy1234/autoTitle
refs/heads/master
tensorflow/tensorflow/contrib/distributions/python/ops/mvn_diag.py
60
# 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...
PolymorhicCode/Veil-Evasion
refs/heads/master
tools/__init__.py
12133432
agiliq/django
refs/heads/master
tests/m2m_signals/__init__.py
12133432
eugena/django
refs/heads/master
tests/expressions_case/__init__.py
12133432
hvy/chainer
refs/heads/master
chainer/functions/pooling/average_pooling_nd.py
5
import functools import operator import numpy import six import chainer from chainer import backend from chainer.backends import cuda from chainer import function_node from chainer.functions.pooling import average_pooling_nd_kernel from chainer.functions.pooling import pooling_nd from chainer.utils import conv from c...
persiaAziz/trafficserver
refs/heads/master
tests/gold_tests/headers/normalize_ae_observer.py
8
''' Extract the protocol information from the Accept-Encoding headers and store it in a log file for later verification. ''' # 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...
garg10may/youtube-dl
refs/heads/master
youtube_dl/extractor/ccc.py
107
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, qualities, unified_strdate, ) class CCCIE(InfoExtractor): IE_NAME = 'media.ccc.de' _VALID_URL = r'https?://(?:www\.)?media\.ccc\.de/[^?#]+/[^?#/]*?_(?P<id>[0-9]{8,})._[^?#/]*\.h...
shenyy/lily2-gem5
refs/heads/master
src/arch/x86/isa/insts/general_purpose/data_transfer/xchg.py
89
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
40223151/2014c2g9
refs/heads/master
wsgi/static/reeborg/src/libraries/brython/Lib/platform.py
11
#! /usr/bin/python3.3 """ This module tries to retrieve as much platform-identifying data as possible. It makes this information available via function APIs. If called from the command line, it prints the platform information concatenated as single string to stdout. The output format is useable as par...
mcuringa/vid-analyzer
refs/heads/master
web/vidan/models.py
1
from django.db import models from django import forms from django.forms import ModelForm from django.contrib.auth.models import User class DataSet(models.Model): """The dataset holds the collection of videos that will be analyzed as a group.""" name = models.CharField(max_length=120) creator = models...
shiblon/pytour
refs/heads/master
static/js/pypyjs/pypy-nojit.js-0.3.1/lib/modules/test/test_email.py
91
# Copyright (C) 2001,2002 Python Software Foundation # email package unit tests # The specific tests now live in Lib/email/test from email.test.test_email import suite from email.test.test_email_renamed import suite as suite2 from test import test_support def test_main(): test_support.run_unittest(suite()) te...
blacktop/docker-elk
refs/heads/master
5.5/config/misc/test_index.py
56
from datetime import datetime from elasticsearch import Elasticsearch es = Elasticsearch() for i in range(10000): doc = {'author': 'kimchy', 'text': 'Elasticsearch: cool. bonsai cool.', 'timestamp': datetime.now()} res = es.index(index="test-index", doc_type='tweet', id=i, body=doc) # print(res['created'...
ta2-1/pootle
refs/heads/master
pootle/apps/pootle_store/migrations/0003_remove_unit_ordering.py
10
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('pootle_store', '0002_make_suggestion_user_not_null'), ] operations = [ migrations.AlterModelOptions( name='unit'...
Sparky88/IA-B1-ProcesareaImaginilor
refs/heads/master
Retele neuronale/Iordache Iustin/Clasifier/libsvm.py
2
#!/usr/bin/env python """ Taken and modified from easy.py from the libsvm package, which is under following copyright: Copyright (c) 2000-2012 Chih-Chung Chang and Chih-Jen Lin All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the follow...
blueboxgroup/neutron
refs/heads/master
neutron/tests/functional/api/test_v2_plugin.py
5
# Copyright 2014, Red Hat 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...
WillisXChen/django-oscar
refs/heads/master
oscar/lib/python2.7/site-packages/yaml/serializer.py
561
__all__ = ['Serializer', 'SerializerError'] from error import YAMLError from events import * from nodes import * class SerializerError(YAMLError): pass class Serializer(object): ANCHOR_TEMPLATE = u'id%03d' def __init__(self, encoding=None, explicit_start=None, explicit_end=None, version=No...
isNeilLin/matplotlib-study
refs/heads/master
事故处理统计/transform.py
1
def transform(name): data = { '京':'北京市','津':'天津市','冀':'河北省','晋':'山西省','蒙':'内蒙古自治区','辽':'辽宁省','吉':'吉林省','黑':'黑龙江省','沪':'上海市','苏':'江苏省','浙':'浙江省','皖':'安徽省','闽':'福建省','赣':'江西省','鲁':'山东省','豫':'河南省','鄂':'湖北省','湘':'湖南省','粤':'广东省','桂':'广西壮族自治区','琼':'海南省','川':'四川省','贵':'贵州省','云':'云南省','渝':'重庆市','藏':'西藏自治区','陕':'陕西省...
hortonworks/hortonworks-sandbox
refs/heads/master
desktop/core/ext-py/Paste-1.7.2/paste/url.py
28
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ This module implements a class for handling URLs. """ import urllib import cgi from paste import request # Imported lazily from FormEncode: variab...
smashwilson/ansible-modules-core
refs/heads/devel
cloud/rackspace/rax_network.py
43
#!/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...
huqa/pyfibot_modules
refs/heads/master
module_aija.py
1
# -*- coding: utf-8 -*- ''' Created on Feb 4, 2013 @author: huqa ''' from random import randint aija_mestat = ["thaikuis", "briteis", "jenkeis", "indois", "baaris", "balil", "japanis", "malil", "mäki...
omtinez/micropython
refs/heads/master
tests/basics/string_replace.py
96
print("".replace("a", "b")) print("aaa".replace("b", "c")) print("aaa".replace("a", "b", 0)) print("aaa".replace("a", "b", -5)) print("asdfasdf".replace("a", "b")) print("aabbaabbaabbaa".replace("aa", "cc", 3)) print("a".replace("aa", "bb")) print("testingtesting".replace("ing", "")) print("testINGtesting".replace("ing...
prakritish/ansible
refs/heads/devel
lib/ansible/module_utils/known_hosts.py
46
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
chetan/ansible
refs/heads/master
test/units/TestVaultEditor.py
28
#!/usr/bin/env python from unittest import TestCase import getpass import os import shutil import time import tempfile from binascii import unhexlify from binascii import hexlify from nose.plugins.skip import SkipTest from ansible import errors from ansible.utils.vault import VaultLib from ansible.utils.vault import ...
ygol/odoo
refs/heads/8.0
addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py
340
# -*- 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...
charles1018/The-f2fs-filesystem
refs/heads/master
tools/perf/python/twatch.py
219
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
javierblasco/tensorflow
refs/heads/master
tensorflow/python/framework/ops_test.py
5
"""Tests for tensorflow.python.framework.ops.""" import tensorflow.python.platform from tensorflow.python.framework import device as pydev from tensorflow.python.framework import ops from tensorflow.python.framework import tensor_shape from tensorflow.python.framework import test_kernel_label_op from tensorflow.python...
bbondy/brianbondy.gae
refs/heads/master
libs/flask/module.py
850
# -*- coding: utf-8 -*- """ flask.module ~~~~~~~~~~~~ Implements a class that represents module blueprints. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os from .blueprints import Blueprint def blueprint_is_module(bp): """Used to figure ou...
abn/yabgp
refs/heads/master
yabgp/common/constants.py
2
# Copyright 2015 Cisco Systems, 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 requi...
shoopio/shoop
refs/heads/master
shuup/xtheme/plugins/category_links.py
2
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2019, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from django import forms from django.utils.translation import uget...
cgroza/gEcrit
refs/heads/master
data/plugins/ClipboardViewer.py
1
# Copyright (C) 2011 Groza Cristian # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is di...
gwpy/gwpy.github.io
refs/heads/master
docs/2.0.1/examples/signal/qscan-1.py
6
from gwosc import datasets from gwpy.timeseries import TimeSeries gps = datasets.event_gps('GW170817') data = TimeSeries.fetch_open_data('L1', gps-34, gps+34, tag='C00')
paweljasinski/ironpython3
refs/heads/master
Src/StdLib/Lib/test/test_filecmp.py
5
import os, filecmp, shutil, tempfile import unittest from test import support class FileCompareTestCase(unittest.TestCase): def setUp(self): self.name = support.TESTFN self.name_same = support.TESTFN + '-same' self.name_diff = support.TESTFN + '-diff' data = 'Contents of file go her...
brandond/ansible
refs/heads/devel
lib/ansible/modules/network/radware/vdirect_commit.py
14
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2017 Radware LTD. # # 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...
blooparksystems/sale_commission
refs/heads/master
__unported__/stock_block_prodlots/product.py
5
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 Pexego (<www.pexego.es>). All Rights Reserved # $Omar Castiñeira Saavedra$ # # This program is free software: you can redistribute it ...
jiwang576/incubator-airflow
refs/heads/master
airflow/utils/state.py
55
# -*- coding: utf-8 -*- # # 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 ...
mysociety/pombola
refs/heads/master
pombola/za_hansard/management/commands/za_hansard_load_za_akomantoso.py
1
from speeches.management.import_commands import ImportCommand from pombola.za_hansard.importers.import_za_akomantoso import ImportZAAkomaNtoso class Command(ImportCommand): importer_class = ImportZAAkomaNtoso document_extension = 'xml'
agconti/njode
refs/heads/master
env/lib/python2.7/site-packages/pygments/util.py
29
# -*- coding: utf-8 -*- """ pygments.util ~~~~~~~~~~~~~ Utility functions. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import sys split_path_re = re.compile(r'[/\\ ]') doctype_lookup_re = re.compile(r'''(?smx) (<\?...
xiebinhqy/Dynamomysql
refs/heads/master
nodes/0.7.x/python/View.SetSolarStudyActiveFrameNumber.py
16
import clr clr.AddReference('RevitAPI') from Autodesk.Revit.DB import * clr.AddReference("RevitServices") import RevitServices from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager doc = DocumentManager.Instance.CurrentDBDocument view = UnwrapElement(IN[0]) fr...
paweljasinski/ironpython3
refs/heads/master
Tests/modules/misc/operator_test.py
3
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of th...
yongshengwang/hue
refs/heads/master
desktop/core/ext-py/Paste-2.0.1/paste/auth/grantip.py
50
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ Grant roles and logins based on IP address. """ import six from paste.util import ip4 class GrantIPMiddleware(object): """ On each reques...
tima/ansible
refs/heads/devel
lib/ansible/modules/cloud/digital_ocean/digital_ocean_sshkey.py
14
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: Ansible Project # 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', ...
flgiordano/netcash
refs/heads/master
+/google-cloud-sdk/lib/surface/compute/instances/start.py
1
# Copyright 2014 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 ag...
creativcoder/servo
refs/heads/master
tests/wpt/web-platform-tests/css/tools/w3ctestlib/Indexer.py
26
#!/usr/bin/python # CSS Test Suite Manipulation Library # Initial code by fantasai, joint copyright 2010 W3C and Microsoft # Licensed under BSD 3-Clause: <http://www.w3.org/Consortium/Legal/2008/03-bsd-license> # Define contains vmethod for Template Toolkit from template.stash import list_op @list_op("contains") def l...
yoer/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/i18n/patterns/tests.py
57
from __future__ import unicode_literals import os from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse, clear_url_caches from django.test import TestCase from django.test.utils import override_settings from django.template import Template, Context from django.utils._os ...
gramps-project/gramps
refs/heads/master
gramps/gen/datehandler/_date_hu.py
5
# -*- coding: utf-8 -*- # # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2004-2006 Donald N. Allingham # Copyright (C) 2015 Lajos Nemeséri <nemeseril@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as pu...
colab/colab-superarchives-plugin
refs/heads/master
src/colab_superarchives/widgets/dashboard_latest_threads.py
1
from colab.widgets.widget_manager import Widget from colab_superarchives.utils.collaborations import get_user_threads from colab_superarchives.utils import mailman from colab_superarchives.models import Thread class DashboardLatestThreadsWidget(Widget): name = 'latest threads' template = 'widgets/dashboard_la...
xiangel/hue
refs/heads/master
desktop/core/ext-py/tablib-0.10.0/tablib/packages/xlrd/licences.py
153
# -*- coding: cp1252 -*- """ Portions copyright © 2005-2009, Stephen John Machin, Lingfo Pty Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above ...
commonsearch/cosr-back
refs/heads/master
plugins/webgraph.py
1
from __future__ import absolute_import, division, print_function, unicode_literals import os import shutil from pyspark.sql import types as SparkTypes from cosrlib.url import URL from cosrlib.spark import createDataFrame, sql, SparkPlugin from cosrlib import re, py2_long from urlserver.id_generator import _fast_make...
denys-duchier/django
refs/heads/master
tests/inline_formsets/__init__.py
12133432
Quikling/gpdb
refs/heads/master
src/test/tinc/tincrepo/mpp/gpdb/lib/models/sql/__init__.py
12133432
mttr/django
refs/heads/master
django/core/cache/backends/__init__.py
12133432
willysbrewing/willys_website
refs/heads/main
willys_website/core/migrations/__init__.py
12133432
AO-StreetArt/FinalFlowChartExample
refs/heads/master
src/__init__.py
12133432
brianjgeiger/osf.io
refs/heads/develop
website/registries/__init__.py
12133432
tbeadle/django
refs/heads/master
django/urls/exceptions.py
133
from __future__ import unicode_literals from django.http import Http404 class Resolver404(Http404): pass class NoReverseMatch(Exception): pass
krvss/django-social-auth
refs/heads/master
social_auth/backends/contrib/orkut.py
5
""" Orkut OAuth support. This contribution adds support for Orkut OAuth service. The scope is limited to http://orkut.gmodules.com/social/ by default, but can be extended with ORKUT_EXTRA_SCOPE on project settings. Also name, display name and emails are the default requested user data, but extra values can be specifie...
MarcJoan/django
refs/heads/master
django/core/urlresolvers.py
42
""" This module converts requested URLs to callback view functions. RegexURLResolver is the main class here. Its resolve() method takes a URL (as a string) and returns a ResolverMatch object which provides access to all attributes of the resolved URL match. """ from __future__ import unicode_literals import functools...
codeboy/coddy-sitetools
refs/heads/master
sitetools/coddy_site/views.py
1
# -*- coding: utf-8 -*- from django.views.generic.simple import direct_to_template from django.template import Context, RequestContext from django.shortcuts import render_to_response, render, redirect from django.template.loader import render_to_string, get_template from django.http import HttpResponse from django.cor...
saurabhbajaj207/CarpeDiem
refs/heads/master
venv/Lib/encodings/zlib_codec.py
58
""" Python 'zlib_codec' Codec - zlib compression encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Written by Marc-Andre Lemburg (mal@lemburg.com). """ import codecs import zlib # this codec needs the optional zlib modu...
oaastest/azure-linux-extensions
refs/heads/master
OSPatching/test/FakePatching3.py
8
#!/usr/bin/python # # Copyright 2014 Microsoft 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 applicable...
unindented/streamcode
refs/heads/master
client/static/jsrepl/extern/python/reloop-closured/lib/python2.7/pdb.py
60
#! /usr/bin/env python """A Python debugger.""" # (See pdb.doc for documentation.) import sys import linecache import cmd import bdb from repr import Repr import os import re import pprint import traceback class Restart(Exception): """Causes a debugger to be restarted for the debugged python program.""" pa...
leonardocsantoss/ehventos
refs/heads/master
lib/grappelli/admin.py
1
# coding: utf-8 from django.contrib import admin from models import Navigation, NavigationItem class NavigationItemInline(admin.StackedInline): model = NavigationItem extra = 1 classes = ('collapse-open',) fieldsets = ( ('', { 'fields': ('title', 'link', 'category',) }...
bigswitch/horizon
refs/heads/master
openstack_dashboard/dashboards/project/images/images/urls.py
3
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
mozbhearsum/balrog
refs/heads/master
auslib/web/admin/views/history.py
2
import connexion from flask import Response, jsonify from auslib.web.admin.views.base import AdminView from auslib.web.admin.views.problem import problem class HistoryView(AdminView): """Base class for history views. Provides basics operations to get all object revisions and revert object to specific revisio...
grap/OCB
refs/heads/7.0
addons/portal_claim/__init__.py
346
# -*- 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...
kostyll/micropython
refs/heads/master
tests/basics/fun_str.py
110
# test str of function def f(): pass print(str(f)[:8])
amirouche/hivi.mx
refs/heads/master
hivimx/hivimx/__init__.py
12133432
sbalde/edxplatform
refs/heads/master
lms/djangoapps/lms_migration/management/commands/__init__.py
12133432
fabricedesre/rust
refs/heads/master
src/etc/unicode.py
5
#!/usr/bin/env python # xfail-license # This digests UnicodeData.txt and DerivedCoreProperties.txt and emits rust # code covering the core properties. Since this is a pretty rare event we # just store this out-of-line and check the unicode.rs file into git. # # The emitted code is "the minimum we think is necessary fo...
lab305itep/linux
refs/heads/vme_patches2_rebase2
scripts/gdb/linux/tasks.py
630
# # gdb helper commands and functions for Linux kernel debugging # # task & thread tools # # Copyright (c) Siemens AG, 2011-2013 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb from linux import utils task_type = utils.CachedType(...
twobraids/socorro
refs/heads/master
socorro/unittest/external/postgresql/test_graphics_devices.py
11
# 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/. import json from nose.plugins.attrib import attr from nose.tools import eq_, assert_raises from socorro.external impor...
samthor/intellij-community
refs/heads/master
python/testData/formatter/wrapAssignment_after.py
83
current_report_group = status_reports.values('report_group_id').annotate(rcount=Count('report_group_id')).order_by( "-report_group_id")[:1]
orangeduck/PyAutoC
refs/heads/master
Python27/Lib/lib2to3/fixes/fix_future.py
529
"""Remove __future__ imports from __future__ import foo is replaced with an empty line. """ # Author: Christian Heimes # Local imports from .. import fixer_base from ..fixer_util import BlankLine class FixFuture(fixer_base.BaseFix): BM_compatible = True PATTERN = """import_from< 'from' module_name="__future...
gurneyalex/odoo
refs/heads/13.0-improve_sale_coupon_perf
addons/test_mail_full/tests/test_sms_composer.py
5
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.sms.tests import common as sms_common from odoo.addons.test_mail_full.tests import common as test_mail_full_common class TestSMSComposerComment(test_mail_full_common.BaseFunctionalTest, sms_common.Mock...