text
stringlengths
6.04k
39.5k
#Import Python libraries import sys import shap from matplotlib import pyplot as plt from sklearn.model_selection import GridSearchCV, StratifiedKFold from sklearn.svm import SVC import numpy as np from sklearn.inspection import permutation_importance from sklearn.metrics import precision_score, accuracy_score,...
#!/usr/bin/env python from __future__ import print_function """ oleobj.py oleobj is a Python script and module to parse OLE objects and files stored into various file formats such as RTF or MS Office documents (e.g. Word, Excel). Author: <NAME> - http://www.decalage.info License: BSD, see source code or documentation o...
""" This takes a set of observed mortality rates, and fits them to find the total mortality rate. It sets up a Dismod-AT model that has only nonzero omega and treats the mortality rate observations as mtother. """ import itertools as it import logging from timeit import default_timer as timer import db_queries import ...
# -*- coding: utf-8 -*- """ Created on Sun Jun 10 15:13:29 2018 @author: Branson """ import BATrader as ba from collections import defaultdict import pandas as pd import numpy as np import threading # ============================================================================= # Good implementation of products ...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
import csv from django.contrib import messages from django.contrib.auth.decorators import login_required from django.forms.models import model_to_dict from django.shortcuts import render, get_object_or_404 from django.utils.translation import ugettext as _ from django.http import JsonResponse, HttpResponseRedirect, Ht...
# Copyright (c) 2019 <NAME>. # Cura is released under the terms of the LGPLv3 or higher. import numpy from string import Formatter from enum import IntEnum import time from typing import Any, cast, Dict, List, Optional, Set import re import Arcus #For typing. from UM.Job import Job from UM.Logger import Logger from U...
#!/usr/bin/env python # coding:utf-8 """read_json""" import argparse import logging import json import requests import re import xlrd import xlwt # def set_argparse(): # """Set the args&argv for command line mode""" # parser = argparse.ArgumentParser() # parser.add_argument("file", type=str, default="", help="i...
import copy from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union import warnings import torch from torch.fx import GraphModule from torch.fx._symbolic_trace import Tracer from torch.fx.node import Target, Node, Argument from torch.nn.intrinsic import _FusedModule from .fx import fuse # noqa: F401...
import numpy as np import tensorflow as tf from sklearn.metrics import confusion_matrix def channel_standardization(image): ''' Stanadrdization of image channel wise => Standard score Parameters: image: Input image Return: Standardized image, s.t. (pixel_value -) ''' mean_val = ...
""" ori_analys.py This module contains functions to run analyses of ROI orientation selectivity in the data generated by the Allen Institute OpenScope experiments for the Credit Assignment Project Authors: <NAME> Date: October, 2018 Note: this code uses python 3.7. """ from joblib import Parallel, delayed impor...
""" LSTM point process model. @author: manifold """ from typing import Tuple, List import torch from torch import Tensor from torch import nn from torch.nn.utils.rnn import PackedSequence from models.base import SeqGenerator, predict_from_hidden class HawkesLSTMCell(nn.Module): def __init__(self, input_dim: in...
#!/usr/bin/env python3 # 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 "Lic...
""" PCBOT. The main module which contains the Client. This is the module that would be executed. """ import asyncio import inspect import logging import sys import traceback from argparse import ArgumentParser from copy import copy from datetime import datetime import discord import plugins from pcbot import utils,...
#!/usr/bin/env python # # __init__.py """ Create wordclouds from git repositories, directories and source files. """ # # Copyright (c) 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"), t...
import sys import random # Vapor Trail Project by <NAME> # Start by defining the data classes class Aid: '''Class aid describes the aid stations along the route, with altitude (in ft) and services (a string) described. ''' def __init__(self, name, alt, services, phone): self.name = name ...
from __future__ import absolute_import, unicode_literals import operator import os import re from abc import ABCMeta, abstractmethod from copy import deepcopy, copy from itertools import chain, starmap from operator import itemgetter from os import path from typing import Text, List, Type, Optional, Tuple, Dict from ...
""" A process that manages tracking and running update commands for the AL services. """ from __future__ import annotations import os import uuid import sched import time from typing import Any import docker from assemblyline.common import isotime from kubernetes.client import V1Job, V1ObjectMeta, V1JobSpec, V1PodTe...
from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import numpy as np from scipy.constants import epsilon_0 from ipywidgets import IntSlider, FloatSlider, FloatText, ToggleButtons import matplotlib.pyplot as plt from matplotlib.colors import LogNorm f...
""" Testing a point to point path over two DEM tiles. Written by <NAME> and <NAME> May 2020 """ import configparser import os import csv import math import numpy as np from functools import partial from collections import OrderedDict import fiona from fiona.crs import from_epsg from pyproj import Transformer from s...
import os import sys import time import linecache from bisect import insort from collections import defaultdict, namedtuple def find_utr_regions(trans_id, trans_sense, trans_exons, trans_cds): if not trans_cds: trans_5utr, trans_3utr, start_codon, stop_codon = [], [], tuple(), tuple() return tran...
import time from dataclasses import dataclass from typing import Any, Optional, TYPE_CHECKING from .const import BUTTON, BUTTON_BOTH, UNKNOWN if TYPE_CHECKING: from ..device import XDevice ################################################################################ # Base (global) converters ###############...
""" Module containing classes to perform analysis of the tree search results. """ from __future__ import annotations from collections import defaultdict from typing import TYPE_CHECKING import numpy as np from deprecated import deprecated from route_distances.clustering import ClusteringHelper from route_distances.rou...
# -*- coding: utf-8 -*- """ @author: salimt Project for Week 4 of "Python Data Analysis". Processing CSV files with baseball stastics. Be sure to read the project description page for further information about the expected behavior of the program. """ import csv ## ## Provided code from Week 3 Project ## def read...
import math import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable def mask_logits(target, mask): mask = mask.type(torch.float32) return target * mask + (1 - mask) * (-1e30) ''' Modified based on BangLiu's and Heliumsea's implementations ...
#! python # -*- coding: utf-8 -*- # $Id: et.py 146 2006-11-07 07:44:29Z sgrayban $ g_strtable = -1 language_code = __name__.split('.')[-1] def add(label, txt): global g_strtable g_strtable.AddText(language_code, label, txt) def AddStrings(strtable): global g_strtable g_strtable = strtable ######...
import torch import torch.nn as nn import torch.nn.functional as F from seq2seq import utils from seq2seq.models import Seq2SeqModel, Seq2SeqEncoder, Seq2SeqDecoder from seq2seq.models import register_model, register_model_architecture @register_model('lstm') class LSTMModel(Seq2SeqModel): """ Defines the sequen...
# ================================================================================== # Baseline Model # date : 2019/05/05 # reference : https://www.kaggle.com/mhiro2/simple-2d-cnn-classifier-with-pytorch # comment : [change point] epoch {80 > 400} # ======================================================================...
#General from datetime import datetime from collections import Counter import pandas as pd import numpy as np import matplotlib.pyplot as plt from matplotlib import lines import seaborn as sns from seaborn import displot from seaborn import lineplot import statsmodels.api as sm import talib as ta from statsmodels.st...
# -*- coding: utf-8 -*- """ Sahana Eden Climate Model @copyright: 2011-2021 (c) Sahana Software Foundation @license: MIT 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 witho...
# -------------------------------------------------------- # Deformable Convolutional Networks # Copyright (c) 2017 Microsoft # Licensed under The Apache-2.0 License [see LICENSE for details] # Written by <NAME>, <NAME> # -------------------------------------------------------- import _init_paths import math import ar...
# -*- coding: utf-8 -*- """ Created on Sun Aug 1 15:07:30 2021 @author: <NAME> 可以修改217行前后的beta变量观察光源速度不同时的情况 """ import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation import warnings def sr_v_inv_trans2(u): ''' 2-d special relativity inverse velocity transforamtion ...
# Copyright (c) 2020 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 app...
from LearningAgent import LearningAgent from Action import Action from Environment import Environment from Path import Path from ReplayBuffer import SimpleReplayBuffer, PrioritizedReplayBuffer from Experience import Experience from CentralAgent import CentralAgent from Request import Request from Experience import Expe...
#!/usr/bin/env python2 # Original: I, <NAME>, hereby place this file # into the public domain. # TODO The 47 registers of the VIC are mapped in at $d000. Due to the # incomplete address decoding, they are repeated every 64 bytes in the # area $d000-$d3ff. # VIC II video chip implementation . https://www.c6...
from app.common import definitions, values from app.common.utilities import error_exit from app.tools import identifier from app.tools import parallel, emitter, finder, extractor, writer, logger from app.ast import ast_generator import sys def evolve_definitions(missing_definition_list): logger.trace(__name__ + ...
""" created by: <NAME> Modified codes from http://pytorch.org/tutorials/beginner/data_loading_tutorial.html https://github.com/pytorch/examples/tree/master/imagenet """ from __future__ import print_function import os import argparse import numpy as np import pandas as pd import time import shutil # from iterto...
# -*- coding: utf-8 -*- # # Copyright 2017-2021 AVSystem <<EMAIL>> # # 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 ap...
# Copyright © 2020 Red Hat 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 writin...
"""show_mcast.py IOSXE parsers for the following show commands: * show ip mroute * show ipv6 mroute * show ip mroute vrf <vrf_name> * show ipv6 mroute vrf <vrf_name> * show ip mroute static * show ip mroute vrf <vrf_name> static * show ip multicast * show ip multicast vrf <vrf_name> "...
from __future__ import absolute_import # import aligned # from aligned.local_dist import * # from aligned.local_dist import * # import aligned import torch from torch import nn """ Shorthands for loss: - CrossEntropyLabelSmooth: xent - TripletLoss: htri - CenterLoss: cent """ __all__ = ['DeepSupervision', 'CrossEntro...
""" CursorWrapper (like django.db.backends.utils) """ import decimal import logging import warnings from itertools import islice from typing import Any, Callable, Iterable, Iterator, List, Tuple, TypeVar, Union, overload from django.db import models, NotSupportedError from django.db.models.sql import subqueries, Query...
import numpy as np from scipy.ndimage import map_coordinates from scipy.fftpack import fftn, fftshift, ifftshift from dipy.reconst.odf import OdfModel, OdfFit, gfa from dipy.reconst.cache import Cache from dipy.reconst.multi_voxel import multi_voxel_fit from dipy.reconst.recspeed import local_maxima, remove_similar_ver...
# https://deeplearningcourses.com/c/natural-language-processing-with-deep-learning-in-python # https://udemy.com/natural-language-processing-with-deep-learning-in-python from __future__ import print_function, division from builtins import range # Note: you may need to update your version of future # sudo pip install -U...
# # 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 the ...
import os import re from operator import itemgetter, sub from sys import argv import matplotlib.pyplot as plt import numpy as np from tqdm import tqdm from matplotlib.ticker import MaxNLocator from matplotlib.widgets import Slider, Button from scipy.spatial import distance def get_system(file): """...
import torch import copy import time import numpy as np class ContrastiveLoss: def __init__(self, dim, device=torch.device('cpu')): self.device = device # self.W = torch.rand((dim, dim), requires_grad=True, device=device) self.W = torch.eye(dim, requires_grad=True, device=device) se...
# -*- coding: utf-8 -*- import os import re import copy import logging import mathutils import mmd_tools_local.core.pmx.importer as import_pmx import mmd_tools_local.core.pmd as pmd import mmd_tools_local.core.pmx as pmx from math import radians class PMDImporter: def execute(self, **args): args['pmx'...
""" decoding_analys.py This script contains functions for decoding analysis. Authors: <NAME> Date: January, 2021 Note: this code uses python 3.7. """ import itertools import logging import numpy as np import pandas as pd import scipy.stats as scist from util import logger_util, gen_util, logreg_util, math_util, ...
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # """ Tests for EditorSplitter class in editor.py """ # Standard library imports try: from unittest.mock import Mock import pathlib except ImportError: from mock import Mock # Python 2 im...
import argparse import logging import sys import socket from typing import ByteString import select import time import re from urllib import request import scapy import getmac from getmac import get_mac_address from scapy.all import * def getArgs(): # Parse command-line arguments argsParser = argparse.Argument...
import numpy as np import os import pickle import pytest import re import time import shutil from copy import deepcopy from numpy import allclose, isclose from flare import struc, env, gp from flare.parameters import Parameters from flare.mgp import MappedGaussianProcess from flare.lammps import lammps_calculator fro...
# uncompyle6 version 3.7.4 # Python bytecode 3.5 (3350) # Decompiled from: Python 3.8.5 (default, Jan 27 2021, 15:41:15) # [GCC 9.3.0] # Embedded file name: /home/docker/CSN/bin/gpu_ccsn.py # Compiled at: 2021-03-31 16:15:26 # Size of source mod 2**32: 19699 bytes """ python version of csn algorithm https://github.com...
# !/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Oct 31 16:23:13 2018 @author: samschott """ __version__ = "0.3.2" __author__ = "<NAME>" __url__ = "https://github.com/SamSchott/maestral" # system imports import sys import os import os.path as osp import shutil import time import functools from thre...
# cluster_view.py # # MIT License # # Copyright (c) 2020 <NAME> <<EMAIL>> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to u...
import logging from typing import List, Dict, Union, Tuple, Callable from collections import defaultdict from pathlib import Path import torch from torch import nn from torch.utils.data import TensorDataset, DataLoader import datasets from datasets import ClassLabel from sklearn.metrics import accuracy_score, precisio...
#!/usr/bin/python3 # ____ _ _ ____ _ _ _ # / ___|___ _ __ ___ _ __ ___ _ _ _ __ (_) |_ _ _ / ___|___ _ __ | |_ _ __ ___ | | | ___ _ __ # | | / _ \| '_ ` _ \| '_ ` _ \| | | | '_ \| | __| | | | | / _ \| '_ \| __| '__/ _ \| | |...
"""Time series embedding.""" # License: Apache 2.0 import numpy as np from sklearn.base import BaseEstimator from ..base import TransformerResamplerMixin from sklearn.metrics import mutual_info_score from sklearn.neighbors import NearestNeighbors from joblib import Parallel, delayed from sklearn.utils.validation impor...
#!/usr/bin/env python ''' Implement openssl compatible AES-256 CBC mode encryption/decryption. This module provides encrypt() and decrypt() functions that are compatible with the openssl algorithms. This is basically a python encoding of my C++ work on the Cipher class using the Crypto.Cipher.AES class. URL: http://...
# app/student/views.py from __future__ import print_function import re import os from werkzeug.utils import secure_filename from flask import render_template, request, flash, redirect, url_for, jsonify, session from flask_login import login_required, logout_user from zipfile import ZipFile, is_zipfile from shut...
import functools, math, struct, sys from struct import Struct from io import BytesIO from Catalog.Identifiers import PageId, FileId, TupleId from Catalog.Schema import DBSchema from Storage.Page import PageHeader, Page, PageTupleIterator class SlottedPageHeader(PageHeader): """ A slotted page header implement...
""" critic.base: <NAME> <<EMAIL>> Copyright 2020, <NAME> License: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0) Contents: """ from __future__ import annotations import dataclasses from typing import (Any, Callable, ClassVar, Dict, Hashable, Iterable, List, Mapping, MutableMapping, MutableSequence...
########################################################################## # # MRC FGU Computational Genomics Group # # $Id$ # # Copyright (C) 2009 <NAME> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Fre...
# ~~~ # 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. ...
## todo: ## - allow user to specify desired limit for NUMBER of events, ## and prune by duration to hit the limit ## - more gradient color rendering ## - option for gradient to represent heatmap values based on numeric data "labels" ## - todo: make "total" series optional (it tracks blip events) import numpy as...
#!/usr/bin/env python3 """ Trains Gaussian process emulators. When run as a script, allows retraining emulators, specifying the number of principal components, and other options (however it is not necessary to do this explicitly --- the emulators will be trained automatically when needed). Run ``python3 src/emulator....
__author__ = "<NAME>, <NAME>" __copyright__ = "Copyright 2017, University of Technology Graz" __credits__ = ["<NAME>", "<NAME>"] __license__ = "MIT" __version__ = "1.0.0" __maintainer__ = "<NAME>, <NAME>" import codecs import json import warnings import io import os import re from zipfile import ZipFile import pandas...
# -*- coding: utf-8 -*- """ NOTICE: This version of the repository API migrates its code to pygit2, which is a bit tricky to install but which provides a clean API to the git libraries. In the future, it will replace the old repository module that relies on git's command line interface. """ from __future__ import u...
# Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # Copyright 2019 The celery-dyrygent Authors. All rights reserved. import logging import random import time from datetime import ( timedelta, ) from celery_dyrygent.celery import ( entities, inspect, ) f...
import json import shutil import os import glob import string import pymsgbox import oead import random from PyQt5 import QtWidgets, QtGui from PyQt5.QtWidgets import QFileDialog, QApplication import rstb import re import sarc from randomizer_window import Ui_MainWindow basePath = "" updatePath = "" dlcPath = "" ...
""" The :mod:`fatf.utils.data.density` module implements data density estimators. """ # Author: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # License: new BSD import inspect import warnings from numbers import Number from typing import Callable, List, Optional, Union import numpy as np from fatf.exceptions import I...
import argparse from dataclasses import dataclass, field import itertools import multiprocessing from multiprocessing import Queue import os import queue import sys import threading import time from typing import ( Callable, Dict, Iterable, Iterator, List, Optional, Tuple, ) from .candidate...
# coding=utf-8 # Copyright 2022 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 toml import re import copy import io from urllib.parse import urlparse from Jumpscale import j JSBASE = j.baseclasses.object # Some links that needs to be skipped from verifying because the crawling is forbidden SKIPPED_LINKS = [ "t.me", "chat.grid.tf", "linkedin.com", "docs.grid.tf", "bt...
import matplotlib import matplotlib.pyplot as plt import ipywidgets as widgets import numpy as np import matplotlib.ticker from treatment import * import tkinter as tk from tkinter import filedialog from tkinter import ttk from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk class gl...
from matplotlib.colors import LinearSegmentedColormap from matplotlib.ticker import FuncFormatter from matplotlib import ticker from matplotlib import dates as _dates import numpy as np ### blue = np.array([0.,13.,120.])/255. orange = np.array([255.,102.,0.])/255. green = np.array([9.,84.,0.])/255. purple = np.array(...
from .interpolation import PolynomialInterpolation from .abstract import Point, Vector, Circle from .curves import Trajectory from pygame.locals import * from . import colors import numpy as np import pygame import pickle import cmath import math import cv2 import sys import os class Fourier: def transform(pts, ...
from autoslug import AutoSlugField from django.contrib.auth.models import User from django.contrib.postgres.fields import JSONField, ArrayField from django.db import models, transaction from django.db.models import Q from django.utils.functional import cached_property from django.utils.text import slugify from django.u...
############################################################################### # Project: Mort de Gana Bot # Authors: # - Ytturi # - gdalmau # Descr: Polling manager # Commands: # - Poll: Send a poll with a specified message. Usage: `/poll {message}` ####################################################################...
# # # from optparse import OptionParser from pykd import * IPv4 = 0x0008 ARP = 0x0608 IPv6 = 0xdd86 ICMP_PROTO = 0x01 UDP_PROTO = 0x11 TCP_PROTO = 0x06 NET_BUFFER_LIST = None MDL = None NET_BUFFER = None def getNdisTypesInfo(): ndis = module("ndis") global NET_BUFFER_LIST global MDL global NE...
import logging import vivisect import vivisect.exc as v_exc import vivisect.impemu.monitor as viv_monitor import vivisect.analysis.generic.codeblocks as viv_cb import envi import envi.archs.arm as e_arm from envi.archs.arm.regs import * from envi.archs.arm.const import * from vivisect.const import * logger = loggi...
""" PyCoreNet and LxBrNet classes that implement virtual networks using Linux Ethernet bridging and ebtables rules. """ import logging import os import threading import time from core import CoreCommandError from core import constants from core.coreobj import PyCoreNet from core.misc import utils from core.netns.vif ...
from collections import defaultdict from typing import List, Optional from dataclasses import dataclass, field import json, pandas, pytrec_eval, logging, os import matplotlib.pyplot as plt from pathlib import Path __all__ = ['CompareData', 'compute_qrels_df'] logger = logging.getLogger(__name__) DELTA = u'Δ' # Make ...
# 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...
import os import sys import random import threading import traceback import time import mailpile.util from mailpile.crypto.streamer import EncryptingStreamer from mailpile.i18n import gettext as _ from mailpile.i18n import ngettext as _n from mailpile.util import * NEW_POSTING_LIST = True GLOBAL_POSTING_LOCK = PLis...
#!/usr/bin/env python2 # -*- coding:utf8 -*- """ A simple Python 2.7+ / 3.4+ script to send a text message to a Free Mobile phone. - Warning: it only works in France to a French number, using the mobile operator Free Mobile. - Warning: some initial configuration is required before running this script (see the error me...
import copy import os import sys import unittest import random from _rtree import RTree true = True rtree_path = os.path.join(os.path.dirname(__file__), '../') sys.path.append(rtree_path) rtree = RTree def compare(x, y): if x < y: return -1 elif x > y: return 1 else: return 0 def sortedEqual(t, a, b, comp...
import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split from sklearn.metrics import r2_score, mean_squared_error import seaborn as sns from scipy import stats import math def clean_data(df): """ ...
import time import discord import psutil import os import asyncio import io import requests import dhooks import json import unicodedata import inspect import random from urllib.parse import quote from collections import Counter from dhooks import Webhook from discord.ext import commands from datetime import datetime ...
from __future__ import print_function import warnings import pyttsx3 import speech_recognition as sr from gtts import gTTS import playsound import os import datetime import calendar import random import wikipedia import webbrowser import ctypes import winshell import subprocess import pyjokes import smtplib import requ...
""" CRC Calculation Author: Yogyui (SeungHee-Lee) """ from typing import Union, List REFLECT_BIT_ORDER_TABLE = [ 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8...
import pickle import torch from torch import nn import torch.nn.functional as torch_f from libyana.camutils import project as camproject from libyana.modelutils.freeze import rec_freeze from meshreg.models import resnet from meshreg.models.absolutebranch import AbsoluteBranch from meshreg.models.manobranch import Man...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import os import tensorflow as tf import tensorflow_model_analysis as tfma from tensorflow_transform import coders as tft_coders from tensorflow_transform.tf_metadata import dataset_schema fro...
# -*- coding: UTF-8 -*- """ .. --------------------------------------------------------------------- ___ __ __ __ ___ / | \ | \ | \ / the automatic \__ |__/ |__/ |___| \__ annotation and \ | | | | \ ...
from __future__ import print_function, division import sys import os import rhalphalib as rl import numpy as np import scipy.stats import pickle import ROOT rl.util.install_roofit_helpers() rl.ParametericSample.PreferRooParametricHist = False def expo_sample(norm, scale, obs): cdf = scipy.stats.expon.cdf(scale=sc...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. """ Models registries. """ from collections import Mapping, defaultdict, deque from contextlib import closing, contextmanager from functools import partial from operator import attrgetter from weakref import WeakValueDi...
import pytorch_lightning as pl import torch import torchvision.datasets as datasets from torch.utils.data import DataLoader, Dataset import argparse import torch.nn.functional as F from torchvision import transforms as T from pytorch_lightning.callbacks import LearningRateMonitor from torch import nn import random imp...
# dipolarmodel.py - DeerLab's dipolar EPR model generator # --------------------------------------------------------------------------- # This file is a part of DeerLab. License is MIT (see LICENSE.md). # Copyright(c) 2019-2021: <NAME>, <NAME> and other contributors. import numpy as np from deerlab.dipolarkernel impo...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Aug 15 20:39:38 2019 @author: thomassullivan """ #from objects import Article, Category from datetime import datetime, date from sqlalchemy import (MetaData, Table, Column, Integer, Numeric, String, DateTime, Date, ForeignKey, ...
""" cli.py - mpiexec PALS CLI MIT License (C) Copyright [2020-2021] Hewlett Packard Enterprise Development LP 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 witho...