text
string
<reponame>camcl/genotypooler import os, sys import pysam import pandas as pd import numpy as np from scipy.stats import * rootdir = os.path.dirname(os.path.dirname(os.getcwd())) sys.path.insert(0, rootdir) from genotypooler.poolSNPs import chunkvcf as chkvcf from genotypooler.persotools.files import * """ Building p...
<filename>PythonNetwork/venv/Lib/site-packages/scipy/special/__init__.py """ ======================================== Special functions (:mod:`scipy.special`) ======================================== .. module:: scipy.special Nearly all of the functions below are universal functions and follow broadcasting and automa...
<filename>sympy/printing/ccode.py """ C code printer The C89CodePrinter & C99CodePrinter converts single sympy expressions into single C expressions, using the functions defined in math.h where possible. A complete code generator, which uses ccode extensively, can be found in sympy.utilities.codegen. The codegen modu...
import cmath a=complex(input().strip()) print(cmath.polar(a)[0]) print(cmath.polar(a)[1])
import numpy as np from scipy import interpolate from .enums import ControlType class Data: class Phase: def __init__(self, time, phase): """ Initializes phases with user provided information. :param time: Duration of the movement optimized. (float) :param p...
<filename>code/traditional/BDA/BDA.py # encoding=utf-8 """ Created on 9:52 2018/11/14 @author: <NAME> """ import numpy as np import scipy.io import scipy.linalg import sklearn.metrics import sklearn.neighbors from sklearn import metrics from sklearn import svm def kernel(ker, X1, X2, gamma): K = None ...
<filename>roots/core.py import numpy as np import math import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import random from scipy.interpolate import interp1d import scipy import time from roots.graphmethods import GraphMethods from roots.kmd import KMDD #import seaborn as sns #plt.style.use('seabo...
<filename>gmi_invert_old.py import gmi_misc #**************** PRINT HEADER ***************************# gmi_misc.print_header() print("Script no. 4: Inversion") #**************** ------------ ***************************# #**************** GET WORKING DIRECTORY ******************# import os old_cwd = os.getcwd() gmi_m...
<reponame>arfon/starry_process from ..base_op import BaseOp from ...compat import Op, Apply, theano, tt, floatX import numpy as np from functools import partial from six.moves import xrange import scipy.linalg __all__ = ["EighOp"] def _numpy_eigh(x, neig): try: eigvals, eigvecs = np.linalg.eigh(x) ex...
<reponame>jaws/JustifiedAWS<gh_stars>10-100 from datetime import datetime import os import requests import numpy as np import scipy.interpolate import xarray as xr try: from jaws import common except ImportError: import common def deg_to_rad(list_deg): """Convert degrees to radians""" list_rad = [np...
import os import sys import csv import pprint as pprint import re import statistics import fiolib.supporting as supporting from pathlib import Path def list_fio_log_files(directory): """Lists all .log files in a directory. Exits with an error if no files are found. """ absolute_dir = os.path.abspath(direc...
# -*- coding: utf-8 -*- """ Created on Sun Dec 3 18:52:20 2017 @author: ybarancan """ import scipy.io as sio import os import glob import h5py import random import tensorflow as tf import numpy as np FLAGS = tf.app.flags.FLAGS def valid_preprocess(path): mat_file = sio.loadmat(path) ...
# testing p = 1 case 2 with FEM # running code for p = 1 with increasing number of elements for 2**1 import numpy as np import matplotlib.pyplot as plt from scipy import integrate from scipy import stats """ #returns sample points and weights for gaussian quadrature deg = 2 print("sample points:") print(np.polynomia...
<reponame>psaks/auto-sklearn<gh_stars>1000+ import hashlib import json import os import pathlib import pickle from typing import Any, Dict, List, Optional, Union import dask.distributed import scipy.sparse from ConfigSpace import Configuration import numpy as np import pandas as pd import sklearn import autosklearn ...
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from args import get_parser from pycocotools.cocoeval import COCOeval from pycocotools.coco import COCO import pycocotools.mask from utils.utils import batch_to_var, make_dir, outs_perms_to_cpu, load_checkpoint, check_parallel from scipy.ndimage.me...
# -*- coding: utf-8 -*- """ Created on Wed Feb 17 14:32:14 2021 @author: <NAME> """ import numpy as np from numpy import sin, cos, sqrt from scipy.constants import mu_0 as μ0, pi as π from scipy.integrate import quad from scipy.special import ellipk as ellK, ellipe as ellE from scipy.special import ellipkinc as ellK_i...
<reponame>JinLi711/quantum_circuits from sympy import * import numpy as np import utils class Measure(object): def __init__(self, qubit_index, bit_index): self.template = 'measure q[{}] -> c[{}]'.format(qubit_index, bit_index) def measure(qubits, basis='z'): """Perform a measurement on the q...
<gh_stars>1-10 # --- # jupyter: # kernelspec: # display_name: Python 3 # name: python3 # --- # %% [markdown] # # Hyperparameter tuning # # In the previous section, we did not discuss the parameters of random forest # and gradient-boosting. However, there are a couple of things to keep in mind # when setting ...
<gh_stars>0 import glob import os import audioBasicIO import sys import csv import scipy.io.wavfile as wavfile def annotation2files(wavFile, csvFile): ''' Break an audio stream to segments of interest, defined by a csv file - wavFile: path to input wavfile ...
<filename>competitive/AtCoder/ABC212/B.py import bisect from copy import deepcopy from fractions import Fraction from functools import reduce import heapq as hq import io from itertools import combinations, permutations import math from math import factorial import re import sys sys.setrecursionlimit(10000) #from numb...
<filename>sureal/subjective_model.py import copy from abc import ABCMeta, abstractmethod import sys import time import numpy as np from scipy import linalg from scipy import stats import pandas as pd from scipy.stats import chi2, norm from sureal.core.mixin import TypeVersionEnabled from sureal.tools.misc import impo...
import cv2 import csv import datetime import numpy as np import matplotlib.pyplot as plt import matplotlib.image as mpimg from scipy.misc import imread, imresize from sklearn.utils import shuffle from os import listdir from os.path import join from keras.preprocessing.image import img_to_array, load_img from keras....
from otolto import * import scipy.optimize as spop import cma import multiprocessing if __name__ == '__main__': print('My name is __main__!') multiprocessing.freeze_support() multiprocessing.freeze_support() desiredEccentricity=0.0 desiredInclination=0.0 desiredSemiMajor=7e6 eccTol=0.002 smaTol=1.0 ...
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
import statsmodels.api as sm import numpy as np import matplotlib.pyplot as plt from date_functions import * import time from get_WMAE import * import pywt from scipy.optimize import basinhopping def remove_mean(window_size,first_day_index,lprices,lloads): window_size_h = window_size*24 first_hour_i...
''' Module: jelephant.analysis.rate_estimation Contains utility functions for instantaneous rate estimation of SpikeTrains. ''' import quantities as pq import numpy as np import numpy import scipy.signal import neo #def make_kernel(form, sigma, resolution, direction=1): # # # """Creates kernel functions for convo...
<reponame>rickdr/Data-analysis-DNN-testing import sys import torch import numpy as np # import cupy as cp from tqdm import tqdm from scipy import stats from sklearn import metrics import matplotlib.pyplot as plt import concurrent from concurrent.futures.thread import ThreadPoolExecutor sys.path.insert(0, '../') from ...
import numpy as np import scipy.integrate as integrate from numpy import cosh, cos, log, sqrt ''' 1D Transverse Field Ising Model(1D TFIM) H = \sum_i -J*\sigma_{i}\sigma_{i+1} - h*\sigma_{i} ''' # beta = 1/kT # Jordan–Wigner transformation def lnZ(beta, J, h): lam = J / h w = lambda x: (1 + 2 * lam * cos(x...
from typing import Union from typing import Tuple from typing import Any from typing import List import numpy as np import onnxruntime from scipy.special import log_softmax from espnet_onnx.asr.scorer.interface import BatchScorerInterface from espnet_onnx.utils.function import subsequent_mask class TransformerLM(Ba...
<reponame>nrupatunga/circulant_matrix_tracker # !/usr/bin/env python # -*- coding: utf-8 -*- """ This is a python reimplementation of the open source tracker in http://www2.isr.uc.pt/~henriques/circulant/index.html Found http://wiki.scipy.org/NumPy_for_Matlab_Users very useful Based on the work of <NAME>, 2012 http:...
<reponame>charles-stan/learn_python_Stanier """ Example 13a_ode_single_ver_a Solving a single ODE for a level tank <NAME> <EMAIL> Oct 2, 2019 simple version - everything hard coded, derivative function and driver in same file constants hard-coded into derivative file note: I am using solve_ivp (solve in...
## LSDMap_KnickpointPlotting.py ##=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ## These functions are tools for analysing and plotting knickpoint data ##=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ## FJC ## 05/06/2017 ##=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=...
""" Hierarchical clustering (:mod:`scipy.cluster.hierarchy`) ======================================================== .. currentmodule:: scipy.cluster.hierarchy These functions cut hierarchical clusterings into flat clusterings or find the roots of the forest formed by a cut by providing the flat cluster ids of each ...
<reponame>dnidever/chronos #!/usr/bin/env python """CHRONOS.PY - Automatic isochrone fitting to photometric data """ __authors__ = '<NAME> <<EMAIL>?' __version__ = '20210919' # yyyymmdd import os import time import numpy as np from glob import glob from astropy.wcs import WCS from astropy.io import fits from astro...
import scipy.interpolate as interp import numpy as np from pyevtk.hl import gridToVTK def interpSurface(pointfile,outfile,nxgrid=100,nygrid=100,method='spline',delimiter='\t',kx=1,ky=1): ''' Creates a surface interpolating the provided three dimensional points. INPUT: pointfile ASCII text file w...
<filename>test_script.py import sys import numpy as np import time import cv2 import os from os import listdir from os.path import isfile, join, isdir import random from sklearn.tree import DecisionTreeClassifier from UCSDped1 import TestVideoFile from sklearn.neighbors import KNeighborsClassifier import time from skle...
''' Contains Field class and field related routines. Note: g2g functionality was moved to gridtile.py due to dependence on f2py. pca method is moved to pca.py module due to dependence on f2py. ''' import scipy as sp from scipy import interpolate import matplotlib.pyplot as pl from matplotlib import dates, mlab ...
from scipy import linalg import numpy as np from ..utils.simple_functions import choose CLOSED_THRESHOLD = 0.001 def bezier(points): n = len(points) - 1 return lambda t: sum([ ((1 - t)**(n - k)) * (t**k) * choose(n, k) * point for k, point in enumerate(points) ]) def partial_bezier_poi...
__author__ = '<NAME>' import os import numpy as np import scipy.stats as st import matplotlib.pyplot as plt def check_inf(string): # bug no python 2.3 if string == '1.#INF\n': result = 99999 else: result = float(string) result = max(0, result) #result = min(20.0, result) return result if __name__ == '_...
import numpy as np from loader import * from scipy import sparse import math import os, sys utils_path = os.path.dirname(os.path.abspath(__file__)) + os.path.sep + "/../utils" sys.path.append(utils_path) import sparse_matrix def loadAllCutSongci(path): f = open(path, "r") lines = f.readlines() cs = "".jo...
<filename>librosa/util/utils.py #!/usr/bin/env python # -*- coding: utf-8 -*- """Utility functions""" import warnings import scipy.ndimage import scipy.sparse import numpy as np import numba from numpy.lib.stride_tricks import as_strided from .._cache import cache from .exceptions import ParameterError # Constrain ...
''' Forward algorithm for Hidden Markov Models. Includes: * skeleton of run_forward_algorithm requiring edits * a __main__ method with example input * doctests showing expected behavior Usage ----- To see forward messages on simple example printed to stdout, do $ python forward_alg.py To verify if the script passes ...
#!/usr/bin/env python # Copyright 2019 Calico 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 # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agr...
<reponame>filecoin-project/consensus import numpy as np import time from math import floor import multiprocessing as mp import scipy.special #Initialize parameters Num_of_sim_per_proc = 10 height = 11 #height of the attack start_time = time.time() e = 5. alpha = 0.33 ntot = 1000 na = int(ntot*alpha) nh = ntot - na p...
<reponame>dhjpolymath/pytorch-minimize<gh_stars>10-100 """ TODO: this module is not yet complete. It is not ready for use. """ import numpy as np from scipy.linalg import eigh_tridiagonal, get_lapack_funcs import torch from .base import _minimize_trust_region, BaseQuadraticSubproblem def _minimize_trust_krylov(fun, ...
from matplotlib import pyplot as plt from scipy import stats as st import numpy as np marks = ("H3K27ac", "H3K4me1", "H3K4me3", "H3K9ac", "H3K36me3", "H2AZ", "H3K79me2", "H3K27me3", "EZH2", "enhancer", "transcription", "polycomb") datasets = [] for celltype in ("GM12878", "K562"): for mark in marks: datasets.append...
#!/usr/bin/env python """Minimum Variance Analysis and boundary normal crd tools""" from __future__ import print_function, division import os import numpy as np import viscid __all__ = ["paraboloid", "paraboloid_normal", "fit_paraboloid", "get_mp_info", "find_mp_edges"] _dtf = 'f8' _paraboloid_dt = np.d...
<gh_stars>0 import scipy.signal import numpy as np def find_peaks(x, max_num = -1, height = None, distance = None): ''' Find peaks positions and their heights in 1-d array of real data. (Based on `scipy.signal.find_peaks`) :param x: 1-d array of real data :param max_num: `optional` defines maximum num...
import measure as ms from measure import pi, sqrt, sin, tan, cos, arcsin, arccos, exp, ln from measure import npfarray as npf import numpy as np import scipy.constants as cs ms.plt.rc('text', usetex=True) ms.plt.rc('font', family='serif') titles = [ r'Bestimmung des Grenzwinkels $\beta_G$ durch Extrapolation' '\n' ...
#!/usr/bin/env python # coding: utf-8 # # Regularization # # Welcome to the second assignment of this week. Deep Learning models have so much flexibility and capacity that **overfitting can be a serious problem**, if the training dataset is not big enough. Sure it does well on the training set, but the learned networ...
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this so...
import numpy as np from scipy import io import os g_nr_of_clusters = 17 def numpy_to_uint8(the_image, verbal=False): original_image_type = the_image.dtype original_image_info = np.iinfo(original_image_type) converted_image = the_image.astype(np.float32) / original_image_info.max converted_im...
<reponame>simpeg-research/casingSimulations<gh_stars>1-10 import unittest import numpy as np import discretize import os import pytest from discretize import utils from scipy.constants import mu_0 import casingSimulations as casingSim class ModelTests(unittest.TestCase): def setUp(self): self.mesh = dis...
<reponame>jensv/relative_canonical_helicity_tools<filename>centroid_fitting/gyration_path.py r"""" Created on Apr 17 2017 @author: <NAME> Plot field line null gyration of RSX magnetic flux tube. """ import numpy as np from scipy.optimize import leastsq import matplotlib.pyplot as plt import seaborn as sns sns.set_s...
<filename>exoabc/completeness.py<gh_stars>0 # -*- coding: utf-8 -*- from __future__ import division, print_function import logging import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy.optimize import leastsq from .sim import DR24CompletenessModel from .data import get_q1_q17_dr24_injecti...
<reponame>sampritipanda/audio_captcha_solver<filename>rasta.py import librosa import librosa.filters import scipy import scipy.fftpack as fft from scipy import signal import numpy as np import matplotlib.pyplot as plt import spectrum def rastaplp(x, fs = 16000, win_time = 0.040, hop_time = 0.020, dorasta = True, model...
<reponame>iyaja/efficientnet from fastai2.vision.all import * from fastai2.callback.wandb import * import pandas as pd import scipy.io as sio import wandb import geffnet from fastai2.distributed import * hyperparameter_defaults = dict( efficientnet_b = 3, ) run = wandb.init(config=hyperparameter_defaults, pr...
""" This module contains the algorithm for optimizing the costs of energy systems. """ from datetime import datetime from scipy.optimize import fmin_l_bfgs_b import calendar import cProfile import copy from collections import namedtuple import numpy as np from numpy import array from server.devices.base import BaseEn...
"""Test the 20news downloader, if the data is available.""" import numpy as np import scipy.sparse as sp from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_true from sklearn.utils.testing import SkipTest from sklearn import datasets def test_20news(): try: data = dat...
<gh_stars>0 # aclock.py Test/demo program for Adafruit ssd1351-based OLED displays # Adafruit 1.5" 128*128 OLED display: https://www.adafruit.com/product/1431 # Adafruit 1.27" 128*96 display https://www.adafruit.com/product/1673 # Released under the MIT License (MIT). See LICENSE. # Copyright (c) 2018-2020 <NAME> # I...
# with Gaze ------------------ import bpy import numpy as np from itertools import repeat import random import os import sys from sympy.geometry import Point from numpy import cos, sin from math import radians import mathutils from bpy import context """ Render the images, Depth and capture the metadata Sce...
import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm from scipy.stats import multivariate_normal from scipy.spatial.distance import cdist from matplotlib.colors import rgb2hex class GaussianProcesses: var_error = -1 kernel = 'rbf' kernel_params = 1. mu = -1 K = -1 X = -1 y = -1 bound...
<gh_stars>100-1000 #!/usr/bin/env python from __future__ import print_function from sympy import symbols, sin, cos, simplify from sympy.galgebra.ga import MV from sympy.galgebra.printing import enhance_print def main(): enhance_print() (ex, ey, ez) = MV.setup('e*x|y|z', metric='[1,1,1]') u = MV('u', 'v...
import os,sys,random,pickle,copy,re,operator import pandas as pd import numpy as np import scipy as sp from scipy.special import softmax from plot_utils import * import ast from sklearn.metrics import confusion_matrix from deap import algorithms from deap import base from deap import benchmarks from deap.benchmarks....
<gh_stars>10-100 #!/usr/bin/env python # -*- coding: utf-8 -*- """ Data augmentation routines. Author: <NAME> """ import sys import os import subprocess import numpy as np import scipy.ndimage def grab_random_excerpts(spects, labels, batchsize, frames): """ Exctracts random excerpts of `frames` frames fro...
import numpy as np import scipy.interpolate as interpolate # B-Spline def bspline(x, y, sections, degree=3): idx = np.linspace(0, len(x) - 1, sections + 1, endpoint=True).round(0).astype("int") x = x[idx] y = y[idx] t, c, k = interpolate.splrep(x, y, s=0, k=degree) spline = interpolate.BSpline(t...
<reponame>Andrej1A/ml_with_django<gh_stars>1-10 # -*- coding: utf-8 -*- __author__ = '<NAME>' import os import datetime import dill import numpy as np import tensorflow as tf import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt from keras.models import load_model from keras.preprocessing.image ...
<reponame>FleischerResearchLab/wvlib #!/usr/bin/env python """DBSCAN clustering for word vectors. Requires scikit-learn.""" import sys import math import logging import numpy import scipy.cluster import wvlib import sklearn.cluster if float(sklearn.__version__) < 0.14: # old scikit-learn fails to realize the p...
<gh_stars>1-10 """ Module for skill model evaluation @author <NAME> <<EMAIL>> """ from __future__ import division import logging import random import time import math import copy from matplotlib import pyplot as plt from sklearn import cross_validation, metrics from scipy import stats import numpy as np from . imp...
"""This module implements tools for integrating rational functions. """ from sympy.core.function import Lambda from sympy.core.numbers import I from sympy.core.singleton import S from sympy.core.symbol import (Dummy, Symbol, symbols) from sympy.functions.elementary.exponential import log from sympy.functions.elementar...
<filename>dask_image/ndfilters/_smooth.py # -*- coding: utf-8 -*- import scipy.ndimage.filters from . import _utils from ._gaussian import gaussian_filter gaussian_filter = gaussian_filter @_utils._update_wrapper(scipy.ndimage.filters.uniform_filter) def uniform_filter(image, size=3, ...
# -------------------------------------------------------- # Factory file for LRP-HAI # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> # Written by <NAME> # Faster R-CNN code by <NAME>, <NAME>, based on code # from <NAME> # -------------------------------------------------------- import cv...
<gh_stars>1-10 from sympy.core.numbers import igcd from primetest import isprime def totient_(n): """returns the number of integers less than n and relatively prime to n""" if n < 1: raise ValueError("n must be a positive integer") tot=0 for x in xrange(1,n): if igcd(x,n)==1: ...
<filename>great_expectations/dataset/sparkdf_dataset.py from __future__ import division import inspect import re import logging from six import PY3, string_types from functools import wraps from datetime import datetime from dateutil.parser import parse from .dataset import Dataset from great_expectations.data_asset....
#!/usr/bin/env python # Load required modules import sys, os, argparse, numpy as np, pandas as pd from scipy.stats import multivariate_normal, poisson if __name__ == '__main__': # Parse command-line arguments parser = argparse.ArgumentParser() parser.add_argument('-at', '--active_topics', type=int, requir...
<gh_stars>0 """ Copyright 2013 <NAME>, 2017 <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 ...
<gh_stars>10-100 from sympy import (sympify, S, pi, sqrt, exp, Lambda, Indexed, Gt, IndexedBase) from sympy.matrices import ImmutableMatrix from sympy.matrices.expressions.determinant import det from sympy.stats.joint_rv import (JointDistribution, JointPSpace, JointDistributionHandmade, MarginalDistribution) fr...
import numpy as np from scipy.spatial import Voronoi, voronoi_plot_2d import matplotlib.pyplot as plt points = np.random.rand(30, 2) vor = Voronoi(points) fig = plt.figure() ax = fig.add_subplot(111, aspect='equal') ax.tick_params(labelbottom="off", labelleft="off") voronoi_plot_2d(vor, ax=ax) plt.show()
# Copyright 2018 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
<reponame>shuuji3/Cirq # Copyright 2018 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
''' Extract physical features of airfoils or wing sections. ''' import copy import os import numpy as np from scipy.interpolate import interp1d class PhysicalSec(): ''' Extracting flow features of a section (features on/near the wall) ''' _i = 0 # index of the mesh point _X = 0.0 # locati...
<filename>pyamg/relaxation/smoothing.py """Method to create pre and post-smoothers on the levels of a MultilevelSolver. The setup_smoother_name functions are helper functions for parsing user input and assigning each level the appropriate smoother for the functions in 'change_smoothers'. The standard interface is Pa...
''' <NAME> 15863 Exercise 16 ''' import matplotlib.pyplot as plt import pandas as pd import scipy.constants as sc millikan = pd.read_csv("millikan.txt", sep=' ', header=None) x = [] y = [] sumx = 0 sumy = 0 sumxx = 0 sumxy = 0 for i in range(0, 6): x.append(millikan[0][i]) y.append(millikan[1][i]) for xi in ...
# -*- coding: utf-8 -*- import numpy as np from .utils import fast_OLS, fast_optimize, bootstrap_sampler, eval_expression, bias_corrected_ci, z_score, \ percentile_ci import scipy.stats as stats from numpy.linalg import inv, LinAlgError from numpy import dot from itertools import product, combinations import pandas...
''' **************** PLEASE READ *************** Script that reads in spam and ham messages and converts each training example into a feature vector Code intended for UC Berkeley course CS 189/289A: Machine Learning Requirements: -scipy ('pip install scipy') To add your own features, create a function that takes in...
from statsmodels.compat.python import iterkeys from statsmodels.regression.linear_model import GLS import numpy as np from statsmodels.base.model import LikelihoodModelResults from scipy import sparse # http://www.irisa.fr/aladin/wg-statlin/WORKSHOPS/RENNES02/SLIDES/Foschi.pdf __all__ = ['SUR', 'Sem2SLS'] #probably...
<gh_stars>0 from CSIKit.reader import IWLBeamformReader from CSIKit.util import csitools import numpy as np import errno import glob import os import scipy.io class InconsistentOutputError(RuntimeError): def __init__(self, arg): self.args = arg def test_intel_matlab_consistency(): example_dir = os...
# Copyright 2018 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
<filename>clusterpy/core/toolboxes/rimaps/__init__.py<gh_stars>0 """Spatial statistics library (sstats) """ __author__ = "<NAME>, <NAME>" __credits__ = "Copyright (c) 2009-11 <NAME>" __license__ = "GPL" __version__ = "1.0.0" __maintainer__ = "RiSE Group" __email__ = "<EMAIL>" from statistics import topoStatistics, noF...
"""Entropy functions""" import numpy as np from numba import jit from math import factorial, log from sklearn.neighbors import KDTree from scipy.signal import periodogram, welch from .utils import _embed all = ['perm_entropy', 'spectral_entropy', 'svd_entropy', 'app_entropy', 'sample_entropy', 'lziv_complexity...
<filename>RealTimeProcessing.py<gh_stars>0 # -*- coding: utf-8 -*- """ Created on Fri Jun 4 11:29:48 2021 @author: <NAME> """ y2=['a'] import pyaudio import numpy as np CHUNK = 512 WIDTH = 2 CHANNELS = 1 RATE = 8192 FORMAT = pyaudio.paInt16 data2=np.linspace(0,1,2) import scipy.io from scipy import ...
<reponame>LIDeB/iRaPCA-v1.0 #!/usr/bin/env python # coding: utf-8 -*- """ @author: LIDeB UNLP """ # iRaPCA Clustering is a clustering strategy based on an iterative combination # of the random subspace approach (feature bagging), dimensionality reduction # through Principal Component Analysis (PCA) and the k-m...
# # Copyright (c) <NAME>. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for details. # import os import numpy as np import scipy.constants import scipy.special # whether to show animations of simulated constellations ANIMATE = False # whether to print debug information D...
<gh_stars>0 import numpy as np import matplotlib.pyplot as plt import numpy as np import os from scipy.stats import norm import pickle from keras.datasets import mnist, fashion_mnist #from utils.loaders import load_mnist, load_model from sklearn.metrics import classification_report from sklearn.metrics import confusi...
import calendar import datetime import os import shutil import gdal import gdalnumeric import netCDF4 import numpy import osr import statistics import pandas from .app import LdasCentral as App from .model import app_configuration def pointchart(data): """ Description: generates a timeseries for a given poi...
import json import os import pprint from os import listdir from os.path import isfile, join import cv2 as cv import matplotlib import matplotlib.pyplot as plt import numpy as np import pandas as pd import scipy import seaborn as sns import torch import torch.backends.cudnn as cudnn import torch.nn as nn import torch.n...
<filename>Make_Timelist.py<gh_stars>0 from netCDF4 import Dataset import glob,os.path import numpy as np from scipy.interpolate import UnivariateSpline import matplotlib import matplotlib.pyplot as plt import site site.addsitedir('/tera/phil/nchaparr/python') from nchap_fun import * """ Get list of strings represen...
#!/usr/bin/env python3 from statistics import mean import multiprocessing from multiprocessing import Process import sys import time import argparse import traceback import math import numpy as np from trabalho_final.logger import Logger, TagTypes from trabalho_final.caches.static_cache import StaticCache from trabalh...
<reponame>Sharath302/popmon # Copyright (c) 2021 ING Wholesale Banking Advanced Analytics # # 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 t...
#!/usr/bin/env python """ IDT: Individualized Discounting Task (out-of-scanner version) Copyright 2017 <NAME>. Licensed under the Educational Community 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.osedu.o...