repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
eugena/django
refs/heads/master
tests/test_client_regress/__init__.py
12133432
yfried/ansible
refs/heads/devel
lib/ansible/module_utils/network/nxos/__init__.py
12133432
MrStonedOne/-tg-station
refs/heads/master
tools/minibot/nudge.py
157
#!/usr/bin/env python3 import sys import pickle import socket def pack(): ip = sys.argv[1] try: data = sys.argv[2:] except: data = "NO DATA SPECIFIED" nudge(pickle.dumps({"ip": ip, "data": data})) def nudge(data): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(("localho...
EmanueleCannizzaro/scons
refs/heads/master
test/builderrors.py
1
#!/usr/bin/env python # # Copyright (c) 2001 - 2016 The SCons Foundation # # 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 us...
pigshell/nhnick
refs/heads/vnc-websocket
src/qt/qtwebkit/Tools/QueueStatusServer/handlers/showresults.py
146
# Copyright (C) 2009 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...
cherrygirl/micronaet7
refs/heads/master
Script/Prestiti/aziende.py
1
#!/usr/bin/env python # -*- coding: windows-1251 -*- from pyExcelerator import * import os # Functions: def print_line(sigla_azienda, anno, mese, file_out, row): file_out.write("%6s%6s%6s%6s%26s%25s%13.2f%13.2f%13.2f%13.2f%13.2f\n"%(str(int(float(sigla_azienda))).ljust(6), ...
unbreakab1e/jenkins-job-builder-addons
refs/heads/master
tests/views/test_views.py
2
""" Test to make sure that the view match the fixtures""" import os from testscenarios.testcase import TestWithScenarios from testtools import TestCase from jenkins_jobs_addons import views from tests.base import get_scenarios, BaseTestCase class TestCaseModulePublishers(TestWithScenarios, TestCase, BaseTestCase): ...
ajdawson/iris
refs/heads/master
lib/iris/tests/integration/test_ff.py
10
# (C) British Crown Copyright 2014 - 2015, Met Office # # This file is part of Iris. # # Iris 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 3 of the License, or # (at your option) any l...
jnewland/home-assistant
refs/heads/ci
homeassistant/components/islamic_prayer_times/__init__.py
15
"""The islamic_prayer_times component."""
bfrohs/servo
refs/heads/master
components/script/dom/bindings/codegen/parser/tests/test_attr.py
106
import WebIDL def WebIDLTest(parser, harness): testData = [("::TestAttr%s::b", "b", "Byte%s", False), ("::TestAttr%s::rb", "rb", "Byte%s", True), ("::TestAttr%s::o", "o", "Octet%s", False), ("::TestAttr%s::ro", "ro", "Octet%s", True), ("::TestAttr%s::...
dpausp/arguments
refs/heads/master
tests/concepts/proposition_type/__init__.py
12133432
spapanik/pyrencode
refs/heads/main
src/pyrencode/settings/__init__.py
12133432
gxx/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/tests/modeltests/m2m_and_m2o/__init__.py
12133432
t0in4/django
refs/heads/master
tests/base/__init__.py
12133432
yoer/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/fixtures_regress/models.py
49
from __future__ import absolute_import, unicode_literals from django.contrib.auth.models import User from django.db import models from django.utils import six from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Animal(models.Model): name = models.CharField(max_length=...
zlsun/XX-Net
refs/heads/master
code/default/python27/1.0/lib/noarch/dnslib/proxy.py
7
# -*- coding: utf-8 -*- from __future__ import print_function import binascii,socket,struct from dnslib import DNSRecord from dnslib.server import DNSServer,DNSHandler,BaseResolver,DNSLogger class ProxyResolver(BaseResolver): """ Proxy resolver - passes all requests to upstream DNS server and re...
rahul003/mxnet
refs/heads/master
example/rcnn/symnet/symbol_vgg.py
11
# 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...
sanghinitin/golismero
refs/heads/master
tools/sqlmap/thirdparty/ansistrm/ansistrm.py
8
# # Copyright (C) 2010-2012 Vinay Sajip. All rights reserved. Licensed under the new BSD license. # import logging import os import re from lib.core.convert import stdoutencode class ColorizingStreamHandler(logging.StreamHandler): # color names to indices color_map = { 'black': 0, 'red': 1, ...
linuxmint/synaptic
refs/heads/master
swig/apt-inst.py
4
#!/usr/bin/env python import synaptic_common import sys class TextProgress(synaptic_common.SwigOpProgress): def UpdateStatus(self, p): print "\r%.2f " %(p), def Done(self): print "\nDone" def Update(self): print "?", class TextAcquireProgress(synaptic_common.SwigAcquireSt...
stevepiercy/readthedocs.org
refs/heads/master
readthedocs/oauth/admin.py
6
from django.contrib import admin from .models import RemoteRepository, RemoteOrganization class RemoteRepositoryAdmin(admin.ModelAdmin): raw_id_fields = ('users',) class RemoteOrganizationAdmin(admin.ModelAdmin): raw_id_fields = ('users',) admin.site.register(RemoteRepository, RemoteRepositoryAdmin) admi...
up9cloud/line-api-server
refs/heads/master
lib/py/src/protocol/TMultiplexedProtocol.py
146
# # 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...
RaphaelNajera/Sunlight_Sensor
refs/heads/master
firmware/Adafruit_Python_PureIO/build/lib.linux-armv7l-2.7/Adafruit_PureIO/smbus.py
6
# Copyright (c) 2016 Adafruit Industries # Author: Tony DiCola # # 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, m...
cpacia/OpenBazaar-Server
refs/heads/master
keys/credentials.py
6
import base64 import random from config import USERNAME, PASSWORD from hashlib import sha256 def get_credentials(database): settings = database.settings creds = settings.get_credentials() if creds == (USERNAME, PASSWORD): return creds elif creds is not None and (USERNAME is None or PASSWORD is...
icio/github3.py
refs/heads/develop
tests/test_users.py
9
import github3 try: from unittest.mock import patch except ImportError: from mock import patch from tests.utils import (BaseCase, load) from datetime import datetime class TestKey(BaseCase): def __init__(self, methodName='runTest'): super(TestKey, self).__init__(methodName) self.key = github...
dfalt974/SickRage
refs/heads/master
lib/chardet/jpcntx.py
289
######################## 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...
npuichigo/ttsflow
refs/heads/master
third_party/tensorflow/tensorflow/contrib/keras/python/keras/layers/normalization_test.py
19
# 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...
LukeHoersten/ansible-modules-core
refs/heads/devel
cloud/docker/__init__.py
12133432
openstack/poppy
refs/heads/master
tests/unit/storage/mockdb/__init__.py
12133432
KieranWynn/pyquaternion
refs/heads/master
pyquaternion/test/__init__.py
12133432
DARKPOP/external_chromium_org
refs/heads/dark-5.1
chrome/test/ispy/server/image_handler.py
101
# 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. """Request handler to display an image from Google Cloud Storage.""" import json import os import sys import webapp2 from common import cloud_bucket from c...
RAPD/RAPD
refs/heads/master
src/old_agents/subcontractors/xdsme/new/xdsme-0.4.9/bin/Linux_i586/2pck.py
6
#!/usr/bin/env python """ 28/01/02 pierre.legrand@crchul.ulaval.ca """ usage = """ >>> Usage : 2pck.py FORMAT image1 [image2 ...]\n FORMAT = TIFF (marccd) """ import string,sys,os def find_template(image_name): dirname = os.path.split(os.getcwd())[1] if image_name[-3:] == ".gz" or image_name[-3:]...
2ndQuadrant/ansible
refs/heads/master
lib/ansible/plugins/doc_fragments/constructed.py
53
# -*- 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) class ModuleDocFragment(object): DOCUMENTATION = r''' options: strict: description: - If C(yes) make invalid entries a fatal error, otherwise ...
matthiask/feincms2-content
refs/heads/master
tests/testapp/models.py
2
from django.db import models from django.urls import reverse from content_editor.models import Region, Template, create_plugin_base class AbstractRichText(models.Model): text = models.TextField(blank=True) class Meta: abstract = True verbose_name = "rich text" class Article(models.Model): ...
amitt001/Analytics-App
refs/heads/master
API/rate/reviews_sentiment_write.py
1
""" READ FILE: ALL THE CHNAGES MUST BE DONE TO THIS FILE. THIS FILE PICKLES THE CALSSIFIERS AND FEATURESETS RUN 'reviews_sentiment_read.py' TO CHECK ACCURACY FROM THE ALREADY PICKLED FILES. Play Store apps reviews sentiment analysis using NLTK module of Python. Tagging reviews ...
TangHao1987/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/utils/dictconfig.py
335
# This is a copy of the Python logging.config.dictconfig module, # reproduced with permission. It is provided here for backwards # compatibility for Python versions prior to 2.7. # # Copyright 2009-2010 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # docu...
k11a/snmptablemixer
refs/heads/master
pysnmp/smi/mibs/instances/__SNMP-MPD-MIB.py
2
# # This file is part of pysnmp software. # # Copyright (c) 2005-2017, Ilya Etingof <etingof@gmail.com> # License: http://pysnmp.sf.net/license.html # MibScalarInstance, = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalarInstance') (snmpUnknownSecurityModels, snmpInvalidMsgs, snmpUnknownPDUHandlers) = mibBuilder.imp...
axbaretto/beam
refs/heads/master
sdks/python/.tox/lint/lib/python2.7/site-packages/google/protobuf/unittest_import_pb2.py
35
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/protobuf/unittest_import.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.proto...
ProfessionalIT/professionalit-webiste
refs/heads/master
sdk/google_appengine/lib/django-1.4/django/contrib/databrowse/sites.py
84
from django import http from django.db import models from django.contrib.databrowse.datastructures import EasyModel from django.shortcuts import render_to_response from django.utils.safestring import mark_safe class AlreadyRegistered(Exception): pass class NotRegistered(Exception): pass class DatabrowsePlugi...
RudoCris/horizon
refs/heads/master
openstack_dashboard/dashboards/admin/networks/subnets/__init__.py
12133432
crcresearch/osf.io
refs/heads/develop
admin/nodes/__init__.py
12133432
gadsbyfly/PyBioMed
refs/heads/master
PyBioMed/test/__init__.py
12133432
leeon/annotated-django
refs/heads/note
django/conf/locale/zh_TW/__init__.py
12133432
Johnetordoff/osf.io
refs/heads/develop
addons/owncloud/views.py
9
"""Views for the node settings page.""" # -*- coding: utf-8 -*- from rest_framework import status as http_status from django.core.exceptions import ValidationError from furl import furl import requests from flask import request from framework.auth.decorators import must_be_logged_in from addons.base import generic_vi...
rspavel/spack
refs/heads/develop
var/spack/repos/builtin/packages/mirdeep2/package.py
5
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * from os import chmod import glob class Mirdeep2(Package): """miRDeep2 is a completely overhauled...
manikishan/fosswebsite
refs/heads/master
projects/urls.py
8
# created by Navaneeth s, navisk13@gmail.com from django.conf.urls import url from django.contrib.auth.decorators import login_required from projects.views import * urlpatterns = [ url(r'^$', ProjectListView.as_view(), name='project'), url(r'^(?P<pk>[0-9]+)/$', ProjectDetailView.as_view(), name='project_det...
QLGu/django-oscar
refs/heads/master
tests/unit/partner/availability_mixin_tests.py
63
from decimal import Decimal as D from django.test import TestCase import mock from oscar.apps.partner import strategy, availability class TestStockRequiredMixin(TestCase): def setUp(self): self.mixin = strategy.StockRequired() self.product = mock.Mock() self.stockrecord = mock.Mock() ...
denisenkom/django
refs/heads/master
django/contrib/auth/tests/test_forms.py
5
from __future__ import unicode_literals import os import re from django import forms from django.contrib.auth import get_user_model from django.contrib.auth.models import User from django.contrib.auth.forms import (UserCreationForm, AuthenticationForm, PasswordChangeForm, SetPasswordForm, UserChangeForm, Password...
ronakkhunt/kuma
refs/heads/master
vendor/packages/pygments/lexers/web.py
77
# -*- coding: utf-8 -*- """ pygments.lexers.web ~~~~~~~~~~~~~~~~~~~ Just export previously exported lexers. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexers.html import HtmlLexer, DtdLexer, XmlLexer, XsltLexer, \ ...
Andr3iC/courtlistener
refs/heads/master
cleaning_scripts/make_slugs_for_citations_that_lack_them_243.py
5
import os import sys execfile('/etc/courtlistener') sys.path.append(INSTALL_ROOT) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") from alert.lib.string_utils import trunc from alert.search.models import Citation from django.utils.text import slugify from optparse import OptionParser def fixer(simulate=F...
mbohlool/client-python
refs/heads/master
kubernetes/client/models/v1_replication_controller_spec.py
1
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
izonder/intellij-community
refs/heads/master
python/testData/resolve/multiFile/importPackageIntoSelfInit/mygame/display.py
249
def foo(): pass
slisson/intellij-community
refs/heads/master
python/helpers/pydev/_pydev_imps/_pydev_time.py
53
from time import * try: from gevent import monkey saved = monkey.saved['time'] for key, val in saved.items(): globals()[key] = val except: pass
nwchandler/ansible
refs/heads/devel
lib/ansible/modules/network/f5/bigip_facts.py
72
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2013, Matt Hite <mhite@hotmail.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 Licens...
codeforamerica/skillcamp
refs/heads/master
ENV/lib/python2.7/site-packages/werkzeug/testsuite/wsgi.py
99
# -*- coding: utf-8 -*- """ werkzeug.testsuite.wsgi ~~~~~~~~~~~~~~~~~~~~~~~ Tests the WSGI utilities. :copyright: (c) 2013 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import unittest from os import path from contextlib import closing from werkzeug.testsuite import Werkzeug...
heeraj123/oh-mainline
refs/heads/master
vendor/packages/Django/tests/regressiontests/comment_tests/urls_default.py
133
from django.conf.urls import patterns, include urlpatterns = patterns('', (r'^', include('django.contrib.comments.urls')), # Provide the auth system login and logout views (r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': 'login.html'}), (r'^accounts/logout/$', 'django.contri...
fuzeman/trakt.py
refs/heads/master
tests/sync/ratings/test_shows.py
1
# flake8: noqa: F403, F405 from tests.core import mock from trakt import Trakt from datetime import datetime from dateutil.tz import tzutc from hamcrest import * from httmock import HTTMock def test_ratings(): with HTTMock(mock.fixtures, mock.unknown): collection = {} with Trakt.configuration.a...
avocado-framework/avocado-vt
refs/heads/master
virttest/qemu_storage.py
1
""" Classes and functions to handle block/disk images for KVM. This exports: - two functions for get image/blkdebug filename - class for image operates and basic parameters """ import collections import json import logging import os import re import six import string from avocado.core import exceptions from avoca...
pilou-/ansible-modules-core
refs/heads/devel
cloud/docker/__init__.py
12133432
kyuridenamida/atcoder-tools
refs/heads/master
atcodertools/config/__init__.py
12133432
kartikshah1/Test
refs/heads/master
assignments/templatetags/__init__.py
12133432
sugartom/tensorflow-alien
refs/heads/master
tensorflow/contrib/rnn/python/kernel_tests/fused_rnn_cell_test.py
34
# 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...
pepetreshere/odoo
refs/heads/patch-2
addons/sale_coupon/tests/test_program_with_code_operations.py
3
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.sale_coupon.tests.common import TestSaleCouponCommon from odoo.exceptions import UserError class TestProgramWithCodeOperations(TestSaleCouponCommon): # Test the basic operation (apply_coupon) on an...
geminy/aidear
refs/heads/master
snippets/python/PycharmProject/stack.py
1
#!/usr/bin/env python stack = [] def pushit(): stack.append(raw_input('Enter new string: ').strip()) def popit(): if len(stack) == 0: print 'Cannot pop from an empty stack!' else: print 'Romoved [', stack.pop(), ']' def viewstack(): print stack # calls str() internally CMDs = {'u': ...
ustayready/CredSniper
refs/heads/master
modules/example/example.py
1
from __future__ import print_function from flask import redirect, request, jsonify, Markup from os import system from core import functions from core.base_module import * import uuid import mechanicalsoup import bs4 import re, sys, time, random import time import json class ExampleModule(BaseModule): def __init__(...
pombreda/pyamg
refs/heads/master
Examples/VisualizingAggregation/demo2.py
1
# 3D example of viewing aggregates from SA using VTK from pyamg.aggregation import standard_aggregation from pyamg.vis import vis_coarse, vtk_writer from pyamg.gallery import load_example # retrieve the problem data = load_example('unit_cube') A = data['A'].tocsr() V = data['vertices'] E2V = data['elements'] # perfor...
jarvys/django-1.7-jdb
refs/heads/master
tests/sites_framework/models.py
160
from django.contrib.sites.managers import CurrentSiteManager from django.contrib.sites.models import Site from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class AbstractArticle(models.Model): title = models.CharField(max_length=50) object...
tjsavage/full_nonrel_starter
refs/heads/master
django/contrib/comments/views/utils.py
192
""" A few bits of helper functions for comment views. """ import urllib import textwrap from django.http import HttpResponseRedirect from django.core import urlresolvers from django.shortcuts import render_to_response from django.template import RequestContext from django.core.exceptions import ObjectDoesNotExist from...
GenericSnake/interactive-tutorials
refs/heads/master
markdown/extensions/wikilinks.py
123
#!/usr/bin/env python ''' WikiLinks Extension for Python-Markdown ====================================== Converts [[WikiLinks]] to relative links. Requires Python-Markdown 2.0+ Basic usage: >>> import markdown >>> text = "Some text with a [[WikiLink]]." >>> html = markdown.markdown(text, ['wikilinks'])...
Alwnikrotikz/pyglet
refs/heads/master
contrib/scene2d/examples/keen_intro.py
29
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' from pyglet.window import Window from pyglet import clock from scene2d.textsprite import * from pyglet import font width, height = 640, 480 window = Window(width=width, height=height) arial = font.load('Arial', 500, bold=True) co...
ajtowns/bitcoin
refs/heads/master
test/functional/mempool_package_onemore.py
10
#!/usr/bin/env python3 # Copyright (c) 2014-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test descendant package tracking carve-out allowing one final transaction in an otherwise-full packa...
John-Boik/Principled-Societies-Project
refs/heads/master
leddaApp/static/brython/src/Lib/test/test_urllibnet.py
23
#!/usr/bin/env python3 import unittest from test import support import contextlib import socket import urllib.request import sys import os import email.message import time class URLTimeoutTest(unittest.TestCase): # XXX this test doesn't seem to test anything useful. TIMEOUT = 30.0 def setUp(self): ...
android-ia/platform_external_chromium_org_tools_gyp
refs/heads/master
PRESUBMIT.py
32
# 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. """Top-level presubmit script for GYP. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit API built...
edelooff/newWeb
refs/heads/master
newweb/pagemaker/admin.py
1
#!/usr/bin/python """newWeb PageMaker Mixins for admin purposes.""" # Standard modules import datetime import decimal import inspect import os # Package modules from .. import model from .. import templateparser NOT_ALLOWED_METHODS = dir({}) + ['key', 'identifier'] FIELDTYPES = {'datetime': datetime.datetime, ...
pekeler/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/win32/test/test_pywintypes.py
17
import unittest import pywintypes import time class TestCase(unittest.TestCase): def testPyTimeFormat(self): struct_current = time.localtime() pytime_current = pywintypes.Time(struct_current) # try and test all the standard parts of the format format_string = "%a %A %b %B %c %d %H %...
40023256/W17test
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/signal.py
743
"""This module provides mechanisms to use signal handlers in Python. Functions: alarm() -- cause SIGALRM after a specified time [Unix only] setitimer() -- cause a signal (described below) after a specified float time and the timer may restart then [Unix only] getitimer() -- get current value of timer [...
dxwu/BinderFilter
refs/heads/master
resources/android-toolchain-16/lib/python2.7/test/pyclbr_input.py
324
"""Test cases for test_pyclbr.py""" def f(): pass class Other(object): @classmethod def foo(c): pass def om(self): pass class B (object): def bm(self): pass class C (B): foo = Other().foo om = Other.om d = 10 # XXX: This causes test_pyclbr.py to fail, but only because the # ...
topxiaoke/myedx
refs/heads/master
common/test/acceptance/pages/xblock/__init__.py
12133432
redreamality/semanticizer
refs/heads/master
semanticizer/processors/__init__.py
12133432
ABaldwinHunter/django-clone-classic
refs/heads/master
django/urls/exceptions.py
133
from __future__ import unicode_literals from django.http import Http404 class Resolver404(Http404): pass class NoReverseMatch(Exception): pass
mlaitinen/odoo
refs/heads/8.0
addons/account_voucher/report/account_voucher_sales_receipt.py
326
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
gogobook/Spirit
refs/heads/master
spirit/settings_tests.py
7
# -*- coding: utf-8 -*- """ Django settings for running the tests of spirit app """ from __future__ import unicode_literals import os from spirit.settings import * BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = 'TEST' INSTALLED_APPS += [ 'spirit.core.tests', ] ROOT_URLCONF = 'spirit.urls'...
nvoron23/statsmodels
refs/heads/master
statsmodels/sandbox/stats/multicomp.py
26
''' from pystatsmodels mailinglist 20100524 Notes: - unfinished, unverified, but most parts seem to work in MonteCarlo - one example taken from lecture notes looks ok - needs cases with non-monotonic inequality for test to see difference between one-step, step-up and step-down procedures - FDR doesn't look rea...
paninetworks/neutron
refs/heads/master
neutron/tests/unit/extensions/test_quotasv2.py
7
# Copyright 2012 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...
endlessm/chromium-browser
refs/heads/master
third_party/llvm/lldb/test/API/functionalities/plugins/python_os_plugin/operating_system2.py
8
#!/usr/bin/python import lldb import struct class OperatingSystemPlugIn(object): """Class that provides data for an instance of a LLDB 'OperatingSystemPython' plug-in class""" def __init__(self, process): '''Initialization needs a valid.SBProcess object. This plug-in will get created after ...
stonegithubs/odoo
refs/heads/8.0
addons/purchase_analytic_plans/__init__.py
441
# -*- 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...
EnvGen/toolbox
refs/heads/master
scripts/convenience/construct_ena_sequencing_runs_table.py
1
#!/usr/bin/env python """construct_ena_sequencing_runs_table.py Based on a folder with uploaded files and a template, construct table ready to be submitted. This script is not general but is very niched to the NGI/Uppmax scenario. Ideally the user is expected to copy this script and edit it to suit the users needs. "...
incuna/authentic
refs/heads/master
authentic2/idp/saml/idff12_endpoints.py
1
import datetime import logging import urllib import lasso from django.contrib.auth.views import redirect_to_login from django.conf.urls.defaults import patterns from django.http import HttpResponse, HttpResponseForbidden, \ HttpResponseRedirect from django.utils.translation import ugettext as _ from django.views.d...
keimlink/django-cms
refs/heads/develop
cms/test_utils/fixtures/__init__.py
12133432
mindnervestech/mnrp
refs/heads/master
addons/pos_discount/discount.py
315
# -*- 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...
tovmeod/anaf
refs/heads/drf
anaf/documents/templatetags/documents.py
1
""" Documents templatetags """ from coffin import template from anaf.core.rendering import render_to_string from jinja2 import contextfunction, Markup from django.template import RequestContext register = template.Library() @contextfunction def documents_document_list(context, documents, skip_group=False): """Pr...
abdoosh00/edraak
refs/heads/master
common/lib/xmodule/xmodule/capa_base.py
5
"""Implements basics of Capa, including class CapaModule.""" import cgi import copy import datetime import hashlib import json import logging import os import traceback import struct import sys # We don't want to force a dependency on datadog, so make the import conditional try: from dogapi import dog_stats_api ex...
google-research/generic-adaptive-restarts
refs/heads/master
pdhg/pdhg_linear_programming.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 agreed t...
lmazuel/azure-sdk-for-python
refs/heads/master
azure-mgmt-network/azure/mgmt/network/v2017_06_01/models/application_gateway_ip_configuration.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 ...
google/nerfactor
refs/heads/main
nerfactor/__init__.py
42
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
sfam/home-assistant
refs/heads/dev
tests/components/test_script.py
7
""" tests.components.test_script ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests script component. """ # pylint: disable=too-many-public-methods,protected-access from datetime import timedelta import unittest from homeassistant.components import script import homeassistant.util.dt as dt_util from tests.common import fire_time_ch...
2mf/moto
refs/heads/master
tests/test_datapipeline/test_datapipeline.py
14
from __future__ import unicode_literals import boto.datapipeline import sure # noqa from moto import mock_datapipeline from moto.datapipeline.utils import remove_capitalization_of_dict_keys def get_value_from_fields(key, fields): for field in fields: if field['key'] == key: return field['st...
ppwwyyxx/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/tridiagonal_solve_op_test.py
3
# Copyright 2017 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...
mxOBS/deb-pkg_trusty_chromium-browser
refs/heads/master
chrome/test/chromedriver/embed_extension_in_cpp.py
158
#!/usr/bin/env python # 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. """Embeds Chrome user data files in C++ code.""" import base64 import optparse import os import StringIO import sys import zipfile im...
xkcd1253/Mimi
refs/heads/master
flask/lib/python2.7/site-packages/whoosh/matching/binary.py
94
# Copyright 2010 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
kevin-coder/tensorflow-fork
refs/heads/master
tensorflow/contrib/distributions/python/ops/bijectors/batch_normalization.py
2
# Copyright 2018 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...