repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
vvv1559/intellij-community
refs/heads/master
python/testData/intentions/doubledQuotedString_after.py
83
test_function('String ' 'resuming string'.format(a, b))
cneill/designate
refs/heads/master
designate/objects/quota.py
2
# Copyright (c) 2014 Rackspace Hosting # 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 req...
houchj/selenium
refs/heads/master
py/test/selenium/webdriver/common/implicit_waits_tests.py
65
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
dogdep/dogpro
refs/heads/master
resources/ansible/filter_plugins/split.py
1
import re def split_string(string, seperator=' '): return string.split(seperator) def split_regex(string, seperator_pattern): return re.split(seperator_pattern, string) class FilterModule(object): ''' A filter to split a string into a list. ''' def filters(self): return { 'split' ...
benthomasson/ansible
refs/heads/devel
lib/ansible/modules/packaging/os/rhn_channel.py
6
#!/usr/bin/python # (c) Vincent Van de Kussen # # 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.0', 'status': ['preview'],...
Mego/ByteCounter
refs/heads/gh-pages
counter.py
1
from browser import document cp437table = ( '\x00\u263a\u263b\u2665\u2666\u2663\u2660\u2022\u25d8\u25cb\u25d9' '\u2642\u2640\u266a\u266b\u263c\u25ba\u25c4\u2195\u203c\xb6\xa7' '\u25ac\u21a8\u2191\u2193\u2192\u2190\u221f\u2194\u25b2\u25bc' ' !"#$%&\'()*+,-./0123...
40223119/-2015cd_midterm
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/_strptime.py
518
"""Strptime-related classes and functions. CLASSES: LocaleTime -- Discovers and stores locale-specific time information TimeRE -- Creates regexes for pattern matching a string of text containing time information FUNCTIONS: _getlang -- Figure out what language is being used for the locale ...
mhbu50/erpnext
refs/heads/develop
erpnext/patches/v11_0/set_user_permissions_for_department.py
5
import frappe def execute(): user_permissions = frappe.db.sql("""select name, for_value from `tabUser Permission` where allow='Department'""", as_dict=1) for d in user_permissions: user_permission = frappe.get_doc("User Permission", d.name) for new_dept in frappe.db.sql("""select name f...
naslanidis/ansible
refs/heads/devel
lib/ansible/modules/monitoring/zabbix_group.py
48
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2013-2014, Epic Games, 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 # ...
nicoboss/Floatmotion
refs/heads/master
OpenGL/WGL/EXT/create_context_es2_profile.py
8
'''OpenGL extension EXT.create_context_es2_profile This module customises the behaviour of the OpenGL.raw.WGL.EXT.create_context_es2_profile to provide a more Python-friendly API The official definition of this extension is available here: http://www.opengl.org/registry/specs/EXT/create_context_es2_profile.txt ''' ...
fossilet/ansible
refs/heads/devel
test/units/template/test_template_utilities.py
152
# (c) 2015 Toshio Kuratomi <tkuratomi@ansible.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 later ...
nex3/pygments
refs/heads/master
tests/test_examplefiles.py
2
# -*- coding: utf-8 -*- """ Pygments tests with example files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os from pygments.lexers import get_lexer_for_filename, get_lexer_by_name from pygments....
Jgarcia-IAS/localizacion
refs/heads/master
openerp/addons-extra/odoo-pruebas/odoo-server/addons/portal/wizard/__init__.py
447
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
sukeesh/Jarvis
refs/heads/master
jarviscli/plugins/converted.py
1
""" Plugins not fully converted but simply "wrapped" as plugins. """ from packages import (directions_to, forecast, mapps, near_me, timeIn, weather_pinpoint, weatherIn) from plugin import plugin, require @require(network=True) @plugin("check time") def check_time(self, s): """ checks th...
muinmomin/PiCar
refs/heads/master
main.py
1
__author__ = "Muin Momin" from flask import Flask, request, render_template, redirect, url_for, session, jsonify from functools import wraps from controls import * # Initializing things app = Flask(__name__) app.secret_key = "secret" GPIO.setwarnings(False) initpins() error = None def login_required(f): @wraps...
gaperez64/acacia4aiger
refs/heads/master
source/acacia_plus/pygraph/algorithms/filters/__init__.py
10
# Copyright (c) 2008-2009 Pedro Matiello <pmatiello@gmail.com> # # 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,...
googleapis/python-automl
refs/heads/master
samples/snippets/delete_dataset.py
1
# 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 agreed to in writing, so...
umax/diabetto2
refs/heads/master
product/migrations/0003_auto__add_unique_product_name_category.py
1
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding unique constraint on 'Product', fields ['name', 'category'] db.c...
teeberg/python-percy
refs/heads/master
percy/api.py
1
from __future__ import absolute_import, unicode_literals import logging import os from datetime import datetime import requests from git import Repo from six.moves.urllib.parse import urljoin from .build import PercyBuild from .exceptions import PercyBadRequest, PercyError, PercyQuotaExceeded l = logging.getLogger(...
SUSE/azure-sdk-for-python
refs/heads/master
azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_paged.py
5
# 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 ...
dazzzl/yowsup
refs/heads/master
yowsup/demos/contacts/__init__.py
62
from .stack import YowsupSyncStack
ridfrustum/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/django/core/management/commands/dumpdata.py
51
from django.core.exceptions import ImproperlyConfigured from django.core.management.base import BaseCommand, CommandError from django.core import serializers from django.db import connections, router, DEFAULT_DB_ALIAS from django.utils.datastructures import SortedDict from optparse import make_option class Command(Ba...
mjg/PyX-svn
refs/heads/trunk
pyx/dvi/dvifile.py
2
# -*- encoding: utf-8 -*- # # # Copyright (C) 2002-2011 Jörg Lehmann <joergl@users.sourceforge.net> # Copyright (C) 2003-2004,2006,2007 Michael Schindler <m-schindler@users.sourceforge.net> # Copyright (C) 2002-2011 André Wobst <wobsta@users.sourceforge.net> # # This file is part of PyX (http://pyx.sourceforge.net/). #...
petli/codplayer
refs/heads/master
src/codplayer/test/test_command.py
1
# codplayer - test (parts of) the player module # # Copyright 2013 Peter Liljenberg <peter.liljenberg@gmail.com> # # Distributed under an MIT license, please see LICENSE in the top dir. import unittest from .. import command class TestCommandReader(unittest.TestCase): def test_commandreader(self): cr = co...
pidah/st2contrib
refs/heads/master
packs/duo/actions/auth_check.py
3
#!/usr/bin/env python # Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Licens...
showell/zulip
refs/heads/master
zerver/webhooks/opbeat/tests.py
3
from zerver.lib.test_classes import WebhookTestCase from zerver.webhooks.opbeat.view import get_value class OpbeatHookTests(WebhookTestCase): STREAM_NAME = 'opbeat' URL_TEMPLATE = "/api/v1/external/opbeat?api_key={api_key}&stream={stream}" FIXTURE_DIR_NAME = 'opbeat' def test_comment(self) -> None: ...
jhunufa/ArduWatchRaspSerial
refs/heads/master
virtualenv/lib/python3.4/site-packages/pip/_vendor/packaging/__init__.py
1178
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function from .__about__ import ( __author__, __copyright__, __email__, __licen...
nuncjo/odoo
refs/heads/8.0
addons/base_setup/__openerp__.py
259
# -*- 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...
tbeadle/django
refs/heads/master
tests/model_inheritance/test_abstract_inheritance.py
36
from __future__ import unicode_literals from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.core.checks import Error from django.core.exceptions import FieldDoesNotExist, FieldError from django.db import model...
ohduran/CrowdFinanceInfographic
refs/heads/master
virtualenv/lib/python3.5/site-packages/pkg_resources/_vendor/packaging/utils.py
1126
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import re _canonicalize_regex = re.compile(r"[-_.]+") def canonicalize...
gonboy/sl4a
refs/heads/master
python-build/python-libs/ase/scripts/speak.py
40
"""Speak user generated text.""" __author__ = 'Damon Kohler <damonkohler@gmail.com>' __copyright__ = 'Copyright (c) 2009, Google Inc.' __license__ = 'Apache License, Version 2.0' import android droid = android.Android() message = droid.getInput('TTS', 'What would you like to say?').result droid.ttsSpeak(message)
gilisagreen/Project4
refs/heads/master
lib/werkzeug/testsuite/contrib/iterio.py
102
# -*- coding: utf-8 -*- """ werkzeug.testsuite.iterio ~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the iterio object. :copyright: (c) 2013 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import unittest from functools import partial from werkzeug.testsuite import WerkzeugTestCase from werk...
cswiercz/sympy
refs/heads/master
sympy/stats/tests/test_discrete_rv.py
115
from sympy.stats.drv_types import (PoissonDistribution, GeometricDistribution, Poisson) from sympy.abc import x from sympy import S, Sum from sympy.stats import E, variance, density def test_PoissonDistribution(): l = 3 p = PoissonDistribution(l) assert abs(p.cdf(10).evalf() - 1) < .001 assert ...
samuelcolvin/ht-scoring
refs/heads/master
ht_scoring/scoring/views.py
1
import ht_scoring.scoring.models as m from django.core.urlresolvers import reverse import SkeletalDisplay.views as views import django.views.generic as generic from django import forms from django.forms.formsets import formset_factory from django.db import models import settings, traceback import HotDjango class Scori...
ofrobots/grpc
refs/heads/master
src/python/grpcio_test/grpc_test/beta/_utilities_test.py
8
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
mlaitinen/odoo
refs/heads/8.0
addons/hr_timesheet_invoice/wizard/hr_timesheet_analytic_profit.py
337
# -*- 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...
mezz64/home-assistant
refs/heads/dev
homeassistant/components/coolmaster/config_flow.py
9
"""Config flow to configure Coolmaster.""" from pycoolmasternet_async import CoolMasterNet import voluptuous as vol from homeassistant import config_entries, core from homeassistant.const import CONF_HOST, CONF_PORT # pylint: disable=unused-import from .const import AVAILABLE_MODES, CONF_SUPPORTED_MODES, DEFAULT_POR...
tchellomello/home-assistant
refs/heads/dev
homeassistant/components/pjlink/media_player.py
7
"""Support for controlling projector via the PJLink protocol.""" import logging from pypjlink import MUTE_AUDIO, Projector from pypjlink.projector import ProjectorError import voluptuous as vol from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity from homeassistant.components.media_pla...
jasonwbw/jason_putils
refs/heads/master
putils/tools/text/utils.py
1
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # utils for file action # # @Author : Jasonwbw@yahoo.com def count_line(filename): count = -1 for count, line in enumerate(open(filename, 'rU')): pass count += 1 return count # end count line def load_word_list(filename): words = [] with open(fi...
brosner/suitcaseproject
refs/heads/master
suitcase/vcs/subversion.py
1
"""Subversion helpers""" import commands import os import re from suitcase.exceptions import SuitcaseVcsError from suitcase.vcs.base import VcsBase class Subversion(VcsBase): """Class interface to subversion""" def get_remote_branch_location(self, directory): """Works out the URL of remote...
wschwa/Mr-Orange-Sick-Beard
refs/heads/master
lib/tvdb_api/tvdb_cache.py
28
#!/usr/bin/env python #encoding:utf-8 #author:dbr/Ben #project:tvdb_api #repository:http://github.com/dbr/tvdb_api #license:unlicense (http://unlicense.org/) """ urllib2 caching handler Modified from http://code.activestate.com/recipes/491261/ """ from __future__ import with_statement __author__ = "dbr/Ben" __version...
8191/ansible
refs/heads/devel
lib/ansible/inventory/dir.py
20
# (c) 2013, Daniel Hokka Zakrisson <daniel@hozac.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...
nmercier/linux-cross-gcc
refs/heads/master
linux/lib/python2.7/dist-packages/numpy/distutils/fcompiler/__init__.py
152
"""numpy.distutils.fcompiler Contains FCompiler, an abstract base class that defines the interface for the numpy.distutils Fortran compiler abstraction model. Terminology: To be consistent, where the term 'executable' is used, it means the single file, like 'gcc', that is executed, and should be a string. In contras...
ljhljh235/AutoRest
refs/heads/master
src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/StorageManagementClient/fixtures/acceptancetestsstoragemanagementclient/models/bar.py
16
# 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 ...
girving/tensorflow
refs/heads/master
tensorflow/contrib/bayesflow/python/kernel_tests/monte_carlo_test.py
9
# 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...
msebire/intellij-community
refs/heads/master
python/helpers/pydev/_pydevd_bundle/pydevd_traceproperty.py
10
'''For debug purpose we are replacing actual builtin property by the debug property ''' from _pydevd_bundle.pydevd_comm import get_global_debugger from _pydevd_bundle.pydevd_constants import DebugInfoHolder, IS_PY2 from _pydevd_bundle import pydevd_tracing #=============================================================...
tonymwinters/docker
refs/heads/master
vendor/src/github.com/hashicorp/go-msgpack/codec/msgpack_test.py
1233
#!/usr/bin/env python # This will create golden files in a directory passed to it. # A Test calls this internally to create the golden files # So it can process them (so we don't have to checkin the files). import msgpack, msgpackrpc, sys, os, threading def get_test_data_list(): # get list with all primitive typ...
chrrrles/ansible
refs/heads/devel
test/integration/gce_credentials.py
275
import collections import os import yaml try: from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver _ = Provider.GCE except ImportError: print("failed=True " + \ "msg='libcloud with GCE support (0.13.3+) required for this module'") sys.exit(1) def a...
bhansa/fireball
refs/heads/master
pyvenv/Lib/site-packages/pygame/examples/scroll.py
32
#!/usr/bin/env python """An zoomed image viewer that demonstrates Surface.scroll This example shows a scrollable image that has a zoom factor of eight. It uses the Surface.scroll function to shift the image on the display surface. A clip rectangle protects a margin area. If called as a function, the example accepts a...
ecosoft-odoo/odoo
refs/heads/8.0
addons/email_template/tests/test_mail.py
190
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
yodalee/servo
refs/heads/master
tests/wpt/web-platform-tests/old-tests/webdriver/windows/__init__.py
284
__author__ = 'b-redeg'
mikhtonyuk/SekaiFramework
refs/heads/devel
test/script.python.test/py_doctest.py
1
import Sekai methodDoc = Sekai.TestDocClass.Add.__doc__ assert(methodDoc == "Return summ of two integers") fieldDoc = Sekai.TestDocClass.somedata.__doc__ assert(fieldDoc == "Some data documentation")
clumsy/intellij-community
refs/heads/master
python/testData/quickFixes/RenameElementQuickFixTest/pep8.py
80
def foo(): A<caret>BC = "test"
ProfessionalIT/professionalit-webiste
refs/heads/master
sdk/google_appengine/google/appengine/runtime/wsgi.py
8
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
PierreRust/beets
refs/heads/master
test/test_library.py
6
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2015, Adrian Sampson. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation t...
gchq/gaffer-tools
refs/heads/develop
python-shell/src/example.py
1
# # Copyright 2016-2019 Crown Copyright # # 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 i...
chipx86/reviewboard
refs/heads/master
reviewboard/hostingsvcs/models.py
2
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from djblets.db.fields import JSONField from reviewboard.hostingsvcs.managers import HostingServiceAccountManager from reviewboard....
afandria/sky_engine
refs/heads/master
sky/tools/webkitpy/test/runner.py
11
# Copyright (C) 2012 Google, Inc. # # 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 copyright # notice, this list of conditions and the following disclaimer...
jyotikamboj/container
refs/heads/master
dj-tests/admin_scripts/custom_templates/project_template/additional_dir/additional_file.py
581
# some file for {{ project_name }} test project
safwanrahman/kitsune
refs/heads/master
authority/widgets.py
6
from django import forms from django.conf import settings from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from django.contrib.admin.widgets import ForeignKeyRawIdWidget generic_script = """ <script type="text/javascript"> function showGenericRelatedObjectLookupPop...
mcltn/ansible-modules-extras
refs/heads/devel
cloud/amazon/ecs_service_facts.py
17
#!/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...
khchine5/lino-welfare
refs/heads/master
lino_welfare/modlib/aids/models.py
1
# -*- coding: UTF-8 -*- # Copyright 2014-2017 Luc Saffre # This file is part of Lino Welfare. # # Lino Welfare is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at y...
georgenicolaou/nfi
refs/heads/master
AppExplorer.py
2
''' NFI -- Silensec's Nyuki Forensics Investigator Copyright (C) 2014 George Nicolaou (george[at]silensec[dot]com) Silensec Ltd. This file is part of Nyuki Forensics Investigator (NFI). NFI is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Licen...
EricZaporzan/evention
refs/heads/master
evention/events/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-23 23:03 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migration...
vineodd/PIMSim
refs/heads/master
GEM5Simulation/gem5/src/arch/power/PowerTLB.py
3
# -*- mode:python -*- # Copyright (c) 2009 The University of Edinburgh # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, t...
tgerla/ansible
refs/heads/devel
lib/ansible/plugins/lookup/etcd.py
151
# (c) 2013, Jan-Piet Mens <jpmens(at)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 later ver...
tkolhar/robottelo
refs/heads/master
tests/foreman/api/test_smartproxy.py
1
"""Tests for the ``smart_proxies`` paths.""" from nailgun import entities from robottelo.decorators import ( skip_if_bug_open, tier1, ) from robottelo.test import APITestCase from robottelo.api.utils import one_to_many_names @skip_if_bug_open('bugzilla', 1262037) class SmartProxyMissingAttrTestCase(APITestCas...
sawirah/OD8
refs/heads/master
themes/custom/ocelot_d8/node_modules/node-gyp/gyp/buildbot/buildbot_run.py
1467
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Argument-less script to select what to run on the buildbots.""" import os import shutil import subprocess import sys BUILDBOT_DIR = os....
henrykh/django-imager
refs/heads/master
imager_images/migrations/0007_auto_20150306_1840.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import sorl.thumbnail.fields class Migration(migrations.Migration): dependencies = [ ('imager_images', '0006_auto_20150306_0223'), ] operations = [ migrations.AlterField( ...
jiadaizhao/LeetCode
refs/heads/master
0801-0900/0830-Positions of Large Groups/0830-Positions of Large Groups.py
1
class Solution: def largeGroupPositions(self, S: str) -> List[List[int]]: result = [] i = 0 while i < len(S): start = i while i < len(S) and S[i] == S[start]: i += 1 if i - start >= 3: result.append([start, i - 1]) r...
azatoth/pywikipedia
refs/heads/master
scripts/__init__.py
3
# THIS DIRECTORY IS TO HOLD BOT SCRIPTS FOR THE NEW FRAMEWORK
cloudiirain/onigiri
refs/heads/master
onigiri/views.py
1
from django.http import Http404 from django.shortcuts import render from directory.forms import SearchForm def home(request): searchform = SearchForm() return render(request, 'onigiri/index.html', {'searchform' : searchform})
BT-astauder/odoo
refs/heads/8.0
addons/stock_picking_wave/__init__.py
374
# -*- 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...
maljac/odoo-addons
refs/heads/8.0
account_analytic_purchase_contract/analytic_contract_purchase.py
8
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp.osv import fields, osv from openerp.t...
Kazade/NeHe-Website
refs/heads/master
google_appengine/lib/django-1.5/tests/regressiontests/aggregation_regress/tests.py
8
from __future__ import absolute_import, unicode_literals import datetime import pickle from decimal import Decimal from operator import attrgetter from django.core.exceptions import FieldError from django.db.models import Count, Max, Avg, Sum, StdDev, Variance, F, Q from django.test import TestCase, Approximate, skip...
shepdelacreme/ansible
refs/heads/devel
lib/ansible/modules/network/panos/panos_nat_rule.py
32
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, techbizdev <techbizdev@paloaltonetworks.com> # 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 DOCUMENTATION = ''' --- module: panos_n...
openblockchain/obc-peer
refs/heads/master
bddtests/api_pb2.py
46
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: api.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflectio...
codrut3/tensorflow
refs/heads/master
tensorflow/contrib/learn/python/learn/utils/__init__.py
112
# 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...
chrrrles/ansible
refs/heads/devel
lib/ansible/plugins/lookup/flattened.py
103
# (c) 2013, Serge van Ginderachter <serge@vanginderachter.be> # # 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)...
dreamapplehappy/myblog
refs/heads/master
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/lexers/_robotframeworklexer.py
94
# -*- coding: utf-8 -*- """ pygments.lexers._robotframeworklexer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexer for Robot Framework. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ # Copyright 2012 Nokia Siemens Networks Oyj # # License...
NikolaYolov/invenio_backup
refs/heads/master
modules/bibformat/lib/elements/bfe_reprints.py
39
## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 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 your option...
xynopsis/grsec-kernel
refs/heads/linux-3.18.y-grsec
arch/ia64/scripts/unwcheck.py
13143
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
loco-odoo/localizacion_co
refs/heads/master
openerp/addons/web/static/lib/py.js/doc/conf.py
543
# -*- coding: utf-8 -*- # # py.js documentation build configuration file, created by # sphinx-quickstart on Sun Sep 9 19:36:23 2012. # # 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 # autogenerated file. # # All c...
jricardo27/travelhelper
refs/heads/master
travelhelper/apps/core/templatetags/xextends.py
1
""" Custom extends tag that allows passing parameters. https://djangosnippets.org/snippets/447/ """ from django import template from django.template.base import FilterExpression from django.template.loader_tags import do_extends import tokenize import StringIO register = template.Library() class XExtendsNode(templa...
guardian/learning-python
refs/heads/master
test_lambdas.py
2
import unittest class TestLambdas(unittest.TestCase): def test_lambdas_are_functions(self): f = lambda x: x * 2 self.assertEqual(f(2), 4) def test_lambdas_can_be_used_in_map(self): result = [0, 2, 4] self.assertSequenceEqual(map(lambda x: x * 2, range(3)), result) def test_lambdas_ca...
wizh/codewars
refs/heads/master
4kyu/Roman_numerals_decoder/solution.py
1
def solution(s): ns = {'M': 1000, 'D': 500, 'C': 100, 'L': 50, 'X': 10, 'V': 5, 'I': 1} return (int(ns[s[-1]]) + sum(-1 * ns[c] if ns[s[i + 1]] > ns[c] else ns[c] for i, c in enumerate(s[:-1])))
emijrp/youtube-dl
refs/heads/master
youtube_dl/extractor/tv4.py
117
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( ExtractorError, parse_iso8601, ) class TV4IE(InfoExtractor): IE_DESC = 'tv4.se and tv4play.se' _VALID_URL = r'''(?x)https?://(?:www\.)? (?: tv4\.se/(?:[^/]+)/klipp/(?:.*...
ProgDan/maratona
refs/heads/master
SPOJ/IEEEBGAM.py
1
noOfCases=int(raw_input()) for i in range(noOfCases): n=float(raw_input()) print('%.8f')%((n/(n+1)))
xczheng/swift-encrypt-compress-middleware
refs/heads/master
myswift/encrypt.py
1
from swift.common.swob import Request from swift.common.utils import split_path from Crypto.Cipher import AES from Crypto import Random import hashlib AES_BLOCK = 32 def create_encrypt(raw, password): raw = _pad(raw) key = hashlib.sha256(password.encode()).digest() iv = Random.new().read(AES.block_size) ...
tedelhourani/ansible
refs/heads/devel
lib/ansible/modules/net_tools/haproxy.py
25
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Ravi Bhure <ravibhure@gmail.com> # 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', ...
RDFLib/PyRDFa
refs/heads/master
pyRdfa/__init__.py
1
# -*- coding: utf-8 -*- """ RDFa 1.1 parser, also referred to as a “RDFa Distiller”. It is deployed, via a CGI front-end, on the U{W3C RDFa Distiller page<http://www.w3.org/2007/08/pyRdfa/>}. For details on RDFa, the reader should consult the U{RDFa Core 1.1<http://www.w3.org/TR/rdfa-core/>} and the U{XHTML+RDFa1.1<ht...
MightyCreak/diffuse
refs/heads/master
build-scripts/meson-postinstall.py
1
#!/usr/bin/env python3 import sysconfig from compileall import compile_dir from os import environ, path from subprocess import call prefix = environ.get('MESON_INSTALL_PREFIX', '/usr/local') datadir = path.join(prefix, 'share') destdir = environ.get('DESTDIR', '') # Package managers set this so we don't need to run ...
siosio/intellij-community
refs/heads/master
python/testData/refactoring/unwrap/whileInIfUnwrap_before.py
80
if True: while False: # comment x = 1<caret> y = 2
julienr/vispy
refs/heads/master
vispy/app/qt.py
21
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # Force the selection of an application backend. If the user has already # imported PyQt or PySide, this should result in selection of the corresponding # backend. from .backe...
hcmn/tapwn
refs/heads/master
news/models.py
1
from django.db import models import datetime # Create your models here. class Headline(models.Model): publication_date = models.DateTimeField(auto_now_add=True) schedule_content = models.DateTimeField() subject = models.CharField(max_length=200) description = models.TextField() hotness_label = mode...
hackerbot/DjangoDev
refs/heads/master
tests/utils_tests/test_checksums.py
55
import unittest from django.test import ignore_warnings from django.utils.deprecation import RemovedInDjango20Warning class TestUtilsChecksums(unittest.TestCase): def check_output(self, function, value, output=None): """ Check that function(value) equals output. If output is None, check...
sleibman/python-conduit
refs/heads/master
setup.py
1
from setuptools import setup import os with open('README.md') as file: long_description = file.read() setup( name = "conduit", version = "0.0.8", author = "Steve Leibman", author_email = "sleibman@alum.mit.edu", description = ("Framework for dataflow-style python programming"), license = "...
mscuthbert/abjad
refs/heads/master
abjad/tools/pitchtools/test/test_pitchtools_list_pitch_numbers_in_expr.py
2
# -*- encoding: utf-8 -*- from abjad import * def test_pitchtools_list_pitch_numbers_in_expr_01(): tuplet = scoretools.FixedDurationTuplet(Duration(2, 8), "c'8 d'8 e'8") assert pitchtools.list_pitch_numbers_in_expr(tuplet) == (0, 2, 4) def test_pitchtools_list_pitch_numbers_in_expr_02(): staff = Staff...
grow/webreview-client
refs/heads/master
webreview/__init__.py
1
from .webreview import *
flwh/KK_mt6589_iq451
refs/heads/master
prebuilts/python/darwin-x86/2.7.5/lib/python2.7/argparse.py
95
# Author: Steven J. Bethard <steven.bethard@gmail.com>. """Command-line parsing library This module is an optparse-inspired command-line parsing library that: - handles both optional and positional arguments - produces highly informative usage messages - supports parsers that dispatch to sub-parsers The...