text
stringlengths
6.04k
39.5k
import re import copy from bisect import bisect from jinja2 import Template """ Markdown documentation variable """ MARKDOWN = """ {{ header }} {{ t.full_table_name(quoted=False, with_prefix=False) }} {{ inspect.getdoc(t) or '' }} | Column name | Column Type | PII | Description | | ----------- | ---- | --- | -------...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Author: <NAME> <<EMAIL>> Project: Bachelorarbeit Module name: Classifier Short description: Classifier module License: MIT License Version: 1.0 """ import configparser import matplotlib.pyplot as plt import numpy as np from sklearn import svm from sklearn impor...
#! /bin/python3 # -*- coding: utf-8 -*- """ Created on Mon May 28 11:29:47 2018 @author: swball This file implements magnetic field calculations for the NQO Ytterbium experiment at SDU""" import numpy as np import matplotlib.pyplot as plt from time import time import mfs def print_field_gradient(magnets, centr...
#!/usr/bin/env python3 import glob, os, sys from collections import defaultdict import random from shutil import copyfile #List of schema parts to allow us to generate our own with dynamic tables schemaparts = { "PART": """ BEGIN; CREATE TABLE PART ( P_PARTKEY SE...
"""Python representations for DocuSign models. See https://www.docusign.com/developer-center/explore/common-terms .. note:: CamelCase is used here to mimic DocuSign names. """ from operator import attrgetter ENVELOPE_STATUS_CREATED = 'Created' ENVELOPE_STATUS_DRAFT = 'Draft' ENVELOPE_STATUS_SENT = 'Sent' ENVEL...
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the niceman package for the # copyright and license terms. # # ## ### ##...
''' Created on Apr 27, 2021 @author: Bill ''' import numpy as np import unittest from functools import lru_cache from geometry_base import Point, Line, Plyline, Rectangle import logging logger = logging.getLogger('fence_line') if __name__ == '__main__': logging.basicConfig(datefmt='%Y-%m-%d %H:%M:%S', format...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Base test classes and functions for setting up ZCA. In some cases, you may be better off using :mod:`zope.component.testlayer`. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function # stdlib imports import g...
import os from math import * import numpy as np import pandas as pd from datetime import timedelta from sklearn.decomposition import PCA from sklearn.metrics import accuracy_score from sklearn.cluster import KMeans, DBSCAN from sklearn.preprocessing import StandardScaler, normalize pd.options.mode.chained_assignment =...
# @Author: <NAME> # @Date: Tue, March 31st 2020, 12:36 am # @Email: <EMAIL> # @Filename: train.py from pyleaves.models.base_model import add_regularization import tensorflow as tf import logging import argparse import json import glob,os import numpy as np import pandas as pd from sklearn.model_selection import t...
# -*- coding: utf-8 -*- """ These are some useful functions used in CSD methods, They include CSD source profiles to be used as ground truths, placement of electrodes in 1D, 2D and 3D., etc These scripts are based on Grzegorz Parka's, Google Summer of Code 2014, INFC/pykCSD This was written by : <NAME>, <NAME> Laborato...
# decompyle3 version 3.3.2 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.8.5 (default, Jul 28 2020, 12:59:40) # [GCC 9.3.0] # Embedded file name: lib\bflb_com_if_uart.py import time, binascii, serial, threading from queue import Queue from queue import Empty from lib import bflb_utils import globalvar as go...
#setting the score score=0 concussion=0 #importing stuff import os import time import random print(' _.-=..=-._ ') print(' /\\ //\ ') print(' | ||-++++-|| |') print(' \// \\/') print(' `-=..=-`') print('Football by <NAME>') print('DISCLAIMER') print('Actions in this game may ...
# -*- coding: utf-8 -*- """ Created on Sat Apr 9 15:36:59 2016 @author: derrick Module for running test casses """ ###### imports and such from __future__ import print_function, unicode_literals, division, absolute_import import os import shutil from collections import namedtuple import obspy import pandas as pd i...
"""" demo on RDMM on 2d synthetic image registration """ import matplotlib as matplt matplt.use('Agg') import sys,os os.environ["CUDA_VISIBLE_DEVICES"] = '' import torch sys.path.insert(0,os.path.abspath('.')) sys.path.insert(0,os.path.abspath('..')) sys.path.insert(0,os.path.abspath('../mermaid')) import mermaid.modu...
from temporalCNN.data_preprocessing import data_together, train_test_dataset import talos as ta # from temporalCNN.model_support import hyper_parameters, write_config, save_model_history # from temporalCNN.neural_network import ssim_model from talos.metrics.keras_metrics import fmeasure_acc from talos import Deplo...
def pandify(sdf): res = sdf final_cols = [] for f in res.schema.fields: if '.' in f.name: new_name = f.name.replace('.', '__') field_name = '`{nm}`'.format(nm=f.name) res = res.withColumn(new_name, res[field_name]) final_cols.append(f.name.replace('.', ...
# /usr/bin/env python3.5 # -*- mode: python -*- # ============================================================================= # @@-COPYRIGHT-START-@@ # # Copyright (c) 2019, Qualcomm Innovation Center, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification,...
from re import A import boto3 import botocore import click import configparser import json import re from . import policies def bucket_exists(s3, bucket): try: s3.head_bucket(Bucket=bucket) return True except botocore.exceptions.ClientError: return False def user_exists(iam, username...
import torch from torch import Tensor import torch.nn as nn from torchvision.models.utils import load_state_dict_from_url from typing import Type, Any, Callable, Union, List, Optional from torchvision import models from torch.nn.parameter import Parameter # based on https://github.com/pytorch/vision/blob/master/torch...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (C) 2009-2020 Authors of CryptoMiniSat, see AUTHORS file # # 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 Free Software Foundation; version 2 # of the License....
"""Pure-python implementation of the sphinx onion routing format Warning: This implementation is not intended to be used in production, rather it is geared towards testing and experimenting. It may have several critical issues, including being susceptible to timing attacks and crashes. You have been warned! """ from ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import six from nose.tools import ok_, assert_raises, assert_equal from nose.tools.trivial import eq_ from booleano.operations.operands.constants import Number, String from booleano.operations.variables import NumberVariable, BooleanVaria...
# <NAME>. on github.. import threading import library as library import socketserver import time log_th = None conf_th = None header_th = None command_w_th = None class ThreadedTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer): pass class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler)...
"""This script generates additional plots for the latency breakdown experiment (exp1) including all endpoints of all applications. It is based on load_levels.py which plots many more aspects.""" # %% Imports from sb_importer import * from rciw import calculate_RCIW_MJ_HD # %% Helper methods def latency_label(latency...
""" Postprocessing the Markdown for various Hosting Ways """ from pytest2md.repo_search import search_repo, os_run from functools import partial import fnmatch import json import time import sys import os # replacer for shortcut curls, which can be themselves replaced by the build # static is just a static webserver:...
from app import app from es_connection import es from es_search import _search_ranked_email_addrs, count, get_cached_email_addr, initialize_email_addr_cache from es_queries import _build_filter, email_highlighting_query, _build_email_query, ids_query, email_attachment_guid from es_topic import get_categories #map t...
import os from keras.preprocessing.image import img_to_array, load_img from keras.layers import GlobalAveragePooling2D, GlobalMaxPooling2D, Flatten, Dropout, Dense from keras.models import Model from keras.callbacks import ModelCheckpoint from keras import regularizers import constants import threading import json from...
#! /usr/bin/python3 # # Copyright (c) 2019 <NAME> <<EMAIL>> # # This library 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.1 of the License, or (at your option) any later version. #...
import pandas as pd from datetime import date from os import sys, path root_path = path.dirname(path.dirname(path.abspath(__file__))) try: import config from Utiltity.common import * from Utiltity.df_utility import * from Utiltity.time_utility import * from Analyzer.AnalyzerUtility import * fr...
import torch import torch.nn as nn import torch.nn.functional as F import functools import net.base_net as base_net ############################################################################### # define spatially adaptive normalized generator # input: boundary and apperance latent vector ###########################...
import io import os from os.path import join, splitext import PIL.Image import PIL.ImageTk from tkinter import * from tkinter import ttk from tkinter.filedialog import askopenfilename from tkinter.filedialog import asksaveasfile from rwsrc import rwcore tempname = "temp.tmp" def MainApp(self): try: if n...
import random from queue import Empty import warnings import numpy as np from psychopy import visual, core from .Controller import word from Offline.utils import char2index class Stimulator: colors = [[255, 0, 0], [0, 255, 0], [0, 0, 255], [255, 0, 255], [160, 82, 45], [100, 120, 100]] duration = 150 # in ...
import select import socket import sys import time ############################################################# # # A couple of helper functions from stack overflow # ############################################################# # from https://stackoverflow.com/questions/6229073/how-to-make-a-python-dictionary-tha...
# # Copyright (c) 2015-2021 <NAME> <tflorac AT ulthar.net> # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE...
from datetime import datetime, timedelta from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.core.exceptions import PermissionDenied, SuspiciousOperation from django.db.models import Prefetch, Q from django.http import HttpResponse, JsonResponse from django...
from collections import namedtuple from unittest import TestCase import multiprocess as mp import numpy as np from scipy import signal from scipy.special import erf from testing_utils import assert_almostclose from vznncv.signal.generator.onedim import generate_process_realization def f_psd_norm(f, f_0, alpha): ...
from os.path import join as opj import numpy as np import json from pandas import DataFrame, Series, read_sql_query from sqlalchemy import create_engine from configs.nucleus_style_defaults import Interrater as ir from interrater.interrater_utils import ( _connect_to_anchor_db, get_fovinfos_for_interrater, get_a...
from typing import Optional import torch from torch import matmul from torch_extensions.ops import ( batch_cholesky_inverse, batch_diag, kron, symmetrize, matvec, make_block_diagonal, cov_from_invcholesky_param, inv_from_invcholesky_param, cholesky, ) from inference.analytical_gausia...
#!/usr/bin/env python3 # coding=utf-8 import requests import json import argparse import sys VERBOSE = False def check_res(r): """Test if a response object is valid""" # if the response status code is a failure (outside of 200 range) if r.status_code < 200 or r.status_code >= 300: # print the sta...
from charcoaltoken import CharcoalToken as CT from unicodegrammars import UnicodeGrammars from compression import Compressed from codepage import rCommand import re def string(s): if s == "": return [("v", "ω")] if s == "ABCDEFGHIJKLMNOPQRSTUVWXYZ": return [("v", "α")] if s == "abcdefghijkl...
from __future__ import annotations from typing import Iterable, Sequence, cast from .codeblock import Load, Store from .expression import ( AddOperator, AndOperator, Complement, Expression, IntLiteral, LVShift, Negation, OrOperator, RVShift, SignTest, XorOperator, trunc...
#! /usr/bin/python # -*- coding: utf-8 -*- """ * Created by zbl on 18-12-10 上午10:56. * 依赖pdf2htmlEX 解析pdf 文件,主要是table """ import os import bs4 import numpy as np from bs4 import BeautifulSoup from pdfparser.pdf_tables_merge import merge_tables from pdfparser.pdf_images_gen import use_image_get_table_top_bottom ...
""" Implementation of this paper: https://arxiv.org/pdf/1807.10165.pdf pytorch implementation: https://github.com/bigmb/Unet-Segmentation-Pytorch-Nest-of-Unets/blob/master/Models.py """ import jittor as jt from jittor import init from jittor import nn # UNet++,插值增大尺寸后直接拼接特征,原论文 class NestedUNet(nn.Module): def __...
import os import ujson as json import pytups as pt import pandas as pd import datetime import numpy as np def read_json(filename): with open(filename, 'r') as f: return json.load(f) def _treat_stop_area(one_stop): get_line_time = lambda v: (v['line']['shortName'], v['dateTime']) return pt.TupList...
import traceback from django.shortcuts import render # from django.http import HttpResponse from django.http import JsonResponse # import mysql.connector as mysql import time from django.db import connections import re from project import mongoClient from datetime import datetime import sqlparse from project.sql2Mongo...
# -------------------------------------------------------------------------- # Source file provided under Apache License, Version 2.0, January 2004, # http://www.apache.org/licenses/ # (c) Copyright IBM Corp. 2015, 2016 # -------------------------------------------------------------------------- """ Configurati...
############################################################################### # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. ############################################################################### imp...
import torch, time, copy, random, traceback, math, csv import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import abc import numpy as np from collections import deque from itertools import chain from utils.Epsilon import Epsilon from utils.ReplayMemory import ReplayMemory, Transition from ...
import json import copy def str_recommends(dict, data, adapt=False): """ :param dict: list或者字符串 :param data: 字符串,用于与dict中的每一项作匹配 :param adapt: 标识,True,dict为字符串,计算dict与data的相似度, False,dict为list, 搜寻最匹配的推荐项返回(如果满足要求)或者data本身 :return: 如果adapt为True,返回data与匹配度最高项的相似度得分,adapt默认是False,返回推荐值(如果满足要求)或者data本...
import os import json import base64 import string from time import time from uuid import uuid4 from pathlib import Path from traceback import format_exc from contextlib import suppress import rollbar import boto3 from botocore.config import Config from cryptography.hazmat.primitives.hashes import SHA256 from cryptogr...
""" Zero shot eval according to composed utterances """ import os import vis import torch import numpy as np import json from collections import defaultdict, Counter from torch.nn.utils.rnn import pad_sequence import random import torch.nn.functional as F import pandas as pd from scipy.spatial.distance import squaref...
# -*- coding: utf-8 -*- r""" classes for working with lightcurves from the CDIPS pipeline """ # Import standard library from os.path import join, exists import logging # Import library import numpy as np import pandas as pd import matplotlib.pyplot as pl import astropy.units as u from lightkurve import TessLightCurve...
from enum import Enum from misc import * import mido def can_parse_from_hex(s): try: int(s, 16) return True except ValueError: return False class MonoPatch: class VCO1Wave(Enum): SQUARE = 0 TRIANGLE = 1 SAW = 2 class VCO2Wave(Enum): NOISE = 0 ...
import functools import inspect import warnings import numpy as np import xarray as xr from cmip6_preprocessing.utils import _key_from_attrs, cmip6_dataset_id try: import xesmf except ImportError: xesmf = None # define the attrs that are needed to get an 'exact' match exact_attrs = [ "source_id", ...
import geopy from geopy.geocoders import Nominatim from geopy.extra.rate_limiter import RateLimiter from pathlib import Path from .utils import is_valid_email from tqdm.auto import tqdm from functools import lru_cache from inspect import signature import re import pandas as pd from collections import deque def ge...
from collections import namedtuple from string import ascii_letters, punctuation from unittest import mock, TestCase from xml.sax.saxutils import escape import html import io import json import os import random import textwrap import unittest from hypothesis import example, given, Phase, settings from hypothesis impor...
# keyword.py - $Keyword$ expansion for Mercurial # # Copyright 2007-2009 <NAME> <<EMAIL>> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. # # $Id$ # # Keyword expansion hack against the grain of a DSCM # # There are many good reaso...
import json import datetime from django import views from app01 import models from utils.enc import uid from django.urls import reverse from django.conf import settings from django.db import transaction from django.shortcuts import render from django.http import JsonResponse from utils.pagination import Pagination from...
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. # # This source code is licensed under the BSD license found in the # LICENSE file in the root directory of this source tree. import argparse from collections import defaultdict from functools import reduce import gc import logging import math imp...
#!/usr/bin/env python # # CodeWarrior demangler, supporting operators, templates (including literals), and arrays. # # This can be included as a library, or used as a CLI application directly: # # $ ./demangle_cw.py 'check__3FooCFUlR3Bar' # Foo::check (long unsigned, Bar &) const # # CodeWarrior's symbol mangling a...
# Code for "ActionCLIP: ActionCLIP: A New Paradigm for Action Recognition" # arXiv: # <NAME>, <NAME>, <NAME> from re import S import torch from torch import nn from collections import OrderedDict from torch.nn.modules import dropout from torch.nn.utils.rnn import pad_packed_sequence, pack_padded_sequence from einops i...
from common.HATLib import * import time import random from math import floor from math import ceil from math import pow noisetable = array('f', [0] * 16 * 16 * 16) for i in range(0, 16 * 16 * 16): noisetable[i] = random.random() def lerp(x, y, t): return x * t + y * (1.0 - t) def perlinnoise(x, y, z): mi...
import sys from PyQt5 import QtWidgets, uic from mpmath import log10, ln, sqrt, fac import decimal def except_hook(cls, exception, traceback): # PyQt5 doesn't output traceback errors by default sys.__excepthook__(cls, exception, traceback) if __name__ == "__main__": sys.excepthook = except_hook ...
# Copyright (c) 2016 <NAME> # # 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...
import os, sys, logging import types from flask import Flask, Response from flask import current_app, render_template, url_for, flash, session, request, redirect, g, abort, send_from_directory from flask.ext.login import LoginManager from flask.ext.login import login_user, logout_user, current_user, login_required #goo...
import logging import json import time import re import os import functools from copy import deepcopy from datetime import datetime from collections import Iterable import yaml import tablib import requests from pprint import pprint from concurrent import futures from flask import current_app, jsonify, request from re...
#!/usr/bin/python3 import sys import numpy as np import pandas as pd import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import pydotplus from scipy import stats from mpl_toolkits.mplot3d import Axes3D from sklearn import datasets from sklearn.decomposition import PCA from sklearn import model_sele...
# -*- coding: utf-8 -*- # # Copyright (c) 2011 <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 Free Software Foundation, either version 3 of the License, or #(at your option) any later version. # #This program is ...
# Authors: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> import numpy as np from scipy.spatial.distance import cdist from .environment import Environment from bolero.utils.log import get_logger class OptimumTrajectory(Environment): """Optimize a trajectory according to some criteria. Parameters ---------...
import logging import copy import time import os from functools import partial from multiprocessing import Pool from collections.abc import Iterable import numpy as np import numba as nb import matplotlib.pyplot as plt __all__ = ["repeater_mc", "plot_mc_simulation"] def repeater_mc(parameters, multiprocessing=Fals...
import tensorflow as tf print('Using Tensorflow '+tf.__version__) import matplotlib.pyplot as plt import numpy as np import time import src.siamese_sr as siam_sr from src.visualization import show_frame, show_crops, show_scores # TODO: <> import import src.scale_whratio as scr import src.windows as windows...
import cv2 from PIL import Image import numpy as np import pandas as pd import torch from torch import nn import torchvision from torchsat.transforms import transforms_seg import matplotlib.pyplot as plt from torchvision.transforms import transforms from torch.utils.data import Dataset import torch.nn.functional as F f...
import json import collections import itertools import copy import pandas as pd import seaborn as sns from matplotlib import pyplot import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.ticker as ticker import numpy as np import matplotlib from scipy import stats from scipy.misc import derivative f...
# coding:utf-8 ''' Created on 2017/11/28. @author: chk01 ''' from utils import random_mini_batches import tensorflow as tf import numpy as np import scipy.io as scio batch_size = 8 vec_len = 8 # each caps's len num_outputs = 32 # like cov's channels epsilon = 1e-9 iter_routing = 1 num_outputs2 = 10 vec_len2 = 16 ...
import numpy as np import torch import dgl import stag import dgl.nn.pytorch as dglnn import torch import torch.nn as nn from dgl import function as fn from dgl._ffi.base import DGLError from dgl.nn.pytorch.utils import Identity from dgl.ops import edge_softmax from dgl.utils import expand_as_pair class GATConv(nn.Mo...
"""Manages state transitions for PaymentChannel objects.""" import codecs import time import enum import math import two1.bitcoin as bitcoin from . import walletwrapper class StateTransitionError(AssertionError): """Invalid state transition error.""" pass class InsufficientBalanceError(ValueError): """...
"""Module to represent a Netatmo module.""" from __future__ import annotations import logging from datetime import datetime from enum import Enum from typing import TYPE_CHECKING from ..const import _GETMEASURE_ENDPOINT from ..exceptions import ApiError from ..modules.base_class import EntityBase, NetatmoBase, Place ...
""" opcode module - potentially shared between dis and other modules which operate on bytecodes (e.g. peephole optimizers). """ __all__ = ["cmp_op", "hasconst", "hasname", "hasjrel", "hasjabs", "haslocal", "hascompare", "hasfree", "opname", "opmap", "HAVE_ARGUMENT", "EXTENDED_ARG", "hasnargs"] ...
''' Reference: https://github.com/yuchenlin/lstm_sentence_classifier/blob/master/LSTM_sentence_classifier.py ''' # -*- coding: utf-8 -*- import torch import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import data_loader import os import random import log...
"""Adapted from: @dbolya yolact: https://github.com/dbolya/yolact/data/config.py Licensed under The MIT License [see LICENSE for details] """ from models.backbone import ResNetBackbone import torch COLORS = ( (244, 67, 54), (233, 30, 99), (156, 39, 176), (103, 58, 183), (63, 81, 181), ...
""" ckbit.app_ea """ import pystan from datetime import datetime import numpy as np import pickle from hashlib import md5 import pandas as pd import matplotlib.pyplot as plt import arviz from vunits.constants import R as R_conv from tabulate import tabulate def write_app_ea_stan_code(Ea_up_lim=350, ...
import os import pickle import numpy as np import pybullet as p USE_WALL_CONTACT = True def run_dijkstra(env, target_position, goal_tolerance=0.5, use_other_room=False): """ Run dijkstra in 3D space target_position = (goal_x, goal_y, goal_z) Assumptions: x_range1: -16, -13.5 y range1: ...
# -*- coding: utf-8 -*- """ doScan.py The core interface that takes minimal text description of scan and does IPC with hardware system This is the common entry into the hardware interface and uses a minimal text desc file containing three blocks: [Major], [Minor], [Interface]. This routine can be called independently...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# -*- coding: utf-8 -*- """ @date: 2021/7/20 下午10:23 @file: prune_mobilenet_v2.py @author: zj @description: """ import numpy as np import torch import torch.nn as nn from torchvision.models.mobilenetv2 import ConvBNActivation, ConvBNReLU, InvertedResidual from slim.prune.layers import create_conv2d, create_batchnor...
from random import randint import numpy as np import datetime import time import pytest from mmgroup import MM0, MMSpace, MMV from mmgroup.generators import gen_leech2_type from mmgroup.generators import gen_leech2_reduce_type2 from mmgroup.generators import gen_leech2_reduce_type2_ortho from mmgroup.generators impo...
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
import os import sys import glob import h5py import copy import math import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable #Mish激活函数 class Mish(nn.Module): def __init__(self): super(Mish, self).__init__() def forward(self, x): return x * torch....
# -*- coding: utf-8 -*- from collections import OrderedDict import time import os import re import h5py import pandas as pd import numpy as np from .settings import * from .io.file import get_alignment_file_handle from .core.get_gadgets import * from .core.metagene import * from .metadata import set_metadata from .co...
import datetime import argparse import sys import os import cairo # from pycairo, i.e. install pycairo if missing # Configuration DOC_NAME = "life_calendar.pdf" PAST_DATE = datetime.datetime.strptime('14/12/2021', '%d/%m/%Y') # PDF conversion factors # DOC_WIDTH and DOC_HEIGHT units are "points" # 360 points = 5 ...
import numpy as np import pickle import tensorflow as tf import os import sys sys.path.append("../../..") sys.path.append("../..") sys.path.append("..") import utils import random import math from mimic3models.multitask import utils as mt_utils from waveform.WaveformLoader import WaveformDataset from mimic3models.prepr...
import pytest from unittest import mock from numpy import testing as npt from matplotlib import pyplot as plt import networkx as nx from openfe.utils.network_plotting import ( Node, Edge, EventHandler, GraphDrawing ) from matplotlib.backend_bases import MouseEvent, MouseButton def _get_fig_ax(fig): if fig i...
"""Library functions for set janitor prompt and janitor eval-prompt commands.""" import gdb import gdb.prompt import sys import janitor.typecache import janitor.dump import janitor.ansiterm class PrettyPromptException(Exception): pass known_types = { "v": "void", "c": "char", "sc": "signed char", ...
import praw import os from datetime import datetime import time from dateutil.relativedelta import relativedelta import sys def __init__(): r = praw.Reddit('bot') print ('Conectado.') return r def run_bot(r, subreddits_list, replies_list, posts_list): print ('1/5: conferindo novas postagens ...
# -*- coding: utf-8 -*- """ Created on Sat Apr 27 17:06:30 2019 @author: Roberto """ import argparse from collections import defaultdict refseq_names = 'name2' hgnc_names = 'Approved symbol' def parse_cmd(): ''' parsing command line parameters ''' parser = argparse.ArgumentParse...
# Author: Yubo "Paul" Yang # Email: <EMAIL> # Example input sections to QMCPACK. Intended to be easily extendable. # To edit an example for your need, please refer to lxml documentation. There are extensive documentation regarding how to iterate through the children of a node, get and set attributes, as well as insert...
import sys import os import io sys.path.append("../") import json import pony.orm as pny import Utils.log as log import Database import datetime from version_info import VERSION_POSTFIX from uuid import uuid4 from ExternalServices import logins from ExternalServices import incidents from Database.users import User from...
import argparse import cv2 from moviepy.editor import ImageSequenceClip import numpy as np from PySide2 import QtCore,QtGui,QtWidgets import os import pickle from sklearn.decomposition import PCA import sys import tensorflow as tf import trimesh import yaml from pathlib import Path basePath = (Path(__file__).parent / ...
# !/usr/bin/env python # coding: utf-8 import codecs import json import os import subprocess import time from typing import Tuple from .compile import BuildRemoteLinuxCommand, BuildLang from .. import Tron, Evm from ..compile.paths import Paths from ..exceptions import ValidationError, NoWalletError from ..trx import ...