text
stringlengths
6.04k
39.5k
import re import time import torch from datetime import timedelta import numpy as np from numpy.core.arrayprint import printoptions import pandas as pd from config import logger, opt from transformers import BertTokenizer from torch.utils.data import Dataset from pprint import pprint pattern = re.compile(r'http[s]?://...
import numpy as np from unittest import SkipTest, expectedFailure from parameterized import parameterized from holoviews import NdOverlay, Store from holoviews.element import Curve, Area, Scatter, Points, Path, HeatMap from holoviews.element.comparison import ComparisonTestCase from ..util import is_dask class Tes...
import os import csv import datetime now = datetime.datetime.now() def parseing(fileName): debugCounter = 0 sectionTemplate = ''' :doc:`{subject}{catNumber}`{SpTopic} {Term} | Section {section} ({classNumber}) Credits: {units}; {mixture}; {component} | Instructor: {Instructor} |{Building}:{Room} {Location...
#!/usr/bin/env python from __future__ import print_function import numpy as np def autostring(num, prec=0, zero=False, set_printoptions=False, pp=False, join=False, joinall=False, sep=' '): """ Format number (array) with given decimal precision. Definition ---------- def autostrin...
# The MIT License # # Copyright (c) 2009-2015 the bpython authors. # Copyright (c) 2015-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 li...
# -*- coding: utf-8 -*- import tensorflow as tf import math def multiplication_attention(query, doc, mask, name=None): query = tf.expand_dims(query, axis=1) query = tf.tile(query, [1, tf.shape(doc)[1], 1]) enc = tf.concat([doc, query], axis=2) e = tf.layers.dense(enc, 1, kernel_initializer=tf.initializ...
#!/usr/bin/env python """Updates FileCheck checks in MIR tests. This script is a utility to update MIR based tests with new FileCheck patterns. The checks added by this script will cover the entire body of each function it handles. Virtual registers used are given names via FileCheck patterns, so if you do want to c...
# Copyright 2015 IBM Corp. # # 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 agree...
#!/usr/bin/env python3 import unittest as ut import subtest_fix import os import sys import glob import argparse import copy import tempfile from itertools import combinations import c4.cmany as cmany import c4.cmany.util as util import c4.cmany.main as main import c4.cmany.cmake as cmake from multiprocessing import...
"""Methods for geodetic calculations.""" import os import numpy import srtm import geopy from geopy.distance import GeodesicDistance from gewittergefahr.gg_utils import longitude_conversion as lng_conversion from gewittergefahr.gg_utils import file_system_utils from gewittergefahr.gg_utils import error_checking RADIA...
""" This file defines the main object that runs experiments. """ import logging import imp import os import os.path import sys import copy import argparse import threading import time import traceback import matplotlib as mpl sys.path.append('/'.join(str.split(__file__, '/')[:-2])) # Add gps/python to path so that im...
""" One of Ploomber's main goals is to allow writing robust/reliable code in an interactive way. Interactive workflows make people more productive but they might come in detriment of writing high quality code (e.g. developing a pipeline in a single ipynb file). The basic idea for this module is to provide a way to tran...
import math import tensorflow as tf from .model import Model from .builder import MODELS from .common import ConvNormActBlock from core.layers import build_activation def bottle2neckx(inputs, filters, cardinality, strides=1, scale=4, ...
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021 # by the softwar...
import os import json from pathlib import Path from copy import deepcopy from typing import Union, Any try: import nbconvert except ImportError: nbconvert = None from nbmanips.notebook_base import NotebookBase from nbmanips.selector import is_new_slide, has_slide_type, has_output_type from nbmanips.utils imp...
import inspect import re import sys import unicodedata import yaml # from reversion import revisions as reversion import reversion from django.conf import settings from django.contrib.auth.models import Group from django.db import models from django.db.models import Q from django.db.models.signals import m2m_changed, ...
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-节点管理(BlueKing-BK-NODEMAN) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance ...
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
from __future__ import unicode_literals import logging from django.contrib.contenttypes import generic as ct_generic from django.core.exceptions import ValidationError from django.core.validators import MaxValueValidator, MinValueValidator, URLValidator from django.db import models from django.utils.encoding import p...
from flask import render_template, redirect, url_for, request from flask_login import login_required, current_user from flask_wtf import FlaskForm from flask_mobility.decorators import mobile_template from wtforms import StringField, PasswordField, BooleanField from wtforms.validators import InputRequired, Email, Len...
import io from django.contrib import messages from django.template.defaultfilters import linebreaksbr from django.utils.translation import ugettext as _ import ghdiff from CommcareTranslationChecker import validate_workbook from CommcareTranslationChecker.exceptions import FatalError from corehq.apps.app_manager.exc...
# Copyright 2017 - RoboDK Software S.L. - http://www.robodk.com/ # 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 applicabl...
import os import numpy as np import argparse import time import torch import torchvision import cv2 def yolo_forward_dynamic(output, num_classes, anchors, num_anchors, scale_x_y): # Output would be invalid if it does not satisfy this assert # assert (output.size(1) == (5 + num_classes) * num_anchor...
#!/usr/bin/env python3 from filterpy.kalman import KalmanFilter import matplotlib.pyplot as plt import numpy as np import pdb from scipy.optimize import linear_sum_assignment as linear_assignment import sys import time from transform_utils import convert_3dbox_to_8corner from iou_utils import compute_iou_2d_bboxes ...
# Copyright (c) 2019-2020 <NAME> # Copyright (c) 2014-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, m...
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2017 # <NAME> <<EMAIL>> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by # the Free Software Foundation, either ...
from .typing import Any, Dict, Iterable, List, Mapping, Optional, TypedDict, Union from .url import filename_to_uri import os import sublime TextDocumentSyncKindNone = 0 TextDocumentSyncKindFull = 1 TextDocumentSyncKindIncremental = 2 class DiagnosticSeverity: Error = 1 Warning = 2 Information = 3 H...
r""" Variationally optimizing measurement protocols ============================================== .. meta:: :property="og:description": Using a variational quantum algorithm to optimize a quantum sensing protocol. :property="og:image": https://pennylane.ai/qml/_images/illustration1.png .. related:: ...
import logging import re from collections import namedtuple from datetime import time import six from six.moves.urllib.parse import (ParseResult, quote, urlparse, urlunparse) logger = logging.getLogger(__name__) _Rule = namedtuple('Rule', ['field', 'value']) RequestRate = namedtup...
"""Functions related to mapping parameter from model to parameter estimation problem""" import logging import numbers import os import re from typing import Tuple, Dict, Union, Any, List, Optional, Iterable import libsbml import numpy as np import pandas as pd from . import lint, measurements, sbml, core, observable...
import networkx as nx import numpy as np import math from tqdm import tqdm import numba from numba.experimental import jitclass from numba import jit steadyspec = [ ('adj_matrix',numba.float64[:,:]), ('graph_size',numba.int32), ('background_field',numba.float64[:]), ('fixed_point_iter',numba.int32)...
# Copyright (c) 2016 Cisco Systems # 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 require...
import os import logging import subprocess from theano.configparser import ( AddConfigVar, BoolParam, ConfigParam, EnumStr, IntParam, TheanoConfigParser) from theano.misc.cpucount import cpuCount from theano.misc.windows import call_subprocess_Popen _logger = logging.getLogger('theano.configdefaults')...
# -*- coding: utf-8 -*- """ Various small and named graphs, together with some compact generators. """ __author__ ="""<NAME> (<EMAIL>)\<NAME> (<EMAIL>)""" # Copyright (C) 2004-2008 by # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # All rights reserved. # BSD license. __all__ = ['make_sma...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
########################################################################## # NSAp - Copyright (C) CEA, 2013 # Distributed under the terms of the CeCILL-B license, as published by # the CEA-CNRS-INRIA. Refer to the LICENSE file or to # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html # for details. ##########...
import re import io import json import asyncio from urllib import request from functools import partial from datetime import datetime from collections import OrderedDict import discord from discord.ext import commands import matplotlib.pyplot as plt from matplotlib.ticker import StrMethodFormatter from .utils import ...
#!/usr/bin/env python # Copyright JS Foundation and other contributors, http://js.foundation # # 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....
"""Implementation of core scheduling algorithms using Gurobi.""" import logging import os from collections import defaultdict from gurobipy import * import numpy as np import shelve import astropy.units as u import pandas as pd from collections import defaultdict from .constants import TIME_BLOCK_SIZE, EXPOSURE_TIME, ...
# MIT License # # Copyright (c) 2018 Pyjcsx, 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # 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 withou...
import os import re import cv2 import numpy as np import pandas as pd from Scripts.Experiments import RESULTS # ------------------------------------------------------------------------------------------------------------------ # # -------------------------------------------------- Restructure UNBC Data ------------...
""" ET Correction Tool: This script creates evapotranspiration Dfs2 from single/multiple reference ET time-series, and applies spatially, monthly varying solar radiation correction factors to the reference ET data and creates the MIKE SHE input ET Dfs2 file. Created on Wed Apr 28 15:50:07 2021 @author: <NA...
from copy import deepcopy from ray import tune import numpy as np from softlearning.misc.utils import get_git_rev, deep_update import os DEFAULT_KEY = '__DEFAULT_KEY__' M = 256 N = 2 REPARAMETERIZE = True NUM_COUPLING_LAYERS = 2 """ Policy params """ GAUSSIAN_POLICY_PARAMS_BASE = { 'type': 'GaussianPolicy', ...
# pylint: disable=too-many-arguments """Helper code for api.py and async_api.py.""" from base64 import b64encode from typing import Any, Dict, List, Optional, Tuple, Union, cast try: from typing import Literal # type: ignore except ImportError: from typing_extensions import Literal # type: ignore from warni...
# -*- test-case-name: vumi.transports.smpp.tests.test_smpp -*- from datetime import datetime from twisted.internet import reactor from twisted.internet.defer import inlineCallbacks, returnValue from vumi import log from vumi.utils import get_operator_number from vumi.transports.base import Transport from vumi.transp...
from capstone import * from capstone.x86 import * from elftools.elf.elffile import ELFFile import sys NUMBER_OF_CANDIDATES = 20 MAX_RSP_OFFSET = 0x200 ONE_GADGET_LIB_DEBUG = False # add # call # jmp # lea # mov # nop # push # sub # xor # movq # movaps # movhps # Most practical gadgets have simple constraints. # S...
from tensorflow.keras.layers import Dense, Input from tensorflow.keras.layers import Conv1D, Flatten, Lambda,MaxPool1D,BatchNormalization,UpSampling1D,Concatenate,Dropout from tensorflow.keras.layers import ZeroPadding1D from tensorflow.keras.layers import Reshape,Layer from tensorflow.keras.models import Model from te...
from __future__ import print_function import inspect import logging import os import re from collections import OrderedDict, deque from esphomeyaml import core from esphomeyaml.const import CONF_AVAILABILITY, CONF_COMMAND_TOPIC, CONF_DISCOVERY, \ CONF_INVERTED, \ CONF_MODE, CONF_NUMBER, CONF_PAYLOAD_AVAILABLE...
import unittest import os from os.path import exists, join import numpy as np from test_helper import TESTDIR, TESTDATA, TMPDATA import datetime from copy import copy import warnings from karta.vector import shp, read_shapefile from karta.vector.geometry import (Point, Line, Polygon, ...
# -*- coding: utf-8 -*- """ ![LeNet Architecture](lenet.png) Source: <NAME> """ from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from sklearn.utils import shuffle from tensorflow.keras.datasets import mnist from tensorflow.keras.datasets import fashion_m...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Testing :mod:`astropy.cosmology.parameter`.""" ############################################################################## # IMPORTS # STDLIB import ast import inspect import sys # THIRD PARTY import pytest import numpy as np # LOCAL import ast...
import pandas as pd from matplotlib import pyplot as plt import datetime import pickle import matplotlib.dates as mdates # Read the files dfsonde = pd.read_csv('sonde.txt', #skiprows= 10, #header = 11, #use the second row (index 1) as column headings ...
from multiprocessing.pool import Pool from itertools import repeat import pandas as pd import numpy as np def get_composers(res): """ Get the composers for the given track. **Parameters** - `res`: string composer names for each track within charts **Returns** A dictionary of composers ...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from copy import deepcopy import logging import os import pickle from bids.layout import BIDSImageFile from bids.layout.writing import build_path as bids_build_path import nibabel as nib import numpy as np import pandas as pd import pytest from rtCommon.bidsCommon import ( BIDS_DIR_PATH_PATTERN, BIDS_FILE_PAT...
from random import random, choice from apiritif import random_string from bzt.modules.aggregator import ConsolidatingAggregator, DataPoint, KPISet, AggregatorListener from bzt.utils import to_json from tests import BZTestCase from tests.mocks import r, MockReader, EngineEmul def get_success_reader(offset=0): moc...
from collections import OrderedDict from ctypes import LittleEndianStructure, Structure, Union, c_uint8, c_uint16, c_uint32,\ string_at, byref, sizeof, c_bool, c_int16, Array, c_char import json import logging import struct from telemetry_unit_conversions import \ temp_sensor_adc_val_to_celsius, adc_to_bat_cur...
#!/usr/bin/env python """ Repackage a USGS Collection-1 tar for faster read access. They arrive as a *.tar.gz with inner uncompressed tiffs, which Josh's tests have found to be too slow to read. We compress the inner tiffs and store them in an uncompressed tar. This allows random reads within the files. We also appen...
# Copyright 2019 <NAME>. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
# -*- coding: utf-8 -*- """Classes for 2d U-net training and prediction. """ import json from loguru import logger import os import sys import warnings from functools import partial from pathlib import Path from zipfile import ZipFile import numpy as np #from pytorch3dunet.unet3d.losses import GeneralizedDiceLoss impo...
from typing import List, Tuple import numpy as np from l5kit.data import ChunkedDataset from l5kit.data.filter import (filter_agents_by_frames, filter_agents_by_labels, filter_tl_faces_by_frames, filter_tl_faces_by_status) from l5kit.data.labels import PERCEPTION_LABELS from l5kit.data....
from django.db import models from django.db.models import Q from django.conf import settings from django_extensions.db.fields import AutoSlugField from django.core.files.uploadedfile import InMemoryUploadedFile from django.utils import timezone from werkzeug.datastructures import MultiDict from time import mktime imp...
import json import math import os import tempfile from os import remove from os.path import isfile import numpy as np import pandas as pd from pandapower.auxiliary import _add_ppc_options, _add_opf_options, _add_auxiliary_elements from pandapower.build_branch import _calc_line_parameter from pandapower.pd2ppc import ...
import asyncio import html import io import logging import re from asyncio import TimeoutError from base64 import b64encode from datetime import datetime, timedelta, timezone from random import choices import disnake from aiohttp import ClientTimeout from aiohttp.client_exceptions import ClientConnectorError from bs4 ...
# -*- coding:utf-8 -*- # author:平手友梨奈ii # e-mail:<EMAIL> # datetime:1993/12/01 # filename:configs.py # software: PyCharm import numpy as np import tensorflow as tf import keras.backend as K from keras.layers import Input, Lambda from keras.models import Model from keras.optimizers import Adam from keras.callbacks impo...
from .GCLocation import GCLocation from .GCDayData import GCDayData from .GCGregorianDate import GCGregorianDate, Today from .GCStringBuilder import GCStringBuilder,SBTF_TEXT,SBTF_RTF from math import floor from . import GCUT as GCUT import datetime from . import GCMath as GCMath from . import GCEarthData as GCEarthDat...
"""Collection of functions related to data.""" from functools import partial import torch def scale_features(X, approach='standard'): """Scale feature matrix. Parameters ---------- X : torch.Tensor Tensor of shape (n_samples, n_channels, lookback, n_assets). Unscaled approach : str, {'s...
import numpy as np import teaserpp_python from Config import Config import gtsam as gt from gtsam import (Cal3_S2, GenericProjectionFactorCal3_S2, NonlinearFactorGraph, NonlinearISAM, Pose3, PriorFactorPoint3, PriorFactorPose3, Rot3, PinholeCameraCal3_S2, Values,...
#!/usr/bin/python # # Copyright 2018 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 ag...
# -*- coding: utf-8 -*- """Collection of functions for the manipulation of time series.""" from __future__ import absolute_import, division, print_function import itertools import os import warnings import mando import numpy as np import pandas as pd from mando.rst_text_formatter import RSTHelpFormatter from tstoolb...
""" P2] Se presenta una escena con objetos dibujados con diferentes materiales a la escena base """ """ Se usa imgui para generar un menu y controlar variables de reflexion para el material de los objetos """ import glfw from OpenGL.GL import * import OpenGL.GL.shaders import numpy as np import grafica.transfor...
""" Levenberg Marquart fitting class and helper tools https://github.com/jaimedelacruz/LevMar Coded by <NAME> (ISP-SU 2021) References: This implementation follows the notation presented in: <NAME>, Leenaarts, Danilovic & Uitenbroek (2019): https://ui.adsabs.harvard.edu/abs/2019A%26A...623A..74D/abstract but without...
from pathlib import Path import abc import logging import io import importlib import time from _collections import OrderedDict import traceback import pandas as pd import numpy as np import shutil from graphviz import Digraph from ibllib.misc import version import one.params from one.alf.files import add_uuid_string ...
"""Specialized version of xes_histograms. 1) no support for background region of interest 2) photon_counting method only; uses integrated area under 1-photon Gaussian 3) no support for >1 photon 4) no multiprocessing 5) no output of gain map; no input gain correction 6) Fixed constraints for ratio of peak widths 1-phot...
#!/usr/bin/env python import os import shutil import copy import csv import json import math as m import traceback import cv2 import numpy as np from .util_video import FrameStamps from .util_video import FrameCache class FrameStamps: def __init__(self, Nfrm, runTime_s): self.Nfrm = Nfrm self.runTim...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. r""" References .. [burt2020svgp] <NAME> and <NAME> and <NAME>, Convergence of Sparse Variational Inference in...
import torch import torch.utils.data as data import torch.nn as nn import torch.optim as optim import os import numpy as np import pandas as pd import glob import cv2 from tqdm import tqdm, trange import matplotlib.pyplot as plt img_size = 256 # raw data directories X_img_path = "D:/AI in Urban Design/DL...
import json import os from enum import Enum from typing import List import numpy as np import pandas from keras.models import Sequential from keras.layers import LSTM, Dense, RepeatVector, TimeDistributed, Activation from matplotlib import gridspec as grid from matplotlib import pylab as plt from sklearn.metrics impor...
import os,sys import re import sympy import math import cmath from math import factorial as fact from sympy import factorial as symb_fact from sympy import factorial2 as symb_fact2 from scipy.special import binom as binomial from sympy import exp as symb_exp from sympy import I as symb_I def generate_cartesian_ls( L )...
from livewires import games, color from generate4 import * import pygame,math screen_width = 620 screen_height = 620 tilesize = 20 games.init(screen_width = screen_width,screen_height = screen_height, fps=50) shaft123 = games.load_image("hidden\\shaft.png", transparent=False) tiles = [games.load_image("hidden\\plan...
# encoding: utf-8 """ Training implementation Author: <NAME> Update time: 08/11/2020 """ import re import sys import os import cv2 import time import numpy as np import torch import torch.nn as nn import torch.backends.cudnn as cudnn from torch.optim import lr_scheduler import torch.optim as optim import torchvision im...
from src.utils.db_utils import execute_sql,insert_query, save_rds_pandas from src.models.save_model import save_upload, parse_filename from datetime import date, datetime from pyspark.sql import SparkSession from pyspark.sql.types import IntegerType, DoubleType from pyspark.sql.functions import monotonically_increasi...
import argparse import ctypes import ipaddress import math import random import signal import socket import selectors import statistics import struct import sys import textwrap import time # The C equivalent of the test header is # struct udpTestHeader_s { # int msgIndex; # int packetIndex; # double timest...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Interfaces under evaluation before upstreaming to nipype.interfaces.utility.""" import numpy as np import re import json from collections import OrderedDict from nipype.utils.filemanip import fname_pres...
import os import argparse import random import numpy as np import torch from torch.utils.data import DataLoader, Dataset from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, AutoConfig from transformers.optimization import get_linear_schedule_with_warmup, Adafactor import nlp from rouge_score import rouge_sc...
import Functions import pandas as pd import matplotlib.pyplot as plt def group_sentiment(dfSentiment): dfSentiment['datetime'] = pd.to_datetime(dfSentiment['created_utc'], unit='s') dfSentiment['date'] = pd.DatetimeIndex(dfSentiment['datetime']).date dfSentiment = dfSentiment[ ['created_utc', 'ne...
"""Convert Hindawi library html to OpenITI mARkdown. This script subclasses the generic MarkdownConverter class from the html2md module (based on python-markdownify, https://github.com/matthewwithanm/python-markdownify), which uses BeautifulSoup to create a flexible converter. The subclass in this module, HindawiConve...
from bs4 import BeautifulSoup import requests import pandas as pd import numpy as np import csv import tmdbsimple as tmdb import time import numpy as np import datetime import copy from unidecode import unidecode import calendar from ast import literal_eval from sklearn.feature_extraction.text import TfidfVectorizer,...
import os import io import json import trimesh import random import matplotlib.pyplot as plt import numpy as np import cv2 import torch def load_bop_meshes(model_path, obj_ids="all"): """ Returns: meshes: list[Trimesh] objID2clsID: dict, objID (original) --> i (0-indexed) """ # load m...
import sys import os import argparse import multiprocessing as mp from montreal_forced_aligner import __version__ from montreal_forced_aligner.utils import get_available_acoustic_languages, get_available_g2p_languages, \ get_available_dict_languages, get_available_lm_languages, get_available_ivector_languages fro...
# -*- coding: utf-8 -*- """ Single VsOne Chip Match Interface For VsMany Interaction Interaction for looking at matches between a single query and database annotation Main development file CommandLine: python -m ibeis.viz.interact.interact_matches --test-show_coverage --show """ from __future__ import absolute_i...
from mycv.utils.general import disable_multithreads disable_multithreads() import os from pathlib import Path import argparse from tqdm import tqdm import math import torch import torch.cuda.amp as amp from torch.optim.lr_scheduler import LambdaLR from torch.nn.parallel import DistributedDataParallel as DDP import wand...
import pydotplus as pdp import networkx as nx from copy import deepcopy import itertools as it from ..utilities.util import Util from IPython.display import Image from IPython import get_ipython import logging logger = logging.getLogger('cegpy.chain_event_graph') class ChainEventGraph(nx.MultiDiGraph): """ ...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from __future__ import print_function import gdb import struct import os.path from ctypes import create_string_buffer import load_symbol_cmd POINTER_SIZE = 8 # These constant definitions must align with _oe_enclave structur...
#!/usr/bin/env python # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ NiBetaSeries processing workflows """ from __future__ import print_function, division, absolute_import, unicode_literals import os from copy import deepcopy...
#!/usr/bin/env python3 """ Module to implement the Modified Seminario Method Originally written by <NAME>, TCM, University of Cambridge Modified by <NAME> and rewritten by <NAME>, Newcastle University Reference using AEA Allen, MC Payne, DJ Cole, J. Chem. Theory Comput. (2018), doi:10.1021/acs.jctc.7b00785 """ from Q...
# -*- coding: utf-8 -*- """ Created on Thu Mar 5 08:14:54 2020 @author: Tom """ import ecm import numpy as np import matplotlib.pyplot as plt import os from sklearn.preprocessing import StandardScaler import scipy import pandas as pd from matplotlib import cm import configparser # Turn off code warnings (this is not...
""" Double entry accounting system: A debit is an accounting entry that either increases an asset or expense account, or decreases a liability or equity account. It is positioned to the left in an accounting entry. Debit means "left", dividends/expenses/assets/losses increased with debit. A credit is an accounting en...
""" This is for Kaggle's Northeastern SMILE Lab - Recognizing Faces in the Wild playground competition: https://www.kaggle.com/c/recognizing-faces-in-the-wild The general model will be to create feature vectors of each face, then compare their Euclidean distance to get a value. I will use a second NN to make the fina...
# Copyright 2016 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, s...