gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# from __future__ import absolute_import, print_function, division, with_statement from builtins import object import numpy as np import xmeos from xmeos import models from xmeos.models import core import pytest import matplotlib.pyplot as plt import matplotlib as mpl from abc import ABCMeta, abstractmethod import cop...
import os import sys import traceback from _pydev_bundle import _pydev_imports_tipper from _pydev_bundle.pydev_code_executor import BaseCodeExecutor from _pydev_bundle.pydev_console_types import CodeFragment from _pydev_bundle.pydev_imports import Exec from _pydev_bundle.pydev_stdin import StdIn, DebugConsoleStdIn fro...
#!/usr/bin/env python # -- coding: utf-8 -- # 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 (th...
# -*- coding: utf-8 -*- """ profiling.__main__ ~~~~~~~~~~~~~~~~~~ The command-line interface to profile a script or view profiling results. .. sourcecode:: console $ profiling --help :copyright: (c) 2014-2017, What! Studio :license: BSD, see LICENSE for more details. """ from __future__ imp...
#!/usr/bin/python # # (c) 2019 Piotr Wojciechowski <piotr@it-playground.pl> # 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', ...
#Author: MKT #purpose: to parse bowtie output files (after they have been weighted based on multiple mappings with weight_repeats.py and convert to pickled python dictionary. This one hashes by the start position of the read so it will be fast to classify them into exons, introns, etc. with the annotation file. #versio...
""" A place for code to be called from core C-code. Some things are more easily handled Python. """ from __future__ import division, absolute_import, print_function import re import sys from numpy.compat import basestring from .multiarray import dtype, array, ndarray import ctypes from .numerictypes import object_ ...
# Copyright 2016 Raytheon BBN Technologies # # 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 __all__ = ['AlazarATS9870', 'AlazarChannel'] imp...
# Copyright (C) 1999--2002 Joel Rosdahl # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is ...
"""TcEx Framework""" # standard library import inspect import logging import os import platform import re import signal import sys import threading from typing import Optional from urllib.parse import quote from .app_config_object import InstallJson from .inputs import Inputs from .logger import Logger from .tokens im...
from __future__ import absolute_import import time import logging import random, base64, struct import hashlib import os import urllib import sys from pgoapi.exceptions import (ServerSideRequestThrottlingException, NotLoggedInException, ServerBusyOrOfflineException, ...
# Preferred settings for this model is: # Training epochs = 80 # Crop Size = 224 # Learning Rate = 0.001 # Under advanced learning rate options: # Step Size = 10.0 # Gamma = 0.96 # The auxillary branches as spcified in the original googlenet V1 model do exist in this implementation of # googlenet but it is not used. T...
# 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 ...
from __future__ import print_function import unittest import sys import os import numpy as np import macrodensity as md import pkg_resources from os.path import join as path_join try: import pandas has_pandas = True except ImportError: has_pandas = False test_dir = os.path.abspath(os.path.dirname(__file_...
# coding=utf-8 from __future__ import absolute_import import os import sys sys.path.append(os.path.join( os.path.dirname(os.path.basename(__file__)), ".." )) sys.path.append(os.path.dirname(__file__)) from collections import OrderedDict import codecs import json import hashlib # Ity Imports import Ity from ...
# 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 2020 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 a...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import os import re import numpy as np import nibabel as nb from nipype.utils.filemanip import (filename_to_list, copyfile, split_filename) from nipype.interfaces.base import (traits, TraitedSpec, DynamicT...
import six if six.PY2: import mock else: from unittest import mock import unittest from lxml import etree import should_be.all # noqa import xmlmapper as mp from xmlmapper import xml_helpers as xh class SampleModel(mp.Model): ROOT_ELEM = 'some_elem' name = mp.NodeValue('name') class TestModel(...
#!/usr/bin/python # # Copyright (c) SAS Institute 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...
# Authors: Robert Luke <mail@robertluke.net> # # License: BSD (3-clause) from configparser import ConfigParser, RawConfigParser import glob as glob import re as re import os.path as op import numpy as np from ..base import BaseRaw from ..constants import FIFF from ..meas_info import create_info, _format_dig_points f...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals from math import pi, sqrt, log from datetime import datetime from copy import deepcopy, copy from warnings import warn import bisect import numpy as np from s...
# -*- coding: utf-8 -*- """ Tests for edit failures. These tests should never write to the wiki, unless something has broken badly. These tests use special code 'write = -1' for edit failures. """ # # (C) Pywikibot team, 2014-2019 # # Distributed under the terms of the MIT license. # from __future__ import absolute_i...
import numpy as np # import pandas as pd # import math # import matplotlib as plt # import matplotlib.pyplot as plt # import os from pure_data import Data_parse #from .cubic_parameters_1 import Parameter_eos, getdel1, compressibility_factor_cal, acentric_factor_cal from cubic_parameters_1 import Parameter_eos, getdel...
#!/bin/python import sys, csv, os, imp, pickle from settings import * from completeness.statlib import stats from decimal import Decimal import doctest BOOKMARK = 'completeness/bookmark.pickle' def success_rate(year): f = open('completeness/output/%d.pickle' % year, 'r') obj = pickle.load(f) f.close() ...
#!/usr/bin/env python # Run using: # casapy --nologger --nogui --log2term -c mat_to_ms <MAT name> <input MS template> <output MS name> import os import sys import scipy import scipy.io import collections import numpy as np # http://stackoverflow.com/questions/7008608/scipy-io-loadmat-nested-structures-i-e-dictionari...
# -*- coding: utf-8 -*- """ Detect words on the page return array of words' bounding boxes """ import numpy as np import matplotlib.pyplot as plt import cv2 from .helpers import * def detection(image, join=False): """Detecting the words bounding boxes. Return: numpy array of bounding boxes [x, y, x+w, y+h] ...
""" Info widgets: * display detailed info about an object """ import logging import pprint import threading import urwid import urwidtrees from sen.tui.widgets.list.base import WidgetBase from urwid.decoration import BoxAdapter from sen.tui.chunks.elemental import LayerWidget, ContainerStatusWidget, ContainerOneLine...
import renderdoc as rd import rdtest # Not a real test, re-used by API-specific tests class Mesh_Zoo(): def __init__(self): self.out = None self.cfg = rd.MeshDisplay() def cache_output(self): self.out.SetMeshDisplay(self.cfg) self.out.Display() pixels: bytes = self.ou...
from __future__ import unicode_literals import json import warnings from django import forms from django.conf import settings from django.contrib.admin.utils import ( display_for_field, flatten_fieldsets, help_text_for_field, label_for_field, lookup_field, ) from django.core.exceptions import ObjectDoesNotExi...
import logging import subprocess from pbrdna.utils import which, is_executable log = logging.getLogger(__name__) VALID_COMMANDS = frozenset(['fastq.info', 'align.seqs', 'chimera.uchime', 'screen.seqs', 'remove.seqs', 'filter.seqs', 'summary.seqs', 'dist.seqs',...
from django.core.urlresolvers import reverse, reverse_lazy from django.http import (HttpResponseRedirect, Http404, HttpResponsePermanentRedirect) from django.views.generic.base import TemplateResponseMixin, View, TemplateView from django.views.generic.edit import FormView from django.contrib im...
GEVENT = False import os import settings import sys from search import parse, iter_parse, result_to_model import pytz import datetime import operator import time import json import re from regs_common.tmp_redis import TmpRedis from regs_common.mp_types import Counter from regs_common.util import listify from regsdotgo...
#!/usr/bin/env python from fabric.api import * """ Base configuration """ env.project_name = 'hacktyler_crime' env.database_password = 'qw8ndyHprt' env.path = '/home/ubuntu/src/%(project_name)s' % env env.log_path = '/var/log/src/%(project_name)s' % env env.env_path = '/home/ubuntu/.virtualenvs/%(project_name)s' % en...
# # 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 # ...
# # 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...
#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import logg...
from xml.dom.minidom import DOMImplementation from xml.dom.minidom import Document from RGT.XML.SVG.svgNode import SvgNode from RGT.XML.SVG.gNode import GNode from RGT.XML.SVG.defsNode import DefsNode from RGT.XML.SVG.descNode import DescNode from RGT.XML.SVG.titleNode import TitleNode from RGT.XML.SVG.symbolNode impor...
import io import unittest import urllib.robotparser from urllib.error import URLError, HTTPError from urllib.request import urlopen from test import support class RobotTestCase(unittest.TestCase): def __init__(self, index, parser, url, good, agent): unittest.TestCase.__init__(self) if good: ...
#!/usr/bin/python # 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 # "Licens...
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
from __future__ import division, absolute_import, print_function # Code common to build tools import sys import warnings import copy import binascii from numpy.distutils.misc_util import mingw32 #------------------- # Versioning support #------------------- # How to change C_API_VERSION ? # - increase C_API_VERSI...
# 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...
"""Random variable generators. integers -------- uniform within range sequences --------- pick random element pick random sample generate random permutation distributions on the real line: ------------------------------ uniform ...
# Written by John Hoffman # see LICENSE.txt for license information from bisect import bisect, insort try: True except: True = 1 False = 0 bool = lambda x: not not x hexbinmap = { '0': '0000', '1': '0001', '2': '0010', '3': '0011', '4': '0100', '5': '0101', '6': '0110', ...
# 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 a...
# -*- coding: utf-8 -*- # Copyright 2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
""" CSS 1 definitions. """ import textwrap CSS_PSEUDO_CLASS_NAMES = """first-letter first-line link active visited first-child focus hover lang before after left right first""".split() CSS_ATTR_DICT = { 'background': [ 'bottom', 'center', 'fixed', 'inherit', 'left', 'none', 'n...
from __future__ import (absolute_import, print_function) # From system from collections import defaultdict from fabric.api import env import logging # From package from .snapshotting import (BackupWorker, RestoreWorker, \ Snapshot, SnapshotCollection) from .utils import (add_s3_arguments, get_s3_connection_host) ...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# -*- coding: utf-8 -*- from functools import update_wrapper import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.translation import ugettext_lazy as _ from django.utils.six.moves.urllib.parse import urljoin from cms import constants __all__ = ['get_cm...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import datetime import hashlib import StringIO import unittest import zipfile from google.appengine.ext import ndb from testing_utils import testing from c...
#!/usr/bin/env python # Copyright (c) 2011-2016 Rackspace US, 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 app...
import asyncio import socket import types from typing import Any from unittest import mock from kafka.errors import ( KafkaError, KafkaConnectionError, RequestTimedOutError, NodeNotReadyError, UnrecognizedBrokerVersion ) from kafka.protocol.metadata import ( MetadataRequest_v0 as MetadataRequest, Metad...
# ------------------------------------------------------------------------ # This block checks to see if the script is being run directly, # i.e. through the command line. If it is, then it stops and exits the # program, asking the user to use these files by running the main.py # --------------------------------------...
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:11555") else: access = Se...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for git_cl.py.""" import os import StringIO import stat import sys import unittest import re sys.path.insert(0, os....
# Copyright 2012 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 ...
# Simple implementation of GalaxyInvanders game # Rohan Roy (India) - 3 Nov 2013 # www.codeskulptor.org/#user23_fTVPDKIDhRdCfUp VER = "1.0" # "add various aliens" import simplegui, math, random, time #Global const FIELD_WIDTH = 850 FIELD_HEIGHT = 500 TOP_MARGIN = 75 LEFT_MARGIN = 25 ALIEN_WIDTH = 48 ALIEN_HEIGHT = ...
#!/usr/bin/env python3 # Copyright (c) 2014-2016 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 fundrawtransaction RPC.""" from test_framework.test_framework import BitcoinTestFramework, BI...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'LikeVideo' db.create_table(u'catalog_likevideo', ( ...
import numpy as np import pandas as pd import scipy as sp import pickle from scipy import fft from time import localtime, strftime import matplotlib.pyplot as plt from skimage.morphology import disk,remove_small_objects from skimage.filter import rank from skimage.util import img_as_ubyte import wave #############...
from __future__ import print_function import random import sys class _Node(object): def __init__(self, val): self.val = val self.p = self.l = self.r = None self.size = 1 self.priority = random.random() def fix_size_to_top(self): self.size = 1 for c in [self...
# Copyright 2019 The TensorFlow Probability 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...
import tensorflow as tf from keras import backend as K from keras import regularizers, constraints, initializers, activations from keras.layers.recurrent import Recurrent, _time_distributed_dense from keras.engine import InputSpec def tfPrint(d, T): return tf.Print(input_=T, data=[T, tf.shape(T)], message=d) class ...
#!/usr/bin/env python3 """ These functions search the environment for software dependencies and configuration. """ import os import sys import subprocess import logging import pkg_resources import re import glob import ciftify.utils as util def find_workbench(): """ Returns path of the workbench bin/ folder,...
#!/usr/bin/env python from skimage.transform import resize from skimage.color import rgb2gray import threading import tensorflow as tf import sys import random import numpy as np import time import gym from keras import backend as K from keras.layers import Convolution2D, Flatten, Dense from collections import deque fr...
#!/usr/bin/env python3 import time import os import sys import math import logging import platform from time import sleep from datetime import timedelta from ipaddress import IPv4Address import requests import R_spoof BLUE, RED, WHITE, YELLOW, MAGENTA, GREEN, END = '\33[94m', '\033[91m', '\33[97m', '\33[93m', '\033...
#!/usr/bin/env python """Basic test of the Calc module on 2D data.""" import datetime from os.path import isfile import shutil import unittest import pytest import itertools import cftime import numpy as np import xarray as xr from aospy import Var from aospy.calc import Calc, _add_metadata_as_attrs, _replace_pressur...
#!/usr/bin/env python """Plugin that exports results as SQLite db scripts.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import collections import io import os import zipfile from future.builtins import str from future.utils import iteritems from fut...
import unittest import datetime import trytond from trytond.tests.test_tryton import USER, DB_NAME, CONTEXT, POOL from trytond.transaction import Transaction from test_base import BaseTestCase from trytond.config import config from decimal import Decimal from nereid import request config.set('email', 'from', 'from@xyz...
""" Defines Joiner class. """ from __future__ import absolute_import from __future__ import print_function from six.moves import map from six.moves import range from six.moves import zip __version__ = '1.0' __author__ = 'Pearu Peterson <pearu.peterson@gmail.com>' __all__ = ['Joiner'] import time class Joiner(object):...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import xml.etree.ElementTree as ET input_list = [] for arg in sys.argv[1:]: input_list.append(arg) if len(input_list) < 1: print("usage: makedoku.py <classes.xml>") sys.exit(0) def validate_tag(elem,tag): if (elem.tag != tag): print("Tag mismatch, ...
#------------------------------------------------------------------------------ # Copyright (C) 2007-2010 Richard Lincoln # # 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.ap...
from __future__ import absolute_import from __future__ import unicode_literals # load python 3, fallback to python 2 if it fails try: from urllib.parse import unquote, unquote_plus, quote_plus except ImportError: from urllib import unquote, unquote_plus, quote_plus # type: ignore from datetime import datetim...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
#BEGIN_HEADER # The header block is where all import statments should live import csv import os import re import subprocess import sys import time import traceback import uuid from pprint import pprint, pformat from biokbase.workspace.client import Workspace as workspaceService from Bio import SeqIO from Bio.Seq impor...
from __future__ import annotations import functools import math import operator from collections import defaultdict from itertools import product from typing import Any import tlz as toolz from tlz.curried import map from .base import tokenize from .blockwise import Blockwise, BlockwiseDep, BlockwiseDepDict, blockwi...
import numpy as np from PyQt5 import QtCore, QtWidgets import pyqtgraph as pg from .ATEMWidget import ATEMWidget pg.setConfigOption('background', 'w') pg.setConfigOption('foreground', 'k') pg.setConfigOptions(antialias=True) class DecayWidget(ATEMWidget): """docstring for LocWidget""" def __init__(self, pare...
from dolfin import * import numpy import sympy import sympy_interface as S import tabulate parameters["form_compiler"]["cpp_optimize"] = True set_log_level(ERROR) ### utils ################################################################# def my_mixed_function_space(Vs): """ My convenient handler for mixed functio...
from keras.models import Sequential, model_from_json from keras.layers.core import Dense, Dropout, Activation, Flatten, Reshape from keras.layers import Merge from keras.layers.convolutional import UpSampling2D, ZeroPadding2D, Convolution2D, MaxPooling2D,Conv2D from keras.utils import np_utils from keras.layers.normali...
# Copyright 2013 Dietrich Epp. # # This file is part of HeaderFix. HeaderFix is distributed under the terms of # the 2-clause BSD license. See LICENSE.txt for details. """Patterns for matching file paths.""" import fnmatch class PathPattern(object): """A pattern that matches paths using globbing. The patte...
from datetime import datetime, timedelta import json from django.conf import settings from mock import patch, Mock from nose.tools import eq_ from test_utils import RequestFactory from kitsune.customercare.models import Tweet, Reply from kitsune.customercare.tests import tweet, twitter_account, reply from kitsune.cu...
""" Author: Justin Cappos Modified by Brent Couvrette to make use of circular logging. Modified by Eric Kimbrel to add NAT traversal Module: Node Manager main program. It initializes the other modules and doesn't do much else. Start date: September 3rd, 2008 This is the node manager for Seattle. It...
import collections import mock import os import shutil import tempfile import time import uuid from sesame.core import decrypt from sesame.core import encrypt from sesame.utils import create_key from sesame.utils import make_secure_temp_directory from utils import cd from utils import mkdir_p from utils import delet...
# 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. """This module wraps Android's adb tool. This is a thin wrapper around the adb interface. Any additional complexity should be delegated to a higher level (e...
from __future__ import unicode_literals from copy import copy import difflib import errno from functools import wraps import json import os import re import sys try: from urllib.parse import urlsplit, urlunsplit except ImportError: # Python 2 from urlparse import urlsplit, urlunsplit import select import s...
# Copyright (c) 2020 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 appli...
# This is the instrument-specific file for the PS3000a series of instruments. # # pico-python is Copyright (c) 2013-2014 By: # Colin O'Flynn <coflynn@newae.com> # Mark Harfouche <mark.harfouche@gmail.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are p...
"""The tests the MQTT alarm control panel component.""" import copy import json from unittest.mock import patch import pytest from homeassistant.components import alarm_control_panel from homeassistant.const import ( STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_CUSTOM_BYPASS, STATE_ALARM_ARMED_HOME, STAT...
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask import flash, jsonify, redirect, render_template, request, session from itsdangerous import Bad...
""" A test spanning all the capabilities of all the serializers. This class defines sample data and a dynamically generated test case that is capable of testing the capabilities of the serializers. This includes all valid data values, plus forward, backwards and self references. """ from __future__ import absolute_imp...
from __future__ import absolute_import import responses from six.moves.urllib.parse import parse_qs from mock import patch from sentry import options from sentry.models import ( Integration, OrganizationIntegration, Identity, IdentityProvider, IdentityStatus, Group, GroupStatus, Group...
from __future__ import unicode_literals import time from django.conf import settings from django.test import TestCase from django.test.client import FakePayload, Client from django.utils.encoding import force_text from tastypie.serializers import Serializer try: from urllib.parse import urlparse except ImportErr...
############################################################################### # # Copyright 2011-2012 Pants Developers (see AUTHORS.txt) # # 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 # # ...
# -*- coding: utf-8 -*- # # Debug/Helper script for XLS stylesheet development # # >>> python xls2xml <XLS File> # ... converts the XLS file into XML # # >>> python xls2xml <XLS File> <XSLT Stylesheet> # ... converts the XLS file into XML and transforms it using the stylesheet # import datetime import sys ...
""" Gaussian Mixture Models. This implementation corresponds to frequentist (non-Bayesian) formulation of Gaussian Mixture Models. """ # Author: Ron Weiss <ronweiss@gmail.com> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Bertrand Thirion <bertrand.thirion@inria.fr> import numpy as np from scipy i...
from __future__ import annotations import os from pathlib import Path import pytest import ibis import ibis.expr.types as ir import ibis.util as util from ibis import options from ibis.backends.impala.compiler import ImpalaCompiler, ImpalaExprTranslator from ibis.backends.tests.base import ( BackendTest, Rou...
# # 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...