text
stringlengths
6.04k
39.5k
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Retinotopic mapping: polar angle Author: <NAME> Nov. 2017 """ ################################################################################################################ ## Imports from __future__ import division from psychopy import visual, event, core, logg...
import open3d as o3d import argparse import os import sys import logging import numpy import numpy as np import torch import torch.utils.data import torchvision from torch.utils.data import DataLoader from tqdm import tqdm from sklearn.neighbors import NearestNeighbors from scipy.spatial.distance import minkowski impor...
import sys sys.path.append("../src") import os from os import listdir import shutil import numpy as np from training import load_model from sindy_utils import sindy_simulate, sindy_library_names from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from lorenz import Lor...
""" dataset_orm.files implements a file-like API to efficiently store files of arbitrary size into an SQL database . The files modules provides typical operations of a filesystem: * open() - to create and access a file, return a FileLike object * exists() - to check if a file exists * list() - to list all files * rea...
#! /usr/bin/env python """Load data from queue into tables, with optional partitioning. --ini ql_srcdb_queue_to_dstdb [queue_loader] job_name = test_move src_db = dbname=sourcedb dst_db = dbname=destinationdb pgq_queue_name = OrderLog logfile = ~/log/%(job_name)s.log pid...
import os import sys import time import string import argparse import re from datetime import date import torch import torch.backends.cudnn as cudnn import torch.utils.data import torch.nn.functional as F import numpy as np from nltk.metrics.distance import edit_distance from tqdm import tqdm from utils import CTCLab...
# -*- coding: utf-8 -*- import bpy import mathutils from mmd_tools.core.shader import _NodeGroupUtils def __switchToCyclesRenderEngine(): if bpy.context.scene.render.engine != 'CYCLES': bpy.context.scene.render.engine = 'CYCLES' def __exposeNodeTreeInput(in_socket, name, default_value, node_input, shader)...
""" MIT License Copyright (c) 2020 <NAME> 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, distri...
# PARSER - last updated for NodeBox 1.9.2 # Author: <NAME> <<EMAIL>> # See LICENSE.txt for details. # The part-of-speech-tagger was adopted by <NAME> from <NAME>: # http://jasonwiener.wordpress.com/category/nlp/ # Based on Brill's lexicon. # The chunker relies on NLTK from the University of Pennsylvania: # http://nltk...
#!/usr/bin/env python # coding: utf-8 # In[1]: import csv import numpy as np import math import torch import scipy.io as sio #Settings edge_life = True edge_life_window = 10 no_diag = 20 dataset = 'AMLSim' make_symmetric = True print(dataset) def print_tensor(A, str): print('------------------------') ...
import cv2 import keras from keras.models import Model import pprint import sys import os import numpy as np from PIL import Image import imageio import itertools as it pp = pprint.PrettyPrinter(depth=6) #from tensorflow.python.client import device_lib #print(device_lib.list_local_devices()) import serial # conda inst...
import copy import functools import typing import numpy as np import dace from dace import SDFGState, SDFG, dtypes from dace.sdfg import nodes, propagation from dace.transformation.dataflow import MapExpansion, MapCollapse from daceml.onnx.forward_implementation_abc import ONNXForward from daceml.onnx.nodes.onnx_op ...
u""" This module provides support for managing PDF colorspaces and colors. Color spaces in PDF are organized as two factory functions: 1. `COLOR SPACE FAMILIES` create `COLOR SPACES` based on certain parameters 2. `COLOR SPACES` create `COLORS` based on certain numerical values minecart's approach to handling these ...
import re from collections import defaultdict import subprocess import time from typing import Dict, Optional, Tuple from google.oauth2 import service_account # type: ignore import googleapiclient.discovery # type: ignore import logging import yaml import os from pathlib import Path import asyncio __all__ = ["get_no...
# Author: <NAME> <<EMAIL>> from inspect import getfullargspec import re from .. import testnd from .._exceptions import DefinitionError from .._io.fiff import find_mne_channel_types from .._utils.parse import find_variables from .definitions import Definition from .variable_def import Variables, GroupVar __test__ = ...
""" Copyright 2017 刘士 Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed...
from math import factorial import apportion import utils import voting from voting import * from apportion import * from utils import PreferenceCreator from tabulate import tabulate from itertools import permutations import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm import logging import multipr...
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from future import standard_library standard_library.install_aliases() from builtins import range from builtins import * from builtins import object...
# # Copyright (c) nexB Inc. and others. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. # See https://github.com/nexB/debian-inspector for support or download. # See https://aboutcode.org for more information about nexB OSS projects. # ...
# -*- coding: utf-8 -*- import os import unicodedata import xbmc import xbmcaddon import xbmcvfs import xbmcgui ADDON = xbmcaddon.Addon(id='service.tvtunes') ADDON_ID = ADDON.getAddonInfo('id') # Common logging module def log(txt, debug_logging_enabled=True, loglevel=xbmc.LOGDEBUG): if ((ADDON.getSetting("logEna...
__author__ = "<NAME>" import os import sys import pygame import random from pygame import * from time import sleep pygame.mixer.pre_init(44100, -16, 2, 2048) # fix audio delay pygame.init() scr_size = (width, height) = (600, 150) FPS = 60 gravity = 0.6 black = (0, 0, 0) white = (255, 255, 255) background_col =...
from __future__ import absolute_import, division, print_function import collections import re import six import tensorflow as tf import transformers from bert_multitask_learning.params import BaseParams from .utils import (get_embedding_table_from_model, load_transformer_model) LOGGER = tf.get_...
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from tqdm.auto import tqdm from sklearn.preprocessing import LabelEncoder, OneHotEncoder from sklearn.model_selection import KFold, StratifiedKFold, GroupKFold from sklearn.metrics import roc_auc_score import lightgbm as lgb fr...
from __future__ import absolute_import from __future__ import print_function import os import os.path import sys import time import random from six.moves import urllib import marshal import struct import time import six.moves.cPickle as pickle import gzip import zlib import six.moves.queue import heapq import uuid impo...
from builtins import chr from builtins import str from builtins import zip from builtins import object from collections import namedtuple,OrderedDict import re import sys from inspect import isgeneratorfunction,getargspec import csv from io import StringIO from datetime import datetime import json def print_error(err_...
from serialflash import SerialFlash #SerialFlash base class class _Gen25FlashDevice(SerialFlash): """Generic flash device implementation. Most SPI flash devices share commands and parameters. Those devices generally contains '25' in their reference. However, there are virtually no '25' devic...
#!/usr/bin/python3 # Usage: # ./launcher.py # ./launcher.py --mode download --dotmc_folder . --version 1.17.1 # ./launcher.py --mode launch --dotmc_folder . --version 1.17.1 --gamedir gamedir # java @launch_argfile.txt from absl import app from absl import flags from pathlib import Path import httplib2 import json imp...
# -*- coding: utf-8 -*- # Copyright (C) 2012-2016 MUJIN Inc """ Planning client """ # system imports import threading import weakref import os import time # mujin imports from . import APIServerError, GetMonotonicTime from . import controllerclientbase, zmqclient from . import zmq # logging import logging log = logg...
import cv2 import math import numpy as np import skimage.morphology as skmorph import matplotlib.pyplot as plt import matplotlib.patches as mpatche from skimage.measure import regionprops, label from skimage.color import label2rgb from skimage.morphology.selem import ball from read_input import read_input from skimage....
from datetime import datetime import pandas as pd import trafaret as t from ..utils import encode_utf8_if_py2, get_id_from_response from .api_object import APIObject int_float_string = (t.Type(int) | t.Type(float) | t.String(allow_blank=True)) prediction_values_trafaret = t.Dict({ t.Key('label'): int_float_stri...
""" This script handles the training process. """ import argparse import math import time import random import numpy as np import os import json import subprocess from tqdm import tqdm import torch import torch.nn as nn from torch.utils.data import DataLoader from src.rtransformer.recursive_caption_dataset import \ ...
import sys import argparse import math import cv2 import pdb import os from os import listdir from os.path import isfile, isdir, join import random import numpy as np small_ = 1e-100 Ufunction = [None, (lambda x: np.abs(x) ** 3), (lambda x: x ** 2 * np.where(x < small_, 0, np.log(x ** 2))), (lambda x: np.abs(...
#调用数学计算模块 import math #物性参数计算函数 def tgetVolum1(t): waterVolum = 2e-12 * t**3 + 3e-9 * t**2 - 2e-7 * t + 0.001 return waterVolum def tgetVolum2(t): gasVolumn = -1e-5 * t**3 + 0.0041 * t**2 - 0.573 * t + 27.922 return gasolumn def tgetHan1(t): waterHan = 1e-5 * t**3 - 0.0029 * t**2 + 4.4...
#! /usr/bin/env python # -*- coding:utf8 -*- # # import_msh_file.py # # This file is part of pyplanes, a software distributed under the MIT license. # For any question, please contact one of the authors cited below. # # Copyright (c) 2020 # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # # Permission is her...
import sys, os, glob, time, pdb, cv2 import numpy as np from tqdm import tqdm import cv2 import matplotlib.pyplot as plt import shutil import random import string import config as cfg from PIL import ImageFont, ImageDraw, Image def q(text = ''): print(f'>{text}<') sys.exit() data_dir = cfg.data_dir train_d...
''' MIT License Copyright (c) 2019 <NAME> 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, distri...
import os import pydart2 as pydart import numpy as np from math import exp, pi, log from PyCommon.modules.Math import mmMath as mm from random import randrange, random import gym import gym.spaces from gym.utils import seeding import PyCommon.modules.Resource.ysMotionLoader as yf from itertools import count import to...
import sys import math import random import copy import shape # Blokus Board class Board: # '_' represents empty square # board size: (row: nrow, col: ncol) def __init__(self, nrow, ncol): self.nrow = nrow # total rows self.ncol = ncol # total columns self.state = [['_'] * ncol for i in rang...
import os from .llcmodel import BaseLLCModel from . import stores def _requires_pleiades(func): def wrapper(*args, **kwargs): # is there a better choice test_path = '/home6/dmenemen' if not os.path.exists(test_path): raise OSError("Can't find %s. We must not be on Pleiades." %...
"""Constants used in Noisemaker""" from enum import Enum class DistanceMetric(Enum): """ Specify the distance metric used in various operations, such as Voronoi cells, derivatives, and sobel operators. """ none = 0 # These require absolute inputs euclidean = 1 manhattan = 2 chebyshe...
# -*- coding: utf-8 -*- # Copyright (c) 2010 <NAME> # Copyright (c) 2011-2015 <NAME> # # 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 ri...
import datetime import random import nextcord popular_words = open("dict-popular.txt").read().splitlines() all_words = set(word.strip() for word in open("dict-sowpods.txt")) EMOJI_CODES = { "green": { "a": "<:1f1e6:938280353527906325>", "b": "<:1f1e7:938280353515315242>", "c": "<:1f1e8:93...
from tensorflow.python.platform import flags from tensorflow.contrib.data.python.ops import batching, threadpool import tensorflow as tf import json from torch.utils.data import Dataset import pickle import os.path as osp import os import numpy as np import time from scipy.misc import imread, imresize from skimage.colo...
from credo.errors import BadSamlProvider, CredoError, SamlNotAuthorized from credo.asker import ask_user_for_half_life from credo.cred_types.saml import SamlRole from boto.iam.connection import IAMConnection from boto.sts.connection import STSConnection from boto.sts.credentials import AssumedRole from datetime import...
# coding=utf-8 """Loader for datasets.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import math import os from absl import flags from ieg.dataset_utils.utils import cifar_process from ieg.dataset_utils.utils import imagenet_preprocess_image import nu...
from torch import nn import torch.nn.functional as F import torch from models_trajGRU.utils import make_layers import numpy as np #from src_rev_bilinear.rev_bilinear_interp import RevBilinear #from nearest_neighbor_interp import nearest_neighbor_interp,nearest_neighbor_interp_kd,nearest_neighbor_interp_fe,nearest_nei...
import asyncio import http.server import json from urllib.parse import urlparse, unquote from pymongo import MongoClient from flask import Flask, request from flask_cors import CORS, cross_origin from ACC_Backend_Utils import get_date_today from ACC_Credentials import MONGO_LINK, DISCORD_BOT_LINK from Standings import ...
# # 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 # ...
""" @package mi.instrument.seabird.driver @file mi/instrument/seabird/driver.py @author <NAME> @brief Base class for seabird instruments Release notes: None. """ __author__ = '<NAME>' __license__ = 'Apache 2.0' import re from mi.core.log import get_logger, get_logging_metaclass log = get_logger() from mi.core.ins...
import argparse parser = argparse.ArgumentParser(description='Tune and train a model') # Use multiprocessing to call get_data in parallel parser.add_argument('--pool-data-acquisition', '-mpdata', action='store_true') # Turns out Tensorflow doesn't play well with multiprocessing; for now, phenotypes should only be leng...
from tkinter import * from tkinter import ttk import tkinter as tk import BlackboardCrawler import inspect class Application(Frame): debug = False def initialize(self): self.login_button = Button(self) self.login_button['text'] = "Login" self.login_button['command'] = self.create_logi...
""" Relative entropy policy model search (REMPS) Idea: use REMPS to find the distribution p(s,a,s') containing both policy and transition model. Then matches the distributions minimizing the KL between the p and the induced distribution from \pi and \p_\omega Follows the rllab implementation """ from enum import Enum f...
#!/usr/bin/python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Convert SVN based DEPS into .DEPS.git for use with NewGit.""" import collections from cStringIO import StringIO import json import ...
import os from os.path import expanduser import vcf import collections from .dictionaries import ftp_dic, pop_sex, pop_samples from django.http import HttpResponse from Bio import SeqIO from .models import Document, Vcf from django.core.files import File import subprocess from pytera.settings import BASE_DIR ...
import os import glob import traceback import collections import math import copy import json import random import numpy as np from tqdm import tqdm import torch import cv2 from torch.utils.data import Dataset from . import splitter from . import data_parser from cexp.cexp import CEXP from cexp.env.scenario_ident...
import torch import torch.nn.functional as F from torch.optim.optimizer import Optimizer class EKFAC(Optimizer): def __init__(self, net, eps, sua=False, ra=False, update_freq=1, alpha=.75): """ EKFAC Preconditionner for Linear and Conv2d layers. Computes the EKFAC of the second...
#! /usr/bin/env python """ configFileParser.py =================== Usage: configFileParser.py [--debug] ENV PHASE FILE configFileParser.py (-h | --help | -v | --version) Arguments: ENV Environment name in configuration file PHASE Workflow phase to use: atlas-based-reference, subject-templ...
import os import sys import numpy as np def read_prt_heavy_atoms(fname_prt, box, fout): """ fname_prt : string, file name containing coordinates of a protein fout: output file return: numpy.array([x,y,z]) """ l_pdb = open(fname_prt, 'r').readlines() prt_min = box prt_max = -box ...
from astropy.wcs import WCS from astropy.table import Table from astropy import units as u from astropy.coordinates import SkyCoord import numpy as np import os.path import pytest from . import assert_widget_image, wait_for_test, DATA from ..conftest import RUNNING_ON_CI, QT_INSTALLED # noqa from ..core import BaseWW...
#!/usr/bin/env python # -*- coding: utf-8 -*- '''This module contains functions to extract various bits of information from FITS files related to their quality, e.g. header keys related to the environment, image background levels, etc. ''' ############# ## LOGGING ## ############# import logging from fitsbits impor...
""" This is the main configuration file. It contains default global variables (as in they are read in by the relevant modules) that define the parameters of the whole telescope system. These parameters can be redefined at the beginning of the example module the user is running """ import numpy as np import proper imp...
import numpy as np from astropy.io import fits import asdf from .function import filconv, calc_Dn4 def get_param(self, res, fitc, tcalc=1., burnin=-1): ''' Purpose ------- Write a parameter file. ''' print('##########################') print('### Writing parameters ###') print('######...
#!/usr/bin/env python ''' Classes and functions for dealing with processing items with a pipeline where the processing is optionally done in parallel using multiprocessing. ''' # NOTES: a processor is something that processes items by running those items through a # pipeline. Currently there are two ways for how this ...
""" Copyright (c) 2018 Intel Corporation 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...
# -*- coding:utf-8 -*- import os,sys,inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys.path.insert(0,currentdir) import math import random import time import logging import pickle import torch import numpy as np from math import ce...
import time # import logging import json import pickle import nltk import numpy as np from tools.logger import * import torch import dgl import copy from collections import Counter import nltk from nltk.corpus import stopwords FILTERWORD = stopwords.words('english') punctuations = [',', '.', ':', ';', '?', '(', ')', '...
import warnings import random from copy import deepcopy import math import numpy as np from sklearn.linear_model import ElasticNetCV from sklearn.model_selection import TimeSeriesSplit, KFold from sklearn.preprocessing import StandardScaler from scipy.stats import pearsonr from scipy.stats import skew from fastgp.u...
#!/usr/bin/env python # coding: utf-8 # Prerequisite: # 1. the database contains the whole week's data of last week until last Sunday. # e.g. if today is 9/26/18 Wed, it must contains the data until 9/23/18 Sunday # # The program uses ISO Calendar: # 1. first day and last day of the week are respectively Monday(1) ...
# Copyright 2015 Rackspace 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 agr...
#!/usr/bin/env python3 # -*-coding:utf-8 -*- # ============================================================================= """ @Author : <NAME> @File : metric_qolo_perf.py @Date created : 2021/11/23 @Maintainer : <NAME> @Email : <EMAIL> """ # =====================================...
import sys import pickle import numpy as np import pandas as pd import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import logging import csv import os from datetime import datetime from torch.autograd import Variable from sklearn.metrics import roc_auc_score, precision_scor...
# jupyter 部分帮助方法 import os import QUANTAXIS as QA import numpy as np import pandas as pd import pyfolio as pf import sklearn.linear_model import talib from QUANTAXIS.QAUtil.QADate import QA_util_datetime_to_strdate as date_to_str from pandas import DataFrame from pyecharts import Line from sklearn.model_selection impo...
from __future__ import annotations import contextlib import json import os import shutil import subprocess import time from dataclasses import dataclass from enum import Enum from tempfile import TemporaryDirectory from typing import Callable, Dict, List, Optional, Tuple, Union, Any, Generator from pathlib import Path...
#!/usr/bin/env python # # Copyright (c) 2017-2019 Wikimedia Foundation, Inc. # This script offboards a user from LDAP. In the default case a user can # retain standard Nova group memberships and only loses access to # privileged groups. If the user signs a volunteer NDA, access to privileged # groups is retained as we...
import argparse import baselineUtils import torch import torch.utils.data import torch.nn as nn import torch.nn.functional as F import os import time from transformer.batch import subsequent_mask from torch.optim import Adam,SGD,RMSprop,Adagrad from transformer.noam_opt import NoamOpt import numpy as np import scipy.io...
#!/usr/bin/env python3 import math from enum import Enum # definice barev class Colors(Enum): red = 1 black = 2 class Node: """Trida Node slouzi k reprezentaci uzlu ve strome. Atributy: key klic daneho uzlu color muze nabyvat hodnoty 'red' a 'black' parent reference n...
import numpy as np import warnings with warnings.catch_warnings(): warnings.filterwarnings("ignore",category=DeprecationWarning) from nilearn.input_data import NiftiSpheresMasker from nilearn.input_data import NiftiLabelsMasker from nilearn.input_data import NiftiMapsMasker from nilearn.image import...
import os, sys sys.path.insert(0, '../../') sys.path.insert(0, '../') sys.path.insert(0, '.') import numpy as np from PIL import Image import trimesh import glob import torch from collections import defaultdict # amass related libs from human_body_prior.tools.omni_tools import makepath, log2file from human_body_prio...
""" Training or finetuning a LSR model on DocRED dataset. """ import csv import os import json import torch import logging import argparse import numpy as np from sklearn import metrics from torch.utils.data.dataloader import DataLoader, default_collate from transformers import set_seed from .config import LsrConfig f...
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\postures\transition.py # Compiled at: 2020-08-06 07:31:50 # Size of source mod 2**32: 31003 bytes im...
# imports import operator import os import csv import pyexcel import pickle import yaml import pprint import json import re import numpy as np import itertools as itt from pycompomics.pycompomics import SearchGUI, PeptideShaker from pyslurm_computecanada.pyslurm_computecanada.pyslurm import Slurm from...
#Read a file containing a sudoku #File shall be a python list def readSudoku(filename): fd = open(filename) l = fd.readlines() fd.close() return eval(l[0]) def inputSudoku(): print("type the grid as a python list of list") grid = eval(input()) return grid #Creates a standard grid coint...
# -*- coding: utf-8 -*- # FLEDGE_BEGIN # See: http://fledge-iot.readthedocs.io/ # FLEDGE_END import json import logging import datetime import uuid from aiohttp import web from fledge.common import logger from fledge.common.configuration_manager import ConfigurationManager from fledge.common.storage_client.exceptio...
import base64 import hashlib import logging import os import threading import time import types import uuid from collections import namedtuple from kazoo import security from kazoo.client import KazooClient from kazoo.exceptions import NoNodeError from kazoo.exceptions import KazooException from k3confloader import co...
from itertools import count import logging import math import pickle from pickle import PickleError import sys import numpy as np import westpa import westpa.core.binning from westpa.core.binning import RectilinearBinMapper from westpa.core.data_manager import weight_dtype from westpa.core.extloader import get_object...
from soccminer.java_ast_parsing import SourceFiles from soccminer.environment import Platform import time import gc import traceback import subprocess import os import logging import requests import shutil from datetime import datetime class TrackProgress: @staticmethod def fetch_approx_mining_eta(files, proc...
import torch import torch.nn as nn import torch.nn.functional as F import logging from typing import Iterator, Dict import time import json from Modularity.nn import sequence_mask, get_exact_match from Modularity.dataset import ModularDataset device = torch.device("cuda" if torch.cuda.is_available() else "cpu") logge...
import os import time import numpy as np from . import coarse_psd, coarse_psd_matrix INTERFEROMETERS = dict( GW190521=["H1", "L1", "V1"], GW170814=["H1", "L1", "V1"], GW150914=["H1", "L1"], ) def create_parser(): import argparse parser = argparse.ArgumentParser(description="Run analyses for ar...
import argparse import csv import io import logging import os import random import sys import zipfile from pathlib import Path import numpy as np import requests import torch from sklearn.metrics import f1_score, precision_score, recall_score from tabulate import tabulate from torch.utils.data import (DataLoader, Data...
from json import dumps, load import dash from dash.dependencies import Input, Output from dash import html # H1, # H3, # H4, # H5, # A, # Br, # Button, # Div, # Iframe, # Label, # Table, # Th, # Title, # Tr, # ) from dash import dcc # todo update imports dash_...
# Copyright 2022 Google # # 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, soft...
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_str, ) from ..utils import ( js_to_json, smuggle_url, try_get, orderedSet, strip_or_none, ExtractorError, ) class CBCIE(InfoExtractor): IE_NAME = 'cbc.ca'...
import functools import itertools import re def parse_int(name, value, loose=False): if not loose and value.startswith('0') and value != '0': raise ValueError('%s has leading zeros' % name) value = int(value) if value < 0: raise ValueError('%s is not a natural number' % name) return va...
#-*- coding: utf-8 -*- #Vstream https://github.com/Kodi-vStream/venom-xbmc-addons from resources.lib.gui.hoster import cHosterGui from resources.lib.gui.gui import cGui from resources.lib.handler.inputParameterHandler import cInputParameterHandler from resources.lib.handler.outputParameterHandler import cOutputParamete...
""" The script is used to bootstrap a docker container with Plex and with all the libraries required for testing. """ import argparse import os from glob import glob from shutil import copyfile, rmtree from subprocess import call from time import time, sleep from uuid import uuid4 from tqdm import tqdm import plexapi...
from enum import Enum from typing import Any, Callable, Dict, List, Optional, Tuple, Union import numpy as np import gym from gym import spaces from gym_unity.envs import UnityToGymWrapper, UnityGymException, ActionFlattener from mlagents_envs import logging_util from mlagents_envs.base_env import ActionTuple, BaseEnv...
import copy import os import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns import tensorflow as tf from tensorflow.core.util import event_pb2 import os.path as osp import tensorboard as tb from tensorboard.backend.event_processing import event_accumulator import json sns.set(st...
##################################################################################### # Evaluation Code for Error Correction Benchmarking # zar-lab ucla # 4/20/18 # supervisor: <NAME> # author: <NAME> """ Functions Contained: msa - performs a multiple sequence alignment between the true, raw, and ec read ...
#!/usr/bin/env python #=============================================================================== # Copyright (c) 2014 Geoscience Australia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ar...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function from __future__ import division import tensorflow as tf import numpy as np from scipy import stats, misc, special from tests.distributions import utils from zhusuan.distributions.multivariate im...