text
stringlengths
6.04k
39.5k
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author : 河北雪域网络科技有限公司 A.Star # @contact: <EMAIL> # @site: www.snowland.ltd # @file: _SM2.py # @time: 2018/12/03 15:11 # @Software: PyCharm from functools import reduce from random import choices, randint from pysmx.SM3 import KDF from pysmx.crypto import hashlib from ...
from math import sin, cos, sqrt, atan2, radians import copy import matplotlib.pyplot as plt import rospy from geometry_msgs.msg import PoseStamped from geometry_msgs.msg import Pose2D from swarm_search.msg import sip_goal from nav_msgs.msg import Odometry from mavros_msgs.msg import State from mavros_msgs.msg import ...
import os import sys from copy import deepcopy from datetime import datetime from functools import partial from itertools import chain from pathlib import Path from tempfile import NamedTemporaryFile from typing import List, Union, Callable, Optional, Any, Tuple, Dict from .base import Options, OptionsGroup from .exce...
import boto3 import botocore # import jsonschema import json import traceback from extutil import remove_none_attributes, account_context, ExtensionHandler, \ ext, component_safe_name # def validate_state(state): # "prev_state": prev_state, # "component_def": component_def, RENDERED # "op": op, # "s3_object_name"...
# Copyright (c) 2020 cgsdfc # # This software is released under the MIT License. # https://opensource.org/licenses/MIT from collections import namedtuple import enum from typing import Sequence, Union import abc def HackerCaseToCamelCase(s: str): return ''.join(map(str.capitalize, s.split('_'))) NameBundle = n...
"""Blender CityJSON plugin utils module This modules provides utitily methods for the importing/exporting processing of CityJSON files """ import bpy, idprop ########## Importer functions ########## def remove_scene_objects(): """Clears the scenes of any objects and removes world's custom properties and c...
import gym from rlpyt.envs.gym import EnvInfoWrapper, info_to_nt from rlpyt.spaces.gym_wrapper import GymSpaceWrapper from rlpyt.envs.base import EnvSpaces, EnvStep import procgen import cv2, os import numpy as np from typing import Any, Dict, List, Sequence, Tuple from gym.spaces import Box, Dict, Discrete as Discr...
import random import os def clear(x,y): mask = (~x)&0xffffffff return y & mask def sltu (x,y): return 1 if (x<y) else 0 def s(x, y): return (x + y) & 0xffffffff def r(x, y): return (x - y) & 0xffffffff def a(x, y): return x def b(x, y): return y def ran(x,y): return random.randint...
""" Utilities functions Created by <NAME> Date: 2021/07/15 """ import torch as t import torchvision as tv import os import shutil import sys import numpy as np import matplotlib.pyplot as plt from model import CMT_Ti, CMT_XS, CMT_S, CMT_B from PIL import Image ############################## # ...
import numpy as np from operator import or_ from functools import reduce from typing import List, Sequence, Set, Callable, Dict from sympy import symbols, simplify, expand, expand_trig, degree, solve from sympy import cos, sin, sqrt, exp, Add from sympy.abc import x, y, z, phi, theta from pinchon.shared.spherical im...
"""Download and pre-process SQuAD and GloVe. Usage: > source activate squad > python setup.py Pre-processing code adapted from: > https://github.com/HKUST-KnowComp/R-Net/blob/master/prepro.py Author: <NAME> (<EMAIL>) """ import numpy as np import torch import os import sys import spacy import ujson ...
from argparse import ArgumentParser import itertools import math import os from typing import Any, Dict import matplotlib as mpl import matplotlib.cm as cm import matplotlib.pyplot as plt from matplotlib.collections import LineCollection import numpy as np import pandas as pd import torch import torch.nn as nn from to...
# Copyright (c) 2020-2021 impersonator.org authors (<NAME> and <NAME>). All rights reserved. import cv2 import numpy as np import torchvision from typing import Union, List import torch from scipy.spatial.transform import Rotation as R def compute_scaled_size(origin_size, control_size): """ Args: or...
#!/usr/bin/env python3 import json import glob import os import shutil import sys # A command-line utility for hopping around the filesystem. # # Copyright (C) 2013-2018, Abstrys / <NAME> # # This file is released under the terms of the GNU General Public License, v3. # For details about this license, see LICENSE.txt ...
#!/usr/bin/env python # coding: utf-8 """ @author: LIDeB UNLP """ # SOMoC is a clustering methodology based on the combination of molecular fingerprinting, # dimensionality reduction by the Uniform Manifold Approximation and Projection (UMAP) algorithm # and clustering with the Gaussian Mixture Model (GMM) algorithm....
from docutils import nodes, writers import json import os.path import re from sphinxswagger import document URI_TEMPLATE_RE = re.compile(r'\(\?P<([^>]*)>.*\)') def _find_param_separator(tokens): """ Return the index of the param separator. :param list tokens: list of tokens on the parameter line :...
from basicgeo import P2, Along, Partition1, I1 from .vbsimplegeometrycalculations import RightSideHorizonSlice, DHorizonSliceDist import math sendactivity = None def ProjToHorizonBox(p, v, urg, vrg): assert urg.ContainsStrict(p.u) and vrg.ContainsStrict(p.v) assert v.Lensq() != 0.0 if v.v > 0.0: v...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import shutil import os import urllib.request import subprocess from Bio import SeqIO from Bio.SeqRecord import SeqRecord def make_containerized_cmd(args, image, dcommand, scommand, indir=None, outdir=None, sing=None): """ no...
import tensorflow as tf from IPython import embed from dialog.base_model import BaseTower, BaseRunner from my.tensorflow.nn import linear import numpy as np class Embedder(object): def __call__(self, content): raise Exception() class VariableEmbedder(Embedder): def __init__(self, params, wd=0.0, ini...
# Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 import random from typing import Dict, List, Optional, Tuple from shared.insn_yaml import Insn from shared.operand import ImmOperandType, RegOperandType, OperandType from...
#!/usr/bin/env python # coding: utf-8 from ast import Index import os import math import json import sys import numpy as np import pickle import pandas as pd import librosa import pyworld as pw import soundfile as sf import miditoolkit import midiconvert as md import random import multiprocessing import secrets import...
import torch from torch import nn from torch.nn import functional as F import src.configurations.config as config from src.configurations.config import ModelParameters from src.utils import utils as utils from typing import Iterable, Union, Dict, List, Callable from torch.nn.modules.distance import CosineSimilarity fro...
# Sending simple OS metrics to InfluxDB. # Expected to be run as SystemD unit, with Restart=always # # If you don't like InfluxDB as a target, you just need to replace the following functions, everything else is generic: # connect_influx # write_influx # # Requires Python 3.6+ # # Additional modules (everything else is...
''' # Phonix and Soundex Python implementation This is an implementation of the phonix phonetic search algorith [1,2]. This follows the perl[3] and [4] C implementations. Phonix (phonetic indexing) is a technique based on Soundex, but to which 'phonetic substitution' has been added as an integral part of both the enco...
#------------------------------------------------------------------------------- # metrics_calculator.py # #Calculate comde metrics for register level, function level and module level. # # Copyright (C) 2015, <NAME> # License: Apache 2.0 #------------------------------------------------------------------------------- ...
import sys import traceback import pygame import pygame.font as font from pygame import Rect from pygame.locals import * from .theater import Theater, Camera from .actor import Actor, Image, ImageMaker, Text, Map, Background from .actor import Player, Wall, Bullet, Enemy, NPC, Anime, Menu, Button # 比较高一层的封装 from .act...
# Import libraries import numpy as np from numpy.polynomial import legendre from scipy.special import eval_legendre from .coords import dist_image from .image_manip import frebin ########################################################################### # Polynomial fitting ######################################...
from selenium import webdriver from selenium.webdriver.firefox.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions from selenium.common.exceptions import NoSuchElementException, TimeoutExcep...
#!env python import os import docker import logging import argparse import sys import tarfile import shutil import time import json import pathlib import numpy as np import common import worker import client import placement_controller import tornado_server ####################### ## General Functions ## ######...
# download flu prediction data sources # https://github.com/cmu-delphi/delphi-epidata # https://www.hhs.gov/about/agencies/regional-offices/index.html # https://www2.census.gov/geo/pdfs/maps-data/maps/reference/us_regdiv.pdf import os import subprocess import tarfile import numpy as np import pandas as pd import feat...
import pandas as pd import numpy as np from .. import extensions as ext import pytest import itertools def _as_2d_waterfall_signal(arg, repeat_n=3): return np.transpose(np.tile(arg, (repeat_n, 1))) @pytest.fixture def butterworth_test_signals(): sr = 100 t = np.linspace(0, 1, sr, False) mix_10_20_si...
import argparse import configparser import json import numpy as np import os import pandas as pd from pathlib import Path import skimage.io import skimage.transform import sys import time import torch import torch.utils.data import torchvision from tqdm import tqdm sys.path.insert(1, '/home/xview3/src') # use an appro...
# Copyright 2015 Ufora Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
# -*- coding: utf-8 -*- """ Color rendering of spectra ========================== :author: <NAME> <<EMAIL>> This module can convert spectra to RGB. It is inspired by John Walkers ``specrend.c`` and the respective python version of Andrew Hutchins, but is completely rewritten. The wavelenth resampling code is from Fl...
""" OSCP Buffer Overflow ToolBox --- @AlrikRr This script use some code from : - TryHackMe - OSCP OverflowPrep - sub-sub-command.py from @jirihnidek - And of course StackOverflow because argparse is a pain in the parse. To-Do : - Resolve Payload encoding problem ( Maybe bcause of the \\ ) exploit_init ...
import torch from torch import nn import numpy as np import random from termcolor import colored import inspect import os import sys import enum import time import math from functools import reduce import operator import datetime import inspect import torch.multiprocessing from scipy.stats import wasserstein_distance a...
#!/usr/bin/python3 import numpy as np import time import torch import torch.nn.functional as F from typing import Tuple """ Set of utilities for metric learning. We use extensive sampling techniques and also a contrastive loss to learn the metric space. """ def contrastive_loss( y_c: torch.Tensor, pred_dis...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE 蓝鲸基础平台 is licensed under the MIT License. License for BK-BASE 蓝鲸基础平台: ---------------------------------------------...
import logging from django.db import models from django.utils import timezone from django.utils.module_loading import import_string from django.utils.translation import gettext_lazy as _ from cms.contacts.models import Contact from cms.contexts.models import * from cms.contexts.models_abstract import AbstractLockabl...
# Copyright 2015 Huawei Technologies Co., Ltd. # 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 # # Unl...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jan 3 21:38:54 2020 @author: yinzhuo """ import os import warnings import pandas as pd import numpy as np import seaborn as sns from utils import LoadSave from utils import lgb_clf_training, xgb_clf_training, training_res_to_log import multiprocessing...
import argparse import torch import torch.nn as nn from torch.backends import cudnn from torch.utils import data import numpy as np import time import os, sys sys.path.append("..") import datetime import cv2 from src.networks import UNet_inpainter, Accumulate_LSTM_no_loss from src.data import Fusion_dataset_smpl_te...
"""Tests for geometry module""" import numpy import Box2D.b2 as b2 import shapely.geometry import shapely.ops import metis from metis.debug import graphical_debug, draw_polygon, draw_polygons def example_shapes(): """Generate example shapes for testing""" obstacle_geometry = shapely.geometry.box(0, 0, 10, 1...
# -*- coding: utf-8 -*- """ Azure Resource Manager (ARM) Key Vault State Module .. versionadded:: 2.0.0 .. versionchanged:: 4.0.0 :maintainer: <<EMAIL>> :configuration: This module requires Azure Resource Manager credentials to be passed via acct. Note that the authentication parameters are case sensitive. ...
import torch import os import json import numpy as np from PIL import Image import matplotlib.pylab as plt from matplotlib.font_manager import FontProperties from sklearn.model_selection import train_test_split, StratifiedKFold from torch.utils.data import Dataset, DataLoader import torchvision.transforms as T from uti...
""" --- Day 22: Crab Combat --- It only takes a few hours of sailing the ocean on a raft for boredom to sink in. Fortunately, you brought a small deck of space cards! You'd like to play a game of Combat, and there's even an opponent available: a small crab that climbed aboard your raft before you left. Fortunately, i...
#!/usr/bin/python3 """ This module updates the docker images of the docker-compose on the given path """ from contextlib import contextmanager from email.mime.text import MIMEText from collections import defaultdict import smtplib import logging import argparse import re import os import sys import subprocess import so...
import logging from typing import Generator, Iterable, List, Optional, Tuple, Union import numpy as np import pandas as pd import helpers.dbg as dbg _LOG = logging.getLogger(__name__) # ############################################################################# def _crop_data_frame_in_batches( df: pd.DataFr...
import pygame from pygame.locals import * import sys import time import constants as c ''' upImageFilename1 = 'Resources/graphics/Main_Mune_buttom/Play_Unselected14050.png' downImageFilename1 = 'Resources/graphics/Main_Mune_buttom/Play_selected14050.png' upImageFilename2 = 'Resources/graphics/Main_Mune_buttom/o...
import sublime, sublime_plugin import json import os import requests import time import re from functools import lru_cache UUID_PATTERN = re.compile(r'[\da-f]{8}-([\da-f]{4}-){3}[\da-f]{12}', re.IGNORECASE) # Basic information for any payloads we send to the REST API headers = { 'Authorization': "", ...
#!/usr/bin/python3 # Note: # Convert unicode codepoint to UTF8 hex in python # https://stackoverflow.com/questions/867866/convert-unicode-codepoint-to-utf8-hex-in-python # >>> chr(int('fd9b', 16)).encode('utf-8') import time import os import os.path import pathlib import contextlib import argparse import yaml ...
from __future__ import absolute_import, division, print_function from logging import raiseExceptions from typing import ValuesView from modeling_cnap import CNAP, GenTaskEmbForEachAdapterMixIn, InitAdaptForInputOutputMixIn, LoadPretrainedBaseMixIn from torch import autograd from utils import MyDataParallel, dist_metri...
# -*- coding: utf-8 -*- # Copyright 2017 FireEye, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
# Copyright 2020 Magic Leap, Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writin...
# -*- coding: utf-8 -*- """ Created on Wed Aug 15 13:14:09 2018 @author: 北海若 """ import keras from keras import layers import rl.core import rl.memory import rl.policy import rl.agents.dqn import rl.callbacks import copy from rl.callbacks import ( CallbackList, TrainEpisodeLogger, TrainIntervalLogger, ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import datetime import json import os import shutil import subprocess import tempfile from polyarchiv.conf import Parameter, check_executable from polyarchiv.termcolor import cprint, YELLOW, CYAN, GREEN, RED, BOLD, WHITE from polyarchiv.u...
#!/usr/bin/env python # coding=utf-8 # Copyright 2020 The HuggingFace Team 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-...
""" AGENT: individual attributes """ import random class FemaleState: juvenile, cycling, pregnant, nursing0, nursing1 = range(5) class MaleState: juvsol, sol, fol, lea = range(4) class SavannahRhp: rhp = { "1": {7: 60, 7.5: 80, 8.0: 100, 8.5: 96.5, 9.0: 93, 9.5: 89.5, 10.0: 86, 1...
""" Basic items. """ from __future__ import absolute_import from builtins import map from builtins import object from builtins import range from builtins import zip from functools import reduce from math import atan2 from weakref import WeakKeyDictionary try: # python 3.0 (better be prepared) from weakref imp...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ppppv.py MIT license (c) 2018 Asylum Computer Services LLC """ import re import sys import os import argparse from os import listdir from os.path import isfile, join from time import gmtime, strftime class Ppppv(object): def __init__(self, args): se...
""" stereo graph library """ import itertools import functools import numpy from automol.util import dict_ import automol.util from automol.graph._embed_dep import rings_bond_keys from automol.graph._graph_dep import atom_stereo_parities from automol.graph._graph_dep import bond_stereo_parities from automol.graph._grap...
# -*- coding: utf-8 -*- """Top-level package for nbgwas_rest.""" __author__ = """<NAME>""" __email__ = '<EMAIL>' __version__ = '0.7.1' import os import shutil import json import uuid import time import flask from flask import Flask, request, jsonify from flask_restplus import reqparse, abort, Api, Resource desc = ...
# Copyright (c) 2015, National Documentation Centre (EKT, www.ekt.gr) # 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 # n...
"""jello - query JSON at the command line with python syntax""" import os import sys import platform import textwrap import json import signal import ast from pygments import highlight from pygments.style import Style from pygments.token import (Name, Number, String, Keyword) from pygments.lexers import JsonLexer from...
import torch import numpy as np import copy import bisect import heapq import scipy from predict_utils import find_bpe_position_by_offset from torch.utils.data import DataLoader from tensorflow.keras.preprocessing.sequence import pad_sequences import logging logger = logging.getLogger('usem-experiments') ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Jun 24 14:38:56 2021 @author: <NAME> <<EMAIL>>, <NAME> <<EMAIL> """ import pandas as pd import numpy as np from loguru import logger from .io import open_output_files from .io import write_gtf from .io import write_output from .bedtools import prep_bed...
import os import torch import numpy as np import re import queue import torch.nn as nn import random import os import sys def create_emb(weight_matrix, non_trainable=False): # create embedding matrix with the pretrained GloVe embedding matrix emb_layer = torch.nn.Embedding(weight_matrix.shape[0], weight_matri...
################################################################################################################################ # General setup ################################################################################################################################ # Import libraries import sys import nu...
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
import scipy, numpy, typing, numbers from tequila.objective import Objective from tequila.objective.objective import assign_variable, Variable, format_variable_dictionary, format_variable_list from .optimizer_base import Optimizer from tequila.circuit.gradient import grad from ._scipy_containers import _EvalContainer, ...
import sqlite3 import sys import warnings from itertools import chain from typing import Callable, Generic, Optional, Tuple, Union, cast, overload if sys.version_info >= (3, 9): from collections.abc import Iterable, Iterator, Mapping, MutableMapping, Reversible else: from typing import Iterable, Iterator, Mapp...
"""qm contains functions for the quantum-mechanical (second-order) calculation of NMR spectra. The qm module provides the following attributes: * CACHE : bool (default True) Whether saving to disk of partial solutions is allowed. * SPARSE : bool (default True) Whether the sparse library can be used. The qm m...
# Dependencies import os import pickle import sys from colorama import Fore # Makes colorama module work in Windows console os.system("") # Makes hide/show cursor functions work depending on os if os.name == 'nt': import ctypes class _CursorInfo(ctypes.Structure): _fields_ = [("size", ctypes.c_int)...
from enum import auto from time import sleep from typing import Any, Dict, List, Optional, Union from mstrio import config from mstrio.api import migration from mstrio.connection import Connection from mstrio.types import ObjectTypes from mstrio.users_and_groups.user import User from mstrio.utils import helper from ms...
# ***************************************************************** # Copyright 2013 MIT Lincoln Laboratory # Project: SPAR # Authors: JCH # Description: Classes related to artifical XML-generation # Modifications: # Date Name Modification # ---- ---- ...
""" Configuration and constants =========================== dtmm configuration functions and constants """ from __future__ import absolute_import, print_function, division import numpy as np from functools import wraps import os, warnings, shutil #warnings.simplefilter('always', DeprecationWarning) def deprecatio...
import argparse import pandas as pd import numpy as np import tensorflow as tf print(f'using tensorflow version {tf.__version__}') from tensorflow.keras.layers import ( Dense, Flatten, BatchNormalization, Conv3D, SpatialDropout3D, Dropout, Activation, LeakyReLU, MaxPooling3D ) from tensorflow.keras.optimiz...
from glob import glob from os.path import join as pjoin import cv2 import numpy as np from functools import wraps try: from PIL import Image pil_available = True except ImportError: pil_available = False # try: # import cv2 # cv2_available = True # except ImportError: # cv2_available = False...
# @Author : guopeiming # @Contact : <EMAIL> import torch 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, Union, Tuple from utils.tre...
import os import numpy as np import pytest try: import flopy except: msg = "Error. FloPy package is not available.\n" msg += "Try installing using the following command:\n" msg += " pip install flopy" raise Exception(msg) from framework import testing_framework from simulation import Simulation p...
"""Simple database for map statistics.""" from __future__ import annotations import datetime import sqlite3 from pathlib import Path from pprint import pprint from typing import Callable from typing import List from typing import Optional import matplotlib.pyplot as plt import matplotlib.ticker import numpy as np im...
# parameters.py import myGauss from Tools import * import commonVar as common import networkx as nx import matplotlib as mplt import numpy.random as npr import pandas as pd from IPython import get_ipython import pandas as pd import numpy as np import sys def fInput(label): x = "" while x=="" or " " in x: ...
from collections import Counter import nltk from tqdm import tqdm import torch import numpy as np import matplotlib.pyplot as plt import pandas as pd import logging import os import declxml as xml import json # requirement """ declxml==0.9.1 """ """ xml and txt are two formats of object detection labels, they are same...
# -*- coding: utf-8 -* """import""" import collections import json import unicodedata from collections import OrderedDict import six from ..common.rule import MaxTruncation from . import params import os, tarfile def append_name(name, postfix): """ append name with postfix """ if name is None: ret = N...
# Design restaurant recommender system from importlib.machinery import SourceFileLoader helper = SourceFileLoader("Heap.py", "./Heap.py").load_module() # Note: need to add ratings to restaurants before you calculate average rating. # throw in API. # ratings = {restaurant_id: <rating>} class RestaurantRecommender...
from __future__ import annotations import json import warnings from pathlib import Path from typing import Any, Dict, List, Optional, Tuple, Union import emcee import h5py import numpy as np import pandas as pd from scipy.special import factorial as fact import lymph def lyprox_to_lymph( data: pd.DataFrame, ...
from typing import Dict, Tuple, List, Any, Union import numpy import matplotlib.pyplot as plt import matplotlib.ticker as ticker from netzob.Model.Vocabulary.Messages.AbstractMessage import AbstractMessage from nemere.visualization.plotter import MessagePlotter from nemere.inference.segments import MessageSegment, T...
''' Module : Main Description : The main entry point for the program. Copyright : (c) <NAME>, 19 Sep 2019 License : MIT Maintainer : <EMAIL> Portability : POSIX Count frequency of DNA bases at genomic positions. ''' from argparse import ArgumentParser import sys import logging import pkg_resources impo...
import numpy as np import sys import os from netCDF4 import Dataset from datetime import datetime, timedelta PLOT = True PLOT = False quick = False #quick = True FT0 = False #FT0 = True def read_CZ( Kobe=False ): if Kobe: fn = "/data_honda01/honda/SCALE-LETKF/AIP_SAFE/DEBUG256p/D4_500m20191206_np256/2019...
import json from datetime import datetime, timedelta import pytest from infoblox.scripts import cli from tests.helpers import assert_list_items, assert_in_output pytestmark = pytest.mark.usefixtures('client', 'resource', 'env_settings') @pytest.fixture(scope='module') def cud_options(): """Common options for ...
""" Python implementation of the generalized PCA for dimension reduction of non-normally distributed data. The original R implementation is at https://github.com/willtownes/glmpca """ import numpy as np from numpy import log from scipy.special import digamma, polygamma import statsmodels.genmod.families as smf from dec...
# abci: cloudq agent for ABCI # # Copyright 2021 # National Institute of Advanced Industrial Science and Technology (AIST), Japan and # Hitachi, 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 ...
import numpy as np from . import _algorithm from spotpy.parameter import ParameterSet class DDSGenerator: """ This class is used by the DDS algorithm to generate a new sample of parameters based on the current one. Current parameter are exchanged in `ParameterSet` objects. """ def __init_...
import numpy as np import math import os import argparse import logging import configparser import const import glob import multiprocessing as mp import pandas as pd from os.path import join logger = logging.getLogger('kf') def init_logger(): logger.setLevel(logging.DEBUG) # create console handler and set lev...
# creatJSON.py # parameters: ## input file: either: url to github repository OR markdown documentation file path ## output file: json with each excerpt marked with all four classification scores import argparse import json import base64 from urllib.parse import urlparse import sys import os from os import path from pa...
""" Created on 20.05.2016 @author: <NAME> """ from itertools import permutations from collections import defaultdict from collections import deque from scipy.spatial.distance import cosine import spacy from spacy.lookups import load_lookups from evidencegraph.utils import window from evidencegraph.resources import ...
"""Collection of input pipelines. An input pipeline defines how to read and parse data. It produces a tuple of (features, labels) that can be read by tf.learn estimators. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_lit...
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
## @file # Check a patch for various format issues # # Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made # available under the terms and conditions of the BSD License which # accompanies this distribution. The full text of t...
#!/usr/bin/env python import concurrent.futures import json import os import sys from collections import Counter, namedtuple from enum import Enum from math import log from os import path from pathlib import Path import click import pysam from align.calign import aligner from Bio import SeqIO __author__ = ["<NAME>",...