text
stringlengths
3.07k
22.1k
from typing import Tuple, Callable, List, Optional from thinc.api import wrap, layerize, chain, flatten_add_lengths, with_getitem from thinc.t2v import Pooling, mean_pool from thinc.v2v import Softmax, Affine, Model from thinc.neural.util import get_array_module from spacy.tokens import Span, Doc import numpy from .wr...
""" """ import datetime import logging import os import time import cv2 import numpy as np import tensorflow as tf import cnn_lstm_otc_ocr import utils import helper FLAGS = utils.FLAGS logger = logging.getLogger('Traing for OCR using CNN+LSTM+CTC') logger.setLevel(logging.INFO) def train(train_dir=None, val_di...
""" sentry.models.organization ~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function import six from datetime import timedelta from enum import IntEnum from bitfie...
import tensorflow as tf # tensorflow module import numpy as np # numpy module import os # path join DATA_DIR = "../data/" TRAINING_SET_SIZE = 3380 BATCH_SIZE = 10 IMAGE_SIZE = 224 def _int64_feature(value): return tf.train.Feature(int64_list=tf.train.Int64List(value=value)) def _bytes_feature(value): retur...
# Copyright FMR LLC <<EMAIL>> # SPDX-License-Identifer: Apache-2.0 import re import time import json import math import spacy import string import typing import pathlib import graphviz import itertools import numpy as np import unicodedata import networkx as nx from icecream import ic from dataclasses import datacla...
import json import frappe from frappe import ValidationError, _, scrub, throw from frappe.utils import cint, comma_or, flt, getdate, nowdate from six import iteritems, string_types import erpnext from erpnext.accounts.utils import get_account_currency, get_held_invoices from erpnext.controllers.accounts_controller imp...
import typing from base64 import b64decode from enum import Enum from io import BytesIO from mimetypes import guess_type import re from django.core.exceptions import ValidationError from django.core.files import File from django.forms import Field from django.utils.translation import gettext_lazy as _ from .exception...
# -*- coding: utf-8 -*- import struct import itertools import gxf import gdb from pygments.token import Token # TODO: move this someplace else, utils? def repr_long_str(s, maxl=None, maxc=6): rep = [] total = 0 accu = 0 def add_accu(until): if accu >= until: return total ...
import aioredis import asyncio import base64 import pytest import tempfile import sys import base58 import json import os import psutil import random from web3 import Web3 from aioresponses import aioresponses from asynctest.mock import patch from polyswarmclient import Client # THE FOLLOWING KEY IS FOR TESTING PURP...
import s3utils as s3 import sh import os import sys import shutil import time import logging pyVersion = sys.version_info # pyVersion[0] can be 2 or 3 s3scannerLocation = "./" testingFolder = "./test/" setupRan = False def test_setup(): """ Setup code to run before we run all tests. """ global setupRan ...
import collections import os import tempfile import typing import audbackend import audeer import audformat import audiofile from audb.core import define from audb.core.api import dependencies from audb.core.dependencies import Dependencies from audb.core.repository import Repository def _check_for_duplicates( ...
import time t0=time.time() from cconfig import * import sys import cv2 import os import math from PIL import Image testing=0 PALETTE = [ 240, 240, 240, #01 white 242, 178, 51, #02 orange 229, 127, 216, #03 magenta 153, 178, 242, #04 lightblue 222, 222, 108, #05 yellow 127, 204, 25...
#!/usr/bin/env python import pytest import networkx as nx from networkx.testing import assert_nodes_equal from .test_graph import BaseGraphTester, BaseAttrGraphTester, TestGraph from .test_graph import TestEdgeSubgraph as TestGraphEdgeSubgraph class BaseDiGraphTester(BaseGraphTester): def test_has_successor(se...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Sep 24 23:36:06 2018 @author: <NAME> """ import base64 import numpy as np import os from urllib.parse import quote as urlquote import dash from PIL import Image, ImageOps from flask import Flask, send_from_directory from tflite_pred import tflite_img_cl...
import argparse import time from tqdm import tqdm import copy as cp import torch.nn.functional as F from torch.utils.data import random_split from torch_geometric.data import DataLoader, DataListLoader from torch_geometric.datasets import UPFD from torch_geometric.nn import DataParallel from torch.nn import Linear from...
""" MaskCycleGAN-VC models as described in https://arxiv.org/pdf/2102.12841.pdf Inspired by https://github.com/jackaduma/CycleGAN-VC2 """ import numpy as np import torch import torch.nn as nn class GLU(nn.Module): """Custom implementation of GLU since the paper assumes GLU won't reduce the dimension of tens...
from google.cloud import datastore import json import datetime import os import yfinance as yf from yahoo_fin import stock_info as si from flask import ( Flask, Response, abort, render_template, request, jsonify, redirect, session, make_response ) # blueprints from profile import b...
import re from collections import namedtuple import operator import pytest import magma as m import magma if magma.mantle_target == "coreir": output = "coreir" suffix = ".json" else: output = "verilog" suffix = ".v" import mantle from fault.test_vectors import generate_function_test_vectors, \ ...
import random import RNG import logging import utilityFunctions as utilityFunctions AIR_ID = (0, 0) FENCE_ID = (85, 0) OAK_WOOD_ID = (17, 0) FARMLAND_ID = (60, 0) WATER_ID = (9, 0) TORCH_ID = (50, 5) WHEAT_ID = (59, 0) CARROT_ID = (141, 0) POTATO_ID = (142, 0) GRASS_PATH_ID = (208, 0) OAK_FENCE_GATE_ID = 107 plants = ...
# Copyright 2018 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
"""Collection of routines used to post process (magnetisation) vector data. Part of ovf2vtk. <NAME>, <EMAIL> # Some helping functions: # # Set of functions used for ovf2vtk. General data format is a rank-2 # matrix with the row corresponding to the data in the vector field, and # the 3-component column correspondin...
import argparse import binascii import tempfile import subprocess import time import os import re import shutil import hashlib import sys import xml.dom.minidom import unicodedata from . import backups_manager_lib from . import lib COMMAND_VERIFY_LEGACY_BACKUP_CHECKSUMS = 'verify-legacy-backup-checksums' COMMAND_VER...
from random import random from coldtype.color.html import NAMED_COLORS from coldtype.interpolation import norm try: import skia except ImportError: skia = None try: from fontTools.ttLib.tables.C_P_A_L_ import Color as FTCPALColor except ImportError: FTCPALColor = None def norm(value, start, stop): ...
# Author: <NAME>, <EMAIL> # Date: March 2022 # Copyright: Georgia Institute of Technology, 2022 # Partially based on the code by Zongyi Li at: # https://github.com/zongyi-li/fourier_neural_operator import torch from typing import Optional torch.manual_seed(0) class FourierNeuralLayer(torch.nn.Module): """A Four...
# start # compare genome call SNPs VS WGS call SNPs import glob import os from Bio import SeqIO from Bio.Seq import Seq import statistics import random import argparse ############################################ Arguments and declarations ############################################## parser = argparse.ArgumentParser...
# this file replaces quantile/ensemble.py file of scikit-garden package # this code, unlike the original code, makes use of all available cores when doing scoring # also, unlike the original code, predict() function in the new code can generate predictions for multiple quantiles import numpy as np from numpy import ma...
#!/usr/bin/python # Copyright (c) 2017-present Alibaba Group Holding Limited. <NAME> <<EMAIL>> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GN...
# -*- coding: utf-8 -*- ''' :codeauthor: <NAME> (<EMAIL>) :copyright: Copyright 2017 by the SaltStack Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. tests.support.paths ~~~~~~~~~~~~~~~~~~~ Tests related paths ''' # Import python libs from __future__ i...
from collections import defaultdict from io import BytesIO from itertools import chain from pathlib import Path import sys from typing import Dict, Iterable, Iterator, List, Union, Tuple, Optional import attr from attr import validators from sortedcontainers import SortedList, SortedKeyList from cassis.typesystem im...
import glob import os import sqlite3 from contextlib import contextmanager import six from watchdog.events import PatternMatchingEventHandler from watchdog.observers import Observer from dagster import check, seven from dagster.core.definitions.environment_configs import SystemNamedDict from dagster.core.events impor...
import six from widgetastic.log import create_item_logger from widgetastic.widget import Table from widgetastic.widget import TableColumn from widgetastic.widget import TableRow from widgetastic.widget import Text from widgetastic.widget import Widget from widgetastic.widget.table import resolve_table_widget class He...
""" __author__: HashTagML license: MIT Created: Thursday, 8th April 2021 """ import collections import copy import os import random import textwrap from pathlib import Path from typing import Dict, List, Optional, Tuple, Union, Any import bounding_box.bounding_box as bb import matplotlib.pyplot as plt import mediapy a...
# # 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...
# pip install pandas # pip install numpy # pip install smartapi-python # pip install TA_Lib-0.4.24-cp310-cp310-win_amd64.whl from smartapi import SmartConnect import document_detail_Lax import time import datetime import talib as ta import pandas as pd import numpy as np import json api_key = document_d...
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import import errno import os import shutil import zipfile from argparse import ArgumentParser, Namespace from collections import defaultdict from textwrap...
from __future__ import annotations from typing import List, Dict import networkx as nx from nukleus.AbstractNetlist import AbstractNetlist from nukleus.AbstractParser import AbstractParser from nukleus.Registry import Registry from .transform import get_pins from .ModelSchema import Symbol from .SpiceModel import ge...
import argparse from utils import read_data, save_pickle, read_ade_data from biobert_ner.utils_ner import generate_input_files from biobert_re.utils_re import generate_re_input_files from typing import List, Iterator, Dict import warnings import os labels = ['B-DRUG', 'I-DRUG', 'B-STR', 'I-STR', 'B-DUR', 'I-DUR', ...
# Copyright 2019 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
import yaml import pygame from typing import Tuple """ TODO description """ class ConfigurationManager: CONFIG_FILE_LOCATION = "config.yaml" _configuration = [] @classmethod def init(cls) -> None: with open(cls.CONFIG_FILE_LOCATION, "r") as yaml_file: cls._configuration = ...
#! /usr/bin/python3 import argparse import logging import os import sys from collections import namedtuple import torch from torch.utils.data import DataLoader, SequentialSampler from tqdm import tqdm from modeling_bertabs import BertAbs, build_predictor from transformers import BertTokenizer from configuration_berta...
''' ILC method to do the component separation. Both ILC in harmonic space and pixel space are defined. ''' import logging as log import numpy as np import matplotlib.pyplot as plt import pymaster as nmt ### ILC in l-space class ILC_L(object): def __init__(self, nside, lmax, bin_w, beam = None): ...
# Copyright (c) <2021> Side Effects Software 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: # # 1. Redistributions of source code must retain the above copyright notice, # thi...
import numpy as np import pandas as pd import datetime as dt from sklearn.metrics import mean_squared_log_error import matplotlib.pyplot as plt import matplotlib as mpl from matplotlib import ticker import matplotlib.dates as mdates # Function to reduce the DF size def reduce_mem_usage(df, verbose=True): """Sourc...
"""Generator for Python code.""" from __future__ import division, absolute_import, print_function __copyright__ = "Copyright (C) 2008 <NAME>" __license__ = """ 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...
""" analysis.py ~~~~~~~~~~~ Various routines to perform standard analysis, and/or visualisation, tasks. """ import matplotlib.pyplot as _plt import matplotlib.collections as _mpl_collections import descartes as _descartes import csv as _csv import collections as _collections import scipy.stats as _stats import open_c...
"""PyTorch policy class used for R2D2.""" from typing import Dict, Tuple import gym import ray from ray.rllib.algorithms.dqn.dqn_tf_policy import ( PRIO_WEIGHTS, postprocess_nstep_and_prio, ) from ray.rllib.algorithms.dqn.dqn_torch_policy import ( adam_optimizer, build_q_model_and_distribution, co...
# 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, ...
""" ietf_netconf_acm NETCONF Access Control Model. Copyright (c) 2012 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simp...
import mmcv def wider_face_classes(): return ['face'] def voc_classes(): return [ 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor' ] ...
#!/usr/bin/env python3 # # Copyright 2016 Canonical Ltd # # 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...
import math import os import sys import time from numpy.random import seed import numpy as np # to deal with numpy randomness # seed(1234) import tensorflow.compat.v1 as tf # added to deal with randomness tf.set_random_seed(1234) import tqdm from numpy import random from utils import * def get_cosine_...
"""Create Google calendar events from the NeurIPS 2018 website event list. Scrapes event data from https://nips.cc using `requests` and BeautifulSoup. Creates and populates a separate calendar for each event type. Metadata includes the full description/abstract prepended with the author/speaker names, as well as a lin...
""" Scripts for validation """ from __future__ import division import logging import copy import matplotlib.pyplot as pl import numpy as np from sklearn.metrics import explained_variance_score, r2_score from revrand.metrics import lins_ccc, mll, msll, smse from uncoverml.models import apply_multiple_masked from unc...
#%% # Import libraries import torch import numpy as np from sklearn.metrics import mean_squared_error, r2_score import matplotlib.pyplot as plt from .bnn_model import Bnn, DataManager, BnnModelManager class BnnRegression(Bnn): """ Bayesian neural network implementing BNN. Regression version. """ d...
# coding: utf8 import numpy as np from clinicaaddl.tools.inputs.filename_types import FILENAME_TYPE import random from skimage.draw import ellipse from scipy.ndimage import gaussian_filter def load_and_check_tsv(tsv_path, caps_dir, output_path): import pandas as pd from os.path import join from clinica.i...
from time import sleep import nfc from nfc.clf import RemoteTarget, LocalTarget, TimeoutError, BrokenLinkError import argparse import usb1 as libusb import json from time import time fromhex = bytearray.fromhex parser = argparse.ArgumentParser( description='Relay felica exchange.', epilog='v2.2', formatter_cla...
# -*- coding: utf-8 -*- # Copyright (c) 2016-2020 by University of Kassel and Fraunhofer Institute for Energy Economics # and Energy System Technology (IEE), Kassel. All rights reserved. import pandapower as pp import pandapower.shortcircuit as sc import pandapower.test import copy import numpy as np import...
# 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 copy import deepcopy import torch import math import os import re import shutil import glob import csv import operator import logging import numpy as np from sklearn.metrics import confusion_matrix from collections import OrderedDict try: from apex import amp has_apex = True except ImportError: amp = ...
import math import tkinter root = tkinter.Tk() root.resizable(width=False, height=False) '''hypeparameter''' # 是否按下了运算符 IS_CALC = False # 存储数字 STORAGE = [] # 显示框最多显示多少个字符 MAXSHOWLEN = 18 # 当前显示的数字 CurrentShow = tkinter.StringVar() CurrentShow.set('0') '''按下数字键(0-9)''' def pressNumber(number): global IS_CALC if IS...
# 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...
# -*- coding: utf-8 -*- """ Description: Finite Mixture Model Methods: 1. Maximum Likelihood 2. Maximum-a-posterior a. Normal Inverse Gamma b. Collapsed Sampling """ import numpy as np import math import matplotlib.pyplot as plt from collections import Counter from s...
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # License: The MIT License (MIT) # # Copyright (c) 2020 <NAME>. -> www.whexy.com # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), t...
import numpy as np from typing import List from summer import CompartmentalModel from autumn.tools.curve import tanh_based_scaleup from .constants import COMPARTMENTS, Compartment, INFECTIOUS_COMPS def request_outputs( model: CompartmentalModel, cumulative_start_time: float, location_strata: List[str],...
# -*- coding: utf-8 -*- """ Created by huxiaoman 2017.12.12 vgg_tf.py:训练tensorflow版的vgg16网络,对cifar-10shuju进行分类 """ from datetime import datetime import math import time import tensorflow as tf import cifar10 batch_size = 16 num_batches = 100 # 定义函数对卷积层进行初始化 # input_op : 输入数据 # name : 该卷积层的名字,用tf.name_scope()来命名 # kh...
### Not working!!! ### Alternative trianing of Faster R-CNN, # which means we are going to train RPN first, then detector, then RPN, then detector... import sys from pathlib import Path import pickle import random from copy import copy import numpy as np import pandas as pd import tensorflow as tf from tensorflow.im...
""" Tests for Factor terms. """ from nose_parameterized import parameterized from numpy import arange, array, empty, eye, nan, ones, datetime64 from numpy.random import randn, seed from zipline.errors import UnknownRankMethod from zipline.pipeline import Factor, Filter, TermGraph from zipline.pipeline.factors import ...
############################################################################### # Basic context management with LokyContext and provides # compat for UNIX 2.7 and 3.3 # # author: <NAME> and <NAME> # # adapted from multiprocessing/context.py # * Create a context ensuring loky uses only objects that are compatible # *...
# Copyright (C) 2020. Huawei Technologies Co., Ltd. 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 us...
import sys sys.path.insert(0, "../") import tensorflow as tf try: from word2vec.archs.constants import CBOW_N_WORDS, SKIPGRAM_N_WORDS, MIN_WORD_FREQUENCY, MAX_SEQ_LENGTH, BATCH_SIZE, VOCAB_SIZE, BUFFER_SIZE except ImportError: raise ImportError('constants' + ' non importé') import nltk from nltk.corpus impor...
# ---------------- # User Instructions # # Implement twiddle as shown in the previous two videos. # Your accumulated error should be very small! # # You don't have to use the exact values as shown in the video # play around with different values! This quiz isn't graded just see # how low of an error you can get. # # Tr...
# (originally from https://github.com/tensorflow/models/tree/master/research/differential_privacy, # possibly with some small edits by @corcra) # Copyright 2016 The TensorFlow Authors. All Rights Reserved. # SPDX-FileCopyrightText: 2020 SAP SE # # SPDX-License-Identifier: Apache-2.0 """Utils for building and training...
# Copyright 2017 Google Inc. # # 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 following disclaimer. # #...
"""Methods related to display of information to the user.""" import csv import datetime import io import sys import webbrowser import dateutil import googleapiclient.http #TODO: get rid of these hacks import gam from gam.var import * from gam import controlflow from gam import gapi def current_count(i, count): ...
#!/usr/bin/env python """A QR Move SCU application. For sending Query/Retrieve (QR) C-MOVE requests to a QR Move SCP. """ import argparse import sys from pynetdicom import ( AE, evt, QueryRetrievePresentationContexts, AllStoragePresentationContexts, ) from pynetdicom.apps.common import setup_logging,...
import numpy as np import os import torch import torchvision.models as models from torch.autograd import Variable import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.utils.data import DataLoader import sys import math import torch.nn.init as init import logging from torch.nn.par...
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import collections import logging import os import sys import tempfile from flexget import plugin from flexget.event import event log = logging.getLogger('subtitles') try: ...
"""This module contains the base client API and batch handler.""" import importlib import logging from collections import OrderedDict from types import ModuleType import networkx as nx from elfi.compiler import (AdditionalNodesCompiler, ObservedCompiler, OutputCompiler, RandomStateCompiler...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os, sys, re from datetime import datetime sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), "parsers")) import parser_interface from utility import carpe_db class User_Information: def __init__(self): self.par_...
from __future__ import absolute_import, division, print_function import glob import mock import os import procrunner import pytest import py.path import sys import scitbx from cctbx import uctbx from dxtbx.serialize import load from dxtbx.model import ExperimentList import dials.command_line.dials_import from dials....
import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation import matplotlib.gridspec as gridspec import matplotlib.patches as mpatches from scipy.optimize import minimize import time def plant_model(prev_state, dt, pedal, steering): x_t = prev_state[0] y_t = prev_state[1] ...
# -*- coding: utf-8 -*- # # Copyright (c) 2017, the cclib development team # # This file is part of cclib (http://cclib.github.io) and is distributed under # the terms of the BSD 3-Clause License. """A writer for chemical JSON (CJSON) files.""" import os.path import json import numpy as np from cclib.io import filew...
import pandas as pd import pytest from qac.simq.simq_features import FeatureGenerator DATA = pd.DataFrame([ [0, 'title', 'body', 'tags', 1], [1, 'title', 'body', 'tags', 1], [2, 'title', 'body', 'tags', 1], [3, 'title', 'body', 'tags', 1], [4, 'title', 'body', 'tags', 1], [5, 'title', 'body', ...
#COPYRIGHT DYNAMICCODES 2021 @ GITHUB. #NOT TO BE EDITED OR USED WITHOUT CONSENT FROM DEVELOPER. import pygame from pygame import mixer import pickle from os import path pygame.mixer.pre_init(44100, -16, 2, 512) mixer.init() pygame.init() clock = pygame.time.Clock() fps = 60 #game window tile_size = 50 cols = 20 m...
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import numpy as np from .fmriprepadapter import init_fmriprep_adapter_wf from .icaaroma import init_ica_aroma_components_wf, init_ica_aroma_regression_wf from .smoothing import ini...
from functools import update_wrapper from django.conf.urls import url from django.contrib import admin from django.http import HttpResponseRedirect from django.shortcuts import render from django.urls import reverse from django.utils.translation import gettext_lazy as _ from django.utils.translation import ngettext_la...
# Copyright (c) Microsoft Corporation # # All rights reserved. # # MIT License # # 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...
# Modify from https://github.com/NVIDIA/Megatron-LM/blob/main/tasks/zeroshot_gpt/evaluate.py # coding=utf-8 # Copyright (c) 2020, NVIDIA 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 obt...
# -*- coding: utf-8 -*- ''' #################################### Acme::MetaSyntactic::counting_to_one #################################### **** NAME **** Acme::MetaSyntactic::counting_to_one - The "movies where you count up to one" theme *********** DESCRIPTION *********** This list gives the names of some movi...
"""esub client. Usage: esub [options] <key> Options: --data DATA, -d DATA Rep a waiting sub with data (- for stdin) --token TOKEN, -t TOKEN Sub token to use --host HOST, -H HOST esub server node [default: localhost] --port PORT, -P PORT esub server port [default: 8090] --psub, -p ...
# This files contains your custom actions which can be used to run # custom Python code. # # See this guide on how to implement these action: # https://rasa.com/docs/rasa/custom-actions # This is a simple example for a custom action which utters "Hello World!" # from typing import Any, Text, Dict, List # # from rasa...
# Copyright 2021 MosaicML. All Rights Reserved. from __future__ import annotations import datetime import os import warnings from contextlib import contextmanager, nullcontext from typing import TYPE_CHECKING, Callable, ContextManager, List, Optional, Sequence, TypeVar, Union, cast import torch import torch.distribu...
import numpy as np from scipy.integrate import ode from scipy.special import binom from .utils import differentiate, integrate def pool_data(Xin, poly_order=2, use_sine=False, include_constant=True, varname='x'): if poly_order > 5: poly_order = 5 if Xin.ndim == 1: T = 1 n = Xin.size ...
import gym import tensorflow_probability as tfp from ray.rllib.models.modelv2 import ModelV2 from ray.rllib.models.tf.tf_modelv2 import TFModelV2 from ray.rllib.utils.annotations import override from ray.rllib.utils.framework import try_import_tf from ray.rllib.utils.typing import TensorType tf1, tf, tfv = try_import...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017, <NAME> <<EMAIL>> # 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: cs_vpn_customer_gateway...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Tests for `astropy.vo.client.conesearch` and `astropy.vo.client.async`.""" from __future__ import absolute_import, division, print_function, unicode_literals # STDLIB import os # THIRD-PARTY import numpy as np # LOCAL from .. import conesearch, vos_c...
#!/usr/bin/env python3 import argparse import xgboost as xgb import pandas as pd import numpy as np import re import logging import somaticseq.ntchange_type as ntchange from copy import copy from somaticseq._version import __version__ DEFAULT_PARAM = {'max_depth': 8, 'nthread': 1, 'objective': 'binary:logistic', 's...
import joblib from joblib import load import web_app from web_app import assets import pickle import numpy as np import pandas as pd import matplotlib.pyplot as plt import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html from dash.dependencies import In...
# <NAME> - Percolator Project # Takes data from IntegrationTest_Percolator_SpeedGraphData.py and output graph images. # Input: Any number of data files, but at least 1. pathToOutputData = "@pathToOutputData@" pathToTestScripts = "@pathToTestScripts@" import sys import pathlib import datetime from pathlib import Path...
"""Additional functions for stitching images together.""" import numpy as np import dask.array as da from dask.delayed import delayed from dask.distributed import Client, LocalCluster import matplotlib.pyplot as plt import matplotlib as mpl from ipywidgets import interact, interactive, fixed, interact_manual import ipy...