gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import unicode_literals, division, print_function """ Helper methods for generating gw input / and work flows. """ __author__ = "Michiel van Setten" __copyright__ = " " __version__ = "0.9" __m...
# # Copyright (C) 2000-2008 greg Landrum # """ Training algorithms for feed-forward neural nets Unless noted otherwise, algorithms and notation are taken from: "Artificial Neural Networks: Theory and Applications", Dan W. Patterson, Prentice Hall, 1996 """ import numpy class Trainer(object): """ "virt...
# -*- 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...
import csv import datetime import json import os import StringIO from time import sleep from django.conf import settings from django.core.files.storage import get_storage_class from django.core.urlresolvers import reverse from django.utils.dateparse import parse_datetime from xlrd import open_workbook from onadata.ap...
# License: BSD 3 clause import numpy as np from . import Solver from tick.base_model import Model from tick.prox.base import Prox __author__ = 'Stephane Gaiffas' class SolverFirstOrder(Solver): """The base class for a first order solver. It defines methods for setting a model (giving first order informatio...
# -*- coding: utf-8 -*- import time import logging import functools import httplib as http import bleach from flask import request from modularodm import Q from framework.auth.decorators import collect_auth from framework.auth.decorators import must_be_logged_in from website.models import Node from website.models i...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: utf-8 -*- """ Nearest Centroid Classification """ # Author: Robert Layton <robertlayton@gmail.com> # Olivier Grisel <olivier.grisel@ensta.org> # # License: BSD 3 clause import warnings import numpy as np from scipy import sparse as sp from ..base import BaseEstimator, ClassifierMixin from ..met...
import sys import unittest from test import support from test.test_grammar import (VALID_UNDERSCORE_LITERALS, INVALID_UNDERSCORE_LITERALS) L = [ ('0', 0), ('1', 1), ('9', 9), ('10', 10), ('99', 99), ('100', 100), ('314', 314), ...
# Copyright 2013 Hewlett-Packard Development Company, L.P. # 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...
#!/usr/bin/python # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # log # # Query log messages from analytics # import sys import argparse import json import datetime import logging import logging.handlers import time import re from opserver_util import OpServerUtils from sandesh_common.vns.tt...
# Copyright 2017 The Armada 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 or agreed to in w...
from pandac.PandaModules import * from direct.interval.IntervalGlobal import * from BattleBase import * from direct.actor import Actor from toontown.suit import SuitDNA from direct.directnotify import DirectNotifyGlobal import DistributedBattleBase from toontown.toon import TTEmote from otp.avatar import Emote from too...
# Filename: daq.py # pylint: disable=R0903 """ Pumps for the DAQ data formats. """ from collections import namedtuple from io import BytesIO import json import math import struct from struct import unpack import time import pprint from urllib.request import urlopen, URLError import numpy as np from thepipe import M...
import numpy as np from . import measure_moms from . import acs_model_e as acs_model from . import drizzle_position as dp import os as os from astropy.io import fits from . import directories def acs_determine_focus_metric( true, model ): ''' SO A is the flag to check if the quadrupole moments match ''...
import mimetypes import os.path import re import cloudstorage from django.http import Http404 from django.urls import reverse from django.utils import safestring from django.utils import text from django.utils import timezone from google.appengine.api import app_identity from google.appengine.ext import ndb from . imp...
import itertools import numpy as np from numpy import exp from numpy.testing import assert_, assert_equal from scipy.optimize import root def test_performance(): # Compare performance results to those listed in # [Cheng & Li, IMA J. Num. An. 29, 814 (2008)] # and # [W. La Cruz, J.M. Martinez, M. Ray...
""" PEP 0484 ( https://www.python.org/dev/peps/pep-0484/ ) describes type hints through function annotations. There is a strong suggestion in this document that only the type of type hinting defined in PEP0484 should be allowed as annotations in future python versions. The (initial / probably incomplete) implementatio...
import textwrap from inspect import cleandoc from jedi._compatibility import literal_eval, is_py3 from parso.python import tree _EXECUTE_NODES = set([ 'funcdef', 'classdef', 'import_from', 'import_name', 'test', 'or_test', 'and_test', 'not_test', 'comparison', 'expr', 'xor_expr', 'and_expr', 'shift_expr',...
from __future__ import unicode_literals import tempfile import shutil import os from compose import config from compose.project import Project from compose.const import LABEL_CONFIG_HASH from .testcases import DockerClientTestCase class ProjectTestCase(DockerClientTestCase): def run_up(self, cfg, **kwargs): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Simple example how to evaluate audio tagging systems with # sed_eval toolbox. # # Author: Toni Heittola (toni.heittola@tut.fi) import sed_eval import dcase_util # Reference tag activity reference_tag_list = dcase_util.containers.MetaDataContainer([ { 'file...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import random import unittest import uuid import warnings import properties class TestDefault(unittest.TestCase): def test_random_default(self): class Ha...
# Copyright 2013: Mirantis 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...
#!/usr/bin/env python """ Artificial Intelligence for Humans Volume 3: Deep Learning and Neural Networks Python Version http://www.aifh.org http://www.jeffheaton.com Code repository: https://github.com/jeffheaton/aifh Copyright 2015 by Jeff Heaton Licensed under the Apache License, V...
#!/usr/bin/env python # # Copyright (C) 2013-2016 DNAnexus, Inc. # # This file is part of dx-toolkit (DNAnexus platform client libraries). # # 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 a...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import unittest import os from monty.serialization import loadfn import warnings import numpy as np import multiprocessing from pymatgen.analysis.pourbaix_diagram import PourbaixDiagram, PourbaixEntry,\ ...
# -*- coding: utf-8 -*- """ sphinx.ext.todo ~~~~~~~~~~~~~~~ Allow todos to be inserted into your documentation. Inclusion of todos can be switched of by a configuration variable. The todolist directive collects all todos of your project and lists them along with a backlink to the original loc...
from unittest.mock import patch import json import domain_api from domain_api.epp.entity import EppRpcClient from ..exceptions import EppError from .test_setup import TestSetup class MockRpcClient(domain_api.epp.entity.EppRpcClient): def __init__(self, host=None): pass class TestCheckDomain(TestSetup): ...
#!/usr/bin/env python # # 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, softwa...
"""Returns tidy3d simulation from gdsfactory Component.""" import warnings from typing import Dict, Optional import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import pydantic import tidy3d as td import gdsfactory as gf from gdsfactory.component import Component from gdsfactory.components.ext...
import unittest import mock from ...management.actions import Actions class TestActions(unittest.TestCase): def test_init_with_optionals(self): t = Actions(domain='domain', token='jwttoken', telemetry=False, timeout=(10, 2)) self.assertEqual(t.client.options.timeout, (10, 2)) telemetry_he...
import numpy as np import fft import data class rosenfeld(object): def __init__(self, system, sigma={}): self.system = system self.coeff = data.coeff(self.system, require='sigma') # flood the coefficient dictionary with defaults for t in self.system.types: self.coeff.se...
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 VMware, Inc. # Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. Yo...
# -*- 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright INRIA # Contributors: Nicolas P. Rougier (Nicolas.Rougier@inria.fr) # # DANA is a computing framework for the simulation of distributed, # asynchronous, numerical and adaptive models...
from __future__ import print_function, division import sys from copy import copy import numpy as np from numpy import require, zeros_like from scipy.linalg import blas from timeit import default_timer as timer from pyscf.data.nist import HARTREE2EV from pyscf.nao.chi0_matvec import chi0_matvec from pyscf.nao.m_blas_w...
# -*- coding: utf-8 -*- import copy import datetime import json import logging import os import sys import time import traceback import argparse import kibana from alerts import DebugAlerter from config import get_rule_hashes from config import load_configuration from config import load_rules from elasticsearch.client...
# -*- coding: utf-8 -*- ''' This module contains code to create XMLContent objects from the Weblyzard API JSON format. .. moduleauthor:: Fabian Fischer fabian.fischer@modul.ac.at ''' from __future__ import unicode_literals from weblyzard_api.model.parsers.xml_2013 import XML2013 from weblyzard_api.model.parsers i...
# 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.apache.org/licenses/LICENSE-2.0 # # Unless ...
# Copyright 2014 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 b...
#!/usr/bin/env python from threading import Lock import cv_bridge import glob import message_filters import numpy as np import os.path as osp import rospy import skimage.draw import skimage.morphology import tf import yaml from geometry_msgs.msg import Pose from geometry_msgs.msg import PoseArray from jsk_recognitio...
# 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...
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import contextlib import functools import json import logging import re import sys from inspect import getdoc from operator import attrgetter from . import errors from . import signals from .. import _...
"""Test the cross_validation module""" from __future__ import division import warnings import numpy as np from scipy.sparse import coo_matrix from scipy.sparse import csr_matrix from scipy import stats from sklearn.exceptions import ConvergenceWarning from sklearn.utils.testing import assert_true from sklearn.utils.t...
#!/usr/bin/env python3 # # Copyright (c) 2016, The OpenThread Authors. # 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 # ...
#!/usr/bin/env python import argparse import cPickle import traceback import logging import time import sys import numpy from experiments.nmt import\ RNNEncoderDecoder,\ parse_input,\ get_batch_iterator,\ prototype_state logger = logging.getLogger(__name__) class BatchTxtIterator(ob...
from __future__ import unicode_literals, print_function, division from pcapparser.printer import HttpPrinter __author__ = "dongliu" import sys import argparse import socket import select import threading import signal from pcapparser.httpparser import HttpType, HttpParser from pcapparser import config _BUF_SIZE = ...
''' Support functions for changewithin.py script. ''' import time, json, requests, os, sys import urllib from lxml import etree from sets import Set from ModestMaps.Geo import MercatorProjection, Location, Coordinate from tempfile import mkstemp dir_path = os.path.dirname(os.path.abspath(__file__)) def get_state(): ...
#!/usr/bin/env python # # Created by: Pearu Peterson, March 2002 # """ Test functions for linalg.basic module """ from __future__ import division, print_function, absolute_import """ Bugs: 1) solve.check_random_sym_complex fails if a is complex and transpose(a) = conjugate(a) (a is Hermitian). """ __usage__ = """ ...
from Object import Object from consts import * import HeeksCNC class Tool(Object): def __init__(self, diameter = 3.0, title = None, tool_number = 0, type = TOOL_TYPE_SLOTCUTTER): Object.__init__(self) self.tool_number = tool_number self.type = type self.diameter = diameter s...
# -*- coding: utf-8 -*- """AWS DynamoDB result store backend.""" from __future__ import absolute_import, unicode_literals from collections import namedtuple from time import sleep, time from kombu.utils.url import _parse_url as parse_url from celery.exceptions import ImproperlyConfigured from celery.five import stri...
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...
"""Constants used for Coinbase.""" CONF_CURRENCIES = "account_balance_currencies" CONF_EXCHANGE_BASE = "exchange_base" CONF_EXCHANGE_RATES = "exchange_rate_currencies" CONF_OPTIONS = "options" CONF_TITLE = "title" DOMAIN = "coinbase" # These are constants used by the previous YAML configuration CONF_YAML_API_TOKEN = ...
import math import time from cspace import CSpace def default_sampleneighborhood(c,r): return [ci + random.uniform(-r,r) for ci in c] def default_visible(a,b): raise RuntimeError("Can't check visibility") def default_distance(a,b): return math.sqrt(math.pow(ai-bi,2) for (ai,bi) in zip(a,b)) def default_...
'''Base classes and helpers for building zone specific tzinfo classes''' from datetime import datetime, timedelta, tzinfo from bisect import bisect_right try: set except NameError: from sets import Set as set import pytz from pytz.exceptions import AmbiguousTimeError, NonExistentTimeError __all__ = [] _time...
import os import warnings from flask import Blueprint, current_app, request, g, send_from_directory from flask.globals import _request_ctx_stack from jinja2 import Environment, PackageLoader from werkzeug.urls import url_quote_plus from flask_debugtoolbar.compat import iteritems from flask_debugtoolbar.toolbar import...
""" A script to implement a hypergeometric test procedure. Author: David Angeles Date: May 26, 2015 Requires Python > 3.5 Needs: A tissue dictionary A control list of gene names An experimental list of gene names """ # -*- coding: utf-8 -*- import pandas as pd from scipy import stats import numpy as np import os impor...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Andrew Klychkov (@Andersson007) <aaklychkov@mail.ru> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {...
# # Copyright 2013 Quantopian, 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 wr...
# 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 or agreed to in writing, ...
#!/usr/bin/python import argparse import os import sys # exit import shutil # copyfile import math # pi import subprocess # Popen rapterRoot = "/home/bontius/workspace/RAPter/"; rapterExec = os.path.join( rapterRoot, "RAPter", "build", "Release", "bin", "rapter" ); def show( primitivesPath,...
from __future__ import print_function, division, absolute_import import traceback import inspect import sys from .abstract import * from .common import * from .misc import unliteral from numba.ir import Loc from numba import errors # terminal color markup _termcolor = errors.termcolor() class _ResolutionFailures(ob...
""" Peter Norvig's lis.py hacked with lower-level data representations. Plus a few other tweaks like support for the 'quote' read macro. To do: add a garbage collector and clean up the added code. This will be more work than I thought because the recursive eval needs to make its local variables known to the garbage col...
#=== SOUND =========================================================================================== # Convenience classes and functions for audio manipulation. # Authors: Frederik De Bleser, Lieven Menschaert, Tom De Smedt. # License: BSD (see LICENSE.txt for details). # Copyright (c) 2008-2012 City In A Bottle (cit...
"""\ A library of useful helper classes to the SAX classes, for the convenience of application and driver writers. """ import os, urlparse, urllib, types import handler import xmlreader try: _StringTypes = [types.StringType, types.UnicodeType] except AttributeError: _StringTypes = [types.StringType] # See wh...
"""Data channels for calls. """ __docformat__ = 'restructuredtext en' import time from copy import copy from .utils import * from .enums import * from .errors import SkypeError class CallChannelManager(EventHandlingBase): """Instantiate this class to create a call channel manager. A call channel manager will ...
import logging import os import threading import time from enum import Enum from functools import partial from pathlib import Path from urllib.parse import urljoin import arrow import requests import tqdm from . import command, upload from .info import URL, DEFAULT_REMOTE_DIR from .info import RawFileInfo, SimpleFil...
#Python3.5 Mac OS X #2015.2.12 #mangobada@163.com ''' implement of decision tree algorithm C4.5 changed by ID3 in choose best feature to split from info_gain to info_gain_ratio to avoid choose the feature which has too many values ''' from math import log import operator import numpy as np #a small data set to ve...
from typing import Dict, List from unittest.mock import Mock from pytest import fixture, raises from smif.data_layer.store import Store from smif.decision.decision import DecisionManager, RuleBased from smif.exception import SmifDataNotFoundError @fixture(scope='function') def plan(): planned_interventions = [ ...
from mininet.topo import * from scipy.stats import truncnorm, tstd, poisson, expon from numpy.random import randint, uniform from datetime import datetime from time import time import os import sys import signal LATENCY_METRIC_MIN_AVERAGE_DELAY = 1 LATENCY_METRIC_MIN_MAXIMUM_DELAY = 2 # MEDIA_DURATION_SECONDS = 70 c...
# -*- coding: utf-8 -*- """ A simple countdown timer. This is a very basic countdown timer. You can change the timer length as well as pausing, restarting and resetting it. Currently this is more of a demo of a composite. Each part of the timer can be changed independently hours, minutes, seconds using mouse button...
# Copyright 2012, Intel, 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 agree...
# Copyright 2014 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 agr...
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) # # 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...
# -*- 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...
import cPickle import time from smqtk.representation.descriptor_index import DescriptorIndex # Try to import required module try: import solr except ImportError: solr = None __author__ = "paul.tunison@kitware.com" class SolrDescriptorIndex (DescriptorIndex): """ Descriptor index that uses a Solr i...
## A script for extracting info about the patients used in the analysis ## Load necessary modules from rpy2 import robjects as ro import numpy as np import os ro.r('library(survival)') import re ##This call will only work if you are running python from the command line. ##If you are not running from the command line...
"""The tests for the manual_mqtt Alarm Control Panel component.""" from datetime import timedelta import unittest from unittest.mock import patch from homeassistant.setup import setup_component from homeassistant.const import ( STATE_ALARM_DISARMED, STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_AWAY, STATE_ALARM_A...
# coding: utf-8 # pylint: disable=no-member """Online evaluation metric module.""" from __future__ import absolute_import import math import numpy from . import ndarray def check_label_shapes(labels, preds, shape=0): if shape == 0: label_shape, pred_shape = len(labels), len(preds) else: label_...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2020, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: bigip_ssl_key_cert shor...
from ctypes import * import unittest # IMPORTANT INFO: # # Consider this call: # func.restype = c_char_p # func(c_char_p("123")) # It returns # "123" # # WHY IS THIS SO? # # argument tuple (c_char_p("123"), ) is destroyed after the function # func is called, but NOT before the result is actually built. # # If...
#!/usr/bin/env python # # Copyright 2013 Markus Gronholm <markus@alshain.fi> / Alshain Oy # # 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/LICE...
# Copyright 2017 gRPC 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 or agreed to in writing...
# coding=utf-8 # Copyright 2018 The Conversation-AI.github.io 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 b...
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributi...
"""Working day tools """ import warnings from calendar import monthrange from datetime import date, timedelta, datetime from math import pi import ephem import pytz from calverter import Calverter from dateutil import easter from lunardate import LunarDate MON, TUE, WED, THU, FRI, SAT, SUN = range(7) class Calendar...
import threading import logging import subprocess import protocol import pycountry import gnupg import obelisk import json import random from bitcoin import ( apply_multisignatures, eligius_pushtx, mk_multisig_script, mktx, multisign, scriptaddr ) import tornado.websocket from twisted.internet i...
# Copyright 2012, Nachi Ueno, NTT MCL, 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...
# 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 agreed to in writing...
# Copyright 2015, Google 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 conditions and the f...
# Copyright (c) 2011-2013 Andreas Sembrant # 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 conditi...
# Copyright 2017 Lajos Gerecs, Janos Czentye # # 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...
''' Copyright (C) 2014 Parrot SA 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 conditions and the following di...
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import math import torch from torch.distributions.utils import lazy_property from torch.nn.functional import pad from pyro.distributions.util import broadcast_shape from pyro.ops.tensor_utils import cholesky, matmul, matvecmul, t...
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of th...
# Class definition: # Experiment # This class is the main experiment class; ATLAS etc will inherit from this class # Instances are generated with ExperimentFactory # Subclasses should implement all needed methods prototyped in this class # Note: not compatible with Singleton Design Pattern due to the subclass...
#!/usr/bin/env python # -*- coding: utf-8 -*- import brewery.utils as utils import heapq __all__ = ( "create_node", "node_dictionary", "node_catalogue", "get_node_info", "NodeFinished", "Node", "SourceNode", "TargetNode", "Stack" ) # FIXME: temporary dictionary to record displayed...
from __future__ import print_function import numpy as np import scipy.sparse as sp import warnings from abc import ABCMeta, abstractmethod from . import libsvm, liblinear from . import libsvm_sparse from ..base import BaseEstimator, ClassifierMixin from ..preprocessing import LabelEncoder from ..utils.multiclass impo...
import sqlite3 class BurneyDB(object): class MissingLinkedIDs(Exception): pass def __init__(self, dbfile = "burney.db", json_archive = "/datastore/burneyjson", areas_archive = "/datastore/burneyareas"): self._conn = sqlite3.connect(dbfile) # Dict responses: self._conn.row_factory = sqlite...
# 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...