text
stringlengths
6.04k
39.5k
import argparse, os, sys, gzip, itertools from tqdm import tqdm from pgs_harmonizer.harmonize import * from datetime import datetime # Inputs parser = argparse.ArgumentParser( description='Harmonize a PGS Catalog Scoring file (PGS######.txt.gz) to a specific genome build.') subparsers = parser.add_subparsers(help=...
from veroviz._common import * from veroviz._internal import locs2Dict from veroviz._internal import loc2Dict from veroviz._geometry import geoDistance2D def pgrGetSnapToRoadLatLon(gid, loc, databaseName): """ A function to get snapped latlng for one coordinate using pgRouting Parameters ---------- gid: int The...
"""The Elexa Guardian integration.""" from __future__ import annotations import asyncio from collections.abc import Awaitable, Callable from typing import cast from aioguardian import Client from aioguardian.errors import GuardianError import voluptuous as vol from homeassistant.config_entries import ConfigEntry, Co...
import common import music_objects import json import zipfile from os.path import exists, isfile, join from random import shuffle from gmusicapi import Musicmanager class Client: """Driver for most of gpymusic's functionality.""" def transition(self, input=""): """ Route input to the appro...
from pyspark import keyword_only from pyspark.ml.util import JavaMLWritable, JavaMLReader, MLReadable from pyspark.ml.wrapper import JavaEstimator from pyspark.sql import SparkSession from pysparkling import * from pysparkling.ml.params import H2OGBMParams, H2ODeepLearningParams, H2OAutoMLParams, H2OXGBoostParams from...
""" Inspired by https://github.com/tkarras/progressive_growing_of_gans/blob/master/tfutil.py """ import functools import numpy as np import tensorflow as tf from tensorflow.python.ops import array_ops from tensorflow.python.ops import functional_ops seed = 1337 np.random.seed(seed) tf.set_random_seed(seed) batch_si...
# -*- coding: utf-8 -*- from collections import defaultdict import os import re import numpy as np from pyfr.shapes import BaseShape from pyfr.util import memoize, subclass_where from pyfr.writers import BaseWriter class VTKWriter(BaseWriter): # Supported file types and extensions name = 'vtk' extn = [...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from typing import Any, List, Optional, Union, List, Tuple import torch import torch.nn as nn from hyperbox.utils.utils import hparams_wrapper __all__ = [ 'Mutable', 'OperationSpace', 'InputSpace', 'MutableScope', 'ValueSp...
#!/usr/bin/env python ## -*- coding: utf-8 -*- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import coloredlogs import logging import time import json import websockets import asyncio import sys import threading import itertools import random import hashlib import os from jsonpath_ng import jsonpath, parse from typing import Dict, List, Tuple, Opti...
"""Get the keyword arguments for the views from the loader.""" # ----------------------------------------------------------------------------- # Imports # ----------------------------------------------------------------------------- import numpy as np import pandas as pd from qtools import inthread, inprocess from qt...
from __future__ import print_function import time import tempfile import shutil import unittest import email.utils from contextlib import contextmanager import pytest from scrapy.http import Response, HtmlResponse, Request from scrapy.spider import Spider from scrapy.settings import Settings from scrapy.exceptions imp...
from __future__ import print_function import argparse import json import datetime import os.path from abc import ABCMeta from six import add_metaclass from jinja2 import Template from enum import Enum from logging import CRITICAL from logging import getLogger from policyuniverse.policy import Policy from shared.common...
#!/usr/bin/python # -*- coding: utf-8 -*- # Advanced Movie Selection for Dreambox-Enigma2 # # The plugin is developed on the basis from a lot of single plugins (thx for the code @ all) # Coded by JackDaniel & cmikula (c)2011 # Support: www.i-have-a-dreambox.com # # This plugin is licensed under the Creative Common...
"""Credential definition admin routes.""" import json from time import time # from asyncio import ensure_future, shield from asyncio import shield from aiohttp import web from aiohttp_apispec import ( docs, match_info_schema, querystring_schema, request_schema, response_schema, ) from marshmallo...
import os import sys import queue from contextlib import contextmanager __all__ = ["load_isaacgym_env_preview2", "load_isaacgym_env_preview3", "load_omniverse_isaacgym_env"] @contextmanager def cwd(new_path: str) -> None: """Context manager to change the current working directory This function restores the ...
# -*- coding: utf-8 -*- """ Created on Wed Dec 2 14:25:59 2020 @author: andre """ import tkinter as tk from tkinter.filedialog import askopenfilename from PIL import Image # Para mostrar la imagen en la interfaz GUI from PIL import ImageTk # Para mostrar la imagen en la interfaz GUI import cv2 import numpy as np #im...
#!/usr/bin/env python """The goals of engine.py are to: 1) Utilize native Python libraries and not depend on third party or custom libraries 2) Be a single file so it can be easily moved, downloaded, or transferred between systems """ # Standard Python libraries. import argparse import datetime import fnmatch import ...
# -*- coding: utf-8 -*- """ Spyder Editor some of the code i used is not mime i fount some on keras.io here is the link: https://keras.io/examples/lstm_seq2seq_restore/ This is a temporary script file. """ #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Basic chatbot design --- for your own modificati...
# Plotting program import matplotlib.pyplot as plt # Search for files from glob import glob # Good for reading/writing data tables import pandas as pd # Better math, numbers, and array functions import numpy as np from astropy.timeseries import LombScargle from astropy.io import fits # You have to give permission...
# coding: utf-8 # Seismic data is a neat thing. You can imagine it like an ultra-sound of the subsurface. However, in an ultra-sound, we use much smaller wavelengths to image our body. Seismic data usually has wavelengths around 1m to 100m. That has some physical implications, but for now, we don't have to deal with ...
#!python3 # License: Apache 2.0. See LICENSE file in root directory. # Copyright(c) 2021 Intel Corporation. All Rights Reserved. import sys, os, subprocess, re, platform, getopt, time # Add our py/ module directory so we can find our own libraries current_dir = os.path.dirname( os.path.abspath( __file__ ) ) ...
# ------------------------------------------------------------------------------ # Portions of this code are from # det3d (https://github.com/poodarchu/Det3D/tree/56402d4761a5b73acd23080f537599b0888cce07) # Copyright (c) 2019 朱本金 # Licensed under the MIT License # -------------------------------------------------------...
import json import logging import uuid from decimal import Decimal from django.db.models import F from django.conf import settings from elasticsearch_dsl import A from rest_framework.response import Response from rest_framework.views import APIView from usaspending_api.awards.v2.lookups.lookups import loan_type_mapp...
#!/usr/bin/env python # Copyright 2015-2016 Yelp 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 ...
import json import pandas as pd import numpy as np import requests import datetime import time import os from progress.bar import Bar def load_file(file_path): with open(file_path, 'rb') as inp: file = inp.read() return file def write_file(file, file_path): with open(file_path, 'wb') as o...
# # Created by <NAME> on 2/5/19. # from typing import List, Dict, Tuple, Optional from collections import Counter import json import gzip import pandas as pd from Bio import SeqIO from Bio.Alphabet import IUPAC, HasStopCodon, _verify_alphabet import numpy as np from phenotrex.util.logging import get_logger from pheno...
import re from collections import defaultdict import torch from fastNLP.core.batch import Batch from fastNLP.core.dataset import DataSet from fastNLP.core.sampler import SequentialSampler from fastNLP.core.vocabulary import Vocabulary class Processor(object): def __init__(self, field_name, new_added_field_name)...
r"""Functions for exclusive $B\to P\ell^+\ell^-$ decays.""" import flavio from math import sqrt,pi from flavio.physics.bdecays.common import lambda_K, beta_l, meson_quark, meson_ff from flavio.physics import ckm from flavio.classes import AuxiliaryQuantity from flavio.config import config from flavio.physics.running i...
# -*- coding: utf-8 -*- """ This file automatically generates random data and weights and performs a treecode approximation for the screened coulomb potential kernel function. During the "compute interaction" stage, multiprocessing is performed by spawning c-2 processes, where c is the automatically detected am...
# ********************************************************* # * tomography.py * # * * # * Author: <NAME>, <EMAIL> * # * * # * Performs state and process tomograph...
# 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...
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.3.2 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # %% from oas_dev.util.eusaar_data import * from oas_...
# coding: utf-8 # # Project: X-ray image reader # https://github.com/silx-kit/fabio # # # Copyright (C) European Synchrotron Radiation Facility, Grenoble, France # # Principal author: <NAME> (<EMAIL>) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this s...
import abc import collections import datetime import copy import itertools import logging import re import urllib from .exceptions import ClientValidationError from .utils import make_date, is_bound logger = logging.getLogger(__name__) class BaseManager(metaclass=abc.ABCMeta): """ Base class for Model Man...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ intervaltree: A mutable, self-balancing interval tree for Python 2 and 3. Queries may be by point, by range overlap, or by range envelopment. Core logic: internal tree nodes. Copyright 2013-2018 <NAME> Modifications Copyright 2014 <NAME> Licensed under the Apache Li...
#!/usr/bin/env python # coding: utf-8 ############################################################################## # simulation of earthquake catalogs using ETAS # # as described by Mizrahi et al., 2021 # <NAME>, <NAME>, <NAME>; # The Effect of Declustering on the Size Distribution of Mainshocks. # Seismological Res...
import torch from torch import nn, einsum, broadcast_tensors import torch.nn.functional as F from einops import rearrange, repeat from einops.layers.torch import Rearrange # helper functions def exists(val): return val is not None def safe_div(num, den, eps = 1e-8): res = num.div(den.clamp(min = eps)) r...
#!/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...
# Copyright (c) 2014 CensoredUsername # # 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, di...
""" The actual game. AssertionErrors are largely used by this module as a GameLogicExceptions. Created Apr 09, 2019 @author montreal91 """ import json from copy import deepcopy from random import choice from random import randint from typing import Any from typing import Callable from typing import Dict from typi...
import os import re import sys import xml import ctypes import struct import pickle import logging import binascii import traceback from io import BytesIO from collections import namedtuple # PythonForWindows import windows import windows.generated_def as gdef from windows.winobject import event_log """ ParsedElemen...
import json import charms.reactive as reactive import charms.leadership as leadership import charms_openstack.bus import charms_openstack.charm as charm import charmhelpers.core as ch_core import charmhelpers.contrib.openstack.cert_utils as cert_utils import charms.coordinator as coordinator import charm.openstack....
"""Base for terminal user interfaces.""" # # (C) Pywikibot team, 2003-2021 # # Distributed under the terms of the MIT license. # import getpass import logging import re import sys import threading from typing import Any, Optional, Union import pywikibot from pywikibot import config from pywikibot.backports import Sequ...
import matplotlib.pyplot as plt import matplotlib as mpl mpl.use('Agg') import pandas as pd import seaborn as sns import numpy as np import os import ns_sampling_modules as sm from ns_password import LOCAL_DIRECTORY import ns_data_modules as dm from input_deck import names fn=names() def violin_saved_dataset(c,loop...
# -*- coding: utf-8 -*- # The content and structure of the display tables is defined completely # here. from varitem import factory, startUpdate class VarGroup(object): """One titled subtable within a display table. title = heading for the collection entries = VarItem list for display """ def _...
from keras import optimizers import keras from keras.callbacks import Callback from keras.callbacks import EarlyStopping, ModelCheckpoint from keras.layers import Conv1D from keras.layers import Dropout from keras.layers import Input, Embedding, LSTM, Dense, Lambda, RepeatVector from keras.layers import MaxPooling1D, G...
# -*- coding: utf-8 -*- from __future__ import (division, print_function, absolute_import, unicode_literals) import numpy as np import unittest from .rainflow import (get_load_classes, get_load_class_boundaries, find_reversals_strict, find_rainflow_ranges_strict, ...
from nnf import Var from lib204 import Encoding # Input a set of courses into Var # Use to generate propositions from the course list def generateCourseList(setName, cSet): aList = [] for course in cSet: cVar = Var("%s%s" % (setName, course)) aList.append(cVar) return aList # Use to genera...
"""Create Django models from IBM API output""" from __future__ import annotations from rdkit import Chem from rdkit.Chem import Descriptors from django.core.files.storage import default_storage from django.core.files.base import ContentFile from statistics import mean from .mcule.apicalls import MCuleAPI # Import sta...
import argparse import random import editdistance import os import numpy as np from data_generator import ContinualLearningFormarter from data_generator import get_data_generator from model import get_model def visualization(i, a, b, c, d, e, directory1): with open(directory1 + '/' + str(i) + '.txt', 'w') as f: ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is part of Simple Wallpaper Randomizer # # Copyright (c) 2019 <NAME> <<EMAIL>> # # 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 w...
from imgaug import augmenters as iaa from sklearn.metrics import accuracy_score from sklearn.metrics import confusion_matrix from script.data_handler.ImgMaskAug import ActivatorMask, ImgMaskAug from script.model.sklearn_like_model.BaseModel import BaseDatasetCallback from script.model.sklearn_like_model.ImageClf...
# -*- coding: utf8 -*- # Author: <NAME> """Coqtop interface with functions to send commands and parse responses.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import datetime import logging import os import signal import subprocess import threading imp...
import copy import odpttraininfo as odpt from ..intermediate_components import * from . import common from .field_string import embed_field, find_all_field, find_field staList = { # [Line:Seibu]内は「[Line:Seibu]内~[Sta:2035]」なので無視 "TokyoMetro.Yurakucho":[["[Line:Tobu]","[Sta:1510]","[Sta:7086]","[Sta:7087]","[St...
import abc from typing import Any, Dict, List, Optional, Tuple, Union import numpy as np import torch import torch.nn as nn from torch_cluster import knn import torchgeometry as tgm from pointnet2 import PointnetSAModuleMSG from ..config.config import Config from ..data.labels import LabelType from ..utils.factory im...
''' Part of the dibase.rpi.gpio package. Encapsulation of GPIO pin id values and supporting clases. Underlying GPIO pin ids are those used by the Linux gpiolib and used to identify a device's GPIO pins in the Linux sys filesystem GPIO sub-tree. They are likely different to the actual pin numbe...
"""Webdriver support for lettuce""" from lettuce import step, world from lettuce_webdriver.util import (assert_true, assert_false, AssertContextManager, find_any_field, find_...
from __future__ import print_function, absolute_import, unicode_literals from ._compat import exec_, u, string_types, open import re import os import io import cgi __templates_temp_dir__ = 'tmp/templates_temp' __options__ = {'use_temp_dir':False} __nodes__ = {} #user defined nodes BEGIN_TAG = '{{' END_TAG = '}}' ...
from django.shortcuts import render, redirect from django.utils import timezone from django.http import QueryDict, HttpResponse from django.db.models import Count from .models import Map, Text, Layer, Feature from .forms import MapForm, LayerForm import os import urllib import io import re import json import base64 f...
#! /usr/bin/env python3 # ----- ---- --- -- - # Copyright 2019 Oneiro NA, Inc. All Rights Reserved. # # Licensed under the Apache License 2.0 (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy # in the file LICENSE in the source distribution or at # https...
'''Supplemental This is an evolutionary algorithm for optimizing a phase mask to be used for generating a helicon point spread function. Text and code by <NAME>. Some code also developed by <NAME> & Xuanwen.''' print('*********************************************************') print('Evolutionary Algorithm for PSF Opti...
import abc from dataclasses import dataclass from itertools import zip_longest from math import log10 from operator import itemgetter from typing import Sequence, Dict, Literal, Union, Tuple import colorama from mdiff.utils import CompositeOpCode, OpCodeType, OpCode STYLE_RESET = colorama.Style.RESET_ALL + colorama....
""" undictify - Type-checked function calls at runtime """ import collections import enum import inspect from dataclasses import InitVar, is_dataclass from functools import wraps from typing import Any, Callable, Dict, List, Optional, Type, TypeVar, Union, get_type_hints, Tuple from typing import _GenericAlias # type:...
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
import numpy as np import jax from jax import jit import collections,itertools from functools import lru_cache as cache from .representation import Rep,ScalarRep,Scalar from .linear_operator_base import LinearOperator from .linear_operators import LazyPerm,LazyDirectSum,LazyKron,LazyKronsum,I,lazy_direct_matmat,lazify,...
import os import sys import json from subprocess import Popen try: import ftrack_api_old as ftrack_api except Exception: import ftrack_api from pype.api import config from pype import lib as pypelib from avalon.vendor.Qt import QtWidgets, QtCore from avalon import io, api, style, schema from avalon.tools import...
#!/usr/bin/env python # Copyright (c) 2013, <NAME> # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that # the following conditions are met: # # Redistributions of source code must retain the aframeve copyright notice, this list of con...
""" This file contains 2 examples on how to build raw transactions that can be send via the 'sendrawtransaction' RPC endpoint. Note that the perspective taken in these examples is that you want a light wallet like approach. This means that you will not have a fully synced Blockchain via neo-python and that...
''' A DonkeyCar pilot based on a Variational AutoEncoder. ''' import numpy as np import keras from keras.layers import Input, Conv2D, Flatten, Dense, Conv2DTranspose, Lambda, Reshape, Dropout from keras.layers import SpatialDropout2D from keras.models import Model from keras.callbacks import EarlyStopping from keras i...
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Mar 6 13:51:44 2019 @author: aditya """ from __future__ import print_function, division import sys import os import math import rospy import rospkg import rosparam cur_dir = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(1, os.path.join(...
import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt import json import collections from sklearn.preprocessing import LabelEncoder from lightgbm.sklearn import LGBMRegressor from sklearn.model_selection import train_test_split from sklearn.metrics import mean_absolute_er...
# -*- coding: utf-8 -*- """ This module defines helper functions to access common input needed to test many functions. These functions give a rich command line interface to specifically select subsets of annotations, pipeline configurations, and other filters. TODO: standardize function signatures """ from __future__ ...
#!/usr/bin/env python # Copyright 2020 The Pigweed 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
# -*- coding: utf-8 -*- """ Created on Sat Oct 13 15:41:00 2018 @author: <NAME> """ import pandas as pd import numpy as np from scipy.stats import binned_statistic from sklearn.feature_extraction.text import CountVectorizer import matplotlib.pyplot as plt import matplotlib from .colors import numeric_cmap, categor...
from pygraph.algorithms.sorting import topological_sorting from pygraph.classes.digraph import digraph # import graph_representation.node import subprocess, math, re, nltk from pygraph.algorithms.accessibility import accessibility from props.graph_representation.word import NO_INDEX, Word, strip_punctuations from...
#Implemented by RYM import logging from omegaconf import II import math from dataclasses import dataclass, field import editdistance import torch import torch.nn.functional as F from fairseq import metrics, utils from fairseq.criterions import FairseqCriterion, register_criterion from fairseq.tasks import FairseqTask...
#!/usr/bin/env python3 """test_testing.py - tests of the testing-module of DHParser Author: <NAME> <<EMAIL>> Copyright 2017 Bavarian Academy of Sciences and Humanities 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 co...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2015, Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # -------------------------------------------------------------------------...
from __future__ import print_function import numpy as np import h5py import os import tarfile import json import argparse import yaml import sys from shutil import copyfile import math MAXMULT = 4096 filedir = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0,os.path.join(filedir, "..", "hls-writer")) from...
# -*- coding: utf-8 -*- """ .. invisible: _ _ _____ _ _____ _____ | | | | ___| | | ___/ ___| | | | | |__ | | | |__ \ `--. | | | | __|| | | __| `--. \ \ \_/ / |___| |___| |___/\__/ / \___/\____/\_____|____/\____/ Created on June 06, 2014 A complex test: comparison with CAFFE ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # SPDX-License-Identifier: Apache-2.0 """ Alexa Config Flow. For more details about this platform, please refer to the documentation at https://community.home-assistant.io/t/echo-devices-alexa-as-media-player-testers-needed/58639 """ from asyncio import sleep from collect...
import re import os import sys from cyvcf2 import VCF as cyvcf2 from cyvcf2 import VCFReader from clint.textui import colored, puts, indent from collections import OrderedDict, defaultdict from vcfkit.utils import lev, message from copy import copy import numpy as np from vcfkit.utils.primer3 import primer3 from subpro...
# # Copyright 2019-2020 <NAME> # 2020 <NAME> # 2019-2020 <NAME> # 2020 <NAME> # # ### MIT license # # 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 restr...
from lmfit import Model import numpy as np from qtpy.QtWidgets import QApplication import logging from __code.bragg_edge.fitting_functions import march_dollase_basic_fit, march_dollase_advanced_fit from __code.bragg_edge.get import Get from __code.bragg_edge.peak_fitting_evaluation.march_dollase import MarchDollase ...
# ActivitySim # See full license in LICENSE.txt. from builtins import next from builtins import map from builtins import object import os import logging import datetime as dt import pandas as pd from . import orca from . import inject from . import config from . import random from . import tracing from . import mem ...
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'daleksovski' import os import numpy as np import arff from . import classification as c from . import regression as r from . import evaluation as e from . import utilities as ut from . import dataset # ------------------- # CLASSIFICATION # ---------------...
# coding: utf-8 from __future__ import unicode_literals import itertools import json import random import time from .common import InfoExtractor from ..compat import compat_HTTPError from ..utils import ( dict_get, ExtractorError, strip_or_none, try_get ) class RCTIPlusBaseIE(InfoExtractor): def...
#!/usr/bin/env python3 import argparse import json import os import re import sys from typing import List, Optional, Tuple HERE = os.path.dirname(__file__) ALL_PKGS = ["expconf"] URLBASE = "http://determined.ai/schemas" def camel_to_snake(name: str) -> str: """Convert CamelCase to snake_case, handling acronyms ...
import pytest import uuid from django.core.exceptions import ValidationError from django.test.utils import override_settings from unittest import mock from olympia.amo.tests import TestCase, addon_factory from olympia.constants.scanners import ( ABORTED, ABORTING, COMPLETED, CUSTOMS, FALSE_POSITIV...
""" Unit Tests for preprocess module. """ import sys import math import unittest import argparse import numpy import pysam from mixemt import phylotree from mixemt import preprocess # TODO: Stuff to test: # def process_reads(samfile, var_pos, min_mq, min_bq): # def build_em_input(samfile, refseq, phylo, args): cla...
from contextlib import contextmanager from datetime import datetime, timedelta import msvcrt import multiprocessing as mp import os import time import webbrowser import queue import psutil import numpy as np from rlbot import version from rlbot.base_extension import BaseExtension from rlbot.botmanager.bot_manager_flatb...
""" class Image2Pickle This file prepares a pickle dataset using the results the program ImageGen produces. This file processes RGB and normal maps data only. The pickle contains a dict with the following labels: Xtr - the training data set, rgb images of shape (num_images, width, height, channels = 3), uint8 [0,...
#!/usr/bin/python3 # # Venom2 # Copyright (C) 2019 Da-vinci ( <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: # # * Redistributions of source code must retain the above copyright notice...
from __future__ import annotations import collections import contextlib import os import re import threading from ast import literal_eval from collections.abc import MutableMapping from contextlib import contextmanager from typing import Any from typing import Generator from typing import Iterable from typing import I...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import os import sys import copy import json # import numpy import matplotlib matplotlib.use('Agg') from matplotlib import pyplot, rcParams # from mpl_toolkits.mplot3d import Axes3D import plotly import utils rcParams.update({"figure.max_open_w...
import itertools import numpy import six import binascii import time import os from chainer.links import NStepLSTM import chainer.functions as F from chainer import cuda from chainer.functions import lstm from chainer.functions.array import concat from chainer.functions.array import reshape from chainer.functions.ar...
import json from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.properties import StringProperty, NumericProperty from settings_panel import panel_dict from misphere import * class CustBoxLayout(BoxLayout): current_module = StringProperty() camera_ev = NumericProperty() camera_...
"""This file defines the evaluation process of Point-GNN object detection.""" import os import time import argparse import numpy as np import tensorflow as tf from dataset.kitti_dataset import KittiDataset from models.graph_gen import get_graph_generate_fn from models.models import get_model from models.box_encoding...