text
stringlengths
3.07k
22.1k
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# # 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...
from manimlib.imports import * from old_projects.triangle_of_power.triangle import TOP, OPERATION_COLORS class DontLearnFromSymbols(Scene): def construct(self): randy = Randolph().to_corner() bubble = randy.get_bubble() bubble.content_scale_factor = 0.6 bubble.add_content(TOP(2, 3...
import copy import requests import os import time import threading import json import logging import multiprocessing from .autotune_task_manager import AutotuneTaskManager from bagua.bagua_define import ( TensorDtype, TensorDeclaration, BaguaCoreTelemetrySpan, BaguaHyperparameter, ) from flask import re...
##Latest version of results after correcting the bugs #in the rotation computation import street_exp as se import my_pycaffe as mp import my_pycaffe_utils as mpu import my_pycaffe_io as mpio import my_exp_v2 as mev2 import matplotlib.pyplot as plt import vis_utils as vu import numpy as np import caffe import copy impo...
import csv import gzip import sys import regex import Levenshtein from math import floor from collections import OrderedDict from itertools import combinations from itertools import islice def get_indexes(start_index, chunk_size, nth): """ Creates indexes from a reference index, a chunk size an nth number ...
import dask.array as da import numpy as np import pytest from napari.components import ViewerModel from napari.utils.colormaps import ( AVAILABLE_COLORMAPS, CYMRGB, MAGENTA_GREEN, SIMPLE_COLORMAPS, Colormap, ensure_colormap, ) from napari.utils.misc import ensure_iterable, ensure_sequence_of_it...
# Authors: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # License: BSD 3 clause import numpy as np from scipy import interpolate from scipy.stats import spearmanr from .base import BaseEstimator, TransformerMixin, RegressorMixin from .utils import check_array, check_consistent_length from ....
# coding=utf-8 # Copyright 2019 The Google AI Language Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
#!/usr/bin/python3 # -*- coding: utf-8 -*- import glob import math import numpy as np import os import re import sys import scipy.constants as spy_constants import scipy.signal as signal from tdoa import Sim3DCord, find_most_average, kalman_filter, kalman_filter_protype from tdoa import tdoa_positioning_4bs_improve, ...
"""Copyright 2008 Orbitz WorldWide 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...
import numpy as np from itertools import permutations from numpy.linalg import pinv from six.moves import xrange from numpy.testing import assert_equal from sklearn.utils._testing import assert_array_equal from sklearn.utils._testing import assert_array_almost_equal from sklearn.utils._testing import assert_almost_eq...
''' oneflux.utils.files For license information: see LICENSE file or headers in oneflux.__init__.py File manipulation utilities @author: <NAME> @contact: <EMAIL> @date: 2017-01-31 ''' import os import sys import logging import subprocess import zipfile import hashlib import fnmatch from datetime import datetime f...
#!/usr/bin/env python """ Parsing support for howde tree hierarchy files. The tree hierarchy file looks something like this (below). It is a pre-order traversal of the tree, and the asterisks indicate the depth of each node. See BloomTree::read_topology() in bloom_tree.cc for a more complete description. node5169.b...
import os import sys import h5py import numpy as np import glob # Local imports rootpath = os.path.dirname(os.path.abspath(__file__)) + '/../' sys.path.append(rootpath) from DataFiles.Hdf5.hdf5lib import h5getstr # --------------------------------------------------------------------------- def PrintArraySize(v, vna...
import numpy as np from datetime import datetime, timedelta import sys AVE = True #AVE = False FT0 = True BS = True BS = False def read_ts( fn_ts, time=datetime(2019,6,10,8,10) ): data = np.load( fn_ts, allow_pickle=True ) ts_l = data['ts'] bs_l = data['bs'] time_l = data['times'] return( ...
#!/usr/bin/python # Copyright 2013 Google Inc. +All rights reserved. # # 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, ...
#!/usr/bin/env python3 # # Copyright (c) 2017 Intel Corporation # Copyright (c) 2018 Foundries.io # # SPDX-License-Identifier: Apache-2.0 # import argparse import struct import sys import os from elftools.elf.elffile import ELFFile from elftools.elf.sections import SymbolTableSection ISR_FLAG_DIRECT = (1 << 0) # The...
""" Title: utils.py Purpose: Contains utility functions for yt answer tests Notes: """ import functools import hashlib import inspect import os import numpy as np import pytest import yaml from yt.config import ytcfg from yt.convenience import load, simulation from yt.data_objects.selection_data_containers import Y...
# coding=utf-8 # Copyright 2021 The vMF Embeddings 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 applicabl...
import os import matplotlib.pyplot as plt import matplotlib import numpy as np from microfilm import microplot, colorify image = 100*np.ones((3,3), dtype=np.uint8) image[0,0] = 200 image2 = 100*np.ones((3,3), dtype=np.uint8) image2[0,1] = 180 more_than_3d = np.zeros((5,3,3), dtype=np.uint8) more_than_3d[0,0,0] = 1 mo...
#!/usr/bin/env python3 from collections import defaultdict from pathlib import Path, PurePath import re import pprint import json import yaml from dateutil import parser import yaml import readtime from jinja2 import Environment, FileSystemLoader import os.path as path import logging import csv def find_all(iterable,...
import time import pickle import numpy as np # import matplotlib.pyplot as plt from sklearn.naive_bayes import GaussianNB from sklearn.feature_extraction.text import TfidfTransformer from merinjei_classification.preprocess.HateLineParser import HateLineParser from merinjei_classification.preprocess.PreprocessData impo...
import json from unittest.mock import patch from numpy import isclose import pytest from opentrons import types from opentrons.config import pipette_config, feature_flags as ff, CONFIG from opentrons_shared_data import load_shared_data defs = json.loads( load_shared_data("pipette/definitions/pipetteModelSpecs.j...
# RT - Voice Channel from typing import TYPE_CHECKING, Union, Literal, Tuple, Dict, List from discord.ext import commands, tasks import discord from time import time if TYPE_CHECKING: from rtlib import Backend from aiomysql import Pool DEFAULT_COOLDOWN = 180 class DataManager: TA...
from unittest import skipIf from django.test import TestCase, TransactionTestCase from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.test.client import Client from django import db from django.db import transaction from ool import ConcurrentUpdate from .m...
import pygame import random from abc import ABC from enum import Enum from itertools import zip_longest from pygame import mixer class Direction(Enum): """A enum for storing the four points of the compass""" NORTH = 0 EAST = 1 SOUTH = 2 WEST = 3 @property def next(self): """Retur...
import numpy as np import scipy.spatial as spatial from source.base import file_utils def get_aabb(points: np.ndarray): aabb_min = points.min(axis=0) aabb_max = points.max(axis=0) return aabb_min, aabb_max def load_xyz(file_path): data = np.loadtxt(file_path).astype('float32') nan_lines = np.is...
from __future__ import division # External imports import json import os import torch from torch.autograd import Variable from tqdm import tqdm from nps.data import load_input_file, get_minibatch, shuffle_dataset from karel.consistency import Simulator from syntax.checker import PySyntaxChecker def add_eval_args(par...
import numpy as np import pauli_class_package as pcp class Hamiltonian(object): def __init__(self,N,paulistrings): """ N is the number of qubits paulistrings is a list of paulistring class objects """ self.N = N self.paulistrings = paulistrings#Should be p...
import logging import time import auditUtils import commonUtils import dbUtil import eventName import hConstants import harmonyData import tables logger = logging.getLogger() logger.setLevel(logging.INFO) # app = constants.HARMONY def createFeeEvent(conn, eventType, hPoolId, epochNumber, newFee): logger.info("igno...
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
# # 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...
import pytest from posts.models import Post, Resume, Rating, Poll, PollFile from django.contrib.auth.models import User from django.core.exceptions import ValidationError from conftest import RATER_USERNAME, new_user, new_poll USERNAME = "testuser" FIRSTNAME = "Test" LASTNAME = "User" PASSWORD = "<PASSWORD>" EMAIL = ...
from argparse import Namespace import chainer import importlib import logging import numpy import pytest import torch logging.basicConfig( level=logging.INFO, format='%(asctime)s (%(module)s:%(lineno)d) %(levelname)s: %(message)s') def test_sequential(): class Masked(torch.nn.Module): def forward(se...
import math import numpy as np import sys from collections import Counter import torch from torch.autograd import Variable import torch.nn as nn import editdistance import models import data import ops from cuda import CUDA def get_precisions_recalls_DEPRECIATED(inputs, preds, ground_truths): """ v1 of preci...
# Copyright (c) 2015-2018 <NAME> <<EMAIL>> # Copyright (c) 2015-2016 Ceridwen <<EMAIL>> # Copyright (c) 2018 <NAME> <<EMAIL>> # Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html # For details: https://github.com/PyCQA/astroid/blob/master/COPYING.LESSER """ Various helper utilities. ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module provides classes to perform grouping of stars. """ import abc from astropy.table import Column import numpy as np __all__ = ['DAOGroup', 'DBSCANGroup', 'GroupStarsBase'] class GroupStarsBase(metaclass=abc.ABCMeta): """ This bas...
import numpy as np import tensorflow as tf from distutils.version import LooseVersion if LooseVersion(tf.__version__) > LooseVersion("1.14"): import tensorflow.compat.v1 as tf from graphgallery import functional as gf from graphgallery.utils import tqdm from graphgallery.attack.targeted import TensorFlow...
""" Practice DEFINING and CALLING FUNCTIONS Authors: <NAME>, <NAME>, <NAME>, <NAME>, their colleagues and <NAME>. """ # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE. ############################################################################### # # DONE: 2. # Allow this module to use the rosegraphics.p...
import tensorflow as tf import numpy as np import matplotlib.pyplot as plt import re import sys def read_flo(filename): with open(filename, 'rb') as f: magic = np.fromfile(f, np.float32, count=1) if 202021.25 != magic: print('Magic number incorrect. Invalid .flo file') else: ...
""" this class is responsible for storing all the information about the current state of a chess game, it will aslo be responsible for determning the valid move at the current state. It will also keep a move log """ class Gamestate(): def __init__(self): #board is an 8X8 2D list #string "--"...
# version 1.5.4 May 29 2018 # Python 3.6 modules import csv import sys import re import os import urllib import zipfile import asyncio from pathlib import Path # 3rd party modules import arrow from tqdm import tqdm, TqdmSynchronisationWarning from tldextract import TLDExtract # local modules import reno import vtmac...
import collections bus_type = collections.namedtuple('BusType', 'PQ, PV, REF, ISOLATED')( PQ=1, PV=2, REF=3, ISOLATED=4, ) Point = collections.namedtuple('Point', 'x, y') class Bus(object): """ A *Bus* represents a node in a bus/branch network graph. """ def __init__(self, name='',...
#!/usr/bin/env python # Copyright 2020 EMBL - European Bioinformatics Institute # # 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 ...
"""Handlers for all JSON/REST API routes used by this application.""" ###################################################################################### # # Copyright (c) 2015 Twist Bioscience # # File: app/routes/api.py # # # ###################################################################################### i...
# Copyright (c) 2013-2017 <NAME> et al. # # 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, ...
# $Id: __init__.py 7598 2013-01-30 12:39:24Z milde $ # Author: <NAME> <<EMAIL>> # Copyright: This module has been placed in the public domain. """ This is ``docutils.parsers.rst`` package. It exports a single class, `Parser`, the reStructuredText parser. Usage ===== 1. Create a parser:: parser = docutils.pa...
# 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...
import argparse import configparser import os import pickle import sys from collections import OrderedDict import numpy as np from sklearn.metrics import roc_curve from sklearn.preprocessing import normalize from tqdm import tqdm from math import log10, floor import torch import uvloop from data_io_speaker import Spe...
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
from __future__ import absolute_import, unicode_literals import contextlib import django from django.db import models from django.core.exceptions import ValidationError from django.contrib.contenttypes.forms import BaseGenericInlineFormSet from django.contrib.contenttypes.models import ContentType from django.forms.m...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from __future__ import absolute_import, division, print_function, unicode_literals import six import logging import os import stat from subprocess import Popen, PIPE import io import numpy as np import shutil from contextlib import contextmanager import gzip logger = logging.getLogger(__name__) initialized = False ...
# TODO: Check _read_words format for fewrel matches what bao et al did in paper # TODO: Set the way # TODO: Handle fewrel in for fewshot.eval # TODO: Called 'flex.txt' in raw dataset, then set to 'txt' in challenge from pathlib import Path from torchtext.data import get_tokenizer import pickle import itertools import c...
# Python imports from collections import defaultdict import datetime import logging # 3rd party imports from django.conf import settings from django.db import connection from django.utils import translation # Project imports from . import codings from . import query from libya_elections.utils import ConnectionInTZ fr...
import os import sys import ast import random import argparse import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import torch.distributed as dist from torch.utils.data import DataLoader from torch.utils.data.distributed import DistributedSampler from tens...
# coding=utf-8 # Copyright 2020 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
import logging import sys import warnings from dbnd._core.decorator.schemed_result import FuncResultParameter from dbnd._core.errors import DatabandSystemError, friendly_error from dbnd._core.errors.friendly_error import _band_call_str from dbnd._core.plugin.dbnd_plugins import is_airflow_enabled from dbnd._core.task_...
#!/usr/bin/python # Copyright: 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': 'network'} DOCUMENTATION = ''' --- module: ios_ntp e...
import keras import os import yaml import matplotlib.pyplot as plt import numpy as np import tensorflow as tf from hardy.handling import to_catalogue from keras.layers import (Dense, Conv2D, Flatten) from keras.models import Sequential # from keras.optimizers import Adam from sklearn.metrics import classification_re...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __description__ = \ """ Fetches the data for all the tickers in a list. Do remember to add .L suffix for LSE, .MI for LSE-MIB. FTSE indices don't seem to work. NB. Written for python 3, not tested under 2. """ __author__ = "<NAME>. [Github](https://github.com/matteofer...
__author__ = 'dcyoung23' import math from time import time from scipy import stats from wilsonscore_stats import wilson_ci # Normal approximation to the binomial def normapprox_ss(ci,cl,N,p,B): alpha = 1-cl z = stats.norm.ppf(1-alpha/ci) n = (N*(z**2)*(p*(1-p)))/(((N-1)*(B**2))+((z**2)*(p*(1-p)))) n...
# Copyright 2020 - 2021 MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in wri...
import warnings from pathlib import Path from typing import List, Dict, Tuple, Union import numpy as np from floodlight.core.xy import XY def get_column_names_from_csv(filepath_data: Union[str, Path]) -> List[str]: """Reads first line of a Kinexon.csv-file and extracts the column names. Parameters ----...
# -*- coding: utf-8 -*- from os import error from typing import Union from typing import Optional from typing import Tuple import math import torch from ._tokenizer import BytePairEncoder from ._functions import positional_encoding from ._functions import mask_chronological from ._functions import strings_to_...
import contextlib import json import shutil import socket import tarfile import tempfile import threading import pytest import six from six.moves import BaseHTTPServer from six.moves import socketserver import docker from .base import BaseAPIIntegrationTest, BUSYBOX class ListImagesTest(BaseAPIIntegrationTest): ...
# coding: utf-8 import os, json import argparse import unicodedata from selenium import webdriver from time import sleep from selenium.webdriver.common.action_chains import ActionChains def loadjsoncookie(jsoncookie, browser): with open(jsoncookie, 'r') as bloc: distros_dict = json.load(bloc) for i in ...
import logging from packaging import version from kube_hunter.conf import get_config from kube_hunter.core.events.event_handler import handler from kube_hunter.core.events.types import K8sVersionDisclosure, Vulnerability, Event from kube_hunter.core.types import ( Hunter, KubectlClient, KubernetesCluster,...
# Copyright (c) 2019-2020, <NAME> # License: MIT License import math from ezdxf.math import ConstructionBox, ConstructionLine class TestTextBox: def test_defaults(self): box = ConstructionBox() assert box.center.isclose((0, 0)) assert box.width == 1 assert box.height == 1 a...
# -*- coding: utf-8 -*- import argparse import datetime import sys import time from chibi.config import basic_config, load as load_config from chibi.file import Chibi_path from chibi.snippet.list import group_by from python_hosts import Hosts, HostsEntry from chibi_lxc.config import configuration from chibi_lxc.conta...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2021 TH<NAME>, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in complianc...
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
import numpy as np import tensorflow as tf def unpickle(file): import pickle fo = open(file, 'rb') dict = pickle.load(fo, encoding='latin1') fo.close() if 'data' in dict: dict['data'] = dict['data'].reshape((-1, 3, 32, 32)).swapaxes(1, 3).swapaxes(1, 2).reshape(-1, 32*32*3) / 256. return dict def loa...
# Copyright 2021 eprbell # # 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, soft...
#! /usr/bin/env python import collections import extractor_util as util import data_util as dutil import dep_util as deps import random import re import sys import config # This defines the Row object that we read in to the extractor parser = util.RowParser([ ('relation_id', 'text'), ('doc_id'...
# Owner(s): ["module: nn"] import unittest import sys import os import subprocess import torch import torch.nn.utils.stateless as stateless from torch.testing._internal.common_cuda import TEST_MULTIGPU from torch.testing._internal.common_utils import run_tests, TestCase class MockModule(torch.nn.Module): def _...
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
# -*- coding: utf-8 -*- # # Copyright 2012-2016 Spotify AB # # 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...
# vim: set et sw=4 sts=4 fileencoding=utf-8: # # Alternative API for the Sense HAT # Copyright (c) 2016-2018 <NAME> <<EMAIL>> # # 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...
# 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 ...
from dataclasses import dataclass from typing import Optional, Tuple import numpy as np from numba import njit, jitclass, int32 from . import hex_io @dataclass class HexGameState: color: int # 0=first player (red), 1=second player (blue) legal_moves: np.ndarray result: int board: np.ndarray clas...
import hail as hl from .java import FatalError, Env, info from .misc import local_path_uri, new_local_temp_dir import os import zipfile from urllib.request import urlretrieve from hailtop.utils import sync_retry_transient_errors __all__ = [ 'get_1kg', 'get_movie_lens' ] resources = { '1kg_annotations': 'h...
""" Spinsolve module """ import asyncio import pprint as pp import queue import threading import warnings from pathlib import Path from typing import Optional, Union from loguru import logger from lxml import etree from packaging import version from unsync import unsync from flowchem.components.devices.Magritek.msg_m...
# Copyright 2015 Ufora 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 i...
""" Using the drug_concept_id, one can infer the values to populate the route concept ID field pseudoephedrine hydrochloride 7.5 MG Chewable Tablet (OMOP: 43012486) would have route as oral This cleaning rule populates null and wrong route_concept_ids based on the drug_concept_id """ import logging import os import bq...
import numpy as np import pandas as pd import datetime import matplotlib.pyplot as plt from copy import copy, deepcopy from tsf_bmw.uvtsf import UVariateTimeSeriesForecaster #@ToDo: implement moving_window, window_step, window_step_size def moving_val_forecast(uvtsf_obj, granularity='p_week', ...
""" Outdated code used when prototyping integer inferencing """ import numpy as np from tensorflow.keras.datasets import mnist from tensorflow.keras.utils import to_categorical from tensorflow.keras import backend as K import argparse import h5py import model_pb2 import uuid from encoder import choose_quant_params imp...
""" Author: <NAME> Layout code for the application """ # Import #--------- import os import visdcc import base64 import pandas as pd import dash_core_components as dcc import dash_html_components as html import dash_bootstrap_components as dbc # Constants #-------------- # default node and egde color DEFAULT_COLOR =...
from .. import logging as logg from ..preprocessing.neighbors import ( compute_connectivities_umap, get_neighs, neighbors, verify_neighbors, ) from ..preprocessing.utils import sum_var from .utils import scale from .velocity_model import velocity_model from Bio import pairwise2 from Bio.SubsMat import ...
from sys import argv import dpkt import csv import socket import ipaddress # Data structure and global variables allowed_ips = [] banned_ips = [] knownlistDict = {} # Key is knowlist domain, values are number of dns, number of packets, number of bytes, number missed dns, estimated packets, estimated bytes known_domai...
# -*- coding: utf-8 -*- # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
# TODO: the line slicer should listen to all 2DREFRESH events, get the data and slice it # before pushing a new 1D data update. # # TODO: NEED MAJOR REFACTOR # import math import wx from BaseInteractor import _BaseInteractor from sas.sasgui.guiframe.events import NewPlotEvent from sas.sasgui.guiframe.events impor...
from typing import TYPE_CHECKING, Optional, Type, Union from brewtils.models import BaseModel as BrewtilsModel from brewtils.models import Garden as BrewtilsGarden from brewtils.models import Job as BrewtilsJob from brewtils.models import Request as BrewtilsRequest from brewtils.models import System as BrewtilsSystem ...
# pylint: disable=g-bad-file-header # Copyright 2017 The Sonnet 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...
#!/usr/bin/env python3 # Pygame gui stuff # # //// Hehe //////////////////////////////////////////////////////////////////////////////////////////////////////// __author__ = "Frenzy" # ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// """ I've...
# Copyright 2019-2022 The <NAME> at the California Institute of # Technology (Caltech), with support from the Paul Allen Family Foundation, # Google, & National Institutes of Health (NIH) under Grant U24CA224309-01. # All rights reserved. # # Licensed under a modified Apache License, Version 2.0 (the "License"); # you ...
from datetime import datetime import pendulum from dagster import check from dagster.core.errors import ( DagsterInvalidDefinitionError, ScheduleExecutionError, user_code_error_boundary, ) from dagster.core.instance import DagsterInstance from dagster.core.storage.pipeline_run import PipelineRun from dagst...
import copy import csv import json import numbers import os import time import numpy as np import pandas as pd from catalyst.assets._assets import TradingPair from catalyst.exchange.utils.exchange_utils import get_algo_folder from catalyst.utils.paths import data_root, ensure_directory from operator import...