repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
geminy/aidear
refs/heads/master
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/ui/resources/resource_check/resource_scale_factors.py
44
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Presubmit script for Chromium browser resources. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about t...
Vegasvikk/django-cms
refs/heads/develop
cms/south_migrations/0014_sites_removed.py
1680
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() user_orm_label...
ubirch/aws-tools
refs/heads/master
virtual-env/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py
1776
######################## 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...
KingxBanana/zulip
refs/heads/master
zerver/lib/url_preview/preview.py
27
from __future__ import absolute_import import re import logging import traceback from typing import Any, Optional, Text from typing.re import Match import requests from zerver.lib.cache import cache_with_key, get_cache_with_key from zerver.lib.url_preview.oembed import get_oembed_data from zerver.lib.url_preview.parser...
basicthinker/Sexain-MemController
refs/heads/master
gem5-stable/src/arch/mips/MipsInterrupts.py
69
# Copyright (c) 2008 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 list ...
andrewjrobinson/SportsReview
refs/heads/master
sportsreview/delayvideo/video/framebuffer.py
1
# /******************************************************************************* # * (c) Andrew Robinson (andrewjrobinson@gmail.com) 2014 * # * * # * This file is part of SportsReview. ...
alexthered/kienhoc-platform
refs/heads/master
lms/djangoapps/shoppingcart/migrations/0001_initial.py
182
# -*- 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 model 'Order' db.create_table('shoppingcart_order', ( ('id', self.gf('django.db.models....
aurelijusb/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Lib/telnetlib.py
65
r"""TELNET client class. Based on RFC 854: TELNET Protocol Specification, by J. Postel and J. Reynolds Example: >>> from telnetlib import Telnet >>> tn = Telnet('www.python.org', 79) # connect to finger port >>> tn.write('guido\r\n') >>> print tn.read_all() Login Name TTY Idle When ...
ahmedaljazzar/edx-platform
refs/heads/master
openedx/core/djangoapps/programs/tests/factories.py
4
"""Factories for generating fake program-related data.""" # pylint: disable=missing-docstring import factory class ProgressFactory(factory.Factory): class Meta(object): model = dict uuid = factory.Faker('uuid4') completed = 0 in_progress = 0 not_started = 0 grades = dict()
jflory7/PyCut
refs/heads/master
game/objects/toggle.py
4
import pygame from game.events import Togglable from . import STATE, STYLES_NAMES as SM class Toggle(Togglable): """docstring for Button""" def __init__(self, context, label=""): Togglable.__init__(self) self.context = context self.setState(STATE.NORMAL) self.label = label ...
pcmanus/cassandra-dtest
refs/heads/master
cassandra/v11/Cassandra.py
11
# # Autogenerated by Thrift Compiler (0.8.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TException from ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport from thrift.protocol im...
hidekb/espressopp
refs/heads/master
src/tools/analyse.py
7
# 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...
vrodgom/statmorph
refs/heads/master
statmorph/utils/image_diagnostics.py
1
""" This file defines the `make_figure` function, which can be useful for debugging and/or examining the morphology of a source in detail. """ # Author: Vicente Rodriguez-Gomez <v.rodriguez@irya.unam.mx> # Licensed under a 3-Clause BSD License. import numpy as np import sys import skimage.transform import statmorph fr...
daoluan/decode-Django
refs/heads/master
Django-1.5.1/tests/modeltests/ordering/models.py
114
""" 6. Specifying ordering Specify default ordering for a model using the ``ordering`` attribute, which should be a list or tuple of field names. This tells Django how to order ``QuerySet`` results. If a field name in ``ordering`` starts with a hyphen, that field will be ordered in descending order. Otherwise, it'll ...
HenryHu/Turpial
refs/heads/development
turpial/ui/qt/shortcuts.py
2
# -*- coding: utf-8 -*- # Qt shortcuts for Turpial from PyQt4.QtCore import Qt from PyQt4.QtCore import QObject from PyQt4.QtCore import pyqtSignal from PyQt4.QtGui import QAction from PyQt4.QtGui import QShortcut from PyQt4.QtGui import QKeySequence from libturpial.common import OS_MAC from libturpial.common.tools...
rgeleta/odoo
refs/heads/8.0
addons/account_chart/__init__.py
526
# -*- 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...
MihaiMoldovanu/ansible
refs/heads/devel
lib/ansible/modules/cloud/openstack/os_router.py
7
#!/usr/bin/python # # Copyright: 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'],...
zaycev/n7
refs/heads/master
n7/model.py
1
#!/usr/bin/env python # coding: utf-8 # Copyright (C) Vladimir M. Zaytsev <zaytsev@usc.edu> # Author: Vladimir M. Zaytsev <zaytsev@usc.edu> # URL: <http://zvm.me/> # For more information, see README.md # For license information, see LICENSE import csv import logging import numpy as np from itertools import imap fro...
zdary/intellij-community
refs/heads/master
python/testData/intentions/PyAnnotateVariableTypeIntentionTest/annotationTupleType.py
19
v<caret>ar = (1, 'foo', None)
beernarrd/gramps
refs/heads/sl-master
gramps/gen/db/dummydb.py
1
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2010 Nick Hall # Copyright (C) 2016 Tim G L Lyons # # 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...
pawelmhm/AutobahnPython
refs/heads/master
autobahn/autobahn/wamp/types.py
2
############################################################################### ## ## Copyright (C) 2013-2014 Tavendo GmbH ## ## 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 ## ## h...
dulems/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/aggregation/tests.py
59
from __future__ import absolute_import import datetime from decimal import Decimal from django.db.models import Avg, Sum, Count, Max, Min from django.test import TestCase, Approximate from .models import Author, Publisher, Book, Store class BaseAggregateTestCase(TestCase): fixtures = ["aggregation.json"] ...
Roguelazer/send_nsca
refs/heads/master
send_nsca/nagios.py
2
""" Some common Nagios things """ STATE_OK = 0 STATE_WARNING = 1 STATE_CRITICAL = 2 STATE_UNKNOWN = 3 States = { STATE_OK: 'OK', STATE_WARNING: 'WARNING', STATE_CRITICAL: 'CRITICAL', STATE_UNKNOWN: 'UNKNOWN', }
bassosimone/yaml-cpp
refs/heads/master
test/gmock-1.7.0/gtest/test/gtest_xml_output_unittest.py
1815
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
ewels/MultiQC
refs/heads/master
multiqc/modules/samblaster/samblaster.py
1
#!/usr/bin/env python """ MultiQC module to parse output from Samblaster """ from __future__ import print_function import os from collections import OrderedDict import logging import re from multiqc.plots import bargraph from multiqc.modules.base_module import BaseMultiqcModule # Initialise the logger log = logging....
ronekko/chainer
refs/heads/master
tests/chainer_tests/functions_tests/normalization_tests/test_local_response_normalization.py
4
import unittest import numpy import six from chainer.backends import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import backend @testing.parameterize(*testing.product({ 'dtype': [numpy.float16, numpy.float32, numpy.float64], })) @backend...
DataONEorg/d1_python
refs/heads/master
test_utilities/src/d1_test/mock_api/is_authorized.py
1
#!/usr/bin/env python # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2019 DataONE # # Licensed under the Apache License, Version 2.0 (t...
jafd/sqlbricks
refs/heads/master
sqlbricks/postgresql/__init__.py
1
""" The set of objects as is specific to PostgreSQL. """
ticosax/django
refs/heads/master
tests/template_tests/filter_tests/test_default_if_none.py
523
from django.template.defaultfilters import default_if_none from django.test import SimpleTestCase class FunctionTests(SimpleTestCase): def test_value(self): self.assertEqual(default_if_none("val", 'default'), 'val') def test_none(self): self.assertEqual(default_if_none(None, 'default'), 'def...
zhangxin20121923/QuanSim
refs/heads/master
baseClass/baseCF.py
1
from Qubit import * sys.path.append('../tools/') from interactCfg import writeErrorMsg from helperFunction import get_curl_info class ControlFlow: def __init__(self,q,v): self.ql = [] self.vl = [] typeQ = type(q) typeV = type(v) if typeQ == Qubit and typeV == int: self.ql.append(q) self.vl.append(v) ...
Anislav/Stream-Framework
refs/heads/master
feedly/conftest.py
4
import pytest import redis @pytest.fixture(autouse=True) def celery_eager(): from celery import current_app current_app.conf.CELERY_ALWAYS_EAGER = True current_app.conf.CELERY_EAGER_PROPAGATES_EXCEPTIONS = True @pytest.fixture def redis_reset(): redis.Redis().flushall() @pytest.fixture def cassand...
nanuxbe/microbit-files
refs/heads/master
multi_color_led.py
1
from microbit import * ct = 0 direction = 1 # pin0.write_digital(1) top = 1110 side = 11111 while True: sleep(100) # display.scroll(str(pin0.read_analog())) val = max((pin0.read_analog() - 843) // 20, 0) matrix = "{top}:{side}:{side}:{side}:{top}".format( top="{:05d}".format(top * val)...
bright-sparks/chromium-spacewalk
refs/heads/master
third_party/google_appengine_cloudstorage/cloudstorage/__init__.py
247
# Copyright 2014 Google 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 by applicable law or ag...
tzq668766/pyspider
refs/heads/master
pyspider/webui/result.py
32
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2014-10-19 16:23:55 from __future__ import unicode_literals from flask import render_template, request, json from flask import Response from .app import a...
schettino72/serveronduty
refs/heads/master
websod/models.py
1
from sqlalchemy import Table, Column, ForeignKey from sqlalchemy import String, Integer, Text, DateTime, Float, Boolean from sqlalchemy.orm import mapper, relation, backref from sqlalchemy.sql import functions from websod.database import metadata source_tree_root_table = Table( 'source_tree_root', metadata, ...
DeanHere/rietveld
refs/heads/master
tests/utils.py
22
# Copyright 2011 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 law or agreed to in writing, ...
Grirrane/odoo
refs/heads/master
openerp/addons/base/ir/ir_exports.py
8
# -*- coding: utf-8 -*- ############################################################################## # # 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...
hynekcer/django
refs/heads/master
django/core/files/uploadhandler.py
335
""" Base file upload handler classes, and the built-in concrete subclasses """ from __future__ import unicode_literals from io import BytesIO from django.conf import settings from django.core.files.uploadedfile import ( InMemoryUploadedFile, TemporaryUploadedFile, ) from django.utils.encoding import python_2_uni...
allotria/intellij-community
refs/heads/master
python/testData/refactoring/rename/googleDocStringPositionalVararg_after.py
53
def f(*bar): """ Args: *bar: """
trosa/forca
refs/heads/master
gluon/rocket.py
1
# -*- coding: utf-8 -*- # This file is part of the Rocket Web Server # Copyright (c) 2010 Timothy Farrell # Import System Modules import sys import errno import socket import logging import platform # Define Constants VERSION = '1.2.2' SERVER_NAME = socket.gethostname() SERVER_SOFTWARE = 'Rocket %s' % VERSION HTTP_S...
reddymeghraj/showroom
refs/heads/master
erpnext/hr/doctype/job_opening/job_opening.py
59
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class JobOpening(Document): pass
dfalt974/SickRage
refs/heads/master
lib/js2py/legecy_translators/utils.py
96
import sys import unicodedata from collections import defaultdict def is_lval(t): """Does not chceck whether t is not resticted or internal""" if not t: return False i = iter(t) if i.next() not in IDENTIFIER_START: return False return all(e in IDENTIFIER_PART for e in i) def is_val...
AvengersPy/MyPairs
refs/heads/master
zipline/examples/quantopian_buy_apple.py
8
# # Copyright 2014 Quantopian, 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 wr...
wakatime/wakatime
refs/heads/master
wakatime/packages/py27/pygments/lexers/scripting.py
2
# -*- coding: utf-8 -*- """ pygments.lexers.scripting ~~~~~~~~~~~~~~~~~~~~~~~~~ Lexer for scripting and embedded languages. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, byg...
jetskijoe/SickGear
refs/heads/master
lib/hachoir_core/__init__.py
95
from hachoir_core.version import VERSION as __version__, PACKAGE, WEBSITE, LICENSE
appleseedhq/gaffer
refs/heads/master
python/GafferSceneTest/ParametersTest.py
1
########################################################################## # # Copyright (c) 2015, Image Engine Design 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: # # * Redistrib...
niksolaz/GeoJS
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/colorama/__init__.py
445
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. from .initialise import init, deinit, reinit from .ansi import Fore, Back, Style, Cursor from .ansitowin32 import AnsiToWin32 __version__ = '0.3.3'
lucasRogerioOliveira/agenda-eletronica
refs/heads/master
backend/appengine/routes/estabelecimentos/home.py
2
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from config.template_middleware import TemplateResponse from gaecookie.decorator import no_csrf from gaepermission.decorator import login_not_required @login_not_required @no_csrf def index(): links = [ { 'name': '...
tsdmgz/ansible
refs/heads/devel
lib/ansible/modules/network/avi/avi_webhook.py
27
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # # # 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...
mattvonrocketstein/smash
refs/heads/master
smashlib/ipy3x/core/tests/test_events.py
1
import unittest try: # Python 3.3 + from unittest.mock import Mock except ImportError: from mock import Mock from IPython.core import events import IPython.testing.tools as tt def ping_received(): pass class CallbackTests(unittest.TestCase): def setUp(self): self.em = events.EventManager(...
jamesblunt/edx-platform
refs/heads/master
common/djangoapps/student/middleware.py
172
""" Middleware that checks user standing for the purpose of keeping users with disabled accounts from accessing the site. """ from django.http import HttpResponseForbidden from django.utils.translation import ugettext as _ from django.conf import settings from student.models import UserStanding class UserStandingMidd...
originell/jpype
refs/heads/master
test/jpypetest/test_hash.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 # # ...
cs-manughian/Lectures
refs/heads/master
Python/Functions/memory.py
17
# Before continuing, we should examine Python's memory model x = 10 # The id() function returns the memory address (or some other unique identifier) of a binding print("id(x):", id(x)) y = x print("id(y):", id(y)) # What gets printed? # So y and x are bound to the same value in memory. Is that what you get for primit...
Andrean/lemon.apple
refs/heads/master
server/tests/defs/__init__.py
12
__author__ = 'Andrean'
allotria/intellij-community
refs/heads/master
python/testData/resolve/multiFile/relativeImport/x/__init__.py
79
__author__ = 'ktisha' from . import z as qq print(z)
caveman-dick/ansible
refs/heads/devel
lib/ansible/modules/web_infrastructure/jboss.py
72
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Jeroen Hoekx <jeroen.hoekx@dsquare.be> # 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...
tinfoil/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/checkout/scm/commitmessage.py
150
# Copyright (c) 2009, 2010, 2011 Google Inc. All rights reserved. # Copyright (c) 2009 Apple 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 reta...
catapult-project/catapult-csm
refs/heads/master
telemetry/third_party/modulegraph/modulegraph_tests/testdata/nspkg/distribute-0.6.12/child/namedpkg/slave.py
92
""" slave packages """ import os
sjdv1982/seamless
refs/heads/master
tests/lowlevel/module-package-complex.py
1
import seamless from seamless.core import macro_mode_on from seamless.core import context, cell, macro, transformer mod_init = """ from .mod3 import testvalue """ mod1 = """ from .. import testvalue from ..mod3 import testfunc def func(): return testvalue """ mod2 = """ from .mod1 import func """ mod3 = """ te...
JonasWallin/BayesFlow
refs/heads/master
src/HMres.py
1
# -*- coding: utf-8 -*- """ Created on Mon Aug 18 18:35:14 2014 @author: johnsson """ from __future__ import division import os from mpi4py import MPI import numpy as np import json import matplotlib.pyplot as plt from .HMplot import HMplot from .HMlog import HMlogB, HMElog from .PurePython.GMM import mixture from .u...
chaluemwut/fbserver
refs/heads/master
venv/lib/python2.7/site-packages/sklearn/utils/extmath.py
1
""" Extended math utilities. """ # Authors: Gael Varoquaux # Alexandre Gramfort # Alexandre T. Passos # Olivier Grisel # Lars Buitinck # License: BSD 3 clause from functools import partial import warnings import numpy as np from scipy import linalg from scipy.sparse import issparse...
olapaola/olapaola-android-scripting
refs/heads/master
python/src/Lib/test/test_shelve.py
55
import os import unittest import shelve import glob from test import test_support class TestCase(unittest.TestCase): fn = "shelftemp" + os.extsep + "db" def test_close(self): d1 = {} s = shelve.Shelf(d1, protocol=2, writeback=False) s['key1'] = [1,2,3,4] self.assertEqual(s['ke...
danielkitachewsky/reviewder
refs/heads/master
requests/packages/urllib3/exceptions.py
374
# urllib3/exceptions.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php ## Base Exceptions class HTTPError(Exception): "Base exception used by this module." ...
gengue/django
refs/heads/master
tests/context_processors/tests.py
300
""" Tests for Django's bundled context processors. """ from django.test import SimpleTestCase, TestCase, override_settings @override_settings( ROOT_URLCONF='context_processors.urls', TEMPLATES=[{ 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'APP_DIRS': True, 'OPTIONS':...
shtouff/django
refs/heads/master
django/contrib/staticfiles/views.py
581
""" Views and functions for serving static files. These are only to be used during development, and SHOULD NOT be used in a production setting. """ import os import posixpath from django.conf import settings from django.contrib.staticfiles import finders from django.http import Http404 from django.utils.six.moves.url...
quasiben/bokeh
refs/heads/master
bokeh/util/tests/test_dependencies.py
12
import pytest import bokeh.util.dependencies as dep def test_optional_success(): assert dep.import_optional('sys') is not None def test_optional_fail(): assert dep.import_optional('bleepbloop') is None def test_required_success(): assert dep.import_required('sys', 'yep') is not None def test_required_fa...
rlpy/rlpy
refs/heads/master
tests/test_representations/test_BEBF.py
1
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from rlpy.Representations import BEBF from rlpy.Domains import GridWorld, InfiniteTrackCartPole impo...
brainelectronics/towerdefense
refs/heads/master
tests/image/MATRIX_RGB.py
15
#!/usr/bin/env python '''Test rearrangement of color components using the OpenGL color matrix. The test will be skipped if the GL_ARB_imaging extension is not present. You should see the RGB test image correctly rendered. Press ESC to end the test. ''' from __future__ import print_function __docformat__...
drrk/micropython
refs/heads/master
tests/basics/frozenset_add.py
62
try: frozenset except NameError: print("SKIP") import sys sys.exit() s = frozenset({1, 2, 3, 4}) try: print(s.add(5)) except AttributeError: print("AttributeError")
MattCrystal/drunken-avenger
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...
t794104/ansible
refs/heads/devel
lib/ansible/modules/network/netvisor/_pn_vlan.py
47
#!/usr/bin/python """ PN CLI vlan-create/vlan-delete """ # # 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...
mustafat/odoo-1
refs/heads/8.0
addons/procurement/procurement.py
32
# -*- 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...
silviocsg/ns-3-pcp
refs/heads/master
waf-tools/cflags.py
59
from waflib import Logs, Options, Utils class CompilerTraits(object): def get_warnings_flags(self, level): """get_warnings_flags(level) -> list of cflags""" raise NotImplementedError def get_optimization_flags(self, level): """get_optimization_flags(level) -> list of cflags""" raise NotImplementedError d...
sodo13/openpli-gls
refs/heads/master
lib/python/Components/PackageInfo.py
43
import xml.sax from Tools.Directories import crawlDirectory, resolveFilename, SCOPE_CONFIG, SCOPE_SKIN, copyfile, copytree from Components.NimManager import nimmanager from Components.Ipkg import IpkgComponent from Components.config import config, configfile from Tools.HardwareInfo import HardwareInfo from enigma impor...
dendisuhubdy/cuda-convnet2
refs/heads/master
python_util/data.py
180
# Copyright 2014 Google 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 by applicable law or...
kevinmel2000/sl4a
refs/heads/master
python/src/Lib/test/test_socket.py
48
#!/usr/bin/env python import unittest from test import test_support import errno import socket import select import thread, threading import time import traceback import Queue import sys import os import array from weakref import proxy import signal HOST = test_support.HOST MSG = 'Michael Gilfix was here\n' class S...
jazzmes/ryu
refs/heads/master
ryu/contrib/ovs/json.py
52
# Copyright (c) 2010, 2011, 2012 Nicira, 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 agre...
nrejack/redi
refs/heads/master
test/TestResume.py
2
#!/usr/bin/env python # Contributors: # Christopher P. Barnes <senrabc@gmail.com> # Andrei Sura: github.com/indera # Mohan Das Katragadda <mohan.das142@gmail.com> # Philip Chase <philipbchase@gmail.com> # Ruchi Vivek Desai <ruchivdesai@gmail.com> # Taeber Rapczak <taeber@ufl.edu> # Nicholas Rejack <nrejack@ufl.edu> # ...
franosincic/edx-platform
refs/heads/master
openedx/core/djangoapps/ccxcon/tests/factories.py
65
""" Dummy factories for tests """ from factory.django import DjangoModelFactory from openedx.core.djangoapps.ccxcon.models import CCXCon class CcxConFactory(DjangoModelFactory): """ Model factory for the CCXCon model """ class Meta(object): model = CCXCon oauth_client_id = 'asdfjasdljfasd...
jjs0sbw/CSPLN
refs/heads/master
apps/scaffolding/version/MKE_v00_01_02/languages/zh-cn.py
142
# coding: utf8 { '!langcode!': 'zh-cn', '!langname!': '中文', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" 应为选择表达式, 格式如 "field1=\'value\'". 但是对 JOIN 的结果不可以使用 update 或者 delete"', '%s %%{row} deleted': '已删除 %s 笔', '%s %%{row} updated': '已更新 %s...
schmichael/mmstats
refs/heads/master
mmstats/slurpstats.py
1
#!/usr/bin/env python import errno import glob import mmap import sys import traceback from mmstats import defaults, reader as mmstats_reader def err(*args): """Laziness""" sys.stderr.write('%s\n' % ' '.join(map(str, args))) def slurp_stats(full_fn, m): """mmap parsing mainloop""" reader = mmstats_...
jumpstarter-io/cinder
refs/heads/master
cinder/volume/drivers/hitachi/hbsd_iscsi.py
6
# Copyright (C) 2014, Hitachi, Ltd. # # 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...
kennedyshead/home-assistant
refs/heads/dev
tests/helpers/test_frame.py
5
"""Test the frame helper.""" from unittest.mock import Mock, patch import pytest from homeassistant.helpers import frame async def test_extract_frame_integration(caplog, mock_integration_frame): """Test extracting the current frame from integration context.""" found_frame, integration, path = frame.get_inte...
2013Commons/hue
refs/heads/master
desktop/core/ext-py/Django-1.4.5/django/core/files/storage.py
78
import os import errno import urlparse import itertools from datetime import datetime from django.conf import settings from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation from django.core.files import locks, File from django.core.files.move import file_move_safe from django.utils.encoding impo...
areku/pytagsfs
refs/heads/master
modules/pytagsfs/pytags.py
2
# Copyright (c) 2007-2008 Forest Bond. # This file is part of the pytagsfs software package. # # pytagsfs is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License version 2 as published by the Free # Software Foundation. # # A copy of the license has been included i...
vogonsoft/pytest-tutorial
refs/heads/master
test03/conftest.py
2
import os import os.path import sys import pytest sys.path.append(os.path.join(os.getcwd(), '.')) sys.path.append(os.path.join(os.getcwd(), '..')) class Mod: def __init__(self): self.modulus = 1024 @pytest.fixture() def mod(request): m = Mod() def fin(): print 'Finalizing mod' request.addfinalizer(fin) retu...
rrader/trafaret
refs/heads/master
samples/sample3.py
2
""" So, you have some structure from wild. Say this will be some JSON over API. But you cant change this JSON structure. """ sample_data = { 'userNameFirst': 'Adam', 'userNameSecond': 'Smith', 'userPassword': 'supersecretpassword', 'userEmail': 'adam@smith.math.edu', 'userRoles':...
aitoehigie/gidimagic
refs/heads/master
venv/lib/python2.7/site-packages/jinja2/exceptions.py
977
# -*- coding: utf-8 -*- """ jinja2.exceptions ~~~~~~~~~~~~~~~~~ Jinja exceptions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from jinja2._compat import imap, text_type, PY2, implements_to_string class TemplateError(Exception): """Baseclass for al...
t3hi3x/p-k.co
refs/heads/master
chartit/exceptions.py
6
"""Global ChartIt exception and warning classes.""" class APIInputError(Exception): """Some kind of problem when validating the user input.""" pass
thensgens/vvs
refs/heads/master
src/werkzeug/testsuite/internal.py
76
# -*- coding: utf-8 -*- """ werkzeug.testsuite.internal ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Internal tests. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import unittest from datetime import datetime from warnings import filterwarnings, resetwarnings from werkz...
pongem/python-bot-project
refs/heads/master
appengine/standard/botapp/lib/django/middleware/cache.py
49
""" Cache middleware. If enabled, each Django-powered page will be cached based on URL. The canonical way to enable cache middleware is to set ``UpdateCacheMiddleware`` as your first piece of middleware, and ``FetchFromCacheMiddleware`` as the last:: MIDDLEWARE = [ 'django.middleware.cache.UpdateCacheMiddl...
pwnall/ansible
refs/heads/devel
lib/ansible/plugins/lookup/template.py
63
# (c) 2012, 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) any lat...
frvannes16/Cops-Robbers-Coding-Challenge
refs/heads/master
src/competition_code/libs/requests/status_codes.py
148
# -*- coding: utf-8 -*- from .structures import LookupDict _codes = { # Informational. 100: ('continue',), 101: ('switching_protocols',), 102: ('processing',), 103: ('checkpoint',), 122: ('uri_too_long', 'request_uri_too_long'), 200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/'...
Yelp/paasta
refs/heads/master
paasta_itests/steps/paasta_api_steps.py
1
# Copyright 2015-2017 Yelp 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 writin...
cameron-upright/rl-glue-ext
refs/heads/master
projects/distribution_tools/Glue-and-C-Codec/coalesce-cpp.py
8
import sys theDir="wiki/current"; theFiles=['CandCPP.wiki.header','CandCPP.wiki.fromsource','RLGlueCore.wiki.macbinary','CandCPP.wiki.linux','CandCPP.wiki.debian32','CandCPP.wiki.debian64','CandCPP.wiki.rpm32','CandCPP.wiki.rpm64','CandCPP.wiki.footer']; outfileName="wiki/current/CandCPP.wiki" outfile = file(outfileN...
ghedsouza/django
refs/heads/master
tests/model_formsets/tests.py
5
import datetime import re from datetime import date from decimal import Decimal from django import forms from django.core.exceptions import ImproperlyConfigured from django.db import models from django.forms.models import ( BaseModelFormSet, _get_foreign_key, inlineformset_factory, modelformset_factory, ) from...
adedayo/intellij-community
refs/heads/master
python/testData/keywordCompletion/continue.py
83
for x in []: conti<caret>
justathoughtor2/atomicApe
refs/heads/encaged
cygwin/lib/python2.7/site-packages/pygments/lexers/textedit.py
47
# -*- coding: utf-8 -*- """ pygments.lexers.textedit ~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for languages related to text processing. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from bisect import bisect from pygments.lexer im...
sourcepole/qgis
refs/heads/threading-globe
qgis/src/plugins/grass/scripts/qgis.v.kernel.rast.py
6
#!/usr/bin/env python ############################################################################ # # MODULE: qgis.v.kernel.rast.py # AUTHOR(S): Radim Blazek # # PURPOSE: Export a vectore to PostGIS (PostgreSQL) database table # COPYRIGHT: (C) 2009 by Radim Blazek # # This program is fr...
DARKPOP/external_chromium_org
refs/heads/dark-5.1
chrome/common/extensions/docs/server2/branch_utility.py
41
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import logging import operator from appengine_url_fetcher import AppEngineUrlFetcher import url_constants class ChannelInfo(object): '''...