text
stringlengths
3.07k
22.1k
import os import click from corgie import scheduling from corgie import helpers, stack from corgie.log import logger as corgie_logger from corgie.boundingcube import get_bcube_from_coords from corgie.cli.compute_stats import ComputeStatsJob from corgie.argparsers import ( LAYER_HELP_STR, corgie_optgroup, c...
#----------------------------------------------------------------------------- # Name: RadiCALModels # Purpose: To handle output from the radiCAL program written by <NAME> # Author: <NAME> # Created: 9/8/2016 # License: MIT License #---------------------------------------------------------------...
import logging import textwrap from functools import partial from operator import getitem, itemgetter from types import MappingProxyType import attr import boto3 import zipfile import uuid import abc import toolz from toolz import curried from zsec_aws_tools.aws_lambda import zip_string import zsec_aws_tools.iam as za...
# Copyright (c) 2022 CNES # # All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. """ Indexing chunked axis. ====================== """ from typing import Any, List, Optional, Sequence, Tuple import abc import dataclasses import numpy import zarr fr...
import sqlite3 import sqlalchemy from sqlalchemy import Table, Column, ForeignKey, Integer, String, Float, Boolean, DateTime, Interval, MetaData, create_engine, select, and_, join, union import pandas as pd import os def drop_table(table_name): """ Connects to cytoxnet.db database using sqlite and drops any ...
#!/usr/bin/env python import argparse import os import time import imageio import numpy as np import ray import torch import torch.nn as nn import torch.optim as optim import wandb from filelock import FileLock from ray.util.sgd import TorchTrainer from ray.util.sgd.torch import TrainingOperator from ray.util.sgd.uti...
import collections import dateutil.parser import datetime import logging from . import funcs from .common import CoordType import json InitialData = collections.namedtuple("InitialData", ["header", "firstrows", "rowcount", "filename"]) class ParseSettings(): """A "model-like" object which stores all the settings...
#!/usr/bin/python3 # Copyright 2017-2020 <NAME> # # The MIT License (MIT) # # Use of this source code is governed by MIT license that can be # found in the LICENSE.txt file. import sys import os.path import re import argparse import string import tempfile from tools import wasmtool from tools import util me = os.pa...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Utility functions for model definition, training, evaluating and deploying. This module defines utility functions supporting the lifecycle of keras models. """ import numpy as np import tensorflow.keras.backend as K import os, os.path import matplotlib.pyplot as plt ...
from typing import Dict # used to enforce the parent class typing from lammps import lammps from simData import simData from input import input_data from mpi4py import MPI import sys import numpy as np # ---------------------------------------------------------- class test_object(): """ Parent class of a...
''' # Copyright <NAME> 2013. # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) Python library for parametric representation of airfoils according to PARSEC (PARametric SECtion). References: - ...
from dataclasses import dataclass from io import BytesIO from typing import Optional import time, logging, os, traceback import gi gi.require_version('Gst', '1.0') gi.require_version('GstBase', '1.0') from gi.repository import Gst from greplin import scales from rdflib import URIRef from rx.subject import BehaviorSub...
import numpy as np def graycomatrixext(im_input, im_roi_mask=None, offsets=None, num_levels=None, gray_limits=None, symmetric=False, normed=False, exclude_boundary=False): """Computes gray-level co-occurence matrix (GLCM) within a region of interest (ROI) of an image. G...
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys import os import paho.mqtt.client as mqtt import json import time import datetime import sqlite3 import loger import getInfo import readConfig import encryption localpath = readConfig.readProjPath() os.chdir(localpath) log = loger.Log("remotetool-sever-echo") GotM...
# -*- coding: utf-8 -*- """ Created on Wed Apr 8 16:23:39 2020 These methods are used to construct semantic dimensions (subsumption trees) for a given list of superconcepts that identify these dimensions. It returns a projection function which projects any subsumed node to all given dimensions. None is returned if th...
import string import json import os import pandas as pd from pprint import pprint __DIV_TEMPLATE = string.Template( '<div id="conf_matrix_${key}" style="height: 400px; min-width: 310px; max-width: 800px; margin: 0 auto"></div>\n') __LINK_TEMPLATE = string.Template( '<option id="${spectrum_name}_link">${spectru...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Authors: # - <NAME>: <EMAIL> # - <NAME>: <EMAIL> # # MIT License # Copyright (c) 2021 CORSMAL # Permission is hereby granted, free of charge, to any person obtaining a copy # of this s...
import random from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.core.paginator import Paginator from django.http import HttpResponse, JsonResponse from django.shortcuts import get_object_or_404, redirect, render from dj...
#!/usr/bin/env python """ Written by <NAME> Email: <EMAIL> Script pour requêter le FWAP.xml afin d'en extraire les informations des VM """ import pprint from tkinter import * from tkinter import ttk from lxml import etree import agora_tools.autocombo # Correspondance Image DVD/OS os = { "rhel_5.3_DVD": "RHEL 5.3...
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
import hashlib import os import pathlib import platform import re import requests import shutil import tarfile import tempfile import typing import urllib.parse import zipfile from metapkg import cache from metapkg import tools class BaseVerification: pass class HashVerification(BaseVerification): def __in...
''' models.py ========= Basic objects used for communication bodies with a servlet container. ''' import struct from collections import namedtuple from .ajp_types import (AjpAttribute, AjpHeader, AjpPacketHeadersToContainer, AjpRequestDirection) from .utils import pack_as_string # pylint: dis...
from __future__ import annotations from abc import abstractmethod from enum import Enum, IntEnum, auto from typing import Any, Callable, Generic, List, Optional, TypeVar, NamedTuple from records.fillers.coercers import CoercionToken from records.fillers.util import _as_instance from records.fillers.validators import ...
from django.shortcuts import render, redirect, get_object_or_404 from django.http import Http404, HttpResponse from django.contrib.auth.decorators import login_required from django.contrib.auth import authenticate, login, logout # Mimetypes for images from mimetypes import guess_type # App Models from app.forms impor...
import bpy import io import logging import math import numpy as np logger = logging.getLogger("circular_array") if not logger.handlers: hdlr = logging.StreamHandler() formatter = logging.Formatter("%(levelname)-7s %(asctime)s %(message)s (%(funcName)s)", datefmt="%H:%M:%S") hdlr.setFormatter(formatter) ...
"""Line profile computation using Discrete Integral Transform * Line profile computation of `Discrete Integral Transform <https://www.sciencedirect.com/science/article/abs/pii/S0022407320310049>`_ for rapid spectral synthesis, originally proposed by <NAME> and E.Pannier. * This module consists of selected functi...
import gc from pathlib import Path import hydra import numpy as np import pandas as pd from utils import Feature, create_memo, generate_features, one_hot_encoder REPO = Path(__file__).resolve().parents[2] # 生成された特徴量を保存するパス Feature.dir = REPO / "data" / "interim" # データ読み込み application_train_df = pd.read_csv( RE...
""" Routines for plotting time-dependent vertical transects. """ import numpy import matplotlib.pyplot as plt import matplotlib import matplotlib.dates as mdates import os from . import utility __all__ = [ 'plot_scatter', 'make_scatter_plot', 'save_scatter_figure', ] log_scale_vars = [ 'specific_turbu...
''' MIT License Copyright (c) [2020] [<NAME>] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, di...
# Copyright 2017 <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 i...
# Heavily inspired from GluonTS datasets import json import logging import os from collections import OrderedDict from functools import partial from pathlib import Path from typing import List, Optional import numpy as np import pandas as pd from gluonts.dataset.common import TrainDatasets, load_datasets from gluonts....
from typing import List, Tuple import random from interfaces.TaggingOperation import TaggingOperation from tasks.TaskTypes import TaskType """ A tagging implementation of NER systems. I am travelling to London. --> I am travelling to South/Central London. """ def pick_random_word(seed): """ pick random "pre"...
#!/usr/bin/env python3 ############################################################################## # EVOLIFE http://evolife.telecom-paris.fr <NAME> # # Telecom Paris 2021 www.dessalles.fr # # ------------------------------------------------------------------------...
from flask import Flask, request, render_template, url_for, redirect, flash, Response from bs4 import BeautifulSoup import pandas as pd import requests import re from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer import pygal from pygal.style import BlueStyle from pygal.style import LightGreen...
import datetime import time from enum import Enum import cv2 import imutils import mediapipe as mp import numpy as np from keras.models import load_model from StatePredictor import StatePredictor from src.User import User class Environment(Enum): Development = 1 Production = 2 Test = 3 class FaceMeshDe...
# -*- coding: utf-8 -*- """ Usage : > python kangaroo.py -p <KEY> -keyspace 935da71d7350734c3472fe305fef82ab8aca644fb:935da71d7350734c3472fe305fff82ab8aca644f9 > python kangaroo.py -p <KEY> -keyspace 800000000000000000000000000000:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -rand -ncore 7 > python kangaroo.py -p 0425c2d005f...
#!/usr/bin/env python # coding: utf-8 import numpy as np from sklearn.preprocessing import StandardScaler, MinMaxScaler, RobustScaler import matplotlib.pyplot as plt ############################################### # Data import functions ############################################### def read_gas_data(filename): x,...
from __future__ import division, absolute_import from functools import partial from pickle import TRUE from warnings import simplefilter from caffe2.python.workspace import FetchBlob from numpy.core.fromnumeric import shape from numpy.core.records import format_parser from numpy.lib.function_base import _flip_di...
from datetime import datetime, timedelta import os from random import randint from django.db.models import Q from django.shortcuts import render, redirect from medical_visit.models import * from usermgmt.models import UserDetails from data_offloader.filecoin import upload from data_offloader.data_snapshot import sna...
from rest_framework import generics from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from rest_framework.permissions import IsAdminUser, IsAuthenticated from .models import ( BusStop, TrainStop, Address, CodePoint, Broadband, MetroTube, Greenbel...
""" Various common functions used by the command line interface. """ import itertools import json import os import sys import time from functools import wraps from typing import ( IO, TYPE_CHECKING, Any, Callable, Iterator, List, Optional, Tuple, TypeVar, Union, ) from urllib.par...
import asyncio import json import logging import ssl from .connection import Connection from .errors import * logger = logging.getLogger(__name__) class BaseProtocol(object): log_prefix = '' connection_settings = {} stopping = False async def handle_connection(self, reader, writer): raise ...
import torch.nn as nn import torch.nn.functional as F from base import BaseModel import copy import torch import numpy as np import math from torch.autograd import Variable from torch import as_tensor as T, Tensor from torch.utils.data import Dataset, DataLoader from torch.optim import Adam, RMSprop from sklearn import...
import sys import xml.etree.ElementTree as ET import re """ The Rimes data set comes with an XML file that describes the data. This XML file is a hierarchy of: DocumentList SinglePage Paragraph Line The line information, which is needed for extracting line strips, must be combined with the...
"The Tunable class and derived instances" # pylint: disable=C0303,C0330 __all__ = [ "compute", "Tunable", "tunable", "Object", "function", "Function", ] import operator import warnings from inspect import ismethod from collections import deque from collections.abc import Iterable from hashlib ...
import django_tables2 as tables from django.conf import settings from django.db.models import Case, When from django_tables2.utils import A from apis_core.apis_labels.models import Label from apis_core.apis_metainfo.models import Uri from apis_core.apis_metainfo.tables import ( generic_order_start_date_written, ...
import cv2 import numpy as np import time import serial def openSerialPort(): ser = serial.serial_for_url('/dev/ttyUSB0') # ser = serial.Serial('/dev/ttyACM0') ser.baudrate = 115200 ser.timeout = 1 return ser def sendSerial(ser, msg): if not ser.is_open: print('Serial port is not open!'...
# encoding: utf-8 # module Wms.RemotingImplementation.TaskScheduler calls itself TaskScheduler # from Wms.RemotingImplementation,Version=1.23.1.0,Culture=neutral,PublicKeyToken=null # by generator 1.145 # no doc # no important from System.Collections.Generic import * from ..__init__ import * # no functions #...
def edit(): """Shows a page with ReportBro Designer to edit our albums report template. The report template is loaded from the db (report_definition table), in case no report template exists a hardcoded template is generated in *create_album_report_template* for this Demo App. Normally you'd probably ...
from random import * from math import sqrt import numpy as np def update_tableau_with_new_point(basis,ax_points,ay_points,next_point,n): v_in_basis = [ x - n-2-2 for x in basis.values() if x > 5 ] no_in_basis = np.setdiff1d([0,1,2,3],v_in_basis) if len(no_in_basis) == 1: ax_points.pop(v_in_basis[...
# Copyright 2019 1QBit # # 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 wri...
from dataclasses import dataclass, field import functools import itertools from pathlib import Path import tempfile from typing import ClassVar, Dict, List, OrderedDict, Set, Union import logging import zipfile log = logging.getLogger(__name__) import pandas as pd import multiqc from dp_tools.core.model_commons imp...
import os import tensorflow as tf import argparse import cv2 import numpy as np import logging; from PIL import Image import get_dataset_colormap from skimage import data, color, io, img_as_ubyte import numpy as np from scipy import fftpack from scipy import signal from scipy.ndimage.filters import gaussian...
import numpy as np import torch def rotate_pc_along_y(pc, rot_angle): """ params pc: (N, 3+C), (N, 3) is in the rectified camera coordinate params rot_angle: rad scalar Output pc: updated pc with XYZ rotated """ cosval = np.cos(rot_angle) sinval = np.sin(rot_angle) rotmat = np.array([[...
""" vphaslib ======== This is a simple module which allows to convert fits from VPHAS+ project. Provides three functions: 1. get a single pawprint from a multi-extension fits image 2. import a fits source table to a text file 3. import a fits catalog to a text file """ from __future__ import division, ab...
# -*- coding: utf-8 -*- """ Tests for NRWAL equation handler objects """ import yaml import pandas as pd import numpy as np import os import pytest from NRWAL.config.config import NrwalConfig from NRWAL.handlers.equations import Equation from NRWAL.handlers.groups import EquationGroup TEST_DIR = os.path.dirname(os.pa...
# Copyright (c) 2021. <NAME>. All Rights Reserved from __future__ import annotations import gzip import json from datetime import datetime, timedelta from typing import List import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html import pandas as pd from pydanti...
from parcels import AdvectionRK4, Field, FieldSet, JITParticle, ScipyParticle from parcels import ParticleFile, ParticleSet, Variable, VectorField, ErrorCode from datetime import timedelta as delta from os import path from glob import glob import numpy as np import dask import math import xarray as xr from netCDF4 imp...
#!/usr/bin/env python # coding: utf-8 # In[2]: import numpy as np import pandas as pd from random import shuffle import matplotlib.pyplot as plt import plotly.express as px import plotly.graph_objects as go # ## Deck Size can be defined here: # In[34]: deck = [] error = 0.167 #The range here used is the number...
import math import time from collections import defaultdict from threading import Thread import rospy import tf from autoware_msgs.msg import LaneArray, Lane, Waypoint from visualization_msgs.msg import MarkerArray, Marker from geometry_msgs.msg import PoseStamped, Vector3, Point, TwistStamped from std_msgs.msg import...
import os import pickle import pysam import vcf from SomaticHaplotype import * ################################################################################ # bam functions ################################################################################ def extract_read_info(read): # Given a read from a bam, ex...
from lxml.builder import ElementMaker XSI_NS = 'http://www.w3.org/2001/XMLSchema-instance' class OAIDC(object): """The standard OAI Dublin Core metadata format. Every OAI feed should at least provide this format. It is registered under the name 'oai_dc' """ def __init__(self, prefix, config, ...
# TODO Sep 08 version import numpy as np import os import sys import ntpath import time from . import util, html from subprocess import Popen, PIPE from PIL import Image import torchvision import datetime import matplotlib.pyplot as plt # plt.switch_backend('agg') from mpl_toolkits.mplot3d import Axes3D # import matpl...
import argparse import torch import torch.nn as nn import torch.optim as optim from torch.autograd import Variable from torch.profiler import profile, record_function, ProfilerActivity import numpy as np import gc import sys sys.path.append("../../") from utils import data_generator from model import TCN import time ...
'''pyfield tester''' import pytest import numpy as np from pyfield import PyField, util @pytest.fixture def field(): obj = PyField() obj.field_init() yield obj obj.field_end() @pytest.fixture def linear_array(field): no_elements = 10 width = 0.001 height = 0.01 kerf = 0.001 / 2 n...
import os import os.path import json import time # List to hold different scenario size size = [15] # List to hold number of users in each scenario users = [60] # Range of UAV to UAV communication min_communication_threshold = 6 max_communication_threshold = 40 UAV_to_UAV_threshold = [str(i)+'.'+str(j)+''+str(k) ...
from PIL import Image import numpy as np import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt # ============================================================================== # SCALE_TO_255 # ===========================================...
# Time: O((m * n) * (m * n)!) # Space: O((m * n) * (m * n)!) # 773 # On a 2x3 board, there are 5 tiles represented by the integers 1 through 5, # and an empty square represented by 0. # # A move consists of choosing 0 and a 4-directionally adjacent number and swapping it. # # The state of the board is solved if and o...
from PyQt5 import QtWidgets, uic from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget, QPushButton, QVBoxLayout, QFileDialog, QGraphicsView import sys from PyQt5.uic.properties import QtCore from PyQt5.QtCore import pyqtSignal import numpy as np from pylab import plot, show, axis from pyqtgraph import ...
from django.contrib.auth import get_user_model from django.urls import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from core.models import Recipe, Tag, Ingredient from recipe.serializers import RecipeSerializer, RecipeDetailSerializer RECIPE_U...
""" Utility functions for the DST automation use case. Copyright (c) 2020, Copyright (c) 2020, Cisco Systems, Inc. or its affiliates All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions o...
# Copyright (c) 2020, <NAME> # License: MIT License import pytest import math from ezdxf.math import Matrix44, Vec3, Z_AXIS, arc_angle_span_deg from ezdxf.math.transformtools import OCSTransform def test_transform_angle_without_ocs(): ocs = OCSTransform(Vec3(0, 0, 1), Matrix44.z_rotate(math.pi / 2)) assert ma...
# *********************************************************************** # Description: This file defines a gaussian mixture layer # # Wrote by: <NAME> (<EMAIL>) # Modern Heuristics Research Group (MHRG) # Virginia Commonwealth University (VCU), Richmond, VA # http://www.people.vcu.edu/~mmanic/ # # ***...
import json import numpy as np import matplotlib.pyplot as plt import pandas as pd from node import Node from line import Line from lightpath import Lightpath from scipy.special import erfcinv from path import Path def calculate_bitrate(lightpath, bert=1e-3, bn=12.5e9): """ calculate bitrate along a lightpath...
"""TODO: Summary """ import numpy as np import numba as nb import numba.types as nt from homog import is_homog_xform from worms import util from worms.bblock import chain_of_ires, _BBlock from logging import warning import concurrent.futures as cf from worms.util import InProcessExecutor, jit from worms.criteria impor...
import sys import uuid import time import traceback import queue import json import datetime import mprpc import logging import socket import dill import pprint import threading import multiprocessing import os import common.LogBase import common.get_rpyc from WebMirror.JobUtils import buildjob from common.util impor...
""" Class Zuora wraps the Zuora rest api """ # pylint: disable=C0111,R0904,R0913 import datetime import json import time import requests ZUORA_CHUNKSIZE = 50 def _unpack_response(operation, path, response): if path != '/object/invoice/': assert response.status_code == 200, \ ...
""" 选股多线程版本文件。导入数据——执行策略——显示结果 为保证和通达信选股一致,需使用前复权数据 """ import os import sys import time import pandas as pd from multiprocessing import Pool, RLock, freeze_support from rich import print from tqdm import tqdm import CeLue # 个人策略文件,不分享 import func import user_config as ucfg # 配置部分 start_date = '' end_date = '' # 变量定...
import random import copy import numpy as np import matplotlib.pyplot as plt from schedueling import cargar_calendario def sigma_dispersion(tabla): sigma = np.mean([(tabla[x].puntaje - tabla[x+1].puntaje) for x in range(1,len(tabla)-2)]) #maxs = np.mean([((tabla[x].puntaje - tabla[x+1].puntaje)-mean)**2 for x ...
#!/usr/bin/env python import os import sys import textwrap import time from subprocess import call, check_output os.environ['DEBIAN_FRONTEND'] = 'noninteractive' def update_os(): print("goSecure_Client_Script - Update OS\n") call("sudo apt-get update", shell=True) call("sudo apt-get upgrade -y", shell=Tr...
import torch import torch.nn as nn import numpy as np from functools import partial import torch.nn.init as init import torch.nn.functional as F import math from timm.models.layers import DropPath, to_2tuple import pdb DROPOUT_FLOPS = 4 LAYER_NORM_FLOPS = 5 ACTIVATION_FLOPS = 8 SOFTMAX_FLOPS = 5 class ...
import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import torch.autograd as autograd from multiprocessing_env import SubprocVecEnv from minipacman import MiniPacman import matplotlib.pyplot as plt from tqdm import tqdm #USE_CUDA = torch.cuda.is_availab...
"Manages CMake." from __future__ import print_function import multiprocessing import os import re from subprocess import check_call, check_output import sys import distutils import distutils.sysconfig from distutils.version import LooseVersion from . import escape_path from .env import (IS_64BIT, IS_DARWIN, IS_WINDO...
############################################################################## # Project 06 - Water Usage Metrics (Dat long header tho) # # Import pylab library # # manually define states and categories # # Open file function # returns the file name # read file function # Initialize empty data list ...
from telegram import ReplyKeyboardRemove from timezonefinder import TimezoneFinder from sample.Excuse import Excuse from sample.Exercise import Exercise from sample.Snack import Snack from sample.Weight import Weight from pytz import timezone from sample import States from sample import Markups from telegram.ext import...
# Copyright 2021 The Deluca Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
# -*- coding: utf-8 -*- # SPDX-License-Identifier: MIT """Read from tar format archives. This module provides only a simple interface for iterating the entries of a tar archive, and provides no direct means of extracting those entries directly to disk. Additionally, this module operates as a stream from the tar arch...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function import numpy as np import pandas as pd from sklearn.decomposition import PCA from scipy.interpolate import splev, splrep import logging log = l...
"""Distutils script for dmPython. python setup.py build install """ import distutils.command try: import distutils.command.bdist_msi except ImportError: distutils.command.bdist_msi = None try: import distutils.command.bdist_wininst except ImportError: distutils.command.bdist_wininst = None import...
import inspect from kamodo import Kamodo, kamodofy, gridify from scipy.interpolate import RegularGridInterpolator import cdflib import pandas as pd import numpy as np import re def time_interpolator(timekwarg): """{docstring}""" # Note: df will be passed into this function's local scope # t will be provi...
import os import sys import time import h5py import pickle import argparse import numpy as np import torch from torch.utils.data import DataLoader, TensorDataset from torch.autograd import Variable from torch.optim.lr_scheduler import ReduceLROnPlateau from load_data import load_data from model import DnCNN, DnCNN_Re...
# -*- coding: UTF-8 -*- import math from typing import Union import torch import torch.nn as nn from torch.nn import functional as F import numpy as np from ..tn_cnn import _TNConvNd from ..tn_linear import _TNLinear class TRConv2D(_TNConvNd): def __init__(self, in_shape: Union[list, np.ndarray], out_shape: U...
# -*- coding: utf-8 -*- """ @create: 2018-05-16 19:43:15. @author: name @desc: biztoken """ import six import jwt import copy import codecs import datetime from calendar import timegm from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization # iss: issuser # su...
import numpy as np from .components import BlochMZI, SMMZI from .config import NP_FLOAT from typing import Callable, Tuple from .numpy import MeshNumpyLayer, RMNumpy from .meshmodel import MeshModel from .helpers import inverse_permutation def clements_decomposition(u: np.ndarray, pbar_handle: Callable = None, smmzi:...
from .api import ODLRestConfAPI, OSClientAPI from .flow import Flow from .group import Group from .config import * from .topology import Topology import os from threading import Timer class Mapping(): nextMappingId = 0 def __init__(self, rrhId, bbuList): self.id = Mapping.nextMappingId Mapping...
""" HMS Curve Number Runoff module Google Earth Engine Script - all fusion tables have been made public. """ # import ee import json result_metadata = {} # ee.Initialize() # NLCD landcover image nlcd_landcover = ee.Image('USGS/NLCD/NLCD2011').select("landcover") # NLCD landcover legend nlcd_legend = ee.FeatureColle...
#!usr/bin/env python from __future__ import print_function, unicode_literals import datetime import json import random import re import sys import smtplib import time import sqlite3 from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import requests from bs4 import B...
"""Utility functions and classes used by parser.""" import collections # lazy loaded import logging import sys import time # lazy loaded from threading import Thread from queue import Queue, Empty from time import sleep from typing import (TYPE_CHECKING, Any, Callable, Dict, Generator, List, Opti...
# Copyright 2022 The Balsa Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
# _nosqldu.py # Copyright (c) 2019 <NAME> # Licence: See LICENCE (BSD licence) """Access a supported nosql database with the appropriate module. UnQLite, Vedis, dbm, and ndbm, are supported. The dbm and ndbm modules are provided with Python; the unqlite and vedis modules can be found in PyPI. """ from ast import li...