content
stringlengths
5
1.05M
from cyder.cydns.urls import cydns_urls urlpatterns = cydns_urls('nameserver')
############### # Exploration # ############### EXPLORAION_POLICY = "epsilon-greedy" INITIAL_COLLECT_STEPS = 0 START_EXPLORATION_RATE = 0.5 END_EXPLORATION_RATE = 0.005 FINAL_EXPLORATION_TIMESTEP = 5000 ########## # Models # ########## # Global parameters shared between models EPOCHS = 3 BATCH_SIZE = 16_000 MINIBAT...
""" This module contains the JSON domain objects. Domains specify the set of valid values for a field. """ import json ######################################################################## class CodedValueDomain(object): """ Coded value domain specifies an explicit set of valid values for a field. Each v...
import random as rnd from PIL import Image, ImageColor, ImageFont, ImageDraw, ImageFilter def generate( text, font, text_color, font_size, orientation, space_width, character_spacing, fit, word_split ): if orientation == 0: return _generate_horizontal_text( text, font, text_color, font_si...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_bddconf ---------------------------------- Tests for `bddconf` module. """ from collections import OrderedDict import pytest from bddconf import bddconf import dd.autoref as _bdd INFILE = "tests/test_shirts.xlsx" @pytest.fixture() def configuration(): co...
#!/usr/bin/env python ##### -*- coding: cp1252 -*- #Extension import os try: from madgraph.madweight.MW_fct import * import madgraph.madweight.diagram_class as diagram_class import madgraph.madweight.mod_file as mod_file import madgraph.madweight.Cards as Cards import madgraph.various.misc as misc...
# -*- coding: utf-8 -*- """ Created on Mon July 01 16:01:36 2019 GTOS data loader @author: jpeeples """ import os from PIL import Image from torch.utils.data import Dataset import pdb import torch class GTOS_mobile_single_data(Dataset): def __init__(self, texture_dir, train = True,image_size = 256, img_transfor...
from django.contrib import admin from .models import * # Register your models here. admin.site.register(User) admin.site.register(AuctionListing) admin.site.register(Bids) admin.site.register(Comments) admin.site.register(Watchlist)
from VTree.timeseries.Timeseries import Timeseries from VTree.timeseries.Sample import Sample
#!/usr/bin/env python import threading class Thread( threading.Thread ): def __init__( self, target=None, threadID=None, name="", args=(), kwargs={} ): super( Thread, self ).__init__() self.threadID = threadID self.name = name self.target = target self.arg...
class BattingStats: def __init__(self, cursor): self.cursor = cursor def insert(self, batsman_id, match_id, innings_num, runs_scored, balls_played, num_fours, num_sixes, team_id): sql = """INSERT INTO batting_stats VALUES (%s, %s, %s, %s, %s, %s, %s, %s)""" self.cursor.execute(sql, ...
import itertools ## Remove Blank lines # read text file #filename ='data_60_4km_D_002.txt' #filename='procD_n604km_002.txt' #filename ='D_merg2.txt' #filename ='5lay_3.0_.txt' #filename ='invResult_0315_DAS.txt' filename ='invResult_0318_DAS.txt' #filename = 'merge_3km_3lay_4.txt' with open(filename, 'r') as myfile: ...
from .discrete_family import discrete_family from .intervals import intervals_from_sample
# SPDX-License-Identifier: Apache-2.0 import logging import os import sys import time from flask import Flask, request, g, jsonify from dateutil.parser import parse import sqlite3 import json app = Flask(__name__) DATABASE = "/app/tmp.db" logging.basicConfig( format="[%(asctime)s] {%(pathname)s:%(lineno)d} %(l...
from pyparsing import Combine, LineEnd, Literal, Optional, Suppress, Word, alphanums urn_word = Word(alphanums + "_$?=%.&,") ge_metrics_urn = Combine( Suppress(Literal("urn:great_expectations:")) + Literal("metrics").setResultsName("urn_type") + Suppress(":") + urn_word.setResultsName("run_id") + S...
# noinspection PyUnusedLocal import time from utils import MainLoader class MockedMixer: """Used to run on windows, there is no ALSA sound on windows""" def __init__(self): self.__vol_in: int = MainLoader.get("MIXER_IN", 30) self.__vol_out: int = MainLoader.get("MIXER_OUT", 100) def fad...
import requests import re from bs4 import BeautifulSoup elements = [ "achilles", "acid-rain", "aegis", "aeolus", "airplane", "alarm-clock", "alchemist", "alcohol", "algae", "alien", "allergy", "alligator", "alpaca", "ambulance", "angel", "angler", "animal", "ankh", "ant", "ant-farm", "antarctic...
import abc class BaseRunner(abc.ABC): '''基础的runner 方便在以后进行不同编排框架的拓展,现在先做好kubeflow ''' def __init__(self): pass @abc.abstractmethod def deploy(self, pipeline): """将一个pipeline部署在某个编排框架里 """ pass
from .ramscube import loadramscube,deriveramscube,load #, load #from ramscube.ramscube import calculate_wrf_LWP_fromcubes,calculate_wrf_IWP_fromcubes,calculate_wrf_IWV_fromcubes,integrate_cube
from ethereumetl.executors.batch_work_executor import BatchWorkExecutor from blockchainetl.jobs.base_job import BaseJob from ethereumetl.utils import validate_range from ethereumetl.mappers.receipt_log_mapper import EthReceiptLogMapper from ethereumetl.mappers.origin_mapper import OriginMarketplaceListingMapper, Origi...
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer import requests import os import json import traceback import logging from urlparse import urlparse from requests.models import Response from SocketServer import ThreadingMixIn import __init__ from localstack.utils.common import FuncThread QUIET = False #...
from CameraRL.Camera import Camera import airsim import numpy as np import os import cv2 import datetime from CameraRL.record import Record from PIL import Image class DepthVision(Camera): """ You get an image that helps depth visualization Each pixel value is interpolated from black to white depending ...
"""Utilities to support creation of Hubble Advanced Pipeline(HAP) products. """ import sys import os import shutil import numpy as np from astropy.io import fits as fits from astropy.io.fits import Column from astropy.time import Time from stsci.tools import logutil from stsci.tools.fileutil import countExtn from st...
import logging from typing import Dict, Tuple from qtoggleserver.core import events as core_events from qtoggleserver.core import ports as core_ports from qtoggleserver.core.typing import Attribute, Attributes, NullablePortValue from qtoggleserver.lib import filtereventhandler from qtoggleserver.slaves import device...
import hashlib print ("generate nilai has") IkiString = "fitor bogi irawan" nilaihash=hashlib.sha512() hexsha512=nilaihash.hexdigest() print("nilai has SHA512 dugi String" +IkiString+ "adalah" +hexsha512.upper())
import logging from datetime import datetime from itertools import chain, combinations from functools import reduce from collections import defaultdict from pymatgen import Structure, Composition from pymatgen.entries.compatibility import MaterialsProjectCompatibility from pymatgen.entries.computed_entries import Comp...
while True: N = int(input('')) if N == 0: break else: print('%d' %((N*(N+1)*((2*N)+1))/6))
"""A script to save a Keras Model as a TensorFlow protobuf file""" # General imports import os import argparse # ML imports from keras import backend as K from keras.models import load_model import tensorflow as tf from tensorflow.python.framework import graph_util from tensorflow.python.framework import graph_io # ...
""" scaffoldgraph.analysis.frequency """ import numpy as np def cumulative_scaffold_frequency( scaffoldgraph, hierarchy=-1, norm_hierarchy=False, frequency_key=None ): """Calculate cumulative scaffold frequency distrubutions (CSF) from a scaffold graph. Parameters ---...
import os from docutils.parsers.rst import Directive, directives from docutils import nodes from sphinx.util.osutil import copyfile from sphinx.util import logging class PlatformPickerDirective(Directive): has_content = True def run(self): self.assert_has_content() text = "\n".join(self.conte...
#!/usr/bin/env python3 ######################################################################## # Filename : RPi-9-display7S1DKeypad.py # Description : Controla un Display de 7 Segmentos y 1 digito con un Keypad. # Author : jcondea # modification: 2020/10/06 ####################################################...
# -*- coding: utf-8 -*- from importlib import import_module from twisted.internet.defer import Deferred from twisted.web.client import getPage def load(method_path): module_name, method_name = method_path.rsplit('.', 1) module = import_module(module_name) return getattr(module, method_name) def get_page(h...
import logging import pytest import botocore.exceptions as boto3exception import json import uuid from ocs_ci.framework import config from ocs_ci.ocs.exceptions import ( NoBucketPolicyResponse, InvalidStatusCode, UnexpectedBehaviour, ) from ocs_ci.framework.testlib import MCGTest, tier1, tier2, tier3, ski...
import random from typing import List, Union from ._docker_service import DockerService __all__ = ("docker_port", "docker_ports",) _docker_service = DockerService() def docker_ports(name: str, port: Union[str, int]) -> List[int]: return _docker_service.get_host_ports(name, port) def docker_port(name: str, po...
# coding: utf-8 """ Memsource REST API Welcome to Memsource's API documentation. To view our legacy APIs please [visit our documentation](https://wiki.memsource.com/wiki/Memsource_API) and for more information about our new APIs, [visit our blog](https://www.memsource.com/blog/2017/10/24/introducing-rest-apis...
from __future__ import print_function import sys, os from h2o.exceptions import H2OJobCancelled sys.path.insert(1, os.path.join("..","..","..")) from h2o.automl import H2OAutoML from tests import pyunit_utils as pu from _automl_utils import import_dataset, get_partitioned_model_names max_models = 2 def test_early...
def verify(self, key): global score score = 0 check_digit = key[2] # check digit key check_digit_2 = key[8] count_1 = 0 # check digit count count_2 = 0 # get the chunks by using the split method and use a for loop to check the digit chunks = key.split("-") print(chunks) for ch...
import os from argparse import ArgumentParser, Namespace import yaml from multiprocessing import cpu_count ''' Get argument values from command line Here we speficy different argument parsers to avoid argument conflict between initializing each components ''' def get_general_args(args=None): ''' General argum...
# empty dictionary my_dict = {} # dictionary with integer keys my_dict = {1: 'apple', 2: 'ball'} print(my_dict) # dictionary with mixed keys my_dict = {'name': 'John', 1: [2, 4, 3]} print(my_dict) # using dict() my_dict = dict({1:'apple', 2:'ball'}) print(my_dict) # from sequence having each item as a pair my_dict = d...
import os import mock import pytest from datadog_checks.dev import docker_run, get_here from .common import INSTANCE_URL HERE = get_here() DOCKER_DIR = os.path.join(HERE, 'docker') @pytest.fixture(scope='session') def dd_environment(): compose_file = os.path.join(DOCKER_DIR, 'docker-compose.yaml') with d...
import os import unittest.mock from pathlib import Path import pytest from determined_common import check, storage from determined_common.storage import shared from tests.storage import util @pytest.fixture() def manager(tmp_path: Path) -> storage.SharedFSStorageManager: return storage.SharedFSStorageManager(st...
from pliers.utils.updater import check_updates from tempfile import NamedTemporaryFile import pandas as pd def test_updater(): datastore_file = NamedTemporaryFile().name # Run updater once results = check_updates([('BrightnessExtractor', {})], datastore=datastore_file) asser...
from .client import WebhookClient
import math import PIL.Image from torchvision import transforms CROP_SCALE_RANGE = (0.5, 1.0) MAX_ROTATION = 5 MAX_BRIGHTNESS_JITTER = 0.2 MAX_CONTRAST_JITTER = 0.2 MAX_SATURATION_JITTER = 0.2 MAX_HUE_JITTER = 0.1 denormalize_transform = transforms.Compose([ transforms.Normalize(mean=[0, 0, 0, 0], ...
#Driver dummy class to mimic data acquisition #Two flavors: #1) Data Acq driver. Gives a list of Pulses #2) Laser grid driver. Accepts a list of Lights to light from globals import * from datastructures import * import numpy import mc import os import sqlite3 import random from matplotlib import pyplot as plt class D...
#!/usr/bin/env python3 # encoding: utf-8 # versions: 3.8.2 # third-party modules import matplotlib.pyplot as plt import numpy as np import pandas as pd values = np.array([ [ 14, 141, 150, 252], [ 77, 217, 230, 252], [ 21, 120, 137, 252], [ 77, 208, 224, 252], [ 91, 221, 240, 252], [164, 218, ...
import itertools import logging import os import sys from urllib.parse import urlsplit import psycopg2 logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) FIRST_FORWARD = """ BEGIN; CREATE TABLE migration_history ( name TEXT NOT NULL, time TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL, who TEXT DEFAULT ...
""" Refactored so more suitable for sharded daily qfq data table """ import sys import time import datetime import logging from sqlalchemy.exc import IntegrityError import AY.Crius.Utils.configuration_file_service as config_service import AY.Crius.Utils.DB_utils as dbUtil import pandas as pd import tushare as ts fro...
from sqlalchemy import Column, Integer, String, ForeignKey, DateTime from sqlalchemy.orm import relationship from MapMyNotesApplication import database from MapMyNotesApplication.models.module_code import ModuleCode """ Extends SQLAlchemy Model """ class NoteMetaData(database.Model): __tablename__ = "notes_meta...
def bubble(): a=[1,2,5,7,9,0,3] k=0 while k<=len(a): for j in range(0 , len(a)-1): b=a[j] c=a[j+1] if a[j]>a[j+1]: a[j]=c a[j+1]=b k=k+1 return a print(bubble()) def select...
from distutils.core import setup setup( name='WebChangeStopMotion', description='Watch file system for changes, to trigger a snapshot of a webpage', version='0.2.0', author='Steve Avery', author_email='schavery@gmail.com', scripts=['wcsm'], license='LICENSE.txt', install_requires=[ "argparse >= 1.4.0", "be...
"""Ensure that alternate GO IDs are in the go-basic.obo DAG go2obj dictionary.""" from goatools.base import get_godag def test_alt_id(): """Ensure that alternate GO IDs.""" obo_dag = get_godag("go-basic.obo") alt_ids = get_altids(obo_dag) obo_goids = obo_dag.keys() obo_goids_set = set(obo_goids) ...
############################################################# ## ## ## Copyright (c) 2003-2017 by The University of Queensland ## ## Centre for Geoscience Computing ## ## http://earth.uq.edu.au/centre-geoscience-computing ## ## ...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from setuptools import setup description = """SMAC - StarCraft Multi-Agent Challenge SMAC offers a diverse set of decentralised micromanagement challenges based on StarCraft II game. In these challen...
# =============================================================================== # # # # This file has been generated automatically!! Do not change this manually! # # ...
import os from os.path import basename, splitext import json import logging logger = logging.getLogger('ircpuzzles') from channel import Channel class Puzzle(object): def __init__(self, id): """Initialize puzzle definition.""" self.id = id self.name = None self.creator = None ...
from django.shortcuts import redirect from core.models import MigrationInformation class MigrationRedirectMiddleware: """Attempt to redirect from migrated WordPress URLs to new Pipeline URLs on 404.""" def __init__(self, get_response): self.get_response = get_response def __call__(self, request...
# -*- coding: utf-8 -*- # Copyright (c) 2018-2020 Christiaan Frans Rademan <chris@fwiw.co.za>. # 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 ...
#!/usr/bin/env python # encoding: utf-8 """ """ __author__ = 'sreworks' from models.db_session import db class BaseService(object): def __init__(self): self.db = db self.db_session = db.session
# Lint as: python3 # Copyright 2019 DeepMind Technologies Limited. 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 # # ...
""" This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. User preferences mapper. """ from sqlalchemy.orm import relationship from everest.repositories.rdb.utils import mapper from thelma.entities.user import User...
# -*- coding: utf-8 -*- import copy from picklable_itertools.extras import equizip from theano import tensor from ..base import application, lazy from ..parallel import Fork from ..simple import Initializable, Linear from .base import BaseRecurrent, recurrent class Bidirectional(Initializable): """Bidirectional...
# MIT License # # Copyright (c) 2020 MiscellaneousStuff # # 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...
import warnings from typing import Optional import scrapy from scrapy.exceptions import ScrapyDeprecationWarning from scrapy.utils.request import request_from_dict as _from_dict warnings.warn( ("Module scrapy.utils.reqser is deprecated, please use request.to_dict method" " and/or scrapy.utils.request.reques...
import pkg_resources __title__ = "housekeeper" __version__ = pkg_resources.get_distribution(__title__).version
from rest_framework import routers from todolist.viewsets import ArticleViewSet router = routers.DefaultRouter() router.register('article', ArticleViewSet)
""" Django settings for medtour project. Generated by 'django-admin startproject' using Django 2.0. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os impo...
'''Setup: algorithms.''' ## External modules. import numpy as np ## Internal modules. from mml.algos import Algorithm from mml.algos.gd import GD_ERM from setup_losses import parse_dro ############################################################################### class Weighted_Average(Algorithm): ''' An...
import matplotlib.pyplot as plt from tf_pwa.experimental import factor_system as fs from .test_full import gen_toy, toy_config def test_partial_amp(toy_config): amp = toy_config.get_amplitude() phsp = toy_config.get_data("phsp")[0] tw = amp(phsp) phsp = toy_config.generate_phsp(100000) tw = amp(...
from heapq import heappush, heappop import numpy as np def planchon_darboux_fill(mesh): """Modify the mesh such that every non-edge node has a neighbor that is lower than itself. Using this simplifies water flow because water will never pool, however it makes lakes impossible and tends to form atrific...
from .pickled import * # noqa # nosec from .redis import * # noqa
from server.api.app import app_api from server.api.app.models.devices import DeviceListModel from sanic.exceptions import abort from sanic.response import json as res_json from sanic_openapi import doc @app_api.get('/devices') @doc.summary('List of devices') @doc.produces( DeviceListModel, content_type='appli...
import requests from hydraclient.core import client as core_client session = requests.Session() def get(*args, **kwargs): return core_client.get(session, *args, **kwargs)
import sys import numpy as np import math import matplotlib.pyplot as plt from numpy.lib.polynomial import poly import pandas as pd from matplotlib import cm import matplotlib.patheffects as path_effects class Run: def __init__(self, run_name, linearities, leniencies, ids): self.run_name = run_name ...
#!/usr/bin/python3 # Given a range of benchmark jsons created by run_benchmarks_over_commit_range.sh, plots a graph showing the # performance development over time import matplotlib.pyplot as plt import os import pandas as pd from pydriller import RepositoryMining import re import sys if len(sys.argv) != 4: exit...
# wangling # 2020-05-23 # Reference: # 微信公众号:搬运代码吧 import os import argparse import numpy as np import cv2 as cv # 对证件照进行三种颜色的换底操作 def change_color(image_path='./myimage.jpg', output_path='.'): # 读入数据 image = cv.imread(image_path) h, w, ch = image.shape data = image.reshape((-1, 3)) ...
""" CSE 3300 - Computer Networks & Data Communication Prof. Bing Wang Assignment 2: ICMP Ping Client Nicholas Lambourne - ndl17004 - 2749404 N.B: Only code in the receiveOnePing (Between #Fill In tags), shutdown and main functions is mine. The remainder was provided as skeleton code by the course instructors. """ from...
import requests from bs4 import BeautifulSoup req = requests.get('https://sports.news.naver.com/basketball/record/index.nhn?category=wkbl') html = req.text soup = BeautifulSoup(html, 'html.parser') #### Using find function table_find = soup.find(id='regularTeamRecordList_table') # print(table) rows_find = table_find...
#hardware platform: pyboard V1.1 ''' #hardware platform: pyboard V1.1 from pyb import Timer tim=Timer(2) tim.init(freq=2) tim.callback(lambda t:pyb.LED(1).toggle()) try: while True: pass except: tim.deinit() print("timer deinit") ''' import pyb from pyb import LED led=LED(1) led.off() def tick(timer): pri...
import numpy as np import matplotlib.pyplot as plt yi, Bi1 = np.genfromtxt("python/helm2i.txt", unpack=True) ya, Ba1 = np.genfromtxt("python/helm2a.txt", unpack=True) i1 = 2 r = 0.0625 n = 100 yi *= 1e-2 Bi1 *= 1e-3 plt.plot(ya, Ba1, "r.", label="Messwerte Außen") plt.plot(yi*1e2, Bi1*1e3, 'r--', label='Messwerte I...
import json; import requests; import pymongo; import requests from pymongo.collation import Collation cookies = { 'WTSesIDHx': '35g0w816vv3xtlw65ylmwa1n0-4vj2hm-2pmtm0', '_ga': 'GA1.2.1358434475.1548575832', 'WTSesIDx': '35g0iwwzs45qbi4mny20qb5mu-1bphsej-4at7mq', 'WTSesIDxC': '37d9cf2f6e016ee74acd070d8...
from django.db import models from django.utils import timezone # Create your models here. # https://stackoverflow.com/questions/8077840/choicefield-in-django-model class PostItem(models.Model): boast_roast_choices = ( (True, 'boast'), (False, 'roast') ) text = models.CharField(max_length=280) ...
import os import re import OsTools as ot import Env as env def g_tpbconv(*options, **keywords): return ot.system(env.g_tpbconv, *options, **keywords) def g_gmxdump(*options, **keywords): return ot.system(env.g_gmxdump, *options, **keywords) def g_energy(*options, **keywords): return ot.system(env.g_ener...
#!/usr/bin/env python # coding: utf-8 ''' Copyright 2021 Xilinx 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 applicabl...
# -*- coding: utf-8 -*- """Helper for command line functions.""" from __future__ import unicode_literals import logging import shlex import subprocess class CLIHelper(object): """Command line interface (CLI) helper.""" def __init__(self, mock_responses=None): """Initializes a CLI helper. Args: m...
import argparse from simulation_constants import EPISODE_COUNT, E, ALPHA from algorithms.qlearning import qLearning #import racetrack #import demo_constants.demo_racetrack_data as data #from windy_gridworld import WindyGridworld #import demo_constants.demo_windy_gridworld_data as data from maze_gridworld import Maze...
from .class_info import ClassInfo class ScriptInfo: def __init__(self): self.path = None self.filename = None self.module_name = None self.class_info_objects: ClassInfo = None
"""Aula 02: DB Brownser for SQLite - Windows"""
from .tensor import * from .mixup import * from .default_collate import *
# Copyright 2021 Fraunhofer FKIE # # 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 writ...
"""Generalized Functions Hub.""" # internal modules import re # external modules import discord # relative modules # global attributes __all__ = ('extract_id', 'get_role', 'get_member', 'get_channel',) __filename__ = __file__.split('/')[-1].strip('.py') __path__ = __file__.strip('.p...
#!/usr/bin/env python # -*- coding: utf-8 -*- # FSRobo-R Package BSDL # --------- # Copyright (C) 2019 FUJISOFT. 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...
from sympy import Lambda from sympy.core.symbol import symbols, Dummy from sympy.matrices.expressions.hadamard import (HadamardPower, HadamardProduct) from sympy.matrices.expressions.inverse import Inverse from sympy.matrices.expressions.matexpr import MatrixSymbol from sympy.matrices.expressions.matpow import MatPow f...
# -*- coding: utf-8 -*- """ Created on Thu Aug 19 12:17:56 2021 @author: Grant Isaacs """ #IMPORT LIBRARIES-------------------------------------------------------------> import numpy as np import pandas as pd #LOAD DATA--------------------------------------------------------------------> """This data set can be lo...
import datetime import os from pathlib import Path import torch import pickle from omegaconf import OmegaConf from svpg.algos import A2C, SVPG dtime = datetime.datetime.now().strftime("/%y-%m-%d/%H-%M-%S/") params = { "save_run": True, "logger": { "classname": "salina.logger.TFLogger", "log_d...
"""Remove pluginsoftware redundant column Revision ID: 7ca18f645262 Revises: 01a378b3cae9 Create Date: 2021-07-05 17:54:57.698967 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '7ca18f645262' down_revision = '01a378b3cae9' branch_labels = None depends_on = Non...
import os from threading import Thread from typing import List, Callable, Optional, Tuple, Dict, Union, Any from password_manager.certificate import generate_certificate from password_manager.integration.server import Server class IntegrationController: """ Controller managing the flask server needed for bro...
import os import uuid from operator import methodcaller from pathlib import Path from random import sample from typing import List from hypothesis import example, given, settings from hypothesis.strategies import binary, lists from LZW.__main__ import lzw_compress, lzw_decompress # TODO: compare speed of Python impl...
from .pio import Config, Ctrl from .block import Block
import pathlib import SimpleITK as sitk import numpy as np import torch from sklearn.model_selection import KFold from torch.utils.data.dataset import Dataset import os from config import get_brats_folder from dataset.image_utils import irm_min_max_preprocess, zscore_normalise class Brats(Dataset): ...