gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# -*- coding: utf-8 -*- '''Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2016, 2017, 2018, 2019 Caleb Bell <Caleb.Andrew.Bell@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "So...
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys import unittest from availability_finder import AvailabilityFinder from api_schema_graph import LookupResult from ...
# GENERATED BY devbox==0.2.0 """ Summary ======== Helper file to generate package version numbers for you Notes ===== You're probably already using git tags to tag releases of your project. If you aren't, you really should. Wouldn't it be great if your python package automatically updated its version number using ``gi...
import re from lxml import html try: from pyokc import helpers from pyokc import magicnumbers from pyokc.objects import MessageThread, Question, Session from pyokc.settings import USERNAME, PASSWORD except ImportError: import helpers import magicnumbers from objects import MessageThread, Que...
# Copyright 2019 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...
# This module is part of mail_merge_scheduler and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """This script is run through Windows Task Scheduler at the specified time by the end-user by using the mail_merge_scheduler module or by manually entering data into the scheduled_...
# -*- coding: utf-8 -*- import codecs import logging import os import re import sys import time import uuid from http.cookiejar import Cookie, LWPCookieJar from contextlib import contextmanager from functools import wraps from PyQt5.QtCore import ( QByteArray, QDateTime, qInstallMessageHandler, QSize,...
"""Test MQTT fans.""" import pytest from homeassistant.components import fan from homeassistant.const import ( ATTR_ASSUMED_STATE, ATTR_SUPPORTED_FEATURES, STATE_OFF, STATE_ON, ) from homeassistant.setup import async_setup_component from .test_common import ( help_test_availability_when_connection...
import unittest import sys import os import subprocess import shutil from copy import copy from test.support import (run_unittest, TESTFN, unlink, check_warnings, captured_stdout, skip_unless_symlink) import sysconfig from sysconfig import (get_paths, get_platform, get_config_vars, ...
# -*- coding: utf-8 -*- # import matplotlib as mpl from . import color def draw_text(data, obj): '''Paints text on the graph. ''' content = [] properties = [] style = [] if isinstance(obj, mpl.text.Annotation): ann_xy = obj.xy ann_xycoords = obj.xycoords ann_xytext = o...
import io import unittest import xml.sax from xml.sax.xmlreader import AttributesImpl from xml.dom import pulldom from test.support import findfile tstfile = findfile("test.xml", subdir="xmltestdata") # A handy XML snippet, containing attributes, a namespace prefix, and a # self-closing tag: SMALL_SAMPLE = """<?xm...
# (c) 2017, Red Hat, inc # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
import os from os.path import join import traceback from bs4 import BeautifulSoup from nose.plugins import Plugin class AdvancedLogging(Plugin): name = "advanced-logging" enabled = False capture_screen = True score = 1 _log_path = join(os.getcwd(), 'test_output') _script_path = None def...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models from sentry.utils.query import RangeQuerySetWrapperWithProgressBar class Migration(DataMigration): def forwards(self, orm): "Write your forward...
from __future__ import absolute_import from django import forms from django.db import transaction from django.http import HttpResponseRedirect, Http404 from django.core.urlresolvers import reverse from django.views.decorators.csrf import csrf_protect from django.views.decorators.cache import never_cache from django.ut...
import os, glob, collections, fnmatch from omg import lump, util, palette from omg.wadio import WadIO class LumpGroup(collections.OrderedDict): """A dict-like object for holding a group of lumps""" def __init__(self, name='data', lumptype=lump.Lump, config=()): collections.OrderedDict.__init__(self) ...
# This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See http://swift.org/LICENSE.txt for license information # See http://swift.org/CONTRIBUTORS.txt for the list of ...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
import numpy as np from numpy.testing import assert_almost_equal from menpo.math import eigenvalue_decomposition, pca, ipca # Positive semi-definite matrix cov_matrix = np.array([[3, 1], [1, 3]]) # Data values taken from: # http://www.cs.otago.ac.nz/cosc453/student_tutorials/principal_components.pdf # Tested values ar...
#!/usr/bin/env python """This script does x. Example: Attributes: Todo: """ import os import sys import glob import numpy as np import pandas as pd import radical.analytics as ra def initialize_entity(ename=None): entities = {'session': {'sid' : [], # Session ID 'sess...
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # 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...
"""Encapsulates a text product holding METARs.""" import re from datetime import timezone, timedelta try: from zoneinfo import ZoneInfo # type: ignore except ImportError: from backports.zoneinfo import ZoneInfo from metar.Metar import Metar from metar.Metar import ParserError as MetarParserError from pyiem.n...
"""Landlab Driver for running Landscape Evolution Experiments with - Soil weathering - Soil diffusion - Detachment-limited river erosion - tectonic uplift - vegetation modulation of erosion effects Created by: Manuel Schmid, University of Tuebingen, 07.04.2017 """ ## Import necessary Python and La...
""" Utility code that provides classes helpful in choosing a suitable TVTK class. It does this by providing a list of all the classes along with the option to be able to search for the documentation. The nice thing about the UI is that it performs some kind of completion on names typed by the user, plus it allows us...
"""Support for MQTT message handling.""" from __future__ import annotations import asyncio from functools import lru_cache, partial, wraps import inspect from itertools import groupby import logging from operator import attrgetter import ssl import time from typing import Any, Awaitable, Callable, Union, cast import u...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Nicira, 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/LICEN...
"""WebsocketProtocol76 from tornado 3.2.2 for tornado >= 4.0 The contents of this file are Copyright (c) Tornado Used under the Apache 2.0 license """ from __future__ import absolute_import, division, print_function, with_statement # Author: Jacob Kristhammar, 2010 import functools import hashlib import struct impo...
""" The NeuralAgent class wraps a deep Q-network for training and testing in the Arcade learning environment. Author: Nathan Sprague """ import os import cPickle import time import logging import random import numpy as np import ale_data_set import sys sys.setrecursionlimit(10000) class NeuralAgent(object): ...
from django.test import TestCase from schools.models import * from django.contrib.auth.models import Group from datetime import datetime, timedelta from django.utils.timezone import utc from django.test.client import RequestFactory, Client class TestSchoolViews(TestCase): fixtures = ['users.json', 'groups.json', '...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import atexit import collections import contextlib import ctypes import os import platform import re import socket import struct import subprocess import sys...
# Copyright 2014, Scalyr, Inc. # # Note, this can be run in standalone mode by: # python -m scalyr_agent.run_monitor # scalyr_agent.builtin_monitors.nginx_monitor from __future__ import unicode_literals from __future__ import absolute_import import socket import six import six.moves.http_client import six.moves.urlli...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright 2015-2018 by ExopyHqcLegacy Authors, see AUTHORS for more details. # # Distributed under the terms of the BSD license. # # The full license is in the file LICENCE, distributed with this software. # ------...
# Copyright 2009-2012 10gen, 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,...
# This file is part of Viper - https://github.com/botherder/viper # See the file 'LICENSE' for copying permission. import os import time import getopt import fnmatch import tempfile import shutil from zipfile import ZipFile from viper.common.out import * from viper.common.objects import File from viper.common.network...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 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 requ...
# Copyright (c) 2015, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from __future__ import absolute_...
# -*- coding: utf-8 -*- u"""Flash Config parser. :copyright: Copyright (c) 2021 RadiaSoft LLC. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from pykern import pkio from pykern.pkcollections import PKDict from pykern.pkdebug import pkdc, pkdp, pkdlog from sirepo.template import te...
# 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...
""" pycollect implements `collectd`s binary protocol[1], using Tornado's `IOLoop` and `PeriodicCallback` classes. By default, metrics are `sum()`ed and passed to to configured `collectd` instance every 60 seconds. The summation function can be defined on a per-metric basis (see `CollectdClient.queue()` and `CollectdCl...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import os from PyQt4.QtGui import * from froi.gui.base.utils import get_data_dir from froi.gui.base.utils import get_file_names from froi.io.xml_api import get_info from froi.io.atlas_api import * def g...
""" run_config.py - Configuration settings for a simulation run The user changeable values in this file are explained below. For each run the main options include choice of potential and initial conditions, choice of k mode range and selection of first, source and second order python classes. """ #Author: Ian Hust...
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology NV # # 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...
# Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for Perspective Broker module. TODO: update protocol level tests to use new connection API, leaving only specific tests for old API. """ # issue1195 TODOs: replace pump.pump() with something involving Deferreds. # Clean up wa...
#!/usr/bin/env python """Tests for the flow.""" import time # pylint: disable=unused-import,g-bad-import-order from grr.lib import server_plugins from grr.lib.flows import tests # pylint: enable=unused-import,g-bad-import-order from grr.client import actions from grr.client import vfs from grr.lib import aff4 from...
#!/usr/bin/env python # # Copyright 2007 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...
from __future__ import absolute_import import datetime import jwt from unidiff import PatchSet from six.moves.urllib.parse import urlparse from sentry.utils.http import absolute_uri from sentry.integrations.atlassian_connect import get_query_hash from sentry.integrations.client import ApiClient BITBUCKET_KEY = '%s...
# -*- coding: utf-8 -*- # This coding header is significant for tests, as the debug view is parsing # files to search for such a header to decode the source file content from __future__ import unicode_literals import importlib import inspect import os import re import shutil import sys import tempfile from unittest im...
#!/usr/bin/env python """ Term Cube Time: 00:00:00.000 +-------+-------+-------+ +-----+-----+-----+ Date: 00-00-00 | | | | | | | | User: XXX | | | | | | | | Pts: XXX +-------+-------+-------+ +...
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
# Copyright (c) 2016 PaddlePaddle 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 applic...
import batoid import yaml import numpy as np from test_helpers import timer, do_pickle, init_gpu, rays_allclose @timer def test_prescreen(): """Add an OPDScreen in front of LSST entrance pupil. The OPD that comes out should be _negative_ the added phase delay by convention. """ lsst = batoid.Optic.fr...
# Copyright 2021 The ParallelAccel 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...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) # Copyright: (c) 2018, Marcus Watkins <marwatk@marcuswatkins.net> # Based on code: # Copyright: (c) 2013, Phillip Gentry <phillip@cx.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licens...
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib import...
from lxml import etree from py2neo import Graph from py2neo.cypher import MergeNode, DatabaseError from collections import OrderedDict from tabulate import tabulate def parse_children(root, vertices=None, edges=None, residual_edges=None): """ Conducts a depth-first search of an XML element tree, classifying ...
## @package translate # Module caffe2.python.models.seq2seq.translate from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from abc import ABCMeta, abstractmethod import argparse from future.utils import viewitems import lo...
from __future__ import print_function, absolute_import, division from future.builtins import * from future import standard_library standard_library.install_aliases() # Copyright 2017 Autodesk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with ...
#!/usr/bin/env python3 import os import re import json import typing import argparse # region Global sets # A set of category folder names in current sample viewer. categories = { 'Maps', 'Layers', 'Features', 'Display information', 'Search', 'Edit data', 'Geometry', 'Route and direct...
#!/usr/bin/env """ GOA_Winds_NARR_6hr.py Compare NARR Winds with NCEP V2 (with Mooring Winds) for 6hr intervals. Uses 3hr NARR and 6hr NCEP Using Anaconda packaged Python """ #System Stack import datetime #Science Stack import numpy as np from scipy import stats # User Stack import general_utilities.haversin...
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from flexget.utils.template import get_template from future.moves.urllib.parse import urlparse, parse_qsl import os import re import logging from collections import defaul...
#zns.py #by <nick@kousu.ca> 2011.11.18 # #unfinished code, but useful so I'm posting it #Do whatever you want with it, but standard no #warranty and you-must-credit-me terms apply. #(and if you do anything interesting, I'd appreciate being told!) """ stuff to do with Z_n* = U(n), the group of elements coprime to n, mo...
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology NV # # 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...
# -*- coding: utf-8 -*- """ drift - API key rules ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Implement api key rules for passing, redirecting or rejecting requests based on product and version of the client. """ from __future__ import absolute_import import logging import re from six.moves import http...
import pkgutil from collections import OrderedDict from insights.core.dr import SkipComponent __all__ = [n for (i, n, p) in pkgutil.iter_modules(__path__) if not p] class ParseException(Exception): """ Exception that should be thrown from parsers that encounter exceptions they recognize while parsing. W...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
#!/usr/bin/env python import random, os.path #import basic pygame modules import pygame from pygame.locals import * #see if we can load more than standard BMP if not pygame.image.get_extended(): raise SystemExit("Sorry, extended image module required") #game constants MAX_SHOTS = 2 #most player bulle...
#!/usr/bin/env python # coding: utf-8 # Author: Vladimir M. Zaytsev <zaytsev@usc.edu> # Incremental Minimal FSA algorithm: # [1] http://aclweb.org/anthology-new/J/J00/J00-1002.pdf # [2] http://habrahabr.ru/post/190694/ import sys import itertools import collections class State(object): def __init__(se...
""" pathtools.py provides functions handling IP hops, IXP detection and ASN information. """ import dbtools as db import os import copy import logging # load database from the local folder cur_path = os.path.abspath(os.path.dirname(__file__)) as_rel = db.AsRelationDB(os.path.join(cur_path, "db/20161201.as-rel2.txt"))...
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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 # # Unl...
from __future__ import absolute_import, division, print_function import logging; _L = logging.getLogger('openaddr.cache') import os import errno import math import mimetypes import shutil import re import csv import simplejson as json from os import mkdir from hashlib import md5 from os.path import join, basename, ex...
# # Copyright (c) 2008-2015 Citrix 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.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
#!/usr/bin/env python # cmpcodesize/main.py - Command-line entry point for cmpcodesize -*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https...
import sys from evoplotter import utils from evoplotter import plotter from evoplotter import printer from evoplotter import reporting from evoplotter.dims import * import numpy import argparse options = argparse.ArgumentParser(description="Simple parser for the smtgp results.", add_help=True) options.add_argument("...
import numpy as np import matplotlib.pyplot as plt from plotstuff import colours cols = colours() plotpar = {'axes.labelsize': 16, 'xtick.labelsize': 16, 'ytick.labelsize': 16, 'text.usetex': True} plt.rcParams.update(plotpar) def make_plot(data, b): """ Scatter plots of reco...
import calendar from django.core.urlresolvers import reverse SUPPORTED_EXTENSIONS = ('jpg', 'tif', 'png', 'gif') UNSUPPORTED_EXTENSIONS = ('jp2', 'pdf', 'webp') SUPPORTED_QUALITY = ('default', 'color', 'gray',) class IIIFImageApiException(Exception): """ Base class for IIIF Image API Exceptions """ pass ...
from braces.views import LoginRequiredMixin from django.contrib import messages from django.contrib.auth import authenticate, login from django.contrib.auth.forms import PasswordChangeForm from django.contrib.auth.forms import SetPasswordForm from django.contrib.auth.models import User from django.contrib.auth.tokens i...
# Copyright (c) 2013 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 ...
# Copyright 2019 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 [2013] Hewlett-Packard Development Company, L.P. #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 a...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # 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 applicab...
""" Support for Apple TV. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.apple_tv/ """ import asyncio import logging from homeassistant.components.apple_tv import ( ATTR_ATV, ATTR_POWER, DATA_APPLE_TV, DATA_ENTITIES) from homeassistant....
# 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...
import logging import os import select import socket import sys import time import traceback from kivy.app import App from kivy.clock import Clock from kivy.core.window import Window from kivy.lang import Builder from kivy.properties import ObjectProperty, ListProperty from kivy.uix.actionbar import ActionItem from ki...
# Copyright 2014 ARM Limited # # Licensed under the Apache License, Version 2.0 # See LICENSE file for details. # standard library modules, , , import string import os import logging import re import itertools from collections import defaultdict # bsd licensed - pip install jinja2 from jinja2 import Environment, File...
"""An abstract class for entities.""" import asyncio import logging import functools as ft from timeit import default_timer as timer from typing import Optional, List from homeassistant.const import ( ATTR_ASSUMED_STATE, ATTR_FRIENDLY_NAME, ATTR_HIDDEN, ATTR_ICON, ATTR_UNIT_OF_MEASUREMENT, DEVICE_DEFAULT_NAME...
#!/usr/bin/env python """ Dummy server used for unit testing. """ from __future__ import print_function import errno import logging import os import random import string import sys import threading import socket import warnings from urllib3.exceptions import HTTPWarning from tornado.platform.auto import set_close_e...
# # This source file is part of the EdgeDB open source project. # # Copyright 2008-present MagicStack Inc. and the EdgeDB 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...
# -*- coding: utf-8 -*- """ Surrogate Analysis """ # Author: Avraam Marimpis <avraam.marimpis@gmail.com> from typing import Optional, Tuple, Callable import numpy as np import numbers def surrogate_analysis( ts1: "np.ndarray[np.float32]", ts2: "np.ndarray[np.float32]", num_surr: Optional[int] = 1000, ...
""" This file contains a minimal set of tests for compliance with the extension array interface test suite, and should contain no other tests. The test suite for the full functionality of the array is located in `pandas/tests/arrays/`. The tests in this file are inherited from the BaseExtensionTests, and only minimal ...
#! /usr/bin/env python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ...
# Copyright (c) 2018 Open Source Foundries Limited. # # SPDX-License-Identifier: Apache-2.0 '''Common code used by commands which execute runners. ''' import argparse from os import getcwd, path from subprocess import CalledProcessError import textwrap from west import cmake from west import log from west import uti...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2014 Cloudwatt # 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/l...
# Copyright 2014, 2018 IBM Corp. # # 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 require...
from parso.python import tree from parso.python.token import (DEDENT, INDENT, ENDMARKER, NEWLINE, NUMBER, STRING, tok_name, NAME) from parso.parser import BaseParser from parso.pgen2.parse import token_to_ilabel class Parser(BaseParser): """ This class is used to parse a Python...
# Copyright 2013 # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
import contextlib import itertools from sqlalchemy import bindparam from sqlalchemy import exc as sa_exc from sqlalchemy import func from sqlalchemy import testing from sqlalchemy.ext import baked from sqlalchemy.orm import aliased from sqlalchemy.orm import backref from sqlalchemy.orm import defaultload from sqlalche...
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
"""The tests for the Async Media player helper functions.""" import unittest import asyncio import homeassistant.components.media_player as mp from homeassistant.const import ( STATE_PLAYING, STATE_PAUSED, STATE_ON, STATE_OFF, STATE_IDLE) from homeassistant.util.async_ import run_coroutine_threadsafe from tests.c...
from __future__ import unicode_literals from django.utils.encoding import python_2_unicode_compatible from django.db import models from django.core.validators import RegexValidator from django_markdown.models import MarkdownField from django.conf import settings from easy_thumbnails.fields import ThumbnailerImageField ...
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scattergeo" _path_str = "scattergeo.textfont" _valid_props = {"color", "colorsrc", "family...