text
stringlengths
8.04k
46.5k
# Copyright 2022 Quantapix Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
""" MTTOD: reader.py implements MultiWoz Training/Validation Data Feeder for MTTOD. This code is partially referenced from thu-spmi's damd-multiwoz repository: (https://github.com/thu-spmi/damd-multiwoz/blob/master/reader.py) Copyright 2021 ETRI LIRS, <NAME> Copyright 2019 <NAME> Licensed under...
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz 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, merg...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from nose.tools import assert_raises from nose.tools import assert_dict_equal from numpy.testing import assert_array_equal from numpy.testing ...
import numpy as np import pandas as pd import glob from plot_charts import * from docx import Document from docx.image.exceptions import UnrecognizedImageError from program_constants import * from docx.shared import Inches from time import sleep from PIL import Image # -*- coding: UTF-8 -*- __author__ = "KnifeF" cla...
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.patches as patches import matplotlib.gridspec as gridspec import warnings import itertools from scipy import signal from .helpers import RasterLabelData from ..core import * from . import utils # import plotting/utils from ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, division, print_function, absolute_import import time import datetime import importlib import logging import os import sys import fnmatch import types import traceback import inspect import pkgutil from .utils import AcceptHeader, String from .http impor...
"""This module contains functionality to prepare lookups for the particle coupling coefficients, which allows to efficiently treat large numbers of particles. """ import sys from tqdm import tqdm import numpy as np import scipy.special import smuthi.fields import smuthi.utility.math as sf import smuthi.utility.cuda ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2012 Brooklyn Code Incorporated. See LICENSE.md for usage # the license can also be found at http://brooklyncode.com/opensource/LICENSE.md import json import logging import os import imp import time import uuid import datetime import pymysql from pymysql.connec...
"""Code coverage utilities.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json import os import re import time from xml.etree.ElementTree import ( Comment, Element, SubElement, tostring, ) from xml.dom import ( minidom, ) from . import types as...
# -*- coding: utf-8 -*- # Copyright (c) 2020, bikbuk and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe import json import math import pytz from datetime import datetime as dt from dateutil.relativedelta import relativedelta from frappe.utils.file_m...
from typing import List, Dict, Optional, Union from scipy import stats import numpy as np from numba import jit from autumn.model_features.outputs import OutputsBuilder from autumn.models.sm_sir.parameters import TimeDistribution, VocComponent, AgeSpecificProps from .constants import IMMUNITY_STRATA, Compartment, Cli...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys sys.path.insert(0, '../modular_semantic_segmentation') from experiments.utils import get_observer, load_data from experiments.evaluation import evaluate, import_weights_into_network from xview.data...
import os import numpy as np from cg_openmm.parameters.reweight import * import matplotlib.pyplot as plt from openmmtools.multistate import MultiStateReporter from openmmtools.multistate import ReplicaExchangeAnalyzer import pymbar from pymbar import timeseries from scipy import interpolate from sklearn.utils import re...
"""This module contains helpers and default values that support the pyemu.Pst object. """ from __future__ import print_function, division import os, sys import stat from datetime import datetime import numpy as np import pandas as pd pd.options.display.max_colwidth = 100 import pyemu #formatters #SFMT = lambda x: "{0...
#Contains important plot scripts to plot plumes and distributions, as well as some support functions to deal with weird panda formats and round down and so on #Most important is plot_prof_full_reconstruction # coding: utf-8 import numpy as np import math from netCDF4 import Dataset import os from datetime import d...
import os import tkinter from tkinter import ttk import pallet_processing import main_processing import raster_processing from shader import pcv import statistics_processing def replace_directory(str1,directory): #Changes the folder given by replacing everything after the last backslash last_backsla...
# The MIT License (MIT) # Copyright 2021,2022 HalfMarble 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, including without limitation the rights # to use, copy, mod...
import typing from enum import IntEnum import numba import numpy as np import strax import straxen from immutabledict import immutabledict from .daqreader import ARTIFICIAL_DEADTIME_CHANNEL export, __all__ = strax.exporter() # More info about the acquisition monitor can be found here: # https://xe1t-wiki.lngs.infn....
import os import cv2 import time import json import h5py import glob import itertools import gym.spaces as spaces from collections import defaultdict, deque import time import torch import torch.nn as nn import torch.nn.functional as F import torch.multiprocessing as mp import torchvision.models as tmodels import numpy...
import queue import mimetypes import time import os.path import os import sys import urllib.parse import traceback import datetime import hashlib import contextlib import sqlalchemy import sqlalchemy.exc from sqlalchemy.sql import exists import WebRequest from sqlalchemy_continuum_vendored.utils import version_tabl...
import os import json import math import random import time import gflags import numpy as np from spinn.data.arithmetic import load_sign_data from spinn.data.arithmetic import load_simple_data from spinn.data.dual_arithmetic import load_eq_data from spinn.data.dual_arithmetic import load_relational_data from spinn.da...
from time import time import argparse from ants import from_numpy, resample_image, registration, apply_transforms from matplotlib.colors import ListedColormap, LinearSegmentedColormap from matplotlib import cm import matplotlib.pyplot as plt from scipy.ndimage import gaussian_filter from scipy.ndimage.measurements imp...
#!/usr/bin/env python3 # # PennyScythe.py is a Python3 script that ingests and runs adversarial emulation # plans from SCYTHE's Community Threats Repository. Its goal is to aid in # Purple Teaming exercises. Its functionality is not limited to SCYTHE's # Community Threats, and will support any modules developed with...
""" Modification of the lamner code originally written by <NAME> to be run for single line use instead of files. To clarify, the code was originally written in a functional style but to simplify the usage, I altered LAMNER to be a class. <NAME> ~ 2021 """ import torch from rouge import FilesRouge import torch.nn ...
#!/usr/bin/python # -*- coding: utf-8 -*- ### # Copyright (2021) Hewlett Packard Enterprise Development LP # # 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/L...
#!/usr/bin/env python import os import sys import pdb import argparse import numpy import numpy as np import crowdsource.psf as psfmod from astropy.io import fits from astropy import wcs from functools import partial import crowdsource from scipy.ndimage import zoom badpixmaskfn = '/n/fink2/www/eschlafly/decam/badpix...
import os import numpy as np import pandas as pd from covid19model.data.utils import convert_age_stratified_property class QALY_model(): def __init__(self, comorbidity_distribution): self.comorbidity_distribution = comorbidity_distribution # Define absolute path abs_dir = os.path.dirname(...
import numpy as np import pandas as pd import csv import os import pickle from scipy.stats import itemfreq from sklearn.model_selection import StratifiedKFold from sklearn.metrics import confusion_matrix, f1_score, precision_score, recall_score from utils import * from keras.preprocessing.text import Token...
import click import os import shutil import re import collections import random import numpy as np import copy import sys import config import util import perf import ruamel as _ruamel import ruamel.yaml as _yaml import math import subprocess import re #exp_root = os.getcwd() + '/hw_architecture/batch_sweep' clas...
import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from matplotlib.backends.backend_pdf import PdfPages from matplotlib import rc import warnings import squarify import xarray as xr import dask.dataframe as dd import dask.array as da #impo...
# Copyright 2020 University of New South Wales, University of Sydney, Ingham 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 # Unle...
import sys import csv import os import math import subprocess import tempfile import json import webbrowser import us import psycopg2, psycopg2.extras from progressbar import ProgressBar, Bar, ETA, Percentage, Counter DBNAME = 'us_osm_nbi_import' DISTANCE_THRESHOLD = 0.0005 MAX_ALLOWABLE_INTERSECTIONS_FOR_UNDERPASSES ...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE 蓝鲸基础平台 is licensed under the MIT License. License for BK-BASE 蓝鲸基础平台: ---------------------------------------------...
# -*- coding: utf-8 -*- """ Created on Tue May 5 11:17:17 2020 @author: s4451992 """ #%% Set working environments import matplotlib.pyplot as plt import matplotlib as mpl import dicom2nifti import SimpleITK as sitk import numpy as np import scipy.ndimage as ndimage import pandas as pd import dateti...
#!/usr/bin/python3 ''' --------------------------- Licensing and Distribution --------------------------- Program name: TorsiFlex Version : 2021.3 License : MIT/x11 Copyright (c) 2021, <NAME> (<EMAIL>) and <NAME> (<EMAIL>) Permission is hereby granted, free of charge, to any person obtaining a copy of this ...
### THIS FILE CONTAINS CODE USED TO ANALYZE THE DATASET USED IN THE THESIS ### # Import relevant modules import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from utils.Utils_Dataset import * from utils.Utils_DataAnalysis import * import importlib #%% Define helper f...
"""Tests for google3.research.simulation.whirl.layers.""" import functools import itertools from absl.testing import absltest from absl.testing import parameterized import haiku as hk import jax import jax.numpy as jnp from jax_cfd.base import grids from jax_cfd.base import test_util from jax_cfd.ml import layers from...
# -*- coding: utf-8 -*- import dash import dash_core_components as dcc import dash_html_components as html import dash_auth from dash.dependencies import Input, Output, State import plotly.express as px import numpy as np import pandas as pd from io import StringIO import extra_vars as exva import json from flask impo...
from rest_framework.decorators import api_view, authentication_classes, permission_classes from rest_framework.authentication import BasicAuthentication from rest_framework import status from rest_framework.generics import GenericAPIView from rest_framework.response import Response from django.core.exceptions import Ob...
import abc import copy import random import re import time import gym import numpy as np import scipy.special as sp import tfg.games def argmax(values, key=None): key_ = (lambda i: values[i]) if key is None else (lambda i: key(values[i])) return max(range(len(values)), key=key_) def argmin(values, key=Non...
#!/usr/bin/env python3 # @Author : <NAME> # @FileName : xgboost_train.py # @Software : NANOME project # @Organization : JAX Li Lab # @Website : https://github.com/TheJacksonLaboratory/nanome """ Train model on data using RF or XGBoost """ import argparse import os.path import sys from collections import defaultdict ...
# -*- coding: UTF-8 -*- __author__ = '<NAME>' from builtins import input import numpy as np import matplotlib.pyplot as plt from scipy.optimize import curve_fit from scipy.interpolate import UnivariateSpline as spline from scipy.interpolate import RectBivariateSpline as spline2d import os from VoigtFit.funcs.voigt i...
#!/usr/bin/python # # Copyright 2016 Pinterest, 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...
import argparse from pathlib import Path import networkx as nx import nxmetis import torch import torch.nn as nn import torch.multiprocessing as mp from torch_geometric.data import Data, DataLoader, Batch from torch_geometric.nn import SAGEConv, graclus, avg_pool, global_mean_pool from torch_geometric.utils import ...
# pylint: disable=unused-argument # pylint: disable=bad-super-call # No need to shout here from googledrive.api import GoogleService from googledrive.api import SheetsService from googledrive.exceptions import GoogleApiClientHttpErrorException from googledrive.exceptions import MissingGoogleDriveFolderException from g...
# pylint: disable=missing-docstring # Copyright 2017-2018 <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 applica...
""" Obit tasking interface This module contains classes useful for an Obit tasking interface to python. An ObitTask object contains input parameters for a given Obit program. The parameters for a given task are defined in a Task Definition File (TDF) which gives the order, names, types, r...
from __future__ import print_function import json import os import sys import datetime from uuid import uuid4 from dcicutils.ff_utils import ( get_metadata, post_metadata, patch_metadata, generate_rand_accession, search_metadata ) from core.nnested_array import ( flatten, create_dim ) from d...
import numpy as np from scipy.cluster import hierarchy from scipy.spatial import distance from scipy import stats import seaborn as sns import matplotlib.pyplot as plt from matplotlib.legend_handler import HandlerBase from anndata import AnnData from upsetplot import plot as UpSet import networkx as nx import sca...
# data from https://github.com/CSSEGISandData/COVID-19 import os import pickle import pandas import numpy as np from datetime import datetime import matplotlib import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation from matplotlib.patches import Polygon from matplotlib.collections import PatchC...
#!/usr/bin/env python3 ### Burak Less Data Experiment Utils ### GENERIC import copy import datetime import io import os from os import listdir from os.path import isfile, join, isdir import sys from functools import partial ### DATA PROCESS import pandas as pd import numpy as np import ast from sklearn.metrics impor...
# Import the pygame library. import pygame import math # Import the Separating Axis Theorem library import sat class ThreeDMesh(): def __init__(self, baseColour, maxColour): self.z = 0 self.baseColour = baseColour self.maxColour = maxColour self.currentColour = baseColour # Se...
#!/usr/bin/env python # # Copyright (c) 2021-2021 <NAME> <<EMAIL>> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice...
import random from typing import Optional, List, Union import os import json import numpy as np import pandas as pd import torch import wandb import time from collections import defaultdict from tqdm import tqdm from data_exploration import ( append_wikidata_alias, append_wikidata_equivalent, append_FB15k...
"""Utilities for translating ORF detection """ import warnings from collections import Counter from collections import defaultdict import pysam from tqdm import * import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages import numpy as np import pa...
"""readinput.py Serves as an user-friendly input interface. Read the user-based input file. All the input data are provided via the use of input cards. Created on Mon May 06 12:10:00 2022 @author: <NAME> Last updated on Tue May 24 17:00:00 2022 @author: <NAME> email: <EMAIL> List changes / additions: ---------------...
# -*- coding: utf-8 -*- # # Electrum - lightweight DECENOMY Standard Wallet # Copyright (C) 2018 The Electrum developers # Copyright (C) 2021 The DECENOMY Core Developers # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Softwa...
""" ConvNeXt Paper: `A ConvNet for the 2020s` - https://arxiv.org/pdf/2201.03545.pdf Original code and weights from https://github.com/facebookresearch/ConvNeXt, original copyright below Modifications and additions for timm hacked together by / Copyright 2022, <NAME> """ # Copyright (c) Meta Platforms, Inc. and affi...
# coding: utf-8 ############################################# # Ordinal Regression Code with Inception V3 ############################################# # Imports import os import time import pandas as pd import torch import torch.nn as nn import torch.nn.functional as F import argparse import sys from collections im...
import periodictable as pdtb r_e = pdtb.constants.electron_radius * 1e10 # classical electron radius, in A N_A = pdtb.constants.avogadro_number # Avogadro number, unitless k_B = 1.38065e-23 # Boltzman constant, in J/K import numpy as np import cmath import lmfit as lm import scipy.stats as stat import matplotlib...
"""Various helper functions""" import asyncio import base64 import binascii import cgi import datetime import functools import inspect import os import re import sys import time import warnings import weakref from collections import namedtuple from math import ceil from pathlib import Path from urllib.parse import quo...
from collections import OrderedDict import datetime import re import itertools from operator import attrgetter from hashlib import md5 from moto.core import BaseBackend, BaseModel, CloudFormationModel from moto.core.utils import unix_time, BackendDict from moto.core import ACCOUNT_ID from moto.utilities.paginator imp...
# Copyright 2019-2020 Xanadu Quantum 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 # Unless required by applicable law or...
import os from abc import abstractmethod from collections import defaultdict import PIL import cv2 import math import numpy as np import sldc import torch from PIL import Image from cytomine.models import Annotation from rasterio.features import rasterize from shapely import wkt from shapely.affinity import translate,...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys, os, re, codecs, random, string, uuid, io, urllib import copy from PIL import Image from io import BytesIO try: import sigil_bs4 import sigil_gumbo_bs4_adapter as gumbo_bs4 except: import bs4 as sigil_bs4 import bs4 as gumbo_bs4 plugin_name = 'Baka-Cleane...
from less0n.models import * from datetime import datetime def init_db(): # Create tables print('Creating all database tables...') db.create_all() # Create data print('Dumping all data...') # User users = { 'bm2734': User(id='bm2734', avatar='', email='<EMAIL>', name='<NAME>', tok...
#!/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...
import numpy as np import pandas as pd import pytest import woodwork as ww from blocktorch.data_checks import DataCheckAction, DataCheckActionCode from blocktorch.model_family import ModelFamily from blocktorch.pipelines import ( BinaryClassificationPipeline, MulticlassClassificationPipeline, RegressionPip...
import torch import torch.nn as nn from torch.autograd import Variable from torch.optim import lr_scheduler from torch import optim import torch.nn.functional as F import random import numpy as np import os import json import copy from utils.masked_cross_entropy import * from utils.config import * import pprint clas...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: ascii -*- # # Util/asn1.py : Minimal support for ASN.1 DER binary encoding. # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted...
import warnings warnings.simplefilter(action='ignore') import pandas as pd import numpy as np import geopandas as gpd from shapely.geometry import Point, LineString, Polygon, MultiPoint from shapely.ops import linemerge, polygonize_full, nearest_points import statistics pd.set_option("display.precision", 3) pd.option...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Built-in imports import bisect import multiprocessing as mp # 3rd party imports import numpy as np import xarray as xr from scipy import constants # Local imports from ..pyrf import resample, ts_scalar, ts_vec_xyz, ts_tensor_xyz __author__ = "<NAME>" __email__ = "<EM...
import tensorflow from tensorflow.keras import backend as K import numpy import random import AttackWrappersWhiteBox import DataManager import matplotlib.pyplot as plt import NetworkConstructors from cleverhans.attacks import FastGradientMethod from cleverhans.utils_keras import KerasModelWrapper from clever...
#!/usr/bin/env python # coding=utf-8 import grpc import datetime import sys import logging import socket import os import re import ipaddress import json import signal import traceback import subprocess import sdk_service_pb2 import sdk_service_pb2_grpc import lldp_service_pb2 import config_service_pb2 import route_s...
# -*- coding: utf-8 -*- import datetime import json from django.conf import settings from django.contrib.auth.models import User import mock from nose.tools import eq_ from pyquery import PyQuery as pq import amo import amo.tests import constants.editors as rvw from access.models import GroupUser from addons.models ...
import warnings from collections import OrderedDict from copy import deepcopy import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.checkpoint as cp from mmcv.cnn import build_norm_layer, constant_init, trunc_normal_init from mmcv.cnn.bricks.transformer import FFN, build_dropout from mm...
import asyncio from collections import deque from typing import List from quarkchain.cluster.miner import Miner, validate_seal from quarkchain.cluster.p2p_commands import ( OP_SERIALIZER_MAP, CommandOp, Direction, GetMinorBlockHeaderListRequest, GetMinorBlockHeaderListResponse, GetMinorBlockLis...
import warnings import os import numpy as np import pandas as pd from preprocessing.utils import remove_french_accents_and_cedillas_from_dataframe columns_to_drop = ['nr', 'patient_id', 'eds_end_4digit', 'eds_manual', 'DOB', 'begin_date', 'end_date', 'death_date', 'death_hosp', 'eds_final_id', ...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Various test of GDAL core. # Author: <NAME> <even dot rouault at mines dash parid dot org> # ##############################################...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2014 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
from __future__ import (absolute_import, division, print_function, unicode_literals) import logging import os import collections import time from enum import Enum import traceback from datetime import datetime, timedelta, time as dtime from dateutil.parser import parse as date_parse import time...
# coding=utf-8 from __future__ import division import ipaddress import pickle import socket import unittest # This needs to be done before third-party imports to make sure they all use # our wrapped socket class, especially in case of subclasses. from .monkeypatching import CheckedSocket, DisallowedConnectException ...
import ast import json import re from collections import OrderedDict PLURAL_UNITS = [ "microliter", "nanoliter", "milliliter", "second", "minute", "hour", "g", "nanometer", ] TEMP_DICT = { "cold_20": "-20 degrees celsius", "cold_80": "-80 degrees celsius", "warm_37": "37 ...
# Authors: <NAME> """ Example to show the use of stepwise solving, using the ida or the ddaspk solver. It also shows how a class is used to hold the problem data. This example shows how to solve the double pendulum in full coordinate space. This results in a dae system. The problem is easily stated: a first pendulum ...
#!/usr/bin/env python # # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Classes to perform filtering of objects based o...
# Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 from collections import defaultdict import datetime from openvino.runtime import Core, Model, PartialShape, Dimension, Layout, Type, serialize from openvino.preprocess import PrePostProcessor from .constants import DEVICE_DURATION_IN_SE...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, erpnext from frappe import _, msgprint, scrub from frappe.core.doctype.user_permission.user_permission import get_permitted_documents fr...
#!/usr/bin/env python # coding: utf-8 # Copyright (c) 2002-2016 "Neo Technology," # Network Engine for Objects in Lund AB [http://neotechnology.com] # # This file is part of Neo4j. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Y...
# stdlib import copy import mock import unittest # 3p from nose.plugins.attrib import attr # project from utils.service_discovery.config_stores import get_config_store from utils.service_discovery.consul_config_store import ConsulStore from utils.service_discovery.etcd_config_store import EtcdStore from utils.service...
# Copyright 2019 The Texar 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 ...
import setuptools # noqa from setuptools import Extension import sys def count_down_delay(delay): from time import sleep while delay: sys.stdout.write("Continuing in %d seconds... \r" % delay) sys.stdout.flush() delay -= 1 sleep(1) print("") DASH_SEPARATOR = 75 * "-" ...
import itertools import json import multiprocessing as mp import os import sys import warnings from collections import defaultdict from pathlib import Path from typing import Generator, Iterable, List, Optional, Union import numpy as np from PIL import Image from tqdm import tqdm from darwin.exceptions import NotFoun...
#!/usr/bin/python3 import uuid import json import configparser import functools import getopt, sys import os, os.path from io import open import glob, time import godot_loader from lark import Lark, UnexpectedInput, Tree, Token from lark.indenter import Indenter __real_file__ = os.path.realpath(__file__) __path__ = o...
from __future__ import absolute_import, division import collections import copy import logging import time from kafka.vendor import six from .base import BaseCoordinator, Generation from .assignors.range import RangePartitionAssignor from .assignors.roundrobin import RoundRobinPartitionAssignor from .protocol import...
# -*- coding: utf-8 -*- """OpenCTI CrowdStrike connector utilities module.""" import base64 import calendar import functools import logging from datetime import datetime, timedelta, timezone from typing import ( Any, Callable, Dict, Generator, List, Mapping, NamedTuple, Optional, Tu...
# Copyright 2019 Scalyr Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...