text
stringlengths
8.04k
46.5k
import sys import time sys.path.insert(0, '../') import numpy as np import matplotlib.pyplot as plt from tqdm import trange from tqdm import tqdm import pandas as pd import scipy.optimize as op from scipy.stats import norm from wave_solution import orbits from kapteyn import kmpfit from RECTE import RECTE import bat...
""" Testing module for module :mod:`~backend.logic_layer`, using `pytest`_ library. All tests are just copy-pasted from module :mod:`~tests.interface_test`. This way, when something goes wrong, we'll be able to tell where exactly is the evildoing happening. .. _pytest: https://pytest.org/ .. module:: logic_layer_te...
#!/usr/bin/env python # This Script helps to rebuild deleted context field """ Script : Context Field Rebuilder for Custom field Author : <NAME> Platform : Atlassian Jira Cloud Version : 1.0 ************************************************************************** Required libraries : requests, tqdm Install via ...
from __future__ import unicode_literals import hashlib import logging from contextlib import contextmanager from functools import partial import django from django.conf import settings from django.db import connections from django.db.utils import ConnectionHandler, DEFAULT_DB_ALIAS from django_evolution.compat impor...
# Copyright (c) 2019-2020 <NAME> # License: MIT License """ :class:`DXFEntity` is the super class of all DXF entities. The current entity system uses the features of the latest supported DXF version. The stored DXF version of the document is used to warn users if they use unsupported DXF features of the current DXF v...
""" OCR-D CLI: workspace management .. click:: ocrd.cli.workspace:workspace_cli :prog: ocrd workspace :nested: full """ import os from os import getcwd from os.path import relpath, exists, join, isabs, dirname, basename, abspath from pathlib import Path from json import loads import sys from glob import glob ...
# Copyright (c) 2016 Cisco Systems # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
import numpy as np import torch import torch.nn as nn from mmdet.core import ( auto_fp16, bbox_target_tsd, delta2bbox, force_fp32, multiclass_nms, ) from mmdet.ops import ConvModule, DeltaCPooling, DeltaRPooling from ..losses import accuracy from ..registry import HEADS from .bbox_head import BBoxH...
import torch.nn as nn from ..builder import BACKBONES from .base_backbone import BaseBackbone import numbers import collections import logging import functools import torch from torch import nn from torch.nn import functional as F from mmcls.models.backbones.transformer import Transformer checkpoint_kwparams = None #...
# Copyright 2017 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 a...
#!/usr/bin/env python # (C) Microsoft Research, <NAME>, 2017 import os import sys import getopt import re ec = entry_count = "#" fstar_output_columns = [ "fstar_tag", "fstar_usedhints", "fstar_time", "fstar_fuel", "fstar_ifuel", "fstar_rlimit" ] column_separator = "," SHORTOPTS="harcgf:o:s:t:n:F:" LONGOPTS=["help"...
# Copyright 2004-2021 <NAME> <<EMAIL>> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, merge, # publish,...
''' PyDBSP:Fashion Star DBSP舵机开发板的Python SDK ''' import serial import struct import time import threading class DBSPUtil: '''DBSP通用工具类''' @staticmethod def print_bytes_as_hex(bytes_data): '''格式化输出Bytes类型数据''' print(''.join(['0x%02x ' % b for b in bytes_data])) @staticmethod def serv...
#!/usr/bin/env python3 import re, sys from contextlib import suppress from hashlib import md5 from plumbum import local, CommandNotFound, ProcessExecutionError from plumbum.cli import Application, Flag, SwitchAttr, Range, Set from plumbum.colors import blue, magenta, green, red, yellow from plumbum.cmd import ( s6...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import datetime import logging import time import os import re import torch from tqdm import tqdm from collections import defaultdict from maskrcnn_benchmark.data.datasets.evaluation import evaluate, im_detect_bbox_aug from ..utils.co...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import os import gzip import numpy as np from random import Random, shuffle, random import torch import math from DataLoader import iterators import json import struct from timeit import default_timer as timer """ Define different...
# Copyright 2016, <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...
import pandas as pd import numpy as np import os from gen import get_task_sets from tasks import TaskSystem from matplotlib import pyplot from tasks import test, get_df import dill import concurrent.futures import time TEST_N = 1000 show_plt = True one_p = False five_p = False five_p = True test_...
""" Plotting interactive Time Frequency Representations of Time Series data """ # third-party libs import numpy as np import matplotlib.pyplot as plt import matplotlib.image as mimage from matplotlib import gridspec, ticker from matplotlib.patches import Rectangle from matplotlib.transforms import blended_transform_f...
import common import paintwdg import math import tablewidget import paintool import taskconf_menu import elements import util from paintool import deg from PyQt5 import * from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * class ShemeTypeT1(common.SchemeType): def __init__(self): s...
#!/usr/bin/env python3 import sqlite3 import os import sys import readline def rlinput(prompt, prefill=''): readline.set_startup_hook(lambda: readline.insert_text(prefill)) try: return raw_input(prompt) finally: readline.set_startup_hook() #******************************** Get DATA **************...
# Copyright 2014-2015 Rackspace # # 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 agr...
import logging import re import sys from argparse import ArgumentParser from copy import deepcopy from os import getcwd, listdir, mkdir, remove from os.path import dirname, isdir, join, normpath, relpath, isfile from shutil import copy, copytree from tempfile import TemporaryDirectory from pkg_resources import resource...
# fmt: off import os import glob import pytest from rlo import costs from rlo.expression import Expression, EF from rlo.expression_util import NamedExprWithEnv, ExprWithEnv from rlo.expr_sets import ExpressionSetFromFile from rlo import rewrites from rlo import sparser from rlo.utils import read_file, get_func_body, s...
# # 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 us...
from koebe.datastructures.dcel import * class Tiling(DCEL): def __init__(self, outerFaceData = None): super().__init__(outerFaceData) self.dartLevels = [] self.edgeLevels = [] self.faceLevels = [] self.subdivisionLevel = 1 self.Vertex = TilingVertex ...
# Copyright (c) 2017 "Shopify inc." All rights reserved. # Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. from __future__ import unicode_literals import abc import collections import copy import datetime import enum import itertools import re import string # pylint: ...
# Copyright (C) 2016-2019 by # <NAME> # <NAME> # BSD license. # # Authors: <NAME> (<EMAIL>) # <NAME> (<EMAIL>) """Generate graphs with a given joint degree and directed joint degree""" from __future__ import division import networkx as nx from networkx.utils import py_random_state __all__ = ['i...
""" Set of specific utilities for retrieving a filaments from a tomogram # Author: <NAME> (Max Planck Institute for Biochemistry) # Date: 15.09.15 """ __author__ = '<NAME>' import pyseg as ps import csv import vtk import graph_tool.all as gt from pyseg.globals.variables import * from pyseg.filament.variables import ...
# Version 1.1.1 # Copyright © 2022, Twilio # Contains code © 2021, <NAME> (@smittytone) # Licence: MIT from machine import UART, Pin, I2C from utime import ticks_ms, sleep import json class MCP9808: """ A simple driver for the I2C-connected MCP9808 temperature sensor. This release supports MicroPython. ...
# -*- coding: utf-8 -*- """ Created on Wed Apr 11 14:41:16 2018 @author: JHodges """ import matplotlib.pyplot as plt import osgeo.gdal import numpy as np import struct import matplotlib.path as mpltPath from collections import defaultdict import os def getHistogram(file): img = osgeo.gdal.Open(file) band = n...
#!/usr/bin/env python3 import argparse import collections import datetime import logging import os import prometheus_client import requests import threading import time import urllib.parse import yaml from flask import Flask, Response from flask_cors import CORS from logging import handlers from prometheus_client.cor...
from __future__ import print_function, division import sys sys.path.append('core') import argparse import os import cv2 import time import numpy as np import matplotlib.pyplot as plt from pathlib import Path import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torchvisio...
from veriutils import ( SynchronousTest, AxiStreamOutput, SignalOutput, AVAILABLE_TIME_UNITS) import veriutils.cosimulation import ovenbird from myhdl import * import myhdl from myhdl.conversion._toVHDL import _shortversion myhdl_vhdl_package_filename = "pck_myhdl_%s.vhd" % _shortversion from collections import...
# Copyright (c) 2021 Friedt Professional Engineering Services, Inc # SPDX-License-Identifier: MIT from enum import Enum class MHMagic(Enum): # Constant for the magic field of the mach_header (32-bit architectures) MH_MAGIC = 0xfeedface # the mach magic number MH_CIGAM = 0xcefaedfe # NXSwapInt(MH_MAGIC)...
from __future__ import print_function, division import collections from copy import deepcopy import numpy as np from astropy import log as logger from ..densities import FlaredDisk, AlphaDisk, PowerLawEnvelope, UlrichEnvelope, AmbientMedium from ..util.interpolate import interp1d_fast_loglog from ..util.constants im...
# adapted from https://github.com/mikel-brostrom/Yolov5_DeepSort_Pytorch/tree/master/deep_sort_pytorch import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torchvision.transforms as transforms import cv2 import logging import scipy.linalg from scipy.optimize import linear_sum_ass...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, unicode_literals import urllib, time, os import math import requests import xbmc, xbmcgui from lib import util, settings from lib import downloadregistry import URLDownloader from . import timeutils, authutils, chanutils import base64 import th...
# Copyright (c) 2017 The Khronos Group 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 numpy as np import cv2 import os import dlib from imutils.face_utils import rect_to_bb, shape_to_np, FaceAligner from imutils.face_utils.helpers import FACIAL_LANDMARKS_IDXS import matplotlib.pyplot as plt path = '/home/yaurehman2/Documents/stereo_face_liveness/shape_predictor_68_face_landmarks.dat' detector ...
# # This source file is part of the EdgeDB open source project. # # Copyright 2008-present MagicStack Inc. and the EdgeDB 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...
""" Task-Specific consistency training on downstream task (Kather) """ import argparse import os import time import random import numpy as np from PIL import Image import cv2 from tqdm import tqdm import torch.backends.cudnn as cudnn import torch from torch.utils.data import Dataset import torch.optim as optim import ...
import multiprocessing as mp import sys import gc import geojson import json import glob import math import matplotlib.pyplot as plt import numpy as np import os import random import time from descartes.patch import PolygonPatch from matplotlib import pyplot from plyfile import PlyData, PlyElement from shapely.geometry...
import numpy as np import matplotlib as mpl from gpt.gpt import GPT as GPT import plotly.graph_objects as go from .tools import * from .nicer_units import * from .postprocess import postprocess_screen from pmd_beamphysics.units import c_light, e_charge from .ParticleGroupExtension import ParticleGroupExtension, convert...
import torch import torch.nn.functional as F from torch.autograd import Variable import numpy as np from math import exp import time def gaussian(window_size, sigma): gauss = torch.Tensor([exp(-(x - window_size // 2) ** 2 / float(2 * sigma ** 2)) for x in range(window_size)]) return gauss / gauss.sum() def ...
########################################################################################### ########################################################################################### def obj_is_iterable(obj): """ >>> is_iterable([]) True >>> is_iterable(()) True >>> is_iterable([x for x in range(10)...
""" This module defines some tools used for reading/writing fragment files. """ from futile.Utils import write as safe_print # Standard residue names # https://cdn.rcsb.org/wwpdb/docs/documentation/file-format/PDB_format_1992.pdf _standard_residues = ["ALA", "ACD", "ALA", "ALB", "ALI", "ARG", "ARO", "ASN", ...
from os import read import os import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import axes3d import matplotlib.pyplot as plt import numpy as np import datetime import sys from tqdm import tqdm import cppsolver as cs from ..solver import Solver, Solver_jac from ..preprocess import Reading_Dat...
from SciDataTool.Functions import UnitError from SciDataTool.Functions.fft_functions import ( comp_fft_freqs, comp_fft_time, comp_nthoctave_axis, ) from numpy import ( pi, log10, sqrt, square, column_stack, exp, real, imag, cos, sin, ndarray, nan, isnan, ...
""" Mar 2021 @author: Natalia """ import networkx as nx from networkx.classes import graph from .utils import _normalize_corr,_build_network, create_normalize_graph from networkx.algorithms import community as nx_comm import pandas as pd import numpy as np import community from random import sample from typing impo...
from crispy_forms.bootstrap import FormActions, StrictButton from crispy_forms.helper import FormHelper from crispy_forms import layout as crispy from crispy_forms.layout import Div, Fieldset, HTML, Layout, Submit import datetime from dimagi.utils.django.fields import TrimmedCharField from django import forms from djan...
# Copyright 2018 DeepMind Technologies Limited. 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 a...
from __future__ import division import slide_fun import config_fun import random import numpy as np import scipy.ndimage as ndimage from PIL import Image from skimage.morphology import dilation, star, opening from skimage.filters import threshold_otsu from itertools import product import os import sys BACKGROUND = 0 S...
#!/usr/bin/env python3 import os import re import sys import random import warnings from collections import OrderedDict from itertools import product from functools import reduce, lru_cache import jax import numpy as np import jax.numpy as jnp from utils import disk_cache from train_tools import init_strset def spli...
"""aospy DataLoader objects""" import logging import os import pprint import numpy as np import xarray as xr from .internal_names import ( ETA_STR, GRID_ATTRS, TIME_STR, ) from .utils import times, io def _preprocess_and_rename_grid_attrs(func, grid_attrs=None, **kwargs): """Call a custom preprocess...
import numpy as np import tensorflow as tf #import roi_pooling_layer.roi_pooling_op as roi_pool_op #import roi_pooling_layer.roi_pooling_op_grad from rpn_msr.proposal_layer_tf import proposal_layer as proposal_layer_py from rpn_msr.proposal_layer_tf import proposal_layer_3d as proposal_layer_py_3d from rpn_msr.proposal...
from __future__ import absolute_import from time import sleep import sys from datetime import date,datetime,timedelta from os.path import getmtime import random import requests import atexit import signal import pandas as pd import numpy as np from market_maker import bitmex from market_maker.settings import settings ...
# coding:utf-8 ''' corner numbering 0 1 U 0 3 2 1 L F R 7 4 5 6 D 7 6 edge numbering 0 3 U 1 2 11 L 8 F 9 R 10 4 7 D 5 6 sticker numbering U 0 1 2 3 4 5 6 7 8 L F R B 36 37 38 9 10 11 1...
from __future__ import print_function from __future__ import division from . import _C import numpy as np import random import copy import fuzzytools.datascience.statistics as fstats import fuzzytools.datascience.splits as splits from fuzzytools.datascience.xerror import XError from fuzzytools.strings import get_bar f...
from xbox_controller import XboxController import subprocess import os from time import sleep from pyminitouch import safe_connection, safe_device, MNTDevice, CommandBuilder import tkinter import pyautogui from win32gui import GetForegroundWindow, FindWindow, GetWindowRect import time import sys import io import json i...
import argparse from lark import Lark from lark.exceptions import ParseError from lark.lexer import Token from excel_wrapper import XlApplicationInternational from xlsm_wrapper import XLSMWrapper from xls_wrapper import XLSWrapper from xlsb_wrapper import XLSBWrapper from enum import Enum import time import datetime fr...
import re import copy # 合并列表,去重 def no_repeat(lst, ext_lst): for i in ext_lst: if i not in lst: lst.append(i) return lst # 能推出空串ε的非终结符,直接推导 def NIL(origin_dict): temp_dict = copy.deepcopy(origin_dict) epsilon_ends, not_epsilon_ends = [], [] for k, v in origin_dict.items(): ...
import nltk from nltk.corpus import stopwords from ast import literal_eval import numpy as np import re import csv import sys import os import operator import reverse_geocoder as rg from urllib import request from urllib import parse from bs4 import BeautifulSoup allLocations = {} ''' Natural Language Processing...
import re import string import collections import itertools import operator import pickle import gc import os import random import numpy as np from scipy.misc import logsumexp import scipy.optimize as optimize NUMBER = 'NUMBER' START = 'START' STOP = 'STOP' SPECIAL_WORDS = [NUMBER, START, STOP] class NotFitError(Ex...
# This program is public domain # Author: <NAME> """ Fitting parameter objects. Parameters are a big part of the interface between the model and the fitting engine. By saving and retrieving values and ranges from the parameter, the fitting engine does not need to be aware of the structure of the model. Users can als...
#!/usr/bin/env python # coding=utf-8 """ Fine-tuning a 🤗 Transformers model on summarization. """ import argparse import logging import math import os import random from pathlib import Path import datasets import numpy as np import torch from datasets import load_metric from torch.utils.data import DataLoader from t...
from .basic_alg import sqrt, get_main_element_index_list, real_root_tow_power_equation, det, \ is_same_negative_or_positive, nan, rref, eig_n, pi_half, is_zero from .circle_alg import get_circle_equation_coefficient_by_center_radius from .plane_geometry_alg import get_rotate_point_by_two_point from .parabola_alg im...
#!/usr/bin/python # # Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Creates windows and posix stub files for a given set of signatures. For libraries that need to be loaded outside of the standard ...
#!/usr/bin/env python3 """ A simple calendar made with rofi and python3. Cycle through month and create linked note to days. """ __license__ = "MIT-0" import glob, os, sys, subprocess, shutil import re, argparse, configparser import datetime, calendar, locale from itertools import chain from functools import wraps ...
# -*- coding: utf-8 -*- import platform import sys from UI_forms import Ui_CodePlus from all_windows import Find_Win from PyQt5.QtWidgets import QApplication, QMainWindow, QMessageBox, \ QFileDialog, QWidget, QGridLayout, QTextEdit, QDirModel, QTabWidget, QDockWidget from PyQt5 import QtWidgets from PyQt5.QtGui i...
import numpy as np from sklearn import preprocessing, metrics import scipy.stats import pickle import warnings from netCDF4 import Dataset def LoadData(filename, minlev, all_lats=True, indlat=None, N_trn_exs=None, rainonly=False, noshallow=False, cosflag=True, randseed=False, verbose=True): ...
# -*- coding: utf-8 -*- from collections import defaultdict import os from enum import Enum from PIL import ImageFont, Image from PIL.ImageDraw import ImageDraw, ImageColor import math import sys from bezier import smooth_points, convert_to_degree, get_angle import textwrap2 class Type(Enum): default = 'default'...
"""Plot topologies using networkx and matplotlib.""" import os import copy import argparse from typing import Any, cast, Dict, Optional import numpy as np import matplotlib.pyplot as plt from matplotlib.path import Path from matplotlib.figure import Figure import networkx as nx from vivarium.core.process import Proc...
import sys, os cur_file_path = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(cur_file_path, '..')) import os.path as osp import glob, time, copy, pickle, json from torch.utils.data import Dataset, DataLoader from fitting.fitting_utils import read_keypoints, load_planercnn_res import numpy...
# scScope is a deep-learning based approach designed to identify cell-type composition from large-scale scRNA-seq profiles. from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import random import time from .ops import ...
import numpy as np from pathlib import Path import pandas as pd import datetime import sys import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from sklearn.model_selection import ParameterSampler from scipy.stats import randint as sp_randint from scipy.stats import uniform ...
""" Copyright (c) 2019 <NAME> 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 agreed to in ...
# Copyright (c) 2017, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import sys from mixbox.binding_utils import * from . import cybox_common from . import address_object class RouteType(cybox_common.BaseObjectPropertyType): """RouteType specifies route types, via a union of t...
import os import boto3 import logging import argparse from time import sleep from threading import Thread from datetime import datetime from indra.literature import elsevier_client as ec from indra.literature.elsevier_client import _ensure_api_keys from indra.util.aws import get_job_log, tag_instance, get_batch_comman...
from pyomo.environ import * from pyomo.gdp import * from pyomo.common.fileutils import this_file_dir from os.path import join # Medium-term Purchasing Contracts problem from http://minlp.org/library/lib.php?lib=GDP # This model maximizes profit in a short-term horizon in which various contracts # are available for pur...
""" HSC Datasets """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from . import hsc_utils from . import astroimage_utils from tensor2tensor.data_generators import generator_utils from tensor2tensor.data_generators import image_utils from tensor2tensor.d...
import warnings import math import argparse import os import sqlite3 import json import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np from tqdm import tqdm warnings.filterwarnings("ignore") width, height = 640, 480 fontnames = [ "Andale Mono", "Arial", "Arial Black", "Comic San...
# ShockBlast - An ICS3U Summative # Took me a few weeks to get this done! # It's a top down shooter where you need to fight against a horde of zombies. # Waves, weapon selection, sound effects, and more! # Made by <NAME> # --------------------------------------------------------------------------- # Audio library add_...
''' From https://github.com/rkjones4/GANGogh/blob/master/GANgogh.py ''' import os, sys from pathlib import Path sys.path.append(os.getcwd()) from random import randint import time import functools import math import numpy as np import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.c...
#!/usr/bin/env python # # filetreepanel.py - The FileTreePanel # # Author: <NAME> <<EMAIL>> # """This module provides the :class:`FileTreePanel` class, which can be used to browse the contents of structured directories which are described with a `FileTree <https://git.fmrib.ox.ac.uk/ndcn0236/file-tree/>`_ specification...
#!/usr/bin/env python # Copyright (C) 2019 <NAME> import crispy import logging import numpy as np import pandas as pd import pkg_resources import seaborn as sns from natsort import natsorted import matplotlib.pyplot as plt import matplotlib.patches as patches from scipy import stats from crispy.BGExp import GExp from ...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
"""doc.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import modeling import xlnet from model_utils import get_train_op from model_utils import my_init_from_checkpoint from modeling_decomposed import get_decomposed_qa_outputs from ut...
#!/usr/bin/env python """ MetaWIBELE: mspminer_protein_family module Summary MSP annotation for each protein family Copyright (c) 2019 Harvard School of Public Health Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to ...
""" Things to consider adding: choice of las or laz output set default values for lasground_new params clip structures step lasclassify params to identify buildings use veg polygon (if given) instead of inverse ground polygon to clip veg points """ from .lastools_fun import * class DF(pd.DataFram...
#!/usr/bin/env python # Filename: plot_snow_timeseries.py """ introduction: plot the time series of snow cover from MODIS authors: <NAME> email:<EMAIL> add time: 30 April, 2019 """ import sys,os from optparse import OptionParser import rasterio import numpy as np # import pandas as pd # read and write excel files H...
import argparse import shelve import dbm import os.path import pandas as pd import tikzplotlib import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.patches as mpatches from matplotlib.ticker import FuncFormatter import pprint from datetime import timedelta from pathlib import Path import numpy as ...
#!/usr/bin/python # -*- coding: utf-8 -*- import MySQLdb import re import json import os from .variableSet import variableSet from .variableSet import splitMySQLcode from bookwormDB.configuration import Configfile from configparser import NoOptionError import logging import warnings from .sqliteKV import KV if loggin...
#! /usr/bin/env python import argparse, sys, os, errno import logging logging.basicConfig(level=logging.INFO, format='%(asctime)s %(name)s [%(levelname)s] : %(message)s') def prepare_output_file(filename): try: os.makedirs(os.path.dirname(filename)) except OSError as e: if e.errno != errno.EEXI...
# Copyright 2022 <NAME>, MIT license """ Module with routines for univariate multitaper spectrum estimation (1D). Contains the main MTSpec and MTSine classes where the estimates are made and stored. See module mtcross for bi-variate problems **Classes** * MTSpec - A class to represent Thomson's multitaper estima...
""" HVAC support using Climate MQTT Copyright 2022 <NAME> SPDX-License-Identifier: Apache-2.0 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 re...
import os import time import traceback try: import cPickle as pickle except ImportError: import pickle from collections import deque from threading import Thread import multiprocessing from multiprocessing import Process, Event, Manager, JoinableQueue from multiprocessing.managers import RemoteError try: ...
# -*- coding: utf-8 -*- """ Responsible for the translation from the query api to elastic queries """ from collections import defaultdict import itertools import logging import re from typing import Dict, List, Any import elasticsearch_dsl as es_dsl from elasticsearch import helpers as EShelpers from flask import req...
import torch import torch.nn as nn import torch.nn.functional as F from .module import * import cv2 import numpy as np class DepthInitialization(nn.Module): def __init__(self, patchmatch_num_sample = 1): super(DepthInitialization, self).__init__() self.patchmatch_num_sample = patchmatch...
#!/usr/bin/env python3 #****************************************************************************** # (C) 2018, <NAME>, Austria * # * # The Space Python Library is free software; you can redistribut...