gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import datetime import json from epumgmt.api.exceptions import InvalidConfig import os # Torque times are reported using the local timezone, e.g. pacific if using # us-west EC2, however, EPU components are logging in UTC UTC_OFFSET = 7 # Events: # EPU_CONTROLLER_START # EPU_CONTROLLER_TERMINATE class ControllerEven...
# 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...
#!/usr/bin/env python """This module contains the unit tests for the pytodoist.todoist module.""" import time import unittest from pytodoist import todoist from pytodoist.test.util import create_user # Sometimes Todoist changes this which will cause tests to fail. N_DEFAULT_TASKS = 13 N_DEFAULT_PROJECTS = 3 N_DEFAULT...
# 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 2018 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """API for interacting with the LUCI Scheduler service. Depends on 'prpc' binary available in $PATH: https://godoc.org/go.chromium.org/luci/grp...
import re import json import time import types import urllib import pymongo import decimal import functools import unicodecsv import datetime import urlparse from bson import ObjectId from operator import itemgetter from itertools import chain, imap from collections import defaultdict, OrderedDict from django.core i...
from __future__ import absolute_import import copy from django.test import TestCase from django import forms from django.contrib.contenttypes.models import ContentType from django.template import Context from django.utils import unittest import mock from widgy.forms import WidgyFormMixin, WidgyFormField from widgy.m...
########################################################################## # # Copyright (c) 2015, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
import unittest import pickle import cPickle import pickletools import copy_reg from test.test_support import TestFailed, have_unicode, TESTFN, \ run_with_locale # Tests that try a number of pickle protocols should have a # for proto in protocols: # kind of outer loop. assert pickle....
import glob import os import datetime from collections import OrderedDict import pandas as pd import numpy as np from sklearn.manifold import TSNE import scipy.stats as stats import scipy.sparse as sparse from sparse_dataframe import SparseDataFrame def combine_sdf_files(run_folder, folders, verbose=False, **kwa...
import numpy as np from copy import deepcopy from matplotlib.pyplot import text from pyKinectTools.algs.SkeletonBeliefPropagation import * from pyKinectTools.algs.GraphAlgs import * from pyKinectTools.algs.OrientationEstimate import * import pyKinectTools.algs.NeighborSuperpixels.NeighborSuperpixels as nsp import sys...
from .operators import RelativeOperand class What(object): """Specify 'what' a Query retrieves.""" Out = 0 In = 1 Both = 2 OutE = 3 InE = 4 BothE = 5 OutV = 6 InV = 7 Eval = 8 Coalesce = 9 If = 10 IfNull = 11 Expand = 12 First = 13 Last = 14 Count = 1...
# -*- coding: utf-8 -*- import json try: from django.contrib.admin.options import (RenameBaseModelAdminMethods as ModelAdminMetaClass) except ImportError: from django.forms.widgets import (MediaDefiningClass as ModelAdminMetaClass) import re from cms.constants imp...
# -*- coding: utf-8 -*- """The parser and parser plugin presets.""" import yaml from plaso.containers import artifacts from plaso.lib import errors class ParserPreset(object): """Parser and parser plugin preset. Attributes: name (str): name of the preset. operating_systems (list[OperatingSystemArtifact...
# 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 script tests the installer with test cases specified in the config file. For each test case, it checks that the machine states after the execution o...
#! /usr/bin/env python import unittest import operator import cPickle import copy import sys import numpy import itertools import mvn sqrt = mvn.sqrt Mvn = mvn.Mvn Matrix = mvn.Matrix import mvn.helpers as helpers import mvn.test.fixture as fixture fix = fixture.MvnFixture(fixture.lookup['last']) class myTests...
import re import sre_constants from itertools import chain from PyQt4 import QtCore from PyQt4 import QtGui from PyQt4.QtCore import * from PyQt4.QtGui import * from Orange.widgets import gui from Orange.widgets.settings import Setting, ContextSetting from Orange.widgets.widget import OWWidget from Orange.data import...
# -*- coding: utf-8 -*- # ============================================================================= # Copyright (c) 2011 Tom Kralidis # # Authors : Tom Kralidis <tomkralidis@gmail.com> # # Contact email: tomkralidis@gmail.com # ============================================================================= from io i...
# Copyright 2014: Intel 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 a...
# -*- 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...
# # 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...
from unittest import TestCase from src.Escuderia import Escuderia from src.Piloto import Piloto from src.Circuito import Circuito from src.GranPremio import GranPremio from mock import patch __author__ = 'MAMISHO' class TestGranPremio(TestCase): def test_extraer_participantes_1(self): """ Test ex...
from south.db import db from django.db import models from dinette.models import * class Migration: def forwards(self, orm): # Adding model 'DinetteUserProfile' db.create_table('dinette_dinetteuserprofile', ( ('id', orm['dinette.DinetteUserProfile:id']), ('user...
# -*- coding: ascii -*- r""" :Copyright: Copyright 2010 - 2015 Andr\xe9 Malo or his licensors, as applicable :License: 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....
from model_bakery import baker from django.conf import settings from django.test import TestCase from sponsors.forms import ( SponsorshipsBenefitsForm, SponsorshipApplicationForm, Sponsor, SponsorContactForm, SponsorContactFormSet, SponsorBenefitAdminInlineForm, SponsorBenefit, Sponsor...
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import print_function, absolute_import, unicode_literals from functools import wraps import contextlib import copy import json...
import math import os.path from PyQt4 import Qt from lttngc import utils, model from lttngc.power2_spinbox import QLttngcPowerTwoSpinBox class QLttngcAddChannelDialog(utils.QCommonDialog, utils.QtUiLoad, utils.AcceptDialog): _UI_NAME = 'add-channel' _ACCEPT_ICON_NAME = 'add' ...
# L-System scene generator # Cmpt 461 Final Project # Allen Pike, apike@sfu.ca # This program takes an L-System definition, and outputs a .pbrt scene file of that model. # The .pbrt scene file can be included into a master scene file and rendered with the # raytracer pbrt. ## Todo: # Implement command-line arguments....
#!/usr/bin/python # coding: utf-8 # imports import socket import sys import hashlib import binascii import collections # classes class SockClient(object): """SockClient for handling the connection to the server""" def __init__(self): # Creates a TCP/IP socket try: self.client = so...
# Copyright 2020 DeepMind Technologies Limited. # # 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 ag...
import gzip import inspect import warnings from cStringIO import StringIO from scrapy.utils.trackref import object_ref from twisted.trial import unittest from scrapy.spider import Spider, BaseSpider from scrapy.http import Request, Response, TextResponse, XmlResponse, HtmlResponse from scrapy.contrib.spiders.init imp...
# Flask dependancy from flask import Flask from flask import render_template from flask import request from flask import redirect from flask import jsonify from flask import url_for from flask import flash from flask import session as session_object from flask import make_response from functools import wraps # ORM: SQL...
""" Timezone-related classes and functions. This module uses pytz when it's available and fallbacks when it isn't. """ from datetime import datetime, timedelta, tzinfo from threading import local import sys import time as _time try: import pytz except ImportError: pytz = None from django.conf import setting...
import discord from discord.ext import commands import time import clashroyale as clashroyaleAPI import itertools import re from datetime import datetime BOTCOMMANDER_ROLES = ["Family Representative", "Clan Manager", "Clan Deputy", "Co-Leader", "Hub Officer", "admin"] creditIcon = "https://i.img...
import salt import salt.client import salt.gdc.groups from openstack_dashboard.settings import SALT_MASTER_CONFIG from openstack_dashboard.settings import SALT_SLS_DIR from openstack_dashboard.settings import SALT_SLS_REPO_DIR import yaml import operator from os import listdir from os.path import isfile,isdir from ...
# mako/cache.py # Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from mako import util _cache_plugins = util.PluginLoader("mako.cache") register_plugin = _cache_plugin...
import os import re import stat import subprocess import sublime import sublime_plugin from Vintageous.ex import ex_error from Vintageous.ex import shell from Vintageous.ex.ex_error import Display from Vintageous.ex.ex_error import ERR_CANT_FIND_DIR_IN_CDPATH from Vintageous.ex.ex_error import ERR_CANT_MOVE_LINES_ONT...
from __future__ import print_function, division import matplotlib matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! from neuralnilm import Net, RealApplianceSource, BLSTMLayer, DimshuffleLayer from lasagne.nonlinearities import sigmoid, rectify from lasagne.objectives import crossentropy, mse...
""" Definition of network object. """ import numpy as num import matplotlib.pyplot as plt import copy import itertools import logging from kreveik.classes import * import kreveik.probes as probes from kreveik import network class TopologicalNetwork(ProbeableObj): """ This object is a stripped down network, ...
""" The methods for loading Home Assistant components. This module has quite some complex parts. I have tried to add as much documentation as possible to keep it understandable. Components can be accessed via hass.components.switch from your code. If you want to retrieve a platform that is part of a component, you sh...
""" # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2011 Cisco Systems, 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.ap...
import ujson as json from v20.base_entity import BaseEntity from v20.base_entity import EntityDict from v20.request import Request from v20 import spec_properties class Candlestick(BaseEntity): """ The Candlestick representation """ # # Format string used when generating a summary for this objec...
""" MODULE : translator.py Purpose : Contains the main translation function. Import Acronym : TRANS """ # List of Imports Begin import debug as DEBUG import instr3ac as INSTRUCTION import registers as REG import global_objects as G import translator as TRANS import library as LIB import mips_assembly as ASM # List...
''' Created on 2013-01-22 @author: levi ''' import unittest import time import sys from symbolic_state_space import SymbolicStateSpace from t_core.matcher import Matcher from t_core.messages import Packet from himesis_utils import graph_to_dot # all runs are the same transformation, but with different metamodel el...
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Hoverlabel(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout" _path_str = "layout.hoverlabel" _valid_props = { "align", "bg...
import networkx from operator import itemgetter from PyGNA import Utility from PyGNA import NetworkFrames import pickle import copy import random import math import pylab import sys class GTrieNode: def __init__(self): self.depth = 0 self.is_leaf = False self.label = None self.grap...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
from copy import copy import sqlalchemy as sa from sqlalchemy_continuum.utils import tx_column_name from tests import TestCase, create_test_cases class VersionModelAccessorsTestCase(TestCase): def test_previous_for_first_version(self): article = self.Article() article.name = u'Some article' ...
#!/usr/bin/env python3 # Copyright (c) 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 bumpfee RPC. Verifies that the bumpfee RPC creates replacement transactions successfully when its ...
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Runs all the buildbot steps for ChromeDriver except for update/compile.""" import optparse import os import platform import shu...
""" LICENCE ------- Copyright 2013 by Kitware, Inc. All Rights Reserved. Please refer to KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. """ import os import numpy as np import csv import svm import svmutil import easyio import kern...
#!/usr/bin/python # Software License Agreement (BSD License) # # Copyright (c) 2012, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code mu...
import itertools import operator import re from copy import deepcopy from scrapy import log from scrapy.http import Request, HtmlResponse, FormRequest try: from scrapy.spider import Spider except ImportError: # BaseSpider class was deprecated in Scrapy 0.21 from scrapy.spider import BaseSpider as Spider f...
from statistics import mean, stdev import visa class Keithley2400: def __init__(self, gpib_addr=23): """ Constructor for Keithley 2400 Sourcemeter :param gpib_addr: GPIB address (configured on Keithley 2400) """ self._gpib_addr = str(gpib_addr) self._resource_man...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
# Copyright 2018 The Cirq Developers # # 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 ...
# Copyright (c) 2013 VMware, 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...
from piston.handler import BaseHandler, rc from systems.models import System, SystemRack,SystemStatus,NetworkAdapter,KeyValue from truth.models import Truth, KeyValue as TruthKeyValue from dhcp.DHCP import DHCP as DHCPInterface from dhcp.models import DHCP from MacroExpansion import MacroExpansion from KeyValueTree imp...
"""Ambry Library User Administration CLI Copyright (c) 2015 Civic Knowledge. This file is licensed under the terms of the Revised BSD License, included in this distribution as LICENSE.txt """ __all__ = ['command_name', 'make_parser', 'run_command'] command_name = 'ui' from ambry.cli import prt, fatal, warn, err de...
import requests import json import re import fileinput from optparse import OptionParser import subprocess import os import sys import time from perfrunner.settings import ClusterSpec from perfrunner.utils.install import CouchbaseInstaller from perfrunner.utils.cluster import TestConfig, ClusterManager from logger i...
#!/usr/bin/env python """Base class for api services.""" import contextlib import datetime import logging import pprint from protorpc import message_types from protorpc import messages import six from six.moves import http_client from six.moves import urllib from apitools.base.py import credentials_lib from apitoo...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- test-case-name: twisted.test.test_usage -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ twisted.python.usage is a module for parsing/handling the command line of your program. For information on how to use it, see U{http://twistedmatrix.com/projects/core/documentation/howto/opti...
#!/usr/bin/env python """Provides tools for building Osx application bundles.""" import os import re import shutil import fnmatch from SCons.Builder import * from SCons.Defaults import SharedCheck, ProgScan from SCons.Script.SConscript import SConsEnvironment #########################################################...
import re import logging import json import pathlib import inspect import numpy as np from os import remove from os.path import join, dirname, isfile from typing import List, Tuple from deprecated import deprecated import openql as ql from pycqed.utilities.general import suppress_stdout from pycqed.utilities.general ...
import logging import pymel.core as pmc from maya.app.general.mayaMixin import MayaQWidgetDockableMixin from coconodz.etc.maya.ae.hooks import (DESIRED_HOOK, OWNER, remove_template_custom_content ) ...
# 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 applicable ...
import petsc4py import sys petsc4py.init(sys.argv) from petsc4py import PETSc import numpy as np from dolfin import tic, toc import HiptmairSetup import PETScIO as IO import scipy.sparse as sp import MatrixOperations as MO import HiptmairSetup class BaseMyPC(object): def setup(self, pc): pass def reset...
#!/usr/bin/env python """ @package mi.dataset.parser.adcpt_acfgm_dcl_pd8 @file marine-integrations/mi/dataset/parser/adcpt_acfgm_dcl_pd8.py @author Sung Ahn @brief Parser for the adcpt_acfgm_dcl_pd8 dataset driver This file contains code for the adcpt_acfgm_dcl_pd8 parsers and code to produce data particles. instrume...
import json from functools import lru_cache from typing import Dict, Iterable, Optional import dateutil.parser as dp import requests from pydantic.class_validators import validator from datahub.configuration.common import ConfigModel from datahub.emitter.mce_builder import DEFAULT_ENV from datahub.ingestion.api.commo...
from pycket.test.testhelper import * from pycket.values import * import pytest skip = pytest.mark.skipif("True") # Creating Structure Types def test_make_struct_type(doctest): """ > (define-values (struct:a make-a a? a-ref a-set!) (make-struct-type 'a #f 2 1 'uninitialized)) > (define an-a (make...
""" homeassistant.util ~~~~~~~~~~~~~~~~~~ Helper methods for various modules. """ import collections from itertools import chain import threading import queue from datetime import datetime, timedelta import re import enum import socket import random import string from functools import wraps RE_SANITIZE_FILENAME = re....
# Copyright (c) 2003-2012 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, o...
"""caching_query.py Represent persistence structures which allow the usage of Beaker caching with SQLAlchemy. The three new concepts introduced here are: * CachingQuery - a Query subclass that caches and retrieves results in/from Beaker. * FromCache - a query option that establishes caching parameters on a Q...
#!/usr/bin/python # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community' } DOCUMENTATION = ''' --- module: aws_ses_identity short_de...
from Queue import Queue from threading import _Event, Thread from urlparse import urlparse from functools import partial from socketIO_client import SocketIO, SocketIONamespace, EngineIONamespace from exceptions import HeimdallrClientException from utils import timestamp, for_own_methods, on_ready from settings import...
""" Essential implementation of the Store interface defined by RDF lib. """ from django.db.utils import IntegrityError import rdflib from rdflib.store import VALID_STORE from rdflib.term import Literal, Identifier from rdflib_django import models from rdflib_django.models import NamespaceModel DEFAULT_STORE = "Defaul...
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import logging from dataclasses import dataclass from typing import Optional, Tuple from pants.base.build_environment import get_buildroot from pants.b...
#!/usr/bin/env python3 ''' This script extracts kerning and groups from a compiled OTF and injects them into a new UFO file (which is created via `tx`). It requires the Adobe FDK (tx) to be installed, as well as the module `getKerningPairsFromOTF.py`; which is distributed in the same folder. usage: python convertKern...
# Copyright (c) 2009-2011 Reza Lotun http://reza.lotun.name/ # Copyright (c) 2011 Jann Kleen # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this sof...
from decimal import Decimal as D from django.utils.six.moves import http_client import datetime from django.conf import settings from django.test import TestCase from django.utils.translation import ugettext from django.core.urlresolvers import reverse from oscar.test.factories import create_product from oscar.core.c...
# -*- coding: utf-8 -*- # 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 requi...
from common_fixtures import * # NOQA WEB_IMAGE_UUID = "docker:sangeetha/testlbsd:latest" SSH_IMAGE_UUID = "docker:sangeetha/testclient:latest" logger = logging.getLogger(__name__) def env_with_sidekick_config(client, service_scale, launch_config_consumed_service, ...
# # Collect Thread Class # Author: Francis T # # Thread for handling data collection operations # import logging import dryad.ble_utils as ble_utils from random import randint from time import sleep from threading import Thread, Event, Lock from queue import Queue from dryad.database import DryadDatabase from...
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
""" Tutorial followed from https://www.kaggle.com/gzuidhof/full-preprocessing-tutorial """ import numpy as np # linear algebra np.set_printoptions(threshold=np.inf) import dicom import os import scipy.ndimage as ndimage import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import sys from skimage imp...
# Copyright (c) 2012, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright # notice, this list of cond...
# -*- coding: utf-8 -*- """Test layout.""" #------------------------------------------------------------------------------ # Imports #------------------------------------------------------------------------------ from itertools import product import numpy as np from numpy.testing import assert_equal as ae from num...
#! /usr/bin/env python3 import sys import math from mule_local.JobMule import * from mule.plotting.Plotting import * from mule.postprocessing.JobsData import * from mule.postprocessing.JobsDataConsolidate import * import matplotlib.pyplot as plt from matplotlib.lines import Line2D groups = ['runtime.timestepping_...
#!/usr/bin/env python # encoding: 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 (the # ...
#!/usr/bin/env python3 import sys import os import zipfile import urllib import time import getopt import json import datetime import random import shutil from sqlite_bmk import SQLiteBenchmarker def main(argv): ## default values options_file = '' base_dir=os.path.abspath(os.getcwd()) num_random = 30 found_optio...
import logging from nose.tools import assert_equal, assert_true, \ assert_not_equal from .tests_integraion_base import TestsIntegration logger = logging.getLogger(__name__) __all__ = ("TestsDocument",) class TestsDocument(TestsIntegration): def tearDown(self): super(TestsDocument, self).tearDown...
import httplib import re import os import requests import json from datetime import datetime from distutils.version import LooseVersion from cumulusci.tasks.release_notes.github_api import GithubApiMixin from cumulusci.tasks.release_notes.parser import ChangeNotesLinesParser from cumulusci.tasks.release_notes.parser ...
#!/usr/bin/env python #################################################################### # AUTHOR: Miguel Ibarra (miguelib@ufl.edu) # # DESCRIPTION: Pairwise and to mean standarized euclidean comparison #################################################################### import os import logging import argparse impo...
# -*- coding: utf-8 -*- from abc import ABCMeta, abstractmethod, abstractproperty import math import re import numpy as np from pyfr.nputil import npeval, fuzzysort from pyfr.util import lazyprop, memoize class BaseElements(object, metaclass=ABCMeta): privarmap = None convarmap = None def __init__(sel...
# 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 # distrib...
# Lint as: python2, python3 # Copyright 2020 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 ...
# 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...