text
stringlengths
8.04k
46.5k
import sys, struct, string, math from types import * import os from os import path import q_shared from q_shared import * MD3_IDENT = "IDP3" MD3_VERSION = 15 MD3_MAX_TAGS = 16 MD3_MAX_SURFACES = 32 MD3_MAX_FRAMES = 1024 MD3_MAX_SHADERS = 256 MD3_MAX_VERTICES = 4096 MD3_MAX_TRIANGLES = 8192 MD3_XYZ_SCALE = (1.0 / 64....
## https://arxiv.org/abs/2204.01851 import torch import torch.nn as nn import torch.nn.functional as F import os import numpy as np import utility_functions as uf from torchinfo import summary from models.dual_quaternion_layers.dual_quat_layers import * from models.quaternion_layers.quaternion_layers import...
# Copyright (c) 2011-2020 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distrib...
# Copyright 2013 Devsim 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, s...
#!/usr/bin/env python from __future__ import print_function import six import re import requests import collections import hashlib import os import json import time import operator from functools import reduce try: import argcomplete except ImportError: pass # {{{ http://code.activestate.com/recipes/267662/ (...
from builtins import zip from builtins import object import os from copy import deepcopy import numpy as np import numpy.ma as ma import warnings import rubin_sim.maf.metrics as metrics import rubin_sim.maf.slicers as slicers import rubin_sim.maf.stackers as stackers import rubin_sim.maf.maps as maps import rubin_sim....
from ome_types import to_xml, OME from ome_types.model import Project, ProjectRef from ome_types.model import Screen from ome_types.model.screen import PlateRef from ome_types.model import Well, WellSample from ome_types.model import Plate from ome_types.model import Dataset, DatasetRef from ome_types.model import Imag...
import warnings from collections import OrderedDict from datetime import time import tables as tb import pandas as pd import pandas.lib as lib import numpy as np import pandas.io.pytables as pdtables from trtools.compat import izip, pickle from trtools.io.common import _filename from trtools.io.table_indexing import ...
# This file is Copyright (c) 2015-2020 <NAME> <<EMAIL>> # License: BSD from migen import * from migen.genlib.misc import chooser, displacer from migen.genlib.fifo import SyncFIFOBuffered from litex.soc.interconnect.stream import * from litex.soc.interconnect.csr import * from litepcie.common import * from litepcie.t...
# -*- coding: utf-8 -*- """ Created on Fri Oct 4 11:43:35 2019 @author: <NAME> @email: <EMAIL> @affiliation: The Drift, DeSI, CAI, UTS """ from mf_distance import data_handler as dh import numpy as np import matplotlib.pyplot as plt from sklearn.metrics.pairwise import euclidean_distances #from sklearn.preprocess...
import os, glob, json, requests, shutil import imghdr import matplotlib.image as mpimg import matplotlib.pylab as plt import logging import xml.etree.ElementTree as et import pkg_resources import pathlib from slugify import slugify RES_PATH = pathlib.Path(pkg_resources.resource_filename("KEGGutils", "res/")) ORG_COD...
""" Transformation of variable component of TANs. - Transformations are function that - take in: - an input `[N x d]` - (and possibly) a conditioning value `[N x p]` - return: - transformed covariates `[N x d]` - log determinant of the Jacobian `[N]` or scalar - inverse mapping `[function: N x d...
#!/usr/bin/python3 """ The Chandler: imageboard pictures downloader This program will download all the images from various imageboards threads until 404'ed """ __author__ = "Dhole" __license__ = "WTFPL - Do What The Fuck You Want To Public License " __version__ = "0.6" __email__ = "<EMAIL>" __status__ = "Beta" __date...
# Copyright 2004-2018 <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 rights to use, copy, modify, merge, # publish,...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ----------------------------------------------------------------------------- Copyright (C) 2006-2017 University of Dundee. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Lic...
#!/usr/bin/env python # coding=utf-8 # Author: <NAME> # <EMAIL> # # This file is part of pTFTPd. # # pTFTPd 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 ...
# _ __ # | |/ /___ ___ _ __ ___ _ _ ® # | ' </ -_) -_) '_ \/ -_) '_| # |_|\_\___\___| .__/\___|_| # |_| # # <NAME> # Copyright 2022 Keeper Security Inc. # Contact: <EMAIL> # import argparse import collections import datetime import json import logging import fnmatch import re from typing import Dict, A...
import _dk_core as core from .. import blendstate from . import view from . import font import weakref import math _LAYOUT_VERTICAL = 0 _LAYOUT_HORIZONTAL = 1 _ITEM_STATE_NORMAL = 0 _ITEM_STATE_HIGHLIGHTED = 1 _ITEM_STATE_DISABLED = 2 class ItemStyle: """ item layout with icon | left-margin | checkbox ...
# Copyright (c) 2002 <NAME> (vivakeATomniscia.org). All rights reserved. # # This program 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 2 of the # License, or (at your option) any later versi...
# -*- coding: utf-8 -*- from __future__ import print_function, absolute_import, division from collections import defaultdict import numpy as np from pyodesys.util import import_ from pyodesys.core import integrate_chained from pyodesys.symbolic import ScaledSys, TransformedSys, symmetricsys, PartiallySolvedSystem, g...
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
""" 2nd attempt to parse WAT (wasm text) as parsed s-expressions. More or less a python version of this code: https://github.com/WebAssembly/wabt/blob/master/src/wast-parser.cc """ import logging from collections import defaultdict from ..lang.sexpr import parse_sexpr from .opcodes import OPERANDS, OPCODES, ArgType...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Configuration loader """ import copy import os import re import warnings from collections import defaultdict from dataclasses import dataclass from typing import Any, Dict, List, Optional, Tuple from omegaconf import DictConfig, ListConfig, Ome...
from __main__ import vtk, qt, ctk, slicer from slicer.ScriptedLoadableModule import * import os import numpy import pickle import json # # Load Files # class EasyClip(ScriptedLoadableModule): def __init__(self, parent): ScriptedLoadableModule.__init__(self, parent) parent.title = "Easy Clip" ...
#!/usr/bin/env python ''' Created on 22 Jul 2020 @author: <NAME> @license: BSD 3-Clause ''' from __future__ import annotations from typing import List, Dict, Any, Callable, Union from causets.causetevent import CausetEvent from causets.embeddedcauset import EmbeddedCauset import numpy as np from matplotlib...
"""Contains functions to parse and preprocess information from the input file""" import sys import os import h5py import logging import multiprocessing as mp import numpy as np import pickle import signal as sig from immunopepper.io_ import decodeUTF8 from immunopepper.namedtuples import CountInfo from immunopepper.na...
""" Contains LD statistics object XXX I made a stupid decision early on to index populations from 1 instead of 0. At some point I need to go through and fix all that, perhaps... """ import logging logging.basicConfig() logger = logging.getLogger('LDstats_mod') import os,sys import numpy, numpy as np import copy ...
import math, fractions, itertools, operator, functools, logging import ptypes from ptypes import * ptypes.setbyteorder(ptypes.config.byteorder.bigendian) ### types class Type(ptype.definition): cache = {} @Type.define class BYTE(pint.uint8_t): type = 1 @Type.define class ASCII(pstr.char_t): type = 2 @Type.defi...
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.3 # kernelspec: # display_name: 'Python 3.6.7 64-bit (''base'': conda)' # name: python367jvsc74a57bd050da0f6fa72fb86d...
import heapq import pathlib import pickle import random import time from math import ceil from random import sample, shuffle from typing import Dict import networkx as nx import spacy import torch from nltk.corpus import wordnet as wn from torch.utils.data import Dataset from tqdm import tqdm from transformers import ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # pylint: disable=C0303 # ****************************************************** # @author: <NAME> - <EMAIL> # @date (created): 2016-05-12 09:24 # @file: Audio_Analyzer.py # @brief: Draw powerspectrum of collect audio info # @internal: # ...
# UI development python framework -- Tkinter from tkinter import * from tkinter import ttk # Python inbuilt framework -- Time from time import sleep # Python based OPCUA framework for Machine to Machine communication protocol from opcua import Client # Partial python framework for managing UI user cl...
from csv import DictWriter from datetime import datetime, timedelta from dateutil.parser import parse as parse_date from io import StringIO import http.client import json import math import re import time import requests import lz4framed import sentry_sdk as sentry from flask import current_app, request, make_respo...
from process.utils import * # pass global date variable global date date = datetime.datetime.now().strftime("%Y-%m") def curate_duke(df_duke:pd.DataFrame, curated_path:str) -> pd.DataFrame: df_duke = df_duke.astype(str) df_duke = df_duke[['CPT/MS-DRG' ,'Procedure Description' ,'Gross Charge' ,'AETNA MEDIC...
import numpy as np import pandas as pd import statsmodels import statsmodels.api as sm import statistics import math import sys import itertools from argparse import ArgumentParser from experiment_components.normalizers import normalize_tss np.seterr(over='warn', under="ignore") def batch_pp(df, covariates, batch_c...
import itertools import random from typing import List, Optional, Sequence, Tuple, Union import igraph as ig import numpy as np import pandas as pd from anndata import AnnData from scanpy import logging import scipy.sparse as sp from .._compat import Literal from .._preprocessing import ir_dist from ..ir_dist import ...
"""Abstract class for objects backed by MySQL tables. When interfacing with MySQL, this uses pure dictionaries. When interfacing with the rest of the app, it is object-oriented, returning instances of the class to represent data. It attempts to have a similar interface as a datastore entity, including * Class.create...
#!/usr/bin/env python3 # Copyright (c) 2019 The PIVX developers # Copyright (c) 2020 The Neblio developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # -*- coding: utf-8 -*- from io import BytesIO from time import sleep from...
import itertools import os.path import sys import time from . import core from . import file_io from . import geometry from . import stringconv from . import version # # Functions # def save_output(profileli, opt): """ Save a summary of results of evaluated profiles """ def m(x, pixelwidth): retu...
import matplotlib.pyplot as plt import time import networkx as nx import numpy.linalg as LA from statistics import mean import numpy as np import math import sys start_time = time.time() # ------------------------------------------------------------------------------------------- def illustrate_graph(...
# Split generation components # # Licensed under the BSD 3-Clause License # Copyright (c) 2020, <NAME> from abc import abstractmethod from logging import getLogger from typing import Collection, Container, Iterable, Protocol, Optional from functools import cached_property from collections import defaultdict from opera...
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. 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-2.0 # # Unless r...
from __future__ import unicode_literals import json import datetime from django.db import models,transaction from django.dispatch import receiver from django.db.models.signals import pre_delete from django.utils.encoding import python_2_unicode_compatible from django.core.exceptions import ValidationError from django....
# Copyright 2016-2022 The <NAME> Lab at the California Institute of # Technology (Caltech), with support from the Paul Allen Family Foundation, # Google, & National Institutes of Health (NIH) under Grant U24CA224309-01. # All rights reserved. # # Licensed under a modified Apache License, Version 2.0 (the "License"); # ...
# # Control an RFSpace SDR-IP, NetSDR, or CloudIQ. # # Example: # sdr = sdrip.open("192.168.3.125") # sdr.setrate(32000) # sdr.setgain(-10) # sdr.setrun() # while True: # buf = sdr.readiq() # OR buf = sdr.readusb() # # <NAME>, AB1HL # import socket import sys import os import numpy import scipy impor...
from flask_sqlalchemy import SQLAlchemy from sqlalchemy import Column, Integer, String, Float, Boolean, DateTime, \ create_engine, ForeignKey from dotenv import load_dotenv, find_dotenv import constants import os ENV_FILE = find_dotenv() if ENV_FILE: load_dotenv(ENV_FILE) database_path = os.environ.get(consta...
TEMPLATE='''#include <string> #if __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wcast-function-type" #endif #if defined(__GNUC__) && __GNUC__ >= 8 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-function-type" #endif #include <nan.h> #include <ccan/ccan/endian/endian.h> ...
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program 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 2 # of the License, or (at your option) any later version. # # This program is distri...
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # 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 requi...
from django.db import models from main.models import Person, Organisation, Platform from main.models import Project as ExpeditionProject, SamplingMethod, SpecificDevice, DeviceType, Device from data_storage_management.models import Item from django.conf import settings from django.core.exceptions import ObjectDoesNotEx...
#!/usr/bin/python """ __version__ = "$Revision: 1.26 $" __date__ = "$Date: 2005/01/24 10:28:20 $" flatfileDatabase was derived from the addresses sample. """ import wx from PythonCard import dialog, log, model, util import os, sys import configparser import pprint import pickle import time from .templates.dialogs ...
# # Copyright 2015 The AMP HTML 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 applic...
#!/usr/bin/env python3 # vim: tw=80 ts=4 sts=4 sw=4 smarttab noet # Taken from https://github.com/kevinvalk/python-saleae # Coerce Py2k to act more like Py3k # https://pypi.python.org/pypi/future from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import (bytes, dict, i...
import argparse import re from pprint import pprint from typing import * import matplotlib.pyplot as plt import numpy as np import torch import yaml from PIL import Image from deepclustering.utils import Vectorize, identical, map_ from pathlib2 import Path from skimage.transform import resize as resize_func """ 0: Ne...
#!/usr/bin/env python # Copyright (c) 2018 <NAME> # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. import abc import carla import datetime import math import os import prctl import random import sys import threading import time #workaround ros dep...
""" Color Directives There are many different way to specify color; we support all of the color formats below and will convert between the different color formats. """ from math import atan2, cos, exp, pi, radians, sin, sqrt from mathics.builtin.colors.color_internals import convert_color from mathics.builtin.base...
""" datasets.py ======================= Houses the DynamicImageDataset class, also functions to help with image color channel normalization, transformers, etc.. """ import torch from torchvision import transforms import os # import dask # from dask.distributed import Client; Client() import dask.array as da import pa...
""" Status thus far: 1) Adding fresh documents works 2) DONE No support yet for checking if document exists 3) Have not added indices yet to make querying faster 4) Needs to be tied into the client library code """ """ sqlalchemy .__mapper__.iterate_properties .__mapper__.c.keys() """ """ from mendeley import d...
# Copyright 2017 Veritas Technologies 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...
#!/usr/bin/env python3 import asyncio import datetime import random import re import time import isodate import yaboli from apiclient.discovery import build from yaboli.util import asyncify, mention class Video: DELAY = 4 def __init__(self, vid, title, duration, blocked, allowed): self.id = vid self.title = t...
#!/usr/bin/python import os import sys import re from . exceptions import SymbioticExceptionalResult from . options import SymbioticOptions from . utils import dbg, print_elapsed_time, restart_counting_time from . utils.process import ProcessRunner, runcmd from . utils.watch import ProcessWatch, DbgWatch from . utils...
from __future__ import annotations import enum import time from typing import Optional, Dict, Generic, Tuple, TypeVar, Collection, List, Union, Type, TYPE_CHECKING from ravendb.exceptions import exceptions from ravendb.json.metadata_as_dictionary import MetadataAsDictionary import OpenSSL.crypto try: from collec...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. # code in this file is adpated from rpmcruz/autoaugment # https://github.com/rpmcruz/autoaugment/blob/master/transformations.py from typing import List, Tuple, Union, Optional import random from collections import defaultdict import PIL...
#! /usr/bin/python2 # # Copyright (c) 2019 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 """ Control power to targets ------------------------ This interface provides means to power on/off targets and the invidual components that compose the power rail of a target. The interface is implemented by :class:`...
# -*- coding: utf-8 -*- """ Created on Fri Jun 5 09:39:40 2020 @author: yokoyama """ from copy import deepcopy import matplotlib.pylab as plt import numpy as np #%% def vis_directed_graph(K, vmin, vmax, cbar = 'off'): import networkx as nx import matplotlib as mpl weight = deepcopy(K).reshape(-1) ...
import os import sys import math import asyncio import argparse import datetime from warnings import warn from itertools import count from contextlib import asynccontextmanager from urllib.parse import urlparse, parse_qs, urlunparse from typing import Dict, List, AsyncIterable, Optional, Union import aiohttp import ai...
from __future__ import print_function import os.path, copy, numpy as np, time, sys from numba import jit from sklearn.utils.linear_assignment_ import linear_assignment from filterpy.kalman import KalmanFilter # from utils import load_list_from_folder, fileparts, mkdir_if_missing from scipy.spatial import ConvexHull @...
import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import numpy as np import cv2 import imgproc import craft_utils from ocr_ctc import OCR from scipy.optimize import linear_sum_assignment from skimage import metrics from PIL import Image, ImageDraw, ImageFont import ite...
''' Single-GPU training code ''' import argparse from datetime import datetime import numpy as np import tensorflow as tf import importlib import os import sys import dataset import pickle from main_util import get_2d_flow, scene_flow_EPE_np, evaluate_2d BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys....
import numbers import time import warnings from contextlib import contextmanager from functools import wraps from typing import Tuple, List, Callable import numpy as np import torch import torch.fft import torch.nn.functional as torchf from phi.math import LinearSolve from phi.math.backend import Backend, DType, NUM...
import matplotlib.pyplot as plt import numpy as np import scipy import scipy.optimize import scipy.stats import scipy.signal import copy from src.SpectralAnalysis.parametricmodels import combine_models try: from statsmodels.tools.numdiff import approx_hess comp_hessian = True except ImportError: comp_hessia...
#!/usr/bin/env python """ Plotting functions. Authors: - <NAME>, 2012-2013 (<EMAIL>) http://binarybottle.com Contributors: - <NAME> <http://cs.unc.edu/~hal>: vtkviewer.py called by vtkviewer() Copyright 2013, Mindboggle team (http://mindboggle.info), Apache v2.0 License """ def plot_surfaces(vtk_files,...
""" Copyright (c) 2016 <NAME>, <NAME> Under MIT License - https://github.com/Step7750/ScheduleStorm/blob/master/LICENSE.md This file is a resource for Schedule Storm - https://github.com/Step7750/ScheduleStorm """ import threading import requests from bs4 import BeautifulSoup import re import time import logging imp...
""""Fragment submodule, for fragmenting and calculating fragmentation coefficients.""" import time from argparse import ArgumentParser from collections import deque from playhouse.sqlite_ext import SqliteExtDatabase from .lib_read import lib_read from peewee import chunked from rdkit import RDLogger from rdkit import ...
# Copyright 2014 Cloudera 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, so...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import csv import os import re import shutil import json from PIL import Image from pycocotools.coco import COCO import torch import torch.nn.parallel import torch.backends.cudnn as cudnn impo...
"""Solve a 3x3 cube using the CFOP or Fridrich method.""" from .ida_star import ida_star def cfop(self) -> tuple: """ Solve cube using the CFOP or Fridrich method. Returns ------- tuple of (list of str, dict of {'3x3 STAGE': int}) Moves to solve cube, statistics (move count i...
#!/usr/bin/env python # coding: utf-8 # In[ ]: #!/usr/bin/env python # (C) 2017 OpenEye Scientific Software Inc. All rights reserved. # # TERMS FOR USE OF SAMPLE CODE The software below ("Sample Code") is # provided to current licensees or subscribers of OpenEye products or # SaaS offerings (each a "Customer"). # Cu...
#!/usr/bin/env python3 # Copyright (c) 2019 Uber Technologies, 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 ...
# -*- coding: utf-8 -*- """ Functions for controlling file input and output. Author: <NAME> email: <EMAIL> """ import StarburstPy as sb import os import glob import numpy as np __all__ = ['_file_paths','write_input_txt','write_input_original','read_output_data'] class _file_paths(object): """ ...
#!/usr/bin/env python3 # # Copyright (c) 2015 - 2021, Intel Corporation # # 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, th...
""" This module is used to estimate and sample from the joint density function of the atomic orbital scaling parameters. The density function - specify lambda range and resolution - loop over lambda space - change the input data in "input.dat" - run ../adas803.testern.pl --proc=pp --inp --born input.dat 8 - go into...
"""Test routines for solver-manager module""" from unittest import TestCase from amfeti.solver_managers import SerialSolverManager, ParallelSolverManager from amfeti.coarse_grid import NaturalCoarseGrid from amfeti.solution import StandardSolution from ..tools import CustomDictAssertTest import numpy as np from numpy....
from typing import List, Tuple, Dict, Iterable, Generator from collections import OrderedDict import copy from netzob import all as netzob from netzob.Model.Vocabulary.Messages.AbstractMessage import AbstractMessage import visualization.bcolors as bcolors from validation.messageParser import ParsedMessage, ParsingCon...
import argparse import itertools import json import os import re import sys from typing import Any, Dict, List, Set, Tuple, Union class ParseError(Exception): def __init__(self, error): super().__init__(error) indent_size = 4 class ASTNode: def __init__(self, function_suffix: str, types: List[str...
import copy import logging import numpy as np import torch import time from combine1d.core.dynamics import run_model_and_get_temporal_model_data from combine1d.core.massbalance import ConstantMassBalanceTorch from combine1d.core.flowline import MixedBedFlowline, FluxBasedModel from combine1d.core.flowline import OggmM...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #**************************************************************************************************************************************************** # Copyright 2017 NXP # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modifi...
#Tools for mesh-based operations #Smoothing, import nibabel as nb import numpy as np import subprocess import os import potpourri3d as pp3d import meld_classifier.paths as paths # import paths as paths def find_nearest_multi(array, value): new_array = np.array([abs(x - value) for x in array]) min_array = new_...
import os, sys, math, io import numpy as np import pandas as pd import multiprocessing as mp import bson import struct import matplotlib.pyplot as plt import keras from keras.preprocessing.image import load_img, img_to_array import tensorflow as tf from collections import defaultdict from tqdm import * #-----------...
# 获取烟遮挡数据的手部区域和对应烟坐标用于训练烟头检测 import os import csv from shutil import copyfile import cv2 import numpy as np import random from tqdm import tqdm import json from PIL import Image import math from random import shuffle def csv2yolov5(): # 读取csv为yolov5标签文件 imgPath = "E:\\pycharm-projects\\dataset\\检测数据集\\keruisit...
""" Sparse Compositional Metric Learning (SCML) """ from __future__ import print_function, absolute_import, division import numpy as np from .base_metric import _TripletsClassifierMixin, MahalanobisMixin from ._util import components_from_metric from sklearn.base import TransformerMixin from .constraints import Constr...
# coding: utf-8 import json import sys import codecs import re from datetime import datetime #import logging #import logging.config #logging.config.fileConfig('logging.conf') #logger = logging.getLogger(__name__) ''' impossibleparsing = ['{"name": "Place du 4 et 5 Septembre", "city": "Hargnies", "region": "Champagne-...
""" Training loop for NICEModel. Attempts to replicate the conditions in the NICE paper. Supports the following datasets: * MNIST (LeCun & Cortes, 1998); * Toronto Face Dataset (Susskind et al, 2010); * CIFAR-10 (Krizhevsky, 2010); * Street View House Numbers (Netzer et al, 2011). We apply a dequantization for MNIST,...
# -*- coding: utf-8 -*- # SPDX-License-Identifier: MIT from __future__ import absolute_import import copy from datetime import datetime import math import os import re import time from gi.repository import GLib import requests from module_build_service.common import conf, log, models from module_build_service.common....
# -*- coding: utf-8 -*- """ fortran ======= Tools to speed up FSIC-based economic models by generating F2PY-compatible Fortran code. """ from fsic import __version__ import itertools import re import textwrap from types import ModuleType from typing import Any, Dict, Hashable, List, Optional, Sequence, Tuple, Union ...
# -*- coding: utf-8 -*- # Copyright 2018 <NAME>, <NAME> # https://www.tu-ilmenau.de/it-ems/ # # 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...
# -*- coding: utf-8 -*- """ # 3D Image Data Synthesis. # Copyright (C) 2021 <NAME>, <NAME>, <NAME>, <NAME>, <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 Liceense at # # http://www.apache....
""" Wrapping Functions for Common Use Written by Yifeng-Chen """ import numpy as np import tensorflow as tf from tensorflow.python.training.moving_averages import assign_moving_average TRAINABLE_VARIABLES = tf.GraphKeys.TRAINABLE_VARIABLES GLOBAL_VARIABLES = tf.GraphKeys.GLOBAL_VARIABLES var_scope = tf.variable_scop...
# Copyright 2021 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, ...
""" Convenience methods for (de)serializing objects """ import collections import datetime import io import json from runez.file import ensure_folder, parent_folder from runez.system import _R, abort, is_basetype, is_iterable, LOG, resolved_path, short, stringified, UNSET K_INDENTED_SEPARATORS = (",", ": ") K_COMPA...