text
stringlengths
3.07k
22.1k
import pandas as pd import numpy as np from pathlib import Path from RNA import fold from distance import hamming class ExperimentGroupProcessor(object): """TODO """ def __init__(self, experiment_group_path, data_dir, output_dir, desired_gc=0.1, gc_tolerance=0.01): self._experiment_group = exper...
import requests import json import argparse import imutils import time as ti import cv2 from datetime import datetime, time #import picamera as cam import cloudinary.uploader #############from picamera.array import PiRGBArray #############from picamera import PiCamera import signal import config from PIL import Image f...
import time import threading import cv2 import mmcv import numpy as np import torch import torch.nn.functional as F def points_2_box(points): ymin, ymax = points[0].min(), points[0].max() xmin, xmax = points[1].min(), points[1].max() return xmin, ymin, xmax, ymax def points_2_area(points): area = l...
from typing import List, Optional from yaplox.expr import ( Assign, Binary, Call, Expr, Get, Grouping, Literal, Logical, Set, Super, This, Unary, Variable, ) from yaplox.stmt import ( Block, Class, Expression, Function, If, Print, Return, ...
""" Code written by <NAME> Python code written using tkinter' date: 28/05/21 Cons:Cannot calculate many value at a time cannot work with float values Simple calculator which computes only integer icon =https://iconarchive.com/tag/calculator """ from tkinter import * from tkinter import messagebox root...
from abc import ABC, abstractmethod from typing import List, Dict, Callable from datasets import Dataset from pyserini.dsearch import BinaryDenseSearcher, SimpleDenseSearcher from pyserini.dsearch.__main__ import init_query_encoder from pyserini.search import SimpleSearcher from haystack import Document from haystack.r...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # License: © 2021 <NAME> All Rights Reserved # Author: <NAME> # Usage: python3 inference_detection_classification.py --input <DIR> --output <DIR> import os import sys import argparse import time import numpy as np import cv2 from PIL import Image import tensorflow as tf ...
from parameters import * import numpy as np import pdb import timeit from scipy.spatial import cKDTree import cv2 as cv import random def add_pieces_grid(params: Parameters): start_time = timeit.default_timer() img_mosaic = np.zeros(params.image_resized.shape, np.uint8) if not params.grayscale...
#!/usr/bin/python3 # Bandpass, gain and flux calibration # https://casa.nrao.edu/docs/TaskRef/fixvis-task.html # https://casa.nrao.edu/docs/TaskRef/clearcal-task.html # https://casa.nrao.edu/docs/TaskRef/setjy-task.html # https://casa.nrao.edu/docs/TaskRef/bandpass-task.html # https://casa.nrao.edu/docs/TaskRef/gaincal...
import abc import functools import inspect import types from toolz import compose from .func_util import FunctionCategory from .context import section from .pattern_match import pattern class DuplicateWrapperError(Exception): pass class RequiredSelfError(Exception): def __init__(self, hook): msg = "{...
import torch import torch.utils.data import torch.nn as nn from torch import optim from torch.nn import functional as F import numpy as np import pandas as pd import os import time import random import importlib from shutil import copyfile from functools import partial import argparse from se3cnn.util import * from c...
# -*- coding:utf-8 -*- """ from https://github.com/zyp461476492/SimpleBmpResolver """ import sys import binascii import math class BmpFileHeader: def __init__(self): self.bfType = i_to_bytes(0, 2) # 0x4d42 对应BM self.bfSize = i_to_bytes(0, 4) # file size self.bfReserved1 = i_to_byte...
"""Common functions for the jdma client""" from jinja2 import Environment, FunctionLoader import os import sys import json import math import requests ####################### Settings for the user / server etc #################### class settings: """Settings for the jdma command line tool.""" # location of th...
# -*- coding: utf-8 -*- """beamtools.py module for calculating geometry parameters and magnetic aspect angle of radar targets use aspect_elaz or aspect_txty to calculate aspect angles of targets specified by (el,az) or (tx,ty) angles Created by <NAME> on 11/29/08. Copyright (c) 2008 ECE, UIUC. All ri...
import torch from torch.utils import data import pandas as pd import csv import os import numpy as np import numpy.matlib import codecs as cs import scipy.io as sio import codecs import joblib from .lie.pose_lie import * class MotionFolderDatasetMocap(data.Dataset): def __init__(self, filename, datapath, opt, do_...
# -*- coding: utf-8 -*- '''code needed to reproduce the weighted linear regression from the original paper''' import pandas as pd import numpy as np import statsmodels.api as sm #------------------------------------------------------------------------------- # utilities to do the reproduciton model #-----------------...
from robocorp_code_tests.protocols import IRobocorpLanguageServerClient from robocorp_ls_core.unittest_tools.cases_fixture import CasesFixture from pathlib import Path import time def test_list_work_items( language_server_initialized: IRobocorpLanguageServerClient, cases: CasesFixture, data_regression, ):...
#!/usr/bin/python # -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # /******************************************************* # * Copyright (C) 2013-2014 CloudRunner.io <<EMAIL>> # * # * Proprietary and confidential # * This file is part of CloudRunner Server. # * # * CloudRunner Server can no...
# Client can delete any unsaved duplicate input, because it will either have no answerId, # or it will have an older saved answer id/content. # Import external modules from google.appengine.ext import ndb import json import logging import os import webapp2 # Import app modules import answer from configAutocomplete im...
#!/usr/bin/env python3 try: import argparse import sys import os import glob import time from scipy.interpolate import griddata import numpy as np import netCDF4 as nc4 from netCDF4 import Dataset import matplotlib.pyplot as plt from matplotlib.colors import LogNorm impo...
#!/usr/bin/env python3 #=============================================================================== # footprints.py #=============================================================================== """Easy management of transcription factor footprinting data A mini-module for managing footprint data. The language ...
import argparse import datetime from typing import Optional, Tuple, Union try: from testcases import ThrowException, ReturnNone, testcases from colors import Colors from datetimeparser.parser import Parser from datetimeparser.evaluator import Evaluator except (ImportError, ModuleNotFoundError): i...
import os, os.path import random import string import sqlite3 import json import math import numpy from datetime import datetime import cherrypy DB_STRING = "matcha.db" class StringGenerator(object): @cherrypy.expose def index(self): return "Hello world!" @cherrypy.expose def retrieve_places...
""" Solve the two body problem and determine a position of an orbiting body on the sky. Additionally determine its radial velocity. Two main classes are available: Oribt2D and Orbit3D. For given parameters and particular time t an Orbit2D object calculates position and velocity vectors. An Orbit3D object inherits from...
import numpy as np from scipy.stats import uniform, erlang from bokeh.io import curdoc, show from bokeh.models import ColumnDataSource from bokeh.layouts import gridplot, layout, row, column, widgetbox from bokeh.models.widgets import Button, Slider, RangeSlider, TextInput from bokeh.plotting import figure from bokeh.m...
# Copyright 2020 <NAME> (Falcons) # SPDX-License-Identifier: Apache-2.0 import lmdb import msgpack import math import sys import struct import datetime, time import os RTDB2_DEFAULT_PATH = "/tmp/rtdb2_storage" ENCODING = None if sys.version_info[0] > 2: ENCODING = 'utf-8' class RtDBTime(): # TODO: behave as ...
# Final GUI File # Project by: <NAME>, <NAME>, <NAME> # This it the first part of the project created by <NAME> # ----------------------- Imports ----------------------- # from tkinter import * from tkinter import filedialog import webbrowser # ---------------- Window Initialization ---------------- # ## Creating...
#!/usr/bin/env python """ Requirements: Python 3 or higher Antechamber and related AmberTools OpenBabel (strongly recommended for use with acpype) acpype (latest version recommended with all its requirements) Gromacs (Compulsory) flask (Comp...
import requests import sys import json import os import time import logging import yaml from logging.handlers import TimedRotatingFileHandler requests.packages.urllib3.disable_warnings() from requests.packages.urllib3.exceptions import InsecureRequestWarning def get_logger(logfile, level): ''' Create a logge...
# # Copyright (c) 2019 MagicStack Inc. # All rights reserved. # # See LICENSE for details. ## import argparse import sys import types import typing from _edgedb import queries_json as edgedb_queries_json from _edgedb import queries_async as edgedb_queries_async from _edgedb import queries_repack as edgedb_queries_r...
# important: process ids are global, i. e. are preserved (same pid for each instance) ==> <> os-managed pid import itertools import json from datetime import timedelta, datetime from typing import Sequence, Tuple, Dict import os import locale import sys import argparse root, filename = os.path.split(__file__) proj_roo...
import sys import string import pg8000 import random import os import time import logging sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from functions.pipeline.shared.db_access import ImageTagDataAccess from functions.pipeline.shared.db_provider import PostGresProvider, DatabaseInfo from ...
import csv from math import ceil import imageio import matplotlib.pyplot as plt import numpy as np import sklearn from keras.callbacks import EarlyStopping from keras.layers import Flatten, Dense, Conv2D, AveragePooling2D, Cropping2D, Dropout from keras.layers import Lambda from keras.models import Sequential from skl...
import json import secrets import time from datetime import date from fs.base import FS from fs.path import join, dirname, basename, splitext from semver import VersionInfo, parse_version_info from typing import ( Iterable, List, Optional, TextIO, Tuple, Union) from . import _yaml, _log as log ...
from math import * import numpy as np import matplotlib.pyplot as plt import random from copy import deepcopy # Do not modify path inside your function. path = [ [0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [6, 1], [6, 2], [6, 3], [5, 3], [4, 3], [3, 3], ...
import math from shapely.geometry import LineString from app.helpers.helpers import filter_altitude from app.helpers.helpers import filter_coordinate from app.helpers.helpers import filter_distance from app.helpers.raster.georaster import RESOLUTION PROFILE_MAX_AMOUNT_POINTS = 5000 PROFILE_DEFAULT_AMOUNT_POINTS = 20...
# Leo colorizer control file for sqr mode. # This file is in the public domain. # Properties for sqr mode. properties = { "lineComment": "!", } # Attributes dict for sqr_main ruleset. sqr_main_attributes_dict = { "default": "null", "digit_re": "", "escape": "", "highlight_digits": "tr...
import os import sys import math import numpy as np BASE_DIR = os.path.dirname( os.path.dirname(os.path.dirname(os.path.dirname( os.path.abspath(__file__))))) sys.path.append(BASE_DIR) from tools.path import pretrained_models_path from simpleAICV.detection.common import load_state_dict from simpleAICV.de...
import asyncio import random from dataclasses import dataclass from typing import List, Mapping, Tuple, Union import aiohttp import discord from cachetools import LRUCache from discord.ext import commands, tasks from bot.bot import PeaceBot from models import CommandModel, GuildModel, LevelingUserModel, UserModel @...
# -*- coding: utf-8 -*- """ Font Adaptive Neural Network (FANnet). Created on Wed Oct 10 17:00:00 2018 Author: <NAME> | https://prasunroy.github.io GitHub: https://github.com/prasunroy/stefann """ # imports from __future__ import absolute_import from __future__ import division from __future__ import print_function ...
import math from functools import partial import numpy as np from scipy import signal import matplotlib.pyplot as plt from matplotlib import animation, rc import logging logging.basicConfig(level=logging.WARNING) class Environment: """The ancestor of all environment models: by default it is just an area [0,0, wid...
# third party from nacl.signing import SigningKey from nacl.signing import VerifyKey import pytest # syft absolute import syft as sy from syft import ReprMessage from syft import serialize from syft.core.common.message import SignedImmediateSyftMessageWithoutReply from syft.util import get_fully_qualified_name def g...
# -*- coding: utf-8; -*- '''Find and expand dialects, i.e. whole-module source and AST transformations.''' __all__ = ["Dialect", "expand_dialects"] import ast import importlib import importlib.util import re from sys import stderr from .coreutils import ismacroimport, get_macros from .unparser import unpa...
import numpy as np import torch from torch import nn import torch.nn.functional as F class BiLSTM_Extraction_Layer(nn.Module): def __init__(self, embed_size, hidden_size, n_layer, max_seq_len=100, **kwargs): super(BiLSTM_Extraction_Layer, self).__init__(**kwargs) self.embed_size = embed_size self.hidden_size =...
from partition_baseline_support import * import graph_tool.all as gt import pandas as pd # for writing output graph TSV files import numpy as np import random import scipy.stats as stats # Generate the graph according to the blockmodel and parameters N = 200 # number of nodes save_graph = True file_name = './simula...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jul 9 14:43:21 2021 @author: priyash """ import json import requests #from datetime import datetime as dt from collections import defaultdict import pandas as pd #https://pypi.org/project/gamma-viewer/ #from gamma_viewer import GammaViewer #from IPy...
import numpy as np import utils.utils_data as utils_data import utils.utils_video as utils_video import cv2 import time class DataGenerator: def __init__(self, model, config, sess, data_name, shuffle, augment): self.config = config # data_generator receives the model and session because it runs t...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' Created on May 6, 2019 by <NAME>, modified PIA script (see Speiser et al. 2014) usage: pia.py fastaFile outputDir version 1.0 ''' import sys import re import subprocess from ete3 import Tree from pathlib import PurePosixPath from Bio import SeqIO from Bio import Al...
import io import warnings import torch import numpy as np from .types import as_numpy from contextlib import redirect_stdout __all__ = ["bennett_acceptance_ratio"] def bennett_acceptance_ratio( forward_work: torch.Tensor, reverse_work: torch.Tensor, compute_uncertainty: bool = True, ...
#!/usr/bin/env python ''' measure coverage across regions and bams ''' import argparse import collections import logging import sys import intervaltree import numpy as np import pysam import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import seaborn as sns FIGSIZE_FACTOR_X=3.0 FIGSIZE_FACTOR_X...
# -*- coding: utf-8 -*- #!/usr/bin/env python # # The MIT License (MIT) # Copyright (c) 2015,2018 <NAME> # 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...
import functools import json import mongoengine from pathlib import Path from os import path from datetime import datetime, timedelta from distpickymodel import utils, models, extended_model as e_model file_path = Path(__file__).resolve() ROOT_PATH = str(file_path.parents[1]) TEST_PATH = path.join(ROOT_PATH, 'tests')...
import struct import StringIO def dump(stream, value): if isinstance(value, bytes): return encode_bytes(stream, value) elif isinstance(value, unicode): return encode_string(stream, value) elif value is False: return encode_false(stream) elif value is True: return encode_...
import copy import csv import math import random import re import time def get_individuals(filename): """ Returns a list of all the different individuals contained in the file. :param filename: :return: """ f = open(filename) individuals = set() for line in f: ...
"""Send email notices to bishopric and members on expiring recommends. """ import pdb import datetime import collections from email.mime.text import MIMEText try: import ConfigParser as configparser except ImportError: import configparser try: from future_builtins import filter, map except ImportError: ...
import shapely from shapely.geometry import Polygon, MultiPoint import numpy as np from mean_average_precision import MetricBuilder def polygon_iou(list1, list2): """ Intersection over union between two shapely polygons. """ polygon_points1 = np.array(list1).reshape(4, 2) poly1 = Polygon(polygon_p...
import pyspark from pyspark import SparkConf, SparkContext import matplotlib as plt import os import argparse import numpy as np import png from PIL import Image import scipy import re import binascii import matplotlib.image as mpimg import matplotlib as plt from sklearn.model_selection import train_test_split import ...
from django.core.exceptions import ObjectDoesNotExist from django.shortcuts import get_object_or_404 from django.http import Http404 from drf_yasg.utils import swagger_auto_schema from rest_framework import viewsets, views, exceptions, permissions from rest_framework.decorators import action from rest_framework.respons...
import csv import os import datetime import boto3 import click import sqlalchemy from sqlalchemy.orm.attributes import flag_modified from pathlib import Path from flask.cli import with_appcontext from application.extensions import db from application.models import ( PlanningAuthority, LocalPlan ) date_fiel...
''' Module for spell-checking programming language source code. The trick is that it knows how to split identifiers up into words: e.g. if the token getRemaningObjects occurs in source code, it is split into "get", "Remaning", "Objects", and those words are piped to ispell, which easily detects the spelling error. Ha...
from dataclasses import dataclass from . import utils from .spec import ( ENUM, STRUCT, Constant, Error, ErrorCase, Field, Method, Model, Params, Results, Service, Spec, ) @dataclass class ResolveSpecsResults: unused_node_uris: list[str] merged_specs: list[Spec...
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
from time import sleep import sys def entrada(): c = 0 while not 0 < c < 13: try: c = input("\033[34mDigite\n" "1. Para conversor Decimal---Binario\n" "2. Para conversor Decimal---Hexadecimal\n" "3. Para conversor Decimal---O...
import os, shutil import tkinter import re from tkinter import * from tkinter.filedialog import askdirectory, askopenfilename, asksaveasfilename from tkinter.messagebox import showinfo import recorder, impulcifer import sounddevice # tooltip for widgets class ToolTip(object): def __init__(self, widget, text='widg...
import datetime # Numpy import numpy as np # Matplotlib import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt # Keras from keras.layers import Dense, Dropout, Flatten from keras.models import Model, Sequential from keras import backend as K from Plotter import Plotter from learningUtils import val...
import sys, os, re import errno import pathlib import shutil import functools from pathlib import Path from pytest import fixture _HERE = Path(__file__).absolute().parent # Make sure we don't use config files from system or user home os.environ['XDG_CONFIG_DIRS'] = str(_HERE / 'config/sys') os.environ['XDG_CONFIG_...
"""Admin views.""" from django.contrib import admin from django.contrib.admin import StackedInline, TabularInline from django.contrib.auth.models import User from django.http import HttpResponseRedirect from .forms import OrganizationModelForm, QuestionModelForm, UserForm from .mixins.admin import CookieFilterMixIn fr...
""" This file defines the decoder. """ import tensorflow as tf from tensorflow.python.ops import array_ops, math_ops, nn_ops, variable_scope # Note: this function is based on tf.contrib.legacy_seq2seq_attention_decoder, which is now # outdated. In the future, it would make more sense to write variants on the attenti...
import glob import os import itertools import tqdm import numpy as np import pandas as pd import scipy.stats import matplotlib.pyplot as plt import seaborn as sns NAME_TO_ALGO = { 'bayesian_bald_sampling': 'Bayesian BALD', 'bayesian_entropy_sampling': 'Bayesian entropy', 'coreset': 'K-center greedy', ...
# 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 agreed to in writing, ...
from nodes import * from sql import PolarJoinExecutor import sys sys.path.append("/home/ziheng/quokka-dev/") ray.init(ignore_reinit_error=True) NUM_MAPPERS = 2 NUM_JOINS = 4 r = redis.Redis(host="localhost",port=6800,db=0) r.flushall() input_actors_a = {k: InputS3CSVNode.options(max_concurrency = 2, num_cpus = 0.001...
from project import db, bcrypt from sqlalchemy.ext.hybrid import hybrid_property, hybrid_method from sqlalchemy import and_, or_ from datetime import datetime import re class User(db.Model): __tablename__ = 'users' id = db.Column(db.Integer, primary_key=True, autoincrement=True) email = db.Column(db.Strin...
# Copyright (C) 2021 The Xaya developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Generic test framework for Python integration tests of Xaya X connectors. """ import jsonrpclib import zmq import argparse import codec...
# From: github.com/Roxot/AEVNMT.pt import argparse import json options = { # Format: "option_name": (type, default_val, required, description, group) # `group` is for ordering purposes when printing. # I/O and device information "hparams_file": (str, None, False, "A JSON file containing hyperparameter...
# Copyright (c) 2022 <NAME> # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import annotations from typing import Any, Awaitable from datetime import ...
""" Name: <NAME> CIS 41B Fall 2020 Lab Assignment 3 """ import sqlite3 from bs4 import BeautifulSoup from urllib.request import urlopen from matplotlib import pyplot as plt import numpy as np import threading import time import random import tkinter as tk from matplotlib.figure import Figure from matplotlib.backends....
from collections import namedtuple, defaultdict, OrderedDict from functools import partial from math import ceil from statistics import pstdev, median from django.conf import settings from django.core.cache import cache from django.db.models import Sum from evap.evaluation.models import TextAnswer, Contribution, Rati...
""" Module to detect and process lanes """ import numpy as np import matplotlib.pyplot as plt import cv2 import os class Line: """ Class to store characteristics of each line detection """ def __init__(self): # Has the line been detected earlier self.iterations = 0 # Polynomial ...
from uuid import uuid4 as _uuid4 import copy as _copy import os as _os from Acquire.Access import Request as _Request __all__ = ["FileWriteRequest"] def _get_key(root_key, filename): """Return the object store key for 'filename', using 'root_key' as the root Args: root_key (str): ro...
"""Unit tests for the XTransformer backend in Annif""" from scipy.sparse import load_npz, csr_matrix from os import mknod import os.path as osp import pytest from unittest.mock import MagicMock, patch import annif.backend import annif.corpus from annif.exception import NotInitializedException, NotSupportedException ...
from operator import truediv import discord, asyncio, os, datetime from discord.ext import commands from bakapi import BakapiUser from time import sleep from dblib.db import db global group1_user global group2_user class Homework(commands.Cog): def __init__(self, client): self.client = client @commands.Cog.lis...
'''Functions to create pre-defined handlers and add them to a logger. .. REVIEWED 11 November 2018 Reminder of attributes for formatting log records (from https://docs.python.org/2/library/logging.html#logrecord-attributes): ================= ==================== ====================================================...
import random, os import numpy as np from orkengine.core import * from orkengine.lev2 import * import pyopencl as cl mf = cl.mem_flags ################################################################################ class Instanceset(object): ######################################################## def __init__(sel...
# Copyright (C) 2013 Canonical Ltd. # Author: <NAME> <<EMAIL>> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. ...
#!/usr/bin/env python ## # 1. Extracts entities from question & answer post bodies # using a trained crf model. # 2. Rebuilds the sqlite database inserting the 'Entities' column in # 'questions' table. ## import os import re import sys import glob import json import sqlite3 from collections import OrderedDict from m...
# <NAME> 2017 ================================================= # findpeaks(y) returns peak height, indices, prominences, and FWHM. # Note that this function, unlike MATLAB's, is not written to allow for # irregular sampling in x. If your sampling is irregular, you can interpolate # before applying findpeaks(). # # F...
# -*- coding: utf-8 -*- # Copyright 2018 <NAME>, <NAME>, <NAME>, <NAME>, # <NAME>, <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...
##################################### # Home brew for alexa to decide if they want to make a smoothie or not ################################### import datetime import os import logging import random import urllib.request import json import time from random import randint, choice from flask import Flask, render_temp...
from utils.centroidtracker import CentroidTracker from utils.trackableobject import TrackableObject from utils.tracking import track_objects, draw_bounding_boxes from imutils.video import VideoStream from imutils.video import FPS from flask import Flask, render_template, Response from edgetpu.detection.engine import ...
#!/usr/bin/env python3 # ver 0.1 - coding python by <NAME> on 02/25/2017 # ver 0.2 - support pdb and dcd files for openmm on 5/8/2017 # ver 0.3 - support xtc trajectory files for Monte Carlo using "reduce_unitcells_3d_to_1d" on 6/6/2017 # ver 0.4 - support block average module on 6/26/2017 and remove out again. # ...
import re import sys import sqlite3 from sqlite3 import Error, Warning, OperationalError from sqlalchemy import create_engine import pandas as pd from _config import * def combine_old_and_new(data, current_img): comb = data.merge( current_img, left_index=True, right_i...
import numpy as np import math as m import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from SBTn import returnSoilType def Boussineq(length, breadth, pressure, depth): # Newmark's method, translated, in part, from the fortran in Bowles, 1988 force = 0 cenPtLen = length/2 cenPtWidth...
from collections import Counter from itertools import count from errno import ENOENT, EROFS import os from stat import S_IFLNK, S_IFDIR, S_IFREG from threading import RLock from fuse import FuseOSError, Operations, LoggingMixIn from dulwich.repo import Repo, NotGitRepository from logbook import Logger from .util impo...
# -------------------------------------# # 对数据集进行训练 # -------------------------------------# import os import time import numpy as np import torch import torch.backends.cudnn as cudnn import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable from torch....
"""Tests for Activedocs Toolbox feature""" import re import pytest from testsuite.toolbox import constants from testsuite.toolbox import toolbox from testsuite.utils import blame, blame_desc, randomize from testsuite import rawobj SWAGGER_LINK = 'https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/ex...
from pathlib import Path import allel import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import numpy as np import dask.array as da import zarr import gcsfs import yaml from warnings import warn import intake __version__ = '0.1.1' # helper class to load phase 3 data # doesn't get involved with...
import os from copy import deepcopy from tempfile import NamedTemporaryFile import pytest from mite.har_to_mite import ( _extract_and_sort_requests, _parse_urls, _render_journey_transaction, har_convert_to_mite, set_expected_status_code, set_request_body, set_request_headers_dict, ) # pag...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # asap7 plugin for Hammer. # # See LICENSE for licence details. import sys import re import os import tempfile import shutil from typing import NamedTuple, List, Optional, Tuple, Dict, Set, Any from hammer_tech import HammerTechnology from hammer_vlsi import HammerTo...
""" Meta and Base classes for any class with fields. Contains mainly: - `BaseMeta`: A meta class to get a new class with field property descriptors ready - `Base`: The base class which can be used to get/set current field values To explain what it does, we will illustrate the following examples: If we have a class...
#!/usr/bin/env python # coding: utf-8 from PySide6.QtGui import ( QPixmap, ) from PySide6.QtWidgets import ( QApplication, QComboBox, QFileDialog, QMainWindow, QMessageBox, QSizePolicy, QStatusBar, QToolBar, QToolButton, QWidget, ) import pandas as pd import sys import tempfi...