text
stringlengths
6.04k
39.5k
#!/usr/bin/env python #-*- coding: utf-8 -*- """ Dota bot This bot's goal is aimed at Dota-related activities """ from random import choice from botinfo import * from bs4 import BeautifulSoup as BS from requests import get as re_get from json import load as jload, dump as jdump from pathlib import Path # build a st...
# Copyright 2021 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 agre...
# Different methods to preslect the thresholds to divide the activation range of each neuron from . import decision_tree as dt import numpy as np import heapq import itertools import math import sys sys.setrecursionlimit(10000) # This discretization method is based on the paper "Dynamic Discretization # of Continuo...
#!/usr/bin/env python3 import math import os import sys from PyQt5 import QtCore from PyQt5.QtCore import Qt, QRect from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QApplication, QMainWindow, QSizePolicy, QPushButton, QLabel, QMessageBox, QComboBox, QSlider from PyQt5.QtWidgets import QFileDialog, QCheckBox, ...
""" PSF calulcations for cylidrical lenses see e.g. Purnapatra, <NAME>, <NAME>. Determination of electric field at and near the focus of a cylindrical lens for applications in fluorescence microscopy (2013) """ from __future__ import absolute_import from __future__ import print_function import os import sys import nu...
from __future__ import unicode_literals from django.middleware.csrf import get_token from django.http import JsonResponse, HttpResponse from django.shortcuts import render, get_object_or_404, redirect from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from django.contrib import mes...
import os import math import argparse import random import logging import json from time import time import matplotlib.pyplot as plt import torch import torch.distributed as dist import torch.multiprocessing as mp from data.data_sampler import DistIterSampler import options.options as option from utils import util fr...
import json from django.shortcuts import render from datetime import datetime, timedelta, date from detail.interface import DetailBase from xm_s_common.third.binghe_sdk import BingheEsBase from xm_s_common.utils import format_return, format_power, format_fil, format_fil_to_decimal, _d,un_format_fil_to_decimal from xm...
from dataclasses import dataclass from enum import Flag, Enum, unique from typing import List, Optional from asn1crypto import x509 from certvalidator.path import ValidationPath from oscrypto import keys as oskeys from pdf_utils import generic from pdf_utils.generic import pdf_name, pdf_string from pdf_utils.incremen...
from . import PE, BUS_NAMES, NAMESPACES, CYCLE_DELAYS from .tabla_utils import SRC_PE_ID_FN, DEST_PE_ID_FN from .tabla_utils import ReadWriteInfo, EdgeReadWriteInfo from collections import namedtuple, defaultdict import bisect import sys import tqdm import pickle NamespaceRW = namedtuple('NamespaceRW', ['start', 'fini...
# # file: probability.py # Programmatical interface for the probability algorithm. # import numpy as np from libcirc.innerprod import * import libcirc.compile.projectors as projectors import os from subprocess import PIPE, Popen # calculate probability that a compiled circuit yields a measurement # circ is a compile...
import subprocess import os from .helper import run_mp, run_non_mp, thirdparty_binary from ..helper import load_scp def gmm_gselect_func(iteration, train_directory, config, feature_string, x): log_path = os.path.join(train_directory, 'log', 'gselect.{}.log'.format(x)) with open(log_path, 'w', encoding='utf8')...
from __future__ import print_function, division # ML utils from sklearn.pipeline import make_pipeline from sklearn import preprocessing from sklearn.model_selection import KFold, cross_validate from sklearn.metrics import confusion_matrix # classifiers from sklearn.discriminant_analysis import LinearDiscriminantAnalysi...
""" @author: BIGMB """ import numpy as np import tensorflow as tf import re import time Mlines = open('movie_lines.txt',encoding = 'utf-8', errors = 'ignore').read().split('\n') Mconversations = open('movie_conversations.txt',encoding = 'utf-8', errors = 'ignore').read().split('\n') id2line = {} for li...
import torch import torch.nn as nn import torch.nn.functional as F import net.xception as xception class SeparableConv2d(nn.Module): def __init__(self,in_channels,out_channels,kernel_size=1,stride=1,padding=0,dilation=1,bias=False): super(SeparableConv2d,self).__init__() self.conv1 = nn.Conv2d(in_channels,in_cha...
import avro import copy from makedoc import add_dictlist import sys import pprint from pkg_resources import resource_stream import yaml import avro.schema import validate import json import urlparse import ref_resolver from flatten import flatten import logging from aslist import aslist import jsonld_context import sc...
""" Module for synthetic and real datasets with available ground truth saliency map explanations. Also contains methods and classes for saliency map data manipulation. All of the datasets must be instanced first. Then, when sliced, they all return the observations, labels and ground truth explanations, respectively. "...
#!/usr/bin/env python3 # Copyright 2018 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import unittest from unittest import mock from cros.factory.hwid.v3 import builder from cros.factory.hwid.v3 import comm...
# coding=utf-8 import datetime import hashlib import os import logging import threading import traceback import gzip import types from babelfish import Language from json_tricks.nonp import loads#, dumps from subzero.lib.json import dumps from constants import mode_map from subliminal_patch.subtitle import Modified...
import copy import numpy as np import torch.nn.functional as F import torch from typing import Optional, List, Tuple from torch import Tensor, nn class MLP(nn.Module): """ Linear Embedding """ def __init__(self, input_dim: int = 2048, embed_dim: int = 768): s...
import numpy as np def get_norm_2d(vertex3d): # print 'get_norm_2d',vertex3d.shape return np.sqrt(np.sum(vertex3d[:, :2]**2, 1)) # print ' r',r.shape # return r def get_length_polylines(polylines): # print 'get_length_polylines' # v = np.array([[[0.0,0.0,0.0],[1,0.0,0.0]],[[1,0.0,0.0],[1,2,...
import random import re from enum import Enum from typing import List, Tuple import numpy as np from nagi.constants import TIME_STEP_IN_MSEC, MAX_HEALTH_POINTS_2D, FLIP_POINT_2D, \ ACTUATOR_WINDOW, LIF_SPIKE_VOLTAGE, NUM_TIME_STEPS, DAMAGE_FROM_CORRECT_ACTION, \ DAMAGE_FROM_INCORRECT_ACTION, INPUT_SAMPLES_PER...
import json import re from lxml import html from helpers import flatten, check_soc_term def extract_atc_code(content): """ """ atc_codes = [] for item in content: atc_content = item['atc_text'].replace(" ", "") try: atc_code = re.search(r'([A-Z]{1}[0-9]{2}[A-Z]+[0-9]*)', atc_content).group(1) ...
#!/usr/bin/env python3 import csv import glob import time import easyargs import matplotlib import os import random from torch import optim from torch.backends import cudnn from torch.optim import lr_scheduler matplotlib.use('Agg') PACKAGE_PARENT = '..' SCRIPT_DIR = os.path.dirname(os.path.realpath(os.path.join(os....
import os import logging import tempfile import rasterio import whitebox import yaml import numpy as np import geopandas as gpd import cerf.package_data as pkg from rasterio import features from cerf.utils import suppress_callback # instantiate whitebox toolset wbt = whitebox.WhiteboxTools() class Interconnecti...
__version__ = '0.1.3' __maintainer__ = '<NAME> 31.12.2019' __contributors__ = '<NAME>, <NAME>' __email__ = '<EMAIL>' __birthdate__ = '31.12.2019' __status__ = 'prod' # options are: dev, test, prod __license__ = 'BSD-3-Clause' if __package__ is None or __package__ == '': import sys from os import path sys....
# -*- coding: utf-8 -*- """ Create : 12 April 2020 16.23 Last Update : @author: Toro """ #from queue import PriorityQueue from copy import deepcopy # Starting position startPositions = { 101: (0, 0), 102: (1, 0), 103: (0, 1), 104: (2, 0), 105: (1, 1), 106: (0, 2), 107: ...
import re import os, sys from collections import OrderedDict import cv2 import numpy as np from tqdm import tqdm import dominate from dominate.util import text from dominate.tags import meta, h2, h3, table, tr, td, th, p, a, img, br, video, caption, link, style, br, span, thead, tbody from .core import * from .video...
""" Purpose: learning Panda3D, by building a random block-world, that might bear a passing resemblance to Minecraft. Forked under MIT license, from: https://github.com/kengleason/Panda3DCraft """ import argparse from argparse import RawTextHelpFormatter from contextlib import suppress import json import random impo...
# Train continuous filter model. # # Modified from train.py # Single-GPU training. # Will use H5 dataset in default. If using normal, will shift to the normal dataset. # import argparse import math from datetime import datetime import h5py import numpy as np import tensorflow as tf import socket import importlib import...
# -*- coding:utf-8 -*- import os, time, uuid, platform, json, codecs import logging from multiprocessing import Process, freeze_support, Manager from datetime import date, datetime, timedelta from subprocess import Popen, PIPE __all__ = ['crontab', 'crontab_run'] current_path = os.path.dirname(os.path.absp...
import argparse import os import sys from collections import Counter from collections import OrderedDict from collections import defaultdict from gzip import GzipFile from pathlib import Path from tempfile import TemporaryFile from unicodedata import category import numpy as np np.seterr(all='raise') GLOVEFILE = 'gl...
import os, sys import pathlib import numpy as np from pyapprox.benchmarks.benchmarks import Benchmark if sys.platform != 'win32': import dolfin as dl from pyapprox_dev.fenics_models.fenics_utilities import \ generate_polygonal_mesh, get_polygon_boundary_segments from pyapprox_dev.fenics_models.he...
import collections from copy import deepcopy import meshio import numpy from ._common import ( get_local_index, get_meshio_version, get_new_meshio_cells, get_old_meshio_cells, meshio_data, ) from ._properties import ( _connections, _face_areas, _face_normals, _faces, _materials...
"""Compare marked moles across rotomaps. Controls: 'left arrow' or 'right arrow' to change image in the left slot. 'up arrow' or 'down arrow' to change rotomap in the left slot. 'space' to swap left slot and right slot. 'p' or 'n' to change the mole being examined in both slots. 'a' to toggle cros...
import tensorflow as tf import numpy as np import cPickle # Set global parameters to the inference mode tf.GLOBAL = {} tf.GLOBAL['trainable'] = True tf.GLOBAL['init'] = False tf.GLOBAL['dropout'] = 0.0 def PyramidPixelCNN(x, seed, channels=100, D=2, L=2, l=3, num_outputs=100): batch_size = x.get_shape().as_l...
from modules import * from . dirpop import * from . unitpop import * from . rangepop import * from math import floor, log10 class ParamSetDelegate(QStyledItemDelegate): font = QFont("Calibri", 14) def __init__(self, parent:QMainWindow): super(ParamSetDelegate, self).__init__(parent) self.window...
#!/usr/bin/env python3 import os import subprocess import shutil import time import sys msbuild_path = 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe' git_path_windows = 'C:/Program Files/Git/bin/git.exe' git_path_linux = 'git' cmake_path_windows = 'cmake.exe' cmake_pat...
import sys import re from .. node import * from .. util import join_list, pretty_print from . informix import InformixWriter from functools import reduce invalid_names = set(""" ALL END DEFAULT """.split()) config = { "assign": "=", "decimal": ("30","10"), } class Config: pass conf = Config() conf.__dict__ ...
import datetime import os import numpy import torch from .abstract_game import AbstractGame class MuZeroConfig: def __init__(self): # More information is available here: https://github.com/werner-duvaud/muzero-general/wiki/Hyperparameter-Optimization self.seed = 0 # Seed for numpy, torch and t...
# tindar.py from typing import Optional from pulp import * import numpy as np from pathlib import Path from custom_timer import Timer import itertools import json PROJECT_DIR = str(Path(__file__).resolve().parents[1]) class Tindar: '''Class to solve Tindar pairing problems Input ----- love_matrix:...
# The MIT License (MIT) # Copyright (c) 2019 <NAME> (github.com/imposter) # # 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 u...
import json import os import pandas as pd import plotter import re import streamlit as st import sys import tensorflow as tf from contextlib import contextmanager from datetime import datetime, timedelta from downloader import download from io import StringIO from matplotlib import pyplot as plt from model import prep...
# -*- coding: utf-8 -*- # Copyright (c) 2020. Distributed under the terms of the MIT License. import numpy as np import pytest from pymatgen.core import Lattice from pymatgen.core.structure import Structure from pymatgen.core import Element from vise.tests.helpers.assertion import assert_msonable from vise.util.stru...
import numpy as np import pywt from pyentrp import entropy as ent import nolds import scipy from scipy import stats from PyEMD import CEEMDAN from tqdm import tqdm def sig_fft(sig, fftn = 35): features = np.fft.fft(sig, fftn).real return features def sig_spectrum(sig, fftn = 35): features = np.fft.fft(sig...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # The code is originated from # https://github.com/DeNA/Chainer_Realtime_Multi-Person_Pose_Estimation/blob/master/models/HandNet.py from __future__ import print_function import os import itertools, pkg_resources, sys from distutils.version import LooseVersion if LooseVe...
from flask import render_template, request, jsonify from npsflaskapp import app import subprocess import json api_key = '' # to run this, get an API key and put it here curr_search_results = {} curr_selected_park = '' @app.route('/') @app.route('/index') def index(): with open('data/states.json') as json_file: ...
import os import sys import traceback import random from collections import Counter, defaultdict from textgrid import TextGrid, IntervalTier from ..dictionary import sanitize from ..helper import load_text, output_mapping, save_groups, filter_scp from ..exceptions import SampleRateError, CorpusError from .base impor...
import discord from discord.ext import commands from discord.rtp import SilencePacket, RTPPacket from discord.opus import Decoder from discord.reader import AudioSink, WaveSink import speech_recognition as sr import io import audioop import wave import threading import asyncio bot = commands.Bot(command_prefix='bruh ...
# Interface for loading preprocessed fMRI data and confounds table from os.path import exists from bids import BIDSLayout from nipype.interfaces.io import IOBase from nipype.utils.filemanip import copyfile from nipype.interfaces.base import (BaseInterfaceInputSpec, SimpleInterface, traits, TraitedSpec, Directo...
# ----------------------------------------------------------------------------- # Copyright (c) 2013-2021, NeXpy Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING, distributed with this software. # -------------------------------------------------...
import numpy as np import pyopencl as cl import loopy as lp import feinsum as fnsm import logging logging.basicConfig(level="INFO") logger = logging.getLogger(__name__) def transform_div(t_unit, insn_match=None, kernel_name=None): ndim = 3 ndofs = 35 ref_einsum = fnsm.fused_einsum("es, sij, ej -> ei", ...
# -*- coding: utf-8 -*- """ .NET base classes Copyright (c) 2020-2021 MalwareFrank """ import abc import enum import struct as _struct import typing import logging from typing import TYPE_CHECKING, Dict, List, Type, Tuple, Union, Generic, TypeVar, Optional, Sequence from pefile import Structure from . import enums, ...
import requests from gevent import monkey def stub(*args, **kwargs): # pylint: disable=unused-argument pass monkey.patch_all = stub import grequests import os import json from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry meraki_api_token = os.getenv("MERAKI_API_TOKEN") meraki_org = os...
import re import pkg_resources import inspect tld_names = pkg_resources.resource_string('libtyposquats.data', 'effective_tld_names.dat') def is_valid(domain=None): drex = (r'^(?=.{4,255}$)([a-zA-Z0-9][a-zA-Z0-9-]{,61}[a-zA-Z0-9]\.)+' r'[a-zA-Z0-9]{2,5}$') ...
""" Transforms a string into a stream/list of tokens, while performing a basic syntax check """ from __future__ import annotations from os import PathLike from dataclasses import dataclass from enum import Enum from typing import Optional, Final from token_ import Token, Symbol, TokenType, Keyword, Loc, UnaryType _...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2019 SAP SE or an SAP affiliate company. All rights reserved # ============================================================================ """ Graph Generator """ import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns import ...
import torch from torch import optim import os import os.path import time import numpy as np import pandas as pd from collections import defaultdict import argparse import utils from utils import read_vocab, Tokenizer, vocab_pad_idx, timeSince, try_cuda from utils import module_grad, colorize, filter_param from env_s...
from django.conf import settings from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.http import JsonResponse, HttpResponse, Http404 from django.contrib.auth.models import User, Group from django.core import serializers from datetime imp...
""" Created on Fri Aug 24 11:47:20 2018 Author: <NAME> This module determines total power of multijunction cells and also saves data for each bandgap sampled.""" # Import libraries. import numpy as np from scipy.optimize import minimize_scalar import single_cell_power, spectral, sunlight def save_r...
#!/usr/bin/env python import rospy import aco_ros import math from nav_msgs.msg import OccupancyGrid from nav_msgs.msg import MapMetaData from geometry_msgs.msg import PoseWithCovarianceStamped from geometry_msgs.msg import Point from move_base_msgs.msg import MoveBaseActionGoal from actionlib_msgs.msg import GoalID #f...
from tkinter import * from tkinter.font import BOLD from tkinter import ttk from tkinter import tix import sqlite3 from turtle import bgcolor from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import letter, A4 from reportlab.pdfbase import pdfmetrics from reportlab.platypus import SimpleDocTem...
from django.contrib.auth.models import User from django.db import models from django.utils.functional import cached_property from contract.models import Contract, Contractor, ParkingLot, ParkingPosition, ContractPayment from master.models import BankAccount from utils import constants, errors from utils.django_base im...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Content-related interfaces. """ from __future__ import print_function, absolute_import, division __docformat__ = "restructuredtext en" import sys logger = __import__('logging').getLogger(__name__) # pylint:disable=inherit-non-class,too-many-ancestors,no-self-argument,a...
import shutil from enum import Enum from typing import Any, Callable, Dict, Iterator, Optional from pocketutils.core.exceptions import ( LookupFailedError, MissingResourceError, RefusingRequestError, ) from peewee import JOIN from valarpy.Valar import Valar from sauronx import is_process_running, show_tab...
# -*- coding: utf-8 -*- """ Created on Thu Jan 17 13:35:57 2019 @author: klowell """ #%% ############################################################################ # This program reads from already-produced csv files the lidar points # for a given tile. To each point, it then affixes # -- "macro uncertai...
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import numpy as np ## sub-function descriptions ## please refer to main py file for function descriptions ''' binary_classifer: PyTorch model for link prediction (with different hidden layers) graph_probe: PyTorch model for...
import discord from discord.ext import commands from bot.classes.bet import Bet from bot.classes.prediction import Prediction import json import os import os.path from os import path import pymongo from pymongo import MongoClient # Global stuff prefix = "$" prediction = Prediction("", None) daily_reward: int = 500 tim...
""" Metrics for rationale selecting models They are only used to give some impression during training. We used separate evaluation metrics (module analyze) for the reported results. """ from typing import Union, Tuple, Dict, List from allennlp.training.metrics import Metric from overrides import overrides import torc...
#_ __ # | |/ /___ ___ _ __ ___ _ _ ® # | ' </ -_) -_) '_ \/ -_) '_| # |_|\_\___\___| .__/\___|_| # |_| # # <NAME> # Copyright 2018 Keeper Security Inc. # Contact: <EMAIL> # import re import os import base64 import argparse import logging import datetime import getpass from typing import Optional, List ...
#! /usr/bin/env python # in this file, the frames by default are rgb unless state otherwise by the variable name from MyUtils import * from vision import * import Queue import StringIO import json import logging import multiprocessing import sys import os import threading import time from operator import itemgetter im...
from invoices.exports import date_parse from rest_framework import generics, permissions from oauth2_provider.contrib.rest_framework import TokenHasReadWriteScope, TokenHasScope from rest_framework.views import APIView from rest_framework.response import Response from django.contrib.auth.models import User from rest_fr...
#!/usr/bin/env python # -*- coding: utf-8 -*- r''' Inject functions into the upstream ``file`` execution module. ''' # Import python libs from __future__ import absolute_import import difflib import filecmp import glob import logging import os import re import shutil # Import salt libs import salt.utils.files import ...
""" Three-dimensional spike localization and improved motion correction for Neuropixels recordings Code for point-cloud-based motion estimation Input: {x, y, z} localization estimate, spike times, amplitudes, geometry Output: point-cloud-based motion estimation """ import numpy as np import matplotlib.pyplot as plt f...
""" This is the source for machine learning 这个代码是为了 机器学习识别 的后台代码 """ import json import cv2 import numpy as np import torch import torch.nn as nn import torchvision.models as models import torchvision.transforms as transforms from PIL import Image from matplotlib import pyplot as plt from torchsummary import summary...
import pandas as pd import numpy as np from friendly_calliope.consolidate_calliope_output import EU28 from friendly_calliope.io import write_dpkg IAMC_GROUP_MAPPING = { "nameplate_capacity": "Installed capacity", "total_investment_cost": "Investments", "flow_in_25": "Hourly power consumption|Percentile 25...
#!/usr/bin/env python """ Evaluate random forest and VQSR results against the truth data """ from os.path import join from typing import Optional import logging from pprint import pformat import click import hail as hl from gnomad.utils.filtering import filter_to_clinvar_pathogenic from gnomad.variant_qc.evaluation ...
from __future__ import absolute_import, division, print_function import numpy as np import torch import torch.nn as nn from mesh.kinematicsTransformation import HandTransformationMat from mesh.pointTransformation import RandScale from mesh.render import DepthRender, Hand3DHeatmapRender class DepthResample(nn.Module):...
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * from datetime import datetime from copy import copy import builtins import collections import json import re import os import sys import shutil import tempfile fr...
#!/usr/bin/env python3 import bisect import click import collections import dateutil.parser from flask import Flask, request import glob import http.cookiejar import logging import os import re import requests import stravalib import sys import tcxparser import threading import time import yaml _AUTH_TIMEOUT = 60 _MA...
# -*- coding: utf-8 -*- class VerticeInvalidoException(Exception): pass class ArestaInvalidaException(Exception): pass class MatrizInvalidaException(Exception): pass class Grafo: QTDE_MAX_SEPARADOR = 1 SEPARADOR_ARESTA = '-' __maior_vertice = 0 def __init__(self, V=None, M=None): ...
# Command line script for checking agreement in the Icelandic pronunciation dictionary, which is in a tab-seperated .csv format # Errors, discrepancies and suspicious-looking entries printed to a text file. # The two arguments are by default 'ice_pron_dict_complete_2106.csv' and 'check_agreement_output.txt' (overwritte...
#!/usr/bin/env python # wafw00f - Web Application Firewall Detection Tool # by <NAME> - enablesecurity.com (c) 2016 # and <NAME> - Trustwave 2009 __license__ = """ Copyright (c) 2016, {<NAME>|<NAME>} All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted p...
import logging from functools import partial from typing import Any, Callable, Dict, Optional, Sequence import numpy as np from qcodes import ( ArrayParameter, ChannelList, Instrument, InstrumentChannel, VisaInstrument, ) from qcodes import validators as vals from qcodes.instrument.parameter impor...
from collections import defaultdict, namedtuple from typing import TYPE_CHECKING, Dict, List, Optional, Set, Union from urllib.parse import urljoin import graphene from django.conf import settings from django.db.models import Case, CharField from django.db.models import Value as V from django.db.models import When fro...
#!/usr/bin/env python3 # 1. Take protoxform artifacts from Bazel cache and pretty-print with protoprint.py. # 2. In the case where we are generating an Envoy internal shadow, it may be # necessary to combine the current active proto, subject to hand editing, with # shadow artifacts from the previous version; thi...
from scipy import io from scipy.spatial.distance import directed_hausdorff, pdist from scipy.spatial.distance import squareform from itertools import combinations from sklearn.cluster import DBSCAN import numpy as np from threading import Thread, Event from queue import Queue import cv2 import os import time from hash_...
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Interpreter version: python 2.7 # """ This module is used to put data to Aleph. It is based on custom made webform, which is currently used to report new books by publishers. Most important function from this module is :func:`exportEPublication`, which will do everyth...
# -------------------------------------------------------- # Compute virtual station for each region from region list # 1. Define ensemble members # 2. Determine region order # 3. Merge for each ensemble member # 4. Compute global estimate from basin-mean data # -------------------------------------------------------- ...
# Copyright 2015 The TensorFlow 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 applica...
"""Utility functions for handling times, dates, etc.""" import datetime import logging import re import warnings import cftime import numpy as np import pandas as pd import xarray as xr from ..internal_names import ( BOUNDS_STR, RAW_END_DATE_STR, RAW_START_DATE_STR, SUBSET_END_DATE_STR, SUBSET_START_DATE_STR,...
import pdb from typing import Tuple, Optional import numpy as np import optuna import torch from mujoco_py import load_model_from_xml, MjSim from scipy.optimize import minimize from torch import Tensor from dair_pll import state_space from dair_pll.integrator import StateIntegrator from dair_pll.system import System ...
import json import glob import pickle as pkl import numpy as np import matplotlib.pyplot as plt import scipy.io from sklearn import svm, tree from sklearn.metrics import precision_recall_fscore_support from sklearn.preprocessing import normalize, scale from scipy.cluster.vq import whiten from sklearn.manifold import TS...
import random import sys import time import gym from typing import List, Tuple from gym_minigrid.minigrid import Grid, MiniGridEnv, Wall, Goal from custom_envs.envs.multi_env import MultiEnv from src.utils import split_permutations class SingleTMaze(MiniGridEnv): is_double = False reward_values = dict(goal=1...
# Copyright 2019 The TensorFlow 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 applica...
import re from copy import deepcopy from datetime import datetime from typing import List import numpy as np import pandas as pd import pytest from etna.datasets import TSDataset from etna.metrics import MAE from etna.metrics import MSE from etna.metrics import SMAPE from etna.metrics import Metric from etna.metrics ...
import os import sys import traceback import time import multiprocessing from types import SimpleNamespace from collections import OrderedDict from golem.core import session from golem.core import utils from golem.core import test_data from golem.core import environment_manager from golem.core import settings_manager ...
# Copyright 2017 The Sonnet 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 applicable l...
#!/usr/bin/env python """Helper classes for flows-related testing.""" import itertools import logging import pdb import traceback from grr_response_client.client_actions import standard from grr.lib import flags from grr.lib import rdfvalue from grr.lib import registry from grr.lib.rdfvalues import client as rdf_cli...
from datetime import datetime from queue import Queue import serial import sys import time import traceback from concord.concord_commands import RX_COMMANDS, \ build_cmd_equipment_list, EQPT_LIST_REQ_TYPES, \ build_dynamic_data_refresh, build_keypress, \ build_cmd_alarm_trouble from concord.concord_helper...