repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
googleapis/googleapis-gen | refs/heads/master | google/cloud/vision/v1p3beta1/vision-v1p3beta1-py/google/cloud/vision_v1p3beta1/services/product_search/transports/grpc_asyncio.py | 1 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
SimonSapin/cairocffi | refs/heads/master | cairocffi/test_cairo.py | 1 | """
cairocffi.tests
~~~~~~~~~~~~~~~
Test suite for cairocffi.
:copyright: Copyright 2013-2019 by Simon Sapin
:license: BSD, see LICENSE for details.
"""
import array
import base64
import contextlib
import gc
import io
import math
import os
import shutil
import sys
import tempfile
import cairocf... |
smadhusu/AppRTC | refs/heads/master | src/third_party/apiclient/model.py | 102 | #!/usr/bin/python2.4
#
# Copyright (C) 2010 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 l... |
eahneahn/free | refs/heads/master | lib/python2.7/site-packages/pip-1.5-py2.7.egg/pip/_vendor/requests/packages/charade/euctwfreq.py | 3132 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... |
jlopex/kernel_linaro_snowball | refs/heads/mesh | scripts/tracing/draw_functrace.py | 14679 | #!/usr/bin/python
"""
Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call ... |
Serag8/Bachelor | refs/heads/master | google_appengine/lib/jinja2-2.6/jinja2/testsuite/debug.py | 114 | # -*- coding: utf-8 -*-
"""
jinja2.testsuite.debug
~~~~~~~~~~~~~~~~~~~~~~
Tests the debug system.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import sys
import unittest
from jinja2.testsuite import JinjaTestCase, filesystem_loader
from jinja2 import E... |
hjanime/VisTrails | refs/heads/master | vistrails/db/versions/v1_0_1/domain/auto_gen.py | 1 | ###############################################################################
##
## Copyright (C) 2014-2015, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## ... |
tangfeixiong/nova | refs/heads/stable/juno | nova/conductor/rpcapi.py | 21 | # Copyright 2013 IBM Corp.
# Copyright 2013 Red Hat, 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 r... |
s40523217/2016fallcp_hw | refs/heads/gh-pages | plugin/liquid_tags/notebook.py | 26 | """
Notebook Tag
------------
This is a liquid-style tag to include a static html rendering of an IPython
notebook in a blog post.
Syntax
------
{% notebook filename.ipynb [ cells[start:end] ]%}
The file should be specified relative to the ``notebooks`` subdirectory of the
content directory. Optionally, t... |
public0821/xxx | refs/heads/master | test/vm/virtualbox.py | 1 | import os
import logging
import sys
import shutil
import time
import platform
from pylib import shell
class VirtualBox(object):
def __init__(self, vboxmanage=None):
if vboxmanage:
self.__vboxmanage = vboxmanage
else:
self.__vboxmanage = self.scan_vboxmanage()
def scan_v... |
40223211/cadpbtest-0420 | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/xml/etree/ElementInclude.py | 784 | #
# ElementTree
# $Id: ElementInclude.py 3375 2008-02-13 08:05:08Z fredrik $
#
# limited xinclude support for element trees
#
# history:
# 2003-08-15 fl created
# 2003-11-14 fl fixed default loader
#
# Copyright (c) 2003-2004 by Fredrik Lundh. All rights reserved.
#
# fredrik@pythonware.com
# http://www.pythonware... |
mattray/stackalytics | refs/heads/master | tests/unit/test_data.py | 12 | # Copyright (c) 2013 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... |
wisechengyi/pants | refs/heads/master | pants-plugins/tests/python/internal_backend_test/utilities/test_releases.py | 2 | # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import unittest
from packaging.version import InvalidVersion, Version
from internal_backend.utilities.register import PantsReleases
def _branch_name(revision_str):
return PantsRele... |
savoirfairelinux/django | refs/heads/master | django/contrib/flatpages/sitemaps.py | 729 | from django.apps import apps as django_apps
from django.contrib.sitemaps import Sitemap
from django.core.exceptions import ImproperlyConfigured
class FlatPageSitemap(Sitemap):
def items(self):
if not django_apps.is_installed('django.contrib.sites'):
raise ImproperlyConfigured("FlatPageSitemap ... |
Chilledheart/gyp | refs/heads/master | test/actions-subdir/src/make-file.py | 489 | #!/usr/bin/env python
# Copyright (c) 2009 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.
import sys
contents = 'Hello from make-file.py\n'
open(sys.argv[1], 'wb').write(contents)
|
ratpack/FrameworkBenchmarks | refs/heads/master | frameworks/Scala/play2-scala/setup_scala_slick.py | 3 |
# This file was generated by frameworks/Java/play2-java/generate_config.py.
# Do not edit this file directly, use the script to regenerate.
from .setup_common import make_setup_for_dir
make_setup_for_dir(globals(), 'play2-scala-slick')
|
sander76/home-assistant | refs/heads/dev | homeassistant/components/supla/cover.py | 15 | """Support for Supla cover - curtains, rollershutters, entry gate etc."""
import logging
from pprint import pformat
from homeassistant.components.cover import (
ATTR_POSITION,
DEVICE_CLASS_GARAGE,
CoverEntity,
)
from homeassistant.components.supla import (
DOMAIN,
SUPLA_COORDINATORS,
SUPLA_SERV... |
gurneyalex/stock-logistics-workflow | refs/heads/8.0 | stock_scanner/demo/Tutorial/Step_types/scanner_scenario_step_step_types_final.py | 7 | # flake8: noqa
# Use <m> or <message> to retrieve the data transmitted by the scanner.
# Use <t> or <terminal> to retrieve the running terminal browse record.
# Put the returned action code in <act>, as a single character.
# Put the returned result or message in <res>, as a list of strings.
# Put the returned value in ... |
Squarespace/graphite-web | refs/heads/master | examples/example-client.py | 73 | #!/usr/bin/python
"""Copyright 2008 Orbitz WorldWide
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... |
arnavd96/Cinemiezer | refs/heads/master | myvenv/lib/python3.4/site-packages/oauth2_provider/__init__.py | 3 | __version__ = '0.10.0'
__author__ = "Massimiliano Pippi & Federico Frenguelli"
default_app_config = 'oauth2_provider.apps.DOTConfig'
VERSION = __version__ # synonym
|
glouppe/scikit-learn | refs/heads/master | examples/semi_supervised/plot_label_propagation_structure.py | 45 | """
==============================================
Label Propagation learning a complex structure
==============================================
Example of LabelPropagation learning a complex internal structure
to demonstrate "manifold learning". The outer circle should be
labeled "red" and the inner circle "blue". Be... |
salguarnieri/intellij-community | refs/heads/master | python/testData/quickdoc/HoverOverClass.py | 83 | class A(object):
"Doc of A"
pass
class B(A):
"Doc of B"
pass
<the_ref>A
|
intk/bda.plone.molliepayment | refs/heads/master | src/bda/plone/molliepayment/__init__.py | 1 | from bda.plone.shop import message_factory as _
from zope import schema
from plone.supermodel import model
from zope.interface import Interface
from zope.interface import provider
from bda.plone.shop.interfaces import IShopSettingsProvider
#from zope.interface import Attribute
@provider(IShopSettingsProvider)
clas... |
DANCEcollaborative/forum-xblock | refs/heads/master | XBlock Integration Files/xdjangobb/xblock/lib/python2.7/site-packages/django/contrib/localflavor/mk/forms.py | 89 | from __future__ import absolute_import
import datetime
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import RegexField, Select
from django.utils.translation import ugettext_lazy as _
from django.contrib.localflavor.mk.mk_choices import MK_MUNICIPALI... |
llenfest/programingworkshop | refs/heads/master | Python/pytds/__init__.py | 8 | # use __init__.py to setup the namespace
import util
# will be able to call things in util using pytds
# import pytds
# pytds.util
|
DANCEcollaborative/forum-xblock | refs/heads/master | XBlock Integration Files/xdjangobb/xblock/lib/python2.7/site-packages/django/db/models/options.py | 92 | import re
from bisect import bisect
from django.conf import settings
from django.db.models.related import RelatedObject
from django.db.models.fields.related import ManyToManyRel
from django.db.models.fields import AutoField, FieldDoesNotExist
from django.db.models.fields.proxy import OrderWrt
from django.db.models.loa... |
npe9/emacs | refs/heads/master | test/automated/data/package/package-test-server.py | 24 | import sys
import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
HandlerClass = SimpleHTTPRequestHandler
ServerClass = BaseHTTPServer.HTTPServer
Protocol = "HTTP/1.0"
if sys.argv[1:]:
port = int(sys.argv[1])
else:
port = 8000
server_address = ('127.0.0.1', port)
HandlerClass.p... |
173210/Monarudo_GPU_M7 | refs/heads/4.4.2_dlxj | Documentation/target/tcm_mod_builder.py | 4981 | #!/usr/bin/python
# The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD
#
# Copyright (c) 2010 Rising Tide Systems
# Copyright (c) 2010 Linux-iSCSI.org
#
# Author: nab@kernel.org
#
import os, sys
import subprocess as sub
import string
import re
import optparse
tcm_dir = ""
fabric_ops... |
is210-faculty/is210-week-12-synthesizing | refs/heads/master | tests/test_smoke.py | 245 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Smoke test for test suite."""
# Import Python libs
import unittest
class SmokeTestCase(unittest.TestCase):
"""Test cases to ensure that the test suite is operational."""
def test_true(self):
"""Tests that True is True."""
self.assertTrue(True)... |
polyrabbit/polyglot | refs/heads/master | setup.py | 1 | from setuptools import setup, find_packages
# see https://github.com/GaretJax/i18n-utils/blob/master/setup.py
# and https://github.com/elastic/curator/blob/master/setup.py
setup(
name='polyglot',
version='0.1',
url='https://github.com/polyrabbit/polyglot',
license='MIT',
author='poly',
author_e... |
burrowsa/initdotpy | refs/heads/master | initdotpy/__init__.py | 1 | """The initdotpy package makes it simple to write __init__.py files that automatically include the package contents.
For example if you have an __init__.py that looks like::
import submodule1
import submodule2
import submodule3
import subpackage1
import subpackage2
import subpackage3
You can replace it with::
fr... |
yufengg/tensorflow | refs/heads/master | tensorflow/python/ops/gradients_test.py | 41 | # 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... |
ychfan/tensorflow | refs/heads/master | tensorflow/python/debug/wrappers/grpc_wrapper.py | 65 | # 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... |
lejubila/piGardenWeb | refs/heads/master | vendor/almasaeed2010/adminlte/bower_components/bootstrap-datepicker/docs/conf.py | 171 | # -*- coding: utf-8 -*-
#
# bootstrap-datepicker documentation build configuration file, created by
# sphinx-quickstart on Fri Aug 2 14:45:57 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
# autogenerated ... |
AdamWill/anaconda | refs/heads/master | tests/glade/check_mnemonics.py | 9 | #
# Copyright (C) 2015 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# This program is dis... |
rosmo/ansible | refs/heads/devel | test/units/modules/net_tools/nios/test_nios_network.py | 27 | # 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 in the hope that ... |
wemanuel/smry | refs/heads/master | smry/server-auth/ls/google-cloud-sdk/platform/gsutil/third_party/boto/boto/ec2/spotdatafeedsubscription.py | 152 | # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modi... |
yasinn/shadowsocks | refs/heads/master | shadowsocks/encrypt.py | 990 | #!/usr/bin/env python
#
# Copyright 2012-2015 clowwindy
#
# 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... |
TshepangRas/tshilo-dikotla | refs/heads/develop | td_maternal/admin/maternal_diagnoses_admin.py | 2 | from django.contrib import admin
from ..forms import MaternalDiagnosesForm
from ..models import MaternalDiagnoses
from .base_maternal_model_admin import BaseMaternalModelAdmin
class MaternalDiagnosesAdmin(BaseMaternalModelAdmin):
form = MaternalDiagnosesForm
list_display = ('maternal_visit', 'new_diagnoses'... |
juliakreutzer/bandit-neuralmonkey | refs/heads/master | neuralmonkey/trainers/__init__.py | 1 | from .cross_entropy_trainer import CrossEntropyTrainer
|
2mf/moto | refs/heads/master | moto/ec2/urls.py | 18 | from __future__ import unicode_literals
from .responses import EC2Response
url_bases = [
"https?://ec2.(.+).amazonaws.com",
]
url_paths = {
'{0}/': EC2Response.dispatch,
}
|
ProgVal/cjdns | refs/heads/master | node_build/dependencies/libuv/build/gyp/test/win/gyptest-macro-vcinstalldir.py | 344 | #!/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.
"""
Make sure macro expansion of $(VCInstallDir) is handled, and specifically
always / terminated for compatibility.
"""
import TestGyp
im... |
puracore/pura | refs/heads/master | qa/rpc-tests/getchaintips.py | 66 | #!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Exercise the getchaintips API. We introduce a network split, work
# on chains of different lengths, an... |
chudaol/edx-platform | refs/heads/master | lms/djangoapps/dashboard/management/commands/tests/test_git_add_course.py | 101 | """
Provide tests for git_add_course management command.
"""
import logging
import os
import shutil
import StringIO
import subprocess
import unittest
from django.conf import settings
from django.core.management import call_command
from django.core.management.base import CommandError
from django.test.utils import overr... |
carnal0wnage/pupy | refs/heads/master | pupy/pupylib/PupyService.py | 33 | # -*- coding: UTF8 -*-
# --------------------------------------------------------------
# Copyright (c) 2015, Nicolas VERDIER (contact@n1nj4.eu)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
#
#... |
edx/lettuce | refs/heads/master | lettuce/django/steps/models.py | 6 | """
Step definitions for working with Django models.
"""
from datetime import datetime
import re
from django.core.management import call_command
from django.core.management.color import no_style
from django.db import connection
try:
from django.db.models.loading import get_models
except ImportError:
from djan... |
CivicKnowledge/metaeditor | refs/heads/master | accounts/tests/test_models.py | 1 | # -*- coding: utf-8 -*-
import fudge
from django.contrib.auth.models import User
from django.test import TestCase
class SendSuccessRegistrationTest(TestCase):
@fudge.patch(
'accounts.models.mail_admins')
def test_sends_email_on_user_creation(self, fake_mail):
fake_mail.expects_call()
... |
dash-dash/AutobahnPython | refs/heads/master | examples/twisted/websocket/streaming/frame_based_server.py | 2 | ###############################################################################
#
# The MIT License (MIT)
#
# Copyright (c) Tavendo GmbH
#
# 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 Softw... |
hammertoe/didactic-spork | refs/heads/master | lib/flask/testsuite/test_apps/blueprintapp/apps/frontend/__init__.py | 629 | from flask import Blueprint, render_template
frontend = Blueprint('frontend', __name__, template_folder='templates')
@frontend.route('/')
def index():
return render_template('frontend/index.html')
|
aESeguridad/GERE | refs/heads/master | venv/lib/python2.7/site-packages/pip/_vendor/pyparsing.py | 49 | # module pyparsing.py
#
# Copyright (c) 2003-2015 Paul T. McGuire
#
# 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, cop... |
andymckay/addons-server | refs/heads/master | src/olympia/accounts/tests/test_serializers.py | 7 | from olympia.amo.tests import BaseTestCase
from olympia.accounts.serializers import UserProfileSerializer
from olympia.users.models import UserProfile
class TestAccountSerializer(BaseTestCase):
def setUp(self):
self.user = UserProfile.objects.create(email='a@m.o')
def test_picture_url(self):
... |
ErykB2000/home-assistant | refs/heads/master | tests/test_component_media_player.py | 4 | """
tests.test_component_media_player
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tests media_player component.
"""
# pylint: disable=too-many-public-methods,protected-access
import logging
import unittest
import homeassistant as ha
from homeassistant.const import (
STATE_OFF,
SERVICE_TURN_ON, SERVICE_TURN_OFF, SERVICE... |
emk/pyjamas | refs/heads/master | library/pyjamas/chart/TouchedPointUpdateOption.py | 6 | """
* Copyright 2007,2008,2009 John C. Gunther
* Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
*
* 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/lic... |
sklnet/opendroid-enigma2 | refs/heads/master | lib/python/Screens/ScanSetup.py | 2 | from Screen import Screen
from ServiceScan import ServiceScan
from Components.config import config, ConfigSubsection, ConfigSelection, ConfigYesNo, ConfigInteger, getConfigListEntry, ConfigSlider, ConfigEnableDisable
from Components.ActionMap import NumberActionMap, ActionMap
from Components.ConfigList import ConfigLis... |
TribeMedia/sky_engine | refs/heads/master | sky/tools/webkitpy/common/system/zipfileset_mock.py | 167 | # Copyright (C) 2011 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... |
fadhiilrachman/line-py | refs/heads/master | setup.py | 1 | # -*- coding: utf-8 -*-
"""
LINE Python -- LINE Messaging's private API
=========================================
>>> from linepy import *
Links
`````
* `GitHub repository <https://github.com/fadhiilrachman/line-py>`_
"""
from __future__ import with_statement
import re, codecs
try:
from setuptools import s... |
sergei-maertens/django | refs/heads/master | tests/flatpages_tests/test_templatetags.py | 67 | from django.contrib.auth.models import AnonymousUser, User
from django.contrib.flatpages.models import FlatPage
from django.contrib.sites.models import Site
from django.template import Context, Template, TemplateSyntaxError
from django.test import TestCase
class FlatpageTemplateTagTests(TestCase):
@classmethod
... |
yask123/django | refs/heads/master | tests/custom_lookups/tests.py | 177 | from __future__ import unicode_literals
import contextlib
import time
import unittest
from datetime import date, datetime
from django.core.exceptions import FieldError
from django.db import connection, models
from django.test import TestCase, override_settings
from django.utils import timezone
from .models import Au... |
maxamillion/product-definition-center | refs/heads/master | pdc/apps/repository/migrations/0002_auto_20150512_0724.py | 8 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015 Red Hat
# Licensed under The MIT License (MIT)
# http://opensource.org/licenses/MIT
#
from __future__ import unicode_literals
from django.db import models, migrations
def create(apps, model_name, data):
model = apps.get_model('repository', model_name)
for item i... |
fatiherikli/dbpatterns | refs/heads/master | web/dbpatterns/notifications/views.py | 1 | import json
from itertools import imap
from pymongo import DESCENDING
from django.http import HttpResponse
from django.views.generic import ListView
from notifications.models import Notification
class NotificationListView(ListView):
template_name = "notifications/list.html"
ajax_template_name = "notificati... |
sublime1809/django | refs/heads/master | django/contrib/auth/apps.py | 79 | from django.apps import AppConfig
from django.core import checks
from django.contrib.auth.checks import check_user_model
from django.utils.translation import ugettext_lazy as _
class AuthConfig(AppConfig):
name = 'django.contrib.auth'
verbose_name = _("Authentication and Authorization")
def ready(self):... |
SamuelMarks/kubernetes | refs/heads/master | cluster/juju/charms/trusty/kubernetes/hooks/lib/registrator.py | 97 | #!/usr/bin/env python
# Copyright 2015 The Kubernetes 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
#
# Unle... |
ep1cman/workload-automation | refs/heads/master | wlauto/external/daq_server/src/daqpower/common.py | 9 | # Copyright 2014-2015 ARM Limited
#
# 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 w... |
leiferikb/bitpop | refs/heads/master | src/chrome/common/extensions/docs/server2/reference_resolver_test.py | 8 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import unittest
from future import Future
from reference_resolver import ReferenceResolver
from test_object_store import... |
yencarnacion/jaikuengine | refs/heads/master | .google_appengine/lib/django-1.4/django/contrib/messages/storage/cookie.py | 83 | from django.conf import settings
from django.contrib.messages.storage.base import BaseStorage, Message
from django.http import SimpleCookie
from django.utils import simplejson as json
from django.utils.crypto import salted_hmac, constant_time_compare
class MessageEncoder(json.JSONEncoder):
"""
Compactly seria... |
kdwink/intellij-community | refs/heads/master | python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicate_after.py | 80 | def foo(a, p):
pass
foo(1, p=2)
|
alexthered/kienhoc-platform | refs/heads/master | lms/djangoapps/psychometrics/models.py | 150 | #
# db model for psychometrics data
#
# this data is collected in real time
#
from django.db import models
from courseware.models import StudentModule
class PsychometricData(models.Model):
"""
This data is a table linking student, module, and module performance,
including number of attempts, grade, max g... |
Acehaidrey/incubator-airflow | refs/heads/master | tests/test_utils/azure_system_helpers.py | 2 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
196510921/openwrt-mtk | refs/heads/master | tools/b43-tools/files/b43-fwsquash.py | 497 | #!/usr/bin/env python
#
# b43 firmware file squasher
# Removes unnecessary firmware files
#
# Copyright (c) 2009 Michael Buesch <mb@bu3sch.de>
#
# Licensed under the GNU/GPL version 2 or (at your option) any later version.
#
import sys
import os
def usage():
print("Usage: %s PHYTYPES COREREVS /path/to/extracted/firm... |
jkimbo/freight | refs/heads/master | freight/api/serializer/base.py | 1 | from __future__ import absolute_import, unicode_literals
__all__ = ['Serializer']
class Serializer(object):
def __call__(self, *args, **kwargs):
return self.serialize(*args, **kwargs)
def get_attrs(self, item_list):
return {}
def serialize(self, item, attrs):
return {}
def ... |
CodingVault/LeetCodeInPython | refs/heads/master | clone_graph.py | 1 | #!/usr/bin/env python
# encoding: utf-8
"""
clone_graph.py
Created by Shengwei on 2014-07-13.
"""
# https://oj.leetcode.com/problems/clone-graph/
# tags: easy / medium, graph, hashtable, recursion, copy, dfs
"""
Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.
OJ's un... |
marcel-dancak/QGIS | refs/heads/master | scripts/qgis_fixes/fix_paren.py | 77 | from lib2to3.fixes.fix_paren import FixParen
|
cebrusfs/217gdb | refs/heads/master | pwndbg/constants/arm.py | 10 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from .constant import Constant
__NR_OABI_SYSCALL_BASE = Constant('__NR_OABI_SYSCALL_BASE',0x900000)
__NR_SYSCALL_BASE = Con... |
arjunbm13/youtube-dl | refs/heads/master | youtube_dl/extractor/ruhd.py | 149 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from .common import InfoExtractor
class RUHDIE(InfoExtractor):
_VALID_URL = r'http://(?:www\.)?ruhd\.ru/play\.php\?vid=(?P<id>\d+)'
_TEST = {
'url': 'http://www.ruhd.ru/play.php?vid=207',
'md5': 'd1a9ec4edf8598e3fbd92bb16072ba83'... |
Soolo-ss/Solo | refs/heads/master | Plugins/libevent-master/event_rpcgen.py | 1 | #!/usr/bin/env python
#
# Copyright (c) 2005-2007 Niels Provos <provos@citi.umich.edu>
# Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
# All rights reserved.
#
# Generates marshaling code based on libevent.
# TODO:
# 1) use optparse to allow the strategy shell to parse options, and
# to allow the instanti... |
hurricup/intellij-community | refs/heads/master | python/helpers/coverage_runner/__init__.py | 981 | __author__ = 'traff'
|
fidomason/kbengine | refs/heads/master | kbe/src/lib/python/Lib/distutils/command/check.py | 78 | """distutils.command.check
Implements the Distutils 'check' command.
"""
from distutils.core import Command
from distutils.errors import DistutilsSetupError
try:
# docutils is installed
from docutils.utils import Reporter
from docutils.parsers.rst import Parser
from docutils import frontend
from d... |
phonnz/azure-storage-python | refs/heads/master | tests/doctest_queueservice.py | 2 | #-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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.apa... |
Paul-Ezell/cinder-1 | refs/heads/master | cinder/api/v2/volume_metadata.py | 15 | # Copyright 2013 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... |
movmov/cc | refs/heads/master | vendor/Twisted-10.0.0/twisted/protocols/sip.py | 59 | # -*- test-case-name: twisted.test.test_sip -*-
# Copyright (c) 2001-2009 Twisted Matrix Laboratories.
# See LICENSE for details.
"""Session Initialization Protocol.
Documented in RFC 2543.
[Superceded by 3261]
This module contains a deprecated implementation of HTTP Digest authentication.
See L{twisted.cred.cred... |
ds-hwang/chromium-crosswalk | refs/heads/master | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py | 48 | # Copyright (C) 2010 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 ... |
weimingtom/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/test/test_html.py | 89 | """
Tests for the html module functions.
"""
import html
import unittest
from test.support import run_unittest
class HtmlTests(unittest.TestCase):
def test_escape(self):
self.assertEqual(
html.escape('\'<script>"&foo;"</script>\''),
''<script>"&foo;"</s... |
davidmueller13/Vindicator-flo-aosp | refs/heads/master | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 12527 | # Util.py - Python extension for perf script, miscellaneous utility code
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
import errno, os
FUTEX_WAIT = 0... |
LynxyssCZ/Flexget | refs/heads/develop | flexget/api/core/tasks.py | 2 | from __future__ import unicode_literals, division, absolute_import
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
import argparse
import cgi
import copy
from datetime import datetime, timedelta
from json import JSONEncoder
from flask import jsonify, Response, request
from flask_restpl... |
mrkm4ntr/incubator-airflow | refs/heads/master | airflow/contrib/sensors/gcs_sensor.py | 7 | #
# 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... |
OLIMEX/linux-3.12.10-ti2013.12.01-am3352_som | refs/heads/master | Documentation/target/tcm_mod_builder.py | 88 | #!/usr/bin/python
# The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD
#
# Copyright (c) 2010 Rising Tide Systems
# Copyright (c) 2010 Linux-iSCSI.org
#
# Author: nab@kernel.org
#
import os, sys
import subprocess as sub
import string
import re
import optparse
tcm_dir = ""
fabric_ops... |
slevenhagen/odoo | refs/heads/8.0 | addons/hw_scale/__openerp__.py | 220 | # -*- 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... |
c0defreak/python-for-android | refs/heads/master | python-modules/twisted/twisted/trial/test/mockcustomsuite.py | 87 | # Copyright (c) 2006 Twisted Matrix Laboratories. See LICENSE for details
"""
Mock test module that contains a C{test_suite} method. L{runner.TestLoader}
should load the tests from the C{test_suite}, not from the C{Foo} C{TestCase}.
See {twisted.trial.test.test_loader.LoaderTest.test_loadModuleWith_test_suite}.
"""
... |
laiqiqi886/kbengine | refs/heads/master | kbe/src/lib/python/Lib/xmlrpc/client.py | 69 | #
# XML-RPC CLIENT LIBRARY
# $Id$
#
# an XML-RPC client interface for Python.
#
# the marshalling and response parser code can also be used to
# implement XML-RPC servers.
#
# Notes:
# this version is designed to work with Python 2.1 or newer.
#
# History:
# 1999-01-14 fl Created
# 1999-01-15 fl Changed dateTime to u... |
Flimm/linkchecker | refs/heads/master | linkcheck/gui/linkchecker_ui_options.py | 8 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui/options.ui'
#
# Created: Fri Feb 28 21:24:59 2014
# by: PyQt4 UI code generator 4.9.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except Attr... |
jahrome/viper | refs/heads/master | viper/common/abstracts.py | 3 | # This file is part of Viper - https://github.com/viper-framework/viper
# See the file 'LICENSE' for copying permission.
import argparse
class ArgumentErrorCallback(Exception):
def __init__(self, message, level=''):
self.message = message.strip() + '\n'
self.level = level.strip()
def __str_... |
utarsuno/urbtek | refs/heads/dev | universal_code/excel/excel_file_generator.py | 1 | # coding=utf-8
"""
This module, excel_file_generator.py, will be used to generate Excel files.
"""
# This is for creating a new file, I just want to modify an existing template excel file though.
'''
import xlsxwriter
workbook = xlsxwriter.Workbook('hello_world.xlsx')
hours_worksheet = workbook.add_worksheet('Hours... |
fafaschiavo/lol-api-webapp | refs/heads/master | lolapiwebapp/stock/apps.py | 5 | from __future__ import unicode_literals
from django.apps import AppConfig
class StockConfig(AppConfig):
name = 'stock'
|
epfl-mobots/epuck2-aseba | refs/heads/master | maintainer/updatedoc/wikidot/tree.py | 9 | # Aseba - an event-based framework for distributed robot control
# Copyright (C) 2007--2011:
# Stephane Magnenat <stephane at magnenat dot net>
# (http://stephane.magnenat.net)
# and other contributors, see authors.txt for details
#
# This program is free software: you can redistribu... |
tensorflow/datasets | refs/heads/master | tensorflow_datasets/core/features/video_feature_test.py | 1 | # coding=utf-8
# Copyright 2021 The TensorFlow Datasets Authors.
#
# 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 appl... |
AlmostBetterNetwork/pinecast | refs/heads/master | podcasts/migrations/0024_auto_20161127_1935.py | 3 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-11-27 19:35
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('podcasts', '0023_auto_20161026_0131'),
]
operations = [
migrations.AlterFie... |
artefactual/archivematica-history | refs/heads/master | src/archivematicaCommon/lib/externals/pyes/contrib/mappings.py | 5 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pyes.es import ES
from pyes import mappings
def mappings_to_code(obj, doc_count=0):
result = []
odict = obj.as_dict()
if isinstance(obj, (mappings.DocumentObjectField, mappings.ObjectField, mappings.NestedObject)):
properties = odict.pop("propertie... |
runekaagaard/django-contrib-locking | refs/heads/master | tests/validation/models.py | 139 | from __future__ import unicode_literals
from datetime import datetime
from django.core.exceptions import ValidationError
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
def validate_answer_to_universe(value):
if value != 42:
raise ValidationError('This is not t... |
hydroshare/hydroshare_temp | refs/heads/master | hs_party/forms/__init__.py | 4 | __author__ = 'valentin'
|
axelbellec/chronos | refs/heads/master | chronos/__init__.py | 1 | # coding: utf-8
__project__ = 'chronos'
__author__ = 'Axel Bellec'
__licence__ = 'MIT'
__version__ = '0.0.2'
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.