text
stringlengths
8.04k
46.5k
""" """ __version__='172.16.58.3.dev1' import os import sys import re import pandas as pd import numpy as np import warnings import tables import h5py import time import base64 import struct import logging import glob import math import pyodbc import argparse import unittest import doctest # --- # --- PT3...
"""An implementation of capsule network. """ from tensorflow.contrib.layers.python.layers import initializers import tensorflow as tf import numpy as np slim = tf.contrib.slim epsilon = 1e-9 # ------------------------------------------------------------------------------# # operations with dynami...
"""TypeScript code generator for a given schema salad definition.""" import os import shutil import string from io import StringIO from pathlib import Path from typing import ( Any, Dict, List, MutableMapping, MutableSequence, Optional, Set, Union, ) import pkg_resources from . import ...
import math import os import random import time from tkinter import * import numpy as np # noinspection PyProtectedMember class GUI: __canvas_scale = 1 __fst_lh = 59 # first __fst_lw = 16 __lh = __fst_lh * __canvas_scale # line height __lw = __fst_lw * __canvas_scale # line weight __margin...
# coding: UTF-8 import pandas as pd import time from xgboost import XGBClassifier import xgboost as xgb import numpy as np from datetime import datetime, timedelta import pickle, os from dateutil.parser import parse from sklearn.utils import shuffle from sklearn.metrics import roc_auc_score import lightgbm as lgb impor...
#!/usr/bin/python # -*- coding: utf-8 -*- # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: zabbix_mediatype short_description: Create/Update/Delete Zabb...
# -*- coding: utf-8 -*- """ Module to handle getting data loading classes and helper functions. """ import json import re import io import random import string from collections import Counter, defaultdict, OrderedDict from nltk.tokenize import wordpunct_tokenize, word_tokenize import numpy as np from scipy.sparse imp...
""" The MIT License (MIT) Copyright (c) 2019 SML <<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 restriction, including without limitation the rights to use, copy, modify, merge...
""" Calculate Mass-Luminosity relations for different models of line emission. All functions take a vector of masses in M_sun and return luminosities in L_sun. Model parameter values are given by a dictionary called MLpar. Each function also takes a value of the redshift z even if the L(M) model is not redshift depe...
import numpy as np import pandas as pd import pickle as pkl import os from scipy import stats, signal, linalg from statsmodels.robust import scale import matplotlib.pyplot as plt import seaborn as sns from sklearn.svm import SVC, LinearSVC from sklearn.discriminant_analysis import LinearDiscriminantAnalysis, QuadraticD...
#!/usr/bin/env python # # Author: <NAME> # Source: https://github.com/LukeShirnia/out-of-memory/ import __future__ from sys import argv import sys import platform import re import gzip import datetime import operator import os import fnmatch import collections from optparse import OptionParser import subpr...
#!/usr/bin/env python3 import os import sys import argparse import json from lib.expression_tree import * from patterns import * from lib.util import * class ExpressionManager(object): """ NOTE-1: the same column can appear in multiple expression nodes; this is because it has multiple patterns; in this case, ch...
""" Patch Functions to modify pathlib.Path borrowed some functions from https://github.com/KenKundert/extended_pathlib/blob/master/extended_pathlib.py """ import os import sys import codecs import aiofiles import tempfile from pathlib import Path, PosixPath from lazycls.prop import classproperty from typing import Ty...
# # BSD 3-Clause License # # Copyright (c) 2022 University of Wisconsin - Madison # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyrig...
"""A set of extensions to the basic ``CosmoHammer`` package.""" import emcee import gc import h5py import logging import numpy as np import os import time import warnings from cosmoHammer import CosmoHammerSampler as _CosmoHammerSampler from cosmoHammer import getLogger from cosmoHammer import util as _util from cosmoH...
import os os.environ['CUDA_VISIBLE_DEVICES'] = '-1' #-1 = Disable GPU import numpy as np import matplotlib.pyplot as plt import tensorflow as tf import tensorflow_addons as tfa from tensorflow.keras import Model from tensorflow.keras.layers import * from utils import RelativeReduceLROnPlateau, RelativeEarlyStopping, E...
# This is Project 1 for the Spring 2020 Text Analytics class # Written by <NAME> # Student ID: 113825637 from __future__ import print_function import argparse import re import os import spacy from spacy.matcher import Matcher import pandas as pd import sys #GLOBAL VARIABLES! #We will use these lists, Spacy model, ...
from invoke import task, Result, Context, Collection import sqlite3 import os import logging from zipfile import ZipFile, ZIP_LZMA import shutil from tomlkit.toml_file import TOMLFile from tomlkit.toml_document import TOMLDocument from tomlkit.api import loads as toml_loads, dumps as toml_dumps, parse, document import...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
from typing import List, Tuple, Optional, Any import time import numba import numpy as np import cv2 import reeds_shepp from .debugger import Debugger class RRTStar(object): def __init__(self): self.debug = False self.vertices = None # type: Optional[List[RRTStar.StateNode]] self.root = N...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #---------------------------------------------------------------------- # eliza.py # # a cheezy little Eliza knock-off by <NAME> # with some updates by <NAME> # hacked into a module and updated by <NAME> #---------------------------------------------------------------...
import random as rn import numpy as np from sklearn.preprocessing import StandardScaler, RobustScaler from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import train_test_split from sklearn.model_selection import RandomizedSearchCV import math import scipy.interpolate as interp from mpl_to...
import os from copy import deepcopy import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.ticker import MultipleLocator, FormatStrFormatter from mpl_toolkits.axes_grid1.inset_locator import InsetPosition from numpy import logical_not, isnan, array, where, abs, max, min, vstack, hstack from pandas i...
import time import re import logging from time import sleep from datetime import datetime from playwright.async_api import * from .constants import * from pathlib import Path import os from typing import Tuple, Optional,Union def get_path(file_path: str) -> str: # no clue why, but this character gets added for me...
# coding: utf-8 # (C) A.Lichnewsky, 2018 __author__ = '<NAME>' __license__ = 'MIT License' __version__ = '1.0' # # These are utilities for working on Pandas, Scikit-learn etc.. environments # # ---------------------------------------- # # Common toolkit imports import numpy as NP import n...
"""Plotting routines for CHIME data""" import numpy as np import scipy as sp import matplotlib.pyplot as plt import warnings import datetime import scipy.signal as sig from . import andata from . import ephemeris def waterfall( data, freq_sel=None, prod_sel=None, time_sel=None, part_sel=None, **kwargs ): """...
# adapted from https://github.com/vwxyzjn/cleanrl import argparse from dataclasses import dataclass, field import os import random import time from distutils.util import strtobool from typing import ( Any, Dict, Generic, List, Mapping, Optional, Type, TypeVar, Union, ) import json i...
#!/usr/bin/env python3 import numpy as np from scipy.signal import gaussian from scipy.signal import hann from scipy import fftpack from matplotlib import pyplot as plt ### need to move these functions here #from LoLIM.utilities import upsample_N_envelope def simple_bandpass(frequencies, lower_freq=30.0E6, upper_fr...
import os import utils import scipy as sp import numpy as np import tensorflow as tf # import tensorflow-gpu as tf import matplotlib.pyplot as plt from datetime import datetime import glob import imageio # First, we define some hyperparameters (borrowed from other research) learning_rate = 0.0002 beta1 = 0.5 batch_siz...
# -*- coding: utf-8 -*- # # Copyright 2020 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...
from tkinter import Label, Button, Toplevel, Entry, filedialog, PhotoImage, ttk, colorchooser, Scrollbar import tkinter import matplotlib.pyplot as plt from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk from matplotlib.backends.backend_pdf import PdfPages from matplotlib.widgets impor...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Scrapea datasets a partir de un catálogo y parámetros para XlSeries """ import os import yaml import sys import pandas as pd import arrow import shutil import traceback from openpyxl import load_workbook import logging from copy import deepcopy from urllib.parse import ...
# Copyright 2015 Metaswitch Networks # # 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 w...
import argparse from typing import Dict from typing import List from typing import Optional from typing import Tuple from typing import Union import paddle import yaml from paddle import nn from yacs.config import CfgNode from paddlespeech.t2s.modules.activation import get_activation from paddlespeech.t2s.modules.con...
import numpy as np import datetime import itertools import random import collections import markov_clustering as mc from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity from scipy import sparse, stats from typing import List from news_tls import utils, data ...
# coding=utf-8 from django.db import models from django.contrib.auth.models import User from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import AbstractBaseUser from django.contrib.auth.models import Permission from django.contrib import admin from django.contrib.contenttypes.models impor...
# Copyright 2021 Alibaba Group Holding 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 ...
""" Runs the test set generated by post.py by generating fake reward weights and seeing how many are caught by the preferences.""" import logging import pickle from itertools import product from math import log from pathlib import Path from typing import Dict, Generator, List, Optional, Sequence, Set, Tuple, Union im...
"""The logic behind how the Pacman world works. Champlain College CSI-480, Fall 2018 The following code was adapted by <NAME> (<EMAIL>) from the UC Berkeley Pacman Projects (see license and attribution below). ---------------------- Licensing Information: You are free to use or extend these projects for educational ...
#!/usr/bin/python3 import tensorflow as tf import json from model_provider import get_model from visualization_dicts import gpu_cs_labels, generate_random_colors, gpu_random_labels from seg_visualizer import get_images_custom from utils.create_seg_tfrecords import TFRecordsSeg from utils.augment_images import augment_s...
import matplotlib.pyplot as plt import numpy as np #import scipy.optimize as sp_opt class Consumer: import scipy.optimize as sp_opt ############################################### ### Inicializa los argumentos de la clase ### ############################################### def __ini...
import re, os, warnings, io, base64, json import datetime import urllib.request from subprocess import Popen, PIPE from Bio import AlignIO, BiopythonDeprecationWarning from io import StringIO from django.shortcuts import render from django.http import HttpResponse, JsonResponse, HttpResponseServerError from django.url...
# coding: utf-8 import vim import re import deciphervimclips import sys if sys.version_info[0] < 3: from urllib import quote else: from urllib.parse import quote def get_current_range(): return vim.current.range[:] def set_current_range(new_range): vim.current.range[:] = new_range def position_cu...
import tensorflow as tf import numpy as np from utils.bert import bert_utils EPSILON = 1e-30 def focal_loss_binary_v2(config, logits, labels): """ alpha = 0.5 gamma = 2.0 """ alpha = config.get("alpha", 0.5) gamma = config.get("gamma", 2.0) labels = tf.cast(tf.expand_dims(labels, -1), tf.int32) predictions ...
#!/usr/bin/env python3 """This script removes bees from brood frame photos. Gaussian Mixture-based Backbround/Foreground Segmentation Algorithm. The class implements the Gaussian mixture model background subtraction described in: (1) Z.Zivkovic, Improved adaptive Gausian mixture model for background subtraction, In...
from utils import pricing from utils.misc import base_embed, get_logger from utils.request import request from utils import exceptions from utils.config import cfg, icfg, data from discord.ext import commands import discord import string import uuid import asyncio import json import jsonpickle import random import ti...
import copy from pysv.smtlib.common import * from pysv import contract from pysv import templates from pysv import ast_utils from pysv.interm import Var, Instruction from pysv.smt2 import ProgramSmt2 class SynthesisConstr(SMTLIBConstraints): def __init__(self, env, assertions = None): SMTLIBConstraints._...
# Limit OSM data to just greater Vancouver # Typical invocation: # spark-submit just-vancouver.py amenities amenities-vancouver # hdfs dfs -cat amenities-vancouver/* | gzip -d - | gzip -c > amenities-vancouver.json.gz import sys from functools import reduce import matplotlib.colors as colors import matplotlib.pyplot ...
from collections import defaultdict from datetime import datetime, timezone import functools import logging import operator from typing import Any, Collection, Dict, Iterable, List, Mapping, Optional, Sequence, Set, \ Tuple, Union import aiomcache import morcilla import numpy as np import pandas as pd import sentr...
from study_tool.russian import types from study_tool.russian.types import * from study_tool.russian.word import * from study_tool.russian.adjective import Adjective NON_PAST_ORDER = [(Plurality.Singular, Person.First), (Plurality.Singular, Person.Second), (Plurality.Singular, Person...
""" chickadee.py ============ A command-line application to provide context for an IP address. This utility leveraged libchickadee to extract, resolve, and report IP addresses. Please see :ref:`installation` instructions for details on setting up this tool on your system. .. _chickadee-usage: Usage ----- .. code-b...
from . import GlobalConstants as GC from . import configuration as cf from . import Image_Modification, Utility, Weapons, Engine, TextChunk from . import BaseMenuSurf, HelpMenu # === GENERIC ITEM OBJECT ======================================== class ItemObject(object): next_uid = 100 def __init__(sel...
import copy import datetime import hashlib import logging import os import elastalert.alerter import elastalert.ruletypes import mock import pytest from elastalert import config from elastalert.loaders import FileRulesLoader, loader_mapping from elastalert.utils.util import EAException test_args = mock.Mock() test_ar...
"""Calculating the tranformation to make astrometry (wcs) consistent with the literature. Author <NAME> written in python 3 """ #import matplotlib.pyplot as plt import numpy as np from astropy.wcs import WCS from astropy.wcs import Wcsprm import matplotlib.pyplot as plt #from scipy.signal import correlate2d imp...
import matplotlib.pyplot as plt import numpy as np import torch from torch.autograd import Variable import argparse from model import neural_network color1 = 'goldenrod' color2 = 'black' color3 = 'royalblue' color4 = 'orange' color5 = 'navy' font1 = 25 font2 = 15 font = {'family': 'Times New Roman', 'size':...
# Copyright 2015 Red Hat, 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 ...
import logging from enum import Enum from typing import List, Optional import discord from discord.embeds import EmptyEmbed from discord.ext import commands, tasks from naotimes.bot import naoTimesBot, naoTimesContext from naotimes.showtimes import Showtimes, ShowtimesEpisodeStatus, ShowtimesProject from naotimes.uti...
# Imports import pandas as pd import matplotlib.pyplot as plt from matplotlib.ticker import MaxNLocator import numpy as np import io import csv import urllib.request from urllib.error import HTTPError from os.path import dirname, join from statsmodels.tsa.ar_model import AutoReg, ar_select_order from statsmodels.tsa.ar...
# -*- coding: utf-8 -*- """ Created on Mon Nov 4 11:50:57 2019 @author: bpe043 """ import cv2 import numpy as np import pandas as pd import math from sklearn.model_selection import train_test_split from sklearn.model_selection import KFold from sklearn.model_selection import StratifiedKFold from sk...
#!/usr/bin/env python # # fsleyes.py - Image viewer. # # Author: <NAME> <<EMAIL>> # """This module provides the entry point to *FSLeyes*, the FSL image viewer. Call the :func:`main` function to start the main FSLeyes application. The :func:`embed` function can be called to open a :class:`.FSLeyesFrame` within an exis...
import string,os,sys import module_class import newRtl import logs import dumpUser class connectivityClass: def __init__(self,Glbs,Root): if type(Root) is str: self.Mod = Glbs.details[Root] else: print('IAM %s' % str(type(Root))) self.Mod = Root ...
import os import json # Keras Imports from keras import layers from keras import metrics import keras.backend as K from keras.optimizers import Adam from keras.models import Model, load_model from keras.layers.convolutional import Conv1D, Conv2D, MaxPooling1D, MaxPooling2D from keras.callbacks import ModelCheckpoint,...
"""setuptools.command.egg_info Create a distribution's .egg-info directory and contents""" from distutils.filelist import FileList as _FileList from distutils.errors import DistutilsInternalError from distutils.util import convert_path from distutils import log import distutils.errors import distutils.filelist import...
import hashlib import json import os import pathlib import pytest import re import shutil import socket import string import subprocess import tempfile import textwrap import time import yarl import aiohttp import asyncio import async_timeout from itertools import count from collections import namedtuple from context...
"""Compute Linearly constrained minimum variance (LCMV) beamformer.""" # Authors: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # # License: BSD (3-clause) import numpy as np from scipy import linalg from ..rank import compute_rank from ..io.meas_info import _simplify_info from ..io.pick im...
# Copyright (c) 2019 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 appli...
import logging import warnings import _io from astropy import units as u from astropy.io import fits from astropy.wcs import WCS, _wcs from astropy.modeling import models from astropy.utils.exceptions import AstropyUserWarning import numpy as np import shlex from ...spectra import Spectrum1D, SpectrumCollection from...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Datalink classes and mixins """ import numpy as np from .query import DALResults, DALQuery, DALService, Record from .exceptions import DALServiceError from .vosi import AvailabilityMixin, CapabilityMixin from .params import find_param_by_keyword, get_...
import json import os from collections import OrderedDict import numpy as np import tensorflow.keras.backend as K from tensorflow.keras.layers import Layer from tensorflow.keras.models import Model def _convert_1d_to_2d(num_units: int): # find divisors of num_units. divisors = [] for i in range(1, num_un...
import math import torch import torch.nn as nn from torch.autograd import Variable import torch.nn.init as init import torch.nn.utils.weight_norm as WeightNorm import onmt import torch.nn.functional as F from onmt.modules.Bottle import Bottle from onmt.modules.StaticDropout import StaticDropout def group_linear(linea...
""" A simple version of Distributed Proximal Policy Optimization (DPPO) using distributed TensorFlow. Based on: 1. Emergence of Locomotion Behaviours in Rich Environments (Google Deepmind): [https://arxiv.org/abs/1707.02286] 2. Proximal Policy Optimization Algorithms (OpenAI): [https://arxiv.org/abs/1707.06347] 3. Gen...
# Copyright 2015 Rackspace # # 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...
# -*- coding: utf-8 -*- """Tests for http module.""" # # (C) Pywikibot team, 2014-2020 # # Distributed under the terms of the MIT license. # import json import re import warnings from contextlib import suppress import requests import pywikibot from pywikibot import config2 as config from pywikibot.comms import http...
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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...
import sys, json, secrets, binascii, time, httpcore, httpx, asyncio from struct import pack import xrpl from xrpl.models.requests.account_lines import AccountLines; from xrpl.models import transactions as TransactionsModel from xrpl.models import Response from xrpl.models.amounts import IssuedCurrencyAmount ...
import os import random import pandas as pd import numpy as np import matplotlib.pyplot as plt from pandas.core.window.rolling import Window from sklearn import model_selection from sklearn.preprocessing import RobustScaler from sklearn.neighbors import NearestNeighbors import torch from torch.nn import f...
# coding: utf-8 from .logging import logopen from .stats import FeedStats from .util import NameEnum, monotonic import atexit import errno import fcntl import os import threading import time import select import shlex import subprocess import sys # Default setting of fs.pipe-user-pages-soft is 16384 which amounts # ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function import itertools import gzip import numpy as np from astropy.coordinates import SkyCoord from astropy.table import Table, Column from astropy.io import fits from fermipy import utils from...
import keyword import sys import warnings import rope.base.codeanalyze import rope.base.evaluate from rope.base import builtins from rope.base import exceptions from rope.base import libutils from rope.base import pynames from rope.base import pynamesdef from rope.base import pyobjects from rope.base import pyobjectsd...
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
from functools import reduce from operator import mul from sympy import Add import numpy as np import pytest from conftest import EVAL, skipif from devito import (Grid, Function, TimeFunction, SparseTimeFunction, SubDimension, Eq, Operator, solve, switchconfig) from devito.dle import BlockDimensio...
import os import gym import time import torch import torch.nn as nn import numpy as np from copy import deepcopy from typing import Tuple gym.logger.set_level(40) # Block warning """net.py""" class ActorPPO(nn.Module): def __init__(self, mid_dim, state_dim, action_dim): super().__init__...
import hashlib import csv import os from datetime import date import shutil import glob import win32api import win32con import win32file import sys import yaml import argparse import subprocess import time import threading import queue import typing import pywintypes import zipfile class FileInfo...
"""Splinter plugin for pytest. Provides easy interface for the browser from your tests providing the `browser` fixture which is an object of splinter Browser class. """ import codecs import functools # pragma: no cover import warnings try: from httplib import HTTPException except ImportError: from http.clien...
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import json import argparse import numpy as np from scipy.stats import spearmanr import os from os import path import itertools import torch.ut...
################################################################################ # # Copyright (c) 2009 The MadGraph5_aMC@NLO Development team and Contributors # # This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # h...
# Config file for shared settings # Author: <NAME>, 2017, 2020 """Configuration storage module. This module allows customization of settings for various imaging systems, such as grouped settings for particular microscopes. Additional parameters such as command-line flag settings and databases can also be stored here...
import json import logging from datetime import datetime from urlparse import urlparse from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.core.paginator import Paginator, EmptyPage from django.db import transaction from ...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import h5py import os import numpy as np import random import torch import torch.utils.data as data class HybridLoader: """ If db_path is a director, then use normal file loading The l...
from pddlgym.core import PDDLEnv from pddlgym.rendering import sar_render, slow_sar_render, posar_render, myopic_posar_render from pddlgym.structs import Type, Predicate, Not, State, LiteralConjunction import gym import functools import pddlgym import os import numpy as np def get_sar_successor_state(state, action): ...
# index.py -- File parser/writer for the git index file # Copyright (C) 2008-2013 <NAME> <<EMAIL>> # # Dulwich is dual-licensed under the Apache License, Version 2.0 and the GNU # General Public License as public by the Free Software Foundation; version 2.0 # or (at your option) any later version. You can redistribute ...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import json import os import shutil import stat import subprocess import sys import tempfile from six.moves.urllib.parse ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Built-in imports import argparse import warnings # 3rd party imports import yaml import numpy as np import matplotlib.pyplot as plt import matplotlib.dates as mdates from matplotlib.container import ErrorbarContainer from matplotlib.legend_handler import HandlerTuple, ...
""" This script is organized like so: + `if __name__ == "__main__" sets up the Streamlit UI elements + `generate_image` houses interactions between UI and the CLIP image generation models + Core model code is abstracted in `logic.py` and imported in `generate_image` """ import getopt import streamlit as st from pathl...
import os import sys import time import imageio sys.path.append("../..") from tools.run_nerf_helpers import * from models.tex_encoder_mod import EnDeUVmap # network_query_net from models.model import StyleModule class lossesLog: def __init__(self, lossesList, Weight): self.lossesNameList = lossesList ...
""" This module contains a variety of methods aimed at producing plots using data collected by the ME-SXR detector. These methdods present raw data with minimal processing. This version is outdated. Use the module "plots" instead. """ import MDSplus import numpy as np import scipy as sp import matplotlib.pyplot as plt ...
# Copyright 2017, Additive Regularization of Topic Models. import artm import uuid import copy import numpy as np import pandas import os.path import os import pickle import glob import warnings from six.moves import range class hARTM(object): def __init__(self, num_processors=None, class_ids=None, ...
# Copyright (c) 2014-present PlatformIO <<EMAIL>> # # 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 ag...
from pomegranate import DiscreteDistribution, State from pomegranate import HiddenMarkovModel as Model import numpy as np from profile_hmm import build_profile_hmm_for_repeats from profiler import time_usage import settings def path_to_alignment(x, y, path): for i, (index, state) in enumerate(path[1:-1]): ...
# -*- coding: utf-8 -*- # # diffoscope: in-depth comparison of files, archives, and directories # # Copyright © 2014-2015 <NAME> <<EMAIL>> # © 2015 <NAME> <<EMAIL>> # © 2012-2013 <NAME> <<EMAIL>> # © 2012 <NAME> <<EMAIL>> # © 2012 <NAME> <<EMAIL>> # © ...