gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# 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 appli...
from sympy.core import symbols, Symbol, Tuple, oo from sympy.core.compatibility import iterable, range from sympy.tensor.indexed import IndexException from sympy.utilities.pytest import raises # import test: from sympy import IndexedBase, Idx, Indexed, S, sin, cos, Sum, Piecewise, And, Order def test_Idx_constructio...
#!/usr/bin/env python """ClooudFormation custom Lambda backed resource that returns the latest AMI with the given parameters.""" # Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance ...
''' Created on 12/05/2011 @author: mikel ''' import time from spotify import link, session, SampleType from collections import deque import threading #General buffer error class BufferError(IOError): pass #Risen when stutter is detected class BufferUnderrunError(BufferError): pass class BufferInitiali...
"""Extract reference documentation from the NumPy source tree. """ from __future__ import division, absolute_import, print_function import inspect import textwrap import re import pydoc from warnings import warn import collections import sys class Reader(object): """A line-based string reader. """ def ...
# Python Classes/Functions used to Export Tycho's Datasets # ------------------------------------- # # Python Package Importing # # ------------------------------------- # # TO-DO: Add time back to bookkeeping becasue of Tyler's code # Importing Necessary System Packages import os, io import numpy as n...
#!/usr/bin/python # # N9 Personal Web Server # 2012-02-19; Thomas Perl # http://thp.io/2012/serverr/ # # Copyright (c) 2012 Thomas Perl <m@thp.io> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and...
# -*- coding: utf-8 -*- # Copyright 2013 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 require...
#! /usr/bin/env python """Basic Model Interface implementation for deltaRCM.""" import types import numpy as np from bmi import Bmi from .deltaRCM import DeltaRCM class BmiDeltaRCM(Bmi): """Create deltas from random walks.""" _name = 'DeltaRCM' _input_var_names = ('surface__elevation',) _output_va...
# Copyright 2018 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...
# 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 param import numpy as np from ..core import Dimension, Dataset, NdOverlay from ..core.operation import Operation from ..core.util import basestring, cartesian_product, isfinite from ..element import (Curve, Area, Image, Distribution, Bivariate, Contours, Polygons) from .element import co...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
"""various utility functions""" import os.path import sys import platform import multiprocessing import yaml from mod import log host_platforms = { 'Darwin': 'osx', 'Linux': 'linux', 'Windows': 'win' } #------------------------------------------------------------------------------- def fix_path(pat...
from __future__ import unicode_literals import os import sys import json from copy import deepcopy from itertools import count from threading import RLock, Event from datetime import datetime, timedelta from collections import Mapping, MutableMapping import six from ws4py.client.threadedclient import WebSocketClient ...
#!/usr/bin/python #--------------------------------------------------------------------------------------------------- # Show the TA assignments in the database that have been made for a specific semester. # #--------------------------------------------------------------------------------------------------- import sys,...
#!/usr/bin/env python """ This application presents a 'console' prompt to the user asking for Who-Is and I-Am commands which create the related APDUs, then for each I-Am that is returned, reads the object name of the device object (often called simply the device name). """ import sys from bacpypes.debugging import b...
""" Basic sorting algorithms and their variations """ import random from Numerical import merge_sorted_lists def insert_sort_inplace(arr): """ Sort all the elements in a list in place. As the elements are picked off from one end of the list, they are put in sorted order, at the other end. RUN...
__all__ = ['Distribution'] import re import os import warnings import numbers import distutils.log import distutils.core import distutils.cmd import distutils.dist from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, DistutilsSetupError) from distutils.util import rfc822_escape from setupto...
# ============================================================================== # 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 ...
import re import os import sys import logging import argparse import multiprocessing as mp import sqlalchemy as sa import db title_pattern = re.compile("#\*([^\r\n]*)") author_pattern = re.compile("#@([^\r\n]*)") year_pattern = re.compile("#year([0-9]*)") venue_pattern = re.compile("#conf([^\r\n]*)") citation_patte...
# This script is going to create the skelton of our LTER # database and begin to populate it with raw data # Note this is the newer version of the schema # that was based on the meeting that tool place on # December 21, 2015 with Aldo, Tom, and myself # In addition rather than using psycopg2 as a module # to populate t...
######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. 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...
from django.contrib.auth.models import User from django.db import models from core.lists import ( ALIGNMENT_CHOICES, DIRECTION_CHOICES, DOOR_RESET_CHOICES, DOOR_TRIGGER_TYPE_CHOICES, SEX_CHOICES, WEAPON_TYPE_CHOICES, ) ### Area models ### class AreaFlag(models.Model): """ Flags th...
import hashlib import logging import random import re import time from datetime import datetime, timedelta from django.conf import settings from django.contrib.auth.models import User, Group from django.contrib.sites.models import Site from django.db import models from django.utils.translation import ugettext as _, ug...
# Copyright (c) 2014 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 (c) 2012-2014 The GPy authors (see AUTHORS.txt) # Licensed under the BSD 3-clause license (see LICENSE.txt) import numpy as np from scipy import stats,special import scipy as sp import link_functions from ..util.misc import chain_1, chain_2, chain_3 from scipy.integrate import quad import warnings from ..c...
from Classification import classification_by_name from Node import error # noqa: I201 from kinds import lowercase_first_word # noqa: I201 class Token(object): """ Represents the specification for a Token in the TokenSyntax file. """ def __init__(self, name, kind, serialization_code, unprefixed_kind...
# coding=utf-8 # Copyright 2021 The Fairseq Authors and The HuggingFace Inc. 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/...
from . import db from markdown import markdown from . import login_manager from flask.ext.login import UserMixin, AnonymousUserMixin from werkzeug.security import generate_password_hash, check_password_hash from flask import current_app, request from . import db, login_manager from itsdangerous import TimedJSONWebSigna...
import numpy as np from scipy.signal import ricker, cwt from cued_datalogger.api.pyqt_extensions import MatplotlibCanvas from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QSlider, QLabel, QSpinBox, QHBoxLayout, QGridLayout, QComboBox from PyQt5.QtCore import Qt import sys #--------------------------...
import logging import numpy as np from collections import OrderedDict import theano import theano.tensor as T from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams from theano.tensor.nnet.conv import conv2d, ConvOp from theano.sandbox.cuda.blas import GpuCorrMM from theano.sandbox.cuda.basic_ops impor...
# Copyright (c) 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 required by applicable law or agreed to in writ...
#For use with python 3.x. # Program only checks xml files in the directory that contains this python file. # Delete all csv files before running script. Script appends to csv files of # the same name if they already exist. # libraries from bs4 import BeautifulSoup # select XML tags and parse text from os i...
#! /usr/bin/python """ Copyright 2013, Big Switch Networks, 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...
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-04-13 01:25 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='trips', ...
import math import numpy as np import subprocess import numbers import importlib import sys import re from itertools import chain, combinations import numba from numba.core import config, cpu from numba import prange, njit from numba.core.compiler import compile_isolated, Flags from numba.tests.support import TestCase...
""" Returns nicely-presented versions of the ranges between two dates e.g. 27-29 May 2009 27 May-1 June 2009 8 pm-12 midnight 8 am-12 noon 8.30-9 am """ from datetime import date, time, datetime DAYS_IN_MONTHS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] def days_in_month(date): #January = 1 if date.mon...
# Copyright 2015 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...
from sqlalchemy import and_ from sqlalchemy import exc from sqlalchemy import ForeignKey from sqlalchemy import func from sqlalchemy import INT from sqlalchemy import Integer from sqlalchemy import literal from sqlalchemy import MetaData from sqlalchemy import Sequence from sqlalchemy import sql from sqlalchemy import ...
# -*- coding: utf-8 -*- """ Missing Person Registry @author: nursix """ module = request.controller prefix = request.controller resourcename = request.function if not settings.has_module(module): raise HTTP(404, body="Module disabled: %s" % prefix) MISSING = str(T("Missing")) FOUND = str(T("Found")) DE...
from collections import OrderedDict, Iterable from itertools import takewhile, count try: from itertools import izip, ifilter except ImportError: #Python3 izip = zip ifilter = filter from datetime import datetime, timedelta import numpy as np from scipy.optimize import leastsq, fsolve from astro import astro import...
# 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. """Finds perf trybots that can run telemetry tests.""" import json import logging import os import re import subprocess import sys import urllib2 from tele...
#! /usr/bin/env python # -*- coding: utf-8 -*- """Shell for interactive testing. This file is taken from the Lantz Project. :copyright: (c) 2014-2020 by PyVISA Authors, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import cmd from typing import List, Tuple from . import ResourceMana...
from core.app import App, AppParameter, AppFile import unittest import shutil import pdb class TestAppParameter(unittest.TestCase): """ test for App Parameters """ def test_check_error_parameter_type(self): param = {'type': 'error type'} self.assertRaises(TypeError, AppParameter, param)...
import argparse import glob import cv2 import numpy as np from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten, BatchNormalization, Lambda, Activation from keras.layers import Conv2D, MaxPooling2D, concatenate, Input from keras.callbacks import TensorBoard from keras.models import load_...
# Copyright 2018, Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# -*- coding: utf-8 -*- """ Taggers wrapping the neural networks. """ import logging import numpy as np from itertools import izip from . import utils from . import config from . import attributes from .metadata import Metadata from .pos import POSReader from .srl import SRLReader from .parse import DependencyReader...
""" parted - Command ================ This module provides processing for the ``parted`` command. The output is parsed by the ``PartedL`` class. Attributes are provided for each field for the disk, and a list of ``Partition`` class objects, one for each partition in the output. Typical content of the ``parted -l`` ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2012, Roboterclub Aachen e.V. # 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 t...
from freeipa_base_action_test_case import FreeIPABaseActionTestCase import ipa_action from ipa_command_args_options import IPA_COMMAND_ARGS_OPTIONS import copy import mock import requests class TestActionsIpaAction(FreeIPABaseActionTestCase): __test__ = True action_cls = ipa_action.IpaAction def test_in...
#!/usr/bin/env python __author__ = 'heroico' ######################################################################################################################## # Gathers statistics on allele information. # Produces a csv with the following columns: # rsid,chromosome,wdb_ref_allele,wdb_eff_allele,legend_ref_allel...
""" Basic tests of DatasetAssembler. Some features are testsed in other sibling test files, such as alternative naming conventions. """ from datetime import datetime, timezone from pathlib import Path from pprint import pprint from textwrap import dedent from uuid import UUID import numpy import pytest from ruamel im...
# -*- coding: utf-8 -*- """ pyrseas.dbobject.operclass ~~~~~~~~~~~~~~~~~~~~~~~~~~ This module defines two classes: OperatorClass derived from DbSchemaObject and OperatorClassDict derived from DbObjectDict. """ from pyrseas.dbobject import DbObjectDict, DbSchemaObject from pyrseas.dbobject import commen...
import logging from collections import defaultdict from .. import Analysis from .annotations import StackLocationAnnotation from ..code_location import CodeLocation from ..forward_analysis import ForwardAnalysis, FunctionGraphVisitor from ... import BP, BP_AFTER from ...keyed_region import KeyedRegion from ...sim_va...
# !/usr/bin/python3 import logging from argparse import ArgumentParser from collections import deque from time import sleep import yaml from mppsolar.libs.mqttbroker import MqttBroker from mppsolar.outputs import output_results from mppsolar.ports import get_port from mppsolar.protocols import get_protocol from mppso...
#!/usr/bin/python3 # db.py by Bill Weinman <http://bw.org/contact/> # Copyright (c) 2010 The BearHeart Group, LLC # created 2010-04-23 # import sys, os import sqlite3 from bwCGI import bwCGI from bwDB import bwDB from bwTL import tlFile from bwConfig import configFile __version__ = "1.1.3" # namespace container for...
#!/usr/bin/env python # # $Id: kfssetup.py 36 2007-11-12 02:43:36Z sriramsrao $ # # Copyright 2007 Kosmix Corp. # # This file is part of Kosmos File System (KFS). # # 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 cop...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 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 # # Unle...
# Copyright 2016 NEC Corporation. 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 la...
""" Plotting utility functions. """ import cartopy.crs as ccrs from cartopy.util import add_cyclic_point from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER import matplotlib.pyplot as plt import matplotlib.ticker as mticker import numpy as np import xarray from xarray.plot.utils import _dete...
def find_seeing(SUPA,FLAT_TYPE): import os, re, utilities, sys from copy import copy dict = get_files(SUPA,FLAT_TYPE) print dict['file'] search_params = initialize(dict['filter'],dict['cluster']) search_params.update(dict) print dict['files'] #params PIXSCALE GAIN ''' quick r...
# # 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...
# -*- coding: utf-8 -*- """ Buildings Assessments module @author Fran Boon <fran@aidiq.com> Data model from: http://www.atcouncil.org/products/downloadable-products/placards Postearthquake Safety Evaluation of Buildings: ATC-20 http://www.atcouncil.org/pdfs/rapid.pdf This is actually bas...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
""" Feature scoring functionality """ import math from operator import itemgetter import numpy as np import pandas as pd from sklearn.ensemble import (ExtraTreesClassifier, ExtraTreesRegressor, RandomForestClassifier, RandomForestRegressor) from sklearn.feature_selection import (f_regr...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. # -*- test-case-name: flocker.provision.test.test_install -*- """ Install flocker on a remote node. """ import posixpath from textwrap import dedent from urlparse import urljoin, urlparse from effect import Func, Effect import yaml from zope.interface impo...
#!/usr/bin/env python """ Unit tests for :mod:`clans.fmt`. """ import sys if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest import clans.fmt from io import StringIO from datetime import datetime TEST_DATA = { 'test_format_date': datetime(2015, 1, 28, 23, 46), 'test_fo...
import collections import sys import os from enum import Enum from functools import reduce from inspect import signature from time import gmtime, strftime import numpy as np import tensorflow as tf # noinspection PyProtectedMember from tensorflow.python.ops.gradients_impl import _hessian_vector_product as _hvp from te...
""" Methods for reading vcf files and importing it in our database representation. We leverage pyvcf as much as possible. """ from django.db import reset_queries import vcf from main.model_utils import get_dataset_with_type from main.models import Chromosome from main.models import ExperimentSample from main.models...
''' Created 09/04/2014 @authors: Yifan Ning and Rich Boyce @summary: parse drug synonymns, dbid, name from drugbank.xml then parse synonymns from UNIIs records and match the results. Output: FDA PreferredTerm, FDA synonymn, UNII, Drugbank drug, drugbank id, matchedByKey ''' from lxml import etr...
#!/usr/bin/env python import zipfile import gzip class SNP: def __init__(self,data): self.rsid = data[0].strip('"') self.chromosome = data[1].strip('"') if len(self.chromosome) == 1 and self.chromosome.isdigit(): self.chromosome = '0'+self.chromosome self.position = int...
from discord.ext import commands, tasks from .utils import db, checks from collections import Counter, defaultdict import discord import asyncio import asyncpg import datetime import logging import yarl import re import io log = logging.getLogger(__name__) BLOB_GUILD_ID = 272885620769161216 EMOJI_REGEX = re.compile...
from unittest import TestCase, main from socketio.namespace import BaseNamespace from socketio.virtsocket import Socket from mock import MagicMock class MockSocketIOServer(object): """Mock a SocketIO server""" def __init__(self, *args, **kwargs): self.sockets = {} def get_socket(self, socket_id='...
#!/usr/bin/env python """ Apply a "Security Group" to the members of an etcd cluster. Usage: apply-firewall.py """ import os import re import string import argparse from threading import Thread import uuid import colorama from colorama import Fore, Style import paramiko import requests import sys import yaml def ge...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases for L{twisted.names.client}. """ from __future__ import division, absolute_import from zope.interface.verify import verifyClass, verifyObject from twisted.python import failure from twisted.python.filepath import FilePath from tw...
# -*- coding: utf-8 -*- from django.conf import settings from datetime import datetime import logging from django.contrib.auth.models import User, Permission from django.contrib.contenttypes.models import ContentType from django.test import TestCase from django.urls import reverse from django.test.utils import overr...
from ..errors import AngrMemoryError, AngrTranslationError from ..analysis import Analysis, register_analysis from collections import deque import logging import math import networkx import types # todo include an explanation of the algorithm # todo include a method that detects any change other than constants # todo...
# -*- coding: utf-8 -*- """ Created on Fri Aug 28 09:47:17 2015 @author: ibackus """ # External imports import os import numpy as np import cPickle as pickle from warnings import warn # Internal imports from pbmov import pbmov_utils # Setup defaults file _dir = os.path.dirname(os.path.abspath(__file__)) fDefaults = ...
"""Training objective for self-critical learning. Self-critic learning is a modification of the REINFORCE algorithm that uses the reward of the train-time decoder output as a baseline in the update step. For more details see: https://arxiv.org/pdf/1612.00563.pdf """ from typing import Callable, Iterable, Tuple from ...
# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file ac...
# Copyright (c) 2016 Universidade Federal Fluminense (UFF) # Copyright (c) 2016 Polytechnic Institute of New York University. # This file is part of noWorkflow. # Please, consult the license terms in the LICENSE file. """Define bytecode interpreter that supports iteration on bytecode""" from __future__ import (absolute...
"""Endpoint to generate footer HTML.""" import logging import re from functools import lru_cache from django.conf import settings from django.shortcuts import get_object_or_404 from django.template import loader as template_loader from rest_framework.renderers import JSONRenderer from rest_framework.response import R...
# -*- coding: utf-8 -*- """ continuity.services.pt ~~~~~~~~~~~~~~~~~~~~~~ Pivotal Tracker API. :copyright: 2015 by Jonathan Zempel. :license: BSD, see LICENSE for more details. """ from .commons import IDObject, RemoteService, ServiceException from .utils import cached_property, datetime_property...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
""" missing types & inference """ import numpy as np from pandas._libs import lib, missing as libmissing from pandas._libs.tslib import NaT, iNaT from .generic import (ABCMultiIndex, ABCSeries, ABCIndexClass, ABCGeneric, ABCExtensionArray) from .common import (is_string_dtype...
from __future__ import with_statement from optparse import make_option import re import shutil import os from django.core.management.base import CommandError from django.template import Context from django.template.loader import get_template from django.conf import settings # external import inflection from subcomman...
import codecs from collections import defaultdict import os import re import time RPM_AVAILABLE = False try: import rpm import rpmUtils.miscutils RPM_AVAILABLE = True except ImportError: pass import exception def spec_fn(spec_dir='.'): specs = [f for f in os.listdir(spec_dir) \ if o...
from matplotlib import rc import matplotlib.pyplot as plt from matplotlib.ticker import FuncFormatter import numpy as np plot_params = {'margin': {'left': 0.13, 'right': 0.05, 'top': 0.07, 'bottom': 0.15}, 'keepAxis': ['left'...
#!/usr/bin/env python # Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. import sys import os import time import argparse import logging import re import shutil import math import random from collections import Counter import threading import Queue try: import digits except ImportError: # Ad...
# Copyright 2019, 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 agreed to in writing...
# pylint: disable=unused-argument import importlib import logging import pytest import sys import warnings from concurrent.futures import ThreadPoolExecutor from io import StringIO from itertools import permutations from unittest import mock import mlflow from mlflow.tracking import MlflowClient from mlflow.utils imp...
# Copyright 2012 Locaweb. # 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...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc import resultstoresearchapi.invocation_pb2 as invocation__pb2 import resultstoresearchapi.resultstore_download_pb2 as resultstore__download__pb2 class ResultSt...
# Copyright 2013 Josh Durgin # Copyright 2013 Red Hat, 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-...
# Copyright 2017 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 agreed to in writing, s...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2012 Midokura Japan K.K. # Copyright (C) 2013 Midokura PTE LTD # 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 th...
# -*- coding: utf-8 -*- import sys from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.keys import Keys from tqdm import tqdm from winnaker.helpers import * from winnaker.settings import * ERROR_LIST = { "Whitelabel Error Page": "Check clouddriver",...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import logging import os import signal import sys import time import traceback from abc import ABCMeta from hashlib import sha256 from typing import Cal...