text
stringlengths
6.04k
39.5k
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT Generic fixtures bundled with LyTestTools These fixtures will be available to the end user without requiring to imp...
from arango import ArangoClient from bisect import bisect import networkx as nx import numpy as np import zipfile import tarfile import requests import json import csv import os GRAPH_TEMPLATE = GRAPH_3D_TEMPLATE = COMPARE_GRAPH_TEMPLATE = None BACKUP_URL = 'https://storage.googleapis.com/brightid-backups/brightid.tar...
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incor...
""" Polynomial NARX model. """ from __future__ import division, print_function, absolute_import import numpy as np from .narx import NarxModel __all__ = [ 'Polynomial', 'Monomial' ] class Polynomial(NarxModel): """ Polynomial NARX model. ``y[n] = F(y[n-1],..., y[n-N], u[n-delay],..., u[n-M], pa...
""" From two different segmentation generates two RWR and compares the results. This script assist in the analysis of GraphMCF with trans- or inter-membrane structures Input: - GraphMCF instance (pkl) - Segmentation with at least three regions Output: - GraphMCF with the result of every ...
#!/usr/bin/env python3 import logging import sys import unittest import numpy as np import orbitx.orbitx_pb2 as protos from orbitx.physics import calc from orbitx import common from orbitx import logs from orbitx import network from orbitx import physics from orbitx.data_structures import _EntityView, Entity, Physic...
#!/usr/bin/env python3 """ Main code of the algorithm divided into the following parts : - preprocessing - feature extraction : TODO - polarity learning - prediction - Cross-validation : TODO There is also a word representation part (TODO) using in the feature extraction and polarity learning par...
# -*- coding: utf-8 -*- # This is a stand-alone version of minGPT by <NAME> as a single Python module # Based on minGPT sorce code as it appears on Aug 25, 2020 # https://github.com/karpathy/minGPT ####################################################### # Critical requirements # !pip install numpy # !pip install to...
import os import h5py import numpy as np from bmtk.utils import io from bmtk.utils.sonata.utils import add_hdf5_magic, add_hdf5_version try: from mpi4py import MPI comm = MPI.COMM_WORLD rank = comm.Get_rank() nhosts = comm.Get_size() except Exception as exc: pass class CellVarRecorder(object):...
import base64 import calendar import datetime import json import re from collections import OrderedDict from decimal import Decimal from functools import reduce from locale import LC_NUMERIC, atof, setlocale import boto3 from botocore.exceptions import ClientError from intuitlib.client import AuthClient from quickbook...
# Copyright (c) 2022 CNES # # All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. """ Test of the time periods. ========================= """ import datetime import pickle import numpy import pytest from ..period import Period, PeriodRelation def ...
import logging import numpy as np class GeogridError(Exception): pass def distance_lon_lat(longitudes, latitudes, longitude, latitude): """Distance in meters between lon/lat on Earth (sphere, 6371 km radius). Parameters ---------- longitudes : numpy array latitudes : numpy array longit...
""" Class for performing a HESS style 2D fit of muon images To do: - Deal with astropy untis better, currently stripped and no checks made - unit tests - create container class for output """ import numpy as np from scipy.ndimage.filters import correlate1d from iminuit import Minuit from astropy import un...
from genericpath import exists as pexists from os.path import realpath from collections import Iterable import nibabel as nib import numpy as np from matplotlib import pyplot as plt import matplotlib as mpl def _diff_image(slice1, slice2, abs_value=True, cmap='gray', **...
### # Copyright (c) 2002-2005, <NAME> # 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, # this list of conditions, ...
import random from collections import defaultdict import pytest, os, cv2 import numpy as np import torch from pytorch_toolbelt.utils import rgb_image_from_tensor from alaska2.augmentations import ( dct_rot90_block, dct_rot90, dct_transpose, dct_transpose_block, dct_rot90_fast, dct_transpose_fa...
import logging import sys from glob import glob from json import dump from subprocess import run from attmap import PathExAttMap as PXAM from refgenconf import RefGenConf from refgenconf.exceptions import ( ConfigNotCompliantError, GenomeConfigFormatError, MissingConfigDataError, RefgenconfError, ) fro...
import codecs import pickle import optparse import os import re import sys from collections import OrderedDict import numpy as np models_path = "./models" eval_path = "./evaluation" eval_temp = os.path.join(eval_path, "temp") # TODO: Move this to a better configurational structure eval_logs_dir = os.path.join(eval_t...
import functions as func import numpy as np import pandas as pd import matplotlib.pyplot as plt from math import sqrt from multiprocessing import cpu_count from joblib import Parallel from joblib import delayed from warnings import catch_warnings from warnings import filterwarnings from statsmodels.tsa.holtwinters impo...
# Copyright 2015 Confluent 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 writing, s...
"""This module contains the general information for StorageRaidBattery ManagedObject.""" from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class StorageRaidBatteryConsts: ADMIN_ACTION_DISABLE_AUTO_LEARN = "disable-auto-learn" ADMIN_ACTION_...
import codecs import json import select import socket import sys import time import urllib.parse # Slim HTTP client written directly on top of the UNIX socket API. # Therefore it can be used with both UNIX and TCP sockets. # # Its intended use is limited to rocker (the restclient API should not be # considered stabl...
import os import time import torch import numpy as np import numpy.random as rd from elegantrl.tutorial.agent import ReplayBuffer from elegantrl.tutorial.env import PreprocessEnv class Arguments: def __init__(self, agent=None, env=None, gpu_id=None, if_on_policy=False): self.agent = agent # Deep Reinforc...
#RDS simulator class import random import networkx as nx #import sys import itertools as itr #, pylab as p import functools from types import GeneratorType #these modules act as libraries of recruitment activity #attribute assignment #recruitment choice functions #seed selection import attdist, recact, reccho, seedchoi...
import datetime import uuid import re from sqlalchemy.dialects.postgresql import UUID from sqlalchemy import PrimaryKeyConstraint, UniqueConstraint from sqlalchemy.ext.hybrid import hybrid_property from app import db ANON_PROCESS = 'anon_process' ANON_REMINDER = 'anon_reminder' ANNOUNCEMENT = 'announcement' EVENT =...
#!/usr/bin/env python """ .. module:: xsecComputer :synopsis: Computation of reference ("theory") production cross sections. .. moduleauthor:: <NAME> <<EMAIL>> .. moduleauthor:: <NAME> <<EMAIL>> .. moduleauthor:: <NAME> <<EMAIL>> """ from __future__ import print_function from smodels import installation from smod...
import re from bs4 import BeautifulSoup from rest_framework import viewsets from rest_framework.decorators import api_view from rest_framework.response import Response from .models import Page from topography.models import Event from topology.models import Mediator from information.models import Image, Video, Audio ...
import torch import numpy as np import torch.nn as nn from ..layers.convolutions import Convolutional from ..layers.conv_blocks import Residual_block, Residual_block_CSP class Route(nn.Module): def __init__(self): super(Route, self).__init__() def forward(self, x1, x2): """ x1 means pr...
from itertools import combinations, permutations import logging import numpy as np import qcelemental as qcel from copy import deepcopy from .exceptions import AlgError, OptError from . import optparams as op from . import v3d from . import stre from . import tors from . import bend from . import cart from . import di...
#coding:utf-8 import sys #sys.path.append("../") sys.path.insert(0,'..') import numpy as np import argparse import os import cPickle as pickle import cv2 from train_models.mtcnn_model import P_Net,R_Net from train_models.MTCNN_config import config from loader import TestLoader from Detection.detector import Detector fr...
# Copyright 2018 Iguazio # # 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, softwa...
""" [chatEvent] __addr__ : address message : value ^start.*middle.*end$ : value """ from itertools import combinations from operator import itemgetter from random import randint from eudplib import * import sys Addr, lenAddr, ptrAddr, patternAddr = None, None, None, None minlen, maxlen = 78, 0 KEY1, KEY2 = randint(0,...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2014 Intel 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/lice...
#!/usr/bin/env python import csv import re import argparse #from itertools import izip, imap from cyvcf2 import VCF, Writer import gzip import dbnsfp import os import pcgrutils logger = pcgrutils.getlogger('pcgr-gene-annotate') csv.field_size_limit(500 * 1024 * 1024) threeLettertoOneLetterAA = {'Ala':'A','Arg':'R','A...
#!/usr/bin/python import os import getopt import sys import bz2 import subprocess import numpy as np import develop as d import coding_theory as code from walker_updated import isNumber, parseDir from coding_theory import make_prototyped_random_codes #make_prototyped_random_codes import scipy.io as sio #############...
#!/usr/bin/env python # coding: utf-8 # version 0.1 2020/01/08 -- <NAME> import argparse from pathlib import Path import cartopy.crs as ccrs import cartopy.feature as cfeature import cmocean.cm as cmo import matplotlib.pyplot as plt import numpy as np import pandas as pd import xarray as xr # functions # def wr...
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2015-2016 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...
"""Validation class for ChemKED schema. """ from warnings import warn import re from pkg_resources import resource_filename import yaml import numpy as np import pint from requests.exceptions import HTTPError, ConnectionError from cerberus import Validator, SchemaError import habanero from .orcid import search_orcid ...
""" Modules defines the Filter and NestedFilter classes """ from copy import deepcopy from collections import OrderedDict from functools import reduce from typing import Any from typing import List from typing import Dict from typing import Optional from typing import Union from typing import Type from sqlalchemy impo...
""" Counterfactual explanations for scorecard models. """ # <NAME> <<EMAIL>> # Copyright (C) 2021 import numbers import time import numpy as np import pandas as pd from ...information import solver_statistics from ...logging import Logger from ..scorecard import Scorecard from .base import BaseCounterfactual from ....
import itertools import json import os import gym import matplotlib import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from matplotlib.ticker import MultipleLocator import envs CIFAR10_CLASSES = [ "airplane", "automobile", "bird", "cat", "deer", "dog"...
# ------------------------------------------------------------------------- # # Part of the CodeChecker project, under the Apache License v2.0 with # LLVM Exceptions. See LICENSE for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # # ---------------------------------------------------...
#!/usr/bin/env python # # Copyright 2015 British Broadcasting Corporation # # Modifications copyright 2020 TP Vision Belgium NV # # 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 # #...
from ccdproc import combine, CCDData, ccd_process, subtract_bias, subtract_dark, flat_correct import astropy.io.fits as fits, astropy.units as units #import astroscrappy import numpy as np import argparse, os, re, copy #import tensorflow as tf parser = argparse.ArgumentParser() parser.add_argument('--bias') parser.add...
""" pyhf workspaces hold the three data items: * the statistical model p(data|parameters) * the observed data (optional) * fit configurations ("measurements") """ import logging import jsonpatch import copy import collections from . import exceptions from . import utils from .pdf import Model from .mixins import _Chan...
# Copyright (c) 2020 NVIDIA CORPORATION. # Copyright (c) 2018-2020 <NAME> (<EMAIL>). # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the ri...
# -*- coding: utf-8 -*- # Copyright (c) 2018-2021, <NAME> and <NAME>. # # Distributed under the 3-clause BSD license, see accompanying file LICENSE # or https://github.com/scikit-hep/decaylanguage for details. from __future__ import absolute_import from __future__ import print_function from collections import Counter...
# Copyright (c) 2022 PaddlePaddle 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 app...
#!/usr/bin/env python # -*- coding:utf-8 -*- from __future__ import annotations from typing import List, Tuple, TextIO import sys import os import shutil import subprocess from glob import glob from collections import defaultdict from multiprocessing import Process import requests from bs4 import BeautifulSoup import s...
# This file is part of PRAW. # # PRAW 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. # # PRAW is distributed in the hope that i...
from __future__ import print_function from __future__ import absolute_import from gevent import monkey # This line can be commented out so that most tests run with the # system socket for comparison. monkey.patch_all() import sys import array import socket import time import unittest from functools import wraps impo...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Copyright (c) 2021, Sandflow Consulting LLC # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, ...
import random, math, sys debug = False arg_strings = [sys.argv[i] for i in range(1, len(sys.argv)) if not sys.argv[i - 1].startswith('-') and not sys.argv[i].startswith('-')] arg_dict = dict([(sys.argv[i], None) for i in range(1, len(sys.argv)) if sys.argv[i].startswith('-')] + ...
from __future__ import print_function import os import datetime import sqlalchemy as sa from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext.hybrid import hybrid_method from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.orm import Query, scoped...
''' clip.py: Embeddable, composable [c]ommand [l]ine [i]nterface [p]arsing Copyright: (c) 2015 <NAME> License: MIT, see LICENSE for more details ''' import itertools import shlex import sys import uuid ######################################## # COMPATIBILITY & UTILITIES ######################################## PY2 ...
from utils.BCD_DR import ALS_DR from utils.ocpdl import Online_CPDL import numpy as np import matplotlib.pyplot as plt import pickle from scipy.interpolate import interp1d plt.rcParams['font.family'] = 'serif' plt.rcParams['font.serif'] = ['Times New Roman'] + plt.rcParams['font.serif'] def Out_tensor(loa...
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys import pandas as pd from functools import partial from types import SimpleNamespace from PyQt5 import QtCore from PyQt5.QtGui import QFont, QStandardItemModel, QStandardItem from PyQt5.QtCore import pyqtSignal, Qt, QAbstractTableModel, QModelIndex, QRect, QVariant...
#!/usr/bin/env python3 import argparse import sys from os import system, devnull from math import log from math import ceil import numpy as np from scipy.signal import argrelextrema # hetkmers dependencies from collections import defaultdict from itertools import combinations version = '0.2.3dev_rn' ################...
import os import platform import tempfile import unittest from collections import namedtuple from conans.client.client_cache import CONAN_CONF from nose.plugins.attrib import attr from conans import tools from conans.client.conan_api import ConanAPIV1 from conans.client.conf import default_settings_yml, default_clie...
""" Routines for mode coupling calculation. For more details on computation of the matrix see https://pspy.readthedocs.io/en/latest/scientific_doc.pdf. """ from copy import deepcopy import healpy as hp import numpy as np from pspy import pspy_utils, so_cov, sph_tools from pspy.mcm_fortran.mcm_fortran import mcm_comp...
import torch as th import torch.nn as nn import torch.nn.functional as F from torch.distributions import Categorical import numpy as np import os from types import SimpleNamespace as SN from os.path import dirname, abspath import collections from collections import defaultdict from copy import deepcopy from sacred impo...
from misc.visualization import save_video as SaveVideo from solver import Solver import warnings import numpy as np from misc.utils import denorm import os from misc.utils import TimeNow_str, to_cuda, norm from misc.visualization import vis_parsing_maps, bisenet2sean from misc.mask_utils import scatterMask, label2mask,...
import sys sys.path.insert(0, "/home/igor/code/mestrado/REDN/opennre/dataset") import torch import torch.utils.data as data import numpy as np import random import json from torch.nn.utils.rnn import pad_sequence from opennre.dataset.utils import is_normal, is_multi_label, is_over_lapping NA = ["NA", "Other", "None"...
from torch_geometric.data import DataLoader import torch import scipy.io as sio from torch_geometric.data.data import Data import numpy as np import os.path as osp import torch.nn as nn import torch.nn.functional as F from torch.nn import Sequential, Linear, ReLU from torch_geometric.nn import (NNConv, graclus, max_p...
from pymongo import message import telegram from telegram.ext import Updater import logging from telegram import Update, InlineKeyboardButton, InlineKeyboardMarkup from telegram.ext import CallbackContext, CommandHandler, MessageHandler, Filters, CallbackQueryHandler import os import pymongo from pymongo import MongoCl...
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import os import re from copy import deepcopy from pathlib import Path from typing import Any, Dict, List, Optional, Tuple, Union from xml.etree import ElementTree as ET import lxml.etree import numpy as np from ome_types import OME from ome_types.model.sim...
# ----------------------------------------------------------------------------- # Adapted from https://github.com/anibali/h36m-fetch # Original license: Copyright (c) <NAME>, under the Apache License. # ----------------------------------------------------------------------------- import argparse import os import pickl...
#! /usr/bin/python # -*- coding: utf-8 -*- from torch.nn import Module as T_Module from .common import check_parameter, processing_act, str2init, tolist, construct_graph, ModuleNode, select_attrs from .common import _save_weights, _load_weights, _save_standard_weights_dict, _load_standard_weights_dict from torch.nn.pa...
#!/usr/bin/env python3 # # susi-config # Konfiguration of SUSI.AI, via the config.json # TODO # - configuration of susi server dedicated user in system install # - creation of susi server user etc (see below) # - uninstall: rm -rf ~/SUSI.AI ~/.config/SUSI.AI/ ~/.local/share/systemd/user/ss-susi-* # import sys import...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import json import numpy as np import pandas as pd from flask import Flask, g, jsonify, make_response, request from flask_cors import CORS from flask_httpauth import HTTPBasicAuth from flask_sqlalchemy import SQLAlchemy from sqlalchemy import create_engi...
"""Estimator which operates on a pair of images to compute relative pose and verified indices. Authors: <NAME>, <NAME> """ import logging from dataclasses import dataclass from typing import Dict, Optional, Tuple import dask import numpy as np from dask.delayed import Delayed from gtsam import Cal3Bundler, Pose3, Rot...
""" IO classes for Exhaustive Enumeration of TSP routes, which define the total distance in km between n different cities. CAREFUL NOT TO USE n>10. Copyright (C) 2014 DTU Wind Energy Author: <NAME> Email: <EMAIL> Last revision: 22/01/2014 License: Apache v2.0, http://www.apache.org/licenses/LICENSE-2.0 """ #Import...
import pybel import pandas as pd from pybel.dsl import Protein from pybel.dsl import Abundance from pybel.dsl import Pathology from pybel.dsl import BiologicalProcess from pybel.dsl import Population from pybel.dsl import Gene from pybel.dsl import MicroRna from pybel.dsl import Rna from pybel.dsl import Fragment impor...
"""Discrete triggers for MLM prompting, i.e., AutoPrompt.""" import argparse import logging import os import random import torch import transformers from tqdm import tqdm from nullprompt.evaluators import MLM_EVALUATORS from nullprompt.metrics import METRICS from nullprompt.models import DiscreteTriggerMLM from null...
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the NiBabel package for the # copyright and license terms. # ### ### ### #...
#!/usr/bin/env python # IPFIX support for Scapy (RFC7011) from scapy.all import bind_layers, FieldLenField, IntField, Packet, \ PacketListField, ShortEnumField, ShortField, StrLenField from scapy.layers.inet import UDP # IPFIX Information Elements http://www.iana.org/assignments/ipfix/ipfix.xhtml information_ele...
#!/usr/bin/env python3 import os import time import numpy as np import rospy import tf import ConfigParser import enum import argparse #import Hiwin_RT605_Socket_test_andy as ArmTask from control_node import HiwinRobotInterface from pushpin_mission.srv import hand_eye_calibration, hand_eye_calibrationRequest from geome...
import json from unittest import TestCase from pyramid.config import Configurator from pyramid.events import NewRequest from pyramid.httpexceptions import HTTPBadRequest, HTTPNotFound from pyramid.response import Response from pyramid.testing import DummyRequest from webob.request import MIMEAccept try: import s...
from sklearn.model_selection import cross_val_score, train_test_split, GridSearchCV from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.model_selection import train_test_split from sklearn.tree import DecisionTreeClassifier from pprint ...
""" Qubit_process_tomography.py: Reconstruction of characteristic χ matrix for a superoperator applied on a single qubit Author: <NAME> - Quantum Machines Created: 13/11/2020 Created on QUA version: 0.5.138 """ # Importing the necessary from qm from qm.QuantumMachinesManager import QuantumMachinesManager from qm.qua i...
r""" Analytic types of modular forms. Properties of modular forms and their generalizations are assembled into one partially ordered set. See :class:`AnalyticType` for a list of handled properties. AUTHORS: - <NAME> (2013): initial version """ #*********************************************************************...
# Source Generated with Decompyle++ # File: SPSO2011.cpython-34.pyc (Python 3.4) from copy import deepcopy from operator import attrgetter import numpy as np class Point: def __init__(self, fitness, position): self.fitness = fitness self.position = position class Particle: def __init__(self...
import plotly.graph_objects as go import disnake from datetime import datetime, timedelta, timezone from disnake.ext import commands from utils.discord_utils import image_to_file, format_number from utils.setup import db_stats, db_users from utils.arguments_parser import parse_speed_args from utils.table_to_image impo...
# -*- coding: utf-8 -*- from sys import platform as sys_platform import os.path from shutil import copyfile import re import datetime import subprocess import functools from CPPGeneratorBase import CPPGeneratorBase, ensure_exists_dir internal_csv_reader_map = dict({ "int": ("get<int>", "is_int"), "short": ("g...
# Copyright 2020 Accenture Global Solutions Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
#!/usr/bin/env python import pandas as pd import numpy as np from Bio import Entrez, Phylo from math import log10, ceil import time import sys import os def keep_trying(func, max_tries, sleep = None, *args): counter = [] while True: counter.append(1) try: return func(*args) ...
# coding=utf-8 """ symbol模块 """ from __future__ import print_function from __future__ import absolute_import from __future__ import division from fnmatch import fnmatch import numpy as np from ..CoreBu.ABuEnv import EMarketTargetType, EMarketSubType from ..CoreBu.ABuFixes import six from ..UtilBu.ABuStrUtil impo...
""" Start based environments. The classes inside this file should inherit the classes from the state environment base classes. """ import random from collections import OrderedDict from rllab import spaces import sys import os.path as osp import cloudpickle import pickle import numpy as np import scipy.misc import ...
import falcon_kit.FastaReader as FastaReader import os import re import sys import argparse import collections import itertools import logging import contextlib import json LOG = logging.getLogger() ZMWTuple = collections.namedtuple('ZMWTuple', ['movie_name', 'zmw_id', 'subread_start', 'subread_end', 'seq_len', 'sub...
import os.path as osp import numpy as np import cv2 import math import torch import torch.nn as nn from torch.utils.data import DataLoader from tqdm import tqdm from collections import Counter import Human36M.dataset, SURREAL.dataset, COCO.dataset, PW3D.dataset, AMASS.dataset, MuCo.dataset, FreiHAND.dataset import mod...
__author__ = "<NAME>" """ This script will now be designed to update and add work orders to/in smartsheet from jira csv/tsv This script relies on the jiraq bash script and ~awollam/aw/jiraq_parser.py woids.stats.txt Meant to be run on personal gsub_alt(uses registry.gsc.wustl.edu/antonacci.t.j/genome_perl_environmen...
from datetime import datetime, timedelta from json import loads, load, dumps from json.decoder import JSONDecodeError from random import random from time import sleep from typing import Callable, Union from urllib.parse import urlparse, urlencode, parse_qsl from requests import get from ggacha import GachaWish from g...
from lite_content.lite_exporter_frontend import generic from lite_content.lite_exporter_frontend.generic import PERMISSION_FINDER_LINK class GoodsList: TITLE = "Product list" CREATE_GOOD = "Add a product" class Count: ORGANISATION_ZERO = "Your organisation has no products listed." ORGANIS...
""" Functions for calculating per-pixel temporal summary statistics on a timeseries stored in a xarray.DataArray. The key functions are: .. autosummary:: :caption: Primary functions :nosignatures: :toctree: gen xr_phenology temporal_statistics .. autosummary:: :nosignatures: :toctree: gen """ ...
from binascii import hexlify, unhexlify import traceback import sys from lynx_code.util import (bfh, bh2u, versiontuple, UserCancelled, UserFacingException) from lynx_code.bitcoin import TYPE_ADDRESS, TYPE_SCRIPT from lynx_code.bip32 import BIP32Node from lynx_code import constants from...
import asyncio import discord import json import re from discord.ext import commands from subprocess import call from string import printable from sys import argv from urllib.parse import urlparse class Events: """ Special event handling. """ def __init__(self, bot): self.bot = bot prin...
import torch from torch import nn from torch.optim import lr_scheduler from torchvision.utils import make_grid from skimage import io import numpy as np import itertools from collections import OrderedDict import os import re from utils.network import Basic_D, Unet_Dilate, init_weights from utils.loss import ColorCon...
from typing import Sequence from flask_wtf import FlaskForm from flask import abort, render_template from markupsafe import Markup from wtforms import StringField, TextAreaField, FileField, IntegerField, HiddenField from wtforms.fields.html5 import DateField from wtforms.validators import DataRequired, Optional, Valid...
# Copyright 2017 The Abseil Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...