text
stringlengths
8.04k
46.5k
#!/usr/bin/env python3 """Python program to shuffle a deck of card.""" # importing modules # import itertools import random # from pprint import pprint, pformat import smtplib from datetime import datetime from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import numpy as np import fu...
import matplotlib.pyplot as plt import numpy as np import seaborn as sns; sns.set() sns.set_context('paper', font_scale=4) import os # from labellines import labelLine, labelLines def reject_outliers(data, m=1): return data[abs(data - np.mean(data)) < m * np.std(data)] def plot_trace(mu, mutrue, ...
from __future__ import print_function from __future__ import division import os, sys import tensorflow as tf import numpy as np import six from six.moves import cPickle as pickle from ase import io from ._libsymf import lib, ffi from ...utils import _gen_2Darray_for_ffi, compress_outcar, _generate_scale_file, \ ...
#!/usr/bin/python3 # -*- coding: utf-8 -*- # # Laps.py # Interact with the RaceMonitor lap timing system # TODO: # When in live race mode timestamps are tagging with an offset different than the historical view. # If this time offset can be adjusted it would be preferable to store the data in live view format over...
#!/usr/bin/env python """ Run neural network predictions on a real robot, particularly CoSTAR and a block stacking task. License: Apache v2 """ import sys import os import json import time import numpy as np import tensorflow as tf import PyKDL as kdl import rospy import tf2_ros as tf2 import tf_conversions.posemath a...
import geom import graph import json import numpy import math from PIL import Image import random import rtree import scipy.ndimage import sys import time DEBUG = False class Path(object): def __init__(self, gc, tile_data, start_loc=None, g=None): self.gc = gc self.tile_data = tile_data if g is None: self....
#! /usr/bin/python # -*-coding: UTF-8 -*- import time import base64 import json import threading import inspect import xlwt from airtest.core.api import init_device, connect_device, device, set_current, auto_setup, shell, start_app, stop_app, \ clear_app, install, uninstall, snapshot, wake, home, touch as touch_co...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) from collections import Counter from functools import partial import scipy as sp from scipy.stats import mode from sklearn.ensemble import ExtraTreesRegressor im...
# RCS14_entrainment_naive.py # Generate timeseries analysis and power estimate # Author: maria.olaru@ """ Created on Mon May 3 18:22:44 2021 @author: mariaolaru """ import numpy as np import pandas as pd import glob from datetime import datetime import os import re def get_filepaths(dir_name): nchars = len(dir_...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 <NAME> <<EMAIL>> # # This code is distributed under the terms and conditions # from the MIT License (MIT). """ Utilities for streaming from several file-like data storages: S3 / HDFS / standard filesystem / compressed files..., using a single, Pytho...
#!/usr/bin/env python import argparse import sys from os.path import join as pjoin import gym import networkx as nx import numpy as np import textworld import textworld.gym from textworld import GameMaker from textworld.generator.game import Quest, Event from textworld.utils import encode_seeds from twc_data import T...
#!/usr/bin/env python """ If the option --process is used this application runs as a process that will run once a day, looking at all of the ZPLSC-C instruments' latest raw data files and generate the 24-hour echograms for each instrument. It will store the echogram in a local directory specified in the configuration ...
from __future__ import print_function import glob import json import logging import sys import threading import time import os import yaml import re from functools import reduce from anytree import Node, RenderTree, PreOrderIter import sh from sh import ErrorReturnCode, TimeoutException from wait_for import wait_for,...
#!/usr/bin/env python """ Tag repos for an Open edX release. When run, this script will: 1. Make sure we have an OAuth token for the GitHub API, and help the user create one if we don't already have one 2. Fetch the openedx.yaml files from all repos covered by the Open edX release. 3. Identify the repos in that fil...
import glob import os import pathlib import json import tempfile import subprocess import hashlib import concurrent.futures import re import uuid import base64 from collections.abc import Mapping import io import time import sys import boto3 import botocore.config import jsonschema import jsonref o...
## cover.py import array import numpy as np import numpy.typing as npt import scipy.sparse as sp from numpy.typing import ArrayLike from scipy.sparse import csc_matrix, diags from scipy.sparse.csgraph import minimum_spanning_tree,connected_components from .distance import * from .distance import is_dist_like from .uti...
#!/usr/bin/env python3.6 import os from copy import deepcopy from html import escape as html_escape from urllib.parse import quote from collections import namedtuple from collections import defaultdict as base_dd import htmlfn as hfn import requests from pyontutils.core import OntId, log as _log from pyontutils.utils i...
# import necessary packages import random import pygame, random from pygame import * from os import path from EnemyShip import * img_dir = path.join(path.dirname(__file__), 'images') sound_dir = path.join(path.dirname(__file__), 'sounds') WINDOWWIDTH = 480 WINDOWHEIGHT = 600 FPS = 30 # colors BLACK = (0,0,0) WHITE...
""" Makes a figure providing an overview of our dataset with a focus on lineages laid out as follows: a - variant clustermap + counts histogram b - variant and lineage associations c - geographic associations """ import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from typing...
from copy import deepcopy import itertools import numpy as np import torch from torch.optim import Adam from spinup.utils.run_utils import set_mujoco; set_mujoco(); import gym import time import spinup.algos.pytorch.gegl.core as core from spinup.utils.logx import EpochLogger from .spline_model import SparseDenseAdamOpt...
# XML-RPC Client with Pybitmessage. # This module adapt the ``xmlrpc.client`` module of the standard library to # work with Pybitmessage. import sys import base64 try: import httplib import xmlrpclib from urlparse import urlparse from urllib import unquote as unquote_to_bytes from urllib import qu...
''' Project: Negociant Copyright (c) 2017 <NAME> <https://github.com/XilinJia> This software is released under the MIT license https://opensource.org/licenses/MIT ''' from datetime import datetime, time, timedelta from negociant.trader.vtObject import VtBarData #######################################################...
import geopandas as gpd import networkx as nx import numpy as np import pandas as pd from quetzal.analysis import analysis from quetzal.engine import engine, linearsolver_utils, nested_logit from quetzal.io import export from quetzal.model import model, summarymodel, transportmodel from syspy.spatial import geometries,...
import logging from tri.delaunay.iter import RegionatedTriangleIterator, \ StarEdgeIterator, Edge from tri.delaunay.tds import cw, ccw, orient2d from grassfire.primitives import Skeleton, SkeletonNode from grassfire.primitives import InfiniteVertex, KineticTriangle, KineticVertex from grassfire.vectorops impor...
#!/usr/bin/env python3 """ import json files from NIST NVD into a database history: o v0.5 - created database loader, sent project on to github o v0.6 - store history of loading in the database, use that history so that all data is not reloaded unless we suspect that we are out of date. Fixed...
"""CLI functions.""" import sys import re import time import subprocess import os import shlex import urllib import datetime from flask_script import Command, Option from sqlalchemy.orm import joinedload from sqlalchemy.exc import IntegrityError from sqlalchemy.sql.expression import func import tempfile import shutil ...
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
""" Implements various flows. Each flow is invertible so it can be forward()ed and backward()ed. Notice that backward() is not backward as in backprop but simply inversion. Each flow also outputs its log det J "regularization" Reference: NICE: Non-linear Independent Components Estimation, Dinh et al. 2014 https://arxiv...
#AUTHOR : <NAME> #MATRICULATION NUMBER : 65074 #Personal Programming Project #----------------------------------------------# #A python test file to check element_routine.py # command to run all test cases # pytest test_element_routine.py # ----------------------------------------------# from Preprocessing import * fr...
import torch as th import torch.nn as nn import torch.nn.functional as F from container import Parallel, Sequential from function import map_activation_str_to_layer from function import masked_max, masked_mean, masked_softmax from function import multi_perspective_match, multi_perspective_match_pairwise from util impor...
# encoding: latin2 """clusterPy input methods """ from __future__ import print_function from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import str from builtins import range __author__ = "<NAME>, <NAME>" __credits__ = "Copyright (c) 2009-10 <NA...
''' Authors: <NAME> and <NAME> 2017 - 2018 The purpose of this script is to test the ALIF cell model and provide a basic tutorial. Out of the box you should get good performance (it uses a 20% rewiring), please report any bug or unexpected performance. One should get approximately: - 40% accuracy in 100 iterations -...
from typing import List, Set import pytest from yachalk.types import ColorMode from yachalk.chalk_factory import ChalkFactory from yachalk.chalk_builder import ChalkBuilder from yachalk.ansi import Color, BgColor from helper import r @pytest.fixture def chalk() -> ChalkFactory: return ChalkFactory(mode=ColorMo...
from __future__ import (division) from pomegranate import * from nose.tools import with_setup from nose.tools import assert_almost_equal from nose.tools import assert_equal from nose.tools import assert_not_equal from nose.tools import assert_less_equal from nose.tools import assert_raises import random import pickle ...
#! /usr/bin/env python import asyncio import logging import os import sys; sys.path.insert(0, os.path.realpath(os.path.join(__file__, '../../../'))) import time import unittest from collections import namedtuple from decimal import Decimal from typing import (Any, Dict, List,) import pandas as pd from hummingbot.co...
#!/usr/bin/env python ############################################################## # _ __ ____ ___ _ __ __ __ ____ # # | | | ( (` | |_ | |_) | | | ( (` / /\ / /`_ | |_ # # \_\_/ _)_) |_|__ |_| \ \_\_/ _)_) /_/--\ \_\_/ |_|__ # # Userusage Python by <NAME> ...
import torch from . import util class Variable(): def __init__(self, distribution=None, value=None, address_base=None, address=None, instance=None, log_prob=None, log_importance_weight=None, control=False, replace=False, name=None, observed=False, reused=False, tagged=False): self.distribution = distribu...
""" Implementation of the No-U-Turn-Sampler. Code follows algorithm 6 from the NUTS paper (Hoffman & Gelman, 2011) reference: arXiv:1111.4246 "The No-U-Turn Sampler: Adaptively Setting Path Lengths in Hamiltonian Monte Carlo", <NAME> & <NAME> <NAME> """ from __future__ import division, print_function import numpy a...
import enum import logging import pathlib from abc import ABC from collections import defaultdict from operator import itemgetter from typing import Any, Callable, Collection, Mapping, Optional, Sequence, Tuple, Union import numpy import pandas import torch from sklearn.cluster import KMeans from .base import Ranking...
import cv2 import math import time import sys import pyrealsense2 as rs import numpy as np from threading import Thread import module.config as conf import module.shared as shared class AppState: def __init__(self, camera_offset=None, win_name='RealSense'): """ Original implementation by Intel Cor...
import tensorflow as tf import numpy as np import gpflow from scipy.cluster.vq import kmeans2 #from tensorflow.python import debug as tf_debug class BaseModel(object): def __init__(self, X, Y, Us, minibatch_size, window_size): self.X_placeholder = tf.placeholder(tf.float64, shape=[None, X.shape[1]]) ...
def _bm_set_key(db, n, x, iters, threads, v): with db.session() as s: for z in range(x * int(iters / threads), (x + 1) * int(iters / threads)): s.key_set(key=f'.benchmark/{n}/key{z}', value=v) def _bm_get_key(db, n, x, iters, threads): with db.session() as s: ...
import numpy as np import scipy.io import pickle import sys import pandas as pd import seaborn as sns import matplotlib.pyplot as plt # plt.switch_backend('agg') import argparse import os from tqdm import tqdm import math map_dict = { 'avg': "Average", 'min': "Minimum", 'max': "Maximum", 'last': "Last", "spanish...
# -*- coding: utf-8 -*- """ Created on Tue Dec 4 18:10:40 2018 @author: hasanm """ import argparse import os.path import pandas as pd import numpy as np import re np.seterr(divide='ignore', invalid='ignore') mutation_key = ['Chromosome', 'Start_Position','End_Position','Reference_Allele','Tumor_Seq_Allele2'] def ...
import os import matplotlib.pyplot as plt import mlflow import numpy as np import torch import torch.nn as nn import torchvision.utils as vutils from torch.autograd import Variable from torchgan.layers import MinibatchDiscrimination1d from tqdm import tqdm from src import TMP_IMAGES_DIR, TOP_K from src.models.autoenc...
#region IMPORTS import json import werkzeug, os from flask_restful import Resource, reqparse,inputs from flask import request, jsonify from flask_jwt_extended import ( create_access_token, create_refresh_token, jwt_required, jwt_refresh_token_required, get_jwt_identity, get_raw_jwt) from werkzeug.utils import...
import numpy as np import sys import math import operator import csv import glob,os import xlrd import cv2 import pandas as pd import os import glob import matplotlib.pyplot as plt from sklearn.svm import SVC from collections import Counter from sklearn.metrics import confusion_matrix import scipy.io as sio from ker...
# coding: utf-8 # # Visualize Networks # In[78]: import pandas as pd import igraph as ig from timeUtils import clock, elapsed, getTimeSuffix, getDateTime, addDays, printDateTime, getFirstLastDay from pandasUtils import castDateTime, castInt64, cutDataFrameByDate, convertToDate, isSeries, isDataFrame, getColData fro...
# ============================================================================================ # PROGRAMA : Juego.py # AUTOR : QEDD # COPYRIGHT : ESTE PROGRAMA NO PUEDE SER MODIFICADO SIN LA AUTORIZACION ESCRITA DEL AUTOR # FECHA : 29/06/2017 # DESCRIPCION: Juego con una serpiente de fractales # ==========...
import sdl from _sdl.structs import SDLError from gsdl2.locals import ( utf8, QUIT, WINDOWEVENT, SYSWMEVENT, KEYDOWN, KEYUP, TEXTEDITING, TEXTINPUT, MOUSEMOTION, MOUSEBUTTONDOWN, MOUSEBUTTONUP, MOUSEWHEEL, JOYAXISMOTION, JOYBALLMOTION, JOYHATMOTION, JOYBUTTONDOWN, JOYBUTTONUP, JOYDEVICEADDED, JOYD...
""" Validation of the radial velocity calibration model. """ import numpy as np import matplotlib.pyplot as plt import corner import pickle from scipy.special import logsumexp import velociraptor # Load the data and make some plots. data_path = "data/rv-all.fits" sources = velociraptor.load_gaia_sources(data_path) ...
import pandas as pd import numpy as np import argparse import json from collections import Counter import os from .transmission_coefficients import transmission_coefficients sim_test = False cafe = True def convert(o): if isinstance(o, np.int64): return int(o) raise TypeError class NpEncoder...
# -*- coding: utf-8 -*- import src.utils.constants as cns from src.utils.pd_np import sort_dict from src.error_map_unpreprocess import error_map from src.preprocess import Tag from src.preprocess import remove_accents from src.preprocess import tokenize_text import json def add_by_user(error_map): error_map["abi...
# -*- coding: utf-8 -*- """ Copyright [2009-2018] EMBL-European Bioinformatics Institute 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...
from OpenGL.GL import * from OpenGL.GLUT import * from OpenGL.GLU import * import random, time import math class gameState: currentState = 1 playing = 0 start = 1 reset = 2 gameover = 3 clickedP = False def updateState(): if gameState.currentState == gameState.start: Te...
from hdmf.common import DynamicTable, VectorData, ElementIdentifiers, DynamicTableRegion from hdmf.testing import TestCase, H5RoundTripMixin import pandas as pd import numpy as np from collections import OrderedDict class TestDynamicTable(TestCase): def setUp(self): self.spec = [ {'name': 'f...
import torch import torch.onnx as onnx import torchvision.models as models import os from tempfile import mkdtemp import numpy as np #import matplotlib.pyplot as plt #from skimage.transform import rotate torch.manual_seed(0) import random random.seed(0) import nibabel as nib from nilearn.image import resample_i...
# -*- coding: utf-8 -*- import collections from typing import Union, Optional import aiohttp # import requests import asyncio import typing import time from common import gv from core.util import UtilApi # from ..distserver.game import GameServerRepo # from common import gv from core.mobilelog.LogManager import Log...
import os from warnings import warn import numpy as np import torch import os import six import time import torch import threading from tensorboard.compat import tf from tensorboard.compat.proto.event_pb2 import SessionLog from tensorboard.compat.proto.event_pb2 import Event from tensorboard.compat.proto import event...
import argparse, math, random, os import numpy as np import tarfile import torch from torch import nn, autograd, optim import torch.nn.functional as F from torch.utils import data import torch.distributed as dist from torchvision import transforms, utils from tqdm import tqdm try: import wandb exc...
# BUG: occasionally causes TypeError in __del__: 'NoneType' object is not callable import tensorflow as tf config = tf.ConfigProto() config.gpu_options.visible_device_list = "0" config.gpu_options.per_process_gpu_memory_fraction = 0.7 config.allow_soft_placement = True config.gpu_options.allow_growth = True session = ...
import multiprocessing from pathlib import Path import time import mkl mkl.set_num_threads(8) import numpy as np import Sampling.gp.util as util from Sampling.test_common import Tester from Sampling.BO_common import random_hypersphere from Sampling.gp.GPy_wrapper import GPyWrapper_Classifier as GPC import Sampling....
"""Code for parameter and function fitting of space structured OCT model to simulation data.""" import copy import itertools import os import numpy as np import matplotlib.pyplot as plt from matplotlib import gridspec from matplotlib.backends.backend_pdf import PdfPages from mpl_toolkits.axes_grid1 import make_axes_lo...
from matplotlib.ticker import MaxNLocator import textgrids import os import pandas as pd from matplotlib import pyplot as plt import seaborn as sns import subprocess import numpy as np import portion as P import sys from pathlib import Path sys.path.append(str(Path(__file__).parent.parent)) from config import ANALYSIS ...
#!/usr/bin/env python # encoding: utf-8 """Start an IPython cluster = (controller + engines).""" #----------------------------------------------------------------------------- # Copyright (C) 2008 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file ...
import csv import io import random from datetime import datetime, timedelta from django.utils import timezone import pytz from django import forms from django.contrib.auth import get_user_model from django.contrib.auth import password_validation from django.contrib.auth.forms import SetPasswordForm, PasswordResetForm ...
import json import os import platform import time import subprocess import pathlib import api_request import logging from PyQt5 import QtCore from PyQt5.QtCore import pyqtSignal, pyqtSlot import remote_connection import chain_args as cp import configuration import local_connection import api_request marmara_path = No...
import json import regex as re from functools import lru_cache from typing import Any, Dict, List, NamedTuple, Optional, Sequence, Tuple, Union import logging from enum import Enum logger = logging.getLogger(__name__) # class ExplicitEnum(Enum): # """ # Enum with more explicit error message for missing values...
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
import argparse import os import sys from tqdm import tqdm from subprocess import Popen, PIPE, STDOUT import copy from pprint import pprint import config import re import numpy as np from itertools import chain import pandas as pd def read_replay_perf_one_file(file_name, report_dict_p): with open(file_name) as fs...
from pycparserext.ext_c_generator import OpenCLCGenerator from pycparser.c_ast import * from oclude.utils.constants import ( llvm_instructions, hidden_counter_name_local, hidden_counter_name_global ) from itertools import count, filterfalse class OcludeInstrumentor(OpenCLCGenerator): ''' Responsib...
import json import sqlite3 import textwrap import time from appJar import gui from PIL import Image, ImageTk import os import io import requests as rs import threading import uuid import math import queue import shutil from datetime import datetime class ImgDownloadThread(threading.Thread): def __init__(self, thr...
''' server.py: DIBS server definition. Copyright --------- Copyright (c) 2021 by the California Institute of Technology. This code is open-source software released under a 3-clause BSD license. Please see the file "LICENSE" for more information. ''' from beaker.middleware import SessionMiddleware import bottle f...
#-*- coding:utf-8 -*- import os from .. import sageworks from ..sageworks import * from ..modular import invmod from ..formula import gcd, get_primes, nroot from tqdm import tqdm, trange from Crypto.PublicKey import RSA as _RSA from Crypto.Util.number import isPrime import requests import re __all__ = [ 'RSAKey'...
import argparse, base64, random, requests, string, sys, time, urllib3 from bs4 import BeautifulSoup from datetime import datetime from requests.auth import HTTPBasicAuth from requests_ntlm import HttpNtlmAuth from termcolor import cprint from urllib.parse import urljoin TIMEOUT = 5 WAIT_MIN = 500000 WAIT_RAND_MAX = 60...
import numpy as np from gym import spaces import matplotlib.pyplot as plt from scipy import stats from recsim import document from recsim import user from recsim.choice_model import MultinomialLogitChoiceModel from recsim.simulator import environment from recsim.simulator import recsim_gym import random from absl impo...
#!/usr/bin/env python3 # dcmp.py - Directory Compare # -<NAME> # Nov-13-2017 # Compare files within two directory trees for equivalency # MIT License; Copyright (c) 2017 <NAME> # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Sof...
from html import unescape from collections import defaultdict import re from io import BytesIO import zipfile import base64 import requests from django.db.models import Model from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import transaction from django.db.models...
from collections import defaultdict import logging import sys from nlplingo.common.io_utils import safeprint from nlplingo.common.span_utils import get_tokens_corresponding_to_span, get_tokens_covering_span from nlplingo.common.utils import IntPair from nlplingo.common.span_utils import get_span_with_offsets from nlp...
######################################### ## Current GPU train loop ## ## Own libraries loaded in the bottom ## ######################################### import torch, pickle, time, os import numpy as np import os.path as osp import matplotlib.pyplot as plt import torch_geometric as tg from torch_geometr...
# -*- coding: utf8 -*- """ ====================================== Project Name: NLP File Name: bert_for_ee_tplinker Author: czh Create Date: 2021/9/23 -------------------------------------- Change Activity: ====================================== """ # 采用tplinker方式实现事件抽取 import logging from abc impo...
#!/usr/bin/env python3 """ attila_cli.py - Command line interface to setup Attila projects Usage: python3 attila_cli.py # TODO: finish command line parser Copyright: (c) 2019-2020 <NAME> <github.com/cardosaum> License: Apache 2.0 <apache.org/licenses/LICENSE-2.0> """ import argparse import subprocess import...
#!/usr/bin/env python3 from datetime import datetime, timezone import time import argparse import sys import signal import os import subprocess import re def get_env(): envre = re.compile(r'''^([^\s=]+)=(?:[\s"']*)(.+?)(?:[\s"']*)$''') result = {} try: with open('./config.env') as ins: ...
import argparse import torch import torch.nn as nn from torch.utils import data, model_zoo import numpy as np import pickle from torch.autograd import Variable import torch.optim as optim import scipy.misc import torch.backends.cudnn as cudnn import torch.nn.functional as F import sys import os import os.path as osp im...
import asyncio import os import socket import sys import threading import weakref import pytest import dask from distributed.core import ( pingpong, Server, rpc, connect, send_recv, coerce_to_address, ConnectionPool, ) from distributed.protocol.compression import compressions from distrib...
import os import unittest from unittest.mock import Mock import numpy as np import bilby class TestPriorDict(unittest.TestCase): def setUp(self): self.first_prior = bilby.core.prior.Uniform( name="a", minimum=0, maximum=1, unit="kg", boundary=None ) self.second_prior = bilby....
#!/usr/bin/env python # Copyright (c) Yugabyte, 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 ag...
#!/usr/bin/env python3 # # (c) <NAME> 2017 # # This file will be a utility to help facilitate the comparison of performance # metrics across arbitrary commits. The file will produce a table comparing # metrics between measurements taken for given commits in the environment # (which defaults to 'local' if not given by ...
# Licenced under the txaws licence available at /LICENSE in the txaws source. import os from urllib.parse import urlparse from urllib.parse import quote from datetime import datetime from io import BytesIO from txaws.s3.tweaks import to_bytes, to_str try: from xml.etree.ElementTree import ParseError except Impor...
#!/usr/bin/env python3 """ giraffe-facts.py: process a GAM file from the new minimizer-based mapper (vg gaffe AKA giraffe) and report runtime statistics by pipeline stage. """ import argparse import os import sys import time import subprocess import collections import itertools import json import random # We depen...
# -*- coding: utf-8 -*- ''' tests.support.parser ~~~~~~~~~~~~~~~~~~~~ Salt Tests CLI access classes :codeauthor: :email:`<NAME> (<EMAIL>)` :copyright: Copyright 2013-2017 by the SaltStack Team, see AUTHORS for more details :license: Apache 2.0, see LICENSE for more details. ''' # pylint: disab...
# <NAME>, <NAME>, <NAME>, <NAME> # # MultiRocket: Effective summary statistics for convolutional outputs in time series classification # https://arxiv.org/abs/2102.00457 import numpy as np from numba import njit # ======================================================================================================= ...
""" Module holds all stuff regarding Gatling tool usage Copyright 2015 BlazeMeter 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 require...
#!/usr/bin/env 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 r...
import collections.abc import warnings from abc import abstractmethod from collections import defaultdict from datetime import datetime from enum import Enum, EnumMeta from textwrap import dedent from typing import Any, Callable, Dict, Mapping, Optional, Set, Tuple, Union from urllib.parse import urlencode import ciso...
#!/usr/bin/env python3 """Gathers the last 24hrs of speed data, aggregates it, and uploads it. This module takes speeds from a SQL data-warehouse and summarizes them to then upload to the dynamodb database which our visualization draws from. This is a necessity because querying large (24hrs+) amounts of data from the ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- """ ==================================== prospect.scripts.specview_cmx_coadds ==================================== Create static html files to visually inspect DESI spectra. """ import os import argparse import numpy as np from as...
"""Worker pool executor base classes.""" import os import numbers import threading import time import datetime import pprint import traceback from schema import Or, And, Use from testplan.common.config import ConfigOption, validate_func from testplan.common import entity from testplan.common.utils.thread import inter...
"""Configuration for pytype (mostly derived from the commandline args). Various parts of pytype use these options. This module packages the options into an Options class. """ import argparse import contextlib import logging import os import sys from pytype import datatypes from pytype import errors from pytype impor...
from insights.parsers.pcs_status import PCSStatus from insights.tests import context_wrap CLUSTER_NORMAL = """ Cluster name: openstack Last updated: Fri Oct 14 15:45:32 2016 Last change: Thu Oct 13 20:02:27 2016 Stack: corosync Current DC: myhost15 (1) - partition with quorum Version: 1.1.12-a14efad 3 Nodes configured...