text
stringlengths
475
200k
# # 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 us...
# pylint: disable-msg=W0611, W0612, W0511 """Tests suite for MaskedArray. Adapted from the original test_ma by Pierre Gerard-Marchant :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu :version: $Id: test_extras.py 3473 2007-10-29 15:18:13Z jarrod.millman $ """ from __future__ import division, absolute...
from __future__ import absolute_import from ..packages.six.moves import http_client as httplib from ..exceptions import HeaderParsingError def is_fp_closed(obj): """ Checks whether a given file-like object is closed. :param obj: The file-like object to check. """ try: # Check vi...
# Copyright 2016 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 agree...
# 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...
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any l...
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Interfaces to cloud providers, using `Apache LibCloud <http://libcloud.apache.org>` """ # Copyright (C) 2011, 2012 ETH Zurich and University of Zurich. All rights reserved. # # Authors: # Riccardo Murri <[EMAIL]> # # Licensed under the Apache License, Version 2.0 (th...
from __future__ import absolute_import from django.db import models from django.test import TestCase from .models import Author, Book class SignalsRegressTests(TestCase): """ Testing signals before/after saving and deleting. """ def get_signal_output(self, fn, *args, **kwargs): # Flush any ...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
# -*- encoding: utf-8 -*- ############################################################################## # # __terp__.py # base_currency_symbol # First author: Carlos Vásquez <[EMAIL]> (ClearCorp S.A.) # Copyright (c) 2010-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved. # # Redist...
from viscm.gui import * from viscm.bezierbuilder import * import numpy as np import matplotlib as mpl from matplotlib.backends.qt_compat import QtGui, QtCore from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas cms = {"viscm/examples/sample_linear.jscm", "viscm/examples/sample_dive...
import test import os from os.path import join, dirname, exists, basename, isdir import re import utils class RemotingTestCase(test.TestCase): def __init__(self, path, file, arch, mode, nwdir, context, config, additional=[]): super(RemotingTestCase, self).__init__(context, path, arch, mode, nwdir) self.file...
# -*- coding: utf-8 -*- """ Author: Bernhard Scheirle """ from __future__ import unicode_literals import logging import os import hashlib logger = logging.getLogger(__name__) _log = "pelican_comment_system: avatars: " try: from . identicon import identicon _identiconImported = True except ImportError as e:...
""" convertcolors.py provides functions for converting various color formats to (red, green, blue, alpha) """ RED_MASK = 0xff000000 GREEN_MASK = 0x00ff0000 BLUE_MASK = 0x0000ff00 ALPHA_MASK = 0x000000ff def color_from_hex(hex_color:int)->(int,int,int,int): """ Takes a hex value in either of the form 0xRRGG...
from .. import constants, logger from . import base_classes, image, api class Texture(base_classes.BaseNode): """Class that wraps a texture node""" def __init__(self, node, parent): logger.debug("Texture().__init__(%s)", node) base_classes.BaseNode.__init__(self, node, parent, constants.TEXTUR...
# Copyright © 2020, Joseph Berry, Rico Tabor ([EMAIL]) # OpenDrop is released under the GNU GPL License. You are free to # modify and distribute the code, but always under the same license # (i.e. you cannot make commercial derivatives). # # If you use this software in your research, please cite the following # journal...
class Solution(object): def solveSudoku(self, board): """ :type board: List[List[str]] :rtype: void Do not return anything, modify board in-place instead. """ if board is None or len(board) != 9 or len(board[0]) != 9: return for row in range(9): ...
""" Tests for the Spring Metrics template tags and filters. """ import re from django.contrib.auth.models import User, AnonymousUser from django.http import HttpRequest from django.template import Context from django.test.utils import override_settings from analytical.templatetags.spring_metrics import SpringMetrics...
# Django settings for frontend project. import os import common from autotest_lib.client.common_lib import global_config DEBUG = True TEMPLATE_DEBUG = DEBUG FULL_ADMIN = False ADMINS = ( # ('Your Name', '[EMAIL]'), ) MANAGERS = ADMINS DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', ...
# -*- 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 'GroupRuleStatus' db.create_table('sentry_grouprulestatus', ( ('id', self.gf('sen...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Stderr built-in backend. """ __author__ = "Lluís Vilanova <[EMAIL]>" __copyright__ = "Copyright 2012, Lluís Vilanova <[EMAIL]>" __license__ = "GPL version 2 or (at your option) any later version" __maintainer__ = "Stefan Hajnoczi" __email__ = "[EMAIL]" ...
from django.db import models import json, string from django.core.exceptions import ValidationError class Objective(models.Model): name = models.CharField(max_length=200) description = models.CharField(max_length=240, blank=True) def __unicode__(self): return self.name class How(models.Model): n...
""" Python 'unicode-escape' Codec Written by Marc-Andre Lemburg ([EMAIL]). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to methods. This ...
# -*- coding: utf-8 -*- """ pygments.lexers.algebra ~~~~~~~~~~~~~~~~~~~~~~~ Lexers for computer algebra systems. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, bygroups, words from py...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
# coding: utf-8 # /*########################################################################## # # Copyright (c) 2016 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal #...
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Join article names for the popular concepts found in each community """ from collections import defaultdict import glob, os IN_DIR = "../../../DATA/CV" ######################################################### # SR ###################################################...
#!/usr/bin/env python ############################################################################### # $Id: isis2.py 32163 2015-12-13 17:44:50Z goatbar $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for ISIS2 driver. # Author: Even Rouault <even dot rouault @ mines-paris dot org> # #########...
# -*- coding: utf-8 -*- ''' Open Facebook allows you to use Facebook's open graph API with simple python code **Features** * Supported and maintained * Tested so people can contribute * Facebook exceptions are mapped * Logging **Basic examples**:: facebook = OpenFacebook(access_token) # G...
from roglick.dungeon.base import Map,Room,Tile from roglick.dungeon import tiles from roglick.lib import libtcod class Cave(object): def __init__(self): self.cells = [] @property def center(self): if 0 >= self.size: return None sum_x = 0 sum_y = 0 for ...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Dag Wieers (@dagwieers) <[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 = {'metadata_version':...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014-2015 clowwindy # # 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 r...
# -*- coding: utf-8 -*- # # balancedneuron.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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,...
from __future__ import division import base64 import random import tempfile from twisted.internet import defer, reactor from twisted.python import failure from twisted.trial import unittest from twisted.web import client, resource, server from p2pool import data, node, work from p2pool.bitcoin import data as bitcoin...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
#!/usr/bin/env python3 """Generate Python documentation in HTML or text for interactive use. In the Python interpreter, do "from pydoc import help" to provide help. Calling help(thing) on a Python object documents the object. Or, at the shell command line outside of Python: Run "pydoc <name>" to show documentation ...
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate...
""" websocket - WebSocket client library for Python Copyright (C) 2010 Hiroki Ohtani(liris) 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, ...
# Homework 7 for Principles of Computing class, by k., 08/01/2014 # class Puzzle from program template at http://www.codeskulptor.org/#poc_fifteen_template.py ''' Loyd's Fifteen puzzle - solver and visualizer Note that solved configuration has the blank (zero) tile in upper left Use the arrows key to swap this tile w...
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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 wi...
#!/usr/bin/python # 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 distributed...
#! /usr/bin/python3 # ################################################################# ## Copyright (c) 2013 Norbert S. <[EMAIL]> # # 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 versio...
#!/usr/bin/env python from lxml import html import os import requests import shutil import urllib def main(): if not os.path.exists("SearchPlugins"): os.makedirs("SearchPlugins") locales = getLocaleList() for locale in locales: files = getFileList(locale) if files == None: ...
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
from django.contrib import messages from django.core.paginator import Paginator from django.shortcuts import redirect from django.utils.translation import ungettext, ugettext_lazy, ugettext as _ from misago.threads import moderation from misago.threads.views.generic.actions import ActionsBase, ReloadAfterDelete __al...
"""Class of Augeas Configurators.""" import logging import augeas from letsencrypt import errors from letsencrypt import reverter from letsencrypt.plugins import common from letsencrypt_apache import constants logger = logging.getLogger(__name__) class AugeasConfigurator(common.Plugin): """Base Augeas Configu...
#===- enumerations.py - Python Enumerations ------------------*- python -*--===# # # The LLVM Compiler Infrastructure # # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. # #===--------------------------------------------------------------...
# -*- coding: utf-8 -*- """ *************************************************************************** ZonalStatistics.py --------------------- Date : August 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com **********...
""" Django Model baseclass for database-backed configuration. """ from django.db import connection, models from django.contrib.auth.models import User from django.core.cache import caches, InvalidCacheBackendError from django.utils.translation import ugettext_lazy as _ try: cache = caches['configuration'] # pylin...
# Copyright 2008-2009 WebDriver committers # Copyright 2008-2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:#www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
# -*- 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...
from __future__ import unicode_literals, print_function import os import sys import subprocess import json from ape import feaquencer from ape import tasks from .exceptions import ContainerError, ContainerNotFound, ProductNotFound class Config(object): APE_ROOT = os.environ['APE_ROOT_DIR'] SOURCE_HEADER = '#...
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
""" Strava OAuth2 backend, docs at: http://psa.matiasaguirre.net/docs/backends/strava.html """ from social.backends.oauth import BaseOAuth2 class StravaOAuth(BaseOAuth2): name = 'strava' AUTHORIZATION_URL = 'https://www.strava.com/oauth/authorize' ACCESS_TOKEN_URL = 'https://www.strava.com/oauth/token...
""" Base Graph class #--Version 2.1 #--Bob Ippolito October, 2004 #--Version 2.0 #--Istvan Albert June, 2004 #--Version 1.0 #--Nathan Denny, May 27, 1999 """ from altgraph import GraphError from compat import * class Graph(object): """ The Graph class represents a directed graph with C{N} nodes and C{E} ...
from pele.potentials import BasePotential import numpy as np __all__ = ["GMINPotential"] class GMINPotential(BasePotential): # pragma: no cover """ Interface to fortran GMIN potential Potentials implemented in GMIN can be called from python if GMIN is compiled with the flag WITH_PYTHON enabled. This cr...
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
from django.template import Library from django.template import defaulttags register = Library() @register.tag def ssi(parser, token): # Used for deprecation path during 1.3/1.4, will be removed in 2.0 return defaulttags.ssi(parser, token) @register.tag def url(parser, token): # Used for deprecation pa...
"""Support for Brunt Blind Engine covers.""" import logging from brunt import BruntAPI import voluptuous as vol from homeassistant.components.cover import ( ATTR_POSITION, PLATFORM_SCHEMA, SUPPORT_CLOSE, SUPPORT_OPEN, SUPPORT_SET_POSITION, CoverDevice, ) from homeassistant.const import ATTR_A...
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='scirius', version='2.0', packa...
# # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later version. # #...
# -*- coding: utf-8 -*- # Copyright 2008 Janusz Skonieczny # # 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 a...
import alsaaudio from math import pi, sin, pow import getch SAMPLE_RATE = 44100 FORMAT = alsaaudio.PCM_FORMAT_U8 PERIOD_SIZE = 512 N_SAMPLES = 1024 notes = "abcdefg" frequencies = {} for i, note in enumerate(notes): frequencies[note] = 440 * pow(pow(2, 1/2), i) # Generate the sine wave, centered at y=128 with 10...
# -*- coding: utf-8 -*- ################################################################################ # Copyright (C) 2009 Johan Liebert, Mantycore, Hedger, Rusanon # # < [EMAIL] ; http://orphereus.anoma.ch > # # ...
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Class representing instrumentation test apk and jar.""" import os from devil.android import apk_helper from pylib.instrumentation import test_jar ...
from __future__ import division, print_function, absolute_import import os import numpy as np from numpy.testing import assert_array_almost_equal import pytest from pytest import raises as assert_raises from scipy.linalg import solve_sylvester from scipy.linalg import solve_continuous_lyapunov, solve_discrete_lyapun...
r""" ================================================================ Robust covariance estimation and Mahalanobis distances relevance ================================================================ An example to show covariance estimation with the Mahalanobis distances on Gaussian distributed data. For Gaussian dis...
''' Report tool =========== This tool is a helper for users. It can be used to dump information for help during the debugging process. ''' import os import sys import time from time import ctime from configparser import ConfigParser from io import StringIO from xmlrpc.client import ServerProxy import kivy report =...
from django.db.models import Q from django.core.exceptions import PermissionDenied from cpro import models ############################################################ # Cards def filterCards(queryset, parameters, request): if request.user.is_authenticated(): request.user.all_accounts = request.user.accou...
import calendar import time import unittest import random import pytest from selenium.test.selenium.webdriver.common import utils class CookieTest(unittest.TestCase): def setUp(self): self._loadPage("simpleTest") # Set the cookie to expire in 30 minutes timestamp = calendar.timegm(time.gm...
import conf from base import BaseDbObj class SqliteDbObj(BaseDbObj): def __init__(self): try: import sqlite3 as sqlite except ImportError: from pysqlite2 import dbapi2 as sqlite self.connection = sqlite.connect(self.db_name) self.cursor = self.connection.cur...
import cPickle import cStringIO as StringIO import pickle import mechanize import mechanize._response import mechanize._testcase def pickle_and_unpickle(obj, implementation): return implementation.loads(implementation.dumps(obj)) def test_pickling(obj, check=lambda unpickled: None): check(pickle_and_unpick...
from __future__ import unicode_literals from django.core.exceptions import FieldError from django.test import TestCase from .models import Choice, Inner, OuterA, OuterB, Poll class NullQueriesTests(TestCase): def test_none_as_null(self): """ Regression test for the use of None as a query value....
"""This module implements the Scraper component which parses responses and extracts information from them""" from collections import deque from twisted.python.failure import Failure from twisted.internet import defer from scrapy.utils.defer import defer_result, defer_succeed, parallel, iter_errback from scrapy.utils...
''' Created on 21/02/2013 @author: u76345 ''' import os import sys import logging import re import numpy from datetime import datetime, time from osgeo import gdal from agdc.stacker import Stacker from EOtools.utils import log_multiline from EOtools.stats import temporal_stats SCALE_FACTOR = 10000 # Set top level s...
#!/usr/bin/env python import sys import smtplib from optparse import OptionParser from email.mime.text import MIMEText import json from datetime import datetime try: from sensu import Handler except ImportError: print('You must have the sensu Python module i.e.: pip install sensu') sys.exit(1) class MailHa...
#!/usr/bin/env python # # 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 ...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks 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', ...
# Copyright 2012-2013 Eric Ptak - trouch.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
# Copyright 2010-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from portage.tests import TestCase from portage.dep import get_required_use_flags from portage.exception import InvalidDependString class TestCheckRequiredUse(TestCase): def testCheckRequiredUse(self): test_...
"""Admin definition for Bonus Points widget.""" from django.shortcuts import render_to_response from django.template import RequestContext from apps.admin.admin import challenge_designer_site, challenge_manager_site, developer_site ''' Created on Aug 5, 2012 @author: Cam Moore ''' from django.contrib import admin f...
from pycuda.tools import context_dependent_memoize # from neon.backends.cuda_templates import (_ew_template, # _stage_template, # _fin_template, # _init_rand_func, # ...
# Copyright 2014 Netflix, 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...
#!/usr/bin/env python # test_transaction - unit test on transaction behaviour # # Copyright (C) 2007-2011 Federico Di Gregorio <[EMAIL]> # # psycopg2 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, ei...
# -*- 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...
from __future__ import unicode_literals from django.contrib.auth.models import User from django.core import management from django.test import TestCase from django.utils.six import StringIO from .models import ( Car, CarDriver, Driver, Group, Membership, Person, UserMembership, ) class M2MThroughTestCase(TestCa...
# -*- coding: utf-8 -*- import datetime from dateutil import relativedelta from openerp import tools, SUPERUSER_ID from openerp.addons.web import http from openerp.addons.website.models.website import slug from openerp.addons.web.http import request class MailGroup(http.Controller): _thread_per_page = 20 _r...
"""SDLRPCV2 XML parser unit test.""" import os import unittest import generator.Model import generator.parsers.SDLRPCV2 class TestSDLRPCV2Parser(unittest.TestCase): """Test for SDLRPCV2 xml parser.""" class _Issue: def __init__(self, creator, value): self.creator = creator s...
# Copyright 2016 The Kubernetes 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 or agreed to ...
""" Oracle database backend for Django. Requires cx_Oracle: http://cx-oracle.sourceforge.net/ """ from __future__ import unicode_literals import datetime import decimal import os import platform import sys import warnings from django.conf import settings from django.db import utils from django.db.backends.base.base ...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright (C) 2011-2012 Patrick Totzke <[EMAIL]> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file """ Widgets specific to search mode """ import urwid from ..settings.const import settings from ..helper import shorten_author_string from .utils impo...
import lldb import re import testutils as test # bpmd -md <MethodDesc pointer> def runScenario(assembly, debugger, target): process = target.GetProcess() res = lldb.SBCommandReturnObject() ci = debugger.GetCommandInterpreter() # Run debugger, wait until libcoreclr is loaded, # set breakpoint at ...
import Get_MW import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import numpy as np N=10 #number of frequencies #These values are starting positions for coronal CME radio observations ParmIn=29*[0] # input array ParmIn[0] =8e19 # Area, cm^2 ParmIn[1] =5e9 # Depth, cm ParmIn[2] =3...
# -*- coding: utf-8 -*- r""" werkzeug.posixemulation ~~~~~~~~~~~~~~~~~~~~~~~ Provides a POSIX emulation for some features that are relevant to web applications. The main purpose is to simplify support for systems such as Windows NT that are not 100% POSIX compatible. Currently this only imple...
#!/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 #...
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import unittest from telemetry.core import discover from telemetry.core import util class DiscoverTest(unittest.TestCase): def setUp(self): ...
# See https://zulip.readthedocs.io/en/latest/subsystems/caching.html for docs import hashlib import logging import os import re import secrets import sys import time import traceback from functools import lru_cache, wraps from typing import ( TYPE_CHECKING, Any, Callable, Dict, Iterable, List, ...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2009-2010 Salvatore Josué Trimarchi Pinto <[EMAIL]> # (http://trigluu.com) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Li...