text
stringlengths
475
200k
""" SWF (Macromedia/Adobe Flash) file parser. Documentation: - Alexis' SWF Reference: http://www.m2osw.com/swf_alexref.html - http://www.half-serious.com/swf/format/ - http://www.anotherbigidea.com/javaswf/ - http://www.gnu.org/software/gnash/ Author: Victor Stinner Creation date: 29 october 2006 """ from ha...
#!/usr/bin/env python __applicationName__ = "doxypy" __blurb__ = """ doxypy is an input filter for Doxygen. It preprocesses python files so that docstrings of classes and functions are reformatted into Doxygen-conform documentation blocks. """ __doc__ = __blurb__ + \ """ In order to make Doxygen preprocess files thro...
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Gabe Mulley <[EMAIL]> # (c) 2015, David Wittman <[EMAIL]> # 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 = {'meta...
from __future__ import absolute_import import os import shutil from django.core.exceptions import ImproperlyConfigured from django.core.files import File from django.core.files.images import ImageFile from django.test import TestCase from django.utils._os import upath from django.utils.unittest import skipIf try: ...
#!/usr/bin/env python import pyfits from LCScommon import * from pylab import * import os import mystuff as my #these correpond to area w/more uniform covereage MKW824um=array([220.16377,3.4883817,1.3137727,2.5,12.7456],'f') MKW1124um=array([202.36305,11.746882,1.2454248,2.9,206.4],'f') NGC24um=array([244.30994,34.933...
""" Unit tests for the Mixed Modulestore, with DDT for the various stores (Split, Draft, XML) """ from collections import namedtuple import datetime import logging import ddt import itertools import mimetypes from uuid import uuid4 from contextlib import contextmanager from mock import patch, Mock, call # Mixed module...
#!/usr/bin/env python # vim: expandtab:tabstop=4:shiftwidth=4 ''' Send Openshift Master SkyDNS metric checks to Zagg Openshift uses SkyDNS to locate services inside of the cluster. Openshift implements SkyDNS a bit different. Normally SkyDNS uses etcd as a backend for the DNS data to be stored. Openshift us...
# -*- coding: utf-8 -*- from south.v2 import SchemaMigration class Migration(SchemaMigration): depends_on = ( ("people", "0012_move_instutute_models_to_institutes_app"), ) def forwards(self, orm): # moved logic to karaage.people.migrations.0012_move_instutute_models_to_institutes_app ...
""" Support for Xiaomi Yeelight Wifi color bulb. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.yeelight/ """ import logging import colorsys import voluptuous as vol from homeassistant.util.color import ( color_temperature_mired_to_kelvin as ...
# Copyright (c) 2012-2014 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 functiona...
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <[EMAIL]> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. Basically, ...
import sys import imp import marshal from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN from distutils.version import StrictVersion from setuptools import compat __all__ = [ 'Require', 'find_module', 'get_module_constant', 'extract_constant' ] class Require: """A prerequisite to building or inst...
# Copyright 2015, 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 f...
#!/usr/bin/env python # # File Name: sensor_box.py # # Desc: # Control the sensor to get humidity and moisture infomation # If internet is down, store the result into local files # else send the data to the database # import os import time import datetime import logging import subprocess import RPi.GPIO as GPIO impo...
# Copyright 2014-2015 National Institute of Advanced Industrial Science and Technology # # 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 # # U...
# # Copyright (C) 2016 FreeIPA Contributors see COPYING for license # # pylint: disable=unused-import import six from . import Command, Method, Object from ipalib import api, parameters, output from ipalib.parameters import DefaultFrom from ipalib.plugable import Registry from ipalib.text import _ from ipapython.dn ...
# coding: utf-8 from __future__ import unicode_literals import io import logging import os config_text = 'site_name: My Docs\n' index_text = """# Welcome to MkDocs For full documentation visit [mkdocs.org](http://mkdocs.org). ## Commands * `mkdocs new [dir-name]` - Create a new project. * `mkdocs serve` - Start th...
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <[EMAIL]> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as ...
#!/usr/bin/python # $Id: xtalk.py,v 1.4 2008/08/09 17:00:18 normanr Exp $ import sys,os,xmpp,time,select class Bot: def __init__(self,jabber,remotejid): self.jabber = jabber self.remotejid = remotejid def register_handlers(self): self.jabber.RegisterHandler('message',self.xmpp_message...
# -*- coding: utf-8 -*- """ pygments.styles.native ~~~~~~~~~~~~~~~~~~~~~~ pygments version of my "native" vim theme. :copyright: 2006-2007 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from pygments.style import Style from pygments.token import Keyword, Name, Comment, String...
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <[EMAIL]> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def autodict(): ...
# Copyright 2014 The Oppia 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 applicable ...
""" R code printer The RCodePrinter converts single sympy expressions into single R expressions, using the functions defined in math.h where possible. """ from __future__ import print_function, division from sympy.core import S from sympy.core.compatibility import string_types, range from sympy.codegen.ast import...
# -*- encoding: utf-8 -*- ############################################################################### # # # Copyright (C) 2009 Renato Lima - Akretion # # ...
#!/usr/bin/env python """Doxygen XML to SWIG docstring converter. Usage: doxy2swig.py [options] input.xml output.i Converts Doxygen generated XML files into a file containing docstrings that can be used by SWIG-1.3.x. Note that you need to get SWIG version > 1.3.23 or use Robin Dunn's docstring patch to be able t...
""" .15925 Editor Copyright 2014 TechInvestLab.ru [EMAIL] .15925 Editor is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3.0 of the License, or (at your option) any later version. .15925 Ed...
"""Translation helper functions.""" from __future__ import unicode_literals import locale import os import re import sys import gettext as gettext_module from threading import local import warnings from django.utils.importlib import import_module from django.utils.datastructures import SortedDict from django.utils.en...
# -*- coding: utf-8 -*- """ Spanish-specific Form helpers """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import RegexField, Select from django.utils.translation import ugettext_lazy as _ import re class ESPostalCodeField(RegexField): """ A...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # utils.py # Copyright 2012 Joachim Nitschke # # This file is part of Streets4MPI. # # Streets4MPI 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...
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
import re import io import os import sys import codecs from weakref import WeakKeyDictionary PY2 = sys.version_info[0] == 2 CYGWIN = sys.platform.startswith('cygwin') # Determine local App Engine environment, per Google's own suggestion APP_ENGINE = ('APPENGINE_RUNTIME' in os.environ and 'Development/' ...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2012 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the ...
"""Test passing structs to Objective-C methods.""" import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestObjCStructArgument(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp()...
from itertools import chain import networkx as nx from nose.tools import * class TestIsSemiconnected(object): def test_undirected(self): assert_raises(nx.NetworkXNotImplemented, nx.is_semiconnected, nx.Graph()) assert_raises(nx.NetworkXNotImplemented, nx.is_semiconnected, ...
"""Base classes to configure a Named daemon""" import os from typing import List, Union, Sequence, Optional from ipaddress import IPv4Address, IPv6Address, ip_address from mininet.log import lg from ipmininet.overlay import Overlay from ipmininet.utils import realIntfList, find_node, has_cmd from ipmininet.router.con...
"""Run tasks in parallel on a single machine using multiple cores. """ import functools try: import joblib except ImportError: joblib = False from bcbio.distributed import resources from bcbio.log import logger, setup_local_logging from bcbio.pipeline import config_utils from bcbio.provenance import diagnosti...
#!/usr/bin/env python # Copyright 2017 gRPC authors. # # 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 o...
# Copyright (C) 2002-2007 Python Software Foundation # Contact: [EMAIL] """Email address parsing code. Lifted directly from rfc822.py. This should eventually be rewritten. """ __all__ = [ 'mktime_tz', 'parsedate', 'parsedate_tz', 'quote', ] import time SPACE = ' ' EMPTYSTRING...
#!/usr/bin/env python3 # Copyright (c) 2014-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the wallet backup features. Test case is: 4 nodes. 1 2 and 3 send transactions between each other...
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.trial import unittest from twisted.internet import error import socket class TestStringification(unittest.TestCase): """Test that the exceptions have useful stringifications. """ listOfTests = [ #(out...
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana Systems 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.o...
from django.template import TemplateDoesNotExist from django.template.loader import ( get_template, render_to_string, select_template, ) from django.test import SimpleTestCase, override_settings from django.test.client import RequestFactory @override_settings(TEMPLATES=[{ 'BACKEND': 'django.template.backends....
# -*- coding: utf-8 -*- """Serializer tests for the Box addon.""" import mock from nose.tools import * # noqa (PEP8 asserts) from website.addons.base.testing.serializers import StorageAddonSerializerTestSuiteMixin from website.addons.box.tests.utils import MockBox from website.addons.box.tests.factories import BoxAcc...
# Copyright 2009 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 ...
# -*- coding: utf-8 -*- # (c) 2015, Michael Scherer <[EMAIL]> # # 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)...
from os import getenv import requests from behave import * import json from app import server from verify import expect from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions WAIT_SECONDS = 30 BASE_URL = getenv('BAS...
# 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 use ...
#!/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. """ Verifies --generator-output= behavior when using rules. """ import TestGyp # Android doesn't support --generator-output. test = TestGy...
# -*- 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...
# -*- coding: utf-8 -*- ''' Location parser .. moduleauthor:: David Marteau <[EMAIL]> ''' from collections import namedtuple from bitstring import BitStream from .utils import lazyproperty from .constants import (LATEST_BINARY_VERSION, BINARY_VERSION_2, MIN_BYTES_...
""" A set of classes to hold different kinds of hashes etc and convert between them, Much of this was adapted from https://github.com/tehmaze/python-multihash, which seems to have evolved from the pip3 multihash, which is seriously broken. """ import hashlib import struct import sha3 import pyblake2 import base58 imp...
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2015 Yorik van Havre <[EMAIL]> * # * * # * This program is free software; you can redistribute it and/or modify...
from __future__ import print_function import logging import re from functools import partial from streamlink.plugin import Plugin from streamlink.plugin.api import validate from streamlink.stream import HLSStream, DASHStream from streamlink.utils import parse_json, update_scheme, search_dict log = logging.getLogger(...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2009, 2010, 2011 CERN. # # Invenio 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 optio...
from django.shortcuts import render, get_object_or_404 from django.views.generic import DetailView from authen.models import User from fraternity.models import Team, Project from .models import Post, Hashtag class GetUserPosts(DetailView): model = Post template_name = 'posts.html' context_object_name = '...
# 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...
from anytree import Node, RenderTree class SitemapNode(Node): """ A SitemapNode represents a node of the sitemap. The root node (the homepage) is available as a property of the Site class, e.g. site.sitemaps["en"] for the English sitemap. This class is an extension of Node, from the anytree librar...
from ..base import BaseEstimator, TransformerMixin from ..utils import check_array def _identity(X): """The identity function. """ return X class FunctionTransformer(BaseEstimator, TransformerMixin): """Constructs a transformer from an arbitrary callable. A FunctionTransformer forwards its X (a...
"""Policy framework for the email package. Allows fine grained feature control of how the package parses and emits data. """ import abc from email import header from email import charset as _charset from email.utils import _has_surrogates __all__ = [ 'Policy', 'Compat32', 'compat32', ] class _Polic...
#!/usr/bin/env python # ==================================== # Copyright (c) Microsoft Corporation. # All rights reserved. # See license.txt for license information. # ==================================== from __future__ import print_function from __future__ import with_statement from contextlib import contextmanag...
# -*- coding: utf-8 -*- """ For a massive matrix of colors and color labels you can download the follow two files # http://lyst-classifiers.s3.amazonaws.com/color/lab-colors.pk # http://lyst-classifiers.s3.amazonaws.com/color/lab-matrix.pk lab-colors is a cPickled list of color names and lab-matrix is a cPickled (n,3...
import os import time from Tools.CList import CList from Tools.HardwareInfo import HardwareInfo from SystemInfo import SystemInfo from Components.Console import Console import Task def readFile(filename): file = open(filename) data = file.read().strip() file.close() return data def getProcMounts(): try: mounts...
"""monthdelta Date calculation with months: MonthDelta class and monthmod() function. """ __all__ = ['MonthDelta', 'monthmod'] from datetime import date, timedelta class MonthDelta: """Number of months offset from a date or datetime. MonthDeltas allow date calculation without regard to the different length...
""" This module implements clipboard handling on Windows using ctypes. """ import time import contextlib import ctypes from ctypes import c_size_t, sizeof, c_wchar_p, get_errno, c_wchar from .exceptions import PyperclipWindowsException class CheckedCall(object): def __init__(self, f): super(CheckedCall, s...
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import calendar import ipaddress import six from cryptography import ut...
"""Utilities to deal with sympy.Matrix, numpy and scipy.sparse.""" from __future__ import print_function, division from sympy import Matrix, I, Expr, Integer from sympy.core.compatibility import range from sympy.matrices import eye, zeros from sympy.external import import_module __all__ = [ 'numpy_ndarray', ...
import sys from django.test import TestCase, skipUnlessDBFeature, skipIfDBFeature from models import Person if sys.version_info >= (2, 5): from tests_25 import AssertNumQueriesContextManagerTests class SkippingTestCase(TestCase): def test_skip_unless_db_feature(self): "A test that might be skipped ...
""" LLDB Formatters for LLVM data types. Load into LLDB with 'command script import /path/to/lldbDataFormatters.py' """ def __lldb_init_module(debugger, internal_dict): debugger.HandleCommand('type category define -e llvm -l c++') debugger.HandleCommand('type synthetic add -w llvm ' ...
#!/usr/bin/python # Copyright (c) 2009 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. """Docbuilder for extension docs.""" import os import os.path import shutil import sys import time import urllib from subprocess impo...
""" Django settings for todo project. Generated by 'django-admin startproject' using Django 1.10.3. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os #...
#!/usr/bin/env python import cv2 from BaseHTTPServer import BaseHTTPRequestHandler from BaseHTTPServer import HTTPServer import time import argparse from opencvutils import Camera import socket as Socket # import errno # threaded version # http://stackoverflow.com/questions/12650238/processing-simultaneous-asynchrono...
# -*- 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...
#!/usr/bin/env python # # Copyright (c) 2015 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of conditions and t...
# Copyright (c) 2010-2012 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # S/MIME unit tests # # This file is part of kryptomime, a Python module for email kryptography. # Copyright © 2013,2014 Thomas Tanner <[EMAIL]> # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import os import re from collections import OrderedDict import tinycss from PIL import Image, ImageFont, ImageDraw from six import unichr class IconFont(object): """Base class that represents web icon font""" def __init__(self,...
""" Test suite for _osx_support: shared OS X support functions. """ import os import platform import shutil import stat import sys import unittest import test.support import _osx_support @unittest.skipUnless(sys.platform.startswith("darwin"), "requires OS X") class Test_OSXSupport(unittest.TestCase): def setUp...
#! /usr/bin/python3 """Execute arbitrary data as a smart contract.""" import struct import binascii import logging logger = logging.getLogger(__name__) from counterpartylib.lib import (util, config, exceptions) from .scriptlib import (utils, blocks, processblock) FORMAT = '>20sQQQ' LENGTH = 44 ID = 101 def initial...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (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 #...
import sys import re import numpy as np from scipy.sparse import csc_matrix, csr_matrix, lil_matrix from sklearn.utils.testing import (assert_almost_equal, assert_array_equal, assert_true) from sklearn.datasets import load_digits from sklearn.externals.six.moves import cStringIO as ...
#!/usr/bin/python # -*- coding: utf-8 -*- """ ========================================================= PCA example with Iris Data-set ========================================================= Principal Component Analysis applied to the Iris dataset. See `here <http://en.wikipedia.org/wiki/Iris_flower_data_set>`_ fo...
""" Declarative objects. Declarative objects have a simple protocol: you can use classes in lieu of instances and they are equivalent, and any keyword arguments you give to the constructor will override those instance variables. (So if a class is received, we'll simply instantiate an instance with no arguments). You ...
#! /usr/bin/python # See README.txt for information and build instructions. import addressbook_pb2 import sys # This function fills in a Person message based on user input. def PromptForAddress(person): person.id = int(raw_input("Enter person ID number: ")) person.name = raw_input("Enter name: ") email = raw_...
import traces from datetime import datetime def test_quickstart(): time_series = traces.TimeSeries() time_series[datetime(2042, 2, 1, 6, 0, 0)] = 0 # 6:00:00am time_series[datetime(2042, 2, 1, 7, 45, 56)] = 1 # 7:45:56am time_series[datetime(2042, 2, 1, 8, 51, 42)] = 0 # 8:51:42am time_ser...
__author__ = "MetaCarta" __copyright__ = "Copyright (c) 2006-2008 MetaCarta" __license__ = "Clear BSD" __version__ = "$Id: DBM.py 444 2008-03-19 01:35:35Z brentp $" from FeatureServer.DataSource import DataSource from FeatureServer.DataSource import Lock from FeatureServer.Service.Action import Action import anydbm ...
# 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. from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module class Top20Page(page_module.Page): def __init__(se...
#!/usr/bin/env python2 """SSH in to a running appliance and set up an internal DB. An optional region can be specified (default 0), and the script will use the first available unpartitioned disk as the data volume for postgresql. Running this script against an already configured appliance is unsupported, hilarity ma...
# Copyright (c) 2001, Stanford University # All rights reserved. # # See the file LICENSE.txt for information on redistributing this software. num_get_values = { 'GL_ACCUM_ALPHA_BITS' : 1, 'GL_ACCUM_BLUE_BITS' : 1, 'GL_ACCUM_CLEAR_VALUE': 4, 'GL_ACCUM_GREEN_BITS' : 1, 'GL_ACCUM_RED_BITS' : 1, ...
import numpy as np import pytest import pandas as pd from pandas import DataFrame, MultiIndex, Series, date_range from pandas.tests.frame.common import TestData import pandas.util.testing as tm from pandas.util.testing import assert_frame_equal, assert_series_equal class TestDataFrameNonuniqueIndexes(TestData): ...
# 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 use ...
# # 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...
import pytest import py import os from _pytest.config import get_config, PytestPluginManager from _pytest.main import EXIT_NOTESTSCOLLECTED @pytest.fixture def pytestpm(): return PytestPluginManager() class TestPytestPluginInteractions: def test_addhooks_conftestplugin(self, testdir): testdir.makepyf...
import WebIDL def WebIDLTest(parser, harness): threw = False try: parser.parse(""" interface SpecialMethodUniqueness1 { getter deleter boolean (DOMString name); getter boolean (DOMString name); }; """) results = parser.finish() ex...
import random from direct.distributed import ClockDelta from direct.task import Task from toontown.coghq import LaserGameBase class LaserGameRoll(LaserGameBase.LaserGameBase): def __init__(self, funcSuccess, funcFail, funcSendGrid, funcSetGrid): LaserGameBase.LaserGameBase.__init__(self, funcSuccess, fun...
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2005-2008 (ita) "Execute the tasks" import os, sys, random, time, threading, traceback try: from Queue import Queue except ImportError: from queue import Queue import Build, Utils, Logs, Options from Logs import debug, error from Constants import * GAP = 15 run...
from __future__ import unicode_literals from __future__ import absolute_import from functools import reduce import logging from docker.errors import APIError from .config import get_service_name_from_net, ConfigurationError from .const import DEFAULT_TIMEOUT, LABEL_PROJECT, LABEL_SERVICE, LABEL_ONE_OFF from .containe...
# -*- coding: utf-8 -*- """Tests for the XQueue certificates interface. """ from contextlib import contextmanager import json from mock import patch, Mock from nose.plugins.attrib import attr from django.test import TestCase from django.test.utils import override_settings from opaque_keys.edx.locator import CourseLoc...
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...