text
stringlengths
6.04k
39.5k
''' This is where we handle the initialization of the estimated oil properties. This will be the 'real' oil record that we use. Basically, we have an Estimated object that is a one-to-one relationship with the Oil object. This is where we will place the estimated oil properties. ''' import logging...
""" Read and model eddy covariance high-frequency time series data. The following notation is used in variable naming to represent meteorological quantities (SI units):: u, v, w = wind velocities (m/s) q = water vapor mass concentration (kg/m^3) c = carbon dioxide mass concentration (kg/m^3) T = air t...
import torch.nn as nn from .XConv import XConv,View import math import torch import sys sys.path.append("..") import config from torch_geometric.nn import fps class PointCNN(nn.Module): sampling_method = ['random', 'fps'] # "random": random sampling; "fps": farthest point sampling def __init__(self, setting...
#!/bin/python3.6 from os import environ from os import error from os import remove from subprocess import call from subprocess import CalledProcessError from subprocess import check_call from subprocess import DEVNULL from subprocess import PIPE from subprocess import STDOUT from subprocess import Popen from sys impor...
#!/usr/bin/python # coding=utf-8 import re import os import requests import pandas as pd import time import random from lxml import etree from requests import exceptions def get_current_time(): return time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) def get_source_page(url): ''' 使用 Session 能够跨请求保持某些...
import wrap_class import re import sys import string import args # global dictionary of argument types types = dict() classes = dict() typedefs = dict() variables = dict() enumvalues = dict() files = dict() operatorfunctions = [] classes_bla...
#!/usr/bin/env python # encoding: utf-8 # The MIT License (MIT) # Copyright (c) 2014-2019 CNRS # 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 limita...
# Copyright 2020 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# Common input & data reading routines for the electron ID # # <NAME>, 2021 # <EMAIL> import copy import math import argparse import pprint import psutil import os import datetime import json import pickle import sys import numpy as np import torch #import uproot4 import uproot import awkward as ak import multiproces...
""" Some simple models with multinomial observations and Gaussian priors. """ import numpy as np from scipy.special import gammaln from scipy.misc import logsumexp from pybasicbayes.abstractions import Model, ModelGibbsSampling from pylds.states import LDSStates from pylds.lds_messages_interface import filter_and_sa...
"""Definitions of frictional point contacts, contact maps, basic wrench space calculation subroutines, and performing equilibrium testing. """ from . import ik from ..math import vectorops,so3,se3 from .. import robotsim from ..robotsim import RobotModel,RobotModelLink,RigidObjectModel,TerrainModel def idToObject(wor...
import sqlalchemy from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import MetaData, inspect import pandas as pd import dask.dataframe as dd import app.main.metadados as metadados class ComandoSql: def __init__(self, comandos, conexao_usuario): self.id = comandos.cons_id s...
#!/usr/bin/env python # Copyright 2017 Calico 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 ...
import numpy as np import matplotlib.pyplot as plt import pyvista as pv import pandas as pd from skimage import measure from scipy.integrate import simps from scipy.interpolate import griddata import geopandas as gpd from shapely.geometry import MultiPolygon, Polygon from zmapio import ZMAPGrid def poly_area(x,y): ...
#!/usr/bin/env 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 requir...
# -*- coding:utf-8 -*- # # Copyright (C) 2008 - <NAME> <<EMAIL>> # # Distributed under the BSD license, see LICENSE.txt import os import sys from lxml import etree from pyquery.pyquery import PyQuery as pq from pyquery.ajax import PyQuery as pqa from webtest import http from webtest.debugapp import debug_app from .apps...
#!/usr/bin/env python3 import argparse import sys import re import csv import os import pandas as pd sys.path.append('../') from logparser import Face from excel import Excel # # default value # input_acc_file= 'accuracy.txt' output_dir = 'result/' # The output directory of parsing results input_d...
from ._interval import * # ------------------------------------------------------------------------------ class StatisticalFunction: MIN = "MIN" MAX = "MAX" AVG = "AVG" SUM = "SUM" COUNT = "COUNT" FIRST = "FIRST" LAST = "LAST" DELTA = "DELTA" COUNTER = "COUNTER" MEDIAN = "MEDIA...
import random import discord import urllib import secrets import asyncio import aiohttp import re import base64 import binascii import codecs import discord from PIL import Image, ImageDraw, ImageFont, ImageOps from io import BytesIO from discord.ext import commands from utility import http, argparser, default msgend...
############################################# # Object detection via RTSP - YOLO - OpenCV # Author : <NAME> (Dec 11, 2018) # Website : https://www.github.com/zishor ############################################ import os import os.path import cv2 import argparse import numpy as np import imageio_ffmpeg as imageio imp...
import config import datetime import os.path import re import util import paramiko import bisect #from secIdBimap import SecIdBimap import newdb database = newdb.get_db() class Position: def __init__(self, secid, cusip, ticker, isin, size, price): self.secid = secid self.cusip = cusip self...
#!/usr/bin/env python import operator import rospy import rospkg import os import cv2 import numpy as np from keras.models import load_model from std_msgs.msg import String from sensor_msgs.msg import Image, CompressedImage, RegionOfInterest from face_classification.srv import FaceClassificationBuffered , FaceClassi...
# import pipimport # pipimport.install() # pip3 install riotwatcher # pip install pandas # pip install Pillow # pip install scipy # pip install webcolors import tkinter from tkinter import * import sys import os import __listener__ import __lol__ from __lol__ import Regions import PIL from PIL import ImageTk, Image im...
'''Sphinx extension that provides directives for automatically generating documentation for the three types of dynamically loaded modules used by SC: flows, foundries, and tools. ''' from docutils import nodes from sphinx.util.nodes import nested_parse_with_titles from docutils.statemachine import ViewList from sphinx...
#!/usr/bin/env python ########################################################### ## ## ## acts.py ## ## ## ## Author: <NAME> ## ## ...
import os import subprocess import shutil import time import sys import signal import xml.etree.ElementTree as ET from pathlib import Path import argparse import json from data_visualizer import ParsedData, DataVisualizer def main(): Path("./temp/").mkdir(parents=True, exist_ok=True) Path("./temp/parse").mkdi...
# -*- coding: utf-8 -*- import json import os import re def import_dir(name, fromlist=()): PACKAGE_EXT = '.sublime-package' dirname = os.path.basename(os.path.dirname(os.path.realpath(__file__))) if dirname.endswith(PACKAGE_EXT): dirname = dirname[:-len(PACKAGE_EXT)] return __import__('{0}.{1}...
import datetime import numpy as np import os import pandas as pd import requests import time import timeit import zipfile ''' Variables to update: * ANNO_JOB: Job ID of ADAP job where each chunk is annotated by 2 annotators * DISAGREEMENT_RESOLUTION: Job ID of ADAP QA job where only disagreements betwe...
#!/usr/bin/env python3 import fnmatch import functools import glob import hashlib import json import logging import operator import os import pathlib import plistlib import shlex import shutil import stat import subprocess import sys import tarfile import tempfile from string import Template from typing import List fr...
import math import torch import torch.nn as nn import torch.nn.functional as F from torch.distributions.categorical import Categorical from torch.distributions.multivariate_normal import MultivariateNormal from UTILS.tensor_ops import my_view, Args2tensor_Return2numpy, Args2tensor from ..commom.norm import DynamicNorm ...
from tkinter import * from tkinter import filedialog as FileDialog from io import open from tkinter import scrolledtext import tkinter as tk from grammar import analyze from grammar_result import * from execution.execute import * from execution.execute_result import * from execution.AST.error import * from Tytus_GUI...
from typing import List,Dict from collections import namedtuple import subprocess from Utility.parallel_generator import parallel_generator from Utility.generators_utilities import class_generator from Utility.Fastq_class import Fastq import multiprocessing import itertools import os import re import logging import Uti...
# This is a lib of inf553 assignments import json import logging import os import time from math import sqrt from random import sample import random import matplotlib.pyplot as plt def timer(f): def wrapper(*args, **kwargs): startTime = time.time() # print(*args) result = f(*args, **kwarg...
#! /usr/bin/env python3 ''' tool for removing duplicate files ''' import argparse import functools import hashlib import logging import os import re import sys import textwrap from collections import defaultdict, namedtuple __author__ = '<NAME>' __email__ = '<EMAIL>' __license__ = 'MIT' __version__ = '0.14' __credits_...
# Copyright 2021 DeepMind Technologies Limited. 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 ...
import pandas as pd import logging import os from collections import defaultdict from annotation.utility import Utility _logger = logging.getLogger(__name__) TYPE_MAP_DICT = {"string": "String", "number": "Quantity", "year": "Time", "month": "Time", "day": "Time", "date": "Time", "entity": 'WikibaseIt...
import pygame import time import sys import random import os class Register: def __init__(self, bits): self.value = 0 self.bits = bits ''' def checkFlag(self): hexValue = hex(self.value)[2:] carryORborrow = False if self.value < 0: self.value = abs(...
""" Module to write truth catalogs for SNe using the SNe parameters db as input. """ import os import sys import re import sqlite3 import numpy as np import pandas as pd import warnings from multiprocessing import Process, Lock from yaml import load as yload from yaml import FullLoader from lsst.sims.catUtils.supernov...
""" davies.pockettopo: Module for parsing and working with exported PocketTopo survey data """ from __future__ import division from __future__ import print_function import re import codecs import logging from datetime import datetime from collections import OrderedDict, defaultdict log = logging.getLogger(__name__) ...
#!/usr/bin/env python3 import sys import json import struct import socket import traceback CONF = None PREFIX_GROUPS_BY_HOST = {} PREFIX_GROUPS_BY_NAME = {} HOSTS_BY_PREFIX_GROUP = {} ENDPOINT_LOOKUP = {} # Find prefix-groups by allocated IP address class MyException(Exception): pass ...
""" This module is a convenient and efficient tool for loading results metrics of multiple model training iterations into a single MegaScanner object. Metrics files can be loaded from disk and plotted for comparative model analysis and evaluation. Using this approach assumes model training results files match those gen...
import pathlib import platform import random import string import discord import pytz import requests from PIL import Image from discord.ext.commands import BucketType from discord_slash.utils.manage_commands import ( SlashCommandPermissionType, create_permission, ) from dotenv import load_dotenv from utiliti...
from shutil import copyfile from pyexcel_ods import save_data as save_ods_data from collections import OrderedDict import numpy as np import os import pandas as pd from MyDate import MyDate from Institution import Institution from typing import Tuple, List, Union import ezodf import xlsxwriter def validate_main_sprea...
import pygame, sys, os, time, math #initialising variables scrwid = 800 scrhei = 600 squsize = 50 fps = 30 enemylist = [] towerlist = [] bulletlist = [] iconlist = [] senderlist = [] def imgLoad(file,size=None): #to enable pixel perfect collision for transparent images image = pygame.image.load(file).conver...
import os import sys import time import logging import argparse import warnings import itertools import pandas as pd class CommonData(object): ''' This class is used to read common data for specific analysis ''' def __init__(self, snp_only=False): warnings.filterwarnings('ignore') s...
""" Module to train and run LISRD. """ import warnings warnings.filterwarnings(action='once') warnings.filterwarnings("ignore", message="numpy.ufunc size changed") import numpy as np from copy import deepcopy import torch import torch.nn as nn import torch.nn.functional as func from .base_model import BaseModel, Mode...
"""Data Manager Metadata Class Definitions. Note that the Metadata class is pickled when saved in the database so that we can hold the annotations as an ordered list of objects. The other classes should be searialisable without pickling hopefully: Hints: https://pynative.com/make-python-class-json-seri...
#!/usr/bin/python import sys MAJOR = sys.version_info[0] import os import time from optparse import OptionParser import tempfile from config import * from util import err from util import out from util import warn from util import fatal from util import run_jam from util import run_unpacker from util import run_repack...
#!/usr/bin/env python3 import string import unittest operators = ["+","-", "*", "/", "%","++", "--", "==", "!=", ">", "<", ">=", "<=", "&&", "||", "!", "&", "|", "^", "~", "<<", ">>", "=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", "&=", "^=", "|=", "?"...
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np # Taken from https://github.com/vidursatija/BlazeFace-CoreML/blob/master/ML/blazeface.py class ResModule(nn.Module): def __init__(self, in_channels, out_channels, stride=1): super(ResModule, self).__init__() self.stride = stride...
from collections import defaultdict, ChainMap from datetime import date from contextlib import contextmanager from typing import Optional, Dict, Sequence, Mapping, NamedTuple, Set import jinja2 import yaml from .utils.template_utils import FakerTemplateLibrary from .utils.yaml_utils import SnowfakeryDumper, hydrate ...
""" Run minimizations and equilibrations for a given structure in an anchor. """ import sys import os import time from shutil import copyfile from copy import deepcopy import numpy as np import parmed try: import openmm.app as openmm_app import openmm except ImportError: import simtk.openmm.app as o...
import random import skimage as skimage from skimage import transform, color, exposure from skimage.viewer import ImageViewer import random from random import choice import numpy as np from collections import deque import time import json from keras.models import model_from_json from keras.models import Sequential, l...
""" Analysis dashboards module. """ import copy from datetime import timedelta import numpy as np import pandas as pd import logging from flask_login import login_required from flask import render_template, request from sqlalchemy import and_ from app.dashboards import blueprint from utilities.utils import parse_...
import datetime from datetime import date from django.db import models from django.utils import timezone from django.core.exceptions import ValidationError, ObjectDoesNotExist from django.core.validators import MaxValueValidator, MinValueValidator, int_list_validator # Useful links: # https://django-book.readthedocs...
from io import StringIO import json import logging import os.path import tempfile import time import mock from flask import request import pytest from dmtestutils.comparisons import AnyStringMatching, AnySupersetOf, RestrictedAny from dmutils.logging import init_app, JSONFormatter, CustomLogFormatter, configure_han...
from django.http.response import HttpResponse from tablib.core import Dataset from .admin import DespesaResource from calendar import monthrange import datetime as dt from itertools import chain from django.db.models.aggregates import Sum from django.db.models.functions.datetime import TruncMonth from django.db.models....
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' Created on Tuesday - September 08 2020, 18:12:48 @author: <NAME>, University of Glasgow Training using BIDS format in input. ''' ################################################################################################################ ## Imports from __futu...
# This library is a modified extract from PyGraphics developed at the #University of Toronto # Aug 2010: fixed envelope for stereo sounds; further restructuring '''The Sound class and helper functions. This currently supports only uncompressed .wav files. For best quality use .wav files with sampling rates of either ...
import calendar import datetime import os import time from random import randint import numpy as np import pandas as pd from bs4 import BeautifulSoup from pandas.io.common import EmptyDataError from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.comm...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test Tokenizers ---------------------------------- Tests for Tokenizers in the `text_preparation.tokenizers` module. """ import pytest from mindmeld.text_preparation.tokenizers import ( LetterTokenizer, WhiteSpaceTokenizer, SpacyTokenizer, CharacterTo...
from enum import Enum import os import signal import argparse import sys import logging import subprocess import stat import threading import urllib.request from pathlib import Path import ssl import platform import tarfile import time import typing import json import zipfile class DebugMode(Enum): """Debugging mo...
#!/usr/bin/env python3 # coding=utf-8 # # Python Script # # Copyleft © <NAME> # # import pandas as pd # sudo pip install pandas import numpy as np # sudo pip install numpy from distutils.spawn import find_executable from optparse import OptionParser from os import path import os import time import itertools imp...
import sys import pygame from pygame.locals import * from moviepy.editor import VideoFileClip BLACK = (0, 0, 0) RED = (255, 0, 0) GREEN = (0, 255, 0) BLUE = (0, 0, 255) WHITE = (0, 0, 0) SKY_BLUE = (85, 196, 255) SCREENWIDTH = 720 SCREENHEIGHT = 405 FPS = 60 class Excitement(pygame.sprite.Sprite): def __init__...
from random import randrange ''' text based adventure game w/ monsters ''' #----------------------------------------------------------------start-------------------------------------------------------------- print('welcome to doomstayington!') name = input('\nYou are a survivor, what is your name: ') print(n...
#!/usr/bin/env python3 """ vdb_test.py: Test the Variant DB. Run manually because these tests cost money. To run under bazel, using the default "vdb" database and "spiral-vdb" bucket: bazel test //python/functest:vdb_test """ import unittest import subprocess import tempfile import os import logging # from pathlib ...
import copy,datetime,re from twitchstreams.twitchapi import TwitchAPI #from site_specific_settings import CLIENT_ID from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, HttpResponseNotFound from django.template import loader, RequestContext from twitchstreams.models import * ...
# Copyright (c) 2016-2019, <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 ...
"""Base class for Python-Charmers' SDK """ #coding: utf-8 import os import pandas as pd from abc import ABC, abstractmethod from ..utils._path import DOTENV_PATH from ..utils.environ_utils import name2envname, load_environ, check_environ from ..utils.generic_utils import verbose2print, handleKeyError from ..utils._colo...
""" Utilities """ import os, sys, re, signal, subprocess ############################################################################### def expect(condition, error_msg, exc_type=SystemExit, error_prefix="ERROR:"): ############################################################################### """ Similar to ...
import dill import numpy as np import pandas as pd import sys import tqdm import warnings from collections import defaultdict from enum import Enum, IntEnum, auto from typing import ( Dict, List, Optional, Tuple, Union, ) from .base_score import BaseScore from .base_model import BaseModel from ..d...
"""The `Model` class.""" import abc from pathlib import Path from os.path import relpath from typing import Any, Dict, List, Optional, Tuple, Union import warnings import yaml from more_itertools import one import numpy as np import petab from petab.C import ( ESTIMATE, NOMINAL_VALUE, ) from .constants import...
r''' --- Day 11: Dumbo Octopus --- You enter a large cavern full of rare bioluminescent dumbo octopuses! They seem to not like the Christmas lights on your submarine, so you turn them off for now. There are 100 octopuses arranged neatly in a 10 by 10 grid. Each octopus slowly gains energy over time and flashes bri...
from collections import Counter import base64 import hashlib import inspect import os import uuid namespace_uuid = uuid.UUID('f3341b2e-f97e-40d2-ad2f-10a08a778877') class ResourceConfig(object): """Config singleton for web resources. """ def __init__(self): self.development = False config = R...
import cmath import solidity.python.solmath as math def sigmoid(a, b, l, d, x): return 1/(1+cmath.exp((x-l)/d))*a+b def _sigmoid(a, b, l, d, x): assert a > 0 assert b >= 0 assert l >= 0 assert d > 0 if x > l: rate = math.div(math.safeSub(x, l), d) if rate >> (math.PRECISION -...
# Copyright Mika "AgenttiX" Mäki & <NAME>, 2017 # Created for Tampere University of Technology course FYS-1010 Physics Laboratory 1 # 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 versi...
#!/usr/bin/env python3 """ SNICAT C2 www.mnemonic.no https://github.com/mnemonic-no/SNIcat Author: <NAME>, <NAME> """ import dpkt import socket import ssl import sys import time import base64 import binascii import math from socket import error as SocketError from colorama import Fore from _thread import start_new_t...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import csv import os import shutil import json from PIL import Image from pycocotools.coco import COCO import torch import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.o...
import os import os.path import time import sys from pathlib import Path from shutil import copy from PyQt5 import QtCore, QtWidgets from PyQt5.QtWidgets import (QMainWindow, QWidget, QPushButton, QAction, QStatusBar, QFormLayout, QLabel, QLineEdit, QVBoxLayout, QHBoxLayout, QSpacerItem, QMessageBox, QFrame, QSize...
# This file is part of Buildbot. Buildbot 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. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
import numpy as np from scipy.stats import chi2, multivariate_normal, norm from scipy.special import erfinv import pdb, traceback, sys import time class GlobalModelStruct: def __init__(self, d, lambda_, sigma): self.XTX = np.zeros([d, d]) self.Xy = np.zeros(d) self.Covariance = np.linalg.inv(lambda_ * np.ident...
#!/usr/bin/env python3 # parsefeaturejsons.py # classes and functions that can unpack the extracted feature files # created by HTRC, and convert them into a .csv that is easier to # manipulate import csv, os, sys, bz2, random, json from collections import Counter import numpy as np import pandas as pd # import uti...
# Copyright 2017 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 a...
from datetime import datetime from urllib import response from django.contrib.messages.api import info from django.core import paginator from django.forms.models import construct_instance from django.http.response import Http404 from django.shortcuts import render, redirect from django.http import HttpResponse from dja...
#!/usr/bin/sudo python import collections import datetime import ipaddress import os import random import socket import struct import threading import time import typing import zlib ACTION_ID_AUTO_ATTACK = 0x0007 SO_ORIGINAL_DST = 80 # Server responses have been usually taking between 50ms and 100ms on below-1ms # l...
import sys import os import numpy as np import random import cv2 import matplotlib.pyplot as plt import albumentations as albu import functools # import keras from torch.utils.data import Dataset as BaseDataset from glob import glob #10 12 13 15 16 20 24 25 30 # *32 #320 384 416 480 51...
# Copyright (c) ZenML GmbH 2021. 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: # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
from copy import deepcopy from math import prod, sqrt from ac2020.days import AbstractDay from ac2020.io import InputReader def get_border(tile, side): """ Gets the border of a tile. Side codes: - 0: top - 1: right - 2: bottom - 3: left :return: the line or column at the and of ...
import argparse import datetime import os import shutil import time import torch import torch.backends.cudnn as cudnn import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torchvision.datasets as datasets import torchvision.models as models import torchvision.transforms as tr...
from __future__ import annotations from pathlib import Path, PurePath from tempfile import TemporaryDirectory try: from typing import ( Any, Dict, Generic, Iterator, Literal, Optional, Tuple, Type, TypeVar, Union, get_args, ...
bl_info = { "name": "Lazy Motion Edit", "author": "<NAME>", "version": (1, 0, 0), "blender": (2, 75, 0), "location": "Properties > Object Buttons", "description": "Edit motion by G, R, S", "category": "Animation", } import bpy import mathutils import math import time from bpy....
from __future__ import print_function import warnings warnings.warn("WARNING: This module is deprecated. Most of its contents have moved to orphics.cosmology. If you do not find the function you require there, please raise an issue.") import camb from math import pi from orphics.tools.cmb import loadTheorySpectraFromPy...
import os import discord from discord.ext import commands from dotenv import load_dotenv import random import re import logging # TTS import pyttsx3 # This one is to get current time import time from musicbot.music import Music from datetime import date today = date.today() # Declaring intents intents = discord.I...
# 改进遗传:四种交叉方式—改进退火 from H_Hy_Men.SA import * import math import random import numpy as np from H_Hy_Men import VRPLibReader # 三交叉算子 def GASA_threecross(popva, poppath, n): probability = ((1 / popva) / ((1 / popva).sum())).cumsum() father_pop = np.zeros((3, n)).astype(int) k = [] for i in range(3): ...
# -*- coding: utf-8 -*- '''Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2016, <NAME> <<EMAIL>> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without...
#!/usr/bin/env python import sys sys.path.append("/usr/local/lib/python3.7/dist-packages/") import tensorflow as tf from IPython.display import Image, display import numpy as np import cv2 from matplotlib import pyplot as plt import shap import matplotlib from alibi.explainers import AnchorImage from lime import lime_...
# Python modules import xml.etree.cElementTree as ElementTree import logging import gzip # 3rd party modules # Our modules import vespa.common.util.misc as util_misc import vespa.common.util.time_ as util_time import vespa.common.util.logging_ as util_logging import vespa.common.constants as constants import vespa.c...
import random import time import math import warnings from collections import defaultdict from itertools import chain, repeat import pytorch_lightning as pl import transformers from importlib import import_module from nlstruct.data_utils import loop, mappable, batchify from nlstruct.optimization import ScheduledOptim...
""" pals.py - Common functions for launching applications with PALS MIT License (C) Copyright [2020] Hewlett Packard Enterprise Development LP Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software wit...
from gevent import monkey # noqa: E402 # pylint: disable=C0411, C0412, C0413 monkey.patch_all() # noqa: E402 # pylint: disable=C0411, C0413 import datetime import hashlib import io import json from logging.config import dictConfig import re import signal import threading import uuid from elasticapm.contrib.flas...