text
stringlengths
3.07k
22.1k
import json import re from django.conf import settings from django.http import HttpResponse, JsonResponse from django.views.generic import View from inflection import camelize, pluralize, singularize from rest_framework import viewsets from hooks import MockServerHookParser from json_api_builder import ( JsonAPIE...
''' Copy number variation (CNV) correction module Author: <NAME>, <NAME> ''' import numpy as np import scipy def read_CNVdata(CN_file,cell_list): ''' reads a file contaning a matrix of copy number data and filters out copy number data for inputted set of desired cell lines ''' ndarr = np.genfromt...
#!/usr/bin/env python # Copyright 2018 Adobe. All rights reserved. """ Helper script for diff'ing files. Used as part of the integration tests. """ from __future__ import print_function, division, absolute_import import argparse import difflib import filecmp import logging import os import re import sys from fontT...
#! /usr/bin/Python from gensim.models.keyedvectors import KeyedVectors from scipy import spatial from numpy import linalg import argparse import os DEFAULT_OUTPUT_PATH = '/home/mst3/deeplearning/goethe/eval-results' def output_category(count, sums): str = '' if count == 0: count = 1 for i in range(0,...
from inspect import isclass from itertools import chain from typing import Type, Optional, Union, Any from pydantic import BaseModel, create_model, validate_model, Field, ConfigError from pydantic.main import ModelMetaclass import django from django.contrib.contenttypes.fields import GenericRelation from django.utils...
""" Support for generating Examples from Documents. """ import sys import numpy as np from collections import OrderedDict from itertools import cycle from copy import deepcopy class Example: def __init__(self, tokens, token_ids, label_ids, input_weights, segment_ids): self.tokens = toke...
#!/usr/bin/env python """nutanix_vm_vdi - Uses Nutanix REST API to get summary of performance stats. Requires requests pip install requests """ import json import time import operator import requests import logging.config from credentials import NUTANIX_USER # Login info now stored in credentials.py from credentials...
#!/usr/bin/env python """ Since one might not only be interested in the individual (hyper-)parameters of a bayesloop study, but also in arbitrary arithmetic combinations of one or more (hyper-)parameters, a parser is needed to compute probability values or distributions for those derived parameters. """ from __future_...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright © 2016, Okta, Inc. import flask from flask import Flask from flask import render_template from flask import request from flask import url_for import re import json import boto3 app = Flask(__name__) config = None with open('.config.json') as config_file: c...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache 2.0 License. import argparse import getpass import os import time import logging import multiprocessing import e2e_args from random import seed import infra.ccf import infra.proc import infra.jsonrpc import infra.remote import json ...
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
import keras.backend as kb import skimage.io as io import skimage.transform as transform import glob import numpy as np # import matplotlib # matplotlib.use('Agg') # to save plots as images import matplotlib.pyplot as plt import tensorflow as tf import math import nibabel as nib MRI_FLAIR_LOAD_PATH = './data/HGG/**/*...
#!/usr/bin/python3 ################################################################################ # Copyright 2020-2021 Advanced Micro Devices, 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 "Softwa...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.forms import Select from django.forms.models import modelform_factory from django.test import TestCase from django.utils import translation from django.utils.encoding import force_text from django_countries import fields, countries from django...
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) from math import log10, floor from ..units import html_of_unit, latex_of_unit, unicode_of_unit, to_unitless, unit_of from ..util.parsing import _unicode_sup def roman(num): """ Examples -------- >>> roman(4) ...
import os import time import json import logging import requests import schedule import configparser from epd import base from datetime import datetime as dt, timezone # Static information # Windows vs unix slash = '\\' if os.name == 'nt' else '/' now = dt.now() dt_string = now.strftime("%m_%d_%y_%I_%M_%S") logging....
from mininet.log import lg, LEVELS, info, debug, warn, error, output from mininet.lxc_container import (LxcNode) from mininet.dutil import _info class LxcController ( LxcNode ): def __init__( self, name, loop, master, admin_ip, inNamespace=False, command='controller', ...
import logging import numpy as np import openml import openmlcontrib import openmldefaults import os import pickle import sklearn.model_selection import statistics import typing from openmldefaults.models.defaults_generator_interface import DefaultsGenerator AGGREGATES = { 'median': statistics.median, 'min':...
# Copyright 2019 <NAME> # # 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, softw...
""" summary: A widget that can show tabular data either as a simple table, or with a tree-like structure. description: By adding the necessary bits to a ida_kernwin.Choose subclass, IDA can show the otherwise tabular data, in a tree-like fashion. The important bits to enable this are: * ida_dirtree.dirsp...
import sys from typing import ( Any, Awaitable, Callable, Dict, Generic, Iterable, Iterator, Mapping, Optional, Tuple, Type, TypeVar, Union, overload, ) from typing_extensions import Literal, final # ModuleType is exported from this module, but for circular impor...
# Copyright 2015 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Test the path_util module.""" from __future__ import print_function import itertools import mock import os import tempfile from chromite.lib import ...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Fri Dec 15 09:57:21 2017 @author: dalonlobo """ from __future__ import absolute_import, division, print_function import os import os.path as ospath import sys import subprocess import argparse import pandas as pd import scipy.io.wavfile as wav from timeit...
import pandas as pd import sys ### COMMON TO HYPERGRAPH AND SIMPLE GRAPH def makeDefs(DEFS, opts={}): defs = {key: opts[key] if key in opts else DEFS[key] for key in DEFS} base_skip = opts['SKIP'] if 'SKIP' in opts else defs['SKIP'] skip = [x for x in base_skip] #copy defs['SKIP'] = skip for ke...
from serpent.machine_learning.reinforcement_learning.agent import Agent from serpent.game_frame import GameFrame from serpent.game_frame_buffer import GameFrameBuffer from serpent.enums import InputControlTypes from serpent.logger import Loggers from serpent.utilities import SerpentError import os import enum impo...
#!/usr/bin/env python3.7 import argparse import logging import logging.config import os import glob import re from bfg_analysis import alignment from bfg_analysis import read_counts # Author: <NAME> # email: <EMAIL> # set global variable ################################### # Padding sequences used # Padding sequenc...
# Copyright 2015 Bloomberg Finance L.P. # # 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...
#!/usr/bin/env python import math import sys import struct from std_msgs.msg import Int8, Bool, Int16, Float32, Int32 from kobot.msg import motor, pid_parameters from smbus2 import SMBus import rospy class kobotMotor(object): # kobotMotor.varialbe_dict = ("=f":float,"=l":long,"=h":short) varialbe_dict = { ...
import math as math import numpy as np import re import pandas as pd import spimcube.functions as fct def initialization(path, basename): """Return a dictionary with: NStepsX, NStepsY, Npixel, Matrix, tab_of_lambda, Xstep, Ystep, Xrange, Yrange.""" # create the complete file name with extension ...
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
import random import numpy as np import torch def seed_worker(worker_id): worker_seed = torch.initial_seed() % 2 ** 32 np.random.seed(worker_seed) random.seed(worker_seed) import warnings # deepul borrowed from https://github.com/rll/deepul import deepul.pytorch_util as ptu warnings.filterwarnings("...
# -*- coding: utf-8 -*- """ make colormap image =================== """ # import standard libraries import os # import third-party libraries import numpy as np from scipy import interpolate from colour import RGB_luminance, RGB_COLOURSPACES, RGB_to_RGB from colour.models import sRGB_COLOURSPACE from colour.colorimet...
from flask import Flask, render_template, request,session,redirect,url_for, flash, Response import os from markupsafe import escape from flask_sqlalchemy import SQLAlchemy from sqlalchemy import desc, ForeignKey, update from datetime import datetime app = Flask(__name__) app.secret_key = b'_5#y2L"F4Q8z\n\xec]/...
import os import sys import numpy as np import time import torch import utils import glob import random import logging import argparse import torch.nn as nn import genotypes import torch.utils import torchvision.datasets as dset import torchvision.transforms as transforms import torch.backends.cudnn as cudnn from torc...
import os import numpy as np import pandas as pd import pytest import yaml from xirt import predictor as xr from xirt import xirtnet as xnet fixtures_loc = os.path.join(os.path.dirname(__file__), 'fixtures') def test_preprocessing_crosslinks(): psms_df = pd.read_csv(os.path.join(fixtures_loc, "DSS_xisearch_fdr...
import argparse import numpy as np import os import pickle import random import sys import tensorflow as tf import tqdm from copy import deepcopy def get_images(path, nb_samples=None, shuffle=True, multi_path=False): if nb_samples is not None: sampler = lambda x: np.random.choice(x, nb_samples) else: ...
"""Util methods""" import string import random import re from datetime import datetime from hashlib import blake2b as blake import requests from typing import List, Tuple, Set, Union, Dict from telegram import InlineKeyboardButton, InlineKeyboardMarkup, ReplyKeyboardMarkup ENCODE_KEY = string.digits + string.ascii_let...
# -*- coding: utf-8 -*- # search - a tiny little search utility bot for discord. # All original work by taciturasa, with some code by ry00001. # Used and modified with permission. # See LICENSE for license information. '''Main File''' import discord from discord.ext import commands import traceback import json impor...
import logging from django.conf import settings from django.db.models import Subquery, OuterRef, Sum from django.db.models.expressions import Value from django.utils.translation import gettext_lazy as _ from mapentity.views import (MapEntityLayer, MapEntityList, MapEntityJsonList, MapEntityFormat, MapEntityViewSet, ...
#!/usr/bin/env python import os import sys import yaml import logging import optparse import pyfiglet import uuid import time import kraken.kubernetes.client as kubecli import kraken.invoke.command as runcommand import kraken.litmus.common_litmus as common_litmus import kraken.time_actions.common_time_functions as tim...
# ---------------------------------------------------------------------------- """ General Utilities """ # ----------------------------------------------------------------------------- import os # ----------------------------------------------------------------------------- bad_argc = 'bad number of arguments\n' inv...
import numpy as np import numba mH = 1.673534e-27 mu = 2.2 # mean molar mass in disk kB = 1.380649e-23 #boltzmann constant sb = 5.6704e-8 G = 6.6738 * 10**-11 #gravitational constant Ms = 1.9886 * 10**30 #solar mass cor_idx = 0 calc_idx = 1 for_idx = 2 cor_ratio = .1 calc_ratio = .1 for_ratio = .8 @numba.njit def ...
# Copyright 2017 The dm_control Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
#!/usr/bin/env python # This software is Copyright (c) 2017, <NAME> <<EMAIL> at <EMAIL>> # and it is hereby released under GPL v2 license. # # Major parts are borrowed from the "btcrecover" program which is, # Copyright (C) 2014-2016 <NAME> and under GPL v2. # # See https://github.com/gurnec/btcrecover for details. # ...
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # # Copyright 2020, Battelle Memorial 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...
def test_multi_setter_test(get_contract_with_gas_estimation): multi_setter_test = """ dog: int128[3] bar: int128[3][3] @public def foo() -> int128: self.dog = [1, 2, 3] return(self.dog[0] + self.dog[1] * 10 + self.dog[2] * 100) @public def fop() -> int128: self.bar[0] = [1, 2, 3] self.bar[1] = [4, ...
import sys sys.path.append("/home/luisals/DeepHalos") from dlhalos_code import CNN from dlhalos_code import loss_functions as lf import tensorflow.keras.callbacks as callbacks import tensorflow.keras as keras from tensorflow.keras.callbacks import CSVLogger from tensorflow.keras import regularizers import dlhalos_code....
""" A parser for the Intrepid's language """ from intrepyd.context import Context class ParseError(Exception): """ Encapsulates a parsing error """ def __init__(self, message): super().__init__(message) self._message = message def message(self): """ Retrieves the e...
from glob import glob import os from setuptools import setup, Extension import cpuinfo import sys from distutils.command.build_ext import build_ext from distutils.errors import CCompilerError, DistutilsExecError, \ DistutilsPlatformError try: from Cython.Build import cythonize except ImportError: have_cyth...
# -*- coding: utf-8 -*- """ Tools for FDSN standards Created on Wed Sep 30 11:47:01 2020 :author: <NAME> :license: MIT """ import logging logger = logging.getLogger(__name__) period_code_dict = { "F": {"min": 1000, "max": 5000}, "G": {"min": 1000, "max": 5000}, "D": {"min": 250, "max": 1000}, "C...
import socket from Utils import * import imagezmq import cv2 from PyQt5 import QtGui, QtWidgets import math class Monitor(Thread): def __init__(self): self.file = "monitor.log" self.len = 10 Thread.__init__(self) self.start_time = time.time() # create file if ...
import datetime import logging import sqlite3 from typing import Any, Iterable, Optional, Tuple from eth_keys import keys from eth_typing import Hash32, NodeID from eth_utils import to_tuple from ddht.v5_1.alexandria.abc import AdvertisementDatabaseAPI from ddht.v5_1.alexandria.payloads import Advertisement from ddht...
import pickle from scipy.spatial import distance as dist import time import random import os import copy import argparse import cv2 import numpy as np from apriltag_images import TAG36h11,TAG41h12, AprilTagImages from apriltag_generator import AprilTagGenerator from backgound_overlayer import backgroundOverlayer impor...
import numpy as np import os from urllib.request import urlretrieve import pickle import collections import math import random import tensorflow as tf import zipfile from matplotlib import pylab from sklearn.manifold import TSNE url = 'http://mattmahoney.net/dc/' def maybe_download(filename, expected_bytes): """D...
# System documented in https://zulip.readthedocs.io/en/latest/subsystems/logging.html from django.utils.timezone import now as timezone_now from django.utils.timezone import utc as timezone_utc import hashlib import logging import re import traceback from typing import Optional from datetime import datetime, timedelt...
import numpy as np import pandas as pd from timeit import default_timer as timer from scipy.optimize import minimize from sklearn.metrics import mean_squared_error as mse def get_time_series(df): """ Get a list of all time series of the given data. :param df: Dataframe containing the time series :return...
import json import os import re from os.path import relpath from time import sleep from deployment_helpers.aws.iam import create_s3_access_credentials from deployment_helpers.aws.rds import get_full_db_credentials from deployment_helpers.aws.s3 import create_data_bucket from deployment_helpers.constants impor...
import cv2 import numpy as np import math import pyautogui import sys import keyboard from concurrent import futures import logging import ctypes from ctypes.wintypes import HWND, DWORD, RECT img_path = "./img/window.png" args = sys.argv def GetWindowRectFromName(TargetWindowTitle): TargetWindowHandle = ctypes.wi...
import multiprocessing, logging import pandas as pd from os import listdir from os.path import isfile, join from pandas import DataFrame from . import load_pointer from ..savers import save_pointer from .. import s3_utils, multiprocessing_utils from .load_s3 import list_bucket_prefix_suffix_s3 logger = logging.getLog...
from _collections import deque, defaultdict from operator import itemgetter as _itemgetter, eq as _eq from keyword import iskeyword as _iskeyword import sys as _sys import heapq as _heapq from itertools import repeat as _repeat, chain as _chain, starmap as _starmap from itertools import imap as _imap try: from thr...
#!/usr/bin/env python3 import tensorflow as tf from tensorflow import keras ##### helper fuctions for constructing layers #### def conv2_layer( filters, kernel_size, activation=None, padding='same', strides=(1, 1), dilation_rate=(1, 1), data_format='channels_last', use_bias=False): # initializer ...
import csv import os import shutil import json import matplotlib from matplotlib import pyplot as plt import numpy as np from queue import PriorityQueue from tqdm import tqdm import torch class CsvLogger: def __init__(self, filepath='./', filename='validate_record.csv', data=None, fieldsnames=['epoch', 'train_loss...
#!/usr/bin/env python3 # Copyright 2020 The Pigweed Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # This script generates jit/MIROpsGenerated.h (list of MIR instructions) # from MIROps.yaml, as well as MIR op definitio...
import logging from typing import List, Tuple, Union, Callable, Dict from mythril.disassembler.disassembly import Disassembly from mythril.laser.ethereum.state.account import Account from mythril.laser.ethereum.state.world_state import WorldState from mythril.laser.ethereum.state.global_state import GlobalState from my...
# -*- coding: utf-8 -*- from __future__ import ( absolute_import, division, print_function, unicode_literals ) from . import ObjectBase from datetime import datetime from .validators import BaseForm from wtforms.fields import StringField, TextAreaField, BooleanField from wtforms.validators import InputRequired, Len...
#!/usr/bin/env python # # Copyright 2015 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. '''Prepares the Google Play services split client libraries before usage by Chrome's build system. We need to preprocess Google Play...
#!/usr/bin/env python3 from collections import UserDict import io import json from pprint import pprint import re import requests import time from urllib.parse import ( parse_qs, urlencode, urlsplit, urlunsplit, ) from zipfile import ZipFile class TeamcityRequestException(Exception): pass class...
"""APIs for creating user-defined element-wise, reduction and analytic functions. """ from __future__ import absolute_import import collections import functools import itertools from typing import Tuple import numpy as np import pandas as pd from pandas.core.groupby import SeriesGroupBy import ibis.client import ib...
# 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 ...
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import math import torch import torch.nn as nn import torch.nn.functional as F from foundations import hparams from lottery.desc import Lotte...
""" ####################### # quket # ####################### mod.py Modified versions of OpenFermionPySCF routines to enable active space calculations. """ # いる? from __future__ import absolute_import #from typing import Dict #from dataclasses import dataclass #import numpy as np #from pyscf import ...
import logging import os import sys import ujson as json import zlib from os import path import pymongo from flask import Flask, request, Response, jsonify import monitoring app = application = Flask("datadoghq") monitoring.monitor_flask(app) handler = logging.StreamHandler(sys.stderr) app.logger.addHandler(handler)...
import os import random from collections import namedtuple import click import numpy as np from IPython import embed from keras.preprocessing.image import ( load_img, img_to_array, flip_axis) # The set of parameters that describes an instance of # (random) augmentation TransformParams = namedtuple( 'Trans...
import numpy as np from sklearn.metrics import f1_score, recall_score, precision_score, accuracy_score, roc_auc_score, multilabel_confusion_matrix from sklearn.model_selection import KFold from sklearn.preprocessing import MultiLabelBinarizer import wisardpkg as wp import time class CrossValidation: def __init__...
#!/usr/bin/env python ''' Launch DTIPrep preprocessing pipeline for tensor-based analysis Usage: dm_proc_dtiprep.py [options] [-t <TAG>]... <study> Arguments: <study> DATMAN style study shortname Options: -s,--session SESSION DATMAN style session ID...
import tensorflow as tf import collections from tensorflow.python.util import nest from tensorflow.contrib.rnn import RNNCell from .dynamic_decode import transpose_batch_time from .greedy_decoder_cell import DecoderOutput class BeamSearchDecoderCellState(collections.namedtuple( "BeamSearchDecoderCellState",...
# Copyright 2021 Huawei Technologies Co., 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 or agreed to...
from typing import Tuple import cv2 import numpy as np from .image_filter import image_filter from .kernels import sharpening_kernel from ..utils.constants import DEFAULT_KERNEL_SIZE from ..utils.types import RangedNumber def convert_to_hsv(image: np.ndarray) -> np.ndarray: """ Converts an image to hsv - Ma...
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
""" Writes the global keyword section of a MESS input file """ import os from mako.template import Template from qcelemental import constants as qcc from varecof_io.writer import util ANG2BOHR = qcc.conversion_factor('angstrom', 'bohr') RAD2DEG = qcc.conversion_factor('radian', 'degree') # OBTAIN THE PATH TO THE DI...
# MIT License # Copyright (c) 2018 the NJUNMT-pytorch authors. # 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, m...
# Copyright 2020 (c) <NAME>. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright (c) 2017-2022 The Molecular Sciences Software Institute, Virginia Tech # # 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 l...
import argparse import os import re from datetime import datetime from os import R_OK, access from os.path import exists, expanduser, isfile, join import argcomplete from argcomplete.completers import ChoicesCompleter from dateutil.parser import parse from dateutil.tz import tzutc from n_utils import _to_str def Co...
import numpy as np from skimage.feature import blob_dog, blob_log, blob_doh from skimage.color import rgb2gray from sklearn.preprocessing import scale ## Blog on LST calculation done using R.[alot of the code below is inspired from this and also the github repo] #1.) https://www.gis-blog.com/calculation-of-land-surfac...
# Copyright 2021 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...
#!/usr/bin/env python from __future__ import print_function from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from future import standard_library standard_library.install_aliases() from builtins import range from builtins import * from j5basic import Decorat...
from collections.abc import Iterable from math import ceil from random import randint, choice import numpy as np from cycler import cycler from matplotlib import pyplot as plt from library import EdgesListGraphOnEdges, EdgesListGraph, AdjacencyMatrix, Graph from library.types import Edge def make_grid(p: float | li...
""" Copyright 2018 Johns Hopkins University (Author: <NAME>) Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) Functions to write and read kaldi files """ import re from enum import Enum class ArchiveType(Enum): """Types of archive: hdf5, Kaldi Ark or packed-audio files.""" H5 = 0 ARK = 1 ...
#!/usr/bin/env python # coding: utf-8 # # PyTorch and Neural Networks # # [YuJa video](https://uci.yuja.com/V/Video?v=4372302&node=14708610&a=6152974&autoplay=1) from lecture # In[1]: from tqdm.std import tqdm, trange from tqdm import notebook notebook.tqdm = tqdm notebook.trange = trange import pandas as pd impo...
import matplotlib.pyplot as plt import matplotlib.lines as lines from matplotlib.axes import Axes from tdstyles.style_css import StyleNotebook from tdstyles.exceptions import NotStyleNotebook, NotAnAxisObject def check_grid_line_dictionary(dictionary): if dictionary.get('colors') is None: dictionary['colo...
################################################################# # # This Software is Open Source. See License: https://github.com/TERENA/met/blob/master/LICENSE.md # Copyright (c) 2012, TERENA All rights reserved. # # This Software is based on MET v1 developed for TERENA by Yaco Sistemas, http://www.yaco.es/ # MET v2...
#!/usr/bin/env python # coding: utf-8 ''' Test action recognition on (1) a video, (2) a folder of images, (3) or web camera. Input: model: model/trained_classifier.pickle Output: result video: output/${video_name}/video.avi result skeleton: output/${video_name}/skeleton_res/XXXXX.txt visualization...
# -*- coding: utf-8 -*- from sympy.physics.quantum import Operator, Dagger from sympy.physics.quantum.qexpr import QExpr from sympy import I, conjugate from sympy import S from sympy import Function, Wild, Mul, Pow from sympy import sympify class CumulantException(Exception): pass """ Cumulant express...
# -*- coding: utf-8 -*- # @Author: <NAME> <valle> # @Date: 10-May-2017 # @Email: <EMAIL> # @Last modified by: valle # @Last modified time: 12-Feb-2018 # @License: Apache license vesion 2.0 from kivy.uix.boxlayout import BoxLayout from kivy.storage.jsonstore import JsonStore from kivy.properties import ObjectPrope...
# -*- coding: utf-8 -*- # 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 o...
import unittest import rpy3.robjects as robjects ri = robjects.rinterface import array import rpy3.rlike.container as rlc rlist = robjects.baseNameSpaceEnv["list"] class RVectorTestCase(unittest.TestCase): def testNew(self): identical = ri.baseNameSpaceEnv["identical"] py_a = array.array('i', [1,...
# Copyright (c) 2010-2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# Copyright 2020 DeepMind Technologies Limited. 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 ...