repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
GbalsaC/bitnamiP | refs/heads/master | venv/lib/python2.7/site-packages/moto/route53/models.py | 3 | from moto.core import BaseBackend
from moto.core.utils import get_random_hex
class FakeZone(object):
def __init__(self, name, id):
self.name = name
self.id = id
self.rrsets = {}
def add_rrset(self, name, rrset):
self.rrsets[name] = rrset
def delete_rrset(self, name):
... |
2013Commons/hue | refs/heads/master | desktop/core/ext-py/Django-1.4.5/tests/regressiontests/localflavor/ch/tests.py | 33 | from django.contrib.localflavor.ch.forms import (CHZipCodeField,
CHPhoneNumberField, CHIdentityCardNumberField, CHStateSelect)
from django.test import SimpleTestCase
class CHLocalFlavorTests(SimpleTestCase):
def test_CHStateSelect(self):
f = CHStateSelect()
out = u'''<select name="state">
<op... |
numerigraphe/odoo | refs/heads/8.0 | addons/warning/warning.py | 243 | # -*- 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... |
anntzer/scikit-learn | refs/heads/main | asv_benchmarks/benchmarks/metrics.py | 12 | from sklearn.metrics.pairwise import pairwise_distances
from .common import Benchmark
from .datasets import _random_dataset
class PairwiseDistancesBenchmark(Benchmark):
"""
Benchmarks for pairwise distances.
"""
param_names = ['representation', 'metric', 'n_jobs']
params = (['dense', 'sparse'],
... |
michelts/lettuce | refs/heads/master | tests/integration/lib/Django-1.3/django/core/management/commands/reset.py | 229 | from optparse import make_option
from django.conf import settings
from django.core.management.base import AppCommand, CommandError
from django.core.management.color import no_style
from django.core.management.sql import sql_reset
from django.db import connections, transaction, DEFAULT_DB_ALIAS
class Command(AppComman... |
tomsimonart/GLM-web-interface | refs/heads/master | pluginstall.py | 1 | #!/usr/bin/env python3
print('plugin installer, TBC')
|
MattDevo/edk2 | refs/heads/master | AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Imports.py | 6 | from pybench import Test
# First imports:
import os
import package.submodule
class SecondImport(Test):
version = 2.0
operations = 5 * 5
rounds = 40000
def test(self):
for i in xrange(self.rounds):
import os
import os
import os
... |
concurrence/concurrence | refs/heads/master | lib/concurrence/http/__init__.py | 1 | # Copyright (C) 2009, Hyves (Startphone Ltd.)
#
# This module is part of the Concurrence Framework and is released under
# the New BSD License: http://www.opensource.org/licenses/bsd-license.php
class HTTPError(Exception): pass
class HTTPRequest(object):
"""A class representing a HTTP request."""
def __i... |
Chasego/codirit | refs/heads/master | leetcode/202-Happy-Number/solution.py | 4 | class Solution:
def isHappy(self, n: int) -> bool:
visited = set([n])
while n != 1:
new_n = 0
while n > 0:
new_n += (n % 10) ** 2
n = int(n/10)
if new_n in visited:
return False
visited.add(new_n)
... |
redhat-openstack/ironic | refs/heads/master-patches | ironic/tests/api/v1/test_utils.py | 2 | # -*- encoding: utf-8 -*-
# Copyright 2013 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... |
richardcs/ansible | refs/heads/devel | lib/ansible/modules/cloud/vultr/vultr_startup_script_facts.py | 27 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2018, Yanis Guenane <yanis+ansible@guenane.org>
# 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':... |
louietsai/python-for-android | refs/heads/master | python3-alpha/extra_modules/gdata/finance/data.py | 125 | #!/usr/bin/python
#
# Copyright (C) 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
bcheung92/Paperproject | refs/heads/master | gem5/configs/common/O3_ARM_v7a.py | 6 | # Copyright (c) 2012 The Regents of The University of Michigan
# 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 ... |
shinate/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/test/printer.py | 117 | # Copyright (C) 2012 Google, Inc.
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
#
# 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
# n... |
OpenCycleCompass/ocyco-server-python | refs/heads/develop | ocyco/api/decorators.py | 2 | from functools import wraps
from flask import request, jsonify, Response
from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound
from ocyco.models.users import Users
from ocyco.api.exceptions import MultipleMatchesException
def check_authentication(username, password, superuser=False):
"""This functio... |
darkleons/BE | refs/heads/master | addons/hr_evaluation/report/hr_evaluation_report.py | 313 | # -*- 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... |
cryptobanana/ansible | refs/heads/devel | lib/ansible/modules/network/panos/panos_interface.py | 13 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Ansible module to manage PaloAltoNetworks Firewall
# (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish... |
ghjm/ansible | refs/heads/devel | test/units/config/manager/test_find_ini_config_file.py | 35 | # -*- coding: utf-8 -*-
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import os.path
import stat
impor... |
racker/omnibus | refs/heads/master | source/libxml2-2.7.7/python/tests/cutnpaste.py | 87 | #!/usr/bin/python -u
import sys
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
#
# Testing XML document serialization
#
source = libxml2.parseDoc("""<?xml version="1.0"?>
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<include xmlns="http://example.org/include">
<fra... |
pschmitt/home-assistant | refs/heads/dev | homeassistant/components/russound_rio/__init__.py | 36 | """The russound_rio component."""
|
brson/gyp | refs/heads/master | test/lib/TestCmd.py | 330 | """
TestCmd.py: a testing framework for commands and scripts.
The TestCmd module provides a framework for portable automated testing
of executable commands and scripts (in any language, not just Python),
especially commands and scripts that require file system interaction.
In addition to running tests and evaluating... |
barbarubra/Don-t-know-What-i-m-doing. | refs/heads/master | python-build/python-libs/python-twitter/simplejson/__init__.py | 136 | r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
:mod:`simplejson` exposes an API familiar to users of the standard library
:mod:`marshal` and :mod:`pickle` modules. It is the externally maintained
version of ... |
mmatyas/servo | refs/heads/master | tests/wpt/web-platform-tests/XMLHttpRequest/resources/auth2/corsenabled.py | 367 | import imp
import os
def main(request, response):
response.headers.set('Access-Control-Allow-Origin', request.headers.get("origin"));
response.headers.set('Access-Control-Allow-Credentials', 'true');
response.headers.set('Access-Control-Allow-Methods', 'GET');
response.headers.set('Access-Control-Allow... |
minhtuancn/odoo | refs/heads/8.0 | addons/account/wizard/account_state_open.py | 341 | # -*- 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... |
olemis/brython | refs/heads/master | www/src/Lib/encodings/iso8859_6.py | 37 | """ Python Character Mapping Codec iso8859_6 generated from 'MAPPINGS/ISO8859/8859-6.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,i... |
wangjun/odoo | refs/heads/8.0 | addons/account_cancel/models/account_bank_statement.py | 96 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp import models, api, _
from openerp.exceptions import Warning
class BankStatement(models.Model):
_inherit = 'account.bank.statement'
@api.multi
def button_draft(self):
self.state = 'dra... |
catapult-project/catapult | refs/heads/master | third_party/typ/typ/tests/main_test.py | 3 | # Copyright 2014 Dirk Pranke. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
vrenaville/OCB | refs/heads/8.0 | addons/l10n_br/account.py | 340 | # -*- encoding: utf-8 -*-
#################################################################################
# #
# Copyright (C) 2009 Renato Lima - Akretion #
# ... |
uni2u/neutron | refs/heads/master | neutron/tests/unit/nuage/test_netpartition.py | 14 | # Copyright 2014 Alcatel-Lucent USA 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 l... |
AlexDoul/PyQt4 | refs/heads/master | examples/itemviews/pixelator/pixelator.py | 2 | #!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2010 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENS... |
drawquest/drawquest-web | refs/heads/master | website/apps/canvas_auth/migrations/0001_initial.py | 2 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
pass
def backwards(self, orm):
pass
models = {
}
complete_apps = ['canvas_auth']
|
bodedev/prospera | refs/heads/master | plataforma/tests.py | 873 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
# Create your tests here.
|
eudoxos/woodem | refs/heads/master | py/apiversion.py | 3 | # encoding: utf-8
import woo.core
###
### Set API version here. Usually something like
###
### major × 10000 + minor × 100 + API revision
###
### document changes in doc/api.rst
###
### make sure the number is never decreased
###
woo.core.Master.instance.api=10102
###
###
###
|
pyspace/test | refs/heads/master | pySPACE/missions/nodes/debug/exchange_data.py | 1 | """Exchange the data against some self created data
"""
from pySPACE.missions.nodes.base_node import BaseNode
from pySPACE.resources.data_types.time_series import TimeSeries
from pySPACE.tests.utils.data.test_data_generation import *
class ExchangeDataNode(BaseNode):
"""Exchange the data against some self create... |
at1as/IMDB-Scrape | refs/heads/master | scripts/remove_entry.py | 2 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# Remove saved entries from saved json repositories
# Useful for entries that have been tagged incorrectly
from __future__ import unicode_literals
import os
import re
import sys
import json
from unicodedata import normalize
def relative_path(file_path):
# Get path rela... |
siavooshpayandehazad/NoC_Router | refs/heads/master | Scripts/include/fault_injector_do.py | 3 | import random
import sys
import numpy
from Scripts.include.package import *
#----------------------------------------------------------------------------------------------
#
# Fault Class
#
#----------------------------------------------------------------------------------------------
class fault:
location... |
kdwink/intellij-community | refs/heads/master | python/testData/quickFixes/PyMakeFunctionFromMethodQuickFixTest/usageSelf.py | 75 | class A():
def method(self):
self.method2()
def metho<caret>d2(self):
print 1 |
kanagasabapathi/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/test/test_cgi.py | 46 | from test.support import run_unittest, check_warnings
import cgi
import os
import sys
import tempfile
import unittest
from io import StringIO, BytesIO
class HackedSysModule:
# The regression test will have real values in sys.argv, which
# will completely confuse the test of the cgi module
argv = []
std... |
yangzhongj/vitess | refs/heads/master | py/vtdb/vtgatev3.py | 5 | # Copyright 2013 Google Inc. All Rights Reserved.
# Use of this source code is governed by a BSD-style license that can
# be found in the LICENSE file.
from itertools import izip
import logging
import re
from net import bsonrpc
from net import gorpc
from vtdb import cursorv3
from vtdb import dbexceptions
from vtdb im... |
tavaresdong/courses-notes | refs/heads/master | ucb_cs61A/lab/lab05/lab05.py | 3 | ## Trees ##
# Q4
def make_pytunes(username):
"""Return a pyTunes tree as shown in the diagram with USERNAME as the value
of the root.
>>> pytunes = make_pytunes('i_love_music')
>>> print_tree(pytunes)
i_love_music
pop
justin bieber
single
what do you mean?
... |
lalinsky/picard | refs/heads/master | picard/ui/ui_passworddialog.py | 5 | # -*- coding: utf-8 -*-
# Automatically generated - don't edit.
# Use `python setup.py build_ui` to update it.
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
class Ui_PasswordDialog(object):
def setupUi(self, PasswordDialog):
... |
olevinsky/django-guardian | refs/heads/master | guardian/shortcuts.py | 9 | """
Convenient shortcuts to manage or check object permissions.
"""
from django.contrib.auth.models import Permission, User, Group
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.db.models import Q
from django.shortcuts import _get_queryset
from guardian.core import O... |
snnn/bazel | refs/heads/master | tools/build_defs/pkg/archive_test.py | 24 | # Copyright 2015 The Bazel 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 applicable la... |
salomon1184/bite-project | refs/heads/master | deps/mrtaskman/server/mapreduce/lib/pipeline/simplejson/tool.py | 43 | #!/usr/bin/env python
r"""Command-line tool to validate and pretty-print JSON
Usage::
$ echo '{"json":"obj"}' | python -m simplejson.tool
{
"json": "obj"
}
$ echo '{ 1.2:3.4}' | python -m simplejson.tool
Expecting property name: line 1 column 2 (char 2)
"""
import sys
from mapreduce.lib i... |
sekikn/incubator-airflow | refs/heads/master | airflow/sensors/python.py | 5 | #
# 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... |
bigswitch/snac-nox-zaku | refs/heads/zaku | src/nox/coreapps/pyrt/pyoxidereactor.py | 3 | # Copyright 2008 (C) Nicira, Inc.
#
# This file is part of NOX.
#
# NOX 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.
#
# NOX is dist... |
YaniLozanov/Software-University | refs/heads/master | Python/PyCharm/04.Complex Conditional Statements/01. Personal Titles.py | 1 | # Problem:
# The first task of this topic is to write a console program that introduces age (decimal number) and
# gender ("m" or "f") and prints an address from among the following:
# -> "Mr." - male (gender "m") aged 16 or over
# -> "Master" - boy (sex "m") under 16 years of age
# -> "Ms." - woman (gender "f") aged 1... |
nitzmahone/ansible | refs/heads/devel | lib/ansible/modules/network/f5/bigip_gtm_server.py | 4 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# 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',
... |
theofilis/tutorial-rabbitMQ | refs/heads/master | code/lesson3/receive_logs.py | 1 | # !/usr/bin/env python
__author__ = 'theofilis'
import pika
connection = pika.BlockingConnection(pika.ConnectionParameters(
host='localhost'))
channel = connection.channel()
channel.exchange_declare(exchange='logs',
type='fanout')
result = channel.queue_declare(exclusive=True)
queue_nam... |
gustavla/self-supervision | refs/heads/master | selfsup/multi/methods/__init__.py | 1 | from __future__ import division, print_function, absolute_import
from .rot90 import Rot90
from .colorize_hypercolumn import ColorizeHypercolumn
from .colorize_hypercolumn2 import ColorizeHypercolumn2
from .colorize_hypercolumn3 import ColorizeHypercolumn3
from .video_saliency import VideoSaliency
from .video_saliency_h... |
tovrstra/horton | refs/heads/master | horton/test/test_log.py | 4 | # -*- coding: utf-8 -*-
# HORTON: Helpful Open-source Research TOol for N-fermion systems.
# Copyright (C) 2011-2017 The HORTON Development Team
#
# This file is part of HORTON.
#
# HORTON is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by th... |
mmmaaaxxx77/Python-Django-AdminLTE2 | refs/heads/master | HypermediaDemo/apps/ripozo/CustomDecorators.py | 1 | """
Contains the critical decorators for ripozo.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from functools import wraps, update_wrapper
import logging
import warnings
import six
_logger = logging.getLogger(... |
knightingal/git_fav | refs/heads/master | git_proxy/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
smi96/django-blog_website | refs/heads/master | lib/python2.7/site-packages/PIL/WalImageFile.py | 19 | # encoding: utf-8
#
# The Python Imaging Library.
# $Id$
#
# WAL file handling
#
# History:
# 2003-04-23 fl created
#
# Copyright (c) 2003 by Fredrik Lundh.
#
# See the README file for information on usage and redistribution.
#
# NOTE: This format cannot be automatically recognized, so the reader
# is not registered... |
funson/rt-xen | refs/heads/master | tools/xm-test/tests/destroy/06_destroy_dom0_neg.py | 42 | #!/usr/bin/python
# Copyright (C) International Business Machines Corp., 2005
# Author: Li Ge <lge@us.ibm.com>
import re
from XmTestLib import *
status, output = traceCommand("xm destroy 0")
if status == 0:
FAIL("xm destroy returned bad status, expected non 0, status is: %i" % status)
elif not re.search("Error"... |
Open-Plus/opgui | refs/heads/master | tests/events.py | 80 | import time
import tests
recorded_events = [ ]
def event(self, name, args, kwargs):
global recorded_events
print "*EVENT*", time.time(), self, name, args, kwargs
recorded_events.append((time.time(), self, name, args, kwargs))
def eventfnc(f):
name = f.__name__
def wrapper(self, *args, **kwargs):
event(self, n... |
lmregus/Portfolio | refs/heads/master | python/design_patterns/env/lib/python3.7/site-packages/docutils/languages/fr.py | 52 | # $Id: fr.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: Stefane Fermigier <sf@fermigier.com>
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
# translat... |
juanalfonsopr/odoo | refs/heads/8.0 | addons/hr_timesheet_sheet/report/__init__.py | 342 | # -*- 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... |
total-impact/total-impact-webapp | refs/heads/master | totalimpactwebapp/refresh_status.py | 2 | from totalimpactwebapp import db
from util import cached_property
from util import commit
from util import dict_from_dir
import logging
logger = logging.getLogger("ti.refresh_status")
def save_profile_refresh_status(profile, status_string):
profile.refresh_status = status_string
db.session.add(profile)
... |
DrDub/pilas | refs/heads/master | pilasengine/tareas/tarea.py | 6 | # -*- encoding: utf-8 -*-
# pilas engine: un motor para hacer videojuegos
#
# Copyright 2010-2014 - Hugo Ruscitti
# License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html)
#
# Website - http://www.pilas-engine.com.ar
from pilasengine.actores.actor import ActorEliminadoException
class Tarea(object):
def __ini... |
g-k/servo | refs/heads/master | tests/wpt/web-platform-tests/webdriver/runtests.py | 212 | import unittest
from unittest import TestLoader, TextTestRunner, TestSuite
if __name__ == "__main__":
loader = TestLoader()
suite = TestSuite((
loader.discover(".", pattern="*.py")
))
runner = TextTestRunner(verbosity=2)
runner.run(suite)
unittest.main()
|
scw/ansible | refs/heads/devel | lib/ansible/playbook/become.py | 150 | # (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... |
abhishekjairath/codeyard | refs/heads/master | commit/lib/python2.7/site-packages/pip/commands/search.py | 344 | import sys
import textwrap
import pip.download
from pip.basecommand import Command, SUCCESS
from pip.util import get_terminal_size
from pip.log import logger
from pip.backwardcompat import xmlrpclib, reduce, cmp
from pip.exceptions import CommandError
from pip.status_codes import NO_MATCHES_FOUND
from pip._vendor imp... |
MiLk/ansible | refs/heads/devel | lib/ansible/plugins/cliconf/__init__.py | 44 | #
# (c) 2017 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is d... |
mou4e/zirconium | refs/heads/master | third_party/simplejson/__init__.py | 175 | r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
:mod:`simplejson` exposes an API familiar to users of the standard library
:mod:`marshal` and :mod:`pickle` modules. It is the externally maintained
version of ... |
Venturi/oldcms | refs/heads/master | env/lib/python2.7/site-packages/unidecode/x064.py | 252 | data = (
'Chan ', # 0x00
'Ge ', # 0x01
'Lou ', # 0x02
'Zong ', # 0x03
'Geng ', # 0x04
'Jiao ', # 0x05
'Gou ', # 0x06
'Qin ', # 0x07
'Yong ', # 0x08
'Que ', # 0x09
'Chou ', # 0x0a
'Chi ', # 0x0b
'Zhan ', # 0x0c
'Sun ', # 0x0d
'Sun ', # 0x0e
'Bo ', # 0x0f
'Chu ', # 0x10
... |
MineID/MineID | refs/heads/master | mineid/api/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
Itxaka/st2 | refs/heads/master | st2client/tests/unit/test_commands.py | 7 | # 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 "License"); you may not use th... |
SaschaMester/delicium | refs/heads/master | components/cloud_devices/tools/prototype/prototype.py | 65 | #!/usr/bin/env python
# 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.
"""Prototype of cloud device with support of local API.
This prototype has tons of flaws, not the least of which being that it
occ... |
NoBodyCam/TftpPxeBootBareMetal | refs/heads/tftp_pxe_boot | nova/network/manager.py | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (t... |
kenshay/ImageScript | refs/heads/master | ProgramData/SystemFiles/Python/Lib/site-packages/OpenGL/GLES2/NV/shadow_samplers_array.py | 8 | '''OpenGL extension NV.shadow_samplers_array
This module customises the behaviour of the
OpenGL.raw.GLES2.NV.shadow_samplers_array to provide a more
Python-friendly API
The official definition of this extension is available here:
http://www.opengl.org/registry/specs/NV/shadow_samplers_array.txt
'''
from OpenGL impo... |
willprice/arduino-sphere-project | refs/heads/master | scripts/example_direction_finder/temboo/Library/Parse/Users/LinkExistingUser.py | 5 | # -*- coding: utf-8 -*-
###############################################################################
#
# LinkExistingUser
# Allows your application to link an existing user with a service like Facebook or Twitter.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache Licens... |
whn09/tensorflow | refs/heads/master | tensorflow/python/framework/graph_io.py | 62 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
shsingh/ansible | refs/heads/devel | lib/ansible/modules/storage/netapp/na_ontap_net_subnet.py | 20 | #!/usr/bin/python
# 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',
'status': ['preview'],
'supporte... |
povellesto/blobygames | refs/heads/master | Blob Rage App/random/makehacks.py | 1 | import random
import turtle
moveforward = ("Move forward")
turnleft = ("Turn Left")
movebackward = ("Move Backward")
turnright = ("Turn Right")
square = ("square")
circle = ("circle")
penUp = ("pen up")
penDown = ("pen down")
goto = ("go to")
house = ("house")
Instructions = ("Intructions")
def Instuctions():
p... |
Hybrid-Cloud/badam | refs/heads/master | patches_tool/aws_patch/aws_deps/libcloud/test/compute/test_abiquo.py | 1 | # 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 ... |
skirsdeda/django | refs/heads/master | tests/migrations/test_migrations_squashed_complex_multi_apps/app1/3_auto.py | 22 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [("app1", "2_auto"), ("app2", "2_auto")]
operations = [
migrations.RunPython(lambda apps, schema_editor: None)
]
|
afaheem88/tempest | refs/heads/master | tempest/services/image/v1/json/image_client.py | 6 | # Copyright 2013 IBM Corp.
# 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 app... |
fvpolpeta/devide.johannes | refs/heads/master | install_packages/ip_vtkteem.py | 5 | # Copyright (c) Francois Malan & Christian Kehl, TU Delft.
# All rights reserved.
# See COPYRIGHT for details.
import config
from install_package import InstallPackage
import os
import shutil
import utils
import sys
from subprocess import call
REVISION_NUMBER = "8877"
BASENAME = "vtkTeem"
SVN_REPO = "http://svn.slice... |
yoer/hue | refs/heads/master | desktop/core/ext-py/boto-2.38.0/boto/manage/server.py | 153 | # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010 Chris Moyer http://coredumped.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, incl... |
schets/scikit-learn | refs/heads/master | sklearn/ensemble/gradient_boosting.py | 6 | """Gradient Boosted Regression Trees
This module contains methods for fitting gradient boosted regression trees for
both classification and regression.
The module structure is the following:
- The ``BaseGradientBoosting`` base class implements a common ``fit`` method
for all the estimators in the module. Regressio... |
idea4bsd/idea4bsd | refs/heads/idea4bsd-master | python/testData/copyPaste/multiLine/IndentInnerFunction2.dst.py | 83 | def foo(self):
x = 1
y = 2
<caret>
z = 3 |
mehdilauters/man-in-the-middle | refs/heads/master | man-in-the-middle.py | 1 | #!/usr/bin/env python
#
# Execute with sudo python arppoison.py
#
#
import time
import argparse
import signal
import nfqueue
import threading
from multiprocessing import Process
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from scapy.all import *
exit = False
threads = []
def parse_args(... |
haystack/eyebrowse-server | refs/heads/master | notifications/migrations/0003_auto__del_field_notification_user__add_field_notification_recipient__a.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):
# Deleting field 'Notification.user'
db.delete_column('notifications_noti... |
TheBraveWarrior/pyload | refs/heads/stable | module/plugins/accounts/UptoboxCom.py | 5 | # -*- coding: utf-8 -*-
import time
import re
import urlparse
from ..internal.misc import json
from ..internal.XFSAccount import XFSAccount
class UptoboxCom(XFSAccount):
__name__ = "UptoboxCom"
__type__ = "account"
__version__ = "0.23"
__status__ = "testing"
__description__ = """Uptobox.com acc... |
christianurich/VIBe2UrbanSim | refs/heads/master | 3rdparty/opus/src/opus_gui/models_manager/controllers/submodel_structure_editor_tree.py | 2 | # Opus/UrbanSim urban simulation software.
# Copyright (C) 2005-2009 University of Washington
# See opus_core/LICENSE
from PyQt4 import QtGui, QtCore
from lxml import etree
from opus_gui.util.convenience import get_unique_name
from opus_gui.models_manager.models.submodel_structure_item import SubmodelStructureI... |
deathmetalland/IkaLog | refs/heads/youtube_sample | ikalog/outputs/mikumikumouth.py | 3 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# IkaLog
# ======
# Copyright (C) 2015 ExceptionError
# Copyright (C) 2015 Takeshi HASEGAWA
# Copyright (C) 2015 AIZAWA Hina
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# Y... |
renzon/livrogae | refs/heads/master | backend/test/curso_tests/negocio.py | 1 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from curso.model import Curso
from curso.negocio import PesquisarCursoCmd
from util import GAETestCase
class PesquisarCursoTest(GAETestCase):
def test_execute(self):
curso=Curso(nome='PyPrático')
curso.put()
c... |
Just-D/chromium-1 | refs/heads/master | tools/telemetry/third_party/gsutilz/third_party/boto/boto/ec2/autoscale/request.py | 152 | # Copyright (c) 2009 Reza Lotun http://reza.lotun.name/
#
# 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, modify, ... |
noba3/KoTos | refs/heads/master | addons/script.module.youtube.dl/lib/youtube_dl/extractor/channel9.py | 27 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
ExtractorError,
parse_filesize,
qualities,
)
class Channel9IE(InfoExtractor):
'''
Common extractor for channel9.msdn.com.
The type of provided URL (video or playlist) is determined acco... |
Timothee/Passerelle | refs/heads/master | passerelle.py | 1 | import os
from urlparse import urlparse
from flask import Flask, request, Response
app = Flask(__name__)
@app.route("/", methods=["POST"])
def git2git():
from_url = request.args.get('from')
to_url = request.args.get('to')
if not from_url and not to_url:
return Response(status="400 Git URLs Not Sent With Request... |
rudatalab/python-objectcube | refs/heads/master | api/test/test_object_resource/test_object_resource_by_id.py | 1 | import json
from api import app
from api.test import APITest
class TestAPIObjectResourceByID(APITest):
def __init__(self, *args, **kwargs):
super(TestAPIObjectResourceByID, self).__init__(*args, **kwargs)
self.base_url = '/api/objects'
self.app = app.test_client()
def _create_test_ob... |
2014c2g4/2015cda0623 | refs/heads/master | static/Brython3.1.3-20150514-095342/Lib/zipfile.py | 620 | """
Read and write ZIP files.
XXX references to utf-8 need further investigation.
"""
import io
import os
import re
import imp
import sys
import time
import stat
import shutil
import struct
import binascii
try:
import zlib # We may need its compression method
crc32 = zlib.crc32
except ImportError:
zlib =... |
ioram7/keystone-federado-pgid2013 | refs/heads/master | keystone/catalog/core.py | 5 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC
# Copyright 2012 Canonical Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/lice... |
Tendrl/commons | refs/heads/master | tendrl/commons/flows/unmanage_cluster/__init__.py | 1 | import sys
import traceback
from tendrl.commons import flows
from tendrl.commons.flows.exceptions import FlowExecutionFailedError
from tendrl.commons.objects import AtomExecutionFailedError
class UnmanageCluster(flows.BaseFlow):
def __init__(self, *args, **kwargs):
super(UnmanageCluster, self).__init__(*... |
WebCampZg/conference-web | refs/heads/master | cfp/migrations/0012_auto_20170523_1411.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-05-23 12:11
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cfp', '0011_auto_20170523_1353'),
]
operations = [
migrations.AlterField(
... |
davemcphee/sensu-pager-handler | refs/heads/master | python-handler/test_handler.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# run this on sensu server to check what kind of output we get fed from main proc
import logging
logging.basicConfig(level=logging.DEBUG)
import os
import sys
LOG = logging.getLogger(__name__)
what_i_got = sys.argv
LOG.debug("argsv\t\t{}".format(str(what_i_got)))
LOG.de... |
caveman-dick/ansible | refs/heads/devel | lib/ansible/modules/cloud/amazon/redshift_subnet_group.py | 24 | #!/usr/bin/python
# Copyright 2014 Jens Carl, Hothead Games Inc.
# 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',
'stat... |
darkryder/django | refs/heads/master | django/conf/locale/hi/formats.py | 619 | # -*- 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 = 'j F Y'
TIME_FORMAT = 'g:i A'
# DA... |
unseenlaser/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/test/test_strlit.py | 48 | r"""Test correct treatment of various string literals by the parser.
There are four types of string literals:
'abc' -- normal str
r'abc' -- raw str
b'xyz' -- normal bytes
br'xyz' -- raw bytes
The difference between normal and raw strings is of course that in a
raw string, \ escapes (while still u... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.