text
stringlengths
6.04k
39.5k
print('**************************') print('Chess-heat-vision project') print(' * M.P.K.-T. *') print('**************************\n') # CHANGELOG ETC # v1 = first attempts # v2 = turned v1 into functions # v3 = start toying with drawing boards.... BROKEN # v4 = reboot of v2 ... # ... VERSION 4 WORKS!!! Output tal...
import tensorflow as tf from tensorflow import keras from tensorflow.keras import backend as K from keras_cv_attention_models.attention_layers import ( activation_by_name, batchnorm_with_activation, conv2d_no_bias, depthwise_conv2d_no_bias, drop_block, layer_norm, se_module, output_block...
# flake8: noqa from contextlib import ExitStack import click from omegaconf import OmegaConf from pfb.workers.main import cli import pyscilog pyscilog.init('pfb') log = pyscilog.get_logger('SPIFIT') @cli.command() @click.option('-image', '--image', required=True, help="Path to model or restored image cub...
import qelos_core as q import torch import numpy as np def log_prob_standard_gauss(x): """ Computes log prob of given points under standard gauss N(0, I) :param x: (batsize, gauss_dim) batch of samples """ ret = - 0.5 * ((x**2).sum(1) + x.size(1) * np.log(2*np.pi)) return ret def log_prob_...
#!/usr/bin/env python3 import os import json import shutil import argparse import docker CLATE_JSON = os.getenv("HOME") + '/.clate.json' class Docker: def __init__(self, client="clate"): self._client = client self._docker = docker.from_env() def get_names(self): names = list() ...
import numpy as np import pandas as pd import jieba.analyse from pyecharts import options as opts from pyecharts.globals import SymbolType from pyecharts.charts import Pie, Bar, Map, WordCloud """ 获取详细教程、获取代码帮助、提出意见建议 关注微信公众号「裸睡的猪」与猪哥联系 @Author : 猪哥 """ # 淘宝商品原生excel文件保存路径 GOODS_EXCEL_PATH = 'taobao_goods.xlsx' #...
from typing import List, Union, Optional import numbers import numpy as np import dynet as dy from xnmt import batchers, input_readers, param_collections, param_initializers, vocabs, logger from xnmt.modelparts import transforms from xnmt.persistence import Serializable, serializable_init, bare, Ref from xnmt.events ...
""" pysteps.utils.dimension ======================= Functions to manipulate array dimensions. .. autosummary:: :toctree: ../generated/ aggregate_fields_time aggregate_fields_space aggregate_fields clip_domain square_domain """ import numpy as np def aggregate_fields_time(R, metadata, time_w...
# -*- coding: utf-8 -*- """ This module defines a class for identifying contacts.""" import numpy as np from caviar.prody_parser import LOGGER from caviar.prody_parser.atomic import AtomPointer, AtomMap from caviar.prody_parser.utilities import importLA, checkWeights from .measure import calcCenter linalg = importL...
# -*- coding: utf-8 -*- """ @author: <NAME> """ import os import pickle import numpy as np import dataset_utils from os.path import join import matplotlib.pyplot as plt import chip_generative_model as chip def assign_class_membership(num_nodes, class_prob, one_hot=True): """ Randomly assigns num_node nodes t...
# Copyright (c) 2013 OpenStack Foundation # 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 ...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### """ This file is a part of the VeRyPy classical vehicle routing problem heuristic library and provides an implementation of the Stewart & Golden (1984) 3-opt* heuristic with Lagrangean relaxatio...
"""Common pre-checks for all RLlib experiments.""" from copy import copy import logging import gym import numpy as np import traceback from typing import TYPE_CHECKING, Set from ray.actor import ActorHandle from ray.rllib.utils.annotations import DeveloperAPI from ray.rllib.utils.spaces.space_utils import convert_elem...
from .explorers import * from .jericho_env import * from .utils import * import time from tqdm import tqdm @dataclass class GridDimension: attr: str div: int @dataclass() class ChainLink: __slots__ = ['start_cell', 'end_cell', 'seed'] start_cell: typing.Any end_cell: typing.Any seed: int ...
import torch from torch.utils.data import Dataset import cv2 import numpy as np from cv2 import resize import skimage.morphology as sm from skimage.transform import rotate # {'C': 6136637, 'N': 915240, 'O': 937100, 'P': 19613, 'F': 124551, # 'Cl': 74160, 'S': 104677, 'Br': 57488, 'B': 2969, 'Se': 1633, 'I': 10490, 'H'...
# Copyright 2021 The SeqIO 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...
#!/usr/bin/env python3 """This script compute k-mer frequencies using CGR of all windows of a certain size """ from joblib import Parallel, delayed import sys import math import glob import numpy import os __author__ = "<NAME>" __copyright__ = "Copyright 2017 Titou<NAME>" __license__ = "MIT" # Tracking file: follow_...
""" [1] <NAME>, et al. "xdeepfm: Combining explicit and implicit feature interactions for recommender systems." Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining. ACM, 2018. """ import sys import os sys.path.insert(0, os.path.abspath('..')) from typing import Lis...
from enum import IntEnum class EResult(IntEnum): Invalid = 0 OK = 1 #: success Fail = 2 #: generic failure NoConnection = 3 #: no/failed network connection # NoConnectionRetry = 4 #: OBSOLETE - removed Invali...
import csv import io import qrcode from datauri import DataURI from django import forms from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.http.response import Http404, HttpResponse from django.shortcuts import render from django.urls import path from django.u...
import datetime import mlir import itertools import pytest import numpy as np from mlir_graphblas import MlirJitEngine from mlir_graphblas.engine import parse_mlir_functions from mlir_graphblas.sparse_utils import MLIRSparseTensor from mlir_graphblas.mlir_builder import MLIRFunctionBuilder from mlir_graphblas.types im...
import ast import keyword import re from enum import Enum from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Optional from prompt_toolkit.completion import ( CompleteEvent, Completer, Completion, PathCompleter, ) from prompt_toolkit.contrib.regular_languages.compiler import compile ...
import json import csv import shutil import os import sys from skimage import io import numpy as np from PIL import Image, ImageDraw, ImageFont from bokeh.io import output_file from bokeh.plotting import figure from bokeh.models import HoverTool, ColumnDataSource from bokeh.plotting import save, show # from bokeh.pal...
import os import sys import re import shutil from distutils.version import LooseVersion from pkg_resources import Requirement from glob import glob from subprocess import check_call, check_output, CalledProcessError from time import sleep from charms import layer from charms.layer.execd import execd_preinstall def _...
import torch import torch.nn as nn import init from collections import OrderedDict from correlation_package.correlation import Correlation class Model(nn.Module): def __init__(self, inc, outc, corr=True, pretrained=True): super(Model, self).__init__() self.corr = corr # encoder1 s...
from discord.ext import commands from discord.utils import find, get from discord.ext import menus import discord import json import os import cogs.utils.checks as checks import random import colorsys from .utils.checks import channel_only from .utils.paginator import FieldPages import typing import re from math import...
import os import time import json import argparse import torch import torch.nn as nn import torch.optim as optim from torch.optim.lr_scheduler import StepLR from torch.utils.data import DataLoader from torch.utils.tensorboard import SummaryWriter import torch.nn.functional as F from torch.autograd import Variable fro...
#!/usr/bin/python3 import sys import encrypt_code import argparse import subprocess import os import banners import shutil from essential_generators import DocumentGenerator import platform BLUE, RED, WHITE, YELLOW, MAGENTA, GREEN, END = '\33[94m', '\033[91m', '\33[97m', '\33[93m', '\033[1;35m', '\033[1;32m', '\033[0m...
import hashlib import json import logging import uuid from functools import wraps from flask import redirect, Blueprint, abort, send_file, make_response, request from prometheus_client import Counter import features from app import app, signer, storage, config_provider, ip_resolver, instance_keys from auth.auth_con...
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors # License: MIT. See LICENSE import os import pathlib import re import click import git import frappe from frappe.utils import touch_file def make_boilerplate(dest, app_name, no_git=False): if not os.path.exists(dest): print("Destination direct...
"""All assumptions are either loaded in this file or definied here """ import os from datetime import date from energy_demand.read_write import read_data from energy_demand.technologies import technologies_related from energy_demand.technologies import dummy_technologies from energy_demand.basic import testing_function...
""" Copy Contributor-Generated Matrices (CGM) data files to a DCP/2 staging bucket along with generated supplementary_file, links, and project_0 JSON files. Requires a 'csv' file with one line per matrix file and the following columns: - project_uuid: A project UUID. - project_shortname: A project shortname. ...
#! /usr/bin/env python # # setup.py : Distutils setup script # # Part of the Python Cryptography Toolkit # # =================================================================== # Portions Copyright (c) 2001, 2002, 2003 Python Software Foundation; # All Rights Reserved # # This file contains code from the Python 2.2 s...
from __future__ import unicode_literals import frappe from frappe import _ from frappe.data_migration.doctype.data_migration_connector.connectors.base import BaseConnection import mysql.connector as mariadb from datetime import datetime class EmployeeShiftConnection(BaseConnection): weekdays = ['Monday', 'Tuesday', '...
import torch import torch.nn.functional as F from torch.utils.data import Dataset from torchvision import transforms import torch_geometric as pyg import numpy as np import random from src.build_graphs import build_graphs from src.factorize_graph_matching import kronecker_sparse, kronecker_torch from src.sparse_torch i...
import datetime import unittest from unittest import mock import pytest from transiter.db import ( dbconnection, models, ) from transiter.db.queries import ( tripqueries, servicemapqueries, stopqueries, schedulequeries, ) from transiter.services import views from transiter.services.servicemap ...
import json import re from django.db.models import Q from django.http import JsonResponse from django.shortcuts import get_object_or_404 from django.urls import reverse from django.views import View from lattices.models import LatticeNode, LemmaNode # from lattices.utils import get_or_create_nodes_for_form_and_lemmas...
from lib.object_detector import ObjectDetector, gather_res import torch import torch.nn as nn import torch.nn.parallel from sg2im_model import Sg2ImModel from sg2im.layout import boxes_to_layout from discriminators import PatchDiscriminator, AcCropDiscriminator import os from collections import defaultdict from lib.pyt...
''' Loads and stores source files to be modified, and writes them out when finished. TODO: rename this to be different than the package. ''' import os from collections import OrderedDict import inspect import shutil from .. import Common Settings = Common.Settings from .File_Fields import * from . import Source_Read...
# Copyright (c) <NAME>. All Rights Reserved. r""" STB dataset A Hand joint Tracking Benchmark from Stereo Matching, ICIP 2017 """ import math import os import pickle import PIL import cv2 import matplotlib.pyplot as plt import numpy as np import scipy.io as sio import torch.utils.data from PIL import Image from termc...
import os, time from typing import Dict, Tuple, Callable, Union, Optional, List import ctypes as ct from pathlib import Path from functools import partial import pandas as pd import numpy as np import numba as nb from astropy import units as un from astropy.constants import sigma_T, m_p, c sigma_T = sigma_T.to(un.Mp...
import abc import functools import numpy as np import scipy.linalg from probnum import diffeq, random_variables, statespace, utils from probnum._randomvariablelist import _RandomVariableList from bvps import ( bridges, bvp_initialise, control, error_estimates, kalman, mesh, ode_measmods, ...
import numpy as np import math import pandas as pd from datetime import date, datetime, timedelta import yfinance as yf # from db import connect_to_db # Create a function to round any number to the smallest multiple of 100 def round_down(x): return int(math.floor(x / 100.0)) * 100 def rsi(data, column, window=2...
import pyredner import torch import math import redner from typing import Optional def compute_vertex_normal(vertices: torch.Tensor, indices: torch.Tensor, weighting_scheme: str = 'max'): """ Compute vertex normal by weighted average of nearby face normal...
#!/usr/bin/env python from __future__ import print_function, division """ This is used to drive many of the examples across the backends, for regression testing, and comparing backend efficiency. You can specify the backends to be tested either via the --backends switch, which takes a comma-separated list, or as sepa...
from django.test import TestCase, Client from cases.models import Case from leads.models import Lead from common.models import User, Comment, Attachments, APISettings from accounts.models import Account, Tags from leads.tasks import * from leads.forms import * from django.urls import reverse from django.core.files.uplo...
import sys import os import re import time import datetime import json import ipaddress import requests import csv from termcolor import colored def justify(content, colors_column=None, grid=True, frame=False, enumerator=False, header=False, topbar='', newline='\n', delimiter=';', justsize=4): """ (function c...
import nipype.pipeline.engine as pe import nipype.interfaces.fsl as fsl import nipype.interfaces.utility as util import nipype.interfaces.afni as afni from nipype import logging def get_voxel_timeseries(wf_name='voxel_timeseries'): """ Workflow to extract time series for each voxel in the data that is pre...
#!/usr/bin/env python ## @file # # Plot a PEMap. The PEMap is generated by running matmul with the # --print-PEMap command line option. # # @author <NAME> <<EMAIL>> # @author <NAME> <<EMAIL>> import math import re import subprocess import sys import tempfile import pdb try: import numpy as np except ImportError a...
# PyGenere v 0.3 # # Release Date: 2007-02-16 # Author: <NAME> <webmonkey at smurfoncrack dot com> # URL: http://smurfoncrack.com/pygenere # History and License at end of file r""" This library implements the Caesar and Vigenere ciphers, allowing a piece of plaintext to be encoded using a numeric rotation or an alpha...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Shared code between plugins. Use python's help() for prettier help info. """ import gi gi.require_version('Gimp', '3.0') from gi.repository import Gimp gi.require_version('Gegl', '0.4') from gi.repository import Gegl from gi.repository import GObject from gi.repositor...
from __future__ import print_function import argparse import requests import multiprocessing from collections import OrderedDict import pprint from optparse import OptionParser import os, sys class TMap(object): def __init__(self,key,value): self.key=key self.value=value class Map(object): def __init__(self): ...
# Functions/classes to calculate the fitness of clones from the random mutation fitnesses import math import numpy as np import matplotlib.pyplot as plt import csv # Probability distributions for drawing the fitness of new mutations. # Set up so can be called like functions without argument, but can print the attribu...
""" Generate a synthetic set of microsomes with different membrane bound proteins Input: - Data set parameters: + Number of tomograms (one microsome each) + Tomogram size + Resolution (pixel size) + SNR range + Missing wedge (sem...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Created on Sun Jun 07 06:57:08 2015 @author: <NAME> Copyright (c) 2015 <NAME> The license of this program is governed by the GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007. See the "COPYING" file of this repository. This is an example for using the Python binding Py...
import itertools import logging from enum import Enum, auto from math import floor from typing import Dict, Any, List, Tuple import cv2 import numpy as np from imgaug.augmenters import ElasticTransformation from scipy import interpolate from .backgroundremoval import backgroundRemoval from .core_extraction import ext...
#!/usr/bin/env python3 """ Copyright:: +===================================================+ | © 2021 Privex Inc. | | https://www.privex.io | +===================================================+ | ...
# -*- coding: utf-8 -*- """Module for certificates """ # import basic stuff import logging from typing import Optional, List, Any import datetime import builtins # import own stuff import tlsmate.cert_utils as cert_utils import tlsmate.ext as ext import tlsmate.kdf as kdf import tlsmate.tls as tls # import other stuf...
#! /usr/bin/env python3 import sys import pickle import argparse import numpy as np import pandas as pd import scipy.stats as stats def like_calc(X, y_test, unc): """ Given a simulated entry with uncertainty and a test entry, calculates the likelihood that they are the same. Parameters -----...
#!/usr/bin/env python3 # encoding: utf-8 """ Determine scaling factors for a given list of levels of theory Based on DOI: 10.1016/j.cpc.2016.09.004 Adapted by <NAME> and <NAME> """ import os import time import shutil from arc.common import get_logger, check_ess_settings, time_lapse, initialize_log, initialize_job_t...
"""Query subclass used by Manager as default session query class. """ from math import ceil from sqlalchemy import orm, and_, or_, inspect try: from sqlalchemy.orm.strategy_options import Load except ImportError: # pragma: no cover import warnings from sqlalchemy import __version__ as sqla_version ...
import asyncio import datetime import hashlib import json import os import plexapi.myplex import struct import subprocess import sys import tempfile import threading import time class plexConfig: extraLogging = True timeRemaining = False def __init__(self, serverName = "", username = "", password = "", token = ""...
# -*- coding: utf-8 -*- import os import abc import yaml from datetime import datetime import pytsk3 from dfvfs.helpers import file_system_searcher from dfvfs.resolver import resolver as path_spec_resolver from dfvfs.lib import definitions as dfvfs_definitions from dfvfs.lib import errors as dfvfs_errors from dfvfs....
# GNU MediaGoblin -- federated, autonomous media hosting # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either versio...
#!/usr/bin/env python import os import argparse import json import re import pathlib import networkx from jinja2 import Environment, FileSystemLoader from . import __version__ SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) class JsonSchema2Popo: """Converts a JSON Schema to a Plain Old Python Object c...
from kikit.pcbnew_compatibility import pcbnew from pcbnew import wxPoint import numpy as np from kikit.common import * from kikit.defs import * from kikit.substrate import Substrate, extractRings, toShapely, linestringToKicad from kikit.export import gerberImpl, pasteDxfExport from kikit.export import exportSettingsJlc...
import multiprocessing import subprocess import sys, os from PyQt4 import QtGui, QtCore, QtWebKit from functools import partial sys.path.append(os.path.join(os.getenv('XChemExplorer_DIR'), 'lib')) sys.path.append(os.path.join(os.getenv('XChemExplorer_DIR'), 'web')) sys.path.append(os.path.join(os.getenv('XChemExplorer...
# This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at http://mozilla.org/MPL/2.0/. from __future__ import print_function from __future__ import absolute_import import os import gc import glob import os.pa...
from csv import DictReader import logging import os from datetime import datetime from pathlib import Path from shutil import rmtree from airflow import DAG from airflow.exceptions import AirflowSkipException from airflow.operators.python import PythonOperator from airflow.models import Param, Variable from airflow.ti...
# coding: utf-8 # In[1]: from jove.SystemImports import * from jove.TransitionSelectors import * from jove.DotBashers import chk_consistent_pda # # Pushdown Automata (PDA) # # ## Basic Definitions # # Pushdown Automata are structures # # $(Q, Sigma, Gamma, Delta, q0, z0, F)$ # # where # # ...
""" Various functions for analyzing graphs, like disparity, degree distributions, community detection and all that stuff. """ import networkx as nx import numpy as np import matplotlib.pyplot as plt import argparse import warnings from collections import Counter def plot_graph(G, filename='figure.pdf'): """Plot...
""" generate ObjectiveC code for: getKeyDataForOya(keycode, gOya) """ from string import ascii_lowercase, ascii_uppercase KEYMAP = [ "a", "s", "d", "f", "h", "g", "z", "x", "c", "v", "[Section]", "b", "q", "w", "e", "r", "y", "t", "1", "2", "3", "4", "6", "5", "^", "9", "7", "-", "8", "0", "[", "o", ...
try: import numpy as np import pandas as pd from skimage import morphology from skimage.measure import regionprops from skimage.measure import label from scipy import ndimage from skimage.graph import route_through_array from scipy.ndimage import binary_closing, binary_hit_or_mis...
import math import os import re import tempfile from typing import Dict, List, Union, Tuple import numpy as np from cmdstanpy import TMPDIR from cmdstanpy.utils import jsondump, rdump from cmdstanpy.utils import check_csv, read_metric class Model(object): """Stan model.""" def __init__(self, stan_file: str...
import os import configparser from configparser import NoOptionError import fnmatch import pprint import shutil import time import sys import codecs from urllib.request import urlopen from urllib.error import URLError, HTTPError import json from socket import timeout # pip install these packages: try: from googles...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import hashlib from aldryn_apphooks_config.fields import AppHookConfigField from aldryn_apphooks_config.managers.parler import AppHookConfigTranslatableManager from cms.models import CMSPlugin, PlaceholderField from djang...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """ FILE:...
import sys from math import isnan import numpy as np from scipy import integrate from scipy.optimize import least_squares # fmt: off from ross.fluid_flow.fluid_flow_geometry import (move_rotor_center, move_rotor_center_abs) # fmt: on def calculate_oil_film_force(flu...
""" post_hoc_celeba.py Debias image models trained on celeba """ import argparse import copy import json import math from pathlib import Path import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import yaml from sklearn.metrics import roc_auc_score from tor...
import logging import os import pickle from multiprocessing import Pool from functools import partial from simpletransformers.seq2seq.seq2seq_utils import add_faiss_index_to_dataset from datasets.load import load_from_disk import torch import transformers import numpy as np from torch.utils.data import Dataset from t...
""" ============================================================= ~/fsdviz/fsdviz/common/utils.py Created: 06 Sep 2019 11:38:22 DESCRIPTION: Some utility functions that are used in the fsdviz application. <NAME> ============================================================= """ import re import uuid from django...
import random import pygame as pg import config as cf from math import sqrt, pow, atan, sin, cos, radians, pi class game_obj(object): def __init__(self, x, y, pic_path): """ int x: initial x coor of object on map int y: initial y coor of object on map str pic_path: rel...
from keras.preprocessing import image import warnings warnings.filterwarnings("ignore") import time import os from os import path from pathlib import Path import gdown import numpy as np import pandas as pd from tqdm import tqdm import json import cv2 from keras import backend as K import keras import tensorflow as tf ...
import math import numpy as np import tensorflow as tf from tensorflow.keras import layers as tfkl from tensorflow_probability import distributions as tfd from tensorflow.keras.mixed_precision import experimental as prec import common class RSSM(common.Module): def __init__( self, stoch=30, deter=200, hidde...
"""Miscellaneous visualization tools. These functions are similar to matplotlib functions like :func:`~matplotlib.pyplot.scatter` and :func:`~matplotlib.pyplot.pcolormesh`. When called, these functions default to creating plots on the current axis. After plotting, functions like :func:`~matplotlib.pyplot.xlabel` and :...
""" This module contains the implementation operator and nuclear norms, used in matrix completion problems and other low-rank factorization problems. """ from __future__ import print_function, division, absolute_import import warnings import numpy as np from ..affine import (linear_transform, astransform, ...
""" Prepare all SARS-CoV-2 Mpro structures for docking and simulation in monomer and dimer forms This should be run from the covid-moonshot/scripts directory """ import os from typing import Optional, List, Tuple, NamedTuple, Union import re from pathlib import Path import argparse import itertools import tempfile fr...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # quick script for installing tap # ## import subprocess,re,os,shutil,sys import base64 from src.core.tapcore import ssh_keygen from src.core.tapcore import motd from src.core.tapcore import set_background import getpass import sys try: import pexpect except ImportEr...
import boto import datetime from pyspark import SparkConf from pyspark.sql import SparkSession from pyspark.sql.functions import explode, lit import smtplib def date_from_epoch(epoch, offset): """Return YYYY-MM-DD from timestamp (epoch) and offset""" if epoch is None or offset is None: return None ...
#!/usr/bin/env python # -- coding: utf-8 -- """ Copyright (c) 2021. All rights reserved. Created by <NAME> on 29.9.21 """ import os import sys from multiprocessing.pool import Pool p = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if p not in sys.path: sys.path.append(p) from myutils.make_html_pag...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np from numpy.random import RandomState from tensorflow.python.framework import dtypes from tensorflow.python.ops import random_ops import random """ Quarternion layers ...
# -*- coding: utf-8 -*- """Contains the plotting-specific functions specific to the velocity width analysis.""" from __future__ import print_function import numpy as np import matplotlib.pyplot as plt from fake_spectra import plot_spectra as ps from fake_spectra import haloassigned_spectra as hs import kstest as ks im...
"""Test methods defined in `qibo/core/callbacks.py`.""" import pytest import numpy as np from qibo.models import Circuit, AdiabaticEvolution from qibo import gates, callbacks, K from qibo.config import EIGVAL_CUTOFF # Absolute testing tolerance for the cases of zero entanglement entropy _atol = 1e-8 def test_getite...
""" Module for radiometric normalization Credits: Copyright (c) 2018-2019 <NAME> (GeoVille) Copyright (c) 2017-2019 <NAME>, <NAME>, <NAME> (Sinergise) This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. """ import numpy as np from eolearn.core impo...
# pylint: disable=E1101,R,C import csv import glob import os import re import numpy as np import torch import torch.utils.data import trimesh import logging import itertools import random logging.getLogger('pyembree').disabled = True def rotmat(a, b, c, hom_coord=False): # apply to mesh using mesh.apply_transform(r...
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the ...
# SIMPLEcrop in python 3 # RUINS Project (cc) <EMAIL> # This is a python implementation based on Zhao et al. 2019 and other crop, soilwater and evapotranspiration models # The intention is a to port the SIMPLE crop model to a fast and modular modelling system # Zhao, C. et al. (2019), A SIMPLE crop model, EUROPEAN JOU...
################################################################################################################ ''' CISC 474 Project: A Reinforcement-Learning Agent to Tackle the Game 2048 ? - ? <NAME> - 20053254 ? - ? ? - ? Trained with Python 3.8.6 + Tensorflow 2.3.0 + CUDA 10.1 + cuDNN 7.6 ''' ###############...
import argparse import configparser import json import logging import re import sched import signal import sys import time from collections import OrderedDict from elasticsearch import Elasticsearch from elasticsearch.exceptions import ConnectionTimeout from functools import partial from jog import JogFormatter from p...
import json import re from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from django.utils import timezone from rest_framework import serializers from .models import (PluginMeta, PluginMetaStar, PluginMetaCollaborator, Plugin, PluginParameter, TYPES...