text
stringlengths
3.07k
22.1k
"""Copy records from the first KGTK file to the output file, exploding a column into several data type-specific columns. """ from argparse import ArgumentParser, Namespace import attr from pathlib import Path import sys import typing from kgtk.kgtkformat import KgtkFormat from kgtk.io.kgtkreader import KgtkReader, K...
""" Categorizes the Interaction """ import numpy as np from . import kalman from . import metrics ####################################### ## Helper Functions for interactions ## ####################################### def compute_velocity_interaction(path, neigh_path, obs_len=9, stride=3): ## Computes the angle...
import imgaug as ia import imgaug.augmenters as iaa import torch import os import time import glob import numpy as np import matplotlib.pyplot as plt import cv2 import matplotlib from PIL import Image from progressbar import ProgressBar is_HAL = len(glob.glob('/home/shared/imagenet/raw/val_nodir/')) if not is_HAL: ...
import os from enum import Enum from pathlib import Path from os.path import join, exists import argparse import pathlib import click import numpy as np import pandas as pd import download_data import dataframe import plotter from matplotlib import pyplot as plt import seaborn as sns import dataframe import plotter...
# -*- coding: UTF-8 -*- __author__ = 'isparks' import requests import datetime import hmac import hashlib import base64 from six.moves.urllib.parse import urlencode SECONDS_IN_24_HOURS = 24 * 60 * 60 def isodatetime(dt): """Takes a date, returns ISO8601 date/time format""" return dt.strftime('%Y-%m-%dT%H:%M:...
import math import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import time total_FLOPs = 0 i=0 def prune(a, index): # a (1,4,2,2) # b (4) return a[:,np.nonzero(index).squeeze(1),:,:] def prune_n(a, len): return a[:,:len, :,:] def default_conv(in_channels, out_chan...
# Copyright (c) Lawrence Livermore National Security, LLC and other VisIt # Project developers. See the top-level LICENSE file for dates and other # details. No copyright assignment is required to contribute to VisIt. """ file: filter_graph.py author: <NAME> <<EMAIL>> created: 10/14/2010 description: Core fi...
import pytest from conftest import get_fpga, get_routing_ctx from ops import Pop, Push from program import CHANNELS_PER_FPGA, FPGA, Program from routing_table import NoRouteFound, ckr_routing_table, \ cks_routing_tables def check_fpga_tables(fpga, tables, expected): assert len(tables) == len(expected) as...
#!/usr/bin/env python # # base.py - The Action and ToggleAction classes. # # Author: <NAME> <<EMAIL>> # """This module provides the :class:`Action`, :class:`NeedOverlayAction`, and :class:`ToggleAction` classes. See the :mod:`.actions` package documentation for more details. """ import logging import fsl.data.image...
# pylint: disable=not-callable, no-member, arguments-differ, missing-docstring, invalid-name, line-too-long import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data from scipy.ndimage import zoom from cath.util import lr_schedulers from se3cnn.image.filter import lo...
import time import numpy as np import yaml import matplotlib.pyplot as plt from sklearn.metrics import confusion_matrix, accuracy_score, cohen_kappa_score def plot_full_barchart(test_score, n_pilots, title="Test accuracy - BCIC IV 2a", fig=None, ax_idx=0): if fig: ax = fig.get_axes()[ax_idx] else: ...
#!/usr/bin/python #-*- coding:utf8 -*- """ 本程序用来获取音乐台网站的NV排行榜的数据 音悦台:http://www.yinyuetai.com 参考书籍 《用Python写网络爬虫》 《Python网络爬虫实战》 """ import requests import sys import os import re import random import time from bs4 import BeautifulSoup reload(sys) sys.setdefaultencoding('utf8') """ Item 代表一个MV榜单 """ class Item(obj...
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ File: gcexport.py Original author: <NAME> (https://github.com/kjkjava/) Date: April 28, 2015 Fork author: <NAME> (https://github.com/moderation/) Date: August 25, 2018 Updates: <NAME> Date: May 12, 2019 Description: Use this script to export your fitness data from Garm...
from math import sqrt, floor import sys import platform def prob_1(n): return n % 2 == 0 def prob_2(n): return (n-32)*(5/9) def prob_3(n, b): if b == 0: return 1 return n * prob_3(n, b-1) def prob_4(c, l: int): size = len(c) final = "" if size == l: return c elif...
#!/usr/bin/python """ tempMP.py --- An example for using the multiPoint analysis module """ # ============================================================================= # Standard Python modules # ============================================================================= import sys, os, time # =================...
import sys,os import glob,time from nlptk.postagging.taggers import get_tagger from nlptk.junk.preprocess import Preprocessor from nlptk.junk.vocabulary import (Stream, BaseCorpus, PlainCorpus, Te...
""" Implementation of KNX 2 byte Float-values. They correspond to the the following KDN DPT 9 class. """ from __future__ import annotations from xknx.exceptions import ConversionError from .dpt import DPTNumeric class DPT2ByteFloat(DPTNumeric): """ Abstraction for KNX 2 Octet Floating Point Numbers. D...
import os from collections import OrderedDict from pyglet.gl import * from pygly.shader import Shader, ShaderProgram import pymesh.obj from razorback.mesh import Mesh class Data( object ): shader_source = { 'vert': open(os.path.dirname(__file__) + '/obj.vert','r').read(), 'frag': open(os.path....
# Copyright 2015, Google Inc. # 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 copyright # notice, this list of conditions and the f...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function from six import text_type import logging from collections import namedtuple import kazoo from netaddr import IPNetwork, IPAddress, AddrFormatError from contrail_api_cli.exceptions import CommandError, ResourceNotFound from contrail_api_cl...
import numpy as np from numpy.linalg import multi_dot from scipy import stats from scipy.linalg import inv from joblib import Parallel, delayed from sklearn.utils.validation import check_memory from sklearn.linear_model import Lasso from .noise_std import reid, group_reid from .stat_tools import pval_from_two_sided_pv...
import contextlib import boto3 import botocore.exceptions from botocore.config import Config from flask import current_app boto3_config = Config( retries={ "max_attempts": 5, "mode": "standard", } ) def get_client_kwargs(app=current_app): return { "endpoint_url": app.config.get("...
# coding: utf-8 """Wrappers for forwarding stdout/stderr over zmq""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import print_function import atexit from binascii import b2a_hex from collections import deque try: from importlib import lock_h...
""" This module contains utilities for converting 2D arrays of longitude and latitude of mean GLM CCD pixel positions into a lookup table which, given arbitrary event latitude and longitude, may be used to quickly find the pixel ID of that event. This supports two crucial needs: - Determining the pixel adjacency inf...
from .. import utils from .scatter import _ScatterParams from .tools import generate_colorbar from .tools import generate_legend from .tools import label_axis from .utils import _get_figure from .utils import _with_default from .utils import parse_fontsize from .utils import show from .utils import temp_fontsize impor...
# ----------------------------------- # Name : dbscan.py # Author : E.Taskesen # Contact : <EMAIL> # Licence : MIT # Respect the autor and leave this here # ----------------------------------------------- from tqdm import tqdm import numpy as np import matplotlib.pyplot as plt import sklearn.cluste...
import os from cs50 import SQL from flask import Flask, flash, redirect, render_template, request, session from flask_session import Session from tempfile import mkdtemp from werkzeug.exceptions import default_exceptions, HTTPException, InternalServerError from werkzeug.security import check_password_hash, generate_pa...
from flask import Blueprint, flash, redirect, render_template, request, url_for, session, jsonify, current_app from flask_login import current_user, login_required, login_user, logout_user from werkzeug.utils import secure_filename from functools import wraps import os import config from wiki.web.forms import EditorFo...
# Copyright 2019 UniversalQCompiler (https://github.com/Q-Compiler/UniversalQCompiler) # 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 # Unles...
#=============================================================================== #--- SETUP Config #=============================================================================== from config.config import * #import unittest #=============================================================================== #--- SETUP Lo...
# The tester module. import time try: from collections import UserDict except ImportError: from UserDict import UserDict try: import queue except ImportError: import Queue as queue import can from .errors import Error class DecodedMessage(object): """A decoded message. """ def __ini...
""" summary: show decompiler xrefs description: Show decompiler-style Xref when the `Ctrl+X` key is pressed in the Decompiler window. * supports any global name: functions, strings, integers, ... * supports structure member. author: EiNSTeiN_ <<EMAIL>> """ from __future__ import print_function import ida_ke...
import time from datetime import datetime import json import sys import os from argparse import ArgumentParser import signal import logging from kafka import KafkaProducer, KafkaConsumer from kafka.errors import CommitFailedError from digsandpaper.elasticsearch_indexing.index_knowledge_graph import index_knowledge_gra...
"""Plot pairs.""" from __future__ import annotations # Standard library import filecmp import os import re import sys import traceback from pathlib import Path from subprocess import PIPE from subprocess import Popen from typing import Iterator from typing import Optional from typing import Sequence from typing import...
import logging from typing import Any, Dict, Optional import stripe from django.conf import settings from django.http import HttpRequest, HttpResponse, HttpResponseRedirect from django.shortcuts import render from django.urls import reverse from django.utils.timezone import now as timezone_now from django.utils.transl...
#!/usr/bin/env python3 import argparse import os from pathlib import Path import pandas as pd import artistools as at import matplotlib.pyplot as plt from astropy import units as u import matplotlib import numpy as np from mpl_toolkits.mplot3d import Axes3D import gc def make_cone(args): print("Making cone") ...
from __future__ import division import cPickle try : import gobject except ImportError : gobject = None import sys class coot_extension_gui (object) : def __init__ (self, title) : import gtk self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) scrolled_win = gtk.ScrolledWindow() self.outside_vbox = gtk...
from datetime import datetime from operator import itemgetter from sqlalchemy import ( and_, false, func, select, distinct as sqldistinct, inspect) from sqlalchemy.ext.declarative import declarative_base, declared_attr from sqlalchemy.ext.declarative.base import _declarative_constructor from sqlalchemy import ( ...
import argparse import re from datetime import timedelta from operator import itemgetter from mtools.mplotqueries.plottypes.base_type import BasePlotType try: import matplotlib.pyplot as plt from matplotlib import __version__ as mpl_version from matplotlib.dates import date2num from matplotlib.patche...
"""Support for P2000 sensors.""" import datetime import logging import feedparser import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( ATTR_ATTRIBUTION, ATTR_LATITUDE, ATTR_LONGITUDE, CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME, ...
import torch import torch.nn as nn import torch.nn.functional as F from config import cfg import pdb class ConvMD(nn.Module): def __init__(self, M, cin, cout, k, s, p, bn = True, activation = True): super(ConvMD, self).__init__() self.M = M # Dimension of input self.cin = cin ...
# Copyright (C) 2018 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Test audit RBAC.""" import copy from os.path import abspath from os.path import dirname from os.path import join from collections import defaultdict from appengine import base from ggrc import app # no...
# -*- coding: utf-8 -*- """Session related attribute container definitions.""" import collections import time import uuid import plaso from plaso.containers import interface from plaso.containers import manager class Session(interface.AttributeContainer): """Session attribute container. Attributes: aborted...
# Copyright (c) 2020, <NAME> # License: MIT License import pytest from ezdxf.tools import pattern def test_load_iso_pattern(): p = pattern.load() assert p['ANSI31'][0] == [45.0, (0.0, 0.0), (-2.2450640303, 2.2450640303), []] def test_load_scaled_iso_pattern(): p = pattern....
import io import os import random from typing import List, Optional, Text, Tuple import numpy as np import pytorch_lightning as pl import torch from torch.nn.utils.rnn import pad_sequence from torch.utils.data import DataLoader, Dataset, random_split from varclr.data.preprocessor import Preprocessor from varclr.data....
#!/usr/bin/python3 # # Copyright (C) 2020 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
""" Test floating point deconstructions and floor methods """ import sys PY2 = sys.version_info[0] < 3 from distutils.version import LooseVersion import numpy as np from ..casting import (floor_exact, ceil_exact, as_int, FloatingError, int_to_float, floor_log2, type_info, _check_nmant, ...
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Module Description: Example: Todo: *Bot para avisar quando der 8 horas *Bot para avisar quando deu horário do almoço *Bot para avisar caso não tenha uma hora de intervalo durante o dia """ __author__ = "<NAME>" __email__ = "<EMAIL>" from selenium import...
"""Modified JSON API v1.0 for OPTIMADE API""" # pylint: disable=no-self-argument,no-name-in-module from enum import Enum from typing import Optional, Union, List, Dict, Type, Any from datetime import datetime from pydantic import root_validator, BaseModel, AnyHttpUrl, AnyUrl, EmailStr from optimade.models import jso...
# 19-07-17: include all "unique" models at each candidate selection step, as defined by having at most one common parameter with other unique models # fixed a bug in the collinearity criteria import pandas as pd import numpy as np from sklearn.linear_model import LinearRegression from sklearn import metrics...
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # 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 pytest import random import string from common import client, node_default_tags, volume_name # NOQA from common import check_volume_replicas, cleanup_volume, \ generate_volume_name, get_self_host_id, get_update_disks, set_node_tags, \ wait_for_volume_delete, wait_for_volume_detached, \ wait_for_volu...
import os os.environ["CUDA_VISIBLE_DEVICES"] = "7" import torch import numpy as np from scipy.spatial.distance import pdist, squareform device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') def GetIndicator(data, latent): if torch.is_tensor(data): data = data.detach().cpu().numpy() ...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import logging import torch from torch.nn import functional as F from maskrcnn_benchmark.modeling.matcher import Matcher from maskrcnn_benchmark.structures.boxlist_ops import boxlist_iou from maskrcnn_benchmark.modeling.utils import cat from maskr...
""" This module contains the CONFIG_SCHEMA for validation with voluptuous. """ import typing as T import datetime import traceback import voluptuous as vol from . import actor, schedule, util from .room import Room def build_schedule_rule(rule: dict) -> schedule.Rule: """Builds and returns a schedule rule fro...
""" Python module to control a robot with the ros_control package. To get control over a robot via ros_control actions, an ActionClient is necessary, which communicates with with the ActionServer of the corresponding controller. Note: This module is explicitly intended for use with Gazebo and not with a real ...
# BSD 3-Clause License # Copyright (c) 2019, regain authors # 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 copyright notice, this # lis...
import numpy as np from Orange import data def _get_variable(variable, dat, attr_name, expected_type=None, expected_name=""): failed = False if isinstance(variable, data.Variable): datvar = getattr(dat, "variable", None) if datvar is not None and datvar is not variable: raise Valu...
import copy import numpy as np from .problem import LpProblem from .solve import LpSolve from .solver import LpSolver # TODO: Refactor: Abstract From SimplexVectorized and SimplexMethod, 面向切片完成单纯形表。 # TODO: Implement a faster inv() for base_inv class SimplexVectorized(LpSolver): """ 矩阵化的单纯形法 待解决应符合标准型,即:...
from riotwatcher import LolWatcher, ApiError import sys def item_stat_print(user_input): item_list = static_item_list.get('data') items_id = ['1001', '1004', '1006', '1011', '1018', '1026', '1027', '1028', '1029', '1031', '1033', '1035', '1036', '1037', '1038', '1039', '1042', '1043', '1052', '1...
# Copyright 2015, Google Inc. # 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 copyright # notice, this list of conditions and the f...
''' Python mtdev ============ The mtdev module provides Python bindings to the `Kernel multi-touch transformation library <https://launchpad.net/mtdev>`_, also known as mtdev (MIT license). The mtdev library transforms all variants of kernel MT events to the slotted type B protocol. The events put into mtdev may be f...
import os import os.path as osp import pandas as pd import numpy as np import pickle from utils.utils.ply import read_ply, write_ply from utils import provider from utils.point_cloud_util import load_labels from open3d import open3d class FileData: def __init__(self, pcd_file_path, box_size_x, box_size_y, use_c...
''' module for remote control for dji mavic pro ''' import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib import patches as mpl_patches from matplotlib import lines as mpl_lines from dji_mavic_io import read_flightdata_csv rc_filename = 'dji_mavic_test_data_2.csv' rc_max = 1684 rc...
#! /usr/bin/env python # coding=utf-8 # Copyright (c) 2019 Uber 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 # # Unles...
import numpy as np import math def l2_regularization(W, reg_strength): ''' Computes L2 regularization loss on weights and its gradient Arguments: W, np array - weights reg_strength - float value Returns: loss, single value - l2 regularization loss gradient, np.array same shape...
# -*- coding: utf-8 -*- from PIL import Image import numpy as np import os,glob,re import random from chainer.dataset import dataset_mixin from chainercv.transforms import resize,random_flip,random_crop,rotate from chainercv.utils import read_image,write_image from skimage.transform import rescale import PIL try: ...
""" @author: Yauheni """ from __future__ import annotations from typing import List from src import tools class Transaction: def __init__(self, user: User, source_account: Account, dest_account: Account, amount: float) -> None: self.__id = tools.generate_random_int() self.__amount = amount ...
# plots.py import matplotlib matplotlib.rcParams = matplotlib.rc_params_from_file('../../matplotlibrc') #================================================ #Plots for the Value Function Iteration Lab #================================================ import numpy as np import math from scipy import stats as st import dis...
""" PLease set following environment variables for this script to work properly export DAPP_INSTANCES=<some integer> default value=1 export WEB3J_ETHCLIENT_HOST=<ip address> default value=None export WEB3J_ETHCLIENT_PROTOCOL=<> default value=http export WEB3J_ETHCLIENT_PORT=<> default value=8545 export SHARE_C...
# -*- coding: utf-8 -*- # # Caribou - text entry and UI navigation application # # Copyright (C) 2010 <NAME> <<EMAIL>> # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation; either version 2.1...
#!/usr/bin/env python3 # -*- coding:utf-8 -*- import subprocess def collect(): filter_keys = ['Manufacturer', 'Serial Number', 'Product Name', 'UUID', 'Wake-up Type'] raw_data = {} for key in filter_keys: try: res = subprocess.Popen("sudo dmidecode -t system|grep '%s'" % key, ...
#!/usr/bin/python # -*- coding: utf-8 -*- """ bibgen.py Generates a PDF of bibs that can be printed, based on the race configuration files. :copyright: (c) 2016 by <NAME>. :license: BSD, see LICENSE for more details. """ import math import cairo import poppler import lmcore import datetime import...
from __future__ import print_function import serial import time import struct import array as arr import stretch_body.cobbs_framing as cobbs_framing import copy import fcntl import logging """ Loop protocol is: RPC Data is sent over a COBBS encoding with CRC error detection. The packet is: Data can be up to X b...
""" Script that runs the axisymmetric, least-squares fit for MaNGA data. """ import os import argparse from IPython import embed from matplotlib import pyplot from ..data import manga from ..models import axisym # TODO: Setup a logger # TODO: Need to test different modes. # Tested so far: # - Fit Gas or sta...
import tensorflow as tf from datetime import datetime from data_reader import DataReader from model import Model from utils import read_vocab, count_parameters, load_glove # Parameters # ================================================== FLAGS = tf.flags.FLAGS tf.flags.DEFINE_string("checkpoint_dir", 'checkpoints', ...
import random import ray from typing import List, Type import gym import hydra import matplotlib.pyplot as plt import numpy as np from cmaes import CMA from matplotlib import animation from omegaconf.dictconfig import DictConfig from scipy.sparse.csr import csr_matrix from torch import optim from tqdm import tqdm cl...
import os from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver from jsonfield import JSONField from model_u...
# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:<EMAIL> # # This file is part of astroid. # # astroid is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Softw...
import torch import torch.nn as nn from torch.nn import init from torch.autograd import Variable import numpy as np import time import random from sklearn.metrics import f1_score from collections import defaultdict import torch.nn.functional as F import new_sampling_function # from graphsage.encoders import Encoder #...
import os import tensorflow as tf from keras.backend.tensorflow_backend import set_session from keras import models import numpy as np import scipy.stats as stats from mCNN.queueGPU import queueGPU ''' @current_hyper_tag 140_4_32_32_32_64_0.5 @current optmized_loss 1.096142613 ''' def main(): config_tf() train...
# Copyright 2014 Intel Corporation # 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 require...
import django_filters import json from django.db.models import Q from django.utils import six from rest_framework import serializers, viewsets, permissions, filters, status from rest_framework.decorators import action from rest_framework.response import Response from kitsune.products.api import TopicField from kitsune...
import OGL from macros import * from math import cos, sin, radians, degrees from OpenGL.GL import * from OpenGL.GLU import * import pygame import shoot import config from formula import * class SmithAndWesson(OGL.Cube): def __init__(self): self.standby_pos = config.SmithAndWesson["Standby Pos"]#[.3,-.25,-1...
r"""Compute action detection performance for the AVA dataset. Please send any questions about this code to the Google Group ava-dataset-users: https://groups.google.com/forum/#!forum/ava-dataset-users Example usage: python -O get_ava_performance.py \ -l ava/ava_action_list_v2.1_for_activitynet_2018.pbtxt.txt \ -g...
"""Enables retreival of ferry departure information from Trafikverket API.""" import typing from datetime import datetime from enum import Enum from typing import List import aiohttp from pytrafikverket.trafikverket import ( FieldFilter, FieldSort, FilterOperation, NodeHelper, SortOrder, Trafi...
# -*- encoding=utf8 -*- import sys sys.path.append('.') import datetime as dt, time, re, calendar, sys from utils import get_strdate_format from wull import wull, iswull, WULL from datetime import datetime if sys.version_info.major >=3 and sys.version_info.minor>=8: clocktime = time.perf_counter process_time ...
# from Instrucciones.instruccion import Instruccion # from storageManager.jsonMode import * # import Tabla_simbolos.TablaSimbolos as TS from tytus.parser.fase2.team21.Analisis_Ascendente.Instrucciones.instruccion import Instruccion from tytus.parser.fase2.team21.Analisis_Ascendente.storageManager.jsonMode import * fr...
from functools import cached_property from pathlib import Path import numpy as np from ...log import logger from . import ReaderBase try: import paraview.simple as pv from paraview.simple import * # noqa: F401, F403 except ImportError: logger.debug("Paraview Python module cannot be imported") else: ...
# -*- coding: utf-8 -*- """ Created on Sun Aug 15 11:00:56 2021 @author: catal """ import requests from requests.adapters import HTTPAdapter # from browser import document, prompt, html, alert # from browser.local_storage import storage import json def getPatternID(pattern_url): """asssumes pattern_url is a str...
#!/usr/bin/env python # -*- coding: utf-8 -*- # convert the modhmm xml file to text file, output probabilities as well import sys,re,os import os.path import tempfile from libpredweb import myfunc #Note: 2010-08-26 # still use xslt to read xml files. it is more reliable usage=""" Usage: compare_topos.py [Options] ...
import plotly.graph_objects as go from plotly.subplots import make_subplots import dash_bootstrap_components as dbc import dash_html_components as html from utils.data_utils import calc_percentage, calc_vertical_percentage from constants import * def dataset_infos(name, ntuples, nattributes): return f''' ...
import incremental_evaluation.utils as IE import h5py import numpy as np import os import time TOTAL_ACCURACY = "total_accuracy" LOCAL_ACCURACY = "local_accuracy" SUBCLASS_ACCURACY = "subclass_accuracy" class DataKeys(object): """ The structure of the HDF5 data file """ # file name FILE_NAME = "d...
# Copyright (c) Facebook, Inc. and its affiliates. # # 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 ...
import sqlite3 import logging import numpy as np import pandas as pd from pgportfolio.marketdata.coin_list import CoinList from pgportfolio.constants import * from pgportfolio.utils.misc import parse_time, get_volume_forward, \ get_feature_list from datetime import datetime class CoinDataManager: # if offline...
""" Copyright (C) 2020 <NAME>. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. """ import logging import requests import os import sys from tributors.utils.file import wr...
""" This is neat little utility that updates inventory on Bricklink. """ import json import argparse import sys import logging import os from os import stat from os.path import exists from bricklink_api.auth import oauth from bricklink_api.catalog_item import get_price_guide, get_item, get_item_image, Type, NewOrUsed f...
""" Script to autogenerate pyplot wrappers. When this script is run, the current contents of pyplot are split into generatable and non-generatable content (via the magic header :attr:`PYPLOT_MAGIC_HEADER`) and the generatable content is overwritten. Hence, the non-generatable content should be edited in the pyplot.py ...
#!/usr/bin/env python from ansible.module_utils.hashivault import hashivault_argspec from ansible.module_utils.hashivault import hashivault_auth_client from ansible.module_utils.hashivault import hashivault_init from ansible.module_utils.hashivault import hashiwrapper import json import requests ANSIBLE_METADATA = {'s...
# kc_ggn_nofeedback.py --- # # Filename: kc_ggn_nofeedback.py # Description: # Author: <NAME> # Maintainer: # Created: Fri Apr 27 11:53:11 2018 (-0400) # Version: # Package-Requires: () # Last-Updated: Tue Jun 11 09:47:43 2019 (-0400) # By: <NAME> # Update #: 531 # URL: # Doc URL: # Keywords: # Compatibil...