text
stringlengths
8.04k
46.5k
"""Certbot command line argument & config processing.""" # pylint: disable=too-many-lines import argparse import logging import logging.handlers import sys from typing import Optional import certbot from certbot._internal import constants from certbot._internal.cli.cli_constants import ARGPARSE_PARAMS_TO_REMOVE from c...
# -*- coding: utf-8 -*- import codecs from itertools import takewhile from parglare import Parser from parglare import termui as t from .parser import SHIFT, REDUCE, ACCEPT, pos_to_line_col, Token from .common import replace_newlines as _, position_context from .export import dot_escape from .termui import prints, h_pr...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function import traceback from math import pi, exp, atan, log, tan, sqrt import sys import os import json import threading from ast import literal_eval from collections import OrderedDict from asciimatics.event ...
#!/usr/bin/env python # Copyright 2007 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...
""" The CanDIG data model. Defines all the methods required to translate data in existing formats into GA4GH protocol types. """ import base64 import collections import glob import json import os import difflib import candig.server.exceptions as exceptions import candig.schemas.protocol as protocol from binascii im...
# Automatically aligns/registers one model/dense point cloud to another one. # # This is useful for alignment of two independently photogrammetry-reconstructed models/dense point clouds, or two LIDAR clouds with good overlap. # # Also this should work in case of registration between LIDAR points clouds and photogrammet...
# -*- coding: utf-8 -*- # # Copyright 2020 Google LLC. 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 requir...
# (C) Datadog, Inc. 2010-2017 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) from __future__ import unicode_literals import time import pytest import mock from mock import MagicMock from pyVmomi import vim from datadog_checks.vsphere import VSphereCheck from datadog_checks.vsphere.errors ...
import numpy as np from scipy.integrate import simps from scipy.optimize import brute from time import time import holoviews as hv import matplotlib.pyplot as plt import pandas as pd from uncertainties import unumpy as unp from types import SimpleNamespace from copy import deepcopy twopi = np.pi * 2 def By_surface(...
from itertools import permutations from sympy.core.compatibility import range from sympy.core.expr import unchanged from sympy.core.numbers import Integer from sympy.core.relational import Eq from sympy.core.symbol import Symbol from sympy.core.singleton import S from sympy.combinatorics.permutations import \ Perm...
# -*- coding: utf-8 -*- """ Created on Fri May 24 15:17:13 2019 @author: DaniJ """ ''' It is like the four_layer_model_2try_withFixSpeciesOption_Scaling.py, but with two surfaces. There is not Poisson-Boltzman interaction between the two surfaces. ''' import numpy as np from scipy import linalg def four_layer_two_su...
""" Yet another Python implementation of ROUGE. """ import collections import itertools import math import logging logging.basicConfig(level=logging.INFO) __all__ = [ "RougeScore", "rouge_n_sentence_level", "rouge_l_sentence_level", "rouge_l_summary_level", "rouge_n_summary_level", "rouge_w_s...
#!/usr/bin/env python """ pyOpt_optimizer Holds the Python Design Optimization Classes (base and inherited). Copyright (c) 2008-2013 by pyOpt Developers All rights reserved. Revision: 1.1 $Date: 08/05/2008 21:00$ Developers: ----------- - Dr. <NAME> (GKK) """ from __future__ import print_function # ===============...
# Copyright (c) 2009-2011, 2013-2014 LOGILAB S.A. (Paris, FRANCE) <<EMAIL>> # Copyright (c) 2010 <NAME> <<EMAIL>> # Copyright (c) 2013-2016, 2018-2020 <NAME> <<EMAIL>> # Copyright (c) 2013-2014 Google, Inc. # Copyright (c) 2015-2016 Ceridwen <<EMAIL>> # Copyright (c) 2016 <NAME> <<EMAIL>> # Copyright (c) 2016 <NAME> <<...
#!/usr/bin/env python3 # # Copyright 2020 MongoDB Inc. # # 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, m...
""" Author: <NAME> Date : 2009 Copyright (c) 2009 HHMI. Free downloads and distribution are allowed for any non-profit research and educational purposes as long as proper credit is given to the author. All other rights reserved. """ from __future__ import print_function from __future__ import absolute_import from __f...
# Copyright 2018 The Meson development team # 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 ...
''' Created on Oct 14, 2013 @author: Steven This module contains numerous functions for fitting HOD models to correlation function data. It uses MCMC techniques to do so. ''' #=============================================================================== # IMPORTS #===================================================...
from utils.readConfig import ReadConfig from utils.mail import Mail from utils.db import Database from utils.convert import strTimeTotimeStamp import datetime import xlwt import pandas as pd import codecs localConfig = ReadConfig() def sheet_color(color): """set color and set center""" #0 = Black, 1 = White,...
# -*- coding: utf-8 -*- """ Processers @author: hongyuan """ import torch import numpy as np def sampleForIntegral(input, sampling=1, device=None): r""" sampling dtimes in each interval given other tensors this function only deals with particles of the same seq so their duration is the same, but le...
from __future__ import absolute_import, division, print_function import logging import os import time import json import base64 import numpy as np import torch from transformers import BertTokenizer from torch.utils.data import Dataset from ..utils.task_utils import (_truncate_seq_pair, output_modes, processors) from...
"""Utility functions for Gaussian Processes. """ import os.path import numpy as np import gpytorch import torch import matplotlib.pyplot as plt import casadi as ca from copy import deepcopy from sklearn import preprocessing from safe_control_gym.utils.utils import mkdirs def covSEard(x, z, ...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import functools import numpy as np from hypothesis import assume, given import hypothesis.strategies as st from caffe2.proto import caffe2_pb2 from caffe2.python import brew, core, workspa...
#!/usr/bin/env python3 # Copyright 2021 The BladeDISC 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 require...
# ------------------------------------------------------------------------- # # Part of the CodeChecker project, under the Apache License v2.0 with # LLVM Exceptions. See LICENSE for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # # ---------------------------------------------------...
# # Copyright 2017-2021 European Centre for Medium-Range Weather Forecasts (ECMWF). # # 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...
import itertools as it from colour import Color from manimlib.constants import * from manimlib.mobject.mobject import Mobject from manimlib.mobject.three_d_utils import get_3d_vmob_gradient_start_and_end_points from manimlib.utils.bezier import bezier from manimlib.utils.bezier import get_smooth_handle_points from ma...
# Copyright 2019 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agre...
#!/usr/bin/python ############################################################################# #Package: stamp #Updated by <NAME> #Usage: #generate mtDNA alignments for whole-genome sequencing data # ############################################################################## from argparse import ArgumentP...
import functools from pathlib import Path from typing import Sequence, Tuple, Union import PIL import numpy import six import tensorflow from PIL import Image, ImageColor, ImageDraw, ImageFont from attr import dataclass from matplotlib import pyplot from typing import Sequence, Tuple, Union from warg.mixins.dict_mix...
# Lint as: python3 # Copyright 2019 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 agr...
# -*- coding: utf-8 -*- u"""Warp VND/WARP execution template. :copyright: Copyright (c) 2017 RadiaSoft LLC. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function from pykern import pkcollections from pykern import pkio from...
# Pyrogram - Telegram MTProto API Client Library for Python # Copyright (C) 2017-2018 <NAME> <https://github.com/delivrance> # # This file is part of Pyrogram. # # Pyrogram is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free So...
#!/usr/bin/python # (c) 2012, <NAME> <<EMAIL>> # Sponsored by Four Kitchens http://fourkitchens.com. # 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 = {'metadata_versio...
#!/usr/bin/env python # # Copyright 2017-2018 Amazon.com, Inc. and its affiliates. All Rights Reserved. # # Licensed under the MIT License. See the LICENSE accompanying this file # for the specific language governing permissions and limitations under # the License. # # # Copy this script to /sbin/mount.efs and make sur...
from platform import python_version from itertools import zip_longest import itertools import math from typing import final print('Hello World!') num = int(input()) a, b = 1, 2 # a = 1, b = 2 def numbers(): return 1, 2, 3, 4, 5 a, b, c, d, e = numbers() print(3 + 2) # 5 += print(3 - 2) # 1 -= print(3 * 2) #...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ <NAME>, <NAME>, <NAME> Sandia National Laboratories December 12, 2019 Sudoku Board and Cell data structures. """ # import json import uuid import config_data import copy import logging logger = logging.getLogger(__name__) class Cell(): """ A single cell on ...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
from tkinter import * from tkinter import ttk from client import * from api import * import _thread as thread from tabela import Table from raceTable import RaceTable #As funções abaixo são responsáveis por transitar entre as telas, sendo acionadas pelos #botões "Voltar" e "Avançar" def rfid_carros(): screen1.pack...
#!/usr/bin/env python3 # # requirements.py """ Utilities for working with :pep:`508` requirements. """ # # Copyright © 2020-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...
# -*- coding:utf-8 -*- # # Copyright 2018, Couchbase, 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 re...
import os import json import tempfile import logging import contextlib from maya import cmds from . import capsule, xgen from .vendor import capture from .. import utils log = logging.getLogger(__name__) def export_fbx(out_path, selected=True): from pymel.core import mel as pymel try: pymel.FBXExp...
#!/usr/bin/env python """ ..__main__.py ~~~~~~~~~~~~~~~~ Picasso command line interface :author: <NAME>, 2015 :copyright: Copyright (c) 2015 Jungmann Lab, Max Planck Institute of Biochemistry """ import os.path def _average(args): from glob import glob from .io import load_locs, NoMetadata...
# Copyright(c) 2019-2021, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the fo...
import sys import re import numpy as np import pandas as pd from scipy.stats import pearsonr from sklearn.preprocessing import scale import pytest from nibabel import Nifti1Image from nilearn.maskers import NiftiMasker from nilearn.interfaces.fmriprep import load_confounds from nilearn.interfaces.fmriprep.load_confound...
# # Copyright (c) 2009-2016 <NAME> <<EMAIL>> # # See the file LICENSE.txt for your full rights. # """ This module performs two functions: 1. Adds weather-related extensions to the WeeWX type system. 2. Uses those extensions to augment packets and records with derived types. """ from __future__ import absolute_i...
# encoding: UTF-8 ''' 本文件中包含的是CTA模块的组合回测引擎,回测引擎的API和CTA引擎一致, 可以使用和实盘相同的代码进行回测。 华富资产 李来佳 ''' from __future__ import division import sys import os import gc import pandas as pd import numpy as np import traceback import random import bz2 import pickle from datetime import datetime, timedelta from t...
# -*- coding: utf-8 -*- """ implementation of the gamut mapping described in Report ITU-R BT.2407 Annex2. """ # import standard libraries import os # import third-party libraries import numpy as np from multiprocessing import Pool, cpu_count, Array from colour import RGB_to_XYZ, XYZ_to_Lab, Lab_to_XYZ, XYZ_to_RGB,\ ...
#!/usr/bin/env python3 """ Combinatorial species. See chapter 4 here: COMBINATORIAL SPECIES AND LABELLED STRUCTURES <NAME> https://www.cis.upenn.edu/~sweirich/papers/yorgey-thesis.pdf """ #from types import GeneratorType import string letters = list(string.ascii_lowercase) from bruhat.util import fact...
# read snapshot and obtain multiple systems import collections from scipy import spatial as sp from .base import * from .bse import * G_MSUN_PC_MYR=0.00449830997959438 # Msun, pc, myr G_HENON=1 # Henon unit class PeTarDataHeader(): """ Petar snapshot data header members: fid: file id n: number...
from __future__ import annotations from app.utilities.utils import clamp from enum import Enum import logging from typing import Callable, Dict, List, Optional, Tuple, Union from app.constants import WINHEIGHT, WINWIDTH from app.engine import engine from app.utilities.typing import Color4 from PIL import Image from P...
# Copyright 2019 The TensorTrade 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...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # ~~aliGater~~ # (semi)automated gating software # # /^^\ # /^^\_______/0 \_ # ( `~+++,,_________,,++~^^^^^^^ #..V^V^V^V^V^V^\................................. # # # Parsing flow data with fcsparser from Eugene Yurtsevs FlowCytometryTo...
# # Copyright (c) 2006-2010 Canonical # # Written by <NAME> <<EMAIL>> # # This file is part of Storm Object Relational Mapper. # # Storm is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2....
#!/usr/bin/python # -*- coding: utf-8 -*- """ Author: <NAME> Email: <EMAIL> """ import logging import os from math import log import cv2 import numpy as np import numpy.linalg as la from scipy.spatial import distance as spd import pywt import Tyf import tifffile as tiff class Image(object): """ Image class ...
''' create_geonames_tsv.py ---------------------- This script formats the open GeoNames database (as well as its accompanying postal codes data set) into a schema'd tab-separated value file. It generates a C header which uses an enum for the field names. This way if new fields are added or there's a typo, etc. the er...
from .astf_general_test import CASTFGeneral_Test, CTRexScenario import os, sys from misc_methods import run_command from trex.astf.api import * import time from trex.stl.trex_stl_packet_builder_scapy import ip2int, int2ip import re import pprint import random import string import glob from nose.tools import assert_rais...
#!/usr/bin/env python3 ''' srcdiff.py Copyright 2012-2020 Codinuum Software Lab <https://codinuum.com> 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/licen...
# Author: <NAME> <<EMAIL>> # # License: MIT """Computes topic stability for different topic model parametrization based on the topic terms. This model allows the fitting and anaylsis of multiple topic models in a very easy to use form targeted at anybody who needs topic models but is no expert in machine learning. T...
# Classes to deal with MK status updates. # # The MK status is split into 5 different subsections # * config # * interpreter # * io # * motion # * task # One needs to subscribe to each one of those individually and MK sends # separate update messages for each. I'm not sure about the intent behind # the split ...
# Copyright 2020 Curtin University # # 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 writi...
# coding = utf-8 # @Time : 2020-01-31 22:18 # @Author : <NAME> # @Describe :本文件使用wxpython编写来一个gui,用于配置general项目参数和展示训练过程 import wx import time import threading from client import client import gym import matplotlib from proxy import Proxy import configparser matplotlib.use("macOSX") import os wildcard = u"Python 文...
# Licensed under MIT License. # See LICENSE in the project root for license information. """Several sorting implementation. Assume all input lists to be non-nested (ie flat).""" import random from typing import Callable, List, Optional, Sequence, Tuple from tests import jovian ######################################...
# -*- coding: utf-8 -*- """ Python File Template Built on the source code of https://github.com/memray/seq2seq-keyphrase-pytorch and https://github.com/ChenRocks/fast_abs_rl """ import inspect import json import re import numpy as np import os import logging from os.path import join from cytoolz import curry, concat, c...
#!/usr/env/python ## Import General Tools import sys import os import argparse import logging from matplotlib import pyplot as plt from scipy import ndimage import numpy as np from astropy.io import fits from astropy import units as u from astropy.modeling import models, fitting, Fittable2DModel, Parameter from ast...
#!/usr/bin/env python3 import os import pickle as pkl import numpy as np import pandas as pd from collections import defaultdict import math import random from sklearn.model_selection import train_test_split from sklearn.preprocessing import MinMaxScaler import gc import sys from camaptools.GenomeData import AATable,...
import hashlib import json import logging import urllib.parse from collections import OrderedDict import requests from django import forms from django.conf import settings from django.contrib import messages from django.core import signing from django.http import HttpRequest from django.template.loader import get_temp...
from aws_schema import SchemaValidator from aws_schema.nested_dict_helper import find_path_values_in_dict from ._number_types_in_objects import ( object_with_float_to_decimal, object_with_decimal_to_float ) from ._schema import DynamoDBValidator from .exceptions import ( ConditionalCheckFailedException, ...
from __future__ import division import torch import torch.nn as nn from torch.autograd import Variable from torch import optim import torch.nn.functional as F import os import sys import time import numpy as np import pandas as pd import argparse import json from collections import defaultdict, Counter from argparse ...
# Copyright DataStax, 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 writing, softwa...
#BEGIN_LEGAL # #Copyright (c) 2019 Intel Corporation # # 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 ...
"""This module provides functions used to write HDF5 files in the new file format.""" # ----------------------------------------------------------------------------- # Imports # ----------------------------------------------------------------------------- import json import os import warnings from collections import O...
def p(*c): print(*c) a=1 print(a) print(id(a)) b=1 print(b) print(id(b)) print(type('asd')) print(len('whueb我')) print('pyt'+'hon') print('why'*7) print('m"j') text = 'asdf' print(text.split('s')) print(','.join(['asd','fgh'])) ss = 'assssdfgj' print(ss[2:4]) a = [1,2,'a','s'] print(a) print(type(1)) print(typ...
import argparse import logging import os import sys import numpy as np import torch import torchvision from tqdm import tqdm from data.modelnet_loader_torch import ModelNetCls from models import pcrnet from src import ChamferDistance, FPSSampler, RandomSampler, SampleNet from src import sputils from src.pctransforms ...
import logging import collections from typing import Dict, List, Optional, Union, Tuple, Any, Callable import numpy from dataclasses import dataclass from cephlib.units import b2ssize, b2ssize_10 from . import html from .cluster_classes import CephInfo, OSDStatus, DiskType, CephVersion, BlueStoreInfo, FileStoreInfo,...
import os from pathlib import Path from abc import abstractmethod from typing import Type, Dict, Sequence, List, Callable, Tuple import torch import numpy as np from tqdm import tqdm from loguru import logger from torchvision.models.detection.rpn import AnchorGenerator from nndet.utils.info import SuppressPrint with...
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- """ BitBake Utility Functions """ # Copyright (C) 2004 <NAME> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Sof...
import asyncio import datetime import re import discord from discord import Forbidden from discord.ext import commands from discord.http import Route from utils import checks MUTED_ROLE = "316134780976758786" MESSAGE_LOG_CHANNEL_ID = "468251139691773972" MOD_LOG_CHANNEL_ID = "283404995951460363" class Moderation: ...
# -*- coding: utf-8 -*- """ pdt_locales All of the included locale classes shipped with pdt. """ import datetime try: import PyICU as pyicu except: pyicu = None def lcase(x): return x.lower() class pdtLocale_base(object): """ default values for Locales """ locale_keys = set([ 'M...
import os import sys import numpy as np import torch as th from torch import nn from collections import defaultdict from latent_dialog.enc2dec.base_modules import summary from latent_dialog.enc2dec.decoders import TEACH_FORCE, GEN, DecoderRNN from datetime import datetime from latent_dialog.utils import get_detokenize ...
#!/usr/bin/python # -*- coding: utf-8 -*- ##################################################################################################### # Data ingestion script for the TBFY Knowledge Graph (http://data.tbfy.eu/) # # This file contains a script that reconciles award suppliers with companies using the OpenCorpo...
#!/usr/bin/env python3 # Copyright 2020 The Johns Hopkins University (author: <NAME>, <NAME>) import torch import torch.nn as nn import torch.nn.init as init from torch.nn import functional as F from torch.nn import Module from torch.nn.parameter import Parameter from torch.nn import ModuleList from torch.nn.init imp...
#!/usr/bin/env python """APQUICK.PY - APOGEE Quick reduction of on-the-mountain data. This performs a very quick reduction of an APOGEE exposure to give feedback about the S/N. This program can be run on an exposure in progress or on that has already finished because it uses the apRaw files (individual reads). Her...
#!/usr/bin/env python # coding: utf-8 # #keyence in single field zstack multicolor capture mode # #yields an overlay and 4 single channel tif files (CH1,CH2,CH3,CH4 AS BGRW) # #for each z position # #example: # #B-DAPI G-PCAD R-RFP W-A6_20X (good exposure)_Z001_CH1.tif # #B-DAPI G-PCAD R-RFP W-A6_20X (good exposure)...
from tkinter.filedialog import * from tkinter import * from tkinter import ttk from tkinter.ttk import* import tkinter as tk import tkinter.ttk as ttk from ttkthemes import ThemedStyle import witkets as wtk from tkinter import filedialog from tkinter import messagebox import os import tempfile from PIL impo...
""" Module containing utilities for layer inputs """ import itertools import numpy as np import tensorflow as tf def get_reference_grid(grid_size: (tuple, list)) -> tf.Tensor: """ Generate a 3D grid with given size. Reference: - volshape_to_meshgrid of neuron https://github.com/adalca/neurite...
# The MIT License (MIT) # # Copyright (c) 2020 <NAME> for Entalon LLC # # 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, ...
from __future__ import annotations from .tools import EMPTY_CHECK from .slash.types import BaseCommand, ContextCommand, MessageCommand, SlashCommand, SlashSubcommand, UserCommand from .receive import ButtonInteraction, SelectInteraction from .enums import ComponentType from .tools import deprecated import discord fr...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ :Autors: <NAME> & <NAME> Module encapsulating all the classes required to run a simulation. """ import sys sys.path.append("../solver") import numpy as np import math import random as rand from weatherTLKT import Weather import matplotlib.pyplot as plt from mpl_to...
#!/usr/bin/env python3 # # msoffice document decryption routines # # this is designed to meet a very specific use case for me # this isn't meant to crack documents -- see hashcat for that # import base64 import collections import functools import hashlib import logging import olefile import os, os.path import re impor...
#!/usr/bin/env python3 ''' Wrapper for phase unwrapping ''' import pathlib import os import time import h5py import journal import numpy as np from osgeo import gdal import isce3 import isce3.unwrap.snaphu as snaphu from nisar.workflows import h5_prep from nisar.products.readers import SLC from nisar.workflows.unwr...
''' Resource manager Created on Nov 23, 2017 @author: riaps ''' from cgroupspy import trees import os import stat import time import signal import subprocess import psutil import threading import logging import random from riaps.consts.defs import * from riaps.run.exc import * from riaps.utils.sudo import riaps_sud...
# encoding: utf-8 ''' Created on Nov 26, 2015 @author: tal Based in part on: Learn math - https://github.com/fchollet/keras/blob/master/examples/addition_rnn.py See https://medium.com/@majortal/deep-spelling-9ffef96a24f6#.2c9pu8nlm ''' from __future__ import print_function, division, unicode_literals import os imp...
#!/usr/bin/python # 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 DOCUMENTATION = r''' module: policyset short_description: Create/Update/Delete PolicySet, Policies, PlacementRule, an...
# MantaFlow fluid solver framework # Copyright 2011 <NAME>, <NAME> # # @author: <NAME> http://marielenaeckert.com/ # # # Reconstruction of both density and velocity volume based on input images # # 0. make sure not to use more than ~4 threads (export OMP_NUM_THREADS=4) # 1. adapt variable path, pathCalib, and captureF...
import math, os, json, torch, datetime, random, copy, shutil, torchvision, tqdm import argparse, yaml import torch.nn as nn import torch.optim as Optim import torch.nn.functional as F import torch.utils.data as Data import numpy as np from collections import namedtuple from tkinter import _flatten import torch.distrib...
import math import torch import torch.nn as nn from torch.nn.init import xavier_uniform_ import torch.nn.functional as F class MultiHeadedAttention(nn.Module): """ Multi-Head Attention module from "Attention is All You Need" :cite:`DBLP:journals/corr/VaswaniSPUJGKP17`. Similar to standard `dot` attention...
import xmltodict import logging import sys import os import json import pandas as pd import numpy as np import geopandas as gpd import shapely.speedups # sys.path.append("/home/elkin/Projects/condaPackages/pywaterml") import pywaterml.waterML as pwml from shapely.geometry import Point, Polygon from django.shortcuts...
# Name: Extract_attenuation_values_from_scope_FFT_image.py # Description: This program was made to get all the data points of the graph with # the most possible accurate values from the following frequency # response antenation measurement PNG graph image. # The output of this pro...
import pytest import unittest.mock as mock import open_cp.sepp_base as sepp_base import open_cp.data import open_cp.predictors import numpy as np import datetime class OurModel(sepp_base.ModelBase): def background(self, points): assert len(points.shape) == 2 assert points.shape[0] == 3 ret...