gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import socket import yaml import os from teuthology.util.compat import parse_qs from copy import deepcopy from libcloud.compute.providers import get_driver from mock import patch, Mock, DEFAULT from pytest import raises, mark from teuthology.config import config from teuthology.exceptions import MaxWhileTries from 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 u...
"""python 2.7 plugin for substance painter 2.3+ Export substance painter maps to a RenderMan Asset package. """ # ----------------------------------------------------------------------------- # MIT License # # Copyright (c) 2016 Philippe Leprince # # Permission is hereby granted, free of charge, to any person obtain...
import numpy as np import pytest from pandas import Categorical, DataFrame, Series import pandas._testing as tm class TestSeriesSortValues: def test_sort_values(self, datetime_series): # check indexes are reordered corresponding with the values ser = Series([3, 2, 4, 1], ["A", "B", "C", "D"]) ...
""" Communication classes and functions. This module contains the classes and functions for the communication between the vehicles, or between the vehicles and the GCS. Generally, XBee modules are used for the vehicles to talk to each other. For software-in-the-loop simulation, `pyzmq` is used to establish a publish-s...
#!/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. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * def ge...
# Copyright (c) 2012-2015 Netforce Co. Ltd. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
#!/usr/bin/env python """A TestCase that initializes the library with standard API methods.""" import unittest import ee class ApiTestCase(unittest.TestCase): def setUp(self): self.InitializeApi() def InitializeApi(self): """Initializes the library with standard API methods. This is normally in...
#!/usr/bin/env python #============================================================================== # Copyright 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Amazon Software License (the "License"). You may not use # this file except in compliance with the License. A copy of the...
# -*- coding: utf-8 -*- ''' The Django Admin Generator is a project which can automatically generate (scaffold) a Django Admin for you. By doing this it will introspect your models and automatically generate an Admin with properties like: - `list_display` for all local fields - `list_filter` for foreign keys with fe...
from gi.repository import Gtk, Gio, GLib from gi.repository import AppIndicator3 as appindicator from xml.dom import minidom import json, os, webbrowser, datetime, urlparse import pytz import dateutil.parser class Main(object): def __init__(self): icon_path = os.path.normpath(os.path.abspath(os.path.split(...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import re import sys import subprocess def RunCmdAndCheck(cmd, err_string, output_api, cwd=None): results = [] p = subprocess.Popen(cmd, ...
import os import platform import subprocess import pytest from topaz.main import _entry_point class TestMain(object): def run(self, space, tmpdir, source=None, status=0, ruby_args=[], argv=[]): args = ["topaz"] args += ruby_args if source is not None: f = tmpdir.join("test.rb...
from ..encoding import wif_to_secret_exponent from ..convention import tx_fee from .Spendable import Spendable from .Tx import Tx from .TxOut import TxOut, standard_tx_out_script from .pay_to import build_hash160_lookup from ..networks import wif_prefix_for_netcode class SecretExponentMissing(Exception): pass ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# Copyright 2015 Mirantis, 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 ...
# notify.py - email notifications for mercurial # # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. '''hooks for sending email notifications at commit/push time Subscriptions c...
# Copyright 2013 OpenStack Foundation # # 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 ...
""" Module to build experiments (worlds, agents, etc.). """ import random import pygame import model.interaction import model.agent import experiment import agentprogram.agentprogram from elements import Elements class LoadWorldExperiment(experiment.Experiment): """ Load a world to this experiment. Note: exp...
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' from ctypes import * import re from pyglet.gl import * import pyglet.font from layout.base import * from layout.frame import * from layout.locator import * from pyglet import image class GLRenderDevice(RenderDevice): _stock...
from json import loads as json_loads, dumps as json_dumps from urllib.parse import urlparse import os import ssl import pytest from sanic import Sanic from sanic.exceptions import ServerError from sanic.response import json, text from sanic.testing import HOST, PORT # ----------------------------------------------...
""" Tests the different linear regression models and chooses best model using AIC, BIC, and Adjusted R2 Averages the criteria for all voxels across 3 subjects Run with: python model_selection.py """ from __future__ import absolute_import, division, print_function import numpy as np import numpy.linalg as npl i...
"""Provides interfaces to various commands provided by FreeSurfer Change directory to provide relative paths for doctests >>> import os >>> filepath = os.path.dirname( os.path.realpath( __file__ ) ) >>> datadir = os.path.realpath(os.path.join(filepath, '../testing/data')) >>> os.chdir(datadir) """ fro...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function import mock import warnings from django.core.urlresolvers import NoReverseMatch, set_urlconf from django.template import Context, Template from django.test import TestCase from django.test.client import RequestFactory from django.test.utils...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals, print_function """ This module implements plotter for DOS and band structure. """ __author__ = "Shyue Ping Ong, Geoffroy Hautier" __copyright__ = "Copyright ...
from __future__ import unicode_literals import difflib import os import textwrap import six from six.moves import input from rbtools.commands import Command, CommandError from rbtools.utils.console import confirm, confirm_select from rbtools.utils.filesystem import CONFIG_FILE from rbtools.utils.repository import ge...
# -*- coding: utf-8 -*- import datetime import mock import time from django.test import override_settings from django.utils.timezone import now as timezone_now from zerver.lib.actions import create_stream_if_needed, do_create_user from zerver.lib.digest import gather_new_streams, handle_digest_email, enqueue_emails,...
# File: Scanner.py # Author: Marvin Smith # Date: 6/13/2015 # # Purpose: Manage and manipulate LLNMS Scanner entries. # __author__ = 'Marvin Smith' # System Libraries import subprocess, logging, os, xml.etree.ElementTree as ET import multiprocessing, itertools, sys from multiprocessing import Pool...
# Copyright 2018 Guanshuo Wang. 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 ...
from django.db import models from wagtail.core import blocks from wagtail.core.models import Page, Orderable from wagtail.core.fields import RichTextField, StreamField from wagtail.images.edit_handlers import ImageChooserPanel from wagtail.images.blocks import ImageChooserBlock from wagtail.images.models import Image ...
# jsb/eventbase.py # # """ base class of all events. """ ## jsb imports from channelbase import ChannelBase from jsb.utils.lazydict import LazyDict from jsb.utils.generic import splittxt, stripped, waitforqueue from errors import NoSuchUser from jsb.utils.opts import makeeventopts from jsb.utils.trace import whichmo...
#!/usr/bin/env python # Copyright (c) 2014-present, 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 director...
from __future__ import print_function, division from sympy import (Basic, sympify, symbols, Dummy, Lambda, summation, Piecewise, S, cacheit, Sum, exp, I, Ne, Eq, poly, series, factorial, And) from sympy.polys.polyerrors import PolynomialError from sympy.solvers.solveset import so...
from contextlib import closing from contextlib import suppress from io import StringIO import uuid import html from sklearn import config_context class _VisualBlock: """HTML Representation of Estimator Parameters ---------- kind : {'serial', 'parallel', 'single'} kind of HTML block esti...
#!/usr/bin/python """ Domain model for NED, NewsReader project. @author: U{Filip Ilievski<filipilievski.wordpress.com>} @author: U{Antske Fokkens<http://wordpress.let.vupr.nl/antske/>} @version: 0.1 @contact: U{f.ilievski@vu.nl<mailto:f.ilievski@vu.nl>} @contact: U{antske.fokkens@vu.nl<mailto:antske.fokkens@vu.nl>} @...
from abc import ABCMeta, abstractmethod, abstractproperty from contextlib import contextmanager from functools import wraps import gzip from inspect import getargspec from itertools import ( combinations, count, product, ) import operator import os from os.path import abspath, dirname, join, realpath import...
__version__ = "1.3" __author__ = "phpsh@googlegroups.com" __date__ = "Nov 20, 2008" from subprocess import Popen, PIPE from threading import Thread import ansicolor as clr import cmd_util as cu import ctags import ConfigParser import os import re import readline import select import signal import sys import tempfile i...
""" Functions: binreg binreg_raw check_output find_binreg_20 format_data_files format_pref_file format_exec_file format_predictions is_logged_array_data log_matrix_if_needed ## Moved to matrixlib. #align_rows # WAS align_matrices #align_cols #are_rows_aligned # is_matrices_aligned #are_cols_aligne...
# Copyright (c) 2010-2012 OpenStack Foundation # # 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...
import Cookie import datetime import sys import time import traceback from wsgiref.handlers import format_date_time from gevent import event from . import protocol DEFAULT_DELTA = datetime.timedelta(days=365) def enable_cors(environ, headers): """ Return a list of HTTP headers that will support cross domai...
""" @file comm_bt_command_mnode.py """ ## # @addtogroup bluetooth bluetooth # @brief This is bluetooth component # @{ # @addtogroup comm_bt_command comm_bt_command # @brief This is comm_bt_command module # @{ ## import os import time import subprocess from oeqa.runtime.bluetooth import bluetooth from oeqa.oetest impo...
#!/usr/bin/env python import platform if platform.python_implementation() == "PyPy": import sys sys.path.insert(0, '/usr/lib/python2.7/dist-packages') import argparse import csv import fileinput import itertools import json import logging import logging.config import networkx as nx import sys from distances ...
# -*- coding: utf-8 -*- ''' @author: Gabriele Girelli @contact: gigi.ga90@gmail.com @description: statistic operations library. ''' # DEPENDENCIES ================================================================= import math import matplotlib.pyplot as plt import numpy as np from scipy import stats from pygpseq imp...
# Copyright 2017 Veritas Technologies 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...
import datetime as dt import pytest try: import dateutil except ImportError: dateutil = None from mongoengine import * from mongoengine import connection from tests.utils import MongoDBTestCase class TestDateTimeField(MongoDBTestCase): def test_datetime_from_empty_string(self): """ Ensu...
# 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 In.field.field import Field, FieldFielder, FieldModel from In.field.field_formatter import FieldFormatter class FieldEntityReference(Field): '''EntityReference field''' __input_field_type__ = 'TextBox' def __init__(self, data = None, items = None, **args): super().__init__(data, items, **args) # check an...
# encoding: 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): # Deleting field 'UserInfo.power_level' db.delete_column('canvas_userinfo', 'power_level') def backw...
""" 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, ...
from unittest import TestCase import matrix_vector as m class TestMatrix(TestCase): def test_rows(self): self.assertEqual(m.Matrix([1, 2, 3], [5, 6, 7], [8, 9, 10]).rows(), 3) def test_colums(self): self.assertEqual(m.Matrix(...
''' Script to generate input jsons for miRNA-seq pipeline GitHub info about inputs: https://github.com/ENCODE-DCC/mirna-seq-pipeline/blob/master/docs/reference.md#inputs This script takes experiment accessions as inputs, pulls required metadata for those experiments, and then generates an input.json file for each one ...
"""HMAC-based One-time Password auth module. Sending HOTP through notify service """ import asyncio from collections import OrderedDict import logging from typing import Any, Dict, List, Optional import attr import voluptuous as vol from homeassistant.const import CONF_EXCLUDE, CONF_INCLUDE from homeassistant.core i...
# 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 sendgrid import json import os sg = sendgrid.SendGridAPIClient(os.environ.get('SENDGRID_API_KEY')) ################################################## # Create a domain authentication. # # POST /whitelabel/domains # data = { "automatic_security": False, "custom_spf": True, "default": True, "do...
# Copyright (c) 2006-2013 Regents of the University of Minnesota. # For licensing terms, see the file LICENSE. import conf import g from grax.access_level import Access_Level from grax.user import User from gwis.exception.gwis_error import GWIS_Error from item import grac_record from item import item_base from item i...
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
import inspect import itertools import six from . import util from . import magicnumbers def all_not_none_decider(function, incoming, accepted_keys): return all(incoming.get(key) is not None for key in accepted_keys) class Filters(object): """Registrar for functions that construct filters for submission i...
#!/usr/bin/env python """ Implementation of a simple indexed table type. """ import types, re, os.path, codecs, time True = 1 False = 0 class Table: def __init__(self, name, tableDef): self.__name = name self.__tableDef = tableDef self.__dict = {} self.__indexes = {} self._...
from getgauge.python import step import os import re import subprocess import time ASSET_ROOT = "/gevol/assets" BASE_ASSET_PATH = "gauge_tests" DATABASE_PATH = os.path.join(BASE_ASSET_PATH, "Databases") MAP_LAYER_PATH = os.path.join(BASE_ASSET_PATH, "MapLayers") IMAGERY_PROJECT_PATH = os.path.join(BASE_ASSET_PATH, "Pr...
# Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import logging import os import subprocess import time import common import remote_cmd from log_manager import LogManager from symbolizer impor...
"""Conversion tool from Neuroscan CNT to FIF.""" # Author: Jaakko Leppakangas <jaeilepp@student.jyu.fi> # Joan Massich <mailsik@gmail.com> # # License: BSD-3-Clause from os import path import numpy as np from ...utils import warn, fill_doc, _check_option from ...channels.layout import _topo_to_sphere from .....
# Copyright 2018 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 os class TicTacToeBoard: """ Since the value for X and O is arbitrary. It behooves us to make an effort to never hardcode these values. """ X = True O = False _ = None _d8 = [ lambda x: TicTacToeBoard._rotation(x, 0), lambda x: TicTacToeBoard._rotation(x, 1), ...
""".. rubric:: Corrplot utilities :author: Thomas Cokelaer :references: http://cran.r-project.org/web/packages/corrplot/vignettes/corrplot-intro.html """ import string from colormap import cmap_builder import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm from matplotlib.patches import Ellipse...
# Copyright 2014, 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 applicable law or agreed to in w...
import ast from itertools import combinations import tac import tac_analysis ivy_type_decls = open('ivy_type_decls.ivy').read() def test_function(): #lst = ((1,2), ('a','b')) #lst = [(1,2), ('a', 'b',) , ([],[]), (((),),), 1+x] lst = [] lst = lst + [(1,2)] lst = lst + [('a','b')] #lst.append(...
from deployer.cli import CLInterface, Handler, HandlerType from deployer.console import Console from deployer.console import NoInput from deployer.exceptions import ActionException from deployer.inspection import Inspector, PathType from deployer.node import Env, IsolationIdentifierType from inspect import getfile fro...
# Copyright 2013 IBM Corp. # # 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...
# -*- coding: UTF-8 -*- # Vehicle Type Definitions for Armoured Commander ########################################################################################## # # Copyright 2015 Gregory Adam Scott (sudasana@gmail.com) # # This file is part of Armoured Commander. # # Armoured Commander is free software:...
#!/usr/bin/env python import os import sys import json import argparse import numpy as np import matplotlib import multiprocessing import logging matplotlib.use('agg') import matplotlib.pyplot as plt from pychemia.code.abinit import AbinitInput, AbinitOutput from pychemia.population.orbitaldftu import dmatpawu2params...
# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy,...
# Copyright 2015 CloudByte 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 b...
# Copyright 2013-2014 The Meson development team # 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...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
#!/usr/bin/env python __docformat__ = 'reStructuredText' import argparse import numpy as np from scipy.constants import c, m_e, physical_constants from astropy import units as u def line_freq(Z, R_X, n, dn): """ Uses the Rydberg formula to get the frequency of a transition to quantum number n for a giv...
""" Basic Linear Phase Digital Filter Design Helper Copyright (c) March 2017, Mark Wickert All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyri...
# =========================================================================== # Using TIDIGITS dataset to predict gender (Boy, Girl, Woman, Man) # =========================================================================== # Saved WAV file format: # 0) [train|test] # 1) [m|w|b|g] (alias for man, women, boy, gir...
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Legacy script to plot distribution of certain classes onto chromosomes. Adapted from the script used in the Tang et al. PNAS 2010 paper, sigma figure. """ import sys import logging from math import ceil from itertools import groupby import numpy as np from jcvi.for...
# Copyright 2019 The TensorFlow Authors, The Hugging Face Team. 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...
import tensorflow as tf import numpy as np import pickle import sys """ gives back self.pred, self. """ class vggnet(object): def __init__(self, isLoad, isTrain): self._get_variables(isLoad) self._init_weight_masks(isLoad) # self.conv_network() def loss(logits, labels): """for ...
from sklearn.feature_extraction.text import CountVectorizer from sklearn.pipeline import FeatureUnion from eli5.base import ( DocWeightedSpans, WeightedSpans, FeatureWeights, FeatureWeight as FW) from eli5.formatters import FormattedFeatureName from eli5.sklearn.text import get_weighted_spans hl_in_text = Format...
# Copyright (c) 2018 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 app...
import os import sys import jinja2 import re import json import traceback from dpath import util as dpath_util from jinja2.exceptions import UndefinedError, FilterArgumentError, TemplateSyntaxError from jsonschema import validate, ValidationError, draft4_format_checker from json.decoder import JSONDecodeError from e2j2...
# Copyright 2014 CERN # # 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 wri...
# Copyright (c) 2015 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 time import systrace_agent class FtraceAgentIo(object): @staticmethod def writeFile(path, data): with open(path, ...
#! /usr/bin/env python """Test the arraymodule. Roger E. Masse """ import unittest from test import test_support from weakref import proxy import array, cStringIO from cPickle import loads, dumps, HIGHEST_PROTOCOL class ArraySubclass(array.array): pass class ArraySubclassWithKwargs(array.array): def __ini...
from textwrap import dedent import unittest from peru import parser from peru.parser import parse_string, ParserError from peru.module import Module from peru.rule import Rule class ParserTest(unittest.TestCase): def test_parse_empty_file(self): scope, imports = parse_string('') self.assertDictE...
""" Compute Engine definitions for the Pipeline API. """ from abc import ( ABCMeta, abstractmethod, ) from uuid import uuid4 from six import ( iteritems, with_metaclass, ) from six.moves import zip_longest from numpy import array from pandas import ( DataFrame, date_range, MultiIndex, ) f...
from cStringIO import StringIO import fudge import logging import socket from .. import run from teuthology.exceptions import (CommandCrashedError, CommandFailedError, ConnectionLostError) from .util import assert_raises class TestRun(object): @fudge.with_fakes def test_r...
# -*- coding: utf-8 -*- """Windows UserAssist information collector.""" import codecs import logging from winregrc import data_format from winregrc import errors from winregrc import interface class UserAssistEntry(object): """UserAssist entry. Attributes: guid (str): GUID. name (str): name. value_...
import glob import pandas as pd import numpy as np pd.set_option('display.max_columns', 50) # print all rows import os os.chdir("/gpfs/commons/home/biederstedte-934/evan_projects/correct_phylo_files") cw154 = glob.glob("binary_position_RRBS_cw154*") trito = glob.glob("binary_position_RRBS_trito_pool*") print(len...
# -*- coding: utf-8 -*- """ Sahana Eden Setup Model @copyright: 2015-2016 (c) Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, includ...
# flake8: noqa from tests import WikkedTest, format_link, format_include class ResolverTest(WikkedTest): def testPageInclude(self): wiki = self._getWikiFromStructure({ '/foo.txt': "A test page.\n{{include: trans-desc}}\n", '/trans-desc.txt': "BLAH\n" }) foo = wi...
#!/usr/bin/env python3 import glob import json import optparse import os import os.path import stat import re import shutil import subprocess import sys import tarfile import urllib.error import urllib.parse import urllib.request DEFAULT_RELEASE = None DEFAULT_CHANNEL = "release" KNOWN_CHANNELS = ["release", "rc", "e...
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import copy import json import numpy import logging import networkx from os import path, pardir from collections import namedtuple logger = logging.getLogger(__name__) THIS_DIR = path.dirname(path.abspath(__file...
# 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 -*- # Copyright 2013 Mirantis, 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 requi...
"""Notifications for Android TV notification service.""" import logging from notifications_android_tv import Notifications import requests from requests.auth import HTTPBasicAuth, HTTPDigestAuth import voluptuous as vol from homeassistant.components.notify import ( ATTR_DATA, ATTR_TITLE, ATTR_TITLE_DEFAUL...
# Functions/classes for WCSAxes related to APE14 WCSes import numpy as np from astropy.coordinates import SkyCoord, ICRS, BaseCoordinateFrame from astropy import units as u from astropy.wcs import WCS from astropy.wcs.wcsapi import SlicedLowLevelWCS from .frame import RectangularFrame, EllipticalFrame from .transfor...