content
stringlengths
5
1.05M
import codecs import glob import json import os import common OLD_FILES_PATH = os.path.join("data", "old_format", "*") def grab_files(): return glob.glob(OLD_FILES_PATH) for file_path in grab_files(): with open(file_path) as json_file: print("Analyzing file {}".format(file_path)) data = js...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: pb_task.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _refle...
def together(x,y): prod = x * y return prod print(together(8,6))
import config from node.server import Server def main(): server = Server(0, config.SERVER_ADDR, config.SERVER_PORT, 'VGG5', 1) server.connect() server.run() server.close() if __name__ == '__main__': main()
import base64 from fud.stages import Stage, SourceType, Source from pathlib import Path import simplejson as sjson import numpy as np from fud.stages.verilator.numeric_types import FixedPoint, Bitnum from fud.errors import InvalidNumericType from fud.stages.verilator.json_to_dat import parse_fp_widths, float_to_fixed f...
import torch import os import sys import yaml import numpy as np import random random.seed(1337) import shutil from utils.multipathvisualizerCombine import DrawpathCombine from torch import nn import utils.graphUtils.graphTools as graph from scipy.spatial.distance import squareform, pdist # from dataloader.statetra...
class Mining: def __init__(self, resource, prod_time, workers, capacity): pass
import argparse import logging import os.path import time from collections import defaultdict from inotify.adapters import Inotify from inotify.constants import IN_MODIFY from inotify.constants import IN_MOVED_TO from paasta_tools import firewall from paasta_tools.cli.utils import get_instance_config from paasta_tool...
#!/usr/bin/env python3 from abc import ABC, abstractmethod import numpy as np class CompressionTypeBase(ABC): """"Base type for all compressions (aka C-steps) in the framework.""" def __init__(self): self.__mu = 0 self._state = None self.__info = {} self.step_number = 0 @ab...
import logging import os from collections import defaultdict from pathlib import Path from typing import DefaultDict, Optional import numpy as np from scipy.io.wavfile import read as wav_read from scipy.io.wavfile import write as wav_write from resampy import resample as rsmpy_resample from signalworks.tracking.tracki...
""" This file provides a wrapper for the convert objects and functions. Users will not need to know the names of the specific objects they need to create. """ import os from echopype.convert.azfp import ConvertAZFP from echopype.convert.ek60 import ConvertEK60 class Convert: def __new__(cls, path='', xml_path='')...
from django.core.management import BaseCommand from documents.models import Document from payments.mixins import MangopayMixin class Command(MangopayMixin, BaseCommand): help = "Recreates expired payin for document which was not paid" def add_arguments(self, parser): parser.add_argument('payins', na...
import datetime from flask import render_template, url_for from app.helpers import get_default_tz from app.models import User, RoleToUser, Organization, Location from app.limiters import ShiftChangeNotificationLimiter, AvailableShiftsNotificationLimiter from app.constants import SUDO_EXTERNAL_NAME, SUDO_EXTERNAL_EMAIL ...
from django.contrib.gis import admin from django.db.models.functions import Concat from parler.admin import TranslatableAdmin, TranslatableTabularInline from features.enums import Visibility from features.models import ( ContactInfo, Feature, FeatureTag, FeatureTeaser, Image, License, Link,...
from uptime.logging import sentry_client @sentry_client.capture_exceptions def handler(event, context): return { 'isBase64Encoded': False, 'statusCode': 200, 'headers': {}, #{ 'headerName': 'headerValue', ... }, 'body': 'Success from the ping handler' }
class DomainConst(object): CRM = "crmDomain" #对应tb_config_http表中的配置文件中的 [HTTP]下面的crmDomain这个key ,在HttpBase中的uri如果是对应的key,则选择对应的域名 API = "apiDomain"
# script that returns the center point of selected polygon faces. # owen burgess 2009 import maya.OpenMaya as OpenMaya import math def faceCenter(): faceCenter = [] selection = OpenMaya.MSelectionList() OpenMaya.MGlobal.getActiveSelectionList(selection) print ("Number of objects in selection: %s " ...
# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
from os import system import os os.system ("clear") print("##############################") print("# Programas chapter 6 #") print("##############################") def menu(): print("\n") print("1. arithmetic") print("2. bitwise") print("3. colorspaces") print("4. crop") print("5. fl...
import os import subprocess import shlex # Exception classes used by this module. class CalledProcessError(Exception): """This exception is raised when a process run by check_call() or check_output() returns a non-zero exit status. The exit status will be stored in the returncode attribute; check_outpu...
from trainer import LDATrainer from evaluator import LDAEvaluator from train_data import docs # 코퍼스 생성 lda_trainer = LDATrainer() lda_trainer.make_corpus(docs) # 학습했던 모델 및 코퍼스 불러오기 evaluator = LDAEvaluator() evaluator.load() evaluator.corpus = lda_trainer.corpus print("\n학습 결과 추정 지표") evaluator.evaluate() print("\n...
import urwid from gviewer.parent import ParentFrame from gviewer.config import Config from gviewer.context import Context class GViewer(object): # pragma: no cover """ General viewer main class Attributes: main_context: DisplayerContext config: a Config instance others: any other ar...
# -*- coding: utf-8 -*- from datetime import datetime from functools import reduce from django.contrib import admin from django.contrib.auth.models import User from django.core.exceptions import PermissionDenied from django.db.models import Sum from django.http import HttpResponseRedirect, HttpRequest from django.shor...
from lib.logging import Logger from lib.readCfg import ConfigReader import sys logging = Logger() log = logging.getLogger(__file__) readCfg= ConfigReader() config = readCfg.read_config(['processor/config/secret.ini']) class Utilities: def __init__(self): log.info("Initializing") def updateURLToken(self...
import re class UnitError(Exception): """Not unit in the line""" def conversion(data: str) -> float: if "km" not in data and "mi" not in data: raise UnitError("Add km or mi in data line.") count = re.search(r"\d+(?:\.\d+)?", data).group(0) if "km" in data: convert = 0.621371 * float...
from twindb_backup.status.mysql_status import MySQLStatus def test_write_status(gs): status = MySQLStatus() status.save(gs)
""" Create train, valid, test iterators for CIFAR-10 [1]. Easily extended to MNIST, CIFAR-100 and Imagenet. Taken from https://gist.github.com/kevinzakka/d33bf8d6c7f06a9d8c76d97a7879f5cb [1]: https://discuss.pytorch.org/t/feedback-on-pytorch-for-kaggle-competitions/2252/4 """ import torch import numpy as np from t...
class Bun: def __init__(self, args): pass def are_buns_available(): return False def dispense_bun() -> Bun: if not are_buns_available(): return None return Bun('Wheat') assert dispense_bun() is None
# author: Bartlomiej "furas" Burek (https://blog.furas.pl) # date: 2022.06.06 # [html - Problem with outputting text (Python, Beautifulsoup) - Stack Overflow](https://stackoverflow.com/questions/72518061/problem-with-outputting-text-python-beautifulsoup/72518812#72518812) # it needs `User-Agent` to get Chinese data in...
from extensions import db # table student class Student(db.Model): # @TODO # students ID primary key and unique id = db.Column(db.Integer, primary_key=True, nullable=False) # students name NOT NULL name = db.Column(db.String(200), nullable=False) # students address NOT NULL address = db....
from django.db import models from datetime import datetime from models import networkequipment from django.core.validators import MaxValueValidator, MinValueValidator from models import person from models import client class Printer(networkequipment.NetworkEquipment): PRINTER_TYPE = ( ('BL', 'Black and whi...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mail', '0093_settings_transfer_max_size'), ] operations = [ migrations.CreateModel( name='EdmCheckSettings', ...
from flask import Flask from flask_migrate import Migrate from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) db = SQLAlchemy(app) migrate = Migrate() migrate.init_app(app, db) from .models import company db.create_all() # regist route from .controllers import search_controller app.register_blueprint(sear...
# -*- coding: utf-8 -*- # ***************************************************************************** # NICOS, the Networked Instrument Control System of the MLZ # Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS) # # This program is free software; you can redistribute it and/or modify it under # the t...
""" Catalog Plugin for browsing pre-configured databroker catalogs """ from distutils.version import LooseVersion from xicam.plugins.catalogplugin import CatalogPlugin from xicam.gui.widgets.dataresourcebrowser import QListView from databroker.core import BlueskyRun from qtpy.QtCore import Signal from qtpy.QtWidgets im...
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # 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 ...
# -*- coding: utf-8 -*- # Copyright (c) 2013, Mayo Clinic # 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, this # ...
import argparse import tensorflow as tf from pre_processing_experimental import Decode import numpy from pathlib import Path from models import * from utils import * import random def generate( model_name, weights_file, num_units=128, sequence_length=100, test_file=None ): int_to_note = read_binary_file(metad...
"""148. Sort Colors """ class Solution: """ @param nums: A list of integer which is 0, 1 or 2 @return: nothing """ def sortColors(self, nums): # write your code here ### Practice r, w, b = 0, 0 , len(nums) - 1 while w <= b: if nums[w] == 0: ...
import ufe def expandPathToSelection(path): """ Retrieves the path of the selection item that contains the provided path. If there is no selection or no item in the selection is an ancestor of the item, then the original path itself is returned. """ selection = ufe.GlobalSelection.get() ufe...
from django.urls import path from.import views #aca genero las urls que va a tener la app core de nuestro proyecto urlpatterns = [ #path del core path('', views.home, name="home"), path('formpaciente/', views.fomPaciente, name="form"), ]
from django.conf.urls import patterns, include, url from django.views.generic import TemplateView from django.contrib import admin from pastes import views as paste_views from home import views as home_views urlpatterns = [ # Examples: # url(r'^$', 'pastebin.views.home', name='home'), # url(r'^blog/', inc...
import pandas import math import os import rasterio from rasterstats import zonal_stats from statistics import median # python 3.4 only from subprocess import check_output def query_clim(df, rcp, lat, lng, variable="tx", period="70", units="C"): sub = df[(df['variable'] == variable) & (df['rcp'] == r...
from . import datamgr from . import dataset from . import additional_transforms
from flask import Blueprint from js9 import j name = j.sal.fs.getDirName(__file__,True) blueprint = Blueprint( '%s_blueprint'%name, __name__, url_prefix="/%s"%name, template_folder='templates', static_folder='static' )
from sampling.greedy_subsampling import * from sampling.sampler import Sampler from sampling.eigen_utils import eigenvector_precomputation from datetime import datetime import numpy as np from tqdm import tqdm class EDSSampler(Sampler): def __init__(self, initial_train_mask, adj, K_sparse_list): self.name...
#!/usr/bin/env python from re import compile from csv import DictReader from urllib import urlopen, urlencode from bs4 import BeautifulSoup from sys import stderr, argv from json import dump def find_description(soup): ''' ''' el = soup.find('h3') if not el: # Nothing. return # T...
from restapi.connectors import celery from restapi.server import ServerModes, create_app from restapi.utilities.logs import log instance = celery.get_instance() # Used by Celery to run the instance (--app app) celery_app = instance.celery_app # Reload Flask app code for the worker (needed to have the app context avai...
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys import revpimodio2 # Takes first name and last name via command # line arguments and then display them class RevPiModDO(): def __init__(self): # RevPiModIO Instantieren self.revpi = revpimodio2.RevPiModIO(autorefresh=False) def setOn(se...
"""internal service for park rows.""" from ..park import Park from ..park_space import ParkSpace class ParkRow(Park): """ParkRow class.""" @classmethod def create(cls, opts): """Unpack serialization object and return an ParkRow.""" spaces = [] if "spaces" in opts: for...
#!/usr/bin/python3 from board_util import GoBoardUtil from gtp_connection import GtpConnection class PolicyPlayer(object): """ Plays according to the Go4 playout policy. No simulations, just random choice among current policy moves """ version = 0.1 name = "Policy Probabilistic Player...
# Generated by Django 2.2.13 on 2020-10-26 12:14 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('majora2', '0128_auto_20201017_1334'), ] operations = [ migrations.AddField( model_name='coguk_biosourcesamplingprocesssupplemen...
from typing import List, Optional import hydra from omegaconf import DictConfig from pytorch_lightning import ( Callback, LightningDataModule, LightningModule, Trainer, seed_everything, ) from pytorch_lightning.loggers import LightningLoggerBase from src.utils import utils log = utils.get_logger(...
def next_value(rhyme): '''Get the next rhyme scheme. Arguments: rhyme (list of non-negative int): The rhyme scheme in list form. Returns: The next rhyme scheme in list form. The rhyme scheme will have the same number of lines. ''' rhyme = rhyme.copy() if rhyme ==...
import torch from os import path import numpy as np import ujson as json from tqdm import tqdm from torch.utils.data import TensorDataset from transformers import T5Tokenizer import nltk nltk.data.path.append('./nltk_data') nltk.download('punkt', download_dir='./nltk_data') def process_file_t5(filename, tokenizer, l...
from sanic import Sanic, response HOST = "0.0.0.0" PORT = 4500 app = Sanic(__name__) @app.route("/") async def handler(request): return response.json(body={"data": "Hello world!"}, content_type='application/json', status=200) if __name__ == "__main__": ap...
import logging from dff import CompositeDialogueFlow, DialogueFlow from dff import dialogflow_extension import dialogflows.flows.wiki as wiki_flow from dialogflows.flows.wiki_states import State as WikiState import dialogflows.scopes as scopes logger = logging.getLogger(__name__) composite_dialogflow = CompositeDi...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc import payload_pb2 as payload__pb2 class EgressFilterStub(object): # missing associated documentation comment in .proto file pass def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """...
import time # print "mensaje inicial antes de la espera" # time.sleep(15) # espera en segundos # print "mensaje luego de la espera" while True: print("imprimir mensaje cada 5 segundos") time.sleep(5)
class Solution: def maxSumTwoNoOverlap(self, A: List[int], L: int, M: int) -> int: s = [0]*(len(A)+1) for i in range(1,len(s)): s[i]=s[i-1]+A[i-1] ans = 0 for i in range(2): Lmax = 0 for j in range(L,len(s)-M): Lmax = ma...
from dataclasses import dataclass, field from typing import Tuple @dataclass(frozen=True) class Coordinates: x: int y: int left: str right: str @dataclass class Rover: x: int y: int direction: str obstacles: list[list[int]] = field(default_factory=list) valid_commands = ("F", "B...
#!/usr/bin/env python # coding=utf-8 # vim:ts=4:sts=4:sw=4:et # # Author: Hari Sekhon # Date: 2017-08-30 14:52:43 +0200 (Wed, 30 Aug 2017) # # https://github.com/harisekhon/nagios-plugins # # License: see accompanying Hari Sekhon LICENSE file # # If you're using my code you're welcome to connect with me on Linke...
with open('resources/day8', 'rt') as f: registers = dict() max_value_ever = None for line in f: split = line.split() register = split[0] action = split[1] amount = int(split[2]) condition_register = split[4] condition = split[5] condition_amount = int(...
from sklearn.pipeline import Pipeline import numpy as np from .helpers import pipe_hash, get_nested_final_estimator from joblib import load, dump import pandas as pd from sklearn.utils.metaestimators import if_delegate_has_method import os from sklearn.utils import _print_elapsed_time from sklearn.base import clone fro...
# Generated by Django 3.1.3 on 2021-01-04 07:05 import datetime from django.db import migrations, models class Migration(migrations.Migration): replaces = [('feeds', '0001_initial'), ('feeds', '0002_auto_20210102_0639'), ('feeds', '0003_remove_feedsummary_title_detail'), ('feeds', '0004_feedsources'), ('feeds',...
import re for test_string in ['555-1212', 'ILL-EGAL']: if re.match(r'^\d{3}-\d{4}$', test_string): print(test_string, 'is a valid US local phone number') else: print(test_string, 'rejected')
#!/usr/bin/env python from setuptools import setup, find_packages #from distutils.core import setup LONG_DESCRIPTION = \ '''Pooled parent project code''' with open('requirements.txt') as f: requirements = f.read().splitlines() setup( name='pooledparent', version='0.1.0', author='Harriet Dashnow', ...
from ..data_exchange.data import Data _KEYS_LEFT = "Device/SubDeviceList/LHand/Touch/Back/Sensor/Value" _KEYS_RIGHT = "Device/SubDeviceList/RHand/Touch/Back/Sensor/Value" class Left_hand_touch(Data): def __init__(self): Data.__init__(self) def get_keys(self): global _KEYS_LEFT ...
from command_manager import command from rnode import RNode from enums import DeviceType, MessageValueType from os import path from time import sleep class TestMessage(object): def __init__(self, val): self.A = val __slots__ = ['A'] _slot_types = ['int32'] class TestUser(object): def __init_...
""" Tests for the sprockets.mixins.postgresql package """ import mock import os try: import unittest2 as unittest except ImportError: import unittest from sprockets.clients import postgresql as _postgresql from sprockets.mixins import postgresql class MixinRequestHandler(postgresql.HandlerMixin): DBNAME...
fi<<<<<<< HEAD num =11111 ======= num2 = 22222 >>>>>>> num = 44444444
from gevent import monkey; monkey.patch_all() #from app import init from webrecorder.maincontroller import MainController from bottle import run # ============================================================================ application = MainController().app if __name__ == "__main__": run(app=application, port=...
from unittest import TestCase import vcr from .utils import VCR_STORAGE from ..client import MetroRail from .. import responses from ...tests.utils import API_KEY from ...location import RadiusAtCoordinates, Coordinates class TestMetroRail(TestCase): def setUp(self): self.metro_rail = MetroRail(API_KEY) ...
import numpy as np import matplotlib.pyplot as plt from subprocess import call import sys def vvp_run(tb, args, ofile, verbose=False): cmd = 'vvp -N %s ' % tb cmd += args if verbose: print(cmd) rc = call(cmd, shell=True) if rc != 0: print("vvp return_code %d" % rc) print("F...
# -*- coding: utf-8 -*- # Copyright (c) 2012, Sergio Callegari # All rights reserved. # This file is part of PyDSM. # PyDSM is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, o...
# Project Quex (http://quex.sourceforge.net); License: MIT; # (C) 2005-2020 Frank-Rene Schaefer; import quex.engine.misc.error as error import quex.engine.misc.file_in as file_in from quex.engine.misc.quex_enum import QuexEnum from quex.engine....
from reinvent_chemistry.library_design.dtos.failed_reaction_dto import FailedReactionDTO from reinvent_chemistry.library_design.dtos.filtering_condition_dto import FilteringConditionDTO from reinvent_chemistry.library_design.dtos.reaction_dto import ReactionDTO from reinvent_chemistry.library_design.dtos.reaction_outco...
'''input TAKOYAKI No YAKINIKU Yes ''' # -*- coding: utf-8 -*- # CODE FESTIVAL 2017 qual A # Problem A if __name__ == '__main__': s = input() if s[:4] == 'YAKI': print('Yes') else: print('No')
import secrets from contextlib import contextmanager from datetime import datetime from typing import Optional import peewee as pw import pytest from myfunds.core.constants import FundsDirection from myfunds.core.models import Account from myfunds.core.models import Balance from myfunds.core.models import Category fr...
""" WSGI config for igssoftwaremanagement project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application djm = 'DJANGO_SETTING...
small_test_data = [ 1721, 979, 366, 299, 675, 1456, ] def test_find_add_pair_product(): assert find_add_pair_product(small_test_data, 2020) == 514579 assert find_add_pair_product(small_test_data, 2021) == False def find_add_pair_product(list, target): checked = {} for element...
"""A Bokeh model for the JSMEEditor""" from bokeh.core.properties import List, String from bokeh.models import HTMLBox from panel import extension # pylint: disable=protected-access extension._imports["jsme"] = "panel_chemistry.bokeh_extensions.jsme_editor" # pylint: enable=protected-access class JSMEEditor(HTMLBox)...
import os import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.utils.data import DataLoader import torch.nn.init as init from torch.autograd import Variable from torch.optim import SGD, Optimizer from torch.optim.lr_scheduler import StepLR, MultiStepLR from torchvi...
import unittest import game_skeleton.scaffolding as test_subject class TestGameSkeleton(unittest.TestCase): def test_is_running_right_after_creation(self): self.assertTrue(test_subject.GameSkeleton().is_running) def test_is_not_running_right_after_stop(self): game = test_subject.GameSkeleton(...
# automatically generated by the FlatBuffers compiler, do not modify # namespace: aghast_generated class OverlappingFillStrategy(object): overfill_unspecified = 0 overfill_all = 1 overfill_first = 2 overfill_last = 3
# -*- coding:utf-8 -*- # Create by 27 # @Time : 2020/2/26 18:35 __author__ = '27'
''' sc_studio.master Author: Ming Tsang Copyright (c) 2014-2015 HKUST SmartCar Team Refer to LICENSE for details ''' import binascii import codecs from collections import deque import logging import os import sys import subprocess import time import serial from sc_studio import config, console_utils, message from thr...
import logging import os import tempfile import unittest from os import path import pandas as pd from Bio import SeqIO from staramr.blast.JobHandler import JobHandler from staramr.blast.plasmidfinder.PlasmidfinderBlastDatabase import PlasmidfinderBlastDatabase from staramr.blast.pointfinder.PointfinderBlastDatabase i...
#!/usr/bin/env python3 from abc import ABC, abstractmethod from enum import Enum from typing import ( Dict, Type, Optional, Callable, TypeVar, Generic, Any, cast, Union, Tuple, ) E = TypeVar("E", bound="RingElt") # element type RingEltPlus = Union[int, "RingElt"] # RingElt p...
#TextBelt python Wrapper import urllib # URL functions import urllib2 # URL functions url = "http://textbelt.com/text" class textbelt(object): def send(self, number=None, message=None): val = { 'number' : number, 'message' : message } postdata = urllib.urlencode(va...
"""This module adds Total Net Family Income (TNFI) in 1979 to create income quartiles used in plots and analysis.""" # %% # Import necessary packages import os import pandas as pd import numpy as np # %% # Read in the dataset fname = 'C:/Users/bec10/OneDrive/Desktop/files/repos/gorman-earlyjobskills-analysis/data/al...
#%% Loading Libraries from numpy import * import pandas as pd import matplotlib.pyplot as plt import os import pywt from skimage.transform import resize #%% from keras.models import Sequential from keras.layers import LSTM, Conv2D, MaxPool2D, Flatten, Dropout, Dense, Masking from keras.utils import to_categorical #%% f...
#!/usr/bin/python # Python image processing based utility. # Enter "pile.py -help" for info. # Markus.Peura@fmi.fi # 2006 (c) Finnish Meteorological Institute # V1.2 (Mar 2008) # Formerly "composite.py", now renamed for avoiding confusions. #import Image from PIL import Image import os # for environment variables...
import os import networkx import pytest from cleo import Application, CommandTester from dcp.cli.command import DcpCommand from dcp.cli.helpers import make_copy_request from dcp.data_copy.base import ALL_DATA_COPIERS, CopyRequest from dcp.data_format.formats.database.base import DatabaseTableFormat from dcp.storage.ba...
import os from tqdm import tqdm import matplotlib.pyplot as plt from matplotlib import cm import numpy as np import pandas as pd import math_utils import draw from celluloid import Camera class Analysis: def __init__(self, h5_path, DLCscorer, startframe=None, endframe=None): df = pd.read_hdf(h5_path) ...
# Generated by Django 4.0rc1 on 2021-11-28 11:41 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('blackbook', '0015_transactionjournal_tags'), ] operations = [ migrations.AlterField( model_nam...
from collections import defaultdict import tqdm import tqdm import numpy as np import pandas as pd import torch import transformers import typer from torch import nn, optim from transformers import ( AdamW, AutoModel, AutoTokenizer, get_linear_schedule_with_warmup, ) from data_loader import create_data...
import sys sys.stdin.read() print("""[{\"JobId\":5 ,\"Id\":1,\"RequeueCount\":0, \"JobType\":1,\"ParentIds\":null, \"ChildIds\":null,\"RemainingParentIds\":null, \"CommandLine\":\"env & sleep 10 & hostname & date\", \"Node\":\"evancvmss000001\", \"UserName\":\"testusername\", \"EnvironmentVariables\": { \"TestVa...
# Copyright (c) 2019. Robert Karl. All rights reserved. # Licensed under the MIT License. See LICENSE in the project root for license information. import enum from collections import defaultdict from typing import Sequence from yabc import transaction @enum.unique class PoolMethod(enum.Enum): LIFO = 1 FIFO...