text
string
""" ========================================= ANALYTICAL RESULTS FOR REALIZED PROCESSES ========================================= """ import numpy as np import scipy from numpy import sqrt, exp, log ################################### # Statistics for realized processes ################################### # when use...
<filename>compute_similarities.py import argparse import os import sys from shutil import rmtree, copyfile import numpy as np import nibabel as nib from scipy.spatial.distance import correlation, dice from pickle import dump from joblib import Parallel, delayed parser = argparse.ArgumentParser('Computes the similarity...
#!/usr/bin/python # -*- coding: utf8 -*- """ Main function of Learning-guided Graph Dual Adversarial Domain Alignment (LG-DADA)framework for predicting a target brain graph from a source brain graph. The original paper can be found in: https://www.sciencedirect.com/science/article/pii/S13618415203...
<filename>dftools/smooth.py from scipy.ndimage import gaussian_filter1d from scipy.interpolate import UnivariateSpline def unispline_to_gausfilter( x, y, w=None, spline_kw={"k": 2}, filter_kw={"sigma": 1}, ): if w is not None: spline_kw["w"] = w s = UnivariateSpline(x, y, **spline_kw) return g...
<gh_stars>0 # -*- coding: utf-8 -*- """ Created on Tue Jun 29 11:01:00 2021 @author: <NAME> This is a function that will be used to automatically generate synthetic topo- graphy from a specified elevation profile. The 'site_file_name' variable must be a csv file containing a column for distance labeled 'Di...
<filename>pyapprox/sympy_utilities.py #!/usr/bin/env python import os, sympy as sp import subprocess def convert_sympy_equations_to_latex(equations,tex_filename,compile_pdf=True): out = r""" \documentclass[]{article} \usepackage{amsmath,amssymb} \begin{document} """ print(len(equations)) #li...
import skimage.feature import skimage.transform import skimage.filters import scipy.interpolate import scipy.ndimage import scipy.spatial import scipy.optimize import numpy as np import pandas import plot class ParticleFinder: def __init__(self, image): """ Class for finding circular particles ...
<gh_stars>1-10 import sys from . import globals import numpy as np import pandas as pd import scipy as sp import logging import json from pathlib import Path import src.globals pypsapath = "C:/dev/py/PyPSA/" if sys.path[0] != pypsapath: sys.path.insert(0, pypsapath) import pypsa from tqdm import tqdm class Sci...
import calendar import numpy as np from pandas import Timestamp from scipy.sparse import csr_matrix, vstack, isspmatrix_csr from tqdm import tqdm def choose_last_day(year_in, month_in): return str(calendar.monthrange(int(year_in), int(month_in))[1]) def year2pandas_latest_date(year_in, month_in): if year_i...
from __future__ import division import numpy as np from sympy import * class ThePablos: def __init__(self, l1=1, l2=1, l3=1, l4=1, r=1e-2, t=1): #Configurar dimensiones self.l = np.array([l1,l2,l3,l4]) self.r = r #Posiciones locales de los centros de masa ...
<reponame>wfreinhart/composite_geometry import numpy as np from scipy.spatial.transform import Rotation class SphereReinforcement(object): """ Example call: SphereReinforcement(radius=5 * 1e-3, lattice=BCCLattice(spacing=12 * 1e-3)) """ # TODO: provide an option for offset def __init__(self, r...
import numpy as np import scipy.linalg as LA import scipy.sparse.linalg as spLA from project.poisson1d import Poisson1D from project.weighted_jacobi import WeightedJacobi # from project.gauss_seidel import GaussSeidel from project.linear_transfer import LinearTransfer from project.mymultigrid import MyMultigrid if _...
<filename>nodes/viewport_definer.py #!/usr/bin/env python3 # ROS imports import roslib; roslib.load_manifest('freemovr_engine') import rospy import freemovr_engine.srv import freemovr_engine.msg import freemovr_engine.display_client as display_client import json import argparse import tempfile, os, sys # Major libra...
from typing import Union import scipy.stats as stats from beartype import beartype from UQpy.distributions.baseclass import DistributionContinuous1D class GeneralizedExtreme(DistributionContinuous1D): @beartype def __init__( self, c: Union[None, float, int], loc: Union[None, float, ...
""" Imports and extends the ``sympy`` library for symbolic mathematics. Contains tools for converting Sympy expressions to Python modules and functions. """ import re from typing import Callable, Optional, Union, Literal from functools import lru_cache import numpy as np import sympy as sp from sympy.utilities.lambdi...
<reponame>ryscet/pySeries # -*- coding: utf-8 -*- """ Created on Wed Jun 8 11:21:35 2016 @author: user """ import sys sys.path.insert(0, '/Users/user/Desktop/repo_for_pyseries/pyseries') import pyseries.LoadingData as loading import pyseries.Preprocessing as prep import pyseries.Analysis as analysis import matplotli...
import numpy as np import sys, csv, os import torch from torch.utils.data import DataLoader from dgl.data.utils import split_dataset from model import training, inference from dataset import GraphDataset from util import collate_reaction_graphs from model import reactionMPNN from sklearn.metrics import r2_score, mean...
# coding: utf-8 # # this function will perform a hierarchical clustering on the raw behavioral scores # Written by <NAME> & CBIG under MIT license: # https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt from scipy imp...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Measure image properties. """ from __future__ import print_function, division import numpy as np from gammapy.image.utils import coordinates __all__ = ['BoundingBox', 'bbox', 'find_max', 'lookup', 'lookup_ma...
import numpy as np from astropy.wcs import WCS import re from astropy.io import fits from astropy import nddata from scipy import ndimage #https://docs.scipy.org/doc/scipy-1.3.0/reference/ # https://docs.astropy.org/en/stable/nddata/index.html class FITSImage(WCS): SIP = ('A','B','AP','BP') def __i...
<filename>viewers/cdxml2gnr.py<gh_stars>1-10 # pylint: disable=no-member """Widget to convert SMILES to nanoribbons.""" import numpy as np from scipy.stats import mode import re from IPython.display import clear_output import ipywidgets as ipw import nglview from traitlets import Instance from ase import Atoms from...
import numpy as np import scipy.misc import scipy.io import tensorflow as tf VGG_MODEL = 'saved_models/VGG19/imagenet-vgg-verydeep-19.mat' # The mean to subtract from the input to the VGG model. This is the mean that # when the VGG was used to train. Minor changes to this will make a lot of # difference to the perform...
import importlib_resources import numpy as np import toml import torch import torch.nn as nn import torch.nn.functional as F from scipy.stats import betabinom class Tacotron(nn.Module): def __init__(self, encoder, decoder): super().__init__() self.input_size = 2 * decoder["input_size"] sel...
<reponame>redwankarimsony/UniFAD """Server class for visualizing images and datasets. """ # MIT License # # Copyright (c) 2018 <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 Softwa...
<reponame>palmercd/epic import logging from scipy.stats import poisson from numpy import log from epic.config.constants import BIN_SIZE, E_VALUE_THRESHOLD from epic.statistics.generate_cumulative_distribution import generate_cumulative_dist from epic.statistics.add_to_island_expectations import add_to_island_expectati...
import scipy.io as sio import numpy as np data = sio.loadmat('../../data/train_data_10k.mat') print('{}'.format(data.keys())) print('{}'.format(data['positive_images'].shape)) #cameras = data['cameras'] #features = data['features'] #print(data.keys()) #print('{} {}'.format(cameras.shape, features.shape))
################################################################################### # Copyright 2021 National Technology & Engineering Solutions of Sandia, # # LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the # # U.S. Government retains certain rights in this software. ...
<reponame>alm818/epipy import unittest from epipy.sparse import rigid_csr_matrix from scipy.sparse import csr_matrix, dia_matrix from test import generate_test, sum_duplicated_coo import numpy as np @unittest.skip("Finished tested, disable for faster unittest") class TestTransform(unittest.TestCase): def test_tran...
################################################################################ # # Copyright (c) 2009 The MadGraph5_aMC@NLO Development team and Contributors # # This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # hi...
from collections import defaultdict import os from PIL import Image from glob import glob import tensorflow as tf import numpy as np import random import scipy.misc from tqdm import tqdm # TODO: should be able to use tf queue's for this somehow and not have to load entire dataset into memory. main problem is dynamical...
<reponame>UKPLab/acl2020-interactive-entity-linking from typing import List, Dict, Any import numpy as np import pandas as pd from scipy import linalg from sklearn import svm from sklearn.preprocessing import normalize from gleipnir.evaluation.metrics import EvaluationResult, compute_letor_scores from gleipnir.mode...
<filename>engine/model/transformers.py import pickle as pkl import pandas as pd from tqdm import tqdm import scipy def sentence_embeddings(sentences, embedder): print('TODO model training') # Corpus with example sentences corpus = sentences corpus_embeddings = embedder.encode(corpus,show_progress_b...
from __future__ import division, print_function, absolute_import from collections import OrderedDict from rep.metaml.gridsearch import SubgridParameterOptimizer, \ RegressionParameterOptimizer, AbstractParameterGenerator, \ AnnealingParameterOptimizer, RandomParameterOptimizer import numpy from tests import re...
<reponame>conlain-k/srm_motor<gh_stars>0 import numpy as np import numpy.random as nprand import time import scipy import scipy.interpolate from cProfile import Profile from pstats import Stats from matplotlib import pyplot as plt from ../srm_system import * import ../shapes from ../constants import * prof = Profile(...
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- import healpy import numpy as np import matplotlib.pyplot as plt from astropy.io import fits import statistics as sts from scipy.linalg import lstsq SPEED_OF_LIGHT_M_S = 2.99792458e8 PLANCK_H_MKS = 6.62606896e-34 BOLTZMANN_K_MKS = 1.3806504e-23 SOLSYSSPEED_M_S = 370082...
"""Docstring for Optimization module.""" import time import inspect import statistics from copy import copy from random import Random, randint class Optimization(object): """Optimization class is where the problem put in. In here we define the mathematical model together with other constraints, variables' ty...
def flip_sign(string): if string == '-': return '+' elif string == '+': return '-' else: pass def analyse_nodes(infile, outpref): import numpy as np from statistics import mean stop_codons = ["TAA", "TGA", "TAG", "TTA", "TCA", "CTA"] start_codons = ["AT...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import matplotlib.pyplot as plt import seaborn as sns from scipy import stats import numpy as np from scipy.cluster.hierarchy import linkage, dendrogram def _plot_rectangle(frameloc, color='k', linewidth...
<gh_stars>0 #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Apr 20 01:29:46 2020 @author: krishna """ import time import numpy as np import pandas as pd import matplotlib.pyplot as plt data=pd.read_csv('All.csv') column_names=list(data.columns) data['URL_Type_obf_Type'].value_counts() #creating a ...
<reponame>claresinger/StratoClim_H2O_Intercomparison<gh_stars>0 import numpy as np import matplotlib.pyplot as plt import matplotlib.colors as mcolors import matplotlib.gridspec as gridspec import seaborn import datetime import scipy.stats as stats flno = [2,3,4,6,7,8] colors = np.array(["k","#045275","#0C7BDC","#7CCB...
""" Some code taken from https://github.com/caglarcakan/stimulus_neural_populations Copyright (c) 2019, <NAME> BSD 2-Clause License """ from scipy import ndimage, signal import numpy as np import matplotlib.pyplot as plt from numba import jit def plot_kuramoto_example(traces): kur, phases, peakslist, traces = fa...
"""Module dedicated to extraction of complexity metafeatures.""" import typing as t import itertools import numpy as np import sklearn import sklearn.pipeline import scipy.spatial from pymfe.general import MFEGeneral from pymfe.clustering import MFEClustering from pymfe import _utils class MFEComplexity: """Ke...
<filename>models/ijssel_system.py<gh_stars>1-10 # -*- coding: utf-8 -*- __author__ = '<NAME>' __copyright__ = 'Copyright 2018' __license__ = 'GNU GPL' import numpy as np import pandas as pd from scipy.stats import gumbel_r import sys sys.path.append('/Users/lraso/Dropbox/Monitoring_for_DAPP/Experiments/') #...
<reponame>GBruening/succes_predictor<gh_stars>0 #%% from os import stat_result import numpy as np import psycopg2 from sqlalchemy import create_engine import pandas as pd import requests from contextlib import closing from datetime import datetime from scipy import stats from matplotlib import pyplot as plt server = '...
<reponame>arthus701/algopy """ Univariate nth derivatives of several numpy and scipy functions. These functions are intended for two purposes. They can be used for testing, and they can also be used as components of unsophisticated implementations of more complicated functions. The functions in this module do not supp...
<reponame>hardik-vala/2015-giller-prize-predictor """ Predicts the 2015 Giller prize winner. @author: Hardik """ import logging import numpy as np import os import sys from scipy.spatial.distance import cosine from sklearn import linear_model from sklearn.decomposition import PCA from sklearn.feature_extraction.text...
import os.path as op import numpy as np import mne from mne.datasets import sample from mne.simulation import simulate_raw, add_noise from neurolib.utils import atlases def _simulate_raw_eeg(aal2_atlas, cortex, model_data): data_path = sample.data_path() subjects_dir = op.join(data_path, 'subjects') sub...
import os, sys, pdb, gc, pickle, pathlib, argparse from collections import OrderedDict import time, math, random import numpy as np import scipy as sp import torch import torch.nn.functional as F import torch.nn as nn import definitions import data.data_loader as data from pytorch.utils import * from pytorch.layers ...
"""Test DSS functions.""" import matplotlib.pyplot as plt import numpy as np import pytest from numpy.testing import assert_allclose from scipy import signal from meegkit import dss from meegkit.utils import fold, rms, tscov, unfold def create_data(n_samples=100 * 3, n_chans=30, n_trials=100, noise_dim=20, ...
<filename>main.py import gym import random import numpy as np import tflearn from statistics import mean, median from collections import Counter from tqdm import tqdm from createData import initial_population from train_model import create_and_train_model from model import create_model from process_data import proces...
<reponame>jpozin/Math-Projects # Calculate the first four moments of a random variable, stored in an iterable data type or Pandas data frame # Also calculate the mean, variance, standard deviation, skewness, and kurtosis of the data set # Created by <NAME> on August 1, 2017 import scipy.stats as stats from math...
#!/usr/bin/env python import copy from collections import deque, defaultdict from utils.utils import get_input, ints, tuple_add import re import networkx as nx from fractions import Fraction import math from pprint import pprint def part1(number_list, times=100): base_pattern = [0, 1, 0, -1] for _ in range(...
import sys import numpy as np from scipy.sparse import csr_matrix from scipy.sparse.csgraph import dijkstra I = np.array(sys.stdin.read().split(), dtype=np.int64) h, w = I[:2] c = I[2:102].reshape(10, 10).T a = I[102:].reshape(h, w) def main(): cost = dijkstra(csr_matrix(c), directed=True, indices=...
<reponame>brandonfranz13/aa274-sections #!/usr/bin/env python #This script will introduce us to Scipy, a library useful for scientific computation #Adapted from https://docs.scipy.org/doc/scipy/reference/tutorial/integrate.html #Integration #Using known function print("Integration:") from scipy.integrate import quad...
<gh_stars>0 from multiprocessing import Pool from scipy.signal import max_len_seq import numpy as np def awgn_channel(signal, eb_n0_dB=0): """ Assume signal has a power of 1 """ n_dB = -eb_n0_dB n = 10 ** (n_dB / 10) noise = np.random.normal(0, np.sqrt(n), len(signal)) return signal + n...
<gh_stars>0 #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Apr 5 10:56:54 2018 cms - cross match simple @author: csh4 """ from scipy import spatial import matplotlib.pyplot as plt import pandas as pd import numpy as np import gc import os import time import sys from matplotlib.colors import L...
<filename>play_atari.py import os from argparse import ArgumentParser from multiprocessing import Process, Queue, set_start_method from queue import Empty import multiprocessing from random import randint from functools import reduce import statistics parser = ArgumentParser("Play and evaluate Atari games with a train...
import os import pickle import sys import time from collections import OrderedDict import sklearn.metrics as skm from taggers.lample_lstm_tagger.utils import create_input from taggers.lample_lstm_tagger.utils import models_path from taggers.lample_lstm_tagger.loader import word_mapping, char_mapping from taggers.lamp...
#! /usr/bin/env python ################################################## # Author: <NAME>, 2019 # License: MIT # Contact: <EMAIL> # Those functions were implemented from pbdlib-python maintained by <NAME> # (https://gitlab.idiap.ch/rli/pbdlib-python) ################################################## import numpy as n...
<filename>archive/MCQ/utils/lsqr.py<gh_stars>0 import scipy.sparse.linalg as lng import numpy as np import scipy.sparse as spe import multiprocessing as mp class CInitializer(object): def __init__(self, X, M, K): self._B = np.random.randint(K, size=[X.shape[0], M]) self.M = M self.K = K ...
<reponame>ccolas/funky_lenia import numpy as np # pip3 install numpy import reikna.fft, reikna.cluda # pip3 install pyopencl/pycuda, reikna import PIL.Image, PIL.ImageTk # pip3 install pillow import PIL.ImageDraw, PIL.ImageFont from src.board import Board from src.automaton import Automaton from src.analyzer import ...
""" This file stores fisheries and runs + stores simulation results The approach here is: """ from unit_gears.query import GearModel from random import randrange from math import prod from statistics import mean, stdev from collections import defaultdict class FisheryResultSet(object): """ This stores a set ...
<reponame>amirhosein-vedadi/GrippingForcePrediction import pandas as pd import glob import numpy as np import os import matplotlib.pyplot as plt import csv from scipy.signal import butter, filtfilt from scipy import signal import scipy.signal as signal from datetime import datetime from sklearn import preproc...
import os import pickle from collections import defaultdict from os.path import join import numpy as np from scipy.special import softmax from tqdm import tqdm from pytorch_pretrained_vit.utils import * # from utils.evaluate_utils import contrastive_evaluate EPS=1e-8 class FeatureExtractor(): def __init__(self,...
""" Dynamic models. These are the actual classes to send to IPOPT. """ import numpy as np import opensim as osim from scipy import interpolate from static_optim.constraints import ConstraintAccelerationTarget from static_optim.forces import ResidualForces, ExternalForces from static_optim.kinematic import KinematicM...
<reponame>Frizzles7/genre_classification<filename>check_data/test_data.py<gh_stars>1-10 import scipy.stats import pandas as pd def test_column_presence_and_type(data): # Disregard the reference dataset _, data = data required_columns = { "time_signature": pd.api.types.is_integer_dtype, "...
"""Create plots of signals generated by chirp() and sweep_poly().""" import numpy as np from scipy.signal.waveforms import chirp, sweep_poly from numpy import poly1d from pylab import figure, plot, show, xlabel, ylabel, subplot, grid, title, \ yscale, savefig, clf FIG_SIZE = (7.5, 3.75) def make...
<reponame>uestcbingo/keras-retinanet<filename>keras_retinanet/bin/extra_callbacks.py import keras.callbacks as cbks import tensorflow as tf import csv import random import sys import cv2 import numpy as np import matplotlib.pyplot as plt import io plt.rcParams['figure.figsize']=(20,15) import os from time import gmti...
# coding: utf-8 # /*########################################################################## # # Copyright (c) 2017 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal #...
import matplotlib import numpy as np import matplotlib.pyplot as plt import seaborn as sns sns.set_style("dark") plt.rcParams['figure.figsize'] = 16, 12 from glob import glob import os import pandas as pd from PIL import Image from tqdm import tqdm from skimage import transform import itertools as it from ...
<gh_stars>1-10 # -------------------------------------------------------- # Tensorflow ProtoNN for Multi-label learning # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> # -------------------------------------------------------- from __future__ import absolute_import from __future__ import...
import json import math from scipy.stats import poisson import sys import logging import numpy as np logging.basicConfig(filename=snakemake.log[0], level=logging.DEBUG,format="%(asctime)s:%(levelname)s:%(message)s") #Read counts expected_counts = json.load(open(snakemake.input['expectedCounts'],'r')) actual_counts...
from typing import Sequence import numpy as np import copy from scipy import stats from gmhazard_calc.constants import EventType def mc_sampling( nhypo: int, planes: Sequence, event_type: EventType, total_length: float, seed: int = None, ): """ Straight Monte Carlo using distributions al...
<reponame>rockers7414/house_eval #!/usr/bin/env python from bs4 import BeautifulSoup from functools import reduce from statistics import mean, median, stdev def load_html_doc(path): with open(path) as f: doc = f.read() return doc def normalize(doc): soup = BeautifulSoup(doc, 'html.parser') tot...
"""Reduce size of embeddings by aligning their vocabularies.""" import os import logging import numpy as np from scipy import sparse from tqdm import tqdm import embeddix.utils.files as futils __all__ = ('reduce_sparse', 'reduce_dense') logger = logging.getLogger(__name__) # pylint: disable=C0103 def reduce_spar...
<reponame>federico-terzi/koda import cv2 import numpy as np from matplotlib import pyplot as plt from collections import defaultdict import itertools from scipy.signal import argrelextrema from abc import ABC, abstractmethod import time import os from koda.edge.network import UNetEdgeDetector, TARGET_IMAGE_SIZE from .u...
import json import numpy as np import pandas as pd from scipy.optimize import linear_sum_assignment from scipy.spatial import KDTree, distance_matrix from tqdm import tqdm import sys sys.path.insert(1, '/home/xview3/src') # use an appropriate path if not in the docker volume from xview3.processing.constants import P...
import numpy as np import matplotlib.pyplot as plt from scipy.integrate import quad, simps, odeint from scipy.interpolate import interp1d from glob import glob import pandas as pd from plotting import plot_rho, plot_dwarfs, plot_mass, plot_mass_JR from data import get_dwarf, create_inner_df, load_rho, load_M, load_M_J...
<reponame>lintondf/MorrisonPolynomialFiltering ''' Created on Feb 15, 2019 @author: NOOK ''' import time from typing import Tuple; from netCDF4 import Dataset from math import sin, cos, exp import numpy as np from numpy import array, array2string, diag, eye, ones, transpose, zeros, sqrt, mean, std, var,\ isscalar...
import os import re import numpy as np import scipy.io as sio from scipy.fftpack import fft import pandas as pd from .movie import Movie, FullFieldFlashMovie pd.set_option('display.width', 1000) pd.set_option('display.max_columns', 100) ################################################# def chunks(l, n): """Yiel...
<filename>detect_blur.py<gh_stars>1-10 from facenet_code.detection import Detection from facenet_code.encoder import Encoder from scipy.linalg import svd from imutils import paths import numpy as np import argparse import cv2 import os class DetectBlur(object): def __init__(self, video, threshold=0.8): sel...
import time import numpy as np from scipy.integrate import solve_ivp from scipy.interpolate import interp1d from scipy.constants import c as c_luz #metros/segundos c_luz_km = c_luz/1000 import sys import os from os.path import join as osjoin from pc_path import definir_path path_git, path_datos_global = definir_path()...
<filename>GUI_Adquisicion/Ultracortex_16CH.py import sys sys.path.append('C:/Python37/Lib/site-packages') from IPython.display import clear_output from pyqtgraph.Qt import QtGui, QtCore import pyqtgraph as pg import random from pyOpenBCI import OpenBCICyton import threading import time import numpy as np from scipy imp...
# Copyright 2013 <NAME> and <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 wri...
<reponame>prashankkadam/IDMP-Data-Analysis-Tool # -*- coding:/ utf-8 -*- """ This piece of software is bound by The MIT License (MIT) Copyright (c) 2020 <NAME> Code written by : <NAME> Email ID : <EMAIL> Created on - 03/14/2020 version : 1.0 """ """ This tool is a part of the Introduction to Data Management and Proces...
<filename>src/attrbench/suite/plot/cluster_plot.py from typing import Dict, Tuple import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from sklearn.preprocessing import MinMaxScaler import numpy as np from scipy.cluster.hierarchy import linkage class ClusterPlot: def __init__(self, dfs: Dict[...
""" pyscf.py Defines the modified effective potential veff_mod that allows the integration of NeuralXC models in PySCF calculations. Provides utility functions for NeuralXC PySCF interoperability. """ # from sympy import N from glob import glob from pylibnxc.pyscf import RKS as RKSrad from pyscf import dft, gto from ...
import os from math import ceil, floor import imageio import random from PIL import Image, ImageDraw import numpy as np from scipy import stats import torch import torch.nn.functional as F from torch.autograd import Variable from torchvision.utils import make_grid, save_image TRAIN_FILE = "train_losses.log" DECIMAL_...
import pickle import pprint from math import * import collections import numpy as np from scipy.stats import norm, beta import os import scipy.special as scispec import time import magis ## TODO: profile this against the itertools.tee version def unzip(xys): return [[x[i] for x in xys] for i in range(len(xys[0]))...
<reponame>apls777/tacotron2 import logging import re import subprocess import sys from shutil import which, rmtree import numpy as np from hparams import create_hparams from text.cleaners import english_cleaners from train import load_model from text import text_to_sequence from scipy.io.wavfile import write import tor...
from scipy.integrate import odeint import numpy as np import matplotlib.pyplot as plt import seaborn as sns sns.set(font_scale=1.25) from pyDOE import * #function name >>> lhs #Tipping limits, see Schellnhuber, et al., 2016: limits_gis = [0.8, 3.2] limits_thc = [3.5, 6.0] limits_wais = [0.8, 5.5] limits_a...
<gh_stars>1-10 import mne import numpy as np import scipy.interpolate as interpolate import scipy.signal as signal from tabulate import tabulate def interpolate_raw_dataset(dataset, orig_raw_dataset): """ Interpolate the downsampled dataset to the original sampling rate :param mne.io.RawArray dataset: o...
import numpy as np from scipy.optimize import approx_fprime from numpy.testing import assert_array_almost_equal from sklearn.metrics.pairwise import pairwise_kernels from sklearn.gaussian_process.kernels import RBF from sklearn.datasets import make_regression from ofdft_ml.statslib.kernel import rbf_kernel, rbf_kernel...
<gh_stars>0 ## <NAME> ## 3 de febrero de 2020 import sounddevice as sd import matplotlib.pylab as plt import scipy.io.wavfile as wavfile import numpy as np import scipy as sp import itertools import os import pyaudio import wavio import wave from tkinter import * from playsound import playsound from scipy import sig...
<reponame>wdr123/DARP-SBIR import numpy as np from bresenham import bresenham import scipy.ndimage import random def mydrawPNG(vector_images, Sample = 25, Side = 256): for vector_image in vector_images: pixel_length = 0 # number_of_samples = random sample_freq = list(np.round(np.linspace(0...
# Standard library import pickle # Third-party import matplotlib.pyplot as plt import numpy as np from scipy.stats import binned_statistic_2d import yaml # Joaquin from joaquin import Joaquin from joaquin.data import JoaquinData from joaquin.config import Config from joaquin.logger import logger from joaquin.plot imp...
#!/usr/bin/env python3 """Run signal-to-reference alignments """ from __future__ import print_function import numpy as np import glob import shutil import subprocess import os import sys from argparse import ArgumentParser import scipy import math from signalalign.utils.sequenceTools import reverse_complement # signa...
#!/usr/bin/env python # -*- coding=utf-8 -*- ########################################################################### # Copyright (C) 2013-2016 by Caspar. All rights reserved. # File Name: gsx_extrc.py # Author: <NAME> # E-mail: <EMAIL> # Created Time: 2016-03-16 15:56:16 ############################################...
<gh_stars>0 from random_forests import RandomForest from dataset import Dataset from dparser import DParser from entry import Entry import numpy as np import statistics import random import time import sys class KFoldValidation(): def __init__(self, dparser: DParser, k: int, treeCount: int): """ ...
#!/usr/bin/env python # <NAME> """ visualize similarities between networks 1. find random subset of network edges 2. subset all cell type specific networks for 1 3. cosine similarities between cell types """ import os import sys import csv import argparse def select_random_edges(celltype, filesize, offsets): ...