text
stringlengths
8.04k
46.5k
import json import logging import math import os import re import time from datetime import datetime from datetime import timedelta import feedparser from dateutil import parser from .ProjectHolder import ProjectHolder from .utils import ApiCredentialsError, BadProjectError log = logging.getLogger(__name__) TOKEN_PR...
#!/usr/bin/env python import os, sys, time, json, requests, logging import hashlib from datetime import datetime #from hysds_commons.job_utils import resolve_hysds_job from hysds.celery import app import util import uuid # only need this import to simulate returned mozart job id from hysds.celery import app from hysd...
#!/usr/bin/env python3 # coding: utf8 """ This script was created for reading MigroMag files and plotting FORC (first-order reversal curves) diagram as well as related figures. This script was inspired by FORKIT program which was written Gary Acton (http://paleomag.ucdavis.edu/software-forcit.html) and contains som...
""" Model runner to use in place of smif for standalone modelruns - run over multiple years - make rule-based intervention decisions at each timestep """ import configparser import csv import itertools import os import pprint import glob import pprint import fiona from collections import defaultdict from digital_com...
# -*- coding: utf-8 -*- """ Created on Wed Jan 26 10:32:01 2022 @author: benja """ import os import rasterio as rio import geopandas as gpd import numpy as np from whitebox import WhiteboxTools from rasterio.merge import merge #from utils import load_if_path, max_rast_value_in_shp, count_points_i...
import os, sys; sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) import unittest import time import re import random from pattern import search from pattern.en import Sentence, parse #--------------------------------------------------------------------------------------------------- class TestUti...
# # Copyright (c) 2013-2016 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # # vim: tabstop=4 shiftwidth=4 softtabstop=4 # All Rights Reserved. # """ inventory pci Utilities and helper functions.""" import glob import os import shlex import subprocess from inventory.common import k_pci from inven...
# Copyright 2012 Hewlett-Packard Development Company, 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...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.tools.float_utils import float_compare, float_round from dateutil import relativedelta from odoo.exceptions import UserError from odoo.addons.purchase.models.purchase im...
#!/usr/bin/env python3 """ .. module:: show_figs :platform: Unix :synopsis: Figure generation module. .. moduleauthor:: <NAME> <<EMAIL>> """ import numpy as _np import os as _os import matplotlib.pyplot as _plt def show_FA_thumbs( feature_array, show_per_class, normalize, title_string, screen_size, imag...
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
import csv import sys import os.path import datetime import traceback import win32timezone import win32com.client as win32 def retrieve_project_parameters(): parameters = sys.argv parameters_number = parameters.index("-traces") if "-traces" in parameters else None if parameters_number is not None: ...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Test files gathered from json.org and yaml.org from multiprocessing import Process, Queue import pytest import pickle from pathlib import Path try: from test.common import * except ImportError: from .common import * def mp_queue_test(q): bx = q.get() t...
import py from rpython.rtyper.lltypesystem import lltype, llmemory, rffi, rstr from rpython.jit.metainterp.history import ResOperation, TargetToken,\ JitCellToken from rpython.jit.metainterp.history import (ConstInt, ConstPtr, Const, BasicFailDescr, BasicFinalDescr) from...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2014 <NAME> <<EMAIL>>. # All rights reserved. # # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the ...
import re from collections.abc import Container, Iterable from numbers import Integral import numpy as np import pandas as pd import pyarrow as pa from pandas.api.extensions import ExtensionArray, ExtensionDtype from pandas.api.types import is_array_like from .._optional_imports import gp, sg from ..spatialindex impo...
################################################################################ # Module: archetypal.template # Description: # License: MIT, see full license in LICENSE.txt # Web: https://github.com/samuelduchesne/archetypal ################################################################################ import colle...
# MIMIC IIIv14 on postgres 9.4 import argparse import os import pickle import numpy as np import pandas as pd import psycopg2 pickle.HIGHEST_PROTOCOL = 3 # Output filenames static_filename = 'static_data.csv' static_columns_filename = 'static_colnames.txt' dynamic_filename = 'vitals_hourly_data.csv' columns_filename...
# ---------------------------------------------------------------------------- # Copyright (c) 2017 Massachusetts Institute of Technology (MIT) # All rights reserved. # # Distributed under the terms of the BSD 3-clause license. # # The full license is in the LICENSE file, distributed with this software. # -------------...
#! /usr/bin/env python3 # TODO: mode_remove: "rm: invalid option -- 'q'" # TODO: investigate crashes (happen only when giving new commands) # TODO: save logs from workers # TODO: cache previous backups? # TODO: add support for more machines? # TODO: check if redis IP can be non-local for VM? # TODO: change to control...
import pandas as pd import numpy as np import datetime from nltk.tokenize import sent_tokenize import networkx as nx import matplotlib.pyplot as plt import matplotlib.dates as mdates import matplotlib.ticker as mtick from matplotlib import cm from itertools import combinations def figure1(dataframe)...
""" Description: Experiment - Speaker Verification on VoxCeleb2 Author: <NAME> Date: 2021-03-19 ~ 2021-04-04 Model: 1. FBanks 80 2. resnet30m/resnet3m 3. AAM-Softmax (margin=0.2, scale=30) - Training Dataset: voxceleb2 as `train_list.txt`. - Validate Dataset: A part of voxceleb1 as `veri_test2.txt` (Vox1-O). - Test D...
# -*- coding: UTF-8 -*- # This code is mostly PEP8-compliant. See # http://www.python.org/dev/peps/pep-0008/. from __future__ import unicode_literals from collections import namedtuple from datetime import datetime import os import os.path import shutil from django import forms from django.contrib import admin, messa...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import os import os.path import tempfile import re import pickle from timeit import default_timer as timer import py2nb.tools import nbformat from sphinx.ext import intersphinx from nbconvert import RSTExporter from nbconvert.preproc...
#!/usr/bin/env python3 import asyncio from . import base from .furcbuffer import FurcBuffer from .account import Character from .colors import Colors LIVE_SERVER = ("lightbringer.furcadia.com", 6500) #Incoming message definitions class DefaultPacketHandler: async def message_unhandled(self, opcode, data): ...
# This file is part of GridCal. # # GridCal is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # GridCal is distributed in the hope that...
""" Docstring goes here """ import pickle import os from igraph import * import leidenalg as la import pandas as pd from pcst_fast import * import numpy as np import matplotlib import matplotlib.pyplot as plot from sklearn.metrics import confusion_matrix, normalized_mutual_info_score matplotlib.rcParams['pdf.fonttype'...
import numpy as np from matplotlib import pyplot as plt ''' COMPRESSOR MODEL Objective: build an equivalent compressor excitation to the acoustic FE model Output: volumetric flow (acoustic volume velocity) Assumptions: 1) Stead flow; 2) Ideal gas behaviour; 3) Compression and e...
#!/usr/bin/env python """ A very basic JavaScript/TypeScript preprocessor. Written by TheOnlyOne (@modest_ralts, https://github.com/LumenTheFairy). """ # Constants DEFAULT_IN_DIR = "./" DEFAULT_OUT_DIR = "./preprocessed/" ID_CH = r'[\w$]' import argparse from sys import stderr import os from stat import S_IREAD, ...
import argparse import h5py import multiprocessing as mp import numpy as np import os import sys import tensorflow as tf import time import julia backend = 'TkAgg' import matplotlib matplotlib.use(backend) import matplotlib.pyplot as plt matplotlib.use('TkAgg') from contexttimer import Timer import hgail.misc.utils...
#!/usr/bin/env python """ Copyright 2016 <NAME> Licensed under MIT (https://github.com/brianquach/udacity-nano-fullstack-conference/blob/master/LICENSE) # noqa """ from collections import Counter import endpoints import json import random from google.appengine.api import taskqueue from google.appengine.ext import ndb...
from ophyd.areadetector import AreaDetector, HDF5Plugin from ophyd.areadetector.plugins import PluginBase from ophyd.areadetector.filestore_mixins import (FileStoreHDF5IterativeWrite, FileStorePluginBase, FileStoreIterati...
import argparse import functools import logging import os import re import sys from datetime import datetime from esphome import const, writer, yaml_util import esphome.codegen as cg from esphome.config import iter_components, read_config, strip_default_ids from esphome.const import ( ALLOWED_NAME_CHARS, CONF_...
# Copyright INRIM (https://www.inrim.eu) # See LICENSE file for full licensing details. import copy import sys import os from os import listdir from os.path import isfile, join import ujson from ozon.settings import get_settings from .database.mongo_core import * from .database.cache.cache import get_cache from collect...
"""This script runs a validation case of Ptera Software’s UVLM. I first emulate the geometry and kinematics of a flapping robotic test stand from "Experimental and Analytical Pressure Characterization of a Rigid Flapping Wing for Ornithopter Development" by <NAME>, <NAME>, and <NAME>. Then, I run the UVLM simulation o...
#!/usr/bin/env python3 __doc__ = \ """The Developmental Cognition and Neuroimaging (DCAN) lab fMRI Pipeline [1]. This BIDS application initiates a functional MRI processing pipeline built upon the Human Connectome Project's minimal processing pipelines [2]. The application requires only a dataset conformed to the BID...
import os import json import tempfile import base64 from mock import patch, call, create_autospec import unit from nose.tools import assert_equal, assert_in, assert_raises, assert_is_none, assert_is_not_none, \ assert_not_equals, assert_true import synapseclient from synapseclient import Evaluation, File, Folder ...
import os import os.path import io import tempfile import json as js import re from itertools import tee from functools import wraps import functools as ft import threading from urllib.parse import urlparse as parse_url from urllib.parse import parse_qs import numpy as np import keyword import uuid from .bitmap impor...
# 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...
# -*- coding: utf-8 -*- """ Created on Thu Feb 01 08:07:14 2018 @author: zhaoy """ import os import os.path as osp import numpy as np import json import argparse from fnmatch import fnmatch import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt from matplotlib.ticker import AutoMinorLocator from numpy...
''' Author: <NAME> Date: Feb 19, 2019 Purpose: Autonomously creates an organized Weighted Decision Matrix after the user inputs required data to the table. Version: 1.0 ''' import xlsxwriter def addCriteria(): print("\nAdding criteria") criteriaName = input("Enter criteria name: ") cri...
import bz2 import csv import datetime import io import json import logging import os import re import zipfile from concurrent.futures import ProcessPoolExecutor from contextlib import suppress import dateutil.parser from dateutil.tz import tzutc from parsel import Selector from brightsky.db import fetch from brightsk...
#!/usr/bin/env python import time import sys, os, argparse, re import numpy as np import fitsio import desispec.io from desispec.io import findfile from desispec.io.util import create_camword, decode_camword, parse_cameras # from desispec.calibfinder import findcalibfile from desiutil.log import get_logger from . ...
import sys import pytest import copy from sdl2.ext import color from sdl2.ext.color import Color from sdl2.ext.compat import * @pytest.fixture(scope="module") def test_colors(): # Define some RGB colors for testing rgb = [ (0, 0, 0), (255, 255, 255), (255, 0, 0), (0, 255, 0), (0, 0, 255), ...
import os import numpy as np import fitsio from astrometry.util.fits import fits_table from astrometry.util.ttime import Time from wise.unwise import get_unwise_tractor_image import logging logger = logging.getLogger('legacypipe.unwise') def info(*args): from legacypipe.utils import log_info log_info(logger, ...
#!/usr/bin/env python #coding:utf-8 # Purpose: table, consisting of basic R12 entities # module belongs to package: dxfwrite.py # Created: 18.03.2010 # Copyright (C) 2010, <NAME> # License: MIT License """ Table object like a HTML-Table, buildup with DXF R12 entities. Cells can contain Multiline-Text or DXF-BLOCKs, or...
'''This module contains functions that will be used in riverbuilder project.''' import numpy as np import math from random import random import random as rd import copy def modx(array): '''Return an array is in range [0, 2*pi]''' xmin = np.amin(array) xmax = np.amax(array) xlen = xmax-xmin return ...
""" Codes for gas, oil, and water PVT correlations @author: <NAME> @email: <EMAIL> """ """ GAS """ def gas_pseudoprops(temp, pressure, sg, x_h2s, x_co2): """ Calculate Gas Pseudo-critical and Pseudo-reduced Pressure and Temperature * Pseudo-critical properties For range: 0.57 < sg < 1.68 (Sutton, 1985) ...
from __future__ import print_function from mojo.glyphPreview import GlyphPreview import AppKit import math import vanilla import mojo.drawingTools as drawBot from mojo.canvas import Canvas from pprint import pprint import importlib import kerningHelper importlib.reload(kerningHelper) import pairView importlib.reload(p...
import sys import os import time import numpy as np import serial ### pip install serial, pip install pyserial import struct import logging # import dlib import copy from imutils.video import VideoStream from imutils.video import FPS import argparse import imutils import time # Threads # from thread import start_new...
# Copyright (c) 2020-2021 The Linux Foundation # # SPDX-License-Identifier: Apache-2.0 import os from west import log from west.util import west_topdir, WestNotFound from zspdx.cmakecache import parseCMakeCacheFile from zspdx.cmakefileapijson import parseReply from zspdx.datatypes import DocumentConfig, Document, Fi...
import pandas as pd import codecs import json import gensim import os import joblib from tqdm import tqdm from sklearn.preprocessing import StandardScaler from sklearn.linear_model import LogisticRegression from sklearn.metrics import f1_score from sklearn.model_selection import KFold import numpy as np import pandas a...
#!/usr/bin/env python3 import os import sys import sqlite3 # v3.3+ import plistlib import codecs import re import argparse scriptFilePath = os.path.realpath(__file__) scriptRoot = os.path.abspath(os.path.join(scriptFilePath, os.pardir)) PATH_DB = os.path.join(scriptRoot, 'stringslator.db') def main(): ARGSPars...
from functools import partial, singledispatch import cgen as c from sympy import Function import numpy as np from devito.core.cpu import CustomOperator from devito.core.operator import OperatorCore from devito.data import FULL from devito.exceptions import InvalidOperator from devito.ir.equations import DummyEq from ...
#!/usr/bin/env python3 # # Copyright 2011-2015 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT lic...
''' 1- load a file 2- extract segments 3- augment 4- pad the signal (if necessary) 5- extracting log spectrogram from signal 6- normalize spectrogram 7- save the normalized spectrogram Preprocessing Pipeline ''' # https://www.youtube.com/watch?v=O04v3cgHNeM&ab_channel=ValerioVelardo-TheSoundofAI&loop=0 from re impo...
############################################################################### ### ### p1_proc ### This file is part of CorePressure ### This file was created by Dr <NAME> ### includes a set of fuctions to process walking data from pedar ### ### Copyright (C) 2018 University of Salford - All Rights Reserved ### Y...
# @Author : guopeiming # @Contact : <EMAIL> import torch from queue import Queue import numpy as np import torch.nn as nn from utils import chart_helper from utils import trees from utils.vocabulary import Vocabulary from utils.transliterate import TRANSLITERATIONS, BERT_TOKEN_MAPPING from typing import List, Dict, Uni...
from tqdm import tqdm import pandas as pd import numpy as np import multiprocessing import datetime import pickle # import copy # 效率太低 import time import json import csv import sys import IPython from vizml_look_at_chart import * sys.path.insert(0, '..') from helpers.logger import logger from feature_extraction.chart...
import numpy as np import torch from common.dataset.pre_process.hm36 import load_data, prepare_dataset, load_2d_data, prepare_2d_data, normalization from common.arguments.basic_args import parse_args from common.plot_pose3d import plot17j import os args = parse_args() cal_mean = False cal_distance = True dataset_root...
# Copyright (c) 2015-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # from __future__ import ...
# -*- coding: utf-8 -*- """ :::::::::::::::::::::::: Critical Infrastructure Cyberspace Analysis Tool (CICAT) ::::::::::::::::::::::::::::::::::::::: NOTICE The contents of this material reflect the views of the author and/or th...
import asyncio import enum import hashlib import secrets import uuid as uuid_module import warnings from datetime import datetime, timedelta from typing import Optional from fastapi import APIRouter, Depends, HTTPException, Request, Response, Security from fastapi.openapi.models import APIKey, APIKeyIn from fastapi.se...
# Copyright 2020-2021 <NAME> <<EMAIL>> # # 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 w...
try: import openpyxl as pyxl from openpyxl.worksheet.datavalidation import DataValidation import pandas as pd import xlwings as xw import pyperclip except ImportError: print('Please install the following dependencies:') print('openpyxl') print('pandas') print('xlwings') print('py...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2015-2018 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
# Copyright 2018 <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, software ...
#!/usr/bin/python # # Copyright (c) 2015, Arista Networks, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # Redistributions of source code must retain the above copyright notice, # t...
# -*- coding: utf-8 -*- """ COVID-19 Microsimulation Model @author: <NAME> (<EMAIL>) """ import numpy as np import json from enums import * def dict_to_array(d): if type(d) is dict: return [dict_to_array(v) for v in list(d.values())] else: return d def normalized(a, axis=-1, order=2): ...
#!/usr/bin/env python3 import errno import multiprocessing import os import pipes import re import shlex import shutil import signal import subprocess import sys import mutagen.flac import tagging encoders = { '320': {'enc': 'lame', 'ext': '.mp3', 'opts': '-h -b 320 --ignore-tag-errors'}, 'V0': {'enc': '...
import random from typing import List, Dict, Optional import numpy as np import math import matplotlib.pyplot as plt import scipy.stats as st max_pop1 = 50 # max_pop1 = 100 # max_pop2 = 150 # parent_percent = 0.1 # parent_percent = 0.2 # parent_percent = 0.4 # parent_percent = 0.5 # parent_percent = 0.6 parent_percent...
import stompy, pprint, urllib, requests, json, time, traceback from data_dispatcher.db import DBFile, DBProject, DBReplica, DBRSE, DBProximityMap from pythreader import PyThread, Primitive, Scheduler, synchronized, LogFile, LogStream from data_dispatcher.logs import Logged from daemon_web_server import DaemonWebServer ...
#coding=utf8 from sqlalchemy import or_, and_ from flask import Blueprint, g, request, jsonify from flask_login import LoginManager, login_user, logout_user, login_required, current_user from extensions.database import db from extensions.permissions import admin_perm, manager_perm, normal_perm from models.stockin im...
from flask import Flask, render_template, request, redirect, url_for, session, jsonify import joblib from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure import matplotlib.pyplot as plt from matplotlib.style import use import numpy as np from sqlalchemy import...
import os import time from collections import deque import ipywidgets import jpy_canvas import numpy as np from ipywidgets import IntSlider, VBox, HBox, Checkbox, Output, Text, RadioButtons, Tab from numpy import array import flatland.utils.rendertools as rt from flatland.core.grid.grid4_utils import mirror from flat...
"""----------------------------------------------------------------------------- bidsArchive.py Implements interacting with an on-disk BIDS Archive. -----------------------------------------------------------------------------""" import functools import json import logging import os import re from typing import List...
import mock from mock import patch import nengo from nengo.cache import NoDecoderCache import numpy as np import pytest from six import itervalues from nengo_spinnaker.builder.builder import ( Model, spec, ObjectPort, _make_signal_parameters ) from nengo_spinnaker.builder.model import SignalParameters from nengo_s...
# # # 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 n...
# -*- coding: utf-8 -*- from SkinningTools.py23 import * from SkinningTools.UI.qt_util import * from SkinningTools.UI.utils import * import math _DIR = os.path.dirname(__file__) class BezierFunctions(object): """ collection object for all functions that help create bezier curves https://en.wikiped...
from __future__ import print_function import datetime import glob import json import multiprocessing import os import pickle import sys import warnings from string import digits import re import matplotlib.pyplot as plt import numpy as np import pandas as pd from dateutil import parser from gensim.models import KeyedV...
import logging from typing import ( Dict, List, NamedTuple, Optional, Tuple, ) from eth_utils import ( encode_hex, ValidationError, ) import trio from trio.abc import ( ReceiveChannel, SendChannel, ) from async_service import ( LifecycleError, Service, TrioManager, ) ...
from __future__ import print_function from __future__ import division # ------------------------------------------------------------------------------------------------ # Copyright (c) 2016 Microsoft Corporation # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and # ass...
import logging import time import numpy as np from scipy.stats import chi2 from ..models import pv, ais from ..pyTarget import Target from munkres import munkres # https://github.com/jfrelinger/cython-munkres-wrapper # import pymunkres # https://github.com/erikliland/munkres # import scipy.optimize.linear_sum_assignm...
#!/usr/bin/env python """ functions required for precomputing the barycentric trees utilises the special properties of the trees to compute and store them in a very compact (barycentric) format. this can be done very efficiently, enabling trees for very large (e.g. high dimensional) problems. due to the nested (recur...
#!/usr/bin/env python r""" Interface for viewing images with the ds9 image viewer. Loosely based on XPA, by <NAME>. Before trying to use this, please read Requirements below. Here is a basic summary for use: import opscore.RO.DS9 import numpy ds9Win = opscore.RO.DS9.DS9Win() # show a FITS file in fra...
"""This file contains methods for importing Bio-Logic mpr-type files""" # This is based on the work by <NAME> # (https://github.com/chatcannon/galvani/blob/master/galvani/BioLogic.py) import os import tempfile import shutil import logging import warnings import time from collections import OrderedDict import datetime i...
from __future__ import print_function import os import hashlib import numpy as np, healpy as hp from lensit.misc.misc_utils import binned, enumerate_progress from lensit.ffs_covs import ell_mat, ffs_specmat def apodize(lib_datalm, mask, sigma_fwhm_armin=12., lmax=None, method='hybrid', mult_factor=3, min_factor=0.1)...
"""Core functionality of daemonocle""" import errno import os import posixpath import resource import signal import socket import subprocess import sys import time from math import fsum import click import psutil from ._utils import ( check_dir_exists, chroot_path, exit, format_elapsed_time, get_proc_group_c...
"""Scarf algorithm library for python3. Create and solve a stable matching instance with couple using Scarf's algorithm. <NAME> <<EMAIL>> """ import numpy as np from scipy import sparse as sp import scarf.core __all__ = [ "ScarfInstance", "create_instance", "solve", "round" ] def _is_unique(li): """Check i...
"""Iterators and tools for jackknife estimators""" import random from warnings import warn from time import sleep import numpy as np from scipy.special import comb from itertools import combinations from contextlib import ExitStack from ecogdata.parallel.mproc import parallel_context, make_stderr_logger, timestamp impo...
import json import os.path from mimetypes import guess_type from django.core.paginator import Paginator from django.http import JsonResponse, HttpResponseNotAllowed from django.shortcuts import render from django.contrib import messages from django.contrib.auth import update_session_auth_hash from django.contrib.auth....
keycodes={ #BASIC KEYCODES "KC_NO,":" Null ,", "XXXXXXX,":" Null ,", "_______,":" ,", "KC_TRNS,":" ,", "KC_A,":" A ,", "KC_B,":" B ,", "KC_C,":" C ,", "KC_D,":" D ,", "KC_E,":" E ,", "KC_F,":" F ,", "KC_G,":" G ,", "KC_H,":"...
from typing import Dict import torch import pretty_midi as pm import music21 as m21 import numpy as np from datatypes import Chord, Pattern, Song import chords from device import device from config import HuggingFaceConfig import data from preprocess_wikifonia import process_m21_part def get_predict_mask(mask, mask_...
from PySide.QtCore import* from PySide.QtGui import* import pyaudio import wave import time import numpy as np from collections import OrderedDict from filters import FilterType, Filter, FilterChain from utility import byteToPCM, floatToPCM, pcmToFloat, sosfreqz, toPixelCords, fromPixelCords filterTypes = OrderedDict(...
# -*- coding: UTF-8 -*- # SYSTEM REQUIREMENTS # This program has been successfully run under Mac OS 10.10; it is standard Python 2.7 # so it should also run in Unix or Windows. # # INITIAL PROVENANCE: # Programmer: <NAME> # Parus Analytics # Charlottesville, VA, 22901 U.S.A. # http://eventdata.parusanalytic...
# This file was forked and heavily modified from the file here: # https://github.com/deepmind/spriteworld/blob/master/spriteworld/sprite.py # Here is the license header for that file: # Copyright 2019 DeepMind Technologies Limited. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use t...
""" Metrics for assessing imputation quality Het/Hom ratio Improving imputation quality in BEAGLE for crop and livestock data - switch-error rate for imputation quality - idem ? Comparison and assessment of family- and population-based genotype imputation methods in large pedigrees - Mean squared correla...
#!/usr/bin/env python import os import sys import requests import json import defusedxml.ElementTree as ET import configparser import logging import logging.handlers import argparse import ldap import re # set up logging LOGGER = logging.getLogger("AMS User create script") ACCEPTED_RDNS = [ "emailAddress", "CN",...
#!/usr/bin/env python """ Utility for computing test failure rates from the Evergreen API. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import datetime import itertools import logging import operator import optparse import os impo...
# Figure 5, panels (e), (f), (g) and (h) import sys sys.path.append("../../") device_str, lang, _dpi = sys.argv[1], sys.argv[2], int(sys.argv[3]) ########################################################### from pathlib import Path reproduced_results = Path("reproduced-results") from sympy import exp as sp_exp from...