repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
testbed/testbed
refs/heads/master
testbed/libexec/test/test.py
2
# (c) 2015 Mark Hamilton, <mark.lee.hamilton@gmail.com> # # This file is part of testbed # # Testbed 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 l...
LukeMurphey/splunk-file-info
refs/heads/master
tests/HTMLTestRunner.py
1
# -*- coding: utf-8 -*- """ A TestRunner for use with the Python unit testing framework. It generates a HTML report to show the result at a glance. The simplest way to use this is to invoke its main method. E.g. import unittest import HTMLTestRunner ... define your tests ... if __name__ == '__main__...
brennie/reviewboard
refs/heads/master
reviewboard/attachments/evolutions/file_attachment_orig_filename.py
10
from __future__ import unicode_literals from django_evolution.mutations import AddField from django.db import models MUTATIONS = [ AddField('FileAttachment', 'orig_filename', models.CharField, max_length=256, null=True) ]
nishad-jobsglobal/odoo-marriot
refs/heads/master
addons/hr_payroll_account/__openerp__.py
260
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # it ...
anant-dev/django
refs/heads/master
tests/custom_pk/tests.py
326
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import IntegrityError, transaction from django.test import TestCase, skipIfDBFeature from django.utils import six from .models import Bar, Business, Employee, Foo class BasicCustomPKTests(TestCase): @classmethod def setUpTestData...
rmcgibbo/numpy
refs/heads/master
numpy/lib/utils.py
15
from __future__ import division, absolute_import, print_function import os import sys import types import re import warnings from numpy.core.numerictypes import issubclass_, issubsctype, issubdtype from numpy.core import ndarray, ufunc, asarray __all__ = [ 'issubclass_', 'issubsctype', 'issubdtype', 'deprecate',...
brian-yang/mozillians
refs/heads/master
vendor-local/lib/python/unidecode/x0b1.py
253
data = ( 'nyaess', # 0x00 'nyaeng', # 0x01 'nyaej', # 0x02 'nyaec', # 0x03 'nyaek', # 0x04 'nyaet', # 0x05 'nyaep', # 0x06 'nyaeh', # 0x07 'neo', # 0x08 'neog', # 0x09 'neogg', # 0x0a 'neogs', # 0x0b 'neon', # 0x0c 'neonj', # 0x0d 'neonh', # 0x0e 'neod', # 0x0f 'neol', ...
VasilyNemkov/percona-xtrabackup
refs/heads/2.3
storage/innobase/xtrabackup/test/python/testtools/monkey.py
64
# Copyright (c) 2010 testtools developers. See LICENSE for details. """Helpers for monkey-patching Python code.""" __all__ = [ 'MonkeyPatcher', 'patch', ] class MonkeyPatcher(object): """A set of monkey-patches that can be applied and removed all together. Use this to cover up attributes with n...
goldeneye-source/ges-python
refs/heads/master
lib/email/mime/nonmultipart.py
335
# Copyright (C) 2002-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Base class for MIME type messages that are not multipart.""" __all__ = ['MIMENonMultipart'] from email import errors from email.mime.base import MIMEBase class MIMENonMultipart(MIMEBase): """Base cl...
Oslandia/vizitown_plugin
refs/heads/master
twisted/web/microdom.py
40
# -*- test-case-name: twisted.web.test.test_xml -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Micro Document Object Model: a partial DOM implementation with SUX. This is an implementation of what we consider to be the useful subset of the DOM. The chief advantage of this library is ...
clconway/shipshape
refs/heads/master
third_party/node/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py
2698
#!/usr/bin/env python # Copyright (c) 2011 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. """ Unit tests for the easy_xml.py file. """ import gyp.easy_xml as easy_xml import unittest import StringIO class TestSequenceFunctions(...
BurtBiel/azure-cli
refs/heads/master
src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_app_gateway/lib/models/template_link.py
1
#--------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. #---------------------------------------------------------------------...
jnayak1/osf.io
refs/heads/develop
api/wikis/serializers.py
6
import sys from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, IDField, TypeField, Link, LinksField, RelationshipField from api.base.utils import absolute_reverse class WikiSerializer(JSONAPISerializer): filterable_fields = frozenset([ 'name', 'date_...
jsoref/django
refs/heads/master
django/db/backends/oracle/schema.py
404
import binascii import copy import datetime import re from django.db.backends.base.schema import BaseDatabaseSchemaEditor from django.db.utils import DatabaseError from django.utils import six from django.utils.text import force_text class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): sql_create_column = "ALT...
Jgarcia-IAS/Fidelizacion_odoo
refs/heads/master
openerp/addons/web_graph/__openerp__.py
376
{ 'name': 'Graph Views', 'category': 'Hidden', 'description': """ Graph Views for Web Client. =========================== * Parse a <graph> view but allows changing dynamically the presentation * Graph Types: pie, lines, areas, bars, radar * Stacked/Not Stacked for areas and bars * Legends:...
AndresCidoncha/BubecasBot
refs/heads/master
telegram/update.py
1
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2016 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
kzietek/dmxAmbientLight
refs/heads/master
tplight.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Control class for TP-Link A19-LB130 RBGW WiFi bulb ''' import datetime import socket import json import sys class LB130(object): ''' Methods for controlling the LB130 bulb ''' encryption_key = 0xAB __udp_ip = "10.0.0.130" __udp_port = 9999 ...
OTAkeys/RIOT
refs/heads/master
dist/tools/compile_and_test_for_board/compile_and_test_for_board.py
3
#! /usr/bin/env python3 """ This script handles building all applications and tests for one board and also execute tests if they are available. An incremental build can selected using `--incremental` to not rerun successful compilation and tests. But then it should be run on a fixed version of the repository as no ve...
westernx/mayatools
refs/heads/master
mayatools/mcc.py
1
import os import struct import glob class ParseError(RuntimeError): pass _get_channels_results = {} def get_channels(xml_path, memoize=True): """Get a list of channel names and their point counts from a Maya MCC cache. :param str xml_path: The XML file for the given cache. :param bool memoize:...
timlinux/inasafe
refs/heads/develop
safe/processors/post_processors.py
2
# coding=utf-8 # pylint: disable=pointless-string-statement # This is disabled for typehinting docstring. """Definitions relating to post-processing.""" import logging from safe.definitions.exposure import exposure_place from safe.definitions.extra_keywords import ( extra_keyword_earthquake_longitude, extra...
apagac/cfme_tests
refs/heads/master
cfme/tests/containers/test_manageiq_ansible_custom_attributes.py
3
import pytest from cfme.containers.provider import ContainersProvider from cfme.utils.ansible import create_tmp_directory from cfme.utils.ansible import fetch_miq_ansible_module from cfme.utils.ansible import remove_tmp_files from cfme.utils.ansible import run_ansible from cfme.utils.ansible import setup_ansible_scrip...
junghans/espressopp
refs/heads/master
src/analysis/Energy.py
2
# Copyright (C) 2012,2013 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of t...
mbevilacqua/appcompatprocessor
refs/heads/master
test/auxTest.py
1
import os import ntpath import settings import random import tempfile import appDB import unicodedata import logging from collections import defaultdict from appAux import update_progress try: from faker import Factory from faker.providers import BaseProvider except ImportError: if settings.__FAKER__: ...
fairbird/OpenPLI-BlackHole
refs/heads/master
lib/python/Components/UsageConfig.py
1
from Components.Harddisk import harddiskmanager from config import ConfigSubsection, ConfigYesNo, config, ConfigSelection, ConfigText, ConfigNumber, ConfigSet, ConfigLocations, ConfigSelectionNumber, ConfigClock, ConfigSlider, ConfigEnableDisable, ConfigSubDict, ConfigNothing, ConfigInteger, ConfigPassword, ConfigIP, C...
yaroslavvb/tensorflow
refs/heads/master
tensorflow/python/framework/device_test.py
106
# 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...
350dotorg/Django
refs/heads/master
django/conf/locale/hi/formats.py
81
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = 'j F Y' TIME_FORMAT = 'g:i:s A' # DATETIME_FORMAT = # YEAR_MONTH_FORMAT = MONTH_DAY_FORMAT = 'j F' SHORT_DATE_FORMAT = 'd-m-Y' # SHORT_DATETIME_FORMAT = # FIRST_DAY_OF_WEEK = # DATE_INPUT_FORMATS = #...
whs/django
refs/heads/master
tests/handlers/views.py
30
from django.core.exceptions import SuspiciousOperation from django.db import connection, transaction from django.http import HttpResponse, StreamingHttpResponse from django.views.decorators.csrf import csrf_exempt try: from http import HTTPStatus except ImportError: # Python < 3.5 pass def regular(request):...
pswaminathan/python_efficiency_tweaks
refs/heads/master
plots/plot_string_subst.py
1
# Plotting performance of string_subst_.py scripts # mean values with variances as error bars import matplotlib.pyplot as plt x = [1, 2, 3] y_1 = [0.0676,0.671266666666667,6.5625] y_2 = [0.659833333333333,6.68196666666667,74.8843333333333] y_3 = [0.0668333333333333,0.687233333333333,6.58736666666667] y_1_err = [0.0...
jean/sentry
refs/heads/master
tests/sentry/deletions/test_apiapplication.py
4
from __future__ import absolute_import from sentry.models import ApiApplication, ApiGrant, ApiToken, ScheduledDeletion from sentry.tasks.deletion import run_deletion from sentry.testutils import TestCase class DeleteApiApplicationTest(TestCase): def test_simple(self): app = ApiApplication.objects.create(...
jtg-gg/blink
refs/heads/dev12-m41
Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
10
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
xxshutong/openerp-7.0
refs/heads/master
openerp/addons/account/report/account_print_invoice.py
61
# -*- 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...
amit0701/rally
refs/heads/master
rally/task/functional.py
6
# Copyright 2015: Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
gitaarik/django
refs/heads/master
tests/admin_registration/tests.py
9
from __future__ import unicode_literals from django.contrib import admin from django.contrib.admin.decorators import register from django.contrib.admin.sites import site from django.core.exceptions import ImproperlyConfigured from django.test import SimpleTestCase from .models import Location, Person, Place, Traveler...
grilo/ansible-1
refs/heads/devel
lib/ansible/modules/storage/netapp/na_cdot_volume.py
28
#!/usr/bin/python # (c) 2017, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
msohailamjad/eudaq
refs/heads/master
legacy/python/example_generic_producer.py
14
#!/usr/bin/env python2 from PyEUDAQWrapper import * # load the ctypes wrapper from StandardEvent_pb2 import StandardEvent import random from time import sleep import numpy as np # for data handling print "Starting PyProducer" # create PyProducer instance pp = PyProducer("GENERIC","tcp://localhost:44000") i = 0 # cou...
overtherain/scriptfile
refs/heads/master
software/googleAppEngine/lib/jinja2/jinja2/ext.py
114
# -*- coding: utf-8 -*- """ jinja2.ext ~~~~~~~~~~ Jinja extensions allow to add custom tags similar to the way django custom tags work. By default two example extensions exist: an i18n and a cache extension. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from collections impor...
anthonydillon/horizon
refs/heads/master
openstack_dashboard/test/integration_tests/tests/decorators.py
23
# 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 # d...
ngvoice/android-client
refs/heads/master
phone/jni/pjsip/sources/tests/pjsua/scripts-sendto/120_sdp_with_video_dynamic_1.py
59
# $Id: 120_sdp_with_video_dynamic_1.py 2081 2008-06-27 21:59:15Z bennylp $ import inc_sip as sip import inc_sdp as sdp # Video uses dynamic payload type sdp = \ """ v=0 o=- 0 0 IN IP4 127.0.0.1 s=- c=IN IP4 127.0.0.1 t=0 0 m=audio 5000 RTP/AVP 0 m=video 4000 RTP/AVP 100 a=rtpmap:100 myvideo/80000 """ pjsua_args = "--...
TheComet93/ontology
refs/heads/master
tests/gmock/gtest/test/gtest_catch_exceptions_test.py
2139
#!/usr/bin/env python # # Copyright 2010 Google Inc. All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list o...
aimas/TuniErp-8.0
refs/heads/master
addons/account_followup/report/account_followup_print.py
222
# -*- 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...
plotly/python-api
refs/heads/master
packages/python/plotly/plotly/validators/histogram2d/_hovertemplate.py
1
import _plotly_utils.basevalidators class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="hovertemplate", parent_name="histogram2d", **kwargs ): super(HovertemplateValidator, self).__init__( plotly_name=plotly_name, ...
hungtt57/matchmaker
refs/heads/master
lib/python2.7/site-packages/idna/intranges.py
154
""" Given a list of integers, made up of (hopefully) a small number of long runs of consecutive integers, compute a representation of the form ((start1, end1), (start2, end2) ...). Then answer the question "was x present in the original list?" in time O(log(# runs)). """ import bisect def intranges_from_list(list_): ...
fritsvanveen/QGIS
refs/heads/master
python/plugins/processing/algs/qgis/ReverseLineDirection.py
5
# -*- coding: utf-8 -*- """ *************************************************************************** ReverseLineDirection.py ----------------------- Date : November 2015 Copyright : (C) 2015 by Nyall Dawson Email : nyall dot dawson at gmail dot com *****...
amenonsen/ansible
refs/heads/devel
lib/ansible/plugins/inventory/kubevirt.py
37
# Copyright (c) 2018 Ansible Project # 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 DOCUMENTATION = ''' name: kubevirt plugin_type: inventory author: - KubeVirt Team...
MjAbuz/watchdog
refs/heads/master
vendor/xappy/searchconnection.py
4
#!/usr/bin/env python # # Copyright (C) 2007 Lemur Consulting Ltd # # 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 your option) any later version. # # ...
gdkar/pyglet
refs/heads/master
contrib/scene2d/examples/los.py
29
# Lots Of Sprites ''' Results (us per sprite per frame): sprites AMD64/mesa AMD64/nv6.6k MacBook Pro AMD/nv7.8k 2000 28.3 29.3 20.6 22.0 after __slots__ removal sprites AMD64/mesa AMD64/nv6.6k MacBook Pro AMD/nv7.8k 2000 ''' import os import sys import random from pyglet ...
pitatensai/you-get
refs/heads/develop
src/you_get/extractors/vidto.py
17
#!/usr/bin/env python __all__ = ['vidto_download'] from ..common import * import pdb import time def vidto_download(url, output_dir='.', merge=True, info_only=False): html = get_content(url) params = {} r = re.findall( r'type="(?:hidden|submit)?"(?:.*?)name="(.+?)"\s* value="?(.+?)">', html) ...
ifiddes/pycbio
refs/heads/master
pycbio/hgdata/psl.py
1
# Copyright 2006-2012 Mark Diekhans import copy from pycbio.hgdata.autoSql import intArraySplit, intArrayJoin, strArraySplit, strArrayJoin from pycbio.sys import fileOps, dbOps from pycbio.sys.multiDict import MultiDict from pycbio.hgdata.rangeFinder import Binner from Bio.Seq import reverse_complement # FIXME: Should...
henriquemiranda/yambopy
refs/heads/master
tutorial/bn/gs_bn.py
4
# # Author: Henrique Pereira Coutada Miranda # Run a Silicon groundstate calculation using Quantum Espresso # from __future__ import print_function, division import sys from qepy import * import argparse from schedulerpy import * kpoints = [12,12,1] kpoints_double = [24,24,1] qpoints = [3,3,1] layer_separation = 12 pw...
acroreiser/kernel_samsung_msm
refs/heads/master
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
# 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, sys sys.path.append(os.env...
cloudfoundry/php-buildpack-legacy
refs/heads/master
builds/runtimes/python-2.7.6/lib/python2.7/test/test_wsgiref.py
51
from __future__ import nested_scopes # Backward compat for 2.1 from unittest import TestCase from wsgiref.util import setup_testing_defaults from wsgiref.headers import Headers from wsgiref.handlers import BaseHandler, BaseCGIHandler from wsgiref import util from wsgiref.validate import validator from wsgiref.simple...
lakshayg/tensorflow
refs/heads/master
tensorflow/contrib/learn/python/learn/estimators/rnn_common.py
33
# 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...
orangeholic/protobuf
refs/heads/master
python/google/protobuf/text_encoding.py
55
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
morpheby/levelup-by
refs/heads/master
common/djangoapps/external_auth/views.py
2
import functools import json import logging import random import re import string # pylint: disable=W0402 import fnmatch import unicodedata from textwrap import dedent from external_auth.models import ExternalAuthMap from external_auth.djangostore import DjangoOpenIDStore from django.conf import settings from d...
ftomassetti/intellij-community
refs/heads/master
python/testData/hierarchy/call/Static/Lambda/file_1.py
80
def func1(): pass def func2(): pass def func3(): pass def func4(): pass def func5(): pass def func6(): pass def func7(): pass def func8(): pass def func9(): pass def func10(): pass def func11(): pass def func12(): pass def func13(): pass def func14(): pass def func15(): pass def func16(): pass def func17(): pass def fu...
rimbalinux/LMD3
refs/heads/master
django/db/models/sql/constants.py
13
import re # Valid query types (a dictionary is used for speedy lookups). QUERY_TERMS = dict([(x, None) for x in ( 'exact', 'iexact', 'contains', 'icontains', 'gt', 'gte', 'lt', 'lte', 'in', 'startswith', 'istartswith', 'endswith', 'iendswith', 'range', 'year', 'month', 'day', 'week_day', 'isnull', 's...
hkariti/ansible
refs/heads/devel
lib/ansible/plugins/netconf/junos.py
16
# # (c) 2017 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
Sorosliu1029/Operating_System
refs/heads/master
related_info/lab8/disksim-homework.py
100
#! /usr/bin/env python from Tkinter import * from types import * import math, random, time, sys, os from optparse import OptionParser from decimal import * MAXTRACKS = 1000 # states that a request/disk go through STATE_NULL = 0 STATE_SEEK = 1 STATE_ROTATE = 2 STATE_XFER = 3 STATE_DONE = 4 # # TODO # XXX tra...
googleads/google-ads-python
refs/heads/master
google/ads/googleads/v8/enums/types/call_tracking_display_location.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...
xsynergy510x/android_external_chromium_org
refs/heads/cm-12.1
third_party/motemplate/motemplate.py
93
# Copyright 2012 Benjamin Kalman # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
openfun/edx-platform
refs/heads/master
common/djangoapps/course_action_state/migrations/0002_add_rerun_display_name.py
129
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'CourseRerunState.display_name' db.add_column('course_action_state_coursererunstate', 'displa...
SaschaMester/delicium
refs/heads/master
tools/memory_inspector/memory_inspector/classification/rules_unittest.py
109
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from memory_inspector.classification import rules _TEST_RULE = """ [ { 'name': '1', 'mmap-file': r'/foo/1', 'foo': 'bar', 'childre...
rjschwei/azure-sdk-for-python
refs/heads/master
azure-batch/azure/batch/models/exit_code_range_mapping.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 ...
lbartoletti/QGIS
refs/heads/master
tests/src/python/test_qgsdelimitedtextprovider.py
10
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsDelimitedTextProvider. .. 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 your option) any later versi...
DChaushev/the-last-stand
refs/heads/master
usrinput.py
1
# input lib from pygame.locals import * import pygame, string class ConfigError(KeyError): pass class Config: """ A utility for configuration """ def __init__(self, options, *look_for): assertions = [] for key in look_for: if key[0] in options.keys(): exec('self.'+key[0]+' = option...
kushalbhola/MyStuff
refs/heads/master
Practice/PythonApplication/env/Lib/site-packages/pandas/tests/scalar/interval/test_ops.py
2
"""Tests for Interval-Interval operations, such as overlaps, contains, etc.""" import pytest from pandas import Interval, Timedelta, Timestamp @pytest.fixture( params=[ (Timedelta("0 days"), Timedelta("1 day")), (Timestamp("2018-01-01"), Timedelta("1 day")), (0, 1), ], ids=lambda ...
ericholscher/django
refs/heads/master
tests/dispatch/tests/test_saferef.py
1
import unittest from django.dispatch.saferef import safeRef from django.utils.six.moves import xrange class Test1(object): def x(self): pass def test2(obj): pass class Test2(object): def __call__(self, obj): pass class SaferefTests(unittest.TestCase): def setUp(self): ts = [...
tukutela/Kay-Framework
refs/heads/master
kay/auth/urls.py
10
# -*- coding: utf-8 -*- """ Kay authentication urls. :Copyright: (c) 2009 Accense Technology, Inc. Takashi Matsuo <tmatsuo@candit.jp>, All rights reserved. :license: BSD, see LICENSE for more details. """ from kay.routing import ( ViewGroup, Rule ) view_groups = [ View...
jmargeta/scikit-learn
refs/heads/master
sklearn/decomposition/tests/test_sparse_pca.py
7
# Author: Vlad Niculae # License: BSD import sys import numpy as np from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import SkipTest from sklearn.utils.testing import assert_true ...
ceglug/math-assistant
refs/heads/master
mathdemov2/mathdemo2/manageprofile.py
1
""" System configuration is one of the most important issues for making this tool more convenient for users. By handling multiple profiles, we can edit, manage and load the profiles for our system. By giving more choices for configuration, this makes our tool dynamic and easy to use. Also configurations can be saved an...
bdaroz/the-blue-alliance
refs/heads/master
tests/suggestions/test_suggestion_creator.py
4
import unittest2 from google.appengine.ext import ndb from google.appengine.ext import testbed from consts.auth_type import AuthType from consts.event_type import EventType from consts.media_type import MediaType from helpers.media_helper import MediaParser from helpers.suggestions.suggestion_creator import Suggestio...
tylerjereddy/scipy
refs/heads/master
scipy/io/harwell_boeing/__init__.py
21
from scipy.io.harwell_boeing.hb import MalformedHeader, HBInfo, HBFile, \ HBMatrixType, hb_read, hb_write
bombilee/pywinauto
refs/heads/master
sandbox/_find_control_distance.py
17
# GUI Application automation and testing library # Copyright (C) 2006 Mark Mc Mahon # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version 2.1 # of the License, or (at you...
vicky2135/lucious
refs/heads/master
oscar/lib/python2.7/site-packages/wcwidth/table_wide.py
28
"""Wide_Eastasian table. Created by setup.py.""" # Generated: 2016-07-02T04:20:28.048222 # Source: EastAsianWidth-9.0.0.txt # Date: 2016-05-27, 17:00:00 GMT [KW, LI] WIDE_EASTASIAN = ( (0x1100, 0x115f,), # Hangul Choseong Kiyeok ..Hangul Choseong Filler (0x231a, 0x231b,), # Watch ..Hourgla...
wehkamp/ansible
refs/heads/devel
test/units/template/__init__.py
7690
# (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...
gramps-project/gramps
refs/heads/master
gramps/gui/editors/displaytabs/surnamemodel.py
11
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2006 Donald N. Allingham # Copyright (C) 2010 Benny Malengier # # 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; ei...
titilambert/teeawards
refs/heads/master
old/beaker/crypto/jcecrypto.py
14
""" Encryption module that uses the Java Cryptography Extensions (JCE). Note that in default installations of the Java Runtime Environment, the maximum key length is limited to 128 bits due to US export restrictions. This makes the generated keys incompatible with the ones generated by pycryptopp, which has no such re...
QuantSoftware/QuantSoftwareToolkit
refs/heads/master
Legacy/Legacy/qstkmodels/OrderModel.py
5
import tables as pt #@UnresolvedImport import time class FillModel(pt.IsDescription): timestamp = pt.Time64Col() quantity = pt.Int32Col() cashChange = pt.Float32Col() commission = pt.Float32Col() impactCost = pt.Float32Col() class OrderModel(pt.IsDescription): task = pt.StringCo...
tboyce1/home-assistant
refs/heads/dev
homeassistant/components/binary_sensor/maxcube.py
4
""" Support for MAX! Window Shutter via MAX! Cube. For more details about this platform, please refer to the documentation https://home-assistant.io/components/maxcube/ """ import logging from homeassistant.components.binary_sensor import BinarySensorDevice from homeassistant.components.maxcube import MAXCUBE_HANDLE ...
dparlevliet/zelenka-report-storage
refs/heads/master
server-db/twisted/internet/test/test_epollreactor.py
39
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet.epollreactor}. """ from __future__ import division, absolute_import from twisted.trial.unittest import TestCase try: from twisted.internet.epollreactor import _ContinuousPolling except ImportError: _Conti...
whip112/Whip112
refs/heads/master
vendor/packages/logilab/astng/test/data/all.py
42
name = 'a' _bla = 2 other = 'o' class Aaa: pass def func(): print 'yo' __all__ = 'Aaa', '_bla', 'name'
Lemon04/Symfony
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. ...
QuLogic/vispy
refs/heads/master
vispy/plot/__init__.py
20
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ This module provides functions for displaying data from a command-line interface. **NOTE**: This module is still experimental, and under development. It currently lacks ax...
openiitbombayx/edx-platform
refs/heads/master
cms/tests/test_startup.py
154
""" Test cms startup """ from django.conf import settings from django.test import TestCase from django.test.utils import override_settings from mock import patch from cms.startup import run, enable_theme class StartupTestCase(TestCase): """ Test cms startup """ def setUp(self): super(Start...
gispd/resources
refs/heads/master
PythonAddins/CopyMapPoint/Install/CopyMapPoint_addin.py
1
# The MIT License (MIT) # Copyright (c) [2014] [GIS Professional Development, gispd.com] # 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 th...
prculley/gramps
refs/heads/master
gramps/gen/lib/test/date_test.py
8
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2007 Donald N. Allingham # Copyright (C) 2013-2014 Vassilii Khachaturov # # 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; eit...
jsr38/necpp
refs/heads/master
testharness/python/test_get_gain.py
2
from necpp import * import unittest class TestDipoleGain(unittest.TestCase): def handle_nec(self, result): if (result != 0): print nec_error_message() self.assertEqual(result,0) def test_example4(self): ''' CEEXAMPLE 4. T ANTENNA ON A BOX OVER PERFECT GROUND SP 0 0 .1 .05 .05 0. 0. .0...
zackmdavis/Finetooth
refs/heads/master
core/colorize.py
1
import itertools from typing import Dict, List, Union def diffract(hex_encoding: str) -> List[int]: return [int(band, 16) for band in (hex_encoding[i:i+2] for i in (0, 2, 4))] def undiffract(rgb: Union[List[int], List[float]]) -> str: return "".join(hex(int(band))[2:].zfill(2) for band in rgb) def interpola...
JayVora-SerpentCS/connector-redmine
refs/heads/8.0
unit/__init__.py
1
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2015 - Present Savoir-faire Linux # (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute i...
SeanMcGrath/ScopeOut
refs/heads/master
scopeout/utilities.py
1
""" Scope Finder ================= Polls serial ports to find compatible oscilloscopes and returns them as Oscilloscope objects. """ import logging import re from visa import ResourceManager, VisaIOError from scopeout import oscilloscopes class ScopeFinder: def __init__(self): """ Constructo...
jason-z-hang/airflow
refs/heads/master
setup.py
1
from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand import sys # Kept manually in sync with airflow.__version__ version = '1.5.2' class Tox(TestCommand): user_options = [('tox-args=', None, "Arguments to pass to tox")] def initialize_options(self): Test...
suncycheng/intellij-community
refs/heads/master
python/testData/inspections/PyArgumentListInspection/badarglist.py
7
# bad argument list samples class A: def foo(self, x, y): pass # no self, but so what def bar(one, two): pass a = A() a.foo(1,2) a.bar(<warning descr="Parameter 'two' unfilled">)</warning>; def f1(): pass f1() f1<warning descr="Unexpected argument(s)">(<warning descr="Unexpected a...
ace8957/SeniorDesignKernel
refs/heads/spitest
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
4653
# EventClass.py # # This is a library defining some events types classes, which could # be used by other scripts to analyzing the perf samples. # # Currently there are just a few classes defined for examples, # PerfEvent is the base class for all perf event sample, PebsEvent # is a HW base Intel x86 PEBS event, and use...
blrm/robottelo
refs/heads/master
tests/foreman/smoke/test_cli_smoke.py
2
"""Smoke tests for the ``CLI`` end-to-end scenario.""" import random from fauxfactory import gen_alphanumeric, gen_ipaddr from robottelo import manifests, ssh from robottelo.cli.activationkey import ActivationKey from robottelo.cli.computeresource import ComputeResource from robottelo.cli.contentview import ContentVie...
1013553207/django
refs/heads/master
django/db/backends/postgresql/base.py
143
""" PostgreSQL database backend for Django. Requires psycopg 2: http://initd.org/projects/psycopg2 """ import warnings from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import DEFAULT_DB_ALIAS from django.db.backends.base.base import BaseDatabaseWrapper from djan...
Lothiraldan/ZeroServices
refs/heads/master
zeroservices/services/__init__.py
1
from .http_interface import get_http_interface, BasicAuth from .http_client import BaseHTTPClient, BasicAuthHTTPClient
zanph/zanph
refs/heads/master
flaskroulette/venv/lib/python2.7/site-packages/wheel/test/test_install.py
455
# Test wheel. # The file has the following contents: # hello.pyd # hello/hello.py # hello/__init__.py # test-1.0.data/data/hello.dat # test-1.0.data/headers/hello.dat # test-1.0.data/scripts/hello.sh # test-1.0.dist-info/WHEEL # test-1.0.dist-info/METADATA # test-1.0.dist-info/RECORD # The ...
studio666/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/same-gyp-name/gyptest-default.py
318
#!/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. """ Build a .gyp that depends on 2 gyp files with the same name. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('all.gyp', chdi...
bwohlberg/sporco
refs/heads/master
sporco/dictlrn/bpdndl.py
1
# -*- coding: utf-8 -*- # Copyright (C) 2015-2020 by Brendt Wohlberg <brendt@ieee.org> # All rights reserved. BSD 3-clause License. # This file is part of the SPORCO package. Details of the copyright # and user license can be found in the 'LICENSE.txt' file distributed # with the package. """Dictionary learning based ...
ADL175/http-server
refs/heads/master
src/server.py
1
"""This is the server code for an HTTP server.""" import socket import sys from email.utils import formatdate def response_ok(): """Return a valid HTTP response.""" message = b'HTTP/1.1 200 OK\r\n' message += u'Date: {}'.format(formatdate(usegmt=True)).encode('utf8') message += b'\r\nContent-Type: te...