text
stringlengths
8.04k
46.5k
#!/usr/bin/env python3 import os import sys import time import random import numpy as np from time import sleep from collections import deque import matplotlib.pyplot as plt from scipy import ndimage, signal from squaternion import Quaternion import rospy from std_msgs.msg import Float64 from control_msgs.msg import J...
import os import shutil import numpy as np import scipy.stats as stats from sklearn.metrics.pairwise import euclidean_distances import matplotlib.pyplot as plt import tools from configs import input_ProtoConfig, InputAutoEncode def _get_labels(prototypes, odors, percent_generalization, weights=None): dist = eucl...
# Copyright (c) 2013 Shotgun Software Inc. # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit # Source Code License included in this distribution package. See LICENSE. # By accessing, using, copying or modifying this work you indicate your # agreement to t...
# -*- coding: utf-8 -*- """PyFitBark API Tests.""" import os import httpretty import pytest import datetime import json from requests_oauthlib import OAuth2Session from oauthlib.oauth2 import TokenExpiredError from pyfitbark.api import BASE_URL, FitbarkApi CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))...
# # Copyright (c) 2019-present, HuggingFace Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import ast import html import json import logging import os import pickle import random import re import sys import ti...
#! python3 # -*- coding: utf-8 """ Created on Mon Apr 27 22:39:15 2020 @author: pldesgagne Description: Construct a Neighbor-Joining tree with VNTR data. Load VNTR data from a excel file. Scan and display information about the VNTR data. Calculate the genetic distance with either the Nei's distance f...
# # Copyright (C) 2011 <NAME> # # This file is part of virtualsmartcard. # # virtualsmartcard 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 option) any # later ve...
""" Views and helper functions for downloading analyses. """ import tempfile import openpyxl from openpyxl.worksheet.hyperlink import Hyperlink from openpyxl.styles import PatternFill, Border, Side, Alignment, Protection, Font from django.http import HttpResponse, HttpResponseForbidden, HttpResponseBadRequest from dja...
from collections import Counter import helper import problem_unittests as tests import numpy as np import tensorflow as tf from tensorflow.python.layers.core import Dense def print_info(): print('Dataset Stats') print('Roughly the number of unique words: {}'.format(len({word: None for word in source_text.spl...
# -*- coding: utf-8 -*- import datetime import mando try: from mando.rst_text_formatter import RSTHelpFormatter as HelpFormatter except ImportError: from argparse import RawTextHelpFormatter as HelpFormatter import numpy as np import pandas as pd from requests import Session from tstoolbox import tsutils fro...
# -*- coding: utf-8 -*- """ Created on Thu Feb 25 18:14:55 2021 @author: <NAME>, <NAME> catalog_utils.py To Do List: Emma: -what is this is mergen and what of this is specific to your science stuff """ def get_tess_features(ticid): '''Query catalog data https://arxiv.org/pdf/1905.10694.pdf''' ...
# -*- coding: utf-8 -*- '''Sequence operations module ''' from __future__ import (absolute_import, division, print_function, unicode_literals) import sys, logging, inspect, operator from future.builtins import (ascii, filter, hex, map, oct, zip, range) __all__ = ['tabulate_i', 'tabulate_r', 'tabulate_lp', 'leng...
from implicit_neural_networks import IMLP import matplotlib.image as mpimg import time from scipy.interpolate import griddata import torch import numpy as np import sys import imageio import cv2 from PIL import Image import argparse from evaluate import get_high_res_texture, get_colors,get_mapping_area import os impo...
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import matplotlib from scipy import stats from fuzzywuzzy import fuzz from fuzzywuzzy import process import textdistance from collections import Counter import os import pandas as pd import numpy as np import pickle def make_b...
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of th...
# Copyright 2017-2019 TensorHub, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
from datetime import datetime import sys import pandas as pd import pdb import numpy as np import pickle from collections import defaultdict from goatools.go_enrichment import GOEnrichmentStudy from goatools.obo_parser import GODag import json import math from Swing import Swing from Swing.util import utility_module as...
from __future__ import absolute_import, division, print_function from datetime import timedelta import functools import logging from uuid import uuid4 import six from django.db import IntegrityError, transaction from django.utils import timezone from rest_framework import serializers from rest_framework.response impo...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import time import random import copy import gym import cv2 import os from PIL import Image from gym import spaces from gym.utils import seeding import numpy as np import torch from torch.autograd import grad from .capac_controller import CapacController # from...
"""Functions to process Schema Salad schemas.""" import copy import hashlib from typing import ( IO, Any, Dict, List, Mapping, MutableMapping, MutableSequence, Optional, Set, Tuple, TypeVar, Union, cast, ) from urllib.parse import urlparse from pkg_resources import ...
import copy,subprocess,os,uuid,time,glob import numpy as np from io import StringIO import pylab as plt from dask.distributed import as_completed from py4xs.utils import run def extract_vals(txt, dtype=float, strip=None, debug=False): if strip is not None: txt = txt.replace(strip, " ") sl = txt.spl...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import numpy as np from numpy.testing import assert_allclose import astropy.units as u from astropy.coordinates.angle_utilities import angular_separation from astropy.coordinates import SkyCoord from astropy.time import Time from regions impo...
# -*- coding: utf-8 -*- from .. import functions as fn from ..Qt import QtGui, QtCore import os, weakref, re from collections import OrderedDict from ..python2_3 import asUnicode, basestring from .ParameterItem import ParameterItem import warnings PARAM_TYPES = {} PARAM_NAMES = {} def registerParameterType(name, cls,...
# coding=utf-8 # Copyright 2020 The Google Research 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 applicab...
import base64 import copy import hashlib import json import logging import uuid import warnings from binascii import Error from typing import Any from typing import Dict # noqa from typing import List # noqa from typing import Optional from cryptography.fernet import Fernet from cryptography.fernet import InvalidTok...
import json import logging import os import shutil import sys import tarfile import numpy as np from qtpy import QtCore import llspy import llspy.gui.exceptions as err from llspy.gui.helpers import byteArrayToString, newWorkerThread, shortname logger = logging.getLogger(__name__) # set root logger try: _CUDAB...
import os from datetime import datetime from urlparse import urlsplit from django import forms from django.conf import settings from django.core.files.storage import default_storage as storage from django.forms.formsets import BaseFormSet, formset_factory from django.utils.translation import ugettext, ugettext_lazy a...
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import functools import os import re import shutil import subprocess import xml.etree.ElementTree as ET from abc import abstractmethod from contextlib import contextmanager from pants.bas...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ Notes: # https://stackoverflow.com/questions/51070465/is-it-possible-to-get-the-directory-of-a-specific-nautilus-window-in-a-script?noredirect=1#comment95427874_51070465 sudo apt install python-nautilu...
""" Set operations for arrays based on sorting. :Contains: unique, isin, ediff1d, intersect1d, setxor1d, in1d, union1d, setdiff1d :Notes: For floating point arrays, inaccurate results may appear due to usual round-off and floating point comparison issues. Speed could be gained in some operations by ...
# encoding: utf-8 import json import pytest import ckan.authz as authz import ckan.logic as logic import ckan.model as model import ckan.tests.factories as factories from ckan.lib.create_test_data import CreateTestData from ckan.logic import get_action from ckan.tests.helpers import call_auth @pytest.fixture def au...
""" StarGAN v2 Copyright (c) 2020-present NAVER Corp. This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, US...
import os import time import numpy as np from astropy.io import fits from astropy import wcs from collections import OrderedDict import argparse import sys from jwst import datamodels from astropy.visualization import (ImageNormalize, AsinhStretch) import matplotlib matplotlib.use("TkAgg") import matplotlib.pyplot as...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import numpy as np from skimage.util import view_as_windows import warnings, logging # Replacing for TF2 compatibility import tensorflow as tf # import tensorflow.compat.v1 as tf from tensorflow.pyth...
# Copyright (c) 2021 PaddlePaddle 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 appli...
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
""" Responsible for performing computations to support a visualisation/analysis result """ from collections import defaultdict, OrderedDict import secrets import pandas as pd import numpy as np import matplotlib.pyplot as plt from lazydict import LazyDictionary from pyod.models.iforest import IForest from pypfopt.expec...
# -*- coding: utf-8 -*- """Load collections and determine the order.""" import json import magic import mimetypes import os import structlog import webtest from base64 import b64encode from dcicutils.misc_utils import ignored from PIL import Image from pkg_resources import resource_filename from pyramid.paster import...
import timeit import numpy as np from PIL import Image import os import sys sys.path.append('/nethome/hkwon64/Research/imuTube/repos_v2/human_parsing/Grapy-ML') import json # PyTorch includes import torch from torch.autograd import Variable from torchvision import transforms from torch.utils.data import DataLoader imp...
""" ********************************************************************************** * Project: HistFitter - A ROOT-based package for statistical data analysis * * Package: HistFitter * * Class : FitConfig ...
from railrl.envs.vae_wrappers import VAEWrappedEnv from railrl.exploration_strategies.count_based.count_based import CountExploration from torchvision.utils import save_image from railrl.core import logger from railrl.data_management.obs_dict_replay_buffer import ( flatten_dict, ObsDictRelabelingBuffer ) from ...
# train sample 和 test sample几乎将lushun版本全部拿过来了 # 由于test_sample还是有问题,模型也换成一模一样的了 # 所以只能测试train_sample,即训练样本了。 import argparse import os import sys import shutil import time import random import glob import logging import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import to...
import sys import pickle from collections import Counter # tmp import numpy as np import chainer from chainer import cuda import classifiers.sequence_tagger import common import constants from data_loaders import data_loader, segmentation_data_loader, tagging_data_loader from evaluators.common import AccuracyEvaluat...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: utf-8 -*- """Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2016, <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...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. r""" Acquisition functions for max-value entropy search (MES) and multi-fidelity MES with noisy observation and trace o...
""" Notes: Bond rearrangement = br """ import itertools import os from autode.atoms import get_maximal_valance from autode.geom import get_neighbour_list from autode.geom import get_points_on_sphere from autode.log import logger from autode.mol_graphs import get_bond_type_list from autode.mol_graphs import get_fbonds...
""" Function in this file extracts features from conversations(threads) and returns dictionary with features """ import re import nltk import numpy as np from data_preprocessing.help_prep_functions import sumw2v, getW2vCosineSimilarity from data_preprocessing.text_preprocessing import preprocess_text, initopts from ...
#(C) Copyright <NAME> 2016 -- Not for redistribution. #Version 1.1 import sys, math, os import nuke,nukescripts try: import PySide.QtGui as QtGui import PySide.QtCore as QtCore from PySide.QtGui import * from PySide.QtCore import * except: import h_Qt from h_Qt import QtGui from h_Qt import ...
import TSC as sim import numpy as np import dnaplotlib as dpl # import pandas as pd # gridspec is a module which specifies the location of the subplot in the figure. import matplotlib.gridspec as gridspec import matplotlib.pyplot as plt import matplotlib.colors as cm import matplotlib.patches as pat import mat...
"""Code for generating and storing inferred types.""" import collections import logging import os import StringIO import subprocess from pytype import abstract from pytype import convert_structural from pytype import output from pytype import state as frame_state from pytype import utils from pytype import vm from p...
import torch import torch.nn as nn import torch.nn.functional as F from torch.distributions.normal import Normal torch.set_default_tensor_type(torch.cuda.FloatTensor) from typing import Tuple import math import numpy as np import matplotlib.pyplot as plt import gzip import itertools from scipy.spatial import KDTree ...
#!/usr/bin/env python """Utilities for plotting. """ # TODO: have common module for import # TODO: have test module from __future__ import print_function, division import os import collections import ast import json import datetime as dt import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import Pdf...
import datetime import json import os from os import path import tempfile from urllib.parse import urlparse import zipfile from typing import Optional import botocore import boto3 import requests from amazon_genomics.wes.adapters import AbstractWESAdapter from rest_api.exception.Exceptions import InvalidRequestError, ...
# Copyright 2018 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. import os import six.moves.urllib.parse # pylint: disable=import-error from core import benchmark_finders from core import benchmark_utils from telemetry.s...
# encoding: utf8 # This module provides program rewriting for finding compatible sets of a HEX program. # HEXLite Python-based solver for a fragment of HEX # Copyright (C) 2017-2019 <NAME> <<EMAIL>> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
import os, pickle, re, csv from tqdm import tqdm import numpy as np import torch.utils.data from torchvision.datasets import ImageFolder import torchvision.transforms as transforms import PIL from collections import Counter import nltk import json class Vocabulary(object): def __init__(self, ...
#!/usr/bin/env python3 # benchmarks.py --- # # Filename: benchmarks.py # Author: <NAME> # Created: Wed, 01 Jun 2016 11:27:20 -0400 # # # Copyright (c) 2015, <NAME>, University of Pennsylvania # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
import random import re import numpy as np import pandas as pd import torch from torch.utils.data import Dataset from sklearn.model_selection import KFold, train_test_split import scanpy as sc import scipy import anndata as annd from tqdm.auto import tqdm from scipy.stats import pearsonr, spearmanr def get_expression...
#!/usr/bin/env python # encoding: utf-8 """ The :class:`~IPython.core.application.Application` object for the command line :command:`ipython` program. Authors ------- * <NAME> * <NAME> """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2010 The IPython Developme...
from datetime import datetime, timedelta, timezone import math from math import floor, sqrt import numpy as np import pandas as pd import statsmodels.regression.mixed_linear_model as sm # statsmodels version >= 0.8 ! import ephem __author__ = "<NAME> :: New Mexico Mira Project, Albuquerque" class Timespan: """...
# -*- coding: utf-8 -*- # pyOCD debugger # Copyright (c) 2019-2020 Arm Limited # Copyright (c) 2020 <NAME> # Copyright (c) 2020 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. # Copyright (c) 2021 <NAME> # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Copyright The IETF Trust 2019, All Rights Reserved # Copyright 2018 Cisco and its affiliates # # 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...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
import logging import math from einops import rearrange, repeat as ra, repeat import torch from torch import nn from torch.nn import functional as F try: from .registry import register_model from .layers import DropPath except ImportError: from registry import register_model from layers import DropPat...
import requests import discord from discord.ext import commands, pages from discord.commands import Option from discord.ui import Button, View from datetime import datetime import matplotlib.pyplot as plt import random import os # initialising bot with a custom status client = commands.Bot(activity=discor...
from boa.code import pyop from byteplay3 import Label from boa.blockchain.vm import VMOp from boa.blockchain.vm.BigInteger import BigInteger from collections import OrderedDict NEO_SC_FRAMEWORK = 'boa.blockchain.vm.' import pdb class VMToken(): """ """ addr = None pytoken = None data = Non...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ An implementation of some of the NIFTI conventions as desribed in: http://nifti.nimh.nih.gov/pub/dist/src/niftilib/nifti1.h A version of the same file is in the nibabel repisitory at ``doc/source/exte...
# Copyright 2811<EMAIL>. All Rights Reserved. # # SPDX-License-Identifier: Apache-2.0 import io import logging import os import random import sys import tarfile import rx from hfc.fabric.transaction.tx_proposal_request import \ create_tx_prop_req, CC_INSTALL, CC_TYPE_GOLANG, \ CC_INSTANTIATE, CC_UPGRADE, CC_...
r"""Definition of the DataLoader and associated iterators that subclass _BaseDataLoaderIter To support these two classes, in `./_utils` we define many utility methods and functions to be run in multiprocessing. E.g., the data loading worker loop is in `./utils/worker.py`. """ import threading import itertools import ...
#!/usr/bin/env python # # cli.py - CLI handling for the Common OVF Tool suite # # August 2013, <NAME> # Copyright (c) 2013-2017, 2019 the COT project developers. # See the COPYRIGHT.txt file at the top-level directory of this distribution # and at https://github.com/glennmatthews/cot/blob/master/COPYRIGHT.txt. # # This...
#!/usr/bin/env python """ Functions and objects to deal with meteoroids orbits """ __author__ = "<NAME>, <NAME> " __copyright__ = "Copyright 2016-2017, Desert Fireball Network" __license__ = "MIT" __version__ = "1.0" import numpy as np from numpy.linalg import norm import matplotlib.pyplot as plt from astropy import...
import os import csv import glob import h5py import shutil import random import numpy as np import nibabel as nib import multiprocessing from multiprocessing import Pool from joblib import Parallel, delayed from scipy.io import loadmat from scipy.ndimage import label as ndlabel from collections import Counter import ma...
# ####metadata_initialize.py # 元数据维护,包括entity,fields,relation等,从table、column的元数据来生成默认的entity和fields。 from config.config import cfg as config from db.db_conn import db_connection_metedata as db_md from mdata import metadata as md from privilege import user_mngt as ur from model import model_graph as mg logger = config....
# Death Clock control program for Raspberry Pi # Uses Pi GPIO library http://abyz.me.uk/rpi/pigpio # Run "sudo pigpiod" before launching import pigpio import keyboard import time from datetime import datetime import random all_black = b'\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF' ...
# -*- coding: latin1 -*- """ reptor.py - Event Replication for Adabas main module """ from __future__ import print_function # PY3 from adapya.base.defs import adalog as log from adapya.adabas import adaerror from adapya.era.urb import Urbc,Urbd,Urbe,Urbh,Urbi,Urbr from adapya.era.urb import Urbs,Urbsu,Urbt,...
from matplotlib import pyplot as plt import matplotlib.ticker as mticker from matplotlib import patches import matplotlib SMALL_SIZE = 10 MEDIUM_SIZE = 12 BIGGER_SIZE = 14 plt.rc('font', size=SMALL_SIZE) # controls default text sizes plt.rc('axes', titlesize=SMALL_SIZE) # fontsize of the axes title plt.rc(...
from __future__ import absolute_import, division, print_function import logging from unittest import TestCase import numpy as np import pytest import torch from torch import nn as nn import pyro import pyro.distributions as dist import pyro.optim as optim from pyro.distributions.testing import fakes from pyro.infer ...
#Copyright (C) 2021 <NAME>, <NAME>, University of California, Berkeley #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 applic...
# See LICENSE for licensing information. # # Copyright (c) 2016-2021 Regents of the University of California and The Board # of Regents for the Oklahoma Agricultural and Mechanical College # (acting for and on behalf of Oklahoma State University) # All rights reserved. # """ This is a DRC/LVS/PEX interface file for mag...
import chess.variant import copy import numpy as np import copy class _BughouseBoardState: def __init__(self, board): self.board_state = chess._BoardState(board) self.pockets = board._bughouse_boards.boards[board.other_board_id].pockets.copy() self.pockets_self = board.pockets.copy() d...
################################################################################ # # Package : AlphaPy # Module : portfolio # Created : July 11, 2013 # # Copyright 2020 ScottFree Analytics LLC # <NAME> & <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except...
# coding=utf-8 # Copyright (c) 2019, NVIDIA CORPORATION. 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 re...
# ICE Revision: $Id$ """Reads configuration-files that define defaults for various PyFoam-Settings Also hardcodes defaults for the settings""" from PyFoam.ThirdParty.six.moves import configparser from PyFoam.ThirdParty.six import iteritems,PY3 from PyFoam.Infrastructure.Hardcoded import globalConfigFile,userConfigF...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # Copyright: (c) 2018, <NAME> <<EMAIL>> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA ...
from flask import Blueprint, render_template,request,flash,redirect,url_for,jsonify,send_file from PIL import Image,ImageFont,ImageDraw,ImageFilter import requests import logging import base64 import utils import io import os log = logging.getLogger("Nurevam.site") blueprint = Blueprint('level', __name__, template_fo...
"""DelineateIt wrapper for pygeoprocessing's watershed delineation routine.""" import os import logging import time from osgeo import gdal from osgeo import ogr from osgeo import osr import shapely.errors import shapely.geometry import shapely.wkb import numpy import pygeoprocessing import pygeoprocessing.routing impo...
""" The ``clearsky`` module contains several methods to calculate clear sky GHI, DNI, and DHI. """ from __future__ import division import os from collections import OrderedDict import calendar import numpy as np import pandas as pd from pvlib_cspopt import tools def ineichen(apparent_zenith, airmass_absolute, lin...
# -*- coding: utf-8 -*- """ """ import os import csv import glob import requests import pandas as pd from astropy.time import Time from astropy.table import Table import matplotlib.pyplot as plt import numpy as np from math import isnan import urllib3 from astropy.io import fits import owncloud import yaml import sys ...
import contextlib import dataclasses import functools import itertools import random from typing import Any, Callable, Coroutine, Iterable, Tuple, Optional import discord import inflection from .roles import Role from .pins import init_pins from .pins.format import base_pin from .pins.parse import parse_receipts fro...
#from cStringIO import StringIO from datetime import datetime import hashlib import json import os import random import re from django.db import models from django.core.files.uploadedfile import SimpleUploadedFile from django.core.mail import send_mail from somewhere import SERVER_EMAIL_ADDRESS try: import Image...
# Anharmonic correction to vibrational frequencies # Version 1.1 - 16/07/2020 # The file anharm_path.txt must be present in the root folder (the # one containing the program). The content of anharm_path.txt is the name # of the folder containing the data (usually, the folder relative to # the phase to be inv...
# ~~~ # This file is part of the paper: # # "A relaxed localized trust-region reduced basis approach for # optimization of multiscale problems" # # by: <NAME> and <NAME> # # https://github.com/TiKeil/Trust-region-TSRBLOD-code # # Copyright 2019-2022 all developers. All rights reserved. ...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸 (Blueking) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may...
# # 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...
# Copyright 2020 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agre...
#!/usr/bin/env python3 # (C) 2020 gomachssm import os import pytest import unittest.mock from twsqlparser import twsp, internal_exceptions DIRNAME = os.path.abspath(os.path.dirname(__file__)) UUID4PATH = 'twsqlparser.twsp.uuid4' called_count = 0 DELETE_PATTERN = [False, True] class ExpSql: def __init__(self, i...
# 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 ag...
import numba import numpy as np import strax import straxen from .pulse_processing import HITFINDER_OPTIONS, HITFINDER_OPTIONS_he, HE_PREAMBLE from strax.processing.general import _touching_windows export, __all__ = strax.exporter() @export @strax.takes_config( strax.Option('peaklet_gap_threshold', default=350,...