text
stringlengths
3.07k
22.1k
"""Utility functions for FMI-PPN""" import datetime as dt import numpy as np import h5py def pack_value(original_value, scale_factor, add_offset): # scale_factor == gain, add_offset == offset packed = (original_value - add_offset) / scale_factor return packed def unpack_value(packed_value, scale_factor, a...
#!/usr/bin/python import os import re import sys import math from glob import glob from PIL import Image from shutil import rmtree from selenium import webdriver # imagemagik binary imagemagick = 'compare' # Optionally remove intermediate work results as PNG slices remove_slices = False make_visual_diff = True op...
import pytest import asyncio import time from functools import partial from pretest import * import random from backend_lib.test_utils import TESTUSERS, TESTCLIENTS from bitahoy_sdk.backend import BackendWS @pytest.fixture(autouse=True) def run_around_tests(): # Code that will run before your test, for example: ...
import tkinter as tk from tkinter import ttk from tkinter import filedialog, messagebox, simpledialog from PIL import Image, ImageTk from ecg import * import matplotlib.image as mpimg from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg import base64 import io import requests from matplotlib import pyplot as...
""" Using the API ============= """ import asyncio import collections import copy import functools import logging import inspect import os import typing from graphql import ( DocumentNode, execute, ExecutionResult, GraphQLSchema, parse, validate_schema, validate, ) from .context import ...
import fastai from fastai.vision import * from torch.utils.data.dataloader import default_collate from torch.utils.data import Sampler, SequentialSampler, RandomSampler import sklearn # Modification to ImageDataBunch to allow to give a list of custome samplers. class ImageDataBunch(ImageDataBunch): @classmethod ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from gevent.pywsgi import WSGIServer import re import urllib import logging static_setting = {"templates": r"templates"} from .HTTPerror import HTTP404Error, HTTP403Error, HTTP502Error, HTTP302Error class RouteError(Exception): def __init__(self, info=None): ...
#!/usr/bin/env python3 try: from PyQt5.QtWidgets import QApplication except ImportError: raise ImportError('You need to install PyQt5 to run GUI') from argparse import ArgumentParser from logging import getLogger, StreamHandler, Formatter, INFO, DEBUG from datetime import datetime from types import MethodTyp...
import math import torch import random import gym from pathlib import Path from typing import Tuple from torch.nn.functional import smooth_l1_loss from collections import deque from torch.optim.optimizer import Optimizer from torch.optim.rmsprop import RMSprop from torch.utils.tensorboard.writer import SummaryWriter f...
#!/usr/bin/python3 import datetime import math import random class Student(object): def __init__( self, name: str, heat: float, noise: float, group: [] ): self.name = name self.heat = heat self.noise = noise self.grou...
# Python binding copyright (c) 2013 <NAME> # # PicoSAT copyright (c) 2006 - 2012, <NAME>, Johannes Kepler University. # # 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, in...
# coding:utf8 """ Copyright 2015 tufei 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 typing import List, Optional import logging from collections import Counter from itertools import cycle import numpy as np import matplotlib import matplotlib.pyplot as plt import seaborn as sns from pandas import DataFrame from scipy.cluster import hierarchy from scipy.spatial.distance import pdist from hyperclus...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import pygame import random import math from typing import Tuple, List class Vec2d: def __init__(self, x: float, y: float) -> None: self.x: float = x self.y: float = y @staticmethod def from_tuple(p: Tuple[float, float]): return Vec2...
import itertools import numpy as np class Node(): def __init__(self, label, qpos_ids, qvel_ids, act_ids): self.label = label self.qpos_ids = qpos_ids self.qvel_ids = qvel_ids self.act_ids = act_ids pass def __str__(self): return self.label def __repr__(sel...
#!/usr/bin/env python3 # # orcid-authority-to-item.py 1.1.1 # # Copyright 2018–2019 <NAME>. # # 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 3 of the License, or # (at your optio...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import os import re import shutil import subprocess as sp import sys import time import textwrap import requests import yaml from requests.packages.urllib3.exceptions import InsecureRequestWarning try: import xml.etree.cElementTree as eTree except ImportE...
""" Function of evaluation.py The script makes it possible to quickly and easily perform all stored functions for testing the system. The results are stored in the defined directories. The functions can be executed immediately. All required images are stored. In addition, the script can be adapted for further ima...
# Copyright (c) 2016 Hewlett-Packard Enterprise Development Company, L.P. # # 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...
# Copyright 2021 Adobe. All rights reserved. # This file is licensed to you 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 ...
from __future__ import absolute_import import sys import traceback import six from django.shortcuts import get_object_or_404 from django.contrib.auth.decorators import login_required from django.utils import timezone from django.template.loader import get_template from django.utils.datastructures import MultiValueDic...
#!/usr/bin/python #-- coding: UTF-8 -- ##### Experiment adapted from: ## <NAME>. & <NAME>. (2020). DRM-Paradigm with Psychopy: An in-depth look at Programming Experiments. In <NAME>, <NAME>, <NAME> & <NAME> (Eds.). *Scientific Methods for Open Behavioral, Social and Cognitive Sciences*. https://doi.org/10.17605/OSF.IO...
"""Classes to represent picklists and liquid transfers in general""" from collections import OrderedDict from copy import deepcopy import json import pandas #import parsers #import exporters from .tools import compute_rows_columns, wellname_to_index, index_to_wellname class Transfer: """A tranfer from a source...
""" Deep Deterministic Policy Gradient agent Author: <NAME> Website: https://sameera-lanka.com """ # Torch import torch import torch.nn as nn from torch.autograd import Variable import torch.optim as optim import torch.nn.functional as F import math # Lib import gym import numpy as np import random from copy import ...
# -*- coding: utf-8 -*- # Time: 2022-03-01 11:00 # Copyright (c) 2022 # author: Euraxluo import traceback import aiohttp import random import asyncio import warnings from concurrent import futures from amap_distance_matrix.helper import * from amap_distance_matrix.schemas.amap import * from amap_distance_matrix.servi...
""" This module defines the utility methods and classes necessary for the post-processing subpackage of the pyioflash library. Todo: """ from typing import Any, Tuple, List, Dict, Iterable, Union, Callable, TYPE_CHECKING from collections import namedtuple from functools import partial from sys import stdout imp...
import numpy as np from matplotlib.patches import Wedge, Polygon, RegularPolygon from matplotlib.collections import PatchCollection import matplotlib.pyplot as plt class FootprintGeometry(): def __init__(self): self._patches = [] self._xlim = 0 self._zenithAngleInDeg = 0 self._lgs...
import serial # need to "pip install pyserial" for this to work import sliplib # need to "pip install sliplib" for this to work import struct from time import sleep # Pad a string or bytes object out to a multiple of 4 octets def OSCpad(s): if isinstance(s,str): # needs a \0 terminator r = bytes(s.encode(...
from datetime import datetime, timedelta import numpy as np import numexpr as ne from netCDF4 import Dataset from scipy.interpolate import CubicSpline from typhon.utils import Timer import xarray as xr from .common import NetCDF4, expects_file_info from .testers import check_lat_lon __all__ = [ 'AVHRR_GAC_HDF', ...
# TrainKerasTensorFlowForTaggedSounds - Loads a set of wav files and their tags, # analyzes them using Mel-Frequency Cepstral Coefficients and related derivatives, # splits the wav set into training and validation sets, and trains a Keras/TensorFlow # machine learning model to recognize the sounds. # # The resulting mo...
import json import os import multiprocessing as mp import unittest from shutil import rmtree import h5py import mobie import numpy as np from elf.io import open_file from mobie.metadata.utils import read_metadata class TestViewCreation(unittest.TestCase): test_folder = "./test-folder" root = "./test-folder/...
import torch import torch.nn as nn from utils.custom_modules import CausalConv1d, DTLNSeparationCore from utils.training_process import TrainingProcess class DTLN(nn.Module): """ Dual-Signal Transformation Long Short-Term Memory Network. Based on the work presented by <NAME> et. al for the DNS INTERSPEEC...
from time import sleep from typing import Dict from uuid import uuid4 from core.default.resources.simple import xlambda as simple_lambda from core.default.resources.simple import api as simple_api from core.default.resources.simple import object_store as simple_bucket from core.default.resources.simple import table as...
#!/usr/bin/env python # # <EMAIL> # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 # import os import yaml import utils.dove...
from src.utils import pdump, pload, bmtv, bmtm from src.lie_algebra import SO3 from termcolor import cprint from torch.utils.data.dataset import Dataset from scipy.interpolate import interp1d import numpy as np import matplotlib.pyplot as plt import pickle import os import torch import sys class BaseDataset(Dataset): ...
""" for a system (e.g., protein) saves features. """ from typing import Dict, List, Mapping, Tuple, Optional, Union, Any from pathlib import Path from dataclasses import dataclass import pickle import logging from multiprocessing import cpu_count, Pool from functools import partial from argparse import ArgumentParser ...
from __future__ import print_function from __future__ import division import numpy as np import sqaod from . import formulas from sqaod.common import checkers, symmetrize from types import MethodType from sqaod import algorithm as algo class DenseGraphAnnealer : """ python implementation of dense graph annealer. ...
import re import random import os import pandas as pd try: import torch except ImportError: pass from tqdm import tqdm import spacy from spacy import displacy from visuUtils import train2myVisu, build_color_scheme from visuUtils import conll2sent_list, sent_list2spacy, myScores class visualizer(object): ...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import ...
import argparse import os import json import csv import glob import requests from jdss import SummaryReport import base64 def job(args): report = SummaryReport() section = report.add_section() tabs = section.add_tabs() for i in range(0, len(args.tab)): tab_contents = args.tab[i]...
import datetime import io import json import logging import os import pathlib import re import sys import urllib.parse as urlparse import uuid import sarif_om as om from jschema_to_python.to_json import to_json from reporter.sarif import render_html import lib.config as config import lib.csv_parser as csv_parser impo...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
# Code borrowed from CoreGCN AL github repo # Link: https://github.com/razvancaramalau/Sequential-GCN-for-Active-Learning/blob/master/models/query_models.py import math import torch import torch.nn as nn import torch.nn.init as init import torch.nn.functional as F from torch.nn.parameter import Parameter from torch.nn...
############################################################################## ### ICS5110: Applied Machine Learning ### ### Custom Classifiers Implementation ### By <NAME>, <NAME>, <NAME> ### ### January 2019 ############################################################################## import math import copy import...
# summarizeLib.py # <NAME> # 3.28.19 # # module of functions that allow you to create per-cell / per-sample summary tables import pandas as pd import numpy as np import math def get_laud_db(database_): """ returns the COSMIC database after lung and fathmm filter """ pSiteList = database_.index[database_['Pr...
import socket import urllib.request from functools import partial from itertools import chain from pkgcore.fetch import fetchable from snakeoil.iterables import partition from .. import addons, results from . import NetworkCheck class _DeadUrlResult(results.FilteredVersionResult, results.Warning): """Generic re...
"""Helper functions for workshop """ import pandas as pd from sagemaker.feature_store.feature_group import FeatureGroup import time import boto3 import sagemaker from sagemaker.serializers import JSONSerializer import os import json from sagemaker.feature_store.feature_definition import ( FeatureDefinition, Fe...
import json import os import sys from cachetools import TTLCache ####################### Operations ################################ def create_operation(client_name, key, value, **kwargs): ttl_value = kwargs.get('ttl', None) filepath = kwargs.get('filepath', ".//") try: with open(filepath+client_name+'.json', ...
# Copyright (c) 2016-2020 Knuth Project developers. # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import os from conans import ConanFile, CMake from conans import __version__ as conan_version from conans.model.version import Ve...
#!/usr/bin/env python3.4 # # Copyright 2016 - Google # # 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 appl...
import torch from mp.eval.losses.losses_segmentation import LossBCE, LossDice, LossClassWeighted, LossDiceBCE from mp.data.pytorch.transformation import per_label_channel A_1=[[0,0,0,0,0,0,0], [0,1,3,3,0,1,0], [0,0,3,1,1,2,2], [0,0,0,1,1,2,2]] A_2=[[0,0,0,0,0,0,0], [0,0,0,0,0,0,0], [0,0,0,0,3,3,3],...
# FUNZIONI PER LA VALUTAZIONE DEI MODELLI. import matplotlib.pyplot as plt import numpy as np from sklearn.utils import resample from sklearn.preprocessing import MinMaxScaler from sklearn.model_selection import train_test_split from sklearn.model_selection import cross_val_score from sklearn.metrics import mean_squ...
# Modules from time import sleep from cryptography.fernet import Fernet import os, socket, webbrowser import tkinter as tk import tkinter.font as tkFont from tkinter import * from PyWallpaper import change_wallpaper # Function encrypt def encrypt(path): with open(path, "rb") as normal_file: w...
import pandas as pd from sys import argv import scipy.ndimage.filters as filters import scipy.signal as sig from sklearn.utils.fast_dict import IntFloatDict as fdict def create_fastdict(keys=None, vals=None): if keys is None: d = fdict(np.array([], dtype=int), np.array([])) return d else: ...
from __future__ import division class FormatError(RuntimeError): pass def chain_id_strip(id): if (id[0] == " "): return id[1] return id class _base(object): def __init__(self, pdb_str): if (len(pdb_str) < 80): pdb_str += " " * (80-len(pdb_str)) self.pdb_str = pdb_str def raise_FormatError(self, msg)...
import argparse import itertools import json import os import re from collections import defaultdict from pathlib import Path import matplotlib.pyplot as plt import matplotlib.ticker as ticker import numpy as np from tensorboard.backend.event_processing import event_accumulator numbers = re.compile(r'(\d+)') BENCHMA...
# -*- coding: utf-8 -*- import time from contextlib import closing from functools import wraps from typing import Callable, Optional, Union from airflow.providers.postgres.hooks.postgres import PostgresHook from pandas import DataFrame, read_sql_query from psycopg2.extensions import connection, cursor from data_detec...
# Copyright 2011-2013 <NAME> # Copyright 2011-2013 <NAME> # Copyright 2012-2013 <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 # # ...
# -*- coding: utf-8 -*- """ Created on Wed Nov 25 12:33:00 2020 @author: Camille """ import ctypes import sys from _k4arecordtypes import * from _k4atypes import * import traceback class k4arecord: def __init__(self,modulePath): try: dll = ctypes.CDLL(modulePath) e...
import requests import json import time import threading from sys import stdout, stderr import urllib.request import urllib.parse import logging def print_to_file(shipdict): lock.acquire() with open('data.json', 'w') as fp: fp.truncate() json.dump(shipdict, fp, indent=1) lock.release() d...
# -*- coding: latin-1 -*- # ----------------------------------------------------------------------------- # Copyright 2012, 2017 <NAME> <<EMAIL>> # # Licensed under the EUPL, Version 1.1 or - as soon they # will be approved by the European Commission - subsequent # versions of the EUPL (the "Licence"); # You may not us...
from lxml import etree from pm4py import log as log_lib import ciso8601 import logging import tempfile, os import gzip, shutil # ITERPARSE EVENTS EVENT_END = 'end' EVENT_START = 'start' def import_from_xes_string(xes_string, timestamp_sort=False, timestamp_key="time:timestamp", reverse_sort=False, ...
######################### ### Domain Parameters ### ######################### # Table grid resolution RESOLUTION=0.1 # End-Effector Frame FRAME = "end_effector_grasp" # Object placement tolerance EPSILON = 1e-4 ######################## ### Imported Modules ### ######################## # Import our planning packa...
import collections from dataclasses import dataclass import logging import re from typing import List, Tuple, Optional, Union, Dict import jiwer from services.evaluation.score import EvaluationScore from services.normalization import get_normalizer, NORMALIZER_SUPPORTED_LANGUAGES from services.tokenizer import get_tok...
# # Copyright 2020–21, by the California Institute of Technology. ALL RIGHTS # RESERVED. United States Government Sponsorship acknowledged. Any commercial # use must be negotiated with the Office of Technology Transfer at the # California Institute of Technology. # """ =============== general_util.py =============...
from django.core.validators import MinValueValidator, MaxValueValidator from django.db import models from django.contrib.auth.models import User, Group from phonenumber_field.modelfields import PhoneNumberField limit = 61 # Separation of Students in A and B Departments = [ ("1", "Aerospace"), ("2"...
#!/usr/bin/env python import pygame, sys, os, math, random from pygame.locals import * class Brick(pygame.sprite.Sprite): def __init__(self, size, position): pygame.sprite.Sprite.__init__(self) self.image = pygame.Surface((size['x'], size['y'])) #random_color = (random.randrange(50, 255), random.randran...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Aug 2 17:38:20 2019 @author: ask """ import sys from PyQt5 import QtCore, QtWidgets, uic, QtGui from PyQt5.QtGui import QPixmap from mill import * from open_window import Window import storage # create logger logger = logging.getLogger('applicatio...
# =============================================================================== # Copyright 2012 <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/...
# -*- coding: utf-8 -*- from os import path from gluon import * from gluon.storage import Storage from s3 import S3CustomController THEME = "RMSAmericas" # ============================================================================= def auth_formstyle(form, fields, *args, **kwargs): """ Formstyle for ...
from gcn.layers import * from gcn.metrics import * class Model(object): def __init__(self, **kwargs): allowed_kwargs = {'name', 'logging'} for kwarg in kwargs.keys(): assert kwarg in allowed_kwargs, 'Invalid keyword argument: ' + kwarg name = kwargs.get('name') if not na...
## librosa 사용하기 ## 현재는 librosa 사용하면 .wav파일만 불러올 수 있음 ## 불러오기 : librosa.load() ## 합치기(join) : librosa.append() import librosa import numpy as np from pydub import AudioSegment import os ################################################################### ############################# librosa ##################...
#!/usr/bin/env python # coding=utf-8 from math import isnan from numpy import mean, std, power, asarray, log from scipy.stats.mstats import gmean from warnings import warn from types import * from itertools import repeat import pandas as pd log2 = lambda x: log(x)/log(2) def average_cq(seq, efficiency=1.0): """G...
# Copyright (c) 2020 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 applicable law or agreed...
import math import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from src.utils import clones def attention_mat(query, key, value, adj_matrix, distances_matrix, edges_att, mask=None, dropout=None, lambdas=(0.3, 0.3, 0.4), trainable_lambda=False, ...
import torch import torch.nn as nn import numpy as np import random import os from model import layers import scipy.sparse as sp import copy def prepare_eg(fp): u_features = [] d_features = [] u_adjs = [] d_adjs = [] for i in range(len(fp)): fp_ = fp[i][(fp[i][:, -3] <= 0)] edges =...
import discord from discord.ext import commands from hypixel_chinese_skyblock_bot.Core.Common import CodExtension, get_hypixel_api, get_setting_json, \ get_verify_id_list, get_hypixel_skyblock_api from hypixel_chinese_skyblock_bot.Core.UserData import UserData class VerifyDungeoneer(CodExtension): @commands....
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np import ubelt as ub import re class SupressPrint(): """ Temporarily replace the print function in a module with a noop Args: *mods: the modules to disable print in ...
"""Tests for queues.py""" import asyncio import unittest from types import GenericAlias def tearDownModule(): asyncio.set_event_loop_policy(None) class QueueBasicTests(unittest.IsolatedAsyncioTestCase): async def _test_repr_or_str(self, fn, expect_id): """Test Queue's repr or str. fn is r...
# coding:utf-8 from os import path, makedirs, listdir from argparse import ArgumentParser, RawTextHelpFormatter from datetime import datetime from copy import deepcopy import numpy as np import cv2 from cv2 import imread, imwrite, blur, cvtColor, COLOR_BGR2GRAY, HoughCircles, HOUGH_GRADIENT, rectangle, circle, putText,...
import logging from typing import Any, Optional, Union, Callable import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from tqdm.auto import trange from transformers import AutoTokenizer from ..backbone import BackBone from ..basemodel import BaseTorchClassModel, BaseLabelModel from .....
import logging import threading import os import sys import numpy as np import cv2 from collections import deque from argparse import ArgumentParser, SUPPRESS from math import exp as exp from enum import Enum from time import perf_counter from openvino.inference_engine import IECore import monitors class Yolo...
import math from eth_utils.toolz import ( assoc, curry, merge, ) from web3.datastructures import ( AttributeDict, ) from eth_utils import ( to_hex, to_bytes, is_bytes, is_boolean, is_bytes, is_hex, is_null, is_integer, is_string, is_dict, is_list_like, ...
# encoding: utf-8 import os import sys import time import json import logging from logging.handlers import RotatingFileHandler from flask import Flask, request, jsonify, g from flask_cors import CORS # questa classe serve solo in IIS class PrefixMiddleware(object): def __init__(self, wsgi_app, prefix=''): ...
""" This package contains threads for: - uploading - downloading - remote walk - opening files - making dirs on remote destination """ from threading import Thread from threads.open import Open from threads.download import Download from threads.upload import Upload from threads.remotewalk import RemoteWalk from threads...
from collections import namedtuple import logging from pathlib import Path import sys from alive_progress import alive_bar import config import file_writer import helper_functions from nsx_inter_note_link_processor import NSXInterNoteLinkProcessor from sn_notebook import Notebook from sn_note_page import NotePage imp...
import numpy as np import copy import inspect import numbers from entmoot.optimizer.optimizer import Optimizer from entmoot.utils import plotfx_2d from typing import List try: from collections.abc import Iterable except ImportError: from collections import Iterable class BlackBoxConstraint: """ Base c...
# Copyright 2014-2015 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
#!/usr/bin/env python3 """ Author: <NAME> Date: 11/05/2020 Function: Geo calculations Description: ============ Replicates the calculations for distance, angle and torsion for validation """ import math def distance(x1, y1, z1, x2, y2, z2): """ param: x1,y1,z1= the coordinates of the first atom ...
from __future__ import print_function, division import torch import numpy as np import torchvision from torchvision import models import matplotlib.pyplot as plt import sys from utils import imshow, imshow_transform_notensor from saifooler.old.texture_module import TextureModule from torch.utils.data import TensorDat...
# -*- coding: utf-8 -*- """ File Name: model Description : 模型层 Author : mick.yi date: 2019/4/1 """ import keras from keras import layers, Input, Model import tensorflow as tf from east.layers.base_net import resnet50 from east.layers.losses import balanced_cross_entropy, iou_lo...
import gc from adafruit_hid.keyboard import Keyboard, Keycode def main_loop(led_mode): a_ign_release = False b_ign_release = False a_hold_revs = 0 b_hold_revs = 0 switch_a_pressed = False switch_b_pressed = False # if static color, just set here if not callable(UNDERGLOW_COLOR): ...
import numpy as np from matplotlib import pyplot as plt import cv2 from mss import mss from PIL import Image import keyboard import win32con import win32gui import win32process import win32api from win32api import keybd_event import subprocess import time Combs = { 'A': [ 'SHIFT', 'a'], 'B':...
# Conductor import sys import math import mido import time import pprint import copy import re import threading from solace.client import SolaceMQTTClient from os import listdir, getcwd, getpid from os.path import isfile, join import json def get_unique_notes_in_channel(notes_in_channel): """ Utility funct...
""" fileName : Main.py Author: <NAME> Github Username : mosesab Contact : <EMAIL> Run Main.py to view the GUI Use the requirements.txt file to install the required dependencies. Code written with python 3.8.3 Tested on Windows """ import os import numpy as np import matplotlib import matplotlib.pyplot as plt #...
# -*- coding: utf-8 -*- """ Created on Mon Jun 7 18:12:13 2021 @author: vonGostev """ import sys import time from dataclasses import dataclass from joblib import Parallel, delayed, wrap_non_picklable_objects import numpy as np from collections import namedtuple from lightprop2d import Beam2D from .experiment import...
## # With modifications by <NAME>, but: # # Copyright (c) 2015, <NAME>, <NAME> # # All rights reserved. See LICENSE file for details ## """ Geocoder adapted for locating user location profile entries. """ import os import csv import re import argparse import sys sys.path.append("./utils") import point_to_county i...
#!/usr/bin/env python # # (c) Copyright Rosetta Commons Member Institutions. # (c) This file is part of the Rosetta software suite and is made available under license. # (c) The Rosetta software is developed by the contributing members of the Rosetta Commons. # (c) For more information, see http://www.rosettacommons.or...
"""Support for (EMEA/EU-based) Honeywell evohome systems.""" # Glossary: # TCS - temperature control system (a.k.a. Controller, Parent), which can # have up to 13 Children: # 0-12 Heating zones (a.k.a. Zone), and # 0-1 DHW controller, (a.k.a. Boiler) # The TCS & Zones are implemented as Climate devices, Boi...
""" Module containing the description of a single job and a manager to handle its states """ import os import json import queue import typing import _thread import logging import urllib.parse import requests from .handler import BaseContentHandler as _BaseContentHandler from .options import Options as _Options from ...