text
stringlengths
3.07k
12.6k
from math import ceil from flask import jsonify, request from flask_restx import inputs from sqlalchemy.orm.exc import NoResultFound from flexget.api import APIResource, api from flexget.api.app import ( BadRequest, NotFoundError, base_message_schema, etag, pagination_headers, success_response...
# Copyright (c) Lawrence Livermore National Security, LLC and other Conduit # Project developers. See top-level LICENSE AND COPYRIGHT files for dates and # other details. No copyright assignment is required to contribute to Conduit. """ file: t_conduit_docs_tutorial_python_examples.py """ import sys import unittest i...
from tracardi.service.plugin.domain.register import Plugin, Spec, MetaData, Documentation, PortDoc, Form, FormGroup, \ FormField, FormComponent from tracardi.service.plugin.runner import ActionRunner from pydantic import BaseModel, validator from tracardi.service.plugin.domain.result import Result from tracardi.ser...
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- import argparse import datetime import os from collections import OrderedDict from csv import DictReader import openapc_toolkit as oat ARG_HELP_STRINGS = { "integrate": ('Integrate changes in harvested data into existing ' + 'collected files ("all...
from retrievals.arts import retrieval as ret from retrievals.arts.interface import ArtsController, Observation from retrievals.arts.atmosphere import Atmosphere from retrievals.arts.sensors import SensorGaussian from retrievals.arts.retrieval import AbsSpecies, Polyfit from retrievals import covmat import os import num...
from django.db import models from apps.usuarios.models import EstadoModelo from apps.usuarios.templatetags.utils import PAISES from django.utils.translation import ugettext_lazy as _ """ #Informacion TimeStampModel() Ubicacion() Distrito() Barrio(Distrito) Direccion(Ubicacion,Barrio) Departamentos() Provincias(Depart...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: <NAME> <christ<EMAIL>.ariza AT gmail [DOT] com> """ Generate datasets and plots for CRAB data popularity based on condor data in hdfs. """ import os from datetime import datetime, timezone, timedelta from pyspark import SparkContext from pyspark.sql import SparkS...
import json as js import os # Name: Delete Range # Input: A List of any type # A int of the starting index(inclusive) # A int of the ending index(inclusive) # Output: The previous list missing the indexs start-end def deleteRange(data,start,end): print("Deleting from index " + str(start...
from datetime import datetime from uuid import uuid4 from django.conf import settings from django.contrib.auth import get_user_model from drf_yasg.utils import swagger_auto_schema from rest_framework.response import Response from rest_framework.views import APIView from rest_framework_simplejwt.views import TokenObtai...
# -*- coding: utf-8 -*- """ Created on Tue Jul 21 16:43:11 2020 @author: <NAME> """ import dgl import torch import torch.nn as nn from torch.utils.data import TensorDataset, DataLoader import tqdm import numpy as np import pandas as pd import scipy.sparse as sp from sklearn.preprocessing import StandardScaler from u...
"""Module to create an animated map of STEM results for North America from July and August climatological mean [COS] boundary conditions with no surface fluxes. """ import matplotlib matplotlib.use('AGG') import os import sys import matplotlib.animation as animation import matplotlib.pyplot as plt from datetime impo...
#!/usr/bin/env python # -*- coding: utf-8 -*- # -------------------------------------------------------- # Descripttion: https://github.com/sxhxliang/detectron2_backbone # version: 0.0.1 # Author: <NAME> (<EMAIL>) # FilePath: /detectron2_backbone/backbone/resnet18.py # Create: 2020-04-19 23:09:15 # LastAuthor: <NAME> #...
""" Copyright 2020 The OneFlow 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 law or agr...
"""Run app and read sensor data.""" from __future__ import annotations import os import shutil import sys import json import glob import argparse import asyncio from multiprocessing import Process from bairy.device import configs, utils, app, device, validate, preprocess from bairy.hub import configs as hub_configs, a...
#!/usr/bin/python3.4 # coding: utf-8 __author__ = 'eirikstavelin' __version__ = '0.0.1a' import sys import os import networkx as nx from time import time from collections import Counter import configparser conf = configparser.ConfigParser() conf.optionxform = str conf.read('config.ini') from pymongo import MongoClient...
import os import itertools # Third-party import astropy.units as u import numpy as np import pytest # Custom from ....potential import (Hamiltonian, NFWPotential, HernquistPotential, ConstantRotatingFrame) from ....dynamics import PhaseSpacePosition, Orbit from ....units import galactic # ...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT license. import numpy as np from seedot.compiler.ir.ir import * import seedot.common as Common from seedot.util import * def init(): global zero, one, negone, negmax zero = Int(0) one = Int(1) negone = Int(-1) ...
# Standard Libraries # Third party packages from pydantic import validator, root_validator from pydantic.typing import ( List, Literal, Optional ) # Local package from net_models.validators import * from net_models.fields import * from net_models.models import ( VendorIndependentBaseModel, AuthBase,...
from collections import defaultdict from datetime import timedelta from .utils import resistance_measuerment_error, limit_measurements from .estimators import FitSinus, BaseEstimator, FitFourier class ExperimentAnalysis(): __default_estimator = FitSinus() def analyze(self, experiment, *, time_limit: t...
# Copyright 2015 - Alcatel-Lucent # Copyright 2016 - Nokia # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
# -*- coding: utf-8 -*- """ Created on Tue Oct 15 23:02:13 2019 @author: wenbin """ import pandas as pd import matplotlib.pyplot as plt from sklearn.model_selection import KFold from sklearn.neural_network import MLPRegressor from sklearn import preprocessing import numpy as np import copy def GetData...
# Script was successfully tested runnning localhost 4.35 neo4j instance connected to via bolt protocol import os import json from neo4j import GraphDatabase import yaml class Neo4jDB: def __init__(self, uri, user, password): self.driver = GraphDatabase.driver(uri, auth=(user, password)) def close(s...
#!/usr/bin/env python3 import os import re import sys import argparse import subprocess import configparser def config_files(environ=None): if environ is None: environ = {} # Lowest priority: hardcoded values paths = os.pathsep.join([ pathexpand('~/.config/crestic'), '/etc/cresti...
import numpy as np import matplotlib import matplotlib.pyplot as plt from datetime import datetime from sklearn.pipeline import FeatureUnion from sklearn.preprocessing import StandardScaler from sklearn.kernel_approximation import RBFSampler from sklearn.linear_model import SGDRegressor from PlaneEnvironment import Pla...
import pandas as pd import assetallocation_arp.models.ARP as arp def dataimport_future (file): data=pd.read_excel(file+".xlsx",sheet_name="Data", index_col=[0], header=3,skiprows=[4,5,6,7]) data.index = pd.to_datetime(data.index, format='%d.%m.%Y %H:%M:%S') data["SterlingEUR"]=(1+data["Sterling"])/(1+data[...
import math import torch import torch.nn as nn import torch.nn.functional as F from torch.distributions.transforms import TanhTransform, Transform from torch.distributions import TransformedDistribution, Normal from il_offline_rl.utils import AddBias, init """ Modify standard PyTorch distributions so they are compat...
# Copyright [2018-2020] <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
import math import cv2 as cv import numpy as np import torch from PIL import Image from scipy.stats import norm from torchvision import transforms from align_faces import get_reference_facial_points, warp_and_crop_face from config import device from config import image_h, image_w from mtcnn.detector import detect_fac...
from django.shortcuts import render, redirect, get_object_or_404 from django.http import HttpResponseRedirect, HttpResponse from django.urls import reverse_lazy from django.contrib.auth import authenticate, login, logout from django.contrib.auth.models import User from django.contrib.auth.decorators import login_requir...
from luigi.contrib.lsf import LSFJobTask import os import subprocess import logging import shutil import random from luigi.task_status import PENDING, FAILED, DONE, RUNNING, UNKNOWN import time LOGGER = logging.getLogger("luigi-interface") def track_job(job_id): """ Tracking is done by requesting each job an...
from enum import IntEnum import copy from jiffy.storage.command import CommandType from jiffy.storage.compat import b, unicode, bytes, long, basestring, bytes_to_str from jiffy.storage.data_structure_client import DataStructureClient from jiffy.storage.replica_chain_client import ReplicaChainClient from jiffy.director...
from collections import defaultdict from uuid import uuid4 class _Packet: _pid = 0 @classmethod def _next_pid(cls): from uuid import uuid4 return str(uuid4()) @classmethod def ack(cls, request_id): return {'pid': cls._next_pid(), 'type': 'ack', 'request_id': request_id} ...
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Shows how to use the AWS SDK for Python (Boto3) with AWS Step Functions to create a state machine that continuously reads message records from an Amazon DynamoDB database and sends them to an Amazon ...
# Efficient passive aggressive updates for multi-class classification # # Original article: # "Column squishing for multiclass updates" # https://nlpers.blogspot.com/2017/08/column-squishing-for-multiclass-updates.html from __future__ import division import numpy as np import scipy.optimize def multiclass_update(A,...
#!/usr/bin/env python # PYTHON_ARGCOMPLETE_OK import argparse import subprocess import sys import argcomplete from . import errors from . import slack from . import stream from . import token from . import utils def resource_completer(**kwargs): # resource name autocomplete for bash. To activate this, run `eva...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import importlib import logging import os import sys import typing import canmatrix import canmatrix.cancluster if sys.version_info > (3, 0): import io else: import StringIO logger = logging.getLogger(__name__) moduleLi...
# We prepare the user-track matrix from LastFM-1b data. # For the MSD and FMA matched tracks, this takes about 30 minutes to run on # my machine, and the output is about 1 GB in size. # # This script uses merged lfm-1b track ids (merged by having the # same artist and track title.) import argparse from collections impo...
# A XOR linked list is a more memory-efficent way of implementing a # doubly-ended linked list. A normal doubly-ended linked list contains # addresses of both its previous element and its next element but a XOR # linked list contains only the XOR of previous and the next element. # Implement the add(element) which adds...
#!/usr/bin/env python3 import os objlist = [] NS_AB = None NS = None class jnfield: def __init__(self, typ, name, jname = None): self.name = name self.type = typ self.jname = jname or None def tune(self): if self.jname is None: t = [] for c in self.na...
############################################################################## # # Copyright (c) 2019 TomskSoft LLC # # 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, incl...
import numpy as np import pytest import libtbx from cctbx import sgtbx from dials.algorithms.symmetry.cosym import CosymAnalysis, phil_scope from dials.algorithms.symmetry.cosym._generate_test_data import generate_test_data @pytest.mark.parametrize( ( "space_group", "unit_cell", "dimensi...
# Functions need in other scripts - <NAME> (Jun. 23, 2021) from tkinter.constants import UNITS import tensorflow as tf import pandas as pd import matplotlib.pyplot as plt from tensorflow.keras.layers import Input, Dense, Lambda from tensorflow.keras.models import Model from tensorflow.keras.optimizers import Adam impo...
import torch import transformers import torch.nn as nn def loss_fn(output, target, mask, num_labels, weight = None): lfn = nn.CrossEntropyLoss() active_loss = mask.view(-1) == 1 active_logits = output.view(-1, num_labels) active_labels = torch.where( active_loss, target.view(-1), torch.tensor(lfn.ignore_inde...
"""An unofficial library to access the Cleverbot API.""" from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import str # pylint: disable=redefined-builtin from builtins import object # pylint: disable=redefined-builtin import collections import ...
from __future__ import division, print_function, unicode_literals import time import argparse import glob import os import shutil import subprocess import mutagen def run_cmd(cmd, path_work=None): """ Run an external program via command line arguments. Capture stdout and stderr. No stdin. """ ...
from django.conf import settings from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseForbidden, HttpResponseRedirect from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.utils.translation import ugettext...
import yaml import sys import os import argparse import re import networkx as nx import subprocess import shutil import ruamel.yaml from .utils import get_repodata from vinca import config from vinca.distro import Distro from distutils.dir_util import copy_tree distro_version = None ros_prefix = None # arches = ["lin...
try: from . import decl_parser from .symbols import SYMBOLS except ImportError: import decl_parser from symbols import SYMBOLS SOURCE_DIR = './' WRITE_TO_HEADER = 'ui.gen.h' WRITE_TO_CPP = 'ui.gen.cpp' BIND_CLASS = 'ui' BIND_TEMPLATE = '''\ #pragma once #include "gl_api.h" #include "carbon.h" using namespace c...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Myme and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document import os import requests import json import subprocess from frappe.utils.background_jobs imp...
import os import gzip import struct import numpy as np import argparse import mlflow import torch import torch.optim as optim from torch.nn import functional as F from torch import nn from torchvision import transforms from torch.utils.data import DataLoader from azureml.core import Run from azureml.core.model impo...
import json import logging import sqlite3 import pickle import tqdm from citeomatic import file_util from citeomatic.common import FieldNames, Document, DatasetPaths from citeomatic.utils import batchify from citeomatic.schema_pb2 import Document as ProtoDoc def stream_papers(data_path): for line_json in tqdm.t...
import matplotlib import numpy as np import seaborn as sns from matplotlib import pyplot as plt def plot_pie(df, percentage_threshold=5): # Reference: https://stackoverflow.com/a/63688022/376454 def label_function(val): n = val / 100 * len(df) if val < percentage_threshold: s = ""...
# MIT License # # Copyright (c) 2019 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish...
# Copyright 2019 Open Source Robotics Foundation, 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...
# Copyright (C) 2016 University of Vienna # All rights reserved. # BSD license. # Author: <NAME> <<EMAIL>> from __future__ import print_function from traceback import print_exc from sys import stderr from gurobipy import GRB, LinExpr, Model from six import iteritems from networkx import is_directed_acyclic_graph, short...
#!/usr/bin/python # Copyright (c) 2020, 2022 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
"""API entry point of the kha package.""" from datetime import datetime, timezone import json import operator import os from typing import Any, Callable, Dict, Iterable, List, Optional, Union, cast import boto3 from mypy_boto3_s3.client import S3Client from .episode import Episode, EpisodeDict from .episode_check_re...
#!/usr/bin/env python3 # # Utility for viewing and managing versions of cargo workspaces and crates. # For workspaces, it assumes that all crate members use a single shared version. # # usage: cargo_version.py [-h] [-p PROJECT] [-r] [-n {major,minor,patch}] [-s SET] [-o] # # Change versions of cargo projects. # # optio...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import contextlib import io try: from io import StringIO except ImportError: from StringIO import StringIO # 2.7 import os import os.path import sys import tempfile @contextlib.contextmanager def noop_cm(): y...
import os import eel import re import time import moviepy.editor as mp import tkinter as tk from tkinter import filedialog from pytube import YouTube, exceptions eel.init("web") # User has selected file format (mp4 or mp3). This set's off the respective function to collect the data about the video # Validate input v...
""" Disease Case Tracking and Contact Tracing """ module = request.controller if not settings.has_module(module): raise HTTP(404, body="Module disabled: %s" % module) # ----------------------------------------------------------------------------- def index(): "Module's Home Page" module_name = setti...
"""SQLAlchemy models for Social Auth""" import base64 import six import json from sqlalchemy import Column, Integer, String from sqlalchemy.exc import IntegrityError from sqlalchemy.types import PickleType, Text from sqlalchemy.schema import UniqueConstraint from sqlalchemy.ext.declarative import declared_attr from s...
import os from flask import Flask, render_template, redirect, jsonify, request, url_for, session from flask_socketio import SocketIO, emit, send, join_room, leave_room from flask_session import Session from collections import deque from helper import login_required app = Flask(__name__) app.config["SECRET_KEY"] = os....
# @Time : 2020/11/16 # @Author : <NAME> # @Email : <EMAIL> # UPDATE: # @Time : 2021/10/10, 2021/1/29, 2020/12/04 # @Author : <NAME>, <NAME> # @Email : <EMAIL>, <EMAIL> """ textbox.data.dataset.paired_sent_dataset ######################################## """ import os from textbox.data.dataset import AbstractDa...
import sys from urllib.parse import urlsplit, parse_qs import re import requests from bs4 import BeautifulSoup def _clean_string(string): parts = string.replace('\xa0', ' ').strip().split('\r\n') return ' '.join([p.strip().encode('ascii', errors='ignore').decode('utf-8') for p in parts]) def _parse_tds(tds): i...
import os import os.path as osp import shutil from ogb.utils import smiles2graph from ogb.utils.torch_util import replace_numpy_with_torchtensor from ogb.utils.url import decide_download, download_url, extract_zip import pandas as pd import numpy as np from dgl.data.utils import load_graphs, save_graphs, Subset import ...
import re from typing import Any, Dict, List, Optional, Tuple from ....core import Good, Issue, OneOf, issue, one_of from .io import project_stats_json, project_status_str from .types import ( Configuration, ExitCode, FileReport, ProjectStatus, RuleInfo, Transform, Violation, ) def replac...
#!/usr/bin/env python """ Mock running CASTEP """ from __future__ import absolute_import from __future__ import print_function import hashlib import json import tempfile import click import shutil import castepinput from pathlib import Path _TEST_BASE_FOLDER = Path(__file__).parent.parent.parent / 'tests' _TEST_DATA...
from functools import update_wrapper from typing import Any, Callable, Dict, List, Optional, Set, Union from dagster import check from dagster.core.definitions.policy import RetryPolicy from dagster.utils.backcompat import experimental_arg_warning from ..graph import GraphDefinition from ..hook import HookDefinition ...
# -*- coding: utf-8 -*- """ identity.decorators ~~~~~~~~~~~~~~~~~~~ Decorators definition of Flask-Identity :author: solardiax <<EMAIL>> :copyright: (c) 2020 by DreamEx Works. :license: GPL-3.0, see LICENSE for more details. """ from collections import namedtuple from functools import wraps ...
import torch import torch.nn as nn class VectorQuantizer(nn.Module): """ see https://github.com/MishaLaskin/vqvae/blob/d761a999e2267766400dc646d82d3ac3657771d4/models/quantizer.py ____________________________________________ Discretization bottleneck part of the VQ-VAE. Inputs: - n_e : number ...
from bs4 import BeautifulSoup, SoupStrainer import requests import os from PIL import Image from io import BytesIO import json import Champion from colorama import Fore, init init(autoreset=True) champs = Champion.Champion() all_champs = champs.DAMAGES + champs.FLANKS + champs.TANKS + champs.SUPPORTS languages = [...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Database models for access module.""" from flask_principal import RoleNeed, UserN...
from py3pin.Pinterest import Pinterest username = 'username' password = 'password' email = 'email' # cred_root is the place the user sessions and cookies will be stored you should specify this to avoid permission issues cred_root = 'cred_root' pinterest = Pinterest(email=email, password=password...
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from abc import abstractmethod from contextlib import contextmanager from dataclasses import dataclass from typing import ClassVar, Tuple, Type from pants.cache.cache_setup import CacheSe...
from mxnet import autograd, gluon, image, init, nd from mxnet.gluon import model_zoo, nn from utils import util import time def preprocess(img, image_shape): img = image.imresize(img, *image_shape) img = (img.astype('float32') / 255 - rgb_mean) / rgb_std return img.transpose((2, 0, 1)).expand_dims(axis=0)...
#!/usr/bin/python2.5 # # Copyright 2008 the Melange 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 applicable...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright 2011-2020, <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
import os import sys import re import argparse from azure.storage.blob import BlobClient, ContainerClient from azure.core import exceptions def get_args(): parser = argparse.ArgumentParser() parser.add_argument( '--container-name', dest='container_name', required=True) parser.add_...
import logging import re import subprocess from typing import List from bauh.commons.system import new_root_subprocess, run_cmd, new_subprocess from bauh.gems.snap.model import SnapApplication BASE_CMD = 'snap' RE_SNAPD_STATUS = re.compile('\s+') SNAPD_RUNNING_STATUS = {'listening', 'running'} def is_installed(): ...
"""Support for monitoring NZBGet NZB client.""" from datetime import timedelta import logging from aiohttp.hdrs import CONTENT_TYPE import requests import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_SSL, CONF_HOST, CONF_NAME, CON...
from __future__ import division, print_function, absolute_import import os import time import logging import argparse import re import apache_beam as beam from apache_beam.options.pipeline_options import PipelineOptions, SetupOptions, GoogleCloudOptions, StandardOptions from apache_beam.dataframe.io import read_csv fro...
# -*- coding: utf-8 -*- # vim:set ts=4 sw=4 et: # # Copyright 2014,2015 <NAME>. # # This file is part of the mavros package and subject to the license terms # in the top-level LICENSE file of the mavros repository. # https://github.com/mavlink/mavros/tree/master/LICENSE.md __all__ = ( 'FTPFile', 'open', 'l...
#!/usr/bin/env python import sys import os import glob import itertools import json from collections import defaultdict, OrderedDict from utils import ocd_uuid, get_jurisdiction_id, get_data_dir, dump_obj, iter_objects def load_new_files(state): new_db_ids = set() for data, _ in itertools.chain(iter_objects(s...
import sublime import sublime_plugin import os.path try: from .package_syncing import logger from .package_syncing import thread from .package_syncing import tools except ValueError: from package_syncing import logger from package_syncing import thread from package_syncing import tools log = l...
''' Based on <NAME> code ''' from tensorflow.python.ops import ctc_ops as ctc # from tensorflow.contrib.ctc import ctc_ops as ctc # deprecated in future import tensorflow as tf import numpy as np from utils import load_batched_data, target_list_to_sparse_tensor import pickle ####Learning Parameters nEpochs = 60 bat...
# py-motmetrics - Metrics for multiple object tracker (MOT) benchmarking. # https://github.com/cheind/py-motmetrics/ # # MIT License # Copyright (c) 2017-2020 <NAME>, <NAME> and others. # See LICENSE file for terms. """Compute metrics for trackers using MOTChallenge ground-truth data.""" from __future__ import absolu...
import asyncio import json import logging import math from datetime import datetime, timezone, timedelta from operator import itemgetter import dateutil import dateutil.parser import pytz from binance_chain.environment import BinanceEnvironment from binance_chain.http import AsyncHttpApiClient from binance_chain.messa...
import pytest from flaky import ( flaky, ) from platon._utils.module_testing import ( PlatonModuleTest, ParityModuleTest, ParityPersonalModuleTest, ParitySetModuleTest, ParityTraceModuleTest, Web3ModuleTest, ) from platon._utils.module_testing.platon_module import ( UNKNOWN_ADDRESS, ) ...
import logging import pytest from ocs_ci.ocs.cluster import CephCluster, CephHealthMonitor from ocs_ci.ocs.resources.csv import CSV from ocs_ci.utility.deployment_openshift_logging import ( check_health_of_clusterlogging, get_clusterlogging_subscription ) from ocs_ci.ocs.exceptions import CommandFailed from ocs_c...
from ..methods.transaction import Transaction as NodeTransaction from ..models import Transaction, Block from ..services import TransactionService from webargs.flaskparser import use_args from ..services import AddressService from ..services import OutputService from ..services import BlockService from ..services impor...
import numpy as np import tensorflow as tf def low_rank_seq2tens(sequences, kernel, num_levels, embedding_order=1, recursive_weights=False, bias=None, reverse=False, return_sequences=False, mask=None): """ Tensorflow implementation of the Low-rank Seq2Tens (LS2T) map ---------------------------------...
""" A query interface to retrieve blog models and tags. """ import sys from calendar import monthrange from datetime import datetime, timedelta import django from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from django.db.models....
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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 # # U...
""" Module for reporting into http://www.blazemeter.com/ service 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 Unles...
""" AnnotationSubject := IRI | AnonymousIndividual AnnotationValue := AnonymousIndividual | IRI | Literal Annotation := 'Annotation' '(' annotationAnnotations AnnotationProperty AnnotationValue ')' annotationAnnotations := { Annotation } AnnotationAxiom := AnnotationAssertion | SubAnnotationPropertyOf | AnnotationPr...
import datetime import json import os from urllib.parse import urlencode import pytz import requests from django.conf import settings from django.contrib.auth.decorators import login_required from django.core.exceptions import ObjectDoesNotExist from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger ...
from ocs import ocs_agent, site_config from ocs.base import OpCode import time from twisted.internet.defer import inlineCallbacks from autobahn.twisted.util import sleep as dsleep from collections import defaultdict from ocs.ocs_feed import Feed class RegisteredAgent: """ Contains data about registered age...
""" WS-DAN models <NAME>., "See Better Before Looking Closer: Weakly Supervised Data Augmentation Network for Fine-Grained Visual Classification", arXiv:1901.09891 Created: May 04,2019 - <NAME> Revised: Dec 03,2019 - <NAME> """ import logging import numpy as np import torch import torch.nn as nn import torch.nn.funct...
import numpy as np from spikeinterface.core.core_tools import define_function_from_class from .basepreprocessor import BasePreprocessor, BasePreprocessorSegment from ..utils import get_closest_channels class CommonReferenceRecording(BasePreprocessor): """ Re-references the recording extractor traces. P...