gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scattergl" _path_str = "scattergl.textfont" _valid_props = {"color", "colorsrc", "family",...
import logging import re from numbers import Number from .formatbase import FormatBase from .ssaevent import SSAEvent from .ssastyle import SSAStyle from .common import Color from .time import make_time, ms_to_times, timestamp_to_ms, TIMESTAMP SSA_ALIGNMENT = (1, 2, 3, 9, 10, 11, 5, 6, 7) def ass_to_ssa_alignment(i):...
#!/usr/bin/env python # mammon - a useless ircd # # Copyright (c) 2015, William Pitcock <nenolod@dereferenced.org> # # 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 this permission notice appear in...
# encoding: utf-8 """ Common shape-related oxml objects """ from __future__ import absolute_import from ...enum.shapes import PP_PLACEHOLDER from ..ns import qn from ..simpletypes import ( ST_Angle, ST_Coordinate, ST_Direction, ST_DrawingElementId, ST_LineWidth, ST_PlaceholderSize, ST_PositiveCoordinate, Xsd...
# 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, ...
# Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
""" .. module:: skrf.io.touchstone ======================================== touchstone (:mod:`skrf.io.touchstone`) ======================================== Touchstone class and utilities .. autosummary:: :toctree: generated/ Touchstone Functions related to reading/writing touchstones. -----------------------...
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
from statsmodels.compat.python import iterkeys, itervalues, zip, range from statsmodels.stats.correlation_tools import cov_nearest import numpy as np import pandas as pd from scipy import linalg as spl from collections import defaultdict from statsmodels.tools.sm_exceptions import (ConvergenceWarning, ...
# Copyright 2012 Nebula, 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 ...
#!/usr/bin/env python # # This program straightens the spinal cord of an anatomic image, apply a smoothing in the z dimension and apply # the inverse warping field to get back the curved spinal cord but smoothed. # # --------------------------------------------------------------------------------------- # Copyright (c)...
#!/usr/bin/python import wx from importData import * from predictSitesGeneral import fit_data # Create a left panel class LeftPanel(wx.Panel): def __init__(self, parent, id): wx.Panel.__init__(self, parent, id, style=wx.BORDER_SUNKEN) # Get encompassing window self.parentFrame = parent.G...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2014 Violin Memory, 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...
import execnet import py import pytest import shutil import textwrap from pathlib import Path from xdist import workermanage from xdist.workermanage import HostRSync, NodeManager pytest_plugins = "pytester" @pytest.fixture def hookrecorder(request, config, pytester: pytest.Pytester): hookrecorder = pytester.make...
# 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 b...
from ..user_roles import anonymous_user, authenticated_user, bumblebee_user import requests import copy def test_access(): for x in ['/orcid/exchangeOAuthCode', ]: r = anonymous_user.get(x) assert r.status_code == 401 # right now it throws 500 (probably error with orcid service) def...
# Copyright (C) 2010 Google Inc. All rights reserved. # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of so...
"""Training script, this is converted from a ipython notebook """ import os import csv import sys import numpy as np import mxnet as mx import logging logger = logging.getLogger() logger.setLevel(logging.DEBUG) # In[2]: def get_lenet(): """ A lenet style net, takes difference of each frame as input. """ ...
# # 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 ...
# -*- coding: utf-8 -*- """Subclass of InteractiveShell for terminal based frontends.""" #----------------------------------------------------------------------------- # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> # Copyright (C) 2001-2007 Fernando Perez. <fperez@colorado.edu> # Copyright (C) 2008-2011 The...
from __future__ import print_function from numba import cfunc, farray, carray import os from os.path import expanduser, join import sys import io from mfem import path as mfem_path import numpy as np import numba import time if len(sys.argv) > 1 and sys.argv[1] == '-p': import mfem.par as mfem use_parallel = ...
__author__ = 'Jonas Eberle <jonas.eberle@eberle-mail.de>' __version__ = '0.1' import logging from pyEOM.sources import * from pyEOM import processing from datetime import datetime import os, re, sys import subprocess import sqlite3 from pyspatialite import dbapi2 as db from datetime import datetime import shutil from...
import pandas as pd import os import sys import glob class SHS(object): def __init__(self, shs_i_path, path, column, value): #*args, **kwargs): #column = kwargs.get('column', None) #value = kwargs.get('value', None) self.shs_i_path = shs_i_path self.path = path ...
#www.stuffaboutcode.com #Raspberry Pi, Minecraft - Create 3D Model from Obj file # Version 2 - draws complete faces rather than wireframes and uses materials #import the minecraft.py module from the minecraft directory import mcpi.minecraft as minecraft #import minecraft block module import mcpi.block as block #import...
import ply.yacc as yacc import mamba.ast as ast from mamba.lexer import * from mamba.exceptions import * disable_warnings = False precedence = ( ('left', 'NOT'), ('left', 'PLUS', 'MINUS'), ('left', 'MUL', 'DIV'), ('left', 'EXP', 'MOD'), ('right', 'UMINUS'), ('right', 'UPLUS'), ) def p_statem...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 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....
# 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...
"""Test Z-Wave climate devices.""" import pytest from homeassistant.components.climate.const import ( ATTR_TARGET_TEMP_HIGH, ATTR_TARGET_TEMP_LOW, CURRENT_HVAC_COOL, CURRENT_HVAC_HEAT, HVAC_MODE_COOL, HVAC_MODE_HEAT, HVAC_MODE_HEAT_COOL, HVAC_MODE_OFF, HVAC_MODES, PRESET_AWAY, ...
# -*- coding: utf-8 -*- # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/...
"""Machine limits for Float32 and Float64 and (long double) if available... """ from __future__ import division, absolute_import, print_function __all__ = ['finfo', 'iinfo'] import warnings from .machar import MachAr from . import numeric from . import numerictypes as ntypes from .numeric import array, inf from .um...
# 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...
''' Created on Dec 12, 2013 Create services from a service model instance, create objects from an object model instance How are base objects mapped to services? This file creates a service object that has multiple services and a single object tree There could be a service creation service where POSTing this descript...
''' A storage type for accessing contact and calendar data from `remoteStorage <https://remotestorage.io>`_. It is highly experimental. A few things are hardcoded for now so the user doesn't have to specify those things, and plugging in an account "just works". ''' import logging from urllib.parse import quote as url...
import os import functools from typing import Callable, Dict, IO, List, Optional, Tuple, Union from .argtypes import KeyValueArg from .constants import ( SEPARATORS_GROUP_MULTIPART, SEPARATOR_DATA_EMBED_FILE_CONTENTS, SEPARATOR_DATA_EMBED_RAW_JSON_FILE, SEPARATOR_GROUP_NESTED_JSON_ITEMS, SEPARATOR_DATA_RAW...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
"""Test the Mazda Connected Services config flow.""" from unittest.mock import patch import aiohttp from homeassistant import config_entries, data_entry_flow, setup from homeassistant.components.mazda.config_flow import ( MazdaAccountLockedException, MazdaAuthenticationException, ) from homeassistant.componen...
# This file is a part of OMPC (http://ompc.juricap.com/) import sys sys.path += ['../outside/ply'] OCTAVE = False # TODO # # - make the no ';' print-out an option, the output is ugly # - add 1 2, or anything like that, everything after the NAME is considered # a string # - print -png ... and similar _keywords = ...
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (a...
#!/usr/bin/env python import json, os.path from time import time from datetime import date from SnapWrap.Client.utils import (encrypt, decrypt, decrypt_story, make_media_id, request, timestamp, requests) from SnapWrap.constants import (DEFAULT_DURATION, MEDIA_TYPE_VIDEO, MEDIA_TYPE_VIDEO_NO_AUDIO, MEDIA_TYPE_IMAGE, PR...
# Copyright (C) 2010-2011 Richard Lincoln # # 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, publish...
# Copyright 2012 Matt Chaput. 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 copyright notice, # this list of conditions and the...
"""Unit test for treadmill.dockerutils """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import unittest import json import mock # Disable W0611: Unused import import treadmill.tests.treadmill_test_skip_windows #...
# Copyright 2020 The TensorFlow 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009 Sharoon Thomas # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it ...
# 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...
# @Author: Zeta Syanthis <zetasyanthis> # @Date: 2017/07/21 # @Email: zeta@zetasyanthis.org # @Project: MyArchive # @Last modified by: zetasyanthis # @Last modified time: 2017/07/21 # @License MIT """Definitions for shotwell database. Generated by sqlacodegen.""" from sqlalchemy import Column, Float, Integer, Ta...
''' Copyright (c) 2017 Yogesh Khatri This file is part of mac_apt (macOS Artifact Parsing Tool). Usage or distribution of this software/code is subject to the terms of the MIT License. ''' import codecs import sqlite3 import logging import os import sys import uuid from io import BytesIO from plugi...
import datetime from functools import wraps import bcrypt from flask_login import current_user from flask_sqlalchemy import BaseQuery from flask import current_app, request, redirect import model import json from database import db_session RUN_CACHE_NAME = "runcache" SCORE_CACHE_NAME = "scorecache" class Mode...
import logging import optparse import os import sys from flask import Flask from werkzeug.serving import run_simple from scout.exceptions import InvalidRequestException from scout.models import database from scout.models import Attachment from scout.models import BlobData from scout.models import Document from scout....
# Copyright 2012 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 req...
# Copyright 2013-2016 DataStax, 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 writi...
#!/usr/bin/env python # Copyright 2008-2014 Nokia Solutions and Networks # # 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 r...
import numpy as np import tensorflow as tf import uuid from util.misc import concrete_shape, broadcast_shape class ConditionalDistribution(object): """ Generic object representing a conditional distribution: a single output conditioned on some set of inputs. Unconditional distributions are the sp...
#extracting GTFS data from SQL db after Richard's AB_GTFStoSQL has built it #put the data in a JSON format for use on the web # eventual JSON should look like: # file/var WellingtonGTFS = { # "day": { # "time": { # "trip": [ # [ # "lat", # ...
import ast import calendar import datetime import xmlrpc.client import feedparser import requests from django.conf import settings from django.contrib.contenttypes.generic import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.db import connections, mo...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
######################################################################## # # The Inception Model v3 for TensorFlow. # # This is a pre-trained Deep Neural Network for classifying images. # You provide an image or filename for a jpeg-file which will be # loaded and input to the Inception model, which will then output # a...
from __future__ import absolute_import, unicode_literals import inspect import sys import uuid from collections import deque from logging import getLogger import eventlet import six from eventlet.event import Event from eventlet.greenpool import GreenPool from greenlet import GreenletExit # pylint: disable=E0611 fro...
############################################################################# # # Modified by David Stubbs to return results maintaining a tag # associated with each original site. # # The original code license is as follows: # # Voronoi diagram calculator/ Delaunay triangulator # Translated to Python by Bill Simons # ...
import json import os from typing import Any import pytest import schema_salad.metaschema as cg_metaschema from schema_salad.exceptions import ValidationException from schema_salad.ref_resolver import file_uri from schema_salad.utils import yaml_no_ts from .matcher import JsonDiffMatcher from .util import get_data ...
from unittest import mock from django.core.files.uploadedfile import SimpleUploadedFile from django.http import HttpResponse from ..models import Document, Folder from .test import BaseTest class TestFolders(BaseTest): def setUp(self): super().setUp() self.create_urlname = "pinax_documents:fold...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2014, Nicolas P. Rougier. All rights reserved. # Distributed under the terms of the new BSD License. # ----------------------------------------------------------------------------- import unittest imp...
import keras.models as km import keras.optimizers as k_opt from keras.callbacks import EarlyStopping from ..utils import * from ..json import save_json class Model(km.Sequential): """ Class representing an abstract Model. """ def __init__(self, name: str = None, los...
""" @package mi.dataset.parser @file mi/dataset/parser/fdchp_a_dcl.py @author Emily Hahn @brief A parser for the fdchp series a instrument through a DCL """ import re import ntplib from mi.core.log import get_logger from mi.core.common import BaseEnum from mi.core.exceptions import SampleException, UnexpectedDataExc...
""" This module converts requested URLs to callback view functions. URLResolver is the main class here. Its resolve() method takes a URL (as a string) and returns a ResolverMatch object which provides access to all attributes of the resolved URL match. """ import functools import inspect import re import threading fro...
#!/usr/bin/env python ''' @author David Stuebe <dstuebe@asascience.com> @file prototype/sci_data/ctd_stream.py @description An example process producing a ctd data stream ''' from interface.objects import StreamDefinitionContainer, StreamGranuleContainer #, DataContainer from interface.objects import DataStream, Elem...
# pyOCD debugger # Copyright (c) 2015-2020 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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...
# -*- coding: utf-8 -*- import logging from abc import ABCMeta, abstractmethod from django.core.exceptions import ValidationError from django.db import models from django.utils.translation import gettext as _ from model_utils import FieldTracker from tximmutability.rule import MutabilityRule logger = logging.getLog...
#!/usr/bin/env python import xml.etree.ElementTree as ET class brocade_maps_ext(object): """Auto generated class. """ def __init__(self, **kwargs): self._callback = kwargs.pop('callback') def maps_get_all_policy_input_rbridge_id(self, **kwargs): """Auto Generated Code ...
"""Entity class that represents Z-Wave node.""" # pylint: disable=import-error # pylint: disable=import-outside-toplevel from itertools import count from homeassistant.const import ( ATTR_BATTERY_LEVEL, ATTR_ENTITY_ID, ATTR_VIA_DEVICE, ATTR_WAKEUP, ) from homeassistant.core import callback from homeass...
import os, mimetypes, urllib import sys import boto import random import json import zipfile import StringIO import tempfile from django.conf import settings from django.core.urlresolvers import reverse from django.views import generic from django.views.decorators.http import require_POST from django.shortcuts import r...
from debile.master.arches import get_preferred_affinity, get_source_arches class FnordArch(object): def __init__(self, name): self.name = name def __repr__(self): return "<Fnord: %s>" % (self.name) valid_arches = [ FnordArch("amd64"), FnordArch("sparc"), FnordArch("ppc64"), ...
import os import sys import xml.etree.ElementTree as ET import requests import argparse import datetime from utils import db_utils as db # ------------------------------------------------------------------------------ def fetch_taxid_from_ncbi(accession): """ Uses a NCBI sequence accession and to extract it...
""" Unit test for appcfgmgr - configuring node apps """ import os import shutil import tempfile import time import unittest # Disable W0611: Unused import import tests.treadmill_test_deps # pylint: disable=W0611 import mock import treadmill from treadmill import appcfgmgr from treadmill import fs class AppCfgMgr...
# SIM-CITY webservice # # Copyright 2015 Netherlands eScience Center # # 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 ...
from __future__ import unicode_literals import datetime import inspect import decimal import collections from importlib import import_module import os import re import sys import types from django.apps import apps from django.db import models, migrations from django.db.migrations.loader import MigrationLoader from dj...
# -*- coding: utf-8 -*- # # Copyright 2017-2021 AVSystem <avsystem@avsystem.com> # # 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 __future__ import unicode_literals import copy import json import random import unittest import uuid import requests from django.conf import settings as django_settings from requests.auth import HTTPBasicAuth from framework.auth import User from tests.factories import create_fake_project from tests.base import ...
"""Tests for algorithms for computing symbolic roots of polynomials. """ from sympy import (S, symbols, Symbol, Wild, Rational, sqrt, powsimp, sin, cos, pi, I, Interval, re, im, exp, ZZ, Piecewise, acos, root) from sympy.polys import Poly, cyclotomic_poly, intervals, nroots, RootOf from sympy.polys.polyroots...
# -*- coding: utf-8 -*- # ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com> # Angelos Tzotsos <tzotsos@gmail.com> # # Copyright (c) 2015 Tom Kralidis # Copyright (c) 2015 Angelos Tzotsos # # Permission is hereby granted, free of charge, to any p...
#!/usr/bin/env python3 """Topology components for FAUCET Mininet unit tests.""" from collections import namedtuple import os import socket import string import shutil import subprocess import time import netifaces # pylint: disable=too-many-arguments from mininet.log import output, warn from mininet.topo import Top...
# Copyright (C) 2016 YouCompleteMe Contributors # # This file is part of YouCompleteMe. # # YouCompleteMe is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) ...
import math import operator import re from collections import OrderedDict from functools import reduce from itertools import chain from typing import List, Mapping, Optional, Union from django.apps import apps from django.db.models import Prefetch, Q from django.utils.functional import cached_property from django.util...
from core.himesis import Himesis, HimesisPostConditionPattern import cPickle as pickle from uuid import UUID class HMoveOneTraceBackLinkDiffRulesRHS(HimesisPostConditionPattern): def __init__(self): """ Creates the himesis graph representing the AToM3 model HMoveOneTraceBackLinkDiffRulesRHS. ...
# -*- coding: utf-8 -*- """Stupid tests that ensure logging works as expected""" from __future__ import (division, absolute_import, print_function, unicode_literals) import sys import threading import logging as log from StringIO import StringIO import beets.logging as blog from beets import ...
#Copyright (c) 2008, Media Modifications 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, publish,...
""" This modules contains the logic to parse and validate JSON files in the OpenXC message set format. """ from collections import defaultdict import operator import logging from .xml_to_json import merge_database_into_mapping, parse_database from .structures import Command, CanBus, DiagnosticMessage from openxc.uti...
############################################################################### ## ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary for...
# 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...
import warnings import unittest import sys import os import atexit import numpy as np from scipy import sparse import pytest from sklearn.utils.deprecation import deprecated from sklearn.utils.metaestimators import if_delegate_has_method from sklearn.utils.testing import ( assert_raises, assert_less, as...
#! /usr/bin/env python # -*- coding: UTF-8 -*- # from __future__ import absolute_import, unicode_literals, division from datetime import date from flask import ( Blueprint, render_template, url_for, request, redirect, flash, abort ) from flask_login import current_user, login_required, fresh_login_required from...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Tests for command line output and parsing ''' import io import sys import json from unittest import TestCase from compliance_checker.runner import ComplianceChecker, CheckSuite from compliance_checker.tests.resources import STATIC_FILES import tempfile import os from ...
# 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...
__author__ = 'noe' from pyemma._base.model import SampledModel from pyemma.msm.models.msm import MSM from pyemma.util.types import is_iterable class SampledMSM(MSM, SampledModel): def __init__(self, samples, ref=None, conf=0.95): r""" Constructs a sampled MSM Parameters ---------- ...
# -*- coding: utf-8 -*- """ Classic deprecation warning =========================== Classic ``@deprecated`` decorator to deprecate old python classes, functions or methods. """ import functools import inspect import warnings import wrapt string_types = (type(b''), type(u'')) class ClassicAdapter(wrapt.AdapterFact...
# -*- coding: utf-8 -*- import pytest from django.utils import timezone from nose.tools import * # noqa from framework.auth.core import Auth from osf_tests.factories import ( fake, fake_email, AuthUserFactory, NodeFactory, ProjectFactory, UnregUserFactory, UserFactory, ) from scripts impor...
import tensorflow as tf import numpy as np import time import h5py import matplotlib.pyplot as plt # from sklearn.metrics import confusion_matrix # import itertools # from copy import deepcopy # import os # import os.path from collections import OrderedDict import pickle from itertools import islice # NOTE: For pyth...
# # Module implementing synchronization primitives # # multiprocessing/synchronize.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # __all__ = [ 'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Condition', 'Event' ] import threading import sys import tempfile impor...