repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
dbrattli/RxPY | refs/heads/master | tests/test_observable/test_ignoreelements.py | 1 | import unittest
from rx.observable import Observable
from rx.testing import TestScheduler, ReactiveTest
from rx.disposables import Disposable, SerialDisposable
on_next = ReactiveTest.on_next
on_completed = ReactiveTest.on_completed
on_error = ReactiveTest.on_error
subscribe = ReactiveTest.subscribe
subscribed = React... |
steedos/odoo7 | refs/heads/master | openerp/addons/web_tests_demo/__openerp__.py | 68 | {
'name': "Demonstration of web/javascript tests",
'category': 'Hidden',
'description': """
OpenERP Web demo of a test suite
================================
Test suite example, same code as that used in the testing documentation.
""",
'depends': ['web'],
'js': ['static/src/js/demo.js'],
't... |
zentner-kyle/servo | refs/heads/master | tests/wpt/css-tests/tools/html5lib/utils/spider.py | 436 | #!/usr/bin/env python
"""Spider to try and find bugs in the parser. Requires httplib2 and elementtree
usage:
import spider
s = spider.Spider()
s.spider("http://www.google.com", maxURLs=100)
"""
import urllib.request, urllib.error, urllib.parse
import urllib.robotparser
import md5
import httplib2
import html5lib
fro... |
haakenlid/django-extensions | refs/heads/master | tests/testapp/scripts/error_script.py | 3 | # -*- coding: utf-8 -*-
def run():
raise Exception
|
jfisher-usgs/DigitalLibrary | refs/heads/master | dateTime.py | 1 | ## Script (Python) "dateTime"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=name, datetime=None, includeTime=True, cssParent=''
##title=
##
import DateTime
Month = [None, 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep... |
puzan/ansible | refs/heads/devel | lib/ansible/plugins/lookup/file.py | 131 | # (c) 2012, 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... |
SujaySKumar/pythondotorg | refs/heads/master | pages/tests/test_models.py | 10 | import ddt
import unittest
from .base import BasePageTests
from .. import admin # coverage FTW
from ..models import Page, PAGE_PATH_RE
class PageModelTests(BasePageTests):
def test_published(self):
self.assertQuerysetEqual(Page.objects.published(), ['<Page: One>'])
def test_draft(self):
... |
meh/servo | refs/heads/master | tests/wpt/css-tests/tools/webdriver/webdriver/capabilities.py | 263 | """Definition of various capability-related constants."""
class Capability:
"""Standard capability names."""
BROWSER_NAME = 'browserName'
BROWSER_VERSION = 'browserVersion'
PAGE_LOADING_STRATEGY = 'pageLoadingStrategy'
PLATFORM_NAME = 'platformName'
PLATFORM_VERSION = 'platformVersion'
SECU... |
zachmullen/boto | refs/heads/develop | boto/file/key.py | 153 | # Copyright 2010 Google Inc.
# Copyright (c) 2011, Nexenta Systems Inc.
#
# 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... |
bigswitch/nova | refs/heads/master | nova/tests/unit/volume/encryptors/test_base.py | 69 | # Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory
# 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/... |
girder/girder | refs/heads/master | girder/models/upload.py | 2 | # -*- coding: utf-8 -*-
import datetime
import io
from bson.objectid import ObjectId
from girder import events, logger
from girder.api import rest
from .model_base import Model
from girder.exceptions import GirderException, ValidationException, NoAssetstoreAdapter
from girder.settings import SettingKey
from girder.uti... |
anhlt/twitter_cli | refs/heads/master | tests/test_tweets_buffer.py | 1 | from nose.tools import raises
from twitter_cli.tweets_buffer import BaseContext, TweetsBuffer
from twitter_cli.application import Application
class TestTweetsBuffer(object):
"""docstring for TestTweetsBuffer"""
def setUp(self):
class DumpContext(BaseContext):
def read(self):
... |
torquemad/pixelated-user-agent | refs/heads/master | service/pixelated/adapter/search/index_storage_key.py | 9 | #
# Copyright (c) 2015 ThoughtWorks, Inc.
#
# Pixelated 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 your option) any later version.
#
# Pixelated is distrib... |
akintoey/django | refs/heads/master | tests/template_tests/alternate_urls.py | 452 | from django.conf.urls import url
from . import views
urlpatterns = [
# View returning a template response
url(r'^template_response_view/$', views.template_response_view),
# A view that can be hard to find...
url(r'^snark/', views.snark, name='snark'),
]
|
boundlessgeo/qgis-webappbuilder-plugin | refs/heads/master | webappbuilder/widgets/loadingpanel/loadingpanel.py | 1 | from webappbuilder.webbappwidget import WebAppWidget
from PyQt4.QtGui import QIcon
import os
class LoadingPanel(WebAppWidget):
_parameters = {}
def write(self, appdef, folder, app, progress):
app.panels.append('''React.createElement(LoadingPanel, {map:map})''')
self.addReactComponent(app, "Lo... |
josthkko/ggrc-core | refs/heads/develop | test/integration/ggrc_workflows/notifications/test_one_time_wf_decline_accept_tasks.py | 6 | # Copyright (C) 2016 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
from datetime import date
from datetime import datetime
from freezegun import freeze_time
from mock import patch
from sqlalchemy import and_
from ggrc.app import db
from ggrc.models import Notification
fro... |
Pajinek/spacewalk | refs/heads/master | client/debian/packages-already-in-debian/rhn-client-tools/src/up2date_client/clientCaps.py | 4 |
# a dict with "capability name" as the key, and the version
# as the value.
import UserDict
import glob
import os
from capabilities import parseCap
class ClientCapabilities(UserDict.UserDict):
def __init__(self):
UserDict.UserDict.__init__(self)
self.populate()
def populate(self, capsToPopu... |
UrQA/URQA-Server | refs/heads/master | external/google-breakpad/src/testing/scripts/generator/cpp/tokenize.py | 679 | #!/usr/bin/env python
#
# Copyright 2007 Neal Norwitz
# Portions 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... |
LEXmono/q | refs/heads/master | bot/commands/nasa.py | 1 | import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
import os
from datetime import datetime
import random
from bot.command_map import command_map
# Retry method for Python Requests.
def requests_retry_session(
retries=3,
backoff_factor=0.3,
... |
alvarolopez/nova | refs/heads/master | nova/api/openstack/compute/contrib/user_quotas.py | 100 | # 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 requ... |
savoirfairelinux/pipo | refs/heads/master | pipo.py | 2 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
pipo is a pip wrapper and utility belt to handle OpenERP installations
It extends pip, providing all it's functions plus the following:
setup generate the setpup.py file
build generate and run setup.py to create source dist
"""
# from __future__ im... |
TeamJB/kernel_samsung_smdk4412 | refs/heads/cm-11.0 | tools/perf/scripts/python/check-perf-trace.py | 11214 | # perf script event handlers, generated by perf script -g python
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# This script tests basic functionality such as flag and symbol
# strings, common_xxx() calls back into perf, begin, end, unhandled
# events, etc. ... |
cs-cordero/Flappy-Bird | refs/heads/master | flappybird.py | 1 | '''
===============================================================================
Creator: Christopher Sabater Cordero
Original: Nguyen Ha Dong
Date Started: 12/30/2015
File: Flappy Bird Clone
Notice: (c) Copyright 2015 by Christopher Sabater Cordero All Rights Reserved.
=============================================... |
burakgon/E7_Elite_kernel | refs/heads/master | kernel/tools/perf/scripts/python/check-perf-trace.py | 11214 | # perf script event handlers, generated by perf script -g python
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# This script tests basic functionality such as flag and symbol
# strings, common_xxx() calls back into perf, begin, end, unhandled
# events, etc. ... |
ecederstrand/django | refs/heads/master | tests/test_client_regress/models.py | 513 | from django.contrib.auth.models import AbstractBaseUser, BaseUserManager
from django.db import models
class CustomUser(AbstractBaseUser):
email = models.EmailField(verbose_name='email address', max_length=255, unique=True)
custom_objects = BaseUserManager()
USERNAME_FIELD = 'email'
class Meta:
... |
chemelnucfin/tensorflow | refs/heads/master | tensorflow/python/autograph/core/converter.py | 5 | # 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... |
sosguns2002/interactive-mining | refs/heads/master | interactive-mining-3rdparty-madis/madis/src/functions/aggregate/partialsort.py | 5 | import functions
import operator
class partialsort:
"""
.. function:: partialsort(n,col1,col2,col3,....)
sorts the first n columns of its input
:Returned multiset schema:
Columns are automatically named as col1, col2 ...
Examples:
>>> table1('''
... aa 43
... ac 34
.... |
uberamd/NGECore2 | refs/heads/master | scripts/object/tangible/wearables/robe/exar_cultist_hood_up_f.py | 85615 | import sys
def setup(core, object):
return |
agry/NGECore2 | refs/heads/master | scripts/object/weapon/melee/2h_sword/crafted_saber/sword_lightsaber_two_handed_gcw_s01_gen5.py | 85615 | import sys
def setup(core, object):
return |
ProjectSWGCore/NGECore2 | refs/heads/master | scripts/object/draft_schematic/weapon/rifle_lightning_basic.py | 85615 | import sys
def setup(core, object):
return |
alekhin0w/unicorn | refs/heads/master | bindings/const_generator.py | 6 | # Unicorn Engine
# By Dang Hoang Vu, 2013
from __future__ import print_function
import sys, re, os
INCL_DIR = os.path.join('..', 'include', 'unicorn')
include = [ 'arm.h', 'arm64.h', 'mips.h', 'x86.h', 'sparc.h', 'm68k.h', 'unicorn.h' ]
template = {
'python': {
'header': "# For Unicorn Engine. AUTO-G... |
jlspyaozhongkai/Uter | refs/heads/master | third_party_build/Python-2.7.9/lib/python2.7/lib2to3/pygram.py | 320 | # Copyright 2006 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Export the Python grammar and symbols."""
# Python imports
import os
# Local imports
from .pgen2 import token
from .pgen2 import driver
from . import pytree
# The grammar file
_GRAMMAR_FILE = os.path.join(os.path.... |
mscuthbert/abjad | refs/heads/master | abjad/tools/timespantools/timespan_2_overlaps_all_of_timespan_1.py | 2 | # -*- encoding: utf-8 -*-
def timespan_2_overlaps_all_of_timespan_1(
timespan_1=None,
timespan_2=None,
hold=False,
):
r'''Makes time relation indicating that `timespan_2` overlaps
all of `timespan_1`.
::
>>> relation = timespantools.timespan_2_overlaps_all_of_timespan_1()
... |
Bismarrck/tensorflow | refs/heads/master | tensorflow/python/keras/activations.py | 4 | # 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... |
BenoitDherin/data-analysis-with-R | refs/heads/master | website/plugins/read_more_link/__init__.py | 73 | from .read_more_link import * |
Linutronix/linux | refs/heads/master | tools/testing/kunit/kunit.py | 204 | #!/usr/bin/env python3
# SPDX-License-Identifier: GPL-2.0
#
# A thin wrapper on top of the KUnit Kernel
#
# Copyright (C) 2019, Google LLC.
# Author: Felix Guo <felixguoxiuping@gmail.com>
# Author: Brendan Higgins <brendanhiggins@google.com>
import argparse
import sys
import os
import time
from collections import nam... |
mailchuck/PyBitmessage | refs/heads/master | src/bitmessageqt/networkstatus.py | 4 | from PyQt4 import QtCore, QtGui
import time
import shared
from tr import _translate
import l10n
from retranslateui import RetranslateMixin
from uisignaler import UISignaler
import widgets
class NetworkStatus(QtGui.QWidget, RetranslateMixin):
def __init__(self, parent=None):
super(NetworkStatus, self).__in... |
JetStarBlues/Nand-2-Tetris | refs/heads/master | PlayArea/OtherExperiments/ShiftRegisters/bidirectional.py | 1 | ''''''''''''''''''''''''''' imports '''''''''''''''''''''''''''''
# Built ins
import sys
# Computer files
sys.path.append('../../Modules')
from _1__elementaryGates import *
from _2__arithmeticGates import *
from _3__clock import *
from _4__flipFlops import *
''''''''''''''''''''''''' helpers '''''''''''''''''''''''... |
SphinxKnight/kuma | refs/heads/master | kuma/dashboards/tests/test_views.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
import json
import mock
import pytest
from django.contrib.auth.models import Group, Permission
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ImproperlyConfigured
from django.utils.translatio... |
lolsteve/siapy | refs/heads/master | sia_test.py | 1 | import unittest
from siapy import Sia
class SiaTest(unittest.TestCase):
def test_get_version(self):
sia = Sia()
self.assertEqual(sia.get_version(), '1.0.4')
if __name__ == '__main__':
unittest.main()
|
absoludity/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/wptserve/wptserve/handlers.py | 87 | import cgi
import json
import os
import traceback
import urllib
import urlparse
from .constants import content_types
from .pipes import Pipeline, template
from .ranges import RangeParser
from .request import Authentication
from .response import MultipartContent
from .utils import HTTPException
__all__ = ["file_handle... |
ntvis/tushare | refs/heads/master | tushare/futures/ctp/futures/__init__.py | 37 | # -*- coding: utf-8 -*-
from __future__ import absolute_import as _init
__author__ = 'lovelylain'
__version__ = '0.2.1'
__all__ = ['ApiStruct', 'MdApi', 'TraderApi']
if 0: from . import ApiStruct
class MdApi(object):
def Create(self, pszFlowPath='', bIsUsingUdp=False, bIsMulticast=False):
"""创建MdApi
... |
riga/luigi | refs/heads/master | test/other_module.py | 95 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... |
bzero/bitex | refs/heads/master | apps/pyblinktrade/pyblinktrade/test_signals.py | 2 | __author__ = 'rodrigo'
import unittest
from signals import Signal
signal_calls = []
def onSignalFunction(sender, data):
signal_calls.append( ( 'function', sender, data ) )
class A(object):
def onSignalMethod(self, sender, data):
signal_calls.append( ( 'A::onSignalMethod', sender, data ) )
class B(obje... |
ar45/django | refs/heads/master | tests/save_delete_hooks/models.py | 409 | """
Adding hooks before/after saving and deleting
To execute arbitrary code around ``save()`` and ``delete()``, just subclass
the methods.
"""
from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Person(... |
turbokongen/home-assistant | refs/heads/dev | homeassistant/components/dunehd/__init__.py | 15 | """The Dune HD component."""
import asyncio
from pdunehd import DuneHDPlayer
from homeassistant.const import CONF_HOST
from .const import DOMAIN
PLATFORMS = ["media_player"]
async def async_setup(hass, config):
"""Set up the Dune HD component."""
return True
async def async_setup_entry(hass, config_entr... |
minorg/pastpy | refs/heads/master | pastpy/impl/online/online_database_objects_list_item.py | 1 | from typing import NamedTuple, Optional
class OnlineDatabaseObjectsListItem(NamedTuple):
detail_href: str
record_type: str
title: str
thumbnail_url: Optional[str] = None
|
opena11y/fae2 | refs/heads/master | fae2/rules/models.py | 1 | """
Copyright 2014-2016 University of Illinois
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 writ... |
HeisenCore/heisen | refs/heads/master | heisen/core/log/external.py | 1 | from heisen.config import settings
def graylog(name, logger, formatter):
try:
import graypy
if name not in getattr(settings, 'EXTERNAL_LOGGERS', []):
return
graylog_config = getattr(settings, 'GRAYLOG', {})
if not graylog_config:
return
handler =... |
valkjsaaa/sl4a | refs/heads/master | python/gdata/samples/oauth/oauth_on_appengine/appengine_utilities/sessions.py | 128 | # -*- coding: utf-8 -*-
"""
Copyright (c) 2008, appengine-utilities project
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
... |
jclakkis/discus-inferno | refs/heads/master | flaskenv/lib/python2.7/site-packages/pip/commands/help.py | 401 | from pip.basecommand import Command, SUCCESS
from pip.exceptions import CommandError
class HelpCommand(Command):
"""Show help for commands"""
name = 'help'
usage = """
%prog <command>"""
summary = 'Show help for commands.'
def run(self, options, args):
from pip.commands import comma... |
batxes/4Cin | refs/heads/master | Six_mouse_models/Six_mouse_models_final_output_0.2_-0.1_11000/mtx1_models/Six_mouse_models29270.py | 6 | import _surface
import chimera
try:
import chimera.runCommand
except:
pass
from VolumePath import markerset as ms
try:
from VolumePath import Marker_Set, Link
new_marker_set=Marker_Set
except:
from VolumePath import volume_path_dialog
d= volume_path_dialog(True)
new_marker_set= d.new_marker_set
marker_set... |
dfeyer/TranslationTypo3Org | refs/heads/master | local_apps/pootle_misc/templatetags/baseurl.py | 6 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2008-2009 Zuza Software Foundation
#
# This file is part of Pootle.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2... |
LockScreen/Backend | refs/heads/master | venv/lib/python2.7/site-packages/boto/cloudsearchdomain/layer1.py | 134 | # Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# 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 ... |
MoamerEncsConcordiaCa/tensorflow | refs/heads/master | tensorflow/contrib/session_bundle/session_bundle_test.py | 133 | # 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... |
DreadPirateRobert/stock_visualiser | refs/heads/master | stock_visualiser_virtualenv/lib/python3.5/site-packages/pip/_vendor/cachecontrol/cache.py | 947 | """
The cache object API for implementing caches. The default is a thread
safe in-memory dictionary.
"""
from threading import Lock
class BaseCache(object):
def get(self, key):
raise NotImplemented()
def set(self, key, value):
raise NotImplemented()
def delete(self, key):
raise ... |
ArtezGDA/text-IO | refs/heads/master | Max/format.py | 2 | import my_data
d = my_data. my_room
print "i live in %s on the street %s, the postcode is %s, the opp is %d. The height of my room is %d, the length of my room is %d, the room has a width of %d, the room has %d benches and %d bureaus it has %d cabin and %d door. The room has %d windows and %d bed. " % (d ["plaats"], ... |
ptemplier/ansible | refs/heads/devel | test/units/modules/network/nuage/test_nuage_vspk.py | 21 | # -*- coding: utf-8 -*-
# (c) 2017, Nokia
# 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.
#... |
sergio-incaser/bank-payment | refs/heads/8.0 | account_banking_pain_base/migrations/8.0.0.2/post-migration.py | 11 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 Akretion (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the... |
gwpy/gwpy.github.io | refs/heads/master | docs/v0.3/examples/table/rate-1.py | 5 | from gwpy.table import EventTable
events = EventTable.read('H1-LDAS_STRAIN-968654552-10.xml.gz',
format='ligolw.sngl_burst', columns=['time', 'snr']) |
scue/vim-ycm_win7 | refs/heads/master | third_party/requests/requests/packages/chardet/sbcharsetprober.py | 2926 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... |
keedio/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/tests/custom_methods/models.py | 121 | """
3. Giving models custom methods
Any method you add to a model will be available to instances.
"""
import datetime
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Article(models.Model):
headline = models.CharField(max_length=100)
... |
x303597316/hue | refs/heads/master | desktop/core/src/desktop/management/commands/version.py | 37 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... |
jenalgit/django | refs/heads/master | tests/migrations/migrations_test_apps/unspecified_app_with_conflict/migrations/0002_second.py | 425 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("unspecified_app_with_conflict", "0001_initial")]
operations = [
migrations.DeleteModel("Tribble"),
migrations.RemoveField("Auth... |
mlcommons/training | refs/heads/master | object_detection/pytorch/maskrcnn_benchmark/modeling/utils.py | 1 | # Copyright (c) 2021, NVIDIA CORPORATION. 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 applic... |
Azure/azure-sdk-for-python | refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/aio/operations/_deployment_scripts_operations.py | 1 | # 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 may ... |
CCI-MOC/nova | refs/heads/k2k-liberty | nova/api/openstack/compute/schemas/multiple_create.py | 89 | # Copyright 2014 NEC Corporation. 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 ... |
ComputationalPhysics/atomify-lammps | refs/heads/dev | libs/lammps/tools/i-pi/ipi/inputs/forces.py | 41 | """Deals with creating the forcefield class.
Copyright (C) 2013, Joshua More and Michele Ceriotti
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option)... |
herow/planning_qgis | refs/heads/master | python/plugins/processing/algs/lidar/lastools/lascanopyPro.py | 9 | # -*- coding: utf-8 -*-
"""
***************************************************************************
lascanopyPro.py
---------------------
Date : October 2014
Copyright : (C) 2014 by Martin Isenburg
Email : martin near rapidlasso point com
**************... |
queenp/wakatime | refs/heads/master | setup.py | 4 | from setuptools import setup
from wakatime.__about__ import (
__author__,
__author_email__,
__description__,
__license__,
__title__,
__url__,
__version__,
)
packages = [
__title__,
]
setup(
name=__title__,
version=__version__,
license=__license__,
description=__descri... |
SiderZhang/p2pns3 | refs/heads/master | src/applications/bindings/callbacks_list.py | 331 | callback_classes = [
['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', ... |
tagliateller/openshift-ansible | refs/heads/master | roles/lib_utils/action_plugins/sanity_checks.py | 4 | """
Ansible action plugin to ensure inventory variables are set
appropriately and no conflicting options have been provided.
"""
import fnmatch
import json
import re
from ansible.plugins.action import ActionBase
from ansible import errors
# pylint: disable=import-error,no-name-in-module
from ansible.module_utils.six.m... |
firmlyjin/brython | refs/heads/master | www/tests/unittests/test/test_syntax.py | 87 | """This module tests SyntaxErrors.
Here's an example of the sort of thing that is tested.
>>> def f(x):
... global x
Traceback (most recent call last):
SyntaxError: name 'x' is parameter and global
The tests are all raise SyntaxErrors. They were created by checking
each C call that raises SyntaxError. There ar... |
p92camcj/practicas-is | refs/heads/master | Zibra_2/src/tests/gtest-1.7.0/test/gtest_xml_output_unittest.py | 1815 | #!/usr/bin/env python
#
# Copyright 2006, 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... |
HyperBaton/ansible | refs/heads/devel | test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_leaf_mu_flat_import.py | 66 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import json
import sys
import ansible_collections.testns.testcoll.plugins.module_utils.leaf
def main():
mu_result = ansible_collections.testns.testcoll.plugins.module_utils.leaf.thingtocall()
print(json... |
pratikmallya/hue | refs/heads/master | desktop/core/ext-py/simplejson/simplejson/tests/test_unicode.py | 123 | from unittest import TestCase
import simplejson as json
class TestUnicode(TestCase):
def test_encoding1(self):
encoder = json.JSONEncoder(encoding='utf-8')
u = u'\N{GREEK SMALL LETTER ALPHA}\N{GREEK CAPITAL LETTER OMEGA}'
s = u.encode('utf-8')
ju = encoder.encode(u)
js = en... |
ar7z1/ansible | refs/heads/devel | lib/ansible/modules/network/aos/_aos_blueprint.py | 55 | #!/usr/bin/python
#
# (c) 2017 Apstra Inc, <community@apstra.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 opt... |
AccentureMobilityServices/kernel | refs/heads/hostNativeOpenGL_release | tools/perf/scripts/python/sched-migration.py | 185 | #!/usr/bin/python
#
# Cpu task migration overview toy
#
# Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com>
#
# perf trace event handlers have been generated by perf trace -g python
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free ... |
saneyuki/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/third_party/hpack/hpack/exceptions.py | 49 | # -*- coding: utf-8 -*-
"""
hyper/http20/exceptions
~~~~~~~~~~~~~~~~~~~~~~~
This defines exceptions used in the HTTP/2 portion of hyper.
"""
class HPACKError(Exception):
"""
The base class for all ``hpack`` exceptions.
"""
pass
class HPACKDecodingError(HPACKError):
"""
An error has been enc... |
frank2/paranoia | refs/heads/master | lib/types/word.py | 1 | #!/usr/bin/env python
from paranoia.base.size import Size
from paranoia.meta.region import NumericRegion
from paranoia.meta.array import Array
__all__ = ['Word', 'WordArray']
class Word(NumericRegion):
SIZE = Size(bytes=2)
class WordArray(Array):
BASE_DECLARATION = Word
|
Codefans-fan/odoo | refs/heads/8.0 | addons/document/test_cindex.py | 444 | #!/usr/bin/python
import sys
import os
import glob
import time
import logging
from optparse import OptionParser
logging.basicConfig(level=logging.DEBUG)
parser = OptionParser()
parser.add_option("-q", "--quiet",
action="store_false", dest="verbose", default=True,
help="don't prin... |
adw0rd/lettuce | refs/heads/master | tests/integration/lib/Django-1.2.5/tests/regressiontests/dispatch/__init__.py | 277 | """Unit-tests for the dispatch project
"""
|
canhhs91/greenpointtrees | refs/heads/master | src/oscar/apps/dashboard/reviews/app.py | 49 | from django.conf.urls import url
from oscar.core.application import Application
from oscar.core.loading import get_class
class ReviewsApplication(Application):
name = None
default_permissions = ['is_staff', ]
list_view = get_class('dashboard.reviews.views', 'ReviewListView')
update_view = get_class(... |
mike-lang/couchdb-talk-resources | refs/heads/master | couch-data-access-examples/node_modules/node-gyp/gyp/tools/pretty_sln.py | 1831 | #!/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.
"""Prints the information in a sln file in a diffable way.
It first outputs each projects in alphabetical order with their
dependenci... |
jmighion/ansible | refs/heads/devel | lib/ansible/modules/windows/win_wait_for.py | 30 | #!/usr/bin/python
# This file is part of Ansible
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# this is a windows documentation stub, actual code lives in the .ps1
# file of the same name
ANSIBLE_METADATA = {'metadata_version': '1.1... |
keishi/chromium | refs/heads/master | third_party/closure_linter/closure_linter/__init__.py | 267 | #!/usr/bin/env python
# Copyright 2008 The Closure Linter 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
#
#... |
azoft-dev-team/imagrium | refs/heads/win | env/Lib/xml/sax/saxlib.py | 130 | """
This module contains the core classes of version 2.0 of SAX for Python.
This file provides only default classes with absolutely minimum
functionality, from which drivers and applications can be subclassed.
Many of these classes are empty and are included only as documentation
of the interfaces.
$Id: saxlib.py,v 1... |
24hours/side_kitchen | refs/heads/master | run.py | 1 | from side_kitchen.side_kitchen import app
if __name__ == "__main__":
app.run(debug=True) |
timothyqiu/v2checkin | refs/heads/develop | v2checkin/providers/xiami.py | 1 | #!/usr/bin/env python
# vim: set fileencoding=utf-8
from __future__ import unicode_literals
from __future__ import absolute_import
import logging
import lxml.html
import pickle
import requests
from v2checkin import config
from v2checkin._compat import urllib_parse
from v2checkin.exception import LoginFailure, Access... |
ar7z1/ansible | refs/heads/devel | test/units/modules/network/nso/test_nso_show.py | 28 | #
# Copyright (c) 2017 Cisco and/or its affiliates.
#
# 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... |
peak6/st2 | refs/heads/master | st2common/tests/unit/test_util_api.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... |
dgzurita/odoo | refs/heads/8.0 | addons/account/wizard/__init__.py | 362 | # -*- 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... |
apaleyes/mxnet | refs/heads/master | tests/nightly/test_kvstore.py | 15 | #!/usr/bin/env python
import sys
sys.path.insert(0, "../../python/")
import mxnet as mx
import numpy as np
keys = [3, 5, 7]
# let the last shape exceed MXNET_KVSTORE_BIGARRAY_BOUND
shapes = [(4, 4), (100, 100), (2000, 2000)];
lr = .1
nworker = 4
nrepeat = 10
## generate data
data = [[[np.random.random(s)*2-1 for i i... |
scotthartbti/android_external_chromium_org | refs/heads/kk44 | tools/telemetry/telemetry/page/profile_creator.py | 38 | # Copyright 2013 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.
from telemetry.page import page_measurement
class ProfileCreator(page_measurement.PageMeasurement):
"""Base class for an object that constructs a Chrome p... |
shizhai/wprobe | refs/heads/ar9344 | build_dir/target-mips_r2_uClibc-0.9.33.2/u-boot-2013.07-rc1/tools/patman/command.py | 31 | # Copyright (c) 2011 The Chromium OS Authors.
#
# See file CREDITS for list of people who contributed to this
# project.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# t... |
kamcpp/tensorflow | refs/heads/master | tensorflow/python/kernel_tests/shape_ops_test.py | 5 | # 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... |
zahodi/ansible-mikrotik | refs/heads/master | library/mt_facts.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = '''
---
module: mt_facts
short_description: Gather facts for mikrotik devices.
description:
- This module fetches da... |
jeremiahmarks/sl4a | refs/heads/master | python/src/Tools/webchecker/webchecker.py | 53 | #! /usr/bin/env python
# Original code by Guido van Rossum; extensive changes by Sam Bayer,
# including code to check URL fragments.
"""Web tree checker.
This utility is handy to check a subweb of the world-wide web for
errors. A subweb is specified by giving one or more ``root URLs''; a
page belongs to the subweb ... |
Bysmyyr/chromium-crosswalk | refs/heads/master | third_party/WebKit/Tools/Scripts/webkitpy/common/read_checksum_from_png.py | 207 | # 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 ... |
tinchoss/Python_Android | refs/heads/master | python/src/Tools/bgen/bgen/bgenStackBuffer.py | 44 | """Buffers allocated on the stack."""
from bgenBuffer import FixedInputBufferType, FixedOutputBufferType
class StackOutputBufferType(FixedOutputBufferType):
"""Fixed output buffer allocated on the stack -- passed as (buffer, size).
Instantiate with the buffer size as parameter.
"""
def passOutput... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.