text
stringlengths
3.07k
22.1k
# <NAME>, IT01, 06-Aug-2021 import csv import os import Game def get_choice_menu() -> str: """ Display the menu and ask for the choice from the user. Returns ------- choice: str The valid choice enter by the user. """ valid_choice_list = ['...
"""Model for self-healing. __author__ = "<NAME>" Nodes represent random variables or relations between variables (originally transfer functions). Each node has a unique name (key). The graph object saves the edges between nodes (u -> v). Furthermore each node can have several properties (or attributes). Each propert...
import logging import warnings from typing import List, Optional import flask from flask import jsonify, request from pydantic import ValidationError from globus_action_provider_tools.authentication import TokenChecker from globus_action_provider_tools.data_types import ( ActionProviderDescription, ActionProv...
from __future__ import print_function import textwrap from os.path import join as pjoin import numpy as np # the order of import is very important to avoid circular imports from neuropredict import __version__, config as cfg from neuropredict.base import BaseWorkflow, get_parser_base, parse_common_args from neuropred...
# Copyright 2021 Google LLC # # 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, s...
#!/usr/bin/env python2 """vncpasswd.py: Python implementation of vncpasswd, w/decryption abilities & extra features ;-)""" from __future__ import print_function __author__ = "<NAME>" __copyright__ = "Copyright 2012-2020, <NAME>" __credits__ = [ '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>' ] __license__ = ...
#!/usr/bin/python3 from House3D import objrender, Environment, House from House3D.house import _equal_room_tp from House3D.objrender import RenderMode import os import csv import cv2 import numpy as np cfg = { "colorFile": os.path.expanduser('~/toolbox/House3D/House3D/metadata/colormap_coarse.csv'), "roomTarg...
import sys import logging import numpy as np from numerix import aslist __all__ = ['solve_system', 'simplemesh', 'display_truss'] DOFS = {'x': 0, 'y': 1, 'z': 2} def solve_system(nodes, vertices, elements, connect, k, bcs, cfs, num_dof_per_node=None, bc_method='default'): '''Computes the depende...
from main.models import Hash, DictionaryPeriodicTask, BruteforcePeriodicTask from main.models import Dictionary, BruteConfig, Database from main.models import OtherPeriodicTask from main.forms import DictionaryPeriodicTaskForm, BruteforcePeriodicTaskForm from main.forms import DatabaseForm from main.admin_filters impor...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Download a single book from Runeberg.org. @TODO: handle volumed works: ocr zip contains no Pages folder; images zip may not exist but r.status_code is still 200; article.lst may contain a list of volumes (see e.g. kok) but unclear if that is standard (see e...
"""Utils module.""" import math import re from pint import UnitRegistry from pint.quantity import _Quantity from shapely.geometry import LineString from sympy import Expr, Symbol, cacheit from sympy.core.assumptions import StdFactKB from sympy.core.logic import fuzzy_bool from sympy.printing import StrPrinter def af...
# -*- coding:utf-8 -*- # Created Time: Thu 05 Jul 2018 10:00:41 PM CST # Author: <NAME> <<EMAIL>> from config import cfg import torch import torchvision import torch.nn as nn from torch.autograd import Variable from torch.nn.parameter import Parameter import torch.nn.functional as F from torchvision import transforms ...
# # Copyright (C) 2020 Nintendo Homebrew # # 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 w...
# The GUI for running the data logger for each project. As the GUI does not vary by project, # the logger runner is simply injected into this GUI. import json import os import queue import threading import time import tkinter from tkinter import * from networktables import NetworkTables from frc_characterization.uti...
''' This file is an implementation of the following paper: Deep High-Resolution Representation Learning for Visual Recognition, 2020 https://arxiv.org/pdf/1908.07919.pdf Learning Temporal Pose Estimation from Sparsely-Labeled Videos, 2019 https://arxiv.org/pdf/1906.04016.pdf By <NAME> ''' import torch fro...
#!/usr/bin/env python # # origin https://github.com/mrschyte/nmap-converter # # edit by dajinsique 2019-3-16 from libnmap.parser import NmapParser, NmapParserException from xlsxwriter import Workbook from datetime import datetime import os.path def generate_summary(workbook, sheet, report): summary...
import torch import torch.nn as nn from transformers import BertPreTrainedModel from models.vilmodel_cmt import ( BertLayerNorm, BertEmbeddings, ImageEmbeddings, HistoryEmbeddings, LxmertEncoder, NextActionPrediction, ) class ObjectEmbeddings(nn.Module): """Construct the embeddings from image, spati...
# coding=utf-8 # Copyright 2022 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...
""" # -- --------------------------------------------------------------------------------------------------- -- # # -- T-Fold-SV is Time Series Folds for Sequential Validation, the go to alternative for K-Fold-CV -- # # -- ------------------------------------------------------------------------------------------...
#!/usr/bin/env python # 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,...
from __future__ import absolute_import import numpy as np from .Node import Op from .._base import DNNL_LIB from ..cpu_links import max_pool as cpu_max_pooling from ..cpu_links import max_pool_gradient as cpu_max_pooling_gradient from ..gpu_links import CuDNN_max_pooling2d from ..gpu_links import CuDNN_max_pooling2d_gr...
#!/usr/bin/env python #Copyright (C) 2013 by <NAME> # #Released under the MIT license, see LICENSE.txt #!/usr/bin/env python """Attempt to automate neutral model estimation from 4d sitesfor phyloP. """ import argparse import os import sys import copy import subprocess import time import math import glob import random...
# Modelling my code after https://github.com/Max00355/SpaceInvaders to jump into pygame import pygame from pygame.locals import * import sys import random import math class Block: def __init__(self, position, size, sprite): self.pos = position self.size = size self.rect = pygame.Rect(position,...
import numpy as np import pandas as pd import inspect from .parameters import default_data from numba import jit, vectorize, guvectorize from functools import wraps from six import StringIO import ast import toolz class GetReturnNode(ast.NodeVisitor): """ A Visitor to get the return tuple names from a calc-st...
# Virtual memory analysis scripts. # Developed 2012-2014 by <NAME>, <EMAIL> # Copyright (c) 2012-2014 <NAME> and University of Washington # Dedup benchmark (from parsec). # # Build + setup instructions: do these once / occasionally by hand, not # done automatically by this script. # cd to parsec-3.0 directory (in c...
# from .../packages import get_data_info import tkinter as tk from tkinter import ttk import json import os """ Initialising typefonts and vals list """ LARGE_FONT = ("Verdana", 12) NORMAL_FONT = ("Verdana", 10) SMALL_FONT = ("Verdana", 8) vals = [] for position in range(7): vals.append(position) # print vals...
import csv import re from collections import defaultdict from nameparser import HumanName from names_dataset import NameDataset from squad_pl import DATA_DIR from squad_pl.doc2vec.utils import polish_nlp from squad_pl.translate.translate_answers import load_google_answer_translations from squad_pl.translate.utils imp...
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split import os osp = os.path import torch import torch.optim as optim import torch.optim.lr_scheduler as lrs from torch.utils.data.sampler import SubsetRandomSampler import torchvi...
# =============================================================================== # Copyright 2022 ross # # 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/LICE...
# -*- coding: utf-8 -*- # This work is part of the Core Imaging Library developed by # Visual Analytics and Imaging System Group of the Science Technology # Facilities Council, STFC # Copyright 2018 <NAME>, <NAME> and <NAME> # Licensed under the Apache License, Version 2.0 (the "License"); # you may not u...
import collections import numbers import numpy as np from brian2.core.variables import (Variables, Subexpression, get_dtype) from brian2.groups.group import Group, CodeRunner from brian2.utils.logger import get_logger from brian2.units.fundamentalunits import Unit, Quantity from brian2.units.allunits import ...
from os import name import discord from discord import message from discord import embeds from discord import mentions from discord.ext import commands import aiosqlite from discord_components import Button, ButtonStyle, SelectOption, Select, component import discord_components import os import psutil import random i...
#Copyright (c) 2022 <NAME>: Avoiding Negative Side Effects #in Reinforcement Learning Authors #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 t...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Feb 16 16:17:19 2021 @author: <NAME> An interactive plot to examine the position, velocity, and acceleration of a simple harmonic oscillator. Also, include the representation of these three quantities in the complex plane """ import numpy as np impo...
from typing import Iterable, Dict, Optional, List, Tuple import numpy as np from . import rawdata as rwd from . import smalltype as smt from . import byteutils as byt NUM_JOINTS_PER_VERTEX = 4 def _make_joints_id_map(skeleton: rwd.Scene.Skeleton) -> Dict[str, int]: result = dict() for i, joint in enumera...
# -*- coding: utf-8 -*- # (c) The James Hutton Institute 2013-2019 # (c) University of Strathclyde 2019 # Author: <NAME> # # Contact: # <EMAIL> # # <NAME>, # Strathclyde Institute for Pharmacy and Biomedical Sciences, # Cathedral Street, # Glasgow, # G1 1XQ # Scotland, # UK # # The MIT License # # Copyright (c) 2013-20...
import multiprocessing import threading import math import os import cv2 import numpy from logger import logger import re import operator def distribute(f, obj, targets, use_threading=False): numprocs = int(multiprocessing.cpu_count()) queue = multiprocessing.Queue() total = len(targets) chunksize = i...
import numpy as np from functools import reduce,partial from scipy import stats from copy import deepcopy as copy import sys import traceback from timeit import default_timer as dt from hqca.core import * from hqca.tools import * from hqca.operators import * from hqca.tomography._reduce_circuit import simplify_tomograp...
#!/usr/bin/env python # Author: <NAME> (t-sigai at microsoft dot com)) import os import math import cv2 import numpy as np import matplotlib.pyplot as plt from matplotlib import cm as __cm__ from matplotlib.ticker import LinearLocator as __LinearLocator__ from matplotlib.ticker import FormatStrFormatter as __FormatStr...
# ------------------------------------------------------------------------ # SeqFormer data loader # ------------------------------------------------------------------------ # Modified from Deformable VisTR (https://github.com/Epiphqny/VisTR) # ------------------------------------------------------------------------ ...
## # Copyright © 2020, The Gust Framework Authors. All rights reserved. # # The Gust/Elide framework and tools, and all associated source or object computer code, except where otherwise noted, # are licensed under the Zero Prosperity license, which is enclosed in this repository, in the file LICENSE.txt. Use of # this ...
#!/usr/bin/env python # encoding: utf-8 # # Copyright SAS Institute # # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
# Copyright (c) 2010 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import re import subprocess import os try: from internal import internal_presubmit except ImportError: internal_presubmit = None SOURCE_FILE_EXTEN...
import os import copy from copy import deepcopy import numpy as np import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages from mpl_toolkits.mplot3d import Axes3D # pytorch import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim # nitorch from nitorch....
# Copyright 2021 The NetKet 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 json import math from collections import Counter from biosql.models import Term from django.db.models import Q, Count from django.http import HttpResponseBadRequest from django.shortcuts import render from .io.PhenoGenoTable import PhenoGenoTable from .models import Variantcollection, Phenotype, Genotype, Assa...
import os import argparse import torch import models as model import TargetNetworkTraining as train from DistillDataSet import DistillDisDataset from torch.utils.data import DataLoader from utils.utils import set_seeds, _get_device from utils import configuration import torch.optim as optim import torch.nn.functional ...
#!/usr/bin/env python import os import numpy as np from mtuq.grid_search import grid_search from mtuq.grid import Normal_Samples_MT import cartopy from mtuq.graphics import Hammer import matplotlib.pyplot as plt from mtuq.util.math import to_delta_gamma def linear_transform(i, a, b): transformed = a + (b-a) * i /...
import pymel.core as pymel import collections from omtk.core.classModule import Module from omtk.core.classCtrl import BaseCtrl from omtk.core import constants from omtk.core.utils import decorator_uiexpose from omtk.modules import rigIK from omtk.modules import rigFK from omtk.modules import rigTwistbone from omtk.lib...
import numpy as np __author__ = "__Girish_Hegde__" def points_above_planes(points, vertices, normals, ): """ Function to check if points are above/below given planes. It can be used for checking points inside/outside polyhedron. author = "<NAME>' contact = "<EMAIL>" Args: ...
# coding: utf-8 # # Read Data Sample # In[1]: import pandas as pd import numpy as np import os from collections import namedtuple pd.set_option("display.max_rows",100) #%matplotlib inline # In[2]: class dataset: kdd_train_2labels = pd.read_pickle("dataset/kdd_train_2labels.pkl") kdd_test_2labels = pd.rea...
# SOURCE: https://github.com/pybind/python_example (6.07.2020) from setuptools import setup, Extension from setuptools.command.build_ext import build_ext import sys import setuptools import pathlib import os from datetime import datetime, timezone from git import Repo import re def info_write(): now = datetime.n...
import torch import torch.nn as nn from torch.autograd import Variable try: from NAS import operations except ImportError: import operations try: from NAS import utils except ImportError: import utils class Cell(nn.Module): def __init__(self, genotype, C_prev, ...
import os, glob import numpy as np import cv2 import cst import palette ROOT_DATA_DIR = '/mnt/lake/' def cmp_mask(survey_id, seq_start, seq_end): out0_root_dir = 'res/%d_0'%survey_id out1_root_dir = 'res/%d_1'%survey_id out_root_dir = 'res/%d'%survey_id img_dir = '%s/Dataset/20%d/%d/'%(ROOT_DATA_DI...
#!/usr/bin/python # -*- coding: utf-8 -*-### # Copyright (2018) 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/LI...
import numpy as np import warnings try: import cvxpy as cvx cvx_available = True except ImportError: warnings.warn('Cannot import cvxpr. Some sparse recovery based estimators will not be usable.') cvx_available = False class L1RegularizedLeastSquaresProblem: r"""Creates a reusable :math:`l_1`-regul...
from tkinter import LEFT,RIGHT,PhotoImage,Tk from tkinter.ttk import Label,Frame,Button,Treeview,Scrollbar import tkinter.font as tkFont from scraper import * #sets the initial mode of app mode="app" #sets initial theme of app theme="light" #put the path of the directory where the data file will be stored path="C:\\U...
"""Dimensions related to time""" import datetime import pytz from dsgrid.data_models import DSGEnum, EnumValue class TimeDimensionType(DSGEnum): """Defines the supported time formats in the load data.""" DATETIME = "datetime" ANNUAL = "annual" REPRESENTATIVE_PERIOD = "representative_period" NOOP...
'''App ======== The base App class for cplcom. ''' import os import inspect import sys import json import logging from functools import wraps from configparser import ConfigParser from os.path import dirname, join, isdir if not os.environ.get('KIVY_DOC_INCLUDE', None): from kivy.config import C...
__author__ = "<NAME>" # This is a stand-alone file which we ran once; it is not part of our framework. # from .practnlptools import Annotator # To run this program, practNLPTools has to be installed. If it is not, # the installation of our framework will fail, as the import cannot be executed. # Therefore, it is igno...
from __future__ import absolute_import from __future__ import unicode_literals import contextlib import functools from dumbconf import ast from dumbconf._tokenize import tokenize from dumbconf._tre import get_pattern from dumbconf._tre import matches_pattern from dumbconf._tre import Or from dumbconf._tre import Patt...
from pathlib import Path import os from typing import Union from ..basesorter import BaseSorter from ..kilosortbase import KilosortBase from ..utils import get_git_commit PathType = Union[str, Path] def check_if_installed(kilosort2_path: Union[str, None]): if kilosort2_path is None: return False ass...
''' Created on Jul 11, 2014 @author: Chris ''' from demoinfocsgo.demofile import DemoFile, DemoMessage from demoinfocsgo.proto.netmessages_pb2 import * from demoinfocsgo.proto.cstrike15_usermessages_pb2 import * import struct _GAMEEVENT_TYPES = {2:"val_string", 3:"val_float", 4:"...
from operator import itemgetter from difflib import SequenceMatcher from bs4 import BeautifulSoup #from datetime import date import unicodedata, os, sys, requests, xlrd, re, random class date: def __init__(self,day,month,year): self.day = day self.year = year self.month = month def sub ...
import requests as req import string import binascii import itertools import sys from termcolor import colored import colorama import socket import time #subsearcher exploit def subsearcher(obj): try: colorama.init() ur = str(input("Target url : ") or "https://www.github.com/") ...
import os import sys import time import glob import numpy as np import pickle import torch import logging import argparse import functools import random from maskrcnn_benchmark.modeling.detector.generalized_rcnn import GeneralizedRCNN from maskrcnn_benchmark.config import cfg from maskrcnn_benchmark.utils.logger impor...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Parsing of a csv game tracking sheet of type 'X', saving data in consice and relevant manner.""" # Here comes your imports import sys import logging as log import pandas as pd # Here comes your (few) global variables # Here comes your class definitions # Here comes...
""" """ # Built-in # Libs # Pytorch import torch from torch import nn from torch.nn import functional as F # Own modules from mrs_utils import misc_utils from network.backbones import encoders from network import base_model, emau, ocr class ConvDownSample(nn.Module): """ This module defines conv-downsam...
import argparse import json import os import pandas as pd import numpy as np import re from pomegranate import DiscreteDistribution, ConditionalProbabilityTable, Node, BayesianNetwork from .. import utils def map_col(index2str, values): mapper = dict([(k, v) for v, k in enumerate(index2str)]) return [mapper[i...
import tracemalloc import numpy as np import quantities as pq from elephant.spike_train_generation import homogeneous_poisson_process import matplotlib.pyplot as plt from online_statistics import OnlineMeanFiringRate, OnlineInterSpikeInterval, \ OnlinePearsonCorrelationCoefficient def omfr_plot_memory_benchmark_...
from datetime import datetime from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404 from django.urls import reverse from django.http import HttpResponse, HttpResponseRedirect from django.template import loader from django.utils.translation import gettext_lazy as _ from...
"""Helper functions for creating Form classes from SQLAlchemy models.""" from collections import OrderedDict from contextlib import suppress from itertools import chain from django.core.exceptions import ( NON_FIELD_ERRORS, ImproperlyConfigured, ValidationError, ) from django.forms import ALL_FIELDS from d...
import math from necrobot.database import matchdb, racedb from necrobot.util import console, racetime from necrobot.stats.leaguestats import LeagueStats from necrobot.util.character import NDChar from necrobot.util.singleton import Singleton class CharacterStats(object): def __init__(self, ndchar): self...
import os import openslide from PIL import Image from PIL import ImageCms import traceback as tb import base64 import json from urllib.parse import urljoin import re from io import BytesIO import logging logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) API_URL...
"""All necessary calculations in pre_simulate() """ import os import logging from energy_demand.read_write import data_loader from energy_demand.basic import basic_functions from energy_demand.scripts import init_scripts from energy_demand.read_write import write_data from energy_demand.assumptions import general_assu...
""" evaluate value net on labeled games Motivation: in self-play, it might be better to score end-position w/ value net. So we want to monitor how value net performs over time. For simplicity, just look at win/loss accuracy (since many games has no margin result) - accuracy at different game stages: every 10 moves? -...
from db import load_dump from lib import common from lib import make_diary user_info = {} def check_power(power='user'): # 登录功能的装饰器 def login_doc(func): def inner(*args, **kwargs): if user_info: res = func(*args, **kwargs) return res while True: ...
import pandas as pd import os # principal_amount = float(input ("Enter the principal amount of loan: ")) # annual_rate = float(input("Enter the annual interest rate as a decimal: ")) # num_years = float(input("Enter the number of years of the loan: ")) # extra_monthly = float(input("Enter the amount of extra monthly p...
#!/usr/bin/env python # encoding: utf-8 # # Copyright SAS Institute # # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
""" Gated implementations GatedConv2D: Introduce a Conv2D layer (same number of filters) to multiply with its sigmoid activation. FullGatedConv2D: Introduce a Conv2D to extract features (linear and sigmoid), making a full gated process. This process will double number of filters to make one...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# File: DictMethodRunnerTests.py # Author: <NAME> # Date: 18-Aug-2018 # Version: 0.001 # # Update: # 12-Nov-2018 jdw add chemical component and bird chemical component tests # 5-Jun-2019 jdw revise for new method runner api # 16-Jul-2019 jdw remove schema processing. ## """ Tests for applying dictionar...
import boto3 from PIL import Image import os import io import uuid import shutil import mimetypes # You should chance these variables collection_id='Faces4Photoprism' # doesn't matter, name it what you like collection_filename="./collection.txt" # we store all faces sent to AWS Rekognition locally so we don't...
import sys, os from argparse import Namespace from copy import deepcopy from PyQt4.QtCore import * from PyQt4.QtGui import * class Workbench_Tablewidget(QTableWidget): """ A Tablewidget which supports Drag and Drop for internal move (Drag/Drop by moving vertical Headers or Rows) You also can call "moveUp"...
import itertools from collections import OrderedDict from collections.abc import Iterable from typing import Generic from tqdm import tqdm from prefix_codes.codecs.base import T from prefix_codes.codecs.shannon_fano_elias import ShannonFanoEliasCodec, ModelType from prefix_codes.typedefs import BitStream, Bit from pr...
import sys sys.path.append('./proto') from concurrent import futures from threading import Thread import grpc import db import fileService_pb2_grpc import fileService_pb2 import time import threading from ClusterStatus import ClusterStatus _ONE_DAY_IN_SECONDS = 60 * 60 * 24 class FileServer(fileService_pb2_g...
import os import numpy as np import matplotlib.pyplot as plt # from Evaluation.read_bb_files import read_box_MIDV2020_gt_templates # from Evaluation.read_bb_files import read_box_MIDV2020_pred_templates # from Evaluation.read_bb_files import read_box_MIDV2020_gt # from Evaluation.read_bb_files import read_box_MIDV2020...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (c) 2010-2015 <NAME>. All rights reserved. """ import sys import argparse import os import random import numpy as np from collections import defaultdict HOME_FOLDER = os.path.dirname(sys.argv[0]) NAME_DATA_FOLDER = "namedata" GREEK_ALPHABET = """Alpha B...
from UbikPeerLLAError import UbikPeerLLAError import re SyncRX=re.compile("Sync host (.*) was set (\d+) secs ago") SyncRX2=re.compile("I am sync site until (\d+) secs from now \(at (.*)\) \((\d+) servers\)") LocalCloneRX=re.compile("I am a clone and never can become sync site") NotSyncRX=re.compile("I am not sync site...
# -*- coding: utf-8 -*- import os import click import logging from pathlib import Path from dotenv import find_dotenv, load_dotenv import pandas as pd import numpy as np from tqdm import tqdm from sklearn.impute import SimpleImputer from sklearn.preprocessing import OneHotEncoder, StandardScaler from sklearn.model_sel...
"""Parse logs from experiments in deprecated format and summarise in new format. There are two types of "old" logs: 1. v1 of the code directly used tensorboard event files, rather than text files, so to extract logs from these experiments we need to parse the tensorboard event files. 2. v2 of the code switched to u...
# -*- coding: utf-8 -*- import multiprocessing.dummy as mp import os import random from multiprocessing import cpu_count from shutil import copyfile, move from tempfile import gettempdir from time import sleep from odoo import api, fields, models class MusicConverter(models.Model): _name = "oomusic.converter" ...
from collections import namedtuple from ctypes import c_int, c_double, c_bool from functools import reduce from heapq import nsmallest from multiprocessing import Array, Value, Pool from typing import Callable, Optional, Union, List from pygosolnp.evaluation_functions import evaluate_starting_guess, pysolnp_solve, ini...
import arrow import pyotp from sqlalchemy import event, UniqueConstraint from sqlalchemy_utils.types import ArrowType from sqlalchemy.orm import relationship from flask_login import UserMixin from flask import session from .database import db try: basestring except NameError: basestring = str class Profile...
import datetime as dt import sqlite3 from os import listdir import numpy as np import pandas as pd import math """ ISSUES 12-15 NCATS_DEMOGRAPHICS and visit details - not even there X Diagnoses ok ACT Labs doesn't show up after "full list" ACT Laboratory Tests no show at all ACT Meds can't drill into X Procedures ok ...
from urllib.request import urlopen from urllib.parse import urlencode from argparse import ArgumentParser from mutagen import id3, File from datetime import datetime from os import path, remove, chdir, makedirs, system, getcwd, mkdir from sqlite3 import connect, Row from shutil import copy from json import loads from s...
import numpy as np import pandas as pd import swap import matplotlib.pyplot as plt def logit(x): return np.log(x / (1 - x)) def inv_logit(x): return 1. / (1 + np.exp(-x)) def fig_maker(col, xkey, lims): ykey = xkey + '_online' zkey = xkey + '_alldata' fig, axs = plt.subplots(nrows=2, ncols=2, fig...
from flask import request, jsonify, make_response, Blueprint from werkzeug.security import generate_password_hash, check_password_hash from functools import wraps import os import sys from app import app import datetime from functools import wraps import jwt import re from app.models2 import User,Requests ...
"""Base Client containing shared functionality for all clients""" # pylint: disable=too-few-public-methods, too-many-arguments from uuid import UUID from functools import wraps from formencode import Invalid from launchkey.entities.shared import PublicKey from ..utils.shared import iso_format from ..entities.service...