text
stringlengths
8.04k
46.5k
#!/usr/bin/env python # -*- coding: utf-8 -*- """ PyDP4 integrated workflow for the running of MM, DFT GIAO calculations and DP4 analysis v1.0 Copyright (c) 2015-2019 <NAME>, <NAME>, <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation file...
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
import os, PyPDF2, re from PyPDF2 import PdfFileReader from os import listdir import os.path from os.path import isfile, join import warnings #import tempfile import PIL.Image from wand.image import Image from wand.color import Color import requests import glob import skimage import pytesseract import cv2...
""" http://ssl.mit.edu/files/website/theses/SM-2011-McLinkoRyan.pdf """ import numpy as np from numpy import array, zeros, arange, searchsorted, unique, cross from numpy.linalg import norm # type: ignore from pyNastran.dev.bdf_vectorized.cards.elements.shell.shell_element import ShellElement from pyNastran.bdf.field...
import os.path import warnings import attr import cattr from typing import ( Dict, Optional, List, Any, DefaultDict, Mapping, Tuple, Union, ClassVar, ) from enum import Enum import collections import argparse import abc import numpy as np import math import copy from mlagents.train...
# TODO(matt): Reformat script. """ Big Data Training ================= """ ############################################################################### # train ############################################################################### import argparse import collections import os import sys import time from ty...
# Copyright (c) 2021 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...
# Copyright (c) 2018 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...
# ***** BEGIN GPL LICENSE BLOCK ***** # # # 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 2 # of the License, or (at your option) any later version. # # This program is distribute...
# LIBTBX_SET_DISPATCHER_NAME prime.print_integration_pickle """ Author : Uervirojnangkoorn, M. Created : 11/1/2015 Description : read integration pickles and view systemetic absences and beam X, Y position """ from __future__ import absolute_import, division, print_function from six.moves import cPickle as pi...
# coding: utf-8 from __future__ import unicode_literals from dmutils.email import send_email, EmailError, hash_email from flask.globals import current_app import flask_featureflags as feature import six import csvx import pendulum import io import re import rollbar import os import botocore from collections import Orde...
#! python3.6 """ Author: <NAME>, 2017 """ import os import math import pickle import random from typing import * import numpy as np # from EvolutionaryAlg import * import NNGenome as gn import torch, torch.optim import torch.autograd from torch.autograd import Variable import torch.nn as nn import torch.nn.function...
import warnings import numpy as np from nitime.lazy import scipy_stats_distributions as dist from nitime.lazy import scipy_fftpack as fftpack from nitime import descriptors as desc from nitime import utils as tsu from nitime import algorithms as tsa # To support older versions of numpy that don't have tril_indices: ...
# -*- coding: utf-8 -*- # # Copyright 2017 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
import pygame, time # setting up constants PLAYING = 'playing' PAUSED = 'paused' STOPPED = 'stopped' # These values are used in the anchor() method. NORTHWEST = 'northwest' NORTH = 'north' NORTHEAST = 'northeast' WEST = 'west' CENTER = 'center' EAST = 'east' SOUTHWEST = 'southwest' SOUTH = 'south' S...
# Copyright (C) 2021 Xilinx, Inc # # SPDX-License-Identifier: BSD-3-Clause from graphviz import Digraph import json import numpy as np import os from .parser import HWHComposable from pynq import DefaultIP, DefaultHierarchy from pynq.utils import ReprDict from .repr_dict import ReprDictComposable from typing import Ty...
import math from typing import Dict, List, Union, Type, Any, Tuple, Iterable, Sequence, TypeVar from abc import ABC, abstractmethod import numpy from netzob.Model.Vocabulary.Messages.AbstractMessage import AbstractMessage ### MessageAnalyzer base class ######################################### class MessageAnalyz...
import tensorflow as tf from tensorflow.python.platform import tf_logging as logging from tensorflow.core.framework import node_def_pb2 from tensorflow.python.framework import device as pydev from tensorflow.python.training import basic_session_run_hooks from tensorflow.python.training import session_run_hook f...
"""show_lldp.py supported commands: * show lldp * show lldp entry * * show lldp entry [<WORD>] * show lldp interface [<WORD>] * show lldp neighbors * show lldp neighbors detail * show lldp traffic """ import re from genie.metaparser import MetaParser from genie.metaparser.u...
import os, argparse, logging, jpype, random, gzip, shutil, zlib from collections import defaultdict from itertools import groupby import numpy as np from jpype import * import tensorflow as tf from utils import Vocab, WordVector, load_from_html, load_from_query_file, load_train_test_file, \ save_train_test_fil...
""" Read/write probe info using a variety of formats: * probeinterface (.json) * PRB (.prb) * CSV (.csv) * mearec (.h5) * spikeglx (.meta) * ironclust/jrclust (.mat) * Neurodata Without Borders (.nwb) """ import os import csv from pathlib import Path import re from pprint import pformat, pprint import js...
from abc import ABC, abstractmethod from typing import TYPE_CHECKING, Type, Optional, ClassVar, Union import attr import numpy as np import corrscope.utils.scipy.signal as signal import corrscope.utils.scipy.windows as windows from corrscope.config import KeywordAttrs, CorrError, Alias, with_units from corrscope.spec...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Jul 29 18:33:36 2021 @author: peter """ from pathlib import Path from vsd_cancer.functions import cancer_functions as canf import numpy as np import pandas as pd import scipy.ndimage as ndimage import matplotlib.pyplot as plt import f.plotting_functio...
from abc import ABC, abstractmethod from distutils.version import StrictVersion import numpy as np import torch from torch import nn from torch.nn import functional as F from typing import * from src.dataloaders.dataloader_meta_info import DataloaderMetaInfo from src.enums import * from src.learning.models.adf import ...
import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import scipy, os, glob, sys, re from matplotlib import image sys.path.append('pygazeanalyser') from gazeplotter import parse_fixations, gaussian def load_data(sub, session = None, part = None, in_concise = False, out_concise =...
import requests import json import csv import re from bs4 import BeautifulSoup import pandas as pd import time # python 3 def get_many_uid(uid_list): url="https://api.bilibili.com/x/v2/reply?type=1&oid=" av='505795736' html=url+av+'&pn=' count=1 while(True): if count==5...
# Authors: <NAME> <<EMAIL>> # # License: BSD (3-clause) from copy import deepcopy from pathlib import PosixPath import warnings import pandas as pd import numpy as np from numpy import array_equal, where from h5io import read_hdf5, write_hdf5 with warnings.catch_warnings(record=True): warnings.simplefilter('igno...
import os from .messgen_ex import MessgenException from .json_generator import JsonGenerator PROTO_ID_VAR_TYPE = "uint8_t" PROTO_MAX_MESSAGE_SIZE_TYPE = "uint32_t" MESSGEN_NAMESPACE = "messgen" MESSAGE_ID_C_TYPE = "uint8_t" MESSAGE_SIZE_C_TYPE = "size_t" MESSAGE_PROTO_C_TYPE = "uint8_t" TYPE_FIELD_SIZE = 1 DYN_FIELD...
## @package street_params # Parameter settings import numpy as np from easydict import EasyDict as edict import os.path as osp from pycaffe_config import cfg import os import pdb import subprocess import matplotlib.pyplot as plt import mydisplay as mydisp #import h5py as h5 import pickle import matplotlib.path as mplP...
# coding=utf-8 """ Create/store dataset data into storage units based on the provided storage mappings. Important functions are: * :func:`reproject_and_fuse` * :func:`read_from_source` """ from __future__ import absolute_import, division, print_function import logging import math from contextlib import contextmanag...
import numpy as np from tqdm import tqdm import geopy from geopy.distance import distance from shapely import geometry from pvlib import solarposition import pandas as pd import geopandas as gpd from matplotlib import pyplot as plt import os import os.path as osp import pickle from datetime import datetime import xarra...
from __future__ import with_statement from contextlib import contextmanager import oscar.snac as snac import oscar import common import struct from oscar.ssi import item, OscarSSIs, SSIException, ssi_err_types from util import gen_sequence, lookup_table, callsback from oscar.ssi.SSIItem import tuple_key fro...
"""Tests the tools defined by :mod:`hyperparameter_hunter.space.dimensions` and :mod:`hyperparameter_hunter.space.space_core` Notes ----- Many of the tests defined herein (although substantially modified) are based on those provided by the excellent [Scikit-Optimize](https://github.com/scikit-optimize/scikit-optimize)...
import matplotlib.pyplot as plt import tensorflow as tf import numpy as np import argparse import random import math import cv2 import os from model.resnet34 import resnet18, resnet34 from model.resnet50 import resnet50, resnet110, resnet152 from model.serenset50 import se_resnet50, se_resnet110, se_resnet152 from ...
#!/usr/bin/env python3 import argparse import os import platform import struct import subprocess import sys import time import yaml from typing import Dict, List, Optional, Set, Tuple from arcadeutils import FileBytes, BinaryDiff from naomi import NaomiRom, NaomiRomRegionEnum, NaomiSettingsPatcher, NaomiSettingsTypeEn...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: <NAME>, Sapienza University, Roma, Italy """ import numpy as np from .ThermoKinetics import CanteraThermoKinetics class CanteraCSP(CanteraThermoKinetics): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.jaco...
import core import datetime import logging import time import os import shutil from core.helpers import Comparisons import sqlalchemy as sqla logging = logging.getLogger(__name__) current_version = 9 def proxy_to_dict(p): ''' Conversts sqla resultproxy to dict p (resultproxy): response from sqla call ...
# Copyright (c) 2018 Anki, 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 in the file LICENSE.txt or at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
"""General definitions for classifiers. """ # FIXME[concept]: there should be a connection between network # and suitable datasets/labels, i.e., AlexNet should provide # class labels, even if not applied to ImageNet data # standard imports from typing import Union, Tuple, Iterable, Any, Sequence, Optional from t...
from SparseSC.fit_fold import fold_v_matrix, fold_score from SparseSC.fit_loo import loo_v_matrix, loo_score, loo_weights from SparseSC.fit_ct import ct_v_matrix, ct_score #-- from SparseSC.optimizers.cd_line_search import cdl_search from SparseSC.lambda_utils import get_max_lambda, L2_pen_guestimate import atexit i...
from __future__ import print_function import tensorflow as tf from tensorflow.python.ops import variable_scope from tensorflow.python.ops import nn_ops def add_first_word_prob_to_atten_dists(in_passage_words, phrase_starts, vocab_dist, attn_dist): ''' in_passage_words: [batch_size, passage_length] phrase_s...
import os import copy import time import decimal import operator import numpy as np from distutils.dir_util import copy_tree from nball4tree.config import cgap, L0, R0, DIM, DECIMAL_PRECISION from nball4tree.util_train import get_children from nball4tree.util_vec import vec_norm, qsr_DC, qsr_DC_degree, qsr_P, qsr_P_deg...
""" Created on Mon Nov 05 03:52:36 2018 @author: Paul """ ### Boiler-Plate ### from threading import Thread import matplotlib.pylab as plt import numpy as np import scipy as sp from numpy import random import time from Func import * from iapws97 import _PSat_T ######################################...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 20...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. # TODO(aivanou): Update documentation import argparse import copy import inspect import js...
#!/usr/bin/env python3 # -*- coding=utf-8 -*- """ ## Documentation This application aims to visualize local geometric informations about a molecular structure using the [`pychemcurv`](https://pychemcurv.readthedocs.io/) package. In particular, the application computes geometric quantities which provide an insight of...
############################################################################### ## Bisquik ## ## Center for Bio-Image Informatics ## ## University of California at Santa Barbara ## ...
import copy import json import os.path import re import trac.ticket.model as model from trac.core import implements, TracError from trac.ticket.api import TicketSystem from trac.util.datefmt import to_timestamp from trac.web import IRequestHandler from trac.web.api import parse_arg_list from trac.web.chrome import IT...
import configparser import os import datetime import platform import socket import netifaces import json import pwd import glob import logging import logging.config from math import floor from sys import stdout, exit from pathlib import Path import requests import pkg_resources from cryptography import x509 from crypt...
# Copyright 2022, 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...
#!/usr/bin/python # (c) 2020, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ NetApp ONTAP Info using REST APIs """ from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
import hashlib import hmac import time from copy import copy from datetime import datetime, timedelta from enum import Enum from typing import Any, Dict, List, Sequence from decimal import Decimal import pytz import base64 import json from requests.exceptions import SSLError from quant.trader.constant import ( D...
import pandas as pd import os as os import sqlite3 import matplotlib.pyplot as plt import re import time import numpy import PySimpleGUI as sg import sys import os import json import zipfile import pathlib from pandas import DataFrame from pollination_streamlit.selectors import job_selector from pollination_streamlit....
# coding: utf-8 from datetime import datetime, timezone from unittest.mock import MagicMock, patch import pytest import simplejson as json from jinja2 import Undefined from mock import Mock from app.jinja_filters import ( OtherConfig, SummaryRow, format_datetime, format_duration, format_number, ...
import math import os import re from datetime import datetime from flexget import plugin from flexget.entry import Entry from flexget.event import event from loguru import logger from .ptsites.client.qbittorrent_client import QBittorrentClientFactory class QBittorrentModBase: def __init__(self): self.cl...
import numpy as np import scipy import sympy import scipy.sparse as sps import math import porepy as pp import xlsxwriter # Analytical solution x, y = sympy.symbols('x y') p0 = 1 #reference pressure #grid L = 1 n = 64 domain = np.array([L, L]) grid_dims = np.array([n, n]) pert = 0.5 # Define data phi = 0.2 r...
""" .. module:: function_defs :synopsis: Helper functions for the UV Ceti gPhoton notebook tutorials, used to re-create the data and figures used in the paper. .. moduleauthor:: <NAME>, <NAME> """ import itertools import os from astropy.io import fits as pyfits from astropy import wcs as pywcs f...
from __future__ import annotations from abc import abstractmethod from dataclasses import dataclass from enum import Enum, auto import math from typing import ( Any, Generic, Iterator, List, Sequence, Sized, TypeVar, cast, overload, ) import numpy as np import numpy.typing as npt im...
### Dependencies are: # numpy - for matrix manipulation # sklearn - for implementing spectral clustering and standard PCA # pandas - to check type of dataframes and convert to numpy arrays in method cpca_alpha ### from __future__ import print_function import numpy as np from numpy import linalg as LA from sklearn impo...
# A module for windowing and windowed functions useful for convolution, pooling, and other such operations including # indexing C-style row major arrays in their ravelled flat forms. # <NAME> import numpy as np from numpy.fft import (rfftn, irfftn) from scipy.fftpack import (fftn, ifftn) from numpy.lib.stride_tricks ...
"""Probabilistic models for asteroseismic oscillation mode frequencies. """ from __future__ import annotations import numpy as np import jax.numpy as jnp import numpyro import numpyro.distributions as dist from numpyro.distributions.distribution import Distribution from numpyro.primitives import Messenger, plate, a...
import math import pygame import random from CombatSystem import projectiles, collectibles, screenElements, currentConfigurations, spriteSheetManager from common import gameConstants as gc, keyBinding from pygame import mixer class deltaTime: def __init__(self): self.prevTime = pygame.time.get_ticks() ...
""" Actuators that are based purely on Micro-Manager and can be used directly with the demo config. This is interesting, if you already have set up a lot of details about your acquisition and maybe make extensive use of the on-the-fly pipeline in Micro-Manager. If this is not the case, have a look at the actuators.pyc...
"""Implementation of the Conv-LSTM-CTC network model including: audio_to_spectrogram converting, 3-layer convolutional residual net (each layer: conv, res, res, max_pool) , backward LSTM and two fully-connected layers. """ import numpy as np import tensorflow as tf from tensorflow.python.ops import io_ops from t...
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import io import ast import six import sys import pytest import datetime from sqlalchemy import create_engine from tabulator import Stream, except...
#!/usr/bin/env python3 import collections import logging import logging.handlers from typing import Dict, List, Optional import i3ipc from i3wsgroups import icons WORKSPACE_NAME_SECTIONS = [ 'global_number', 'group', 'static_name', 'dynamic_name', 'local_number', ] # Unicode zero width char. SEC...
#!/usr/bin/python3 import re import urllib.request import urllib.parse import http.cookiejar import json from datetime import datetime, timezone, timedelta import binascii def dehtml(html): """ convert html to somewhat readable text. """ html = re.sub(r"</p>|<br>", "\n", html) html = re.sub(r"</?\w...
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------------- # Description # Utility functions to deal with Cantera input/output # # --------------------------------------------------------------------------------- import importlib import datetime import numpy as np import w...
import os import numpy as np import pandas as pd from datetime import datetime as dt import logging import csv import time import matplotlib.pyplot as plt from telemanom.helpers import Config from telemanom.errors import Errors import telemanom.helpers as helpers from telemanom.channel import Channel from telemanom.mo...
import math, pymunk, pyglet, random from util import env, draw, particle, physics from util import resources, settings, sound import bullet, level, pyro, event image_table = dict( Unit=None, Beacon=resources.beacon_1, BlueTurret=resources.turret1_blue, Bomb=resources.bomb_static, Brain=resources.co...
""" SHERPA is a Python library for hyperparameter tuning of machine learning models. Copyright (C) 2018 <NAME>, <NAME>, and <NAME>. This file is part of SHERPA. SHERPA 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 Founda...
# Copyright 2017-2019 Manheim / Cox Automotive # # 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 t...
import sys import numpy as np import matplotlib.pyplot as plt import scipy.linalg as LA import scipy.sparse.linalg as spLA from scipy.signal import argrelextrema import majoranaJJ.modules.checkers as check import majoranaJJ.operators.sparse_operators as spop #sparse operators import majoranaJJ.modules.SNRG as SNRG imp...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** 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 _utilities fro...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import warnings import logging try: from pathlib import Path except ImportError: from pathlib2 import Path import torch.nn from torch.optim import Optimizer impor...
import numpy as np import pandas as pd import random import sys from sklearn import model_selection import tensorflow as tf import pickle from utils import * from sklearn.metrics import roc_auc_score import argparse import tensorflow_constrained_optimization as tfco def pair_pos_neg_docs(data): # Returns a DataFram...
import argparse import configparser import glob import logging import os import pathlib import re import shutil import subprocess import sys import traceback import zipfile import hashlib # A script to execute a main class of a Maven artifact # which is available locally or from Maven Central. # # Works using the mave...
#!/usr/bin/env python """ Sample program to run on Raspberry Pi (headless) or Windows (using ORBCOMM/SkyWave Modem Simulator) or Multitech Conduit with serial mCard (AP1 slot). Periodically queries modem status, checks for incoming messages and sends location reports Dependencies: - (REQUIRED) crcxmodem.py calculate...
#!/usr/bin/env python # # Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/ # Written by <NAME> <<EMAIL>> # """This script aims to be the single experiment script for fast prototyping of importance sampling methods""" import argparse from bisect import bisect_right from contextlib import contextmanage...
#@author ol-<( ConciseVerbosity18 import numpy as np import pandas as pd import os from scipy.optimize import fsolve from scipy.integrate import quad from numpy import NaN from scipy.interpolate import interp1d from matplotlib import pyplot as plt kb = 1.38064852e-23 avnum = 6.022e23 c_light = 299792458 pi = 3.14159...
# Copyright <NAME> 2011-2019 # Copyright <NAME> 2012 # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) #------------------------------------------------------------------------------- #...
import numpy as np import mat import fu from spectacle.linearity import sRGB_generic from matplotlib import pyplot as plt, patches from scipy.spatial import minkowski_distance from colorio._tools import plot_flat_gamut from mpl_toolkits.axes_grid1 import AxesGrid FU_LMS_deficiency = np.einsum("caij,fj->cafi",mat.SLMS,...
# -*- coding: utf-8 -*- import os import sys sys.path.append(os.getenv('HOME') + '/bin/python/libs') # just in case notebook was not launched with the option #%pylab inline import pylab as plt import numpy as np from scipy import sparse from matplotlib.mlab import griddata from matplotlib.ticker import MaxNLocator f...
import os import sys import math import numpy as np from argparse import Namespace from collections import defaultdict import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader from torchvision.utils import save_image from config import get_cfg # models from models.volu...
# from .pos_graph_arch import gat_architecture, gcn_architecture, base_architecture import math import torch from torch import Tensor from torch import nn import torch.nn.functional as F from typing import Any, Dict, List, Optional, Tuple import fairseq from fairseq import utils from fairseq.models import (FairseqEnco...
#!/usr/bin/python3 # # Copyright 2018, The Android Open Source Project # # 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 b...
""" Licensed under a 3-clause BSD style license - see LICENSE.rst cloudynight - Tools for automated cloud detection in all-sky camera data (c) 2020, <NAME> (<EMAIL>) """ import os import requests import shlex import subprocess import datetime from joblib import dump, load from collections import OrderedDict import...
"""Copyright 2010 <NAME>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following dis...
# -*- coding: utf-8 -*- import os from math import tan, radians import pythoncom from win32com.client import Dispatch, gencache PART_NUMBER = '06' PART_NAME = 'Поручень крайний прямой секции' DIM_MIN = 500 DIM_MAX = 2000 CODE1 = '002' CODE2 = '99' # DXF_FOLDER = f'D:\\youriy\\NCC\\Перила и Лотки\\Catalog\\.{CODE1}...
from django.shortcuts import render, redirect, HttpResponseRedirect from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.contrib.auth.forms import PasswordChangeForm from django.contrib.auth.mixins import LoginRequiredMixin...
import numpy as np import tensorflow as tf import math import time import threading import functools import struct class Testcase(object): def __init__(self): self.h = 0 self.r = 0 self.w = 0 self.t = 0 self.candidates = [] class PME(object): def __init__(self, input_...
# Code for Discovering Dynamic Salient Regions with Spatio-Temporal Graph Neural Networks # https://arxiv.org/abs/2009.08427 # DyReG import torch from torch import nn from torch.nn import functional as F import matplotlib.pyplot as plt import matplotlib.colors as colors import sys import os sys.path.append(os.path.a...
""" Module to read ANSYS ASCII block formatted CDB files USAGE # load module import pyansys # load ANSYS cdb file archive = pyansys.Archive('example.cdb') # Parse the raw data into a VTK unstructured grid grid = archive.parse_vtk() # Plot the result grid.plot() """ import warnings import sys import logging import...
# This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # # Copyright (c) 2017-2021 OWS Contributors # SPDX-License-Identifier: Apache-2.0 import io import logging from typing import (Any, Iterable, List, Mapping, MutableMapping, Optional, ...
from collections import Counter from pathlib import Path import pickle as pkl import networkx as nx import scipy.sparse as sp import numpy as np import sys PLANETOID_DATA = [ 'cora','citeseer','pubmed', 'nell.0.1', 'nell.0.01', 'nell.0.001', ] PITFALL_DATA = [ 'a...
import math import os import random import time import traceback from tempfile import mkstemp import youtube_dl from gtts import gTTS from utils import register_command, get_server import utils import discord import asyncio @register_command("tts", "say") async def text_to_speech(message, bot_channel, client): ...
""" Module for controlling deliveries of samples and projects """ import datetime import glob import json import logging import os import re import signal import shutil import yaml from taca.utils.config import CONFIG from taca.utils.filesystem import create_folder, chdir from taca.utils.misc import call_external_...
""" MIT License Copyright (c) 2022 MShawon Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distr...
""" Molecule.py Defitions for molecule class """ import numpy as np from opt_einsum import contract import matplotlib.pyplot as plt import psi4 from .xc import functional_factory from .xc import xc from .xc import u_xc class Molecule(): def __init__(self, geometry, basis, method, mints = Non...
import os from typing import Optional, Union import scanpy as sc from anndata import AnnData import numpy as np import pandas as pd from matplotlib import pyplot as plt from .models import Model from . import logger import warnings warnings.simplefilter(action='ignore', category=FutureWarning) warnings.simplefilter(act...