text
stringlengths
6.04k
39.5k
from __future__ import annotations from typing import * import numpy as np import torch import torch.optim as optim from tqdm import tqdm AnyDeepModel = TypeVar("AnyDeepModel") AnyOptimizer = TypeVar("AnyOptimizer") AnyScheduler = TypeVar("AnyScheduler") AnyDataLoader = TypeVar("AnyDataLoader") class Metric: """...
#!/usr/bin/env python # Copyright 2021 <NAME> # License: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import json import gzip import h5py import numpy as np import torch.utils.data as dat from aps.io.audio import add_room_response from aps.loader.simu import coeff_snr from aps.loader.se.chunk import Wave...
import torch from torchvision import transforms from torch.autograd import Variable import torch.nn.functional as F import torch.utils.data as Data from torch.utils.tensorboard import SummaryWriter from sklearn.linear_model import LinearRegression import matplotlib.pyplot as plt import numpy as np import pandas as pd ...
import sys import os ############################################################################################################ # Class: FileSystem # # Objectif : implémenter les fonctions pour les opérations nécessaires de syste...
import datetime import logging import os import socket import time from random import randrange import urllib.parse from google.cloud import ndb from flask import Blueprint, render_template, make_response, redirect, url_for, request, session, flash from flask_login import login_user, login_manager, logou...
from scipy.sparse.linalg import svds, eigsh from scipy.linalg.interpolative import svd as isvd import os import numpy as np import matplotlib.pyplot as plt import time from mpi4py import MPI import h5py from tqdm import tqdm def test_function( N, M , noise=0.001): """ Generate some test data we can use. T...
import datetime from input_helper.matcher import ( LeadingSpacesMatcher, DoubleQuoteMatcher, SingleQuoteMatcher, BacktickMatcher, MentionMatcher, TagMatcher, CommentMatcher, CapitalizedPhraseMatcher, AllCapsPhraseMatcher, CurlyMatcher, ParenMatcher, DollarCommandMatcher, UrlDetailsMatcher, UrlMatcher, N...
import os import cv2 import copy import numpy as np import tensorflow as tf import imgaug as ia from imgaug import augmenters as iaa from keras.utils import Sequence import xml.etree.ElementTree as ET def parse_annotation(ann_dir, img_dir, labels=[]): all_imgs = [] seen_labels = {} for ann in sorted(...
#!/usr/bin/env python # -*- coding: utf-8 -*- import platform from .hex import HEX import sys TTY_AWARE = False IS_TTY = sys.stdout.isatty() and sys.stderr.isatty() _win_vterm_mode = None class colored(object): def __init__(self, color): self.ESC = "\x1b[" self.END = "m" self.color =...
#!/usr/bin/env python # -*- coding: utf-8 -*- from cobra import Reaction from ..optim.utils import symbol_sum from ..thermo.utils import is_exchange, check_transport_reaction from .utils import trim_epsilon_mets from ..optim.variables import ReactionVariable, BinaryVariable, get_binary_type from ..optim.constraints ...
import contextvars import enum import gzip import json import logging import os import re import socket import struct import textwrap import time import traceback import urllib.parse from django.conf import settings from django.contrib.auth import signals as auth_signals from django.core.exceptions import ImproperlyCo...
""" Read a cophenetic matrix to plot the distances from a JSON file. """ import os os.environ["CARTOPY_USER_BACKGROUNDS"] = "/home/redwards/GitHubs/crAssphage/bin/map_drawing/crassphage_maps/images" import sys import argparse import matplotlib.pyplot as plt # set the figure size. This should be in inches? #plt.rcParam...
"""Tests for template tags in the projectroles app""" from importlib import import_module import mistune import uuid from django.core.urlresolvers import reverse from django.conf import settings from django.test import override_settings, RequestFactory from test_plus.test import TestCase import projectroles from pr...
from datetime import timezone from django.contrib import admin from django.contrib.auth import get_user_model from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from import_export import fields from import_export import resources from import_export.admin import ImportExportModelAdmin from sorl.thumbnail....
# Copyright 2013-2018 Aerospike, 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 writ...
from mlgames.board import Board import networkx as nx import numpy as np BOARD_SIZE = 9 STARTING_WALLS = 10 def a(arr): return np.array(arr) def empty(): g = nx.DiGraph() g.add_node('top') g.add_node('bottom') # Add all of the board positions for x in range(BOARD_SIZE): for y in range(BOARD_SIZE): g.a...
import logging from collections import OrderedDict from datetime import datetime, timedelta from typing import List, Tuple, Dict, Optional, Union, Sequence, Mapping, \ MutableMapping, Iterable import discord from discord.ext import commands from sqlalchemy import orm from kaztron.config import KaztronConfig, Sect...
import numpy as np import h5py import argparse import sys import re ordered = [] overrides = {} label_map = {} description_map = {} units_map = {} tao_bandpass_name = {} delimiters = "<",">" regexPattern = '|'.join(map(re.escape, delimiters)) def parse_keywords(line): keywords = {} rest = line pos1 = rest...
import atexit import os import threading import time from collections import OrderedDict from sys import version_info if version_info[0] >= 3: import configparser as ConfigParser else: import ConfigParser _MODE_NAV = 'navigate' _MODE_ADJ = 'adjust' _MODE_TXT = 'entry' class MenuIcon: arrow_left = [0, 0...
import os import yfinance as yf import csv import pandas as pd import math import requests import json from backtesting import Backtest from Strategies import VolumeIndicatorOBV from ta.utils import dropna from os import listdir from os.path import isfile, join def data(ticker: str = "AAPL", period: str = "30d", inte...
from MDSplus import * from decodeSignal import * from myToolsNoSql import parseList, lp, hp, bp, getYX import numpy import scipy import scipy.signal import sys import time import re #import pickle #<NAME>, 1 April 2016 #sList=parseList(int(sys.argv[1])) #0th argument is script name; first argument is shot number. Pa...
import numpy as np import math import torch import torch.optim as optim from torch.nn.functional import relu from torch.nn import Module, ModuleList from .layers import FFGLayer, DropoutLayer from inbetween.utils import device, process_data, process_data_approximator from inbetween.NNKernel import ReLUKernel from inbet...
#!/usr/bin/env python """ dot-config Author """ from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter, REMAINDER import subprocess from subprocess import PIPE import os import sys import time from shutil import copy from random import randint import inspect from classes import bcolors # TODO: # # *!* # ...
from __future__ import print_function import os.path import sys # sys.path.append(os.path.join(os.path.dirname(__file__), '..')) import inspect import json import threading import time import traceback try: import thread except ImportError: import _thread as thread import websocket from pubs...
# -*- coding: utf-8 -*- """ saltrewrite.testsuite.fix_asserts ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This rewrites unittest `self.assert*` into plain assertions The source for most of this code is: https://github.com/craigds/decrapify/blob/master/pytestify.py """ # pylint: disable=no-member,missin...
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import itertools import typing from collections import OrderedDict from functools import reduce import numpy as np import pytest import funsor import funsor.ops as ops from funsor.cnf import Contraction from funsor.domains import Dom...
# ldpc.py # Copyright 2020 <NAME> # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in...
""" Model vs Observations maps Diagnostic. ====================================== Diagnostic to produce comparison of model and data. The first kind of image shows four maps and the other shows a scatter plot. The four pane image is a latitude vs longitude figures showing: * Top left: model * Top right: observations...
from __future__ import print_function from __future__ import division import keras from keras import backend as K from keras.models import load_model, Model from keras.optimizers import Adam from keras.layers import Input, InputLayer, Lambda, Dense, Flatten, Conv2D, BatchNormalization from keras.layers import UpSamplin...
# Copyright (c) 2012-2020 Jicamarca Radio Observatory # All rights reserved. # # Distributed under the terms of the BSD 3-clause license. """API to create signal chain projects The API is provide through class: Project """ import re import sys import ast import datetime import traceback import time imp...
# 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 ...
import torch import torch.nn as nn from catvae.composition import closure from gneiss.cluster import random_linkage from gneiss.balances import sparse_balance_basis from torch.distributions import Multinomial, Normal from torch.distributions.kl import kl_divergence import numpy as np import geotorch LOG_2_PI = np.log(...
from asyncio import sleep import logging import os from textwrap import dedent from aiogram import Bot, Dispatcher, executor, types from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton from aiogram.utils.exceptions import MessageCantBeDeleted from dotenv import load_dotenv import db_aps import log_con...
# Copyright 2018 Xanadu Quantum Technologies 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 agre...
#!/usr/bin/env python # coding: utf-8 # # Comparing Pycytominer and Cytominer Processing # # We have previously processed all of the Drug Repurposing Hub Cell Painting Data using [cytominer](https://github.com/cytomining/cytominer). # Cytominer is an R based image-based profiling tool. # In this repo, we reprocess th...
import numpy as np from PIL import Image import jittor as jt from jittor import nn from jittor import transform from jittor.lr_scheduler import CosineAnnealingLR from data.jimm import resnet26 from data.feature_utils import * model_dict_path = '/home/fengyuan/JittorModels/trained-models/restnet-14-0.98.pkl' img_pat...
# Copyright (c) 2016-2017, <NAME> # # All rights reserved. # # See the file "LICENCE" for information about the copyright # and warranty status of this software. '''Module providing coin abstraction. Anything coin-specific should go in this file and be subclassed where necessary for appropriate handling. ''' from de...
#!/usr/bin/env python3 import cgi import os import time import re import subprocess import fnmatch # Where the code lives, relative to the cgi $PWD treename = "tree/" # same for the index files indexname = "index/" # the path '/cgi-bin/uxr.py' to this script is hardcded in many places. # too much trouble to make it va...
import os, sys, math, time import numpy as np from collections import Counter import matplotlib matplotlib.use('Agg') sys.path.append("../IAD-Generator/iad-generation/") from csv_utils import read_csv from sklearn import metrics from sklearn.linear_model import SGDClassifier import scipy import matplotlib import ma...
from __future__ import annotations """ .. module:: tree """ import attr import numpy as np from typing import List import pydynamo_brain.util as util from pydynamo_brain.util import SAVE_META, Point3D from typing import Callable, Dict, List, Optional, Tuple, TYPE_CHECKING from .branch import Branch from .point imp...
import numpy as np import pandas as pd import math import tensorflow as tf from tensorflow.keras.utils import Sequence from tensorflow.keras.wrappers.scikit_learn import KerasRegressor from tensorflow.keras.models import Sequential from tensorflow.keras.callbacks import EarlyStopping, ReduceLROnPlateau import aux.conf...
''' Generator to create Caffe Models. It loads the model definition as yaml and generates a prototxt from it. ''' import fire import yaml import os import re import datetime from abc import ABCMeta, abstractmethod class Block(metaclass=ABCMeta): '''Abstract class for the block that allows to load them.''' ...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import re import six from builtins import bytes from .proto.node_def_pb2 import NodeDef from .proto.graph_pb2 import GraphDef from .proto.attr_value_pb2 import AttrValue from .proto.versions_pb2 impor...
#Import all necessary libraries #Data File Libraries import csv import pandas as pd import glob import os #Math Function Libraries import math import statistics #3D Graphing Libraries from mpl_toolkits import mplot3d import numpy as np import matplotlib.pyplot as plt from matplotlib.patches import Re...
import os, sys, yaml, time, argparse import numpy as np import pickle, cv2, re import decord as de import tensorflow as tf from datetime import timedelta from dataflow import RNGDataFlow, MultiProcessRunnerZMQ, BatchData from transformers import T5Tokenizer from slowfast import SlowFast pkl_to_native = [ ...
""" Module to interface model pipeline to model tracker service. """ import os import subprocess import tempfile import sys import pandas as pd import json import tarfile import logging logger = logging.getLogger('ATOM') from atomsci.ddm.utils import datastore_functions as dsf from atomsci.ddm.pipeline import parame...
# -*- coding: utf-8 -*- """test_spacetime Unit tests for `collate.spacetime` module. """ from datetime import date from itertools import product import pytest import sqlalchemy import testing.postgresql from triage.component.collate import Aggregate, SpacetimeAggregation events_data = [ # entity id, event_dat...
from pytube import YouTube from pytube import Playlist import os import platform import re from automateYT.exceptions import ( EmptyLookUpListError, ResolutionAbsenceError, NonExistLocationError, InvalidFormatError ) class Timing: """class for converting string time looks like (2h:30m, 2h30m, or 2h-30m) into sec...
# # Copyright (c) 2019 ISP RAS (http://www.ispras.ru) # Ivannikov Institute for System Programming of the Russian Academy of Sciences # # 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 # # h...
#!/usr/bin/python3 import html import os import functools import re import shutil verbose = False def copyFile(srcPath, destPath): if verbose: print(f"Copying '{srcPath}' to '{destPath}'...") shutil.copy(srcPath, destPath) def deleteDir(dirPath): if os.path.isdir(dirPath): if verbose: print(f"Deleting '...
import scramble import movesticker import tkinter as tk import csv import os from datetime import datetime import time #基本視窗 win = tk.Tk() win.title('Random Scramble Generator') win.geometry('1440x900') win.config(background = '#323232') time_list = [] sc_list = [] #顯示打亂圖形 labelList = [] def draw_scramble(): ...
# -*- coding: utf-8 -*- """ featherpmm.py: Extends feather file format with a paired file that contains extra metadata. If the feather file is /path/to/foo.feather, the metadata file is /path/to/foo.pmm. """ from __future__ import division import os import datetime import numpy as np import sys try: import pyarr...
import sublime, sublime_plugin import re, string, os, sys, functools, mmap, imp try: from .util import vhdl_util from .util import sublime_util except ImportError: sys.path.append(os.path.join(os.path.dirname(__file__), "util")) import vhdl_util import sublime_util # Make sure util pythons are rel...
from .editor_util import get_def_lines, get_defrange, excise_def_lines, overwrite_import from .import_util import get_import_stmt_str __all__ = [ "nix_surplus_imports", "shorten_imports", "receive_imports", "copy_src_defs_to_dst", "remove_copied_defs", "transfer_mvdefs", ] def nix_surplus_imp...
from django.shortcuts import get_object_or_404,render, redirect from django.http import HttpResponse from . import models import json from django.views.decorators import csrf from django.views.decorators.csrf import ensure_csrf_cookie from django.contrib import messages from django.core.exceptions import * import datet...
import pygame as pg from components import * from varname import nameof from time import time from random import randint import os from constants import * from utility import * import algorithms pg.init() FPS = 60 INF = float('inf') EXIT_AND_STATS = pg.USEREVENT + 1 EXIT_BUTTON = Button(WIDTH - 105, ...
import os import argparse import shutil import sys import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms from torch.autograd import Variable import time from vgg import VGG # from convnet import ConvNet from resnet import...
""" Implements a generic Constraints Creator and a ConstraintCreator for schema with HHGQ """ from typing import Tuple, Dict, Iterable, Callable, Union import logging import warnings import numpy as np from programs.constraints.constraint_dict import ConstraintDict import programs.queries.constraints_dpqueries as cons...
""" TargetSelection class """ from itertools import chain import numpy as np from easyquery import Query from astropy.table import vstack, Table from astropy import units as u from astropy.coordinates import SkyCoord, Angle from ..hosts import HostCatalog from ..objects import ObjectCatalog, build from .assign_targetin...
import unittest import koleksyon.mcmc as mcmc import pandas as pd import numpy as np import datetime def artist_costs(): #Artist-Album costs (0.0 represents that you don't buy and albumn, .99 represents you buy just a song) MichaelJackson = np.array([0.0,0.99,8.64,8.69,12.33,12.96,38.99,30.12,13.99,17.25]) ...
""" Provides functions for syncing entities and their relationships to the Entity and EntityRelationship tables. """ import logging from time import sleep import wrapt from collections import defaultdict from activatable_model import model_activations_changed from django import db from django.contrib.contenttypes.mod...
#21datalabplugin from system import __functioncontrolfolder import time import dates import numpy import streaming import re events2Annotation = { "name":"events2Annotation", "type": "function", "functionPointer": "events.events_to_annotations", # filename.functionname "autoReload": True, # set th...
# coding=utf-8 # summary: Code of CVPR 2019 accepted paper Attention-aware Multi-stroke Style Transfer import tensorflow as tf import vgg from tensorflow.python.ops import control_flow_ops import tensorflow.contrib.slim as slim _R_MEAN = 123.68 _G_MEAN = 116.78 _B_MEAN = 103.94 _RESIZE_SIDE_MIN = 256 _RESIZE_SIDE_MA...
import argparse import os import random import yaml from collections import defaultdict from enum import IntEnum from PIL import Image class FileType(IntEnum): TRAIN = 0 VALIDATION = 1 TEST = 2 class InputParser: def __init__(self): self.parser = argparse.ArgumentParser() def add_argume...
""" Script for generating piece-wise stationary data. Each component of the independent latents is comprised of `ns` segments, and each segment has different parameters.\ Each segment has `nps` data points 9measurements). The latent components are then mixed by an MLP into observations (not necessarily of the same di...
# The MIT License (MIT) # # Copyright (c) 2015 <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 without limitation the rights to # use, copy, modify, ...
import numpy as np import os, sys import math, time from scipy.interpolate import InterpolatedUnivariateSpline as iuspline from matplotlib import pyplot as plt import tensorflow.compat.v1 as tf tf.disable_v2_behavior() import tensorflow_probability as tfp import mesh_tensorflow as mtf print(mtf) import flowpm import ...
#!/usr/bin/env python """Connect to Darshan logs. This connector provides an interface into Darshan logs created by Darshan 3.0 or higher and represents the counters and data contained therein as a Python dictionary. This dictionary has the following structure, where ``block`` denote literal key names. * ``header`` ...
#!/usr/bin/env python from __future__ import print_function import traceback import sys import os import time from optparse import OptionParser, OptionGroup import random import shutil import zipfile import cProfile import tempfile import visualizer.visualize_locally import json try: from StringIO import StringIO e...
#!/usr/bin/env python3 # # RoarCanvasWindow.py # Copyright (c) 2018, 2019 <NAME> <<EMAIL>> # from GuiWindow import GuiWindow from Rtl import natural_sort from RtlPlatform import getLocalConfPathName from ToolObject import ToolObject from ToolText import ToolText import copy, hashlib, json, os, pdb, re, time, wx, sys ...
"""PyTorch OpCounter: Adapted from: https://github.com/alexandonian/pretorched-x/ and https://github.com/Lyken17/pytorch-OpCounter: """ import time import logging from collections import Iterable, defaultdict from distutils.version import LooseVersion import numpy as np import torch import torch.nn as nn ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @Time : 2020/11/14 10:51 PM @Author : Caroline @File : 单机estimator实现 @Description : """ import tensorflow as tf from tensorflow import feature_column # from tensorflow.keras import layers # 1.15版本 # from tensorflow.python.feature_column import featur...
## -------------------------------------------------------- ## # Trab 1 IA 2019-2 # # <NAME> # # Python version: 3.7.4 ## -------------------------------------------------------- ## import bagProblem as bp import hillClimbing as hc import beamSearch as bs import simulatedAnnealing as sa imp...
# Copyright 2018 Intel Corporation # # 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 wri...
from __future__ import print_function ########### # imports # ########### import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.axes_grid1 import make_axes_locatable from scipy.cluster import hierarchy from textwrap import wrap import novosparc import os import copy import pand...
from __future__ import division, print_function # built-in libraries import logging import multiprocessing import os import pymongo import re import tqdm import warnings # third-party libraries import pandas import vcf # project libraries import VAPr.vcf_merging import VAPr.annovar_running import VAPr.filtering impo...
import datetime import random import discord from discord.ext import commands from tle.util import codeforces_api as cf from tle.util import codeforces_common as cf_common from tle.util import discord_common _GITGUD_NO_SKIP_TIME = 3 * 60 * 60 class Codeforces(commands.Cog): def __init__(self, bot): sel...
import asyncio from asyncio.exceptions import CancelledError from asyncio.tasks import Task, create_task import os from bilibili_api import settings from bilibili_api.utils.Credential import Credential from copy import copy, deepcopy from bilibili_api.exceptions.ResponseCodeException import ResponseCodeException...
#!/usr/bin/env python3 import json import os import ujson import zstd from collections import defaultdict from contextlib import contextmanager from dataclasses import dataclass from datetime import datetime, timedelta from enum import IntEnum from pathlib import Path from typing import Union, Dict, List from . impo...
import audioop, atexit, io, itertools, sys, wave from array import array from collections import namedtuple from math import log, pi, sin __all__ = ( 'AudioStream', 'PcmAudio', 'PcmValueError' ) MUTE = float( '-inf') def db_to_ratio( db): 'Translate a (negative) dB value into a scaling ratio' return 10 **...
"""Defines behavior of convolvable items and a base class to encapsulate that behavior.""" from prysm import mathops as m from ._basicdata import BasicData from .coordinates import resample_2d_complex from .conf import config from .fttools import forward_ft_unit, pad2d from .util import share_fig_ax class Convolvabl...
from flask import Flask, render_template, request, jsonify, make_response, redirect, send_file from flask_sqlalchemy import SQLAlchemy from flask_security import Security, SQLAlchemyUserDatastore, UserMixin, RoleMixin, login_required from flask_login import current_user from flask_mail import Mail, Message from flask_s...
# -*- coding: utf-8 -*- """ Created on Thu Dec 13 14:17:09 2018 @author: puat133 """ # import math import h5py import scipy.io as sio import numpy as np import scipy.linalg as sla import numba as nb import cupy as cp import time import math import mcmc.image_cupy as im import h5py from cupy.prof import TimeRangeDecora...
import numpy as np from numdifftools import Gradient, Hessian, Jacobian import itertools import seaborn as sns # import pandas as pd from cycler import cycler import palettable import logging.config import matplotlib.pyplot as plt from plots.plot_helper_functions import set_size import os import matplotlib a...
# Copyright © 2021. TIBCO Software Inc. # This file is subject to the license terms contained # in the license file that is distributed with this file. """Automatically manage the protocol between Spotfire and a data function written in Python.""" import io import os.path import pprint import sys import traceback imp...
'''The statop module handles calculations where uncertainty has to be handle. All uncertainties are currently handled through quadrature. So they take the form of "\sigma_y = \sum_i \left(\frac{dy}{dx_i}\right) \sigma_{x_i}". The functionality in this module would be AWESOME if it were transferred to a class. However,...
''' <NAME> Python F-16 subf16 outputs aircraft state vector deriative ''' # x[0] = air speed, VT (ft/sec) # x[1] = angle of attack, alpha (rad) # x[2] = angle of sideslip, beta (rad) # x[3] = roll angle, phi (rad) # x[4] = pitch angle, theta (rad) # x[5] = yaw angl...
############################################################################### # Copyright (c) 2018, Lawrence Livermore National Security, LLC # Produced at the Lawrence Livermore National Laboratory # Written by <NAME> <EMAIL> # LLNL-CODE-771750 # All rights reserved # # This file is part of SSHSpawner: https://githu...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import copy, os, sys, time import itertools as itt import yaml # torch imports import numpy as np import torch from dataset.batch_samplers import SceneBatchSampler from ...
from numpy.testing import assert_array_equal import numpy as np import tempfile import secrets import h5py from hdf5zarr import HDF5Zarr import pytest import itertools class HDF5ZarrBase(object): ########################################## # basic tests # #######################...
import os from .ansys_nodes_elements import write_constraint_nodes from .ansys_nodes_elements import write_nodes from .ansys_nodes_elements import write_elements from .ansys_materials import write_all_materials from .ansys_loads import write_loads from compas_fea.fea.ansys.writing.ansys_process import ansys_open_pre_pr...
# # Copyright (C) 2018 ETH Zurich and University of Bologna # # 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 applicabl...
#!/usr/bin/env python # # autotextctrl.py - The AutoTextCtrl class. # # Author: <NAME> <<EMAIL>> # """This module provides the :class:`AutoTextCtrl` class, an alternative to the ``wx.TextCtrl``, which has auto-completion capability. I wrote this class because ``wx.TextCtrl`` auto-completion does not work under OSX, an...
# Copyright (C) 2018, <NAME> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the ho...
import abc import numpy as np import scipy.integrate as scint from . import sv_abc as sv class OusvSchobelZhu1998(sv.SvABC): """ The implementation of Schobel & Zhu (1998)'s inverse FT pricing formula for European options the Ornstein-Uhlenbeck driven stochastic volatility process. References: ...
import os import sys import time import copy import warnings import os.path as osp import numpy as np import tensorflow as tf import scipy.sparse as sp from functools import partial from tensorflow.keras.utils import Sequence from tensorflow.python.keras import callbacks as callbacks_module from tensorflow.keras.callb...
# coding: utf-8 import os import sys import time import zipfile import datetime from xml.dom.minidom import parseString from xml.sax.saxutils import escape import jam.common as common from jam.dataset import * from jam.sql import * from jam.third_party.six import exec_, print_ from werkzeug._compat import iteritems...
import sys from contextlib import contextmanager from functools import reduce from typing import Any, List, Optional, Tuple from abc import ABC, abstractmethod from pylatex.utils import NoEscape, escape_latex from expcomb.filter import SimpleFilter, AndFilter, InFilter from .utils import ( get_divs, get_group_c...
#!/usr/bin/env python # # Copyright (c) 2016-2018 <NAME> (<EMAIL>) # # Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt # or copy at http://opensource.org/licenses/MIT) # import pkmn import pkmntest import pkmntest.base_test from nose_parameterized import parameterized import unittest impo...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...