repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
tumbl3w33d/ansible
refs/heads/devel
lib/ansible/modules/cloud/vultr/vultr_dns_domain_info.py
14
#!/usr/bin/python # # (c) 2018, Yanis Guenane <yanis+ansible@guenane.org> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
ycl2045/nova-master
refs/heads/master
nova/compute/monitors/virt/__init__.py
63
# Copyright 2013 Intel 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 requir...
a25kk/lra
refs/heads/master
src/lra.sitecontent/lra/__init__.py
916
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages try: __import__('pkg_resources').declare_namespace(__name__) except ImportError: from pkgutil import extend_path __path__ = extend_path(__path__, __name__)
ppasq/geonode
refs/heads/master
geonode/monitoring/migrations/0007_monitoring_exception_message.py
8
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('monitoring', '0006_monitoring_path_text'), ] operations = [ migrations.AddField( model_name='exceptionevent', ...
zerok/pyconde-website-mirror
refs/heads/develop
pyconde/search/backends/elasticsearch.py
3
from haystack.backends import elasticsearch_backend class Backend(elasticsearch_backend.ElasticsearchSearchBackend): """ This backend is optimized for german content and uses therefor the german analyzer exclusively for content fields. Note that some fields should be analyzed like tags, django_ct etc...
Tesorio/django-eztables
refs/heads/master
eztables/settings.py
5
# Django settings for eztables project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'e...
anurag-ks/Melissa-Core
refs/heads/master
tests/test_actions/test_notification.py
2
"""test module.""" try: # py3 from unittest import mock except ImportError: # py2 import mock def test_push(): info = mock.Mock() m_profile = {'push_bullet': '', 'va_name': 'Melissa'} with mock.patch('melissa.profile_loader.load_profile'): with mock.patch('melissa.actions.notification.Pu...
onoga/toolib
refs/heads/master
toolib/utils.py
2
# -*- coding: Cp1251 -*- ################################################################# # Program: common """ Very common utility functions and classes DEPRECATED: MODULE is mixed to mutch """ __author__ = "All" __date__ = "$Date: 2009/11/02 17:01:52 $" __version__ = "$Revision: 1.24 $" # $Source: D:/HOME/cvs/t...
Inter-Actief/alexia
refs/heads/master
alexia/forms/mixins.py
1
from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from django.forms import Form, ModelForm from django.utils.translation import ugettext as _ class BaseCrispyFormMixin(object): submit_text = None def get_helper(self): helper = FormHelper() helper.form_class = '...
renesas/onekernel
refs/heads/master
tools/perf/scripts/python/syscall-counts-by-pid.py
944
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(...
sfromm/snmpryte
refs/heads/master
lib/netspryte/__init__.py
2
# Written by Stephen Fromm <stephenf nero net> # Copyright (C) 2015-2017 University of Oregon # # 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 opt...
machinalis/iepy
refs/heads/develop
iepy/webui/corpus/migrations/0002_data_migration_dont_know_skip_merge.py
2
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations DONTKNOW = "DK" SKIP = "SK" def replace_dont_know_for_skip(apps, schema_editor): EvidenceLabel = apps.get_model('corpus', 'EvidenceLabel') for ev in EvidenceLabel.objects.all(): if ev.label == DO...
oeeagle/quantum
refs/heads/master
neutron/db/migration/alembic_migrations/versions/50e86cb2637a_nsx_mappings.py
2
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 OpenStack Foundation # # 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...
fnouama/intellij-community
refs/heads/master
python/testData/psi/NotClosedBraceDict.py
80
a = { 'b': 'c', ]
openstack/solum
refs/heads/master
solum/api/handlers/camp/attribute_definition_handler.py
2
# 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, software # distributed under t...
pyronimous/flappy
refs/heads/master
samples/cube_3d.py
2
#! /usr/bin/env python # encoding: utf-8 import flappy from flappy.events import Event from flappy.geom import Matrix3D from flappy.display3d import Scene3D, VertexBuffer3D, VertexBuffer3DFormat from flappy.display3d import IndexBuffer3D, Program3D from flappy.display import Sprite import math from time import time ...
zubron/servo
refs/heads/master
tests/wpt/web-platform-tests/2dcontext/tools/gentest.py
23
# Copyright (c) 2010 Philip Taylor # Released under the BSD license and W3C Test Suite License: see LICENSE.txt # Current code status: # # This was originally written for use at # http://philip.html5.org/tests/canvas/suite/tests/ # # It has been adapted for use with the Web Platform Test Suite suite at # https://githu...
bop/rango
refs/heads/master
lib/python2.7/site-packages/django/contrib/gis/gdal/tests/test_envelope.py
114
from django.contrib.gis.gdal import Envelope, OGRException from django.utils import unittest class TestPoint(object): def __init__(self, x, y): self.x = x self.y = y class EnvelopeTest(unittest.TestCase): def setUp(self): self.e = Envelope(0, 0, 5, 5) def test01_init(self): ...
sander76/home-assistant
refs/heads/dev
homeassistant/components/miflora/__init__.py
36
"""The miflora component."""
DavidBarishev/ClashOfClansBot
refs/heads/master
Configurator/main.py
1
from appJar import gui def generate(btn): print(btn) app = gui("Clash Of Clans Bot - Configurator", "500x200") app.addLabel("label_welcome", "Welcome to the configurator") app.setLabelPadding("label_welcome", [0, 20]) app.addLabelOptionBox("OCR Engine ", []) app.addLabelOptionBox("Templ...
RevansChen/online-judge
refs/heads/master
Codewars/8kyu/object-oriented-piracy/Python/test.py
1
# Python - 2.7.6 EmptyShip = Ship(0, 0) test.assert_equals(EmptyShip.is_worth_it(), False)
roxyboy/cython
refs/heads/master
Cython/Tempita/compat3.py
25
import sys __all__ = ['b', 'basestring_', 'bytes', 'unicode_', 'next', 'is_unicode'] if sys.version < "3": b = bytes = str basestring_ = basestring unicode_ = unicode else: def b(s): if isinstance(s, str): return s.encode('latin1') return bytes(s) basestring_ = (bytes,...
ksmit799/Toontown-Source
refs/heads/master
toontown/parties/DistributedPartyJukeboxActivityBase.py
1
from direct.actor.Actor import Actor from direct.task.Task import Task from pandac.PandaModules import * from otp.otpbase.OTPBase import OTPBase from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from toontown.parties.DistributedPartyActivity import DistributedPartyActivity from too...
HyperBaton/ansible
refs/heads/devel
test/units/modules/network/nxos/test_nxos_nxapi.py
68
# (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
RedhawkSDR/integration-gnuhawk
refs/heads/master
components/pwr_squelch_cc/tests/test_pwr_squelch_cc.py
1
#!/usr/bin/env python # # This file is protected by Copyright. Please refer to the COPYRIGHT file # distributed with this source distribution. # # This file is part of GNUHAWK. # # GNUHAWK is free software: you can redistribute it and/or modify is under the # terms of the GNU General Public License as published by ...
leiferikb/bitpop
refs/heads/master
src/tools/perf/profile_creators/many_extensions_profile_creator.py
4
# 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 extensions_profile_creator class ManyExtensionsProfileCreator( extensions_profile_creator.ExtensionsProfileCreator): """Ins...
joshua-cogliati-inl/moose
refs/heads/devel
framework/contrib/nsiqcppstyle/rules/RULE_9_1_A_do_not_use_hardcorded_include_path.py
43
""" Do not use hardcoded paths in #include. == Violation == #include "c:\\Hello.h" <== Violation. Window style absolute path. #include "/usr/include/Hello.h" <== Violation. Linux style absolute path. == Good == #include "Hello.h" #include "include/Hello.h" """ from nsiqcppstyle_rulehelper import *...
mmb4vu/cs3240-labdemo
refs/heads/master
helper.py
2
def greeting(msg): print(msg) greeting("hello")
Huawei/OpenStackClient_Auto-Scaling
refs/heads/master
asclient/common/httpclient.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # 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...
odie5533/Python-RTSP
refs/heads/master
sdpp.py
1
# Pythonic SDP/SDPPLIN Parser # SDP = Session Description Protocol # # Copyright (C) 2008 David Bern # # 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 ...
flwh/KK_mt6589_iq451
refs/heads/master
prebuilts/python/darwin-x86/2.7.5/lib/python2.7/encodings/idna.py
540
# This module implements the RFCs 3490 (IDNA) and 3491 (Nameprep) import stringprep, re, codecs from unicodedata import ucd_3_2_0 as unicodedata # IDNA section 3.1 dots = re.compile(u"[\u002E\u3002\uFF0E\uFF61]") # IDNA section 5 ace_prefix = "xn--" uace_prefix = unicode(ace_prefix, "ascii") # This assumes query st...
mapr/hue
refs/heads/hue-3.9.0-mapr
desktop/core/ext-py/pysqlite/pysqlite2/test/factory.py
45
#-*- coding: ISO-8859-1 -*- # pysqlite2/test/factory.py: tests for the various factories in pysqlite # # Copyright (C) 2005-2007 Gerhard Häring <gh@ghaering.de> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liab...
mboehn/ffc
refs/heads/master
ffc/urls.py
1
from django.conf.urls import patterns, include, url from django.contrib import admin import forestfire.views as forestfire_views import base.views as base_views urlpatterns = [ url(r'^$', base_views.HomeView.as_view(), name='home'), url(r'^forestfire/$', forestfire_views.ForestFireIndexList.as_view(), name='...
hubert667/AIR
refs/heads/master
build/PyYAML/build/lib.linux-i686-2.7/yaml/scanner.py
435
# Scanner produces tokens of the following types: # STREAM-START # STREAM-END # DIRECTIVE(name, value) # DOCUMENT-START # DOCUMENT-END # BLOCK-SEQUENCE-START # BLOCK-MAPPING-START # BLOCK-END # FLOW-SEQUENCE-START # FLOW-MAPPING-START # FLOW-SEQUENCE-END # FLOW-MAPPING-END # BLOCK-ENTRY # FLOW-ENTRY # KEY # VALUE # AL...
seanxwzhang/LeetCode
refs/heads/master
259 3Sum Smaller/solution.py
1
class Solution(object): def threeSumSmaller(self, nums, target): nums.sort() count = 0 for k in range(len(nums)): i, j = 0, k - 1 while i < j: if nums[i] + nums[j] + nums[k] < target: count += j - i i += 1 ...
heartsome/translationstudio8
refs/heads/master
tools/pyscripts/MergeRepos.py
3
#!/usr/bin/env python3 ''' 功能: 将几个更新站点的文件合并为一个: 1、合并 binary、features、plugins 目录中的文件,忽略同名文件; 2、合并 artifacts.jar、content.jar 文件中的相应索引信息。 ''' import os import sys import shutil import logging from zipfile import ZipFile, ZIP_DEFLATED import xml.etree.ElementTree as etree import hsconfig BASE_PATH = hsconfig.build_pat...
oblique-labs/pyVM
refs/heads/master
rpython/rlib/test/test_objectmodel.py
1
from collections import OrderedDict import py from rpython.rlib.objectmodel import ( r_dict, UnboxedValue, Symbolic, compute_hash, compute_identity_hash, compute_unique_id, current_object_addr_as_int, we_are_translated, prepare_dict_update, reversed_dict, specialize, enforceargs, newlist_hint, resizelis...
rwillmer/django
refs/heads/master
tests/urlpatterns_reverse/urls_without_full_import.py
452
# A URLs file that doesn't use the default # from django.conf.urls import * # import pattern. from django.conf.urls import url from .views import bad_view, empty_view urlpatterns = [ url(r'^test_view/$', empty_view, name="test_view"), url(r'^bad_view/$', bad_view, name="bad_view"), ]
ruba9/HotelChatbot
refs/heads/master
my_env/lib/python3.6/distutils/__init__.py
1211
import os import sys import warnings import imp import opcode # opcode is not a virtualenv module, so we can use it to find the stdlib # Important! To work on pypy, this must be a module that resides in the # lib-python/modified-x.y.z directory dirname = os.path.dirname distutils_path = o...
ironbox360/django
refs/heads/master
tests/db_typecasts/tests.py
134
# Unit tests for typecast functions in django.db.backends.util import datetime import unittest from django.db.backends import utils as typecasts from django.utils import six TEST_CASES = { 'typecast_date': ( ('', None), (None, None), ('2005-08-11', datetime.date(2005, 8, 11)), ('1...
pombredanne/numba
refs/heads/master
numba/tests/test_typeof.py
3
""" Tests for the typeof() machinery. """ from __future__ import print_function import array from collections import namedtuple import mmap import sys import numpy as np import numba.unittest_support as unittest from numba import cffi_support, numpy_support, types from numba.npdatetime import NPDATETIME_SUPPORTED f...
pwnieexpress/raspberry_pwn
refs/heads/master
src/pentest/voiper/sulley/pydbg/my_ctypes.py
8
#!c:\python\python.exe # # PyDBG # Copyright (C) 2006 Pedram Amini <pedram.amini@gmail.com> # # $Id: my_ctypes.py 194 2007-04-05 15:31:53Z cameron $ # # 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 Foundati...
MathieuR/ardupilot
refs/heads/master
Tools/autotest/apm_unit_tests/dev/arducopter_Loiter.py
250
import arducopter def unit_test(mavproxy, mav): '''A scripted flight plan''' if ( arducopter.calibrate_level(mavproxy, mav) and arducopter.arm_motors(mavproxy, mav) and arducopter.takeoff(mavproxy,mav, alt_min=30, takeoff_throttle=1510) and arducopter.hover(mavproxy,mav, hov...
Batterfii/httpie
refs/heads/master
httpie/output/streams.py
50
from itertools import chain from functools import partial from httpie.compat import str from httpie.context import Environment from httpie.models import HTTPRequest, HTTPResponse from httpie.input import (OUT_REQ_BODY, OUT_REQ_HEAD, OUT_RESP_HEAD, OUT_RESP_BODY) from httpie.output.processing ...
marckuz/django
refs/heads/master
django/contrib/gis/geos/point.py
338
from ctypes import c_uint from django.contrib.gis.geos import prototypes as capi from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.geometry import GEOSGeometry from django.utils import six from django.utils.six.moves import range class Point(GEOSGeometry): _minlength = 2 _m...
BaconPancakes/valor
refs/heads/master
lib/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py
2359
"""The match_hostname() function from Python 3.3.3, essential when using SSL.""" # Note: This file is under the PSF license as the code comes from the python # stdlib. http://docs.python.org/3/license.html import re __version__ = '3.4.0.2' class CertificateError(ValueError): pass def _dnsname_match(dn, host...
simonwydooghe/ansible
refs/heads/devel
test/integration/targets/async_fail/library/async_test.py
89
import json import sys import time from ansible.module_utils.basic import AnsibleModule def main(): if "--interactive" in sys.argv: import ansible.module_utils.basic ansible.module_utils.basic._ANSIBLE_ARGS = json.dumps(dict( ANSIBLE_MODULE_ARGS=dict( fail_mode="gracef...
rahul003/mxnet
refs/heads/master
example/profiler/profiler_ndarray.py
27
# 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...
seawaywen/vim-config
refs/heads/master
bundle/python-mode/pymode/libs3/rope/base/pyscopes.py
89
import rope.base.builtins import rope.base.codeanalyze import rope.base.pynames from rope.base import ast, exceptions, utils class Scope(object): def __init__(self, pycore, pyobject, parent_scope): self.pycore = pycore self.pyobject = pyobject self.parent = parent_scope def get_names...
nithinbose87/ec2-auto-scaler
refs/heads/master
ec2-auto-scaler.py
3
import argparse import logging import traceback import time from libs.YapDi import yapdi from autoscaling import AutoScale from constants import APPLICATION_NAME, DEFAULT_CONFIG_PATH, LOG_FORMAT,\ LOG_PATH, DAEMON_PID_FILE from configuration import Configuration logging.basicConfig(filename=LOG_PATH, format=LOG_FORMA...
plotly/python-api
refs/heads/master
packages/python/plotly/plotly/graph_objs/scatter3d/hoverlabel/_font.py
2
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatter3d.hoverlabel" _path_str = "scatter3d.hoverlabel.font" _valid_props = {"color", "colors...
inasafe/inasafe
refs/heads/develop
safe/messaging/test/test_utilities.py
7
# coding=utf-8 """Test for Analysis Class. Contact : ole.moller.nielsen@gmail.com .. note:: 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 the License, or (at y...
MegaMark16/django-live-support
refs/heads/master
live_support/models.py
1
from datetime import datetime from uuid import uuid4 from django.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from django.core.cache import cache class SupportGroup(models.Model): name = models.CharField(_("name"), max_length=255) agents ...
alisonbnt/steering-all
refs/heads/master
src/world/dotworld.py
2
import src.interact.listener class DotWorld(src.interact.listener.InteractListener): def __init__(self): self.screen = None self.active = True def pause(self): self.active = False def resume(self): self.active = True def listen(self, inputResult): pass def setScreen(self, screen): ...
paterson/servo
refs/heads/master
tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/cors/support/cors-tester.py
238
from wptserve.handlers import HTTPException import urllib def main(request, response): if request.method != "GET": raise HTTPException(400, message="Method was not GET") if not "id" in request.GET: raise HTTPException(400, message="No id") id = request.GET['id'] if "read" in request....
leshchevds/ganeti
refs/heads/master
lib/watcher/nodemaint.py
8
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 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: # # 1. Redistributions of source code must retain the above copyright notice, ...
npiganeau/odoo
refs/heads/master
addons/mail/controllers/main.py
383
import base64 import psycopg2 import openerp from openerp import SUPERUSER_ID from openerp import http from openerp.http import request from openerp.addons.web.controllers.main import content_disposition import mimetypes class MailController(http.Controller): _cp_path = '/mail' @http.route('/mail/download_a...
timduly4/pyglow
refs/heads/master
test/test_igrf.py
1
from datetime import datetime import math import unittest from src.pyglow import IGRF from src.pyglow import LocationTime from src.pyglow.constants import DIR_FILE as pyglow_file print("pyglow file: {}".format(pyglow_file)) class TestIgrf(unittest.TestCase): def setUp(self): self.igrf = IGRF() ...
Lh4cKg/sl4a
refs/heads/master
python-build/python-libs/gdata/src/gdata/test_config.py
133
#!/usr/bin/env python # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
technomonk/opengnss
refs/heads/master
src/gr_gnss/local_code.py
6
# Copyright 2007 Trond Danielsen <trond.danielsen@gmail.com> # # This file is part of OpenGNSS. # # 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 the License, ...
briancoutinho0905/2dsampling
refs/heads/master
util/stats/barchart.py
90
# Copyright (c) 2005-2006 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this ...
yghannam/teuthology
refs/heads/master
teuthology/test/test_get_multi_machine_types.py
10
from .. import misc as teuthology class Mock: pass class TestGetMultiMachineTypes(object): def test_space(self): give = 'burnupi plana vps' expect = ['burnupi','plana','vps'] assert teuthology.get_multi_machine_types(give) == expect def test_tab(self): give = 'burnupi plana v...
polimediaupv/edx-platform
refs/heads/master
lms/envs/dev.py
50
""" This config file runs the simplest dev environment using sqlite, and db-based sessions. Assumes structure: /envroot/ /db # This is where it'll write the database file /edx-platform # The location of this repo /log # Where we're going to write log files """ # We intentionally define lot...
rjschwei/azure-sdk-for-python
refs/heads/master
azure-mgmt-redis/azure/mgmt/redis/models/schedule_entry.py
3
# 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 ...
goodwinnk/intellij-community
refs/heads/master
python/testData/codeInsight/classMRO/ExampleFromDoc1.py
83
class D(object): pass class E(object): pass class F(object): pass class B(D, E): pass class C(D, F): pass class A(B, C): pass
texastribune/armstrong.hatband
refs/heads/master
armstrong/hatband/__init__.py
2
# Make this a drop-in replacement for Django's built-in Admin from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME from django.contrib.admin.options import HORIZONTAL, VERTICAL # Below are overrides that we provide that are Hatband specific from .options import ModelAdmin, StackedInline, TabularInline from ar...
ritksm/leech
refs/heads/master
leech/migrations/0005_auto__add_field_shortenurl_is_show.py
1
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'ShortenUrl.is_show' db.add_column('leech_shortenurl', 'is...
pombredanne/gensim
refs/heads/develop
gensim/test/test_segmentation.py
19
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2011 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Automated tests for segmentation algorithms in the segmentation module. """ import logging import unittest import numpy as np fr...
avoinsystems/odoo
refs/heads/8.0
addons/base_report_designer/openerp_sxw2rml/__init__.py
423
# -*- 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...
awohns/selection
refs/heads/master
python_lib/lib/python3.4/site-packages/numpy/distutils/fcompiler/nag.py
228
from __future__ import division, absolute_import, print_function import sys from numpy.distutils.fcompiler import FCompiler compilers = ['NAGFCompiler'] class NAGFCompiler(FCompiler): compiler_type = 'nag' description = 'NAGWare Fortran 95 Compiler' version_pattern = r'NAGWare Fortran 95 compiler Relea...
zbal/ansible
refs/heads/devel
lib/ansible/config/__init__.py
2520
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
splav/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/pytestrunner/__init__.py
47
from .runner import run # noqa: F401
wikimedia/analytics-snuggle
refs/heads/master
snuggle/mediawiki/parsing.py
1
import re class Token: def __init__(self, match, offset):pass def type(self): return self.__class__.__name__ class InternalLink: expression = r'(\[\[([^\]]+?)(\|([^]]+))?\]\])' groups = 4 def __init__(self, match, offset): self.title = match.group(2).strip() if match.group(3) != None: self.display...
morphis/home-assistant
refs/heads/snap-support
tests/components/climate/test_honeywell.py
12
"""The test the Honeywell thermostat module.""" import socket import unittest from unittest import mock import voluptuous as vol import somecomfort from homeassistant.const import ( CONF_USERNAME, CONF_PASSWORD, TEMP_CELSIUS, TEMP_FAHRENHEIT) from homeassistant.components.climate import ( ATTR_FAN_MODE, ATTR_...
uni-peter-zheng/virt-test
refs/heads/master
virttest/tests/unattended_install.py
2
import logging import time import re import os import tempfile import ConfigParser import threading import shutil import xml.dom.minidom from autotest.client.shared import error, iso9660 from autotest.client import utils from virttest import virt_vm, utils_misc, utils_disk from virttest import qemu_monitor, remote, sys...
jarrodmcc/OpenFermion
refs/heads/master
src/openfermion/measurements/__init__.py
1
# 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, software # distribu...
beezee/GAE-Django-site
refs/heads/master
django/conf/locale/fi/formats.py
316
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. E Y' TIME_FORMAT = 'G.i.s' # DATETIME_FORMAT = YEAR_MONTH_FORMAT = 'F...
utecuy/edx-platform
refs/heads/master
common/djangoapps/microsite_configuration/tests/test_middleware.py
47
# -*- coding: utf-8 -*- """ Test Microsite middleware. """ from mock import patch from django.test import TestCase from django.conf import settings from django.test.client import Client from django.test.utils import override_settings import unittest from student.tests.factories import UserFactory # NOTE: We set SES...
davgibbs/django
refs/heads/master
tests/flatpages_tests/test_models.py
342
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.flatpages.models import FlatPage from django.test import SimpleTestCase from django.test.utils import override_script_prefix class FlatpageModelTests(SimpleTestCase): def test_get_absolute_url_urlencodes(self): pf = Fla...
yohanko88/gem5-DC
refs/heads/master
src/cpu/o3/probe/SimpleTrace.py
59
# Copyright (c) 2013 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
Scoppio/agazeta-rest
refs/heads/master
arquivo/migrations/0003_auto_20170717_2344.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-07-18 02:44 from __future__ import unicode_literals from django.db import migrations, models import uuid class Migration(migrations.Migration): dependencies = [ ('arquivo', '0002_auto_20170716_2157'), ] operations = [ migrations...
ac000/viewbrif
refs/heads/master
tools/semi-brif-fields.py
1
#!/usr/bin/python # import sys def do_main_record(line): print "Main Record Line" print print "\tF3 = " + line[2:3] print "\tF5 = " + line[4:5] print "\tF15 = " + line[72:84] print "\tF18 = " + line[136:] def do_purchasing_card(line): print "Purchasing Card Line" print print "\tF6 = " + line[5:17] print...
PyLearner/tp-qemu
refs/heads/master
qemu/tests/block_copy.py
4
import re import time import random import logging from autotest.client.shared import utils from autotest.client.shared import error from virttest import data_dir from virttest import storage from virttest import utils_misc from virttest import qemu_monitor def speed2byte(speed): """ convert speed to Bytes/...
tarzan0820/odoo
refs/heads/8.0
addons/account/ir_sequence.py
336
# -*- 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...
sniemi/SamPy
refs/heads/master
sandbox/src1/TCSE3-3rd-examples/src/py/mixed/Grid2D/C++/convertptr/test.py
1
#!/usr/bin/env python import ext_gridloop from numpy import linspace, zeros c = ext_gridloop.Convert_MyArray() n = 3 a = zeros((n,n)) xcoor = linspace(0, 1, 3) ycoor = xcoor.copy def f(x, y): print "in f(%g,%g)" % (x,y) return x+y+1 x_p = c.py2my(xcoor) y_p = c.py2my(ycoor) a_p = c.py2my(a) x_p = c.py2my(xco...
DNFcode/edx-platform
refs/heads/master
lms/djangoapps/dashboard/support_urls.py
95
""" URLs for support dashboard """ from django.conf.urls import patterns, url from django.contrib.auth.decorators import permission_required from dashboard import support urlpatterns = patterns( '', url(r'^$', permission_required('student.change_courseenrollment')(support.SupportDash.as_view()), name="support...
dsturnbull/thrift
refs/heads/master
tutorial/py.tornado/PythonClient.py
68
#!/usr/bin/env python # # 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 # "L...
KaiRo-at/socorro
refs/heads/master
socorro/unittest/collector/test_wsgi_breakpad_collector.py
3
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import hashlib import StringIO import gzip import mock from nose.tools import eq_, ok_ from datetime import datetime fr...
gazend/pocket
refs/heads/master
vendor/doctrine/orm/docs/en/conf.py
2448
# -*- coding: utf-8 -*- # # Doctrine 2 ORM documentation build configuration file, created by # sphinx-quickstart on Fri Dec 3 18:10:24 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. ...
HyperBaton/ansible
refs/heads/devel
lib/ansible/modules/packaging/os/flatpak_remote.py
61
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017 John Kwiatkoski (@JayKayy) <jkwiat40@gmail.com> # Copyright: (c) 2018 Alexander Bethke (@oolongbrothers) <oolongbrothers@gmx.net> # Copyright: (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0...
ashhher3/ibis
refs/heads/master
ibis/sql/sqlite/tests/test_functions.py
5
# Copyright 2015 Cloudera 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 writing, so...
pkimber/kbsoftware_couk
refs/heads/master
web/tests/test_view_perm.py
1
# -*- encoding: utf-8 -*- from __future__ import unicode_literals from django.core.urlresolvers import reverse from base.tests.test_utils import PermTestCase from login.tests.scenario import default_scenario_login class TestViewPerm(PermTestCase): def setUp(self): default_scenario_login() def test...
mancoast/CPythonPyc_test
refs/heads/master
cpython/271_test_scriptpackages.py
137
# Copyright (C) 2003 Python Software Foundation import unittest from test import test_support # Skip this test if aetools does not exist. test_support.import_module('aetools') class TestScriptpackages(unittest.TestCase): def _test_scriptpackage(self, package, testobject=1): # Check that we can import th...
wileeam/airflow
refs/heads/master
airflow/kubernetes/pod.py
6
# 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...
jjmleiro/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/contrib/sessions/backends/cache.py
122
from django.conf import settings from django.contrib.sessions.backends.base import SessionBase, CreateError from django.core.cache import get_cache from django.utils.six.moves import xrange KEY_PREFIX = "django.contrib.sessions.cache" class SessionStore(SessionBase): """ A cache-based session store. """ ...
lidavidm/mathics-heroku
refs/heads/master
venv/lib/python2.7/site-packages/sympy/mpmath/functions/functions.py
6
from ..libmp.backend import xrange class SpecialFunctions(object): """ This class implements special functions using high-level code. Elementary and some other functions (e.g. gamma function, basecase hypergeometric series) are assumed to be predefined by the context as "builtins" or "low-level" f...
priestc/moneywagon
refs/heads/master
tests.py
2
import datetime from moneywagon.supply_estimator import SupplyEstimator from moneywagon.crypto_data import crypto_data def test_blocktime_adjustments(): sd = { 'method': 'standard', 'start_coins_per_block': 80, 'minutes_per_block': 2, 'blocktime_adjustments': [ [4, 1], ...
alxnov/ansible-modules-core
refs/heads/devel
files/unarchive.py
6
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2013, Dylan Martin <dmartin@seattlecentral.edu> # (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the t...
efiring/UTide
refs/heads/master
utide/_time_conversion.py
1
""" Utility for allowing flexible time input. """ from __future__ import (absolute_import, division, print_function) import warnings from datetime import date, datetime try: from datetime import timezone have_tz = True except ImportError: have_tz = False def _normalize_time(t, epoch): if epoch == '...
programmecat/linux
refs/heads/master
scripts/analyze_suspend.py
1540
#!/usr/bin/python # # Tool for analyzing suspend/resume timing # Copyright (c) 2013, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This prog...