text
stringlengths
8.04k
46.5k
from functools import wraps, reduce import numpy as np import time import tensorflow as tf from tensorflow.keras.layers import Layer, Input, Conv2D from tensorflow.keras.models import Model from tqdm import tqdm from tensorflow.keras.losses import ( binary_crossentropy, ) from _common import utils from _common im...
import numpy as np import unittest import scipy.integrate as sciint ''' Flexible beam tools: - computation of generalized mass and stiffness matrix Reference: [1]: Flexible multibody dynamics using joint coordinates and the Rayleigh-Ritz approximation: the general framework behind and beyond Flex ''' def fcu...
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # Python standard library from __future__ import print_function, division import os, stat, datetime, math from pwd import getpwuid # convert uid to user name from grp import getgrgid # convert gid to group name # Local imports from utils import fatal, err, md5sum fro...
""" Acquisition functions for Bayesian Optimisation. -- <EMAIL> """ from __future__ import division # pylint: disable=invalid-name from argparse import Namespace from copy import copy import numpy as np from scipy.stats import norm as normal_distro # Local from utils.general_utils import solve_lower_triangular fr...
# Copyright (c) Tencent, Inc. and its affiliates. All Rights Reserved """ @contact: <EMAIL> """ import time import copy import itertools import json import os import datetime import numpy as np import io import contextlib import logging import torch import matplotlib.pyplot as plt from collections import defaultdict, ...
''' ############################################################################# # # P L Y L E X & P A R S E # ############################################################################# ''' import re import sys from rpn.debug import dbg, whoami from rpn.exception import * import rpn.exe import rpn.g...
import discord from discord.ext import commands import asyncio import enum import io import numpy import random from PIL import Image, ImageSequence, ImageFont, ImageDraw, ImageColor import utils class Fun(metaclass=utils.MetaCog, category='Fun', thumbnail='https://i.imgur.com/w8OIp4P.png'): """Commands which m...
import re import functools import itertools import collections import pandas as pd from trove.labelers.tools import * from trove.labelers.labeling import * from trove.utils import score_umls_ontologies from trove.labelers.norm import lowercase, strip_affixes from trove.labelers.abbreviations import AbbrvDefsLabelingFu...
from calendar import timegm from datetime import datetime from re import compile, findall, UNICODE from storm.locals import Desc, Like, Min, Or from storm.expr import SQL from fluiddb.application import getConfig from fluiddb.data.comment import ( Comment, CommentObjectLink, createComment, deleteComment) from flu...
import base64 from copy import deepcopy from pathlib import Path from typing import Mapping, Any import pytest import yaml from aiopykube import config, errors from aiopykube.config import BytesOrFile, KubeConfigFieldError class TestKubeConfig: @pytest.fixture def dummy_doc(self, tmp_path: Path): cl...
# # Copyright (C) 2019 Databricks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
import base64 import os import sched import shutil import time import urllib.request from datetime import date from datetime import datetime from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from os.path import join, dirname import boto3 import cdsapi import xarray as xr from dotenv i...
import numpy as np # %% open and extract spectra and temp_dens data from an ALEXIS generated fits file (with GUI). # Argument is the directory where spectrum is located. # return (temp_dens_data, temp_dens_av, wavelengths, spect_array, spect_av) # temp_dens_data: Double probe data for the range r = 0 to r = 5...
""" A convenient plotting container In this package implements :class:`Plotter`, which is a simple container to dictionary like structure (e.g. :class:`dict`, :class:`np.recarray`, :class:`pandas.DataFrame`). It allows the user to plot directly using keys of the data and also allows rapid group plotting routines (grou...
import os import re import numpy as np import nibabel as nb import nipype.pipeline.engine as pe import nipype.interfaces.utility as util import nipype.interfaces.fsl as fsl import nipype.interfaces.ants as ants from nipype.interfaces import afni from CPAC.utils.function import Function import scipy.signal as signal ...
#!/usr/bin/python # -*- coding: utf-8 -*- # Hive Colony Framework # Copyright (c) 2008-2020 Hive Solutions Lda. # # This file is part of Hive Colony Framework. # # Hive Colony Framework is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by the Apach...
#!/usr/bin/env python3 import argparse from datetime import datetime from somaticseq.genomicFileHandler.genomic_file_handlers import p2phred from somaticseq._version import vcf_header as version_line nan = float('nan') time_string = datetime.now().isoformat(sep='_', timespec='seconds') def run(): inputPara...
import tensorflow as tf import copy slim = tf.contrib.slim arg_scope = tf.contrib.framework.arg_scope DATA_FORMAT_NHWC = 'NHWC' INVALID = 'null' # The cap for tf.clip_by_value, it's hinted from the activation distribution # that the majority of activation values are in the range [-6, 6]. CLIP_BY_VALUE_CAP = 6 ''' - ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Convenience utility functions for whoville, not really intended for external use """ from __future__ import absolute_import, unicode_literals import logging import json import re import time import copy import base64 import six from six.moves import reduce from time i...
#!/usr/bin/python # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
# Python modules import sys import tempfile import importlib import os import traceback import inspect import multiprocessing from codecs import BOM_UTF8 # third party modules # Our modules import vespa.common.util.time_ as util_time import vespa.common.util.misc as util_misc import vespa.common.util.config as util_...
''' Training script for CIFAR-10/100 Inspired on Copyright (c) <NAME>, 2017 ''' from __future__ import print_function # Basic things import os import pdb import sys import time import shutil import random import argparse import numpy as np import os.path as osp import matplotlib.pyplot as plt import matplotlib.gridspe...
# coding=utf-8 # # Modifications Copyright 2021 by <NAME>, <NAME> # from https://github.com/alekdimi/arms # and https://github.com/google-research/google-research/tree/master/disarm/binary # # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not u...
import matplotlib.pyplot as plt import matplotlib.patches as patches import copy #for recolor import matplotlib.colors as mplcolor import colorsys as colorsys import json import numpy as np thisfile="../output/alignment_runs/done_runs/HE_runs/9/AlignmentResults/parsedlog.json" outdir="../output/alignment_runs/done_r...
from __future__ import print_function import ni_nfvo_client import ni_mon_client from datetime import datetime, timedelta from ni_nfvo_client.rest import ApiException as NfvoApiException from ni_mon_client.rest import ApiException as NimonApiException from config import cfg from server.models.sfc_info import SFCInfo i...
import random import sys import time import networkx as nx import matplotlib.pyplot as plt import pandas as pd import numpy as np from copy import copy import itertools from collections import deque import pandas as pd from tqdm import tqdm from tabulate import tabulate from itertools import chain, combinations IN_...
import numpy as np import os import matplotlib.pyplot as plt from scipy.ndimage.morphology import generate_binary_structure from scipy.ndimage.filters import maximum_filter from scipy.ndimage import label, center_of_mass, map_coordinates import shutil from imageio import imwrite from scipy.signal import convolve2d im...
#!/usr/bin/python2.4 """MobWrite - Real-time Synchronization and Collaboration Service Copyright 2006 Google Inc. http://code.google.com/p/google-mobwrite/ 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 Lic...
import re import sys from random import shuffle import numpy as np import matplotlib.pyplot as plt from scipy.optimize import curve_fit import seaborn as sbn import h5py import pystan as ps import os import dill import warnings from six import StringIO import copy from tqdm import tqdm import scipy.optimize as opt impo...
#!/usr/bin/env python ''' Add the approriate dbbact ontology id (term_id) to each dbbact term in OntologyTable need to run once since we didn't dutomatically set when adding new term ''' import click import datetime from collections import defaultdict import psycopg2 from dbbact_server import db_access from dbbact...
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 """ Lambda function designed to be called when the Personalize campaign ARN is set as an SSM parameter indicating that the campaign has been created (either by the automated deployment process or the Personalize works...
from bs4 import BeautifulSoup from cachecontrol import CacheControlAdapter from cachecontrol.caches.file_cache import FileCache from cachecontrol.heuristics import BaseHeuristic, expire_after, datetime_to_header from collections import defaultdict, Counter from datetime import datetime, timedelta import json import log...
import os import sys import yaml import cv2 import numpy as np import datetime import copy import transforms3d as tf3d import time import random import json import open3d import math from pathlib import Path from misc import manipulate_RGB, toPix_array, toPix, calculate_feature_visibility # Import bop_renderer and b...
import argparse from tfutils.utils import frozendict, format_devices import os import logging import tensorflow as tf import copy import numpy as np from tfutils.optimizer import ClipOptimizer, MinibatchOptimizer import tfutils.utils as utils from tfutils.utils import aggregate_outputs import pdb import inspect from si...
""" Module containing functions to generate outputs for the WFC3/UVIS External CTE monitor, using data prepped in `run_image_extraction.py` and stored in the FileInfo and Phot tables. In the functions here the CTE gets measured (in call to `plot_fluxratio_vs_ypos_setup`) and filled into the Results table, and using ...
import requests import base58 import ipfshttpclient import multiaddr import decimal import csv from _pysha3 import keccak_256 from decimal import Decimal from typing import Any from collections import defaultdict from pathlib import Path REGISTRY_ADDRESS = "0x0Ee5AFF42564C0D293164b39D85653666ae151Eb" IPFS_GATEWAY = ...
## Copyright 2020 UT-Battelle, LLC. See LICENSE.txt for more information. ### # @author <NAME>, <NAME>, <NAME>, <NAME> # <EMAIL> # # Modification: # Baseline code # Date: Apr, 2020 # ************************************************************************** ### from __future__ import absolu...
# #!/usr/bin/env python3 # coding: utf-8 import argparse import csv import sys from re import compile import logging banksize = 0x4000 def getBank(address): return address // banksize def getPointer(address): bank = getBank(address) pnt = address % banksize if (0 == bank): return pn...
import _pickle as cPickle import collections import operator import os import pdb import random from functools import reduce from typing import List import h5py import joblib import matplotlib.pyplot as plt import numpy as np from skimage.util import view_as_windows from sklearn.preprocessing import StandardScaler, On...
#import networkx as nx from scipy.spatial import ConvexHull import matplotlib.pylab as plt from .phase import * from .equilibrium import Equilibrium from ..utils import * class PhaseSpaceError(Exception): pass class Heap(dict): def add(self, seq): if len(seq) == 1: self[seq[0]] = Heap() ...
import particle as pt import handler as hd import webbrowser as wb from primitive import * # Menu primitives: class Button: def __init__( self, text: list, rect: r, action, action_parameters: list = None, action_keywords: dict = None, ...
############################################################################### # WaterTAP Copyright (c) 2021, The Regents of the University of California, # through Lawrence Berkeley National Laboratory, Oak Ridge National # Laboratory, National Renewable Energy Laboratory, and National Energy # Technology Laboratory ...
import pymzml from tqdm import tqdm import numpy as np from scipy.integrate import simps import pandas as pd import peakutils import glob from pathlib import Path import scipy import pickle import os import re import pyisopach from scipy import special import itertools import urllib import json # Modeling modules #...
from datetime import datetime, timedelta import os import netCDF4 import numpy as np import numbers from bisect import bisect_left, bisect_right import cdippy.ndbc as ndbc import cdippy.utils as cu import cdippy.url_utils as uu class CDIPnc: """ A base class to handle CDIP nc data files located either locally ...
"""This is an TensorFLow implementation of AlexNet by <NAME> at all. Paper: (http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf) Explanation can be found in my blog post: https://kratzert.github.io/2017/02/24/finetuning-alexnet-with-tensorflow.html This script enable...
from __future__ import print_function from Elements.Inspire import * from Elements.Epic import * from Elements.CalmWaters import * from Elements.ChoppyWaters import * from Genre.Genre import * from Genre.ClassicalGenre import * from Genre.GeneralGenre import * from Arranging.ArrangeSections import * ...
#!/usr/bin/env python3 # Version 0.0.05 # Copyright (c) 2015 <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 right...
import torch import torch.nn as nn import torch.nn.functional as F import torchvision.models as models import numpy as np from .cyclegan_networks import init_net class GANLoss(nn.Module): """Define different GAN objectives. The GANLoss class abstracts away the need to create the target label tensor that ...
# -*- coding: utf-8 -*- # Copyright (C) 2012 VT SuperDARN Lab # Full license can be found in LICENSE.txt """Earth coordinate conversion routines Functions --------- geodToGeoc : converts from geodetic to geocentric (and vice-versa) geodToGeocAzEl : converts azimuth and elevation from geodetic to geocentric ...
# # wireless sensor routines import datetime import json import os import random import signal import sys import time import traceback from subprocess import PIPE, STDOUT, Popen from threading import Thread import MySQLdb import buildJSON import config import indoorTH import pclogging import state import util # --...
"""""" import base64 import hashlib import hmac import json import sys import time from copy import copy from datetime import datetime, timedelta from threading import Lock from typing import Any, Dict, List, Callable from urllib.parse import urlencode import pytz import requests from requests import ConnectionError ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import copy from glob import glob import matplotlib.pyplot as plt import multiprocessing import numpy as np import os import pandas as pd import shutil from .tileserver_helpers import create_hf from .tileserver_helpers import collect_coord_info from .tileserver_helpers im...
# -*- coding: utf-8 -*- from openerp.osv import osv,fields from openerp import models, fields, api, _ from datetime import datetime,timedelta,date import openpyxl from openpyxl import load_workbook from openpyxl import Workbook import re import io import logging import json import base64 import os.path import csv impor...
#!/usr/bin/python # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unittests for build stages.""" import copy import glob import mox import optparse import os import sys import constants sys.pa...
class Piece(object): # 棋子类 def __init__(self, count, color, position): self.count = count # 当前步数,第几颗棋子(不区分黑白) self.color = color # 棋子颜色, 1为黑, 0为白 self.position = position # 棋子位置,位置坐标为(0, 0)-(18, 18) class StepRecordChessBoard(object): # 棋盘状态类 def __init__(self, first, level...
import time from datetime import datetime, timedelta, timezone import mysql.connector from multiprocessing import Pool import random from decimal import Decimal import config ######################################################################################################################## # PROCEDURES: # Step 1:...
"""Base types for the Dork game""" # -*- coding: utf-8 -*- from abc import ABC, abstractmethod import os from random import randrange from copy import deepcopy from inspect import getfullargspec as argspec import yaml import dork.game_utils.factory_data as factory_data from dork.game_utils.world_builder import MazeFact...
from datetime import datetime, timedelta from random import randint from collections import defaultdict, OrderedDict import arrow import trueskill import json from flask_security import UserMixin, RoleMixin from flask_sqlalchemy import SQLAlchemy from sqlalchemy import func, select, desc, and_ from sqlalchemy.ext.as...
# -*- coding: UTF-8 -*- from functools import total_ordering, reduce import html import json import os.path import re import sublime import SublimeHaskell.internals.unicode_opers as UnicodeOpers @total_ordering class Position(object): def __init__(self, line, column): self.line = line self.colum...
#@author: <NAME> import re from adblockparser import AdblockRules from DBCrawlerSqlite import DBconnection import os from time import sleep import sys db = None WRONG = "Something wrong happened :((\n" inclusion = "\"Inclusion\"" redirection = "\"Redirection\"" link = "\"Link\"" link_cookie = "\"Link Cookie\"" acces...
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
""" Code borrowed, reformatted, and modified from github.com/lstn/muddy """ from datetime import datetime import random import json import re from overload import overload from muddy.muddy.constants import DOMAIN_NAME_REGEX, HTTP_URL_REGEX, URN_URL_REGEX, REGEX_OVERRIDE from muddy.muddy.exceptions import InputExcepti...
#!/usr/bin/env python3 # A Python/Tkinter GUI which roughly simulates a SteppIR SDA-100 controller. # # This version has: # # 1) A CLIENT socket connection to a radio's CAT port at port 21000. # # 2) A SERVER socket for a CAT port at 19090 for various clients to connect # to (Fldigi, Wsjt-x, Js8call, etc). # # 3) A...
# **Authors: <EMAIL>** # Additional packages import os import math import numbers import pandas as pd import opendssdirect as dss import numpy as np from PyDSS.pyPostprocessor.pyPostprocessAbstract import AbstractPostprocess # from PyDSS.exceptions import InvalidParameter, OpenDssConvergenceError from P...
import datetime import hashlib from flask_debugtoolbar import DebugToolbarExtension from flask import ( Flask, render_template, redirect, request, flash, session, url_for, jsonify, ) from flask_sqlalchemy import SQLAlchemy from flask_cors import CORS from flask_paginate import Paginatio...
import os import math import common.log as trace1 from common.realtime import sec_since_boot, DT_MDL from selfdrive.swaglog import cloudlog from selfdrive.controls.lib.lateral_mpc import libmpc_py from selfdrive.controls.lib.drive_helpers import MPC_COST_LAT from selfdrive.controls.lib.lane_planner import LanePlanner...
#!/usr/bin/python ################################################################################# # # Copyright (c) 2009, <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: # * Redistrib...
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test block processing. This reimplements tests from the bitcoinj/FullBlockTestGenerator used by the pu...
# coding=utf-8 import sys import os import pexpect # import imp # import testList # import testListFeature import re from datetime import datetime from threading import Thread from time import sleep from collections import defaultdict import time import sys try: import scapy.all as t_scapy except IOError: print...
import bpy import os import importlib from . import MMT_Stash_Material #---------- NOTES ----------------------------------------------------------------------------- # This script is a work in progress! currently only works on meshes and does not consider object textures as references... # Alrighty... so when we im...
from vim.rules.letter import (snake_case, proper, camel_case) from macro_utilities import (replace_in_text, comment_choice, execute_with_dictation, with_dictation) from dragonfly import (Grammar, CompoundRule, Text, MappingRule, Dictation, Function, Choice, IntegerRef...
import collections class Register: """ main class for Register objects """ class RegClass: """ class of registers """ @classmethod def build_multi_reg(reg_class, reg_list): """ build a multi-reg register from a list of physical registers """ return MultiArchRegis...
import os import math import glob import time import itertools import random from typing import * from numpy.random import shuffle import torch import numpy as np import nvidia.dali as dali import nvidia.dali.fn as fn import nvidia.dali.ops as ops from torch.utils.data import Dataset from nvidia.dali.plugin.pytorch im...
# -*- coding: utf-8 -*- from __future__ import absolute_import import copy import json import base64 import logging from keyword import kwlist import string_utils from . import PRIMITIVES from .kubernetes import KubernetesObjectHelper from .openshift import OpenShiftObjectHelper # Attributes in argspec not needed b...
import os from io import BytesIO import shutil from pathlib import Path import re from random import Random from collections import OrderedDict import hashlib import yaml from fs_helpers import * from wwlib.yaz0_decomp import Yaz0Decompressor from wwlib.rarc import RARC from wwlib.rel import REL from wwlib.gcm import...
# -*- coding: utf-8 -*- """ Classes and functions to deal with the visualisation of the AmpObjects. These include wrappers for vtk and Qt Copyright: <NAME> 2020, <EMAIL> """ import numpy as np import vtk from vtk.util import numpy_support from vtk.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor vtk.vt...
# Copyright 2019, <NAME>, mailto:<EMAIL> # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lice...
""" For general bot commands, basic/meta stuff. """ import asyncio import datetime import json import os import platform import time from time import strptime as s from uuid import uuid4 import aiohttp import async_timeout import discord import humanize import psutil from discord.ext import commands from CyberTron50...
import numpy as np from scipy.special import gamma # Local imports: from jetmontecarlo.utils.plot_utils import * from jetmontecarlo.utils.hist_utils import * from jetmontecarlo.utils.color_utils import * from jetmontecarlo.utils.vector_utils import * from jetmontecarlo.utils.partonshower_utils import * from jetmonteca...
#!/usr/bin/env python3 # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. # Author: <NAME> # Additional Comments: <NAME> # Date: October 29, 2018 import numpy as np from math import sin, cos, pi, sqrt class VelocityPlanner: def __ini...
#This is the python script for user, one of two major components. #It is used to set up file hosting using onionshare and make a GET request to an onionshare address. import os import sys import requests as r import time import json from signal import signal, SIGINT import threading from datetime import date...
# # This file is part of pysnmp software. # # Copyright (c) 2005-2019, <NAME> <<EMAIL>> # License: http://snmplabs.com/pysnmp/license.html # import sys from pysnmp.proto.mpmod.base import AbstractMessageProcessingModel from pysnmp.proto import rfc1905, rfc3411, api, errind, error from pyasn1.type import univ, namedtype...
#!/usr/bin/env python import os import zmq import math import numpy as np from copy import copy from cereal import log from collections import defaultdict from common.params import Params from common.realtime import sec_since_boot from common.numpy_fast import interp import selfdrive.messaging as messaging from selfdri...
#!/usr/bin/env python # Copyright 2017 Calico 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 # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agr...
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.intrinsic as nni from torch.fx import GraphModule from torch.fx.graph import Node from .utils import ( WEIGHT_INDEX_DICT, get_new_attr_name_with_prefix, maybe_get_next_module, _parent_name, ) from ..observer import ( ...
# --- Do not remove these libs --- import freqtrade.vendor.qtpylib.indicators as qtpylib import numpy as np import talib.abstract as ta import pandas_ta as pta from freqtrade.persistence import Trade from freqtrade.strategy.interface import IStrategy from pandas import DataFrame, Series, DatetimeIndex, merge from date...
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import os import tarfile import urllib import sys import time import glob import pickle import xml.etree.ElementTree as ET import cv2 import json import numpy as np import pandas as pd import zipfile import ...
# -*- coding: utf-8 -*- ############################################################################## # Copyright (c) 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this di...
"""Support for LIFX lights.""" import asyncio from datetime import timedelta from functools import partial import logging import math import sys import voluptuous as vol from homeassistant import util from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_BRIGHTNESS_PCT, ATTR_COLOR_NAME, A...
#################################### IMPORTS ################################### if __name__ == '__main__': import sys import os pkg_dir = os.path.split(os.path.abspath(__file__))[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = (pkg_name == 'tests' and os.path....
# ############################################################################ # # Copyright (c) Microsoft Corporation. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of this distribution....
# -*- coding: utf-8 -*- """ This script makes plots of relevant data. @author: <NAME> """ import yaml import os import pandas as pd import energyscope as es import numpy as np import matplotlib.pyplot as plt from sys import platform from energyscope.utils import make_dir, load_config, get_FEC_from_sankey from ener...
# Released under the MIT License. See LICENSE for details. # """Settings UI functionality related to gamepads.""" from __future__ import annotations from typing import TYPE_CHECKING import _ba import ba if TYPE_CHECKING: from typing import Any, Optional, Union, Callable class GamepadSettingsWindow(ba.Window):...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
##v4版本可以识别多车并对应,并行运算 # 场地 493.5 685.0 (245, 423) # 灯条 12.5(5.5) 13.5 import sys sys.path.append("./angle_classify") sys.path.append("./armor_classify") sys.path.append("./car_classify") import cv2 import time import torch import numpy as np from classification import * from position_predict import * ...
from osgeo import gdal import numpy as np import os import warnings import csv import math import datetime import numba import sys from memory_profiler import profile import shadowing # Notes: # Shading is memory intensive (lots of copies of the array), Shadowing is processor intensive. # Numba jit'ing the monolithic...
## @package pawpyseed.core.wavefunction # Base class containing Python classes for parsing files # and storing and analyzing wavefunction data. import os import time import numpy as np from pymatgen.io.vasp.inputs import Poscar, Potcar from pymatgen.io.vasp.outputs import Vasprun import pawpyseed.core.symmetry as pa...
import torch import torch.nn as nn import torch.nn.functional as F import os, time import pandas as pd import soft_renderer as sr import soft_renderer.functional as srf import math from haven import haven_utils as hu from src.losses import multiview_iou_loss, iou_loss import soft_renderer.functional as srf from soft_re...
from os import getenv # Environment variable handling import time # Sleep/time import datetime import requests # For making HTTP requests to Prometheus import kubernetes # For talking to the Kubernetes API from kubernetes.client import ApiException from packaging ...
import random import time import warnings from builtins import NotImplementedError from pprint import pprint from urllib.parse import parse_qs, quote, urlparse import requests from django.db import transaction from requests import ConnectionError from requests.exceptions import SSLError from simplejson.errors import J...