text
stringlengths
2
999k
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
import os from click.testing import CliRunner from conftest import tmp_chdir from morenines import application def test_status_no_changes_with_color(data_dir): with tmp_chdir(data_dir): runner = CliRunner() result = runner.invoke(application.main, ['status']) assert result.exit_code == 0 ...
import itertools import random from typing import List, Optional, Sequence, Tuple, Union import igraph as ig import numpy as np import pandas as pd from anndata import AnnData from scanpy import logging import scipy.sparse as sp from .._compat import Literal from .._preprocessing import ir_dist from ..ir_dist import ...
import unittest from pyquilted.builder.details import HeadingDetailsBuilder from pyquilted.yaml_loader import YamlLoader class TestBuilderHeadingDetails(unittest.TestCase): def setUp(self): with open('test/validations/heading.yml') as f: self.odata = YamlLoader.ordered_load(f) def test_de...
# coding: utf-8 # ---------------------------------------------------------------------------- # <copyright company="Aspose" file="PdfDocumentInfo.py"> # Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved. # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtai...
#!/usr/bin/env python # # MIT License # # Copyright The SCons Foundation # # 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 us...
# Copyright 2014 The Bazel 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 la...
from typing import List class Solution: def partition(self, arr, left, right): pivot = arr[right] i = left-1 for j in range(left, right): if arr[j] > pivot: i += 1 arr[i], arr[j] = arr[j], arr[i] ...
import cv2 import sys import numpy as np import math import os from objloader_simple import * import argparse # Minimum number of matches that have to be found # to consider the recognition valid MIN_MATCHES = 60 # Command line argument parsing parser = argparse.ArgumentParser(description='Augmented Reality') parse...
from matplotlib.patches import FancyArrowPatch from matplotlib.patches import ArrowStyle from compas.geometry import Point from compas_plotters.artists import Artist __all__ = ['VectorArtist'] class VectorArtist(Artist): """""" zorder = 3000 def __init__(self, vector, point=None, draw_point=False, col...
from torch import nn from torch.autograd import Variable import torch from utils import score, BCELoss import numpy as np UNK_IDX = 0 EOS_IDX = 2 class SigmoidSiameseRNN(nn.Module): def __init__(self, config, data_config): super(SigmoidSiameseRNN, self).__init__() self.mode = config['mode'] ...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "root.settings.dev") try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are...
""" Top-level namespace for nimare base. """ from .inputs import (Analyzable, Mappable, ConnMatrix, Image, CoordinateSet, Surface) from .decode import Decoder from .meta import (MetaResult, MetaEstimator, CBMAEstimator, KernelEstimator, IBMAEstimator) from .annotate import (Anno...
import re import yaml def parseIn(file): param={} param['paramBowtie']={} param['paramBowtie']['I']=0 param['paramBowtie']['X']=500 param['paramBowtie']['k']=1 param['paramBowtie']['p']=1 param['paramSalmonIDX']={} param['paramSalmonIDX']['-k']=31 param['paramSalmonQNT']={} param['paramS...
import csv from selenium import webdriver import urllib.request # скачать драйвер для хрома https://sites.google.com/a/chromium.org/chromedriver/downloads from selenium.webdriver.common.by import By if __name__ == '__main__': # считываем ссылки из вайла с массив urls = [] # массив ссылок для ссылок with...
""" Verify service identities. """ from __future__ import absolute_import, division, print_function from . import cryptography, pyopenssl from .exceptions import ( CertificateError, SubjectAltNameWarning, VerificationError, ) __version__ = "18.1.0" __title__ = "service_identity" __description__ = "Serv...
# import the necessary packages from .align_images import align_images from .text_processing import text_processing from .mark_region import mark_region
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from...
'''Escreva um programa que leia dois números inteiros e compare-os. mostrando na tela uma mensagem: – O primeiro valor é maior – O segundo valor é maior – Não existe valor maior, os dois são iguais''' #minha resolução from time import sleep num1 = int(input('Digite o primeiro número: ')) num2 = int(input('Digite o s...
# -*- coding: utf-8 -*- from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('selections', '0004_auto_20180129_0807'), ] operations = [ migrations.AlterField( model_name='selection', name='is_no_target', f...
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # Modified by Linjie Deng # -------------------------------------------------------- import torch from utils.nms.cpu_nms import cp...
from astropy.io import fits from astropy.table import Table from astropy import stats import os, sys, shutil from nirc2.reduce import util #import util import numpy as np from pyraf import iraf as ir from nirc2 import instruments from datetime import datetime import pdb import astropy def makesky(files, nite, ...
# content of test_sample.py from vps_backup_utils import VPSBackupUtils def inc(x): return x + 1 def test_answer(): assert inc(3) == 4
from . import lookupProdDemand as pd # defining the sequence for the calculation from top to bottom, most complex products first calculation_sequence = ["P1", "P2", "P3", "E26", "E31", "E51", "E56", "E16", "E17", "E30", "E50", "E55", "E4", "E5", "E6", "E10", "E11", "E12", "E29", "E49", "E54", "...
#For Test Image 2 import pytesseract import cv2 img = cv2.imread('/HandwritingTest2.jpg') img = cv2.medianBlur(img, 5) img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) thresh, binary = cv2.threshold(img, 121, 255, cv2.THRESH_BINARY) tess = pytesseract.image_to_string(binary, config='-l eng --oem 1 --psm 7') print(tess)
#!/usr/bin/env python3 import os from pymongo import MongoClient clients = MongoClient().db.clients clients.find_one_and_update( {"cn": os.environ["X509_0_CN"]}, {"$set": { "ip": os.environ["ifconfig_pool_remote_ip"] }} )
#!/usr/bin/env python3 import python_freeipa from faker import Faker from noggin.security.ipa import Client import noggin.utility.timezones as timezones USER_PASSWORD = "testuserpw" fake = Faker() fake.seed_instance(0) ipa_server = "ipa.example.com" ipa_user = "admin" ipa_pw = "adminPassw0rd!" ipa = Client(host=ip...
"""Tests for documenteer.sphinext.packagetoctree (package-toctree and module-toctree directives). """ from documenteer.sphinxext.packagetoctree import _filter_index_pages def test_filter_index_pages(): """Test _filter_index_pages.""" docnames = [ "index", "basedir/A/index", "basedir/B...
"""Construct a docx importer.""" from typing import List import docx from .IngestorInterface import IngestorInterface from .QuoteModel import QuoteModel class DocxImporter(IngestorInterface): """ Define DocxImporter class. The DocxImporter inherits from IngestorInterface class, and has a method to in...
#!/usr/bin/env python # encoding: utf-8 # This file is part of the quickscons project. This project is used to build # other software that MAY or MAY NOT be licensed under the same terms as this # project. This project is licensed under the below: # # The MIT License (MIT) # # Copyright © 2015 Stephen M Buben <smbuben...
# Copyright The PyTorch Lightning team. # # 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 i...
from .app import Sofi
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import math from typing import List, Tuple import torch from detectron2.layers import batched_nms, cat from detectron2.structures import Boxes, Instances from detectron2.utils.events import get_event_storage logger = logging.getLogg...
from __future__ import division, print_function __author__ = 'maartenbreddels' import os import sys import collections import numpy as np import logging import vaex import vaex.utils import vaex.execution import vaex.export import vaex.hdf5.dataset from vaex.column import ColumnStringArrow, str_type max_length = int(1...
# -*- coding: utf-8 -*- from flask import Blueprint api = Blueprint("api",__name__) import app.api.view
import torch import numpy as np from torch import nn import torch.nn.functional as F from typing import Any, Dict, List, Type, Union, Optional from tianshou.policy import PGPolicy from tianshou.data import Batch, ReplayBuffer, to_torch_as, to_numpy class A2CPolicy(PGPolicy): """Implementation of Synchronous Adva...
import numpy as np import random, time from tester.tester import Tester from Agent.iqAgent import iqAgent from Environments.rendezvous.multi_agent_gridworld_env import MultiAgentGridWorldEnv from Environments.coop_buttons.multi_agent_buttons_env import MultiAgentButtonsEnv import matplotlib.pyplot as plt def run_iql_...
from datetime import date today = date.today() # datetime.date(2018, 12, 6) today.year # 2018 today.month # 12 today.day # 6
import random import copy from collections import defaultdict from collections import deque from collections import namedtuple import numpy as np class Q(): def __init__(self, n_actions, observation_space, bin_size, low_bound=None, high_bound=None, initial_mean=0.0, initial_std=0.0): self.n_actions = n_a...
version_info = (4, 0, 3) __version__ = '.'.join(map(str, version_info))
import uuid from django.db import models from django.contrib.auth.models import AbstractBaseUser, BaseUserManager class UserManager(BaseUserManager): def create_user(self, email, username, password): """ Created user with given email username and password :param: email :param: use...
import pytest from waveorder.io.zarrfile import ZarrReader import zarr import numpy as np def test_constructor_mm2gamma(setup_mm2gamma_zarr): """ test that constructor parses metadata properly no data extraction in this test """ src = setup_mm2gamma_zarr mmr = ZarrReader(src) assert(m...
from m5.SimObject import SimObject from m5.params import * from m5.proxy import * from SimpleEnergySM import SimpleEnergySM from SimpleHarvester import SimpleHarvester class EnergyMgmt(SimObject): type = 'EnergyMgmt' cxx_header = "engy/energy_mgmt.hh" path_energy_profile = Param.String(Parent.path_energy_p...
import collections import copy import functools import logging import json import pkg_resources from jsonschema import Draft4Validator, ValidationError, draft4_format_checker from jsonschema.validators import extend from werkzeug.datastructures import FileStorage from ..exceptions import ExtraParameterProblem, BadReq...
import sys from helpers import read_data_file print('\n************* Day 09 *************\n') preamble = 25 def part1(): msg = read_data_file(sys.argv[1], convert=int) for i in range(preamble, len(msg)): found = False for j in range(i-preamble, i): for k in range(i-preamble, ...
# coding: utf-8 # import models into model package from .device_attributes import DeviceAttributes from .macvtap_device import MacvtapDevice from .type import Type
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the PyMVPA package for the # copyright and license terms. # ### ### ### ### ###...
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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 applicable...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.conf.urls import url from . import views urlpatterns = [ url( regex=r'^$', view=views.index, name='rsvp' ), url( regex=r'^request/$', view=views.request_code, name='r...
# Copyright 2015 NEC 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 applicable l...
from __future__ import absolute_import from django.apps import AppConfig class Config(AppConfig): name = "sentry.plugins.sentry_urls" def ready(self): from .models import UrlsPlugin from sentry.plugins.base import register register(UrlsPlugin)
location = [-8,-4,-3,2,5,8] mass = [4,10,10,4,7,8] def centerOM(x,y): numerator = range(len(x)) for i in range(len(location)): numerator[i]=x[i]+y[i] return sum(numerator)/sum(y) print centerOM(location,mass)
from manimlib.imports import * class TripleScene(Scene): CONFIG = { "good_file": "good", "coin_file": "coin", "favo_file": "favo", } def construct(self): self.get_svg() good = self.good coin = self.coin favo = self.favo self.play( ...
from sys import argv script, filename = argv print(f"We're going to erase {filename}.") print("If you don't want that, hit CTRL-C (^C).") print("If you do want that, hti RETURN.") input("?") print("Opening the file...") target = open(filename, 'w') print("Truncating the file. Goodbye!") target.truncate() print("N...
# Copyright The PyTorch Lightning team. # # 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 i...
""" ================= Camera Trajectory ================= The following illustration shows a camera's trajectory that has has been estimated from odometry. This specific trajectory has been used to reconstruct a colored mesh from a depth camera and an RGB camera. """ print(__doc__) import os import numpy as np impor...
# -*- coding: UTF-8 -*- from pyautocad import Autocad, APoint # 这个true表示没有文件则打开一个,CAD有弹窗时会打开或者创建失败 acad = Autocad(create_if_not_exists=True) acad.prompt("Hello, Autocad from Python\n") print(acad.doc.Name) for text in acad.iter_objects('Text'): if text.TextString.find("YT4")>=0: print('text: %s at: %s' %...
from collections import Counter import datetime import numpy as np from sklearn.ensemble import RandomForestClassifier from sklearn.utils import shuffle from models.features.topics import topics_similarity from models.features.cosine import cosine_similarity_features clf = RandomForestClassifier() clf_one = RandomFo...
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
# -*- coding: utf-8 -*- # @Author: Clarence # @Date: 2020-01-19 11:41:26 # @Last Modified by: Clarence # @Last Modified time: 2020-01-19 11:44:26 voted = {} def check_voter(name): if voted.get(name): print("kick them out!") else: voted[name] = True print("let them vote!") check_voter("tom") check_voter("...
#!/usr/bin/env python ''' Test for disctrete fourier transform (dft) ''' # Python 2/3 compatibility from __future__ import print_function import cv2 import numpy as np import sys from tests_common import NewOpenCVTests class dft_test(NewOpenCVTests): def test_dft(self): img = self.get_sample('samples/...
from pathlib import Path from typing import List, Optional from project_nft import Pin, PinningAPI from pinata.api_key import get_key_manager from pinata.clients.data import DataClient from pinata.clients.pinning import PinningClient from pinata.exceptions import ( NoContentError, PinataBadRequestError, P...
# coding: utf-8 from enum import Enum from six import string_types, iteritems from bitmovin_api_sdk.common.poscheck import poscheck_model class CodecConfigType(Enum): AAC = "AAC" HE_AAC_V1 = "HE_AAC_V1" HE_AAC_V2 = "HE_AAC_V2" H264 = "H264" H265 = "H265" VP9 = "VP9" VP8 = "VP8" MP2 = ...
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.updatemenu" _path_str = "layout.updatemenu.font" _valid_props = {"color", "family", ...
# Copyright (c) 2012-2017 The Woochain Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Woochain base58 encoding and decoding. Based on https://Woochaintalk.org/index.php?topic=1026.0 (public domain) ''' import ...
units_in() sheet_metal = analyze_sheet_metal() setup_time = var('setup_time', 0.5, 'Setup time, specified in hours', number) runtime = var('runtime', 0, 'Runtime, specified in hours', number, frozen=False) thickness = var('thickness', 0, 'thickness', number, frozen=False) thickness.update(get_workpiece_value('thickne...
#!/usr/bin/env python """ .. See the NOTICE file distributed with this work for additional information regarding copyright ownership. 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 ...
# 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, ...
# Generated by Django 2.1.2 on 2018-10-26 02:02 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUT...
# Copyright (c) Microsoft Corporation # All rights reserved. # # 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 restriction, including without limitation # the rights to ...
from typing import Tuple, FrozenSet from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode import pysmt.typing as types from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
""" python implementation of tools/fingerprint-find-candidate-matches.pl Find what fingerprint matches the most a given DHCP fingerprint. Supports several strategies to do so and adding new ones should be relatively easy. """ from fingerbank.parser import ( parse_config_with_heredocs, create_systems_and_group...
"""rio_cogeo.cogeo: translate a file to a cloud optimized geotiff.""" import os import sys import math import warnings import tempfile from contextlib import contextmanager import click import rasterio from rasterio.io import DatasetReader, DatasetWriter, MemoryFile from rasterio.env import GDALVersion from rasterio...
from flask import Flask, render_template app = Flask( __name__, static_url_path='/static', template_folder='./site/templates', static_folder='./site/static' ) @app.route('/') @app.route('/recipes/apple_pie') def home_page(): return render_template('recipe.html') if __name__ == '__main__': ...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** from enum import Enum __all__ = [ 'AdministratorType', 'AutoExecuteStatus', 'CreateMode', 'DataMaskingState', 'DatabaseEdition', ...
from os import path import setuptools from setuptools.config import read_configuration BASE_PATH = path.dirname(__file__) CFG_PATH = path.join(BASE_PATH, "setup.cfg") config = read_configuration(CFG_PATH) version = config["metadata"]["version"] setuptools.setup( name="dbnd-azure", package_dir={"": "src"},...
from django.test import TestCase from django.contrib.auth import get_user_model class ModelTest(TestCase): def test_create_user_with_email_successful(self): """Test create a new user with an email is successful""" test_email = 'test@emailsender.com' test_password = 'testpassword1234' ...
# Copyright 2014 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 logging import optparse import os import py_utils import signal import subprocess import sys import tempfile from devil.android import device_temp_fi...
# ======================= # PIR File Format # ======================= """ PIR File Format =============== This format was introduced for the Protein Information Resource (PIR), a project of the National Biomedical Research Foundation (NBRF). The Protein Information Resource. Nucleic Acids Res. 2000 Jan 1; 28(1): 41–...
"""Test the authentication functionality.""" from pytest_mock import MockerFixture from ceiba.user_authentication import (authenticate_username, is_user_authenticated) from .test_mongo_interface import get_database class MockReply(dict): """Mock requests reply.""...
"""Transition elements on simplices.""" from itertools import product from ..finite_element import CiarletElement from ..polynomials import polynomial_set from ..functionals import PointEvaluation from ..quadrature import get_quadrature from ..symbolic import x, subs from .lagrange import DiscontinuousLagrange class...
import unittest from immutables.map import map_hash, map_mask, Map as PyMap from immutables._testutils import * # NoQA none_hash = map_hash(None) assert(none_hash != 1) assert((none_hash >> 32) == 0) not_collision = 0xffffffff & (~none_hash) mask = 0x7ffffffff none_collisions = [none_hash & (mask >> shift) ...
from __future__ import division from pyomo.environ import * model = ConcreteModel() model.x = Var([1,2], domain=NonNegativeReals) model.OBJ = Objective(expr = 2*model.x[1] + 3*model.x[2]) model.Constraint1 = Constraint(expr = 3*model.x[1] + 4*model.x[2]**2 >= 1)
#!/pxrpythonsubst # # Copyright 2016 Pixar # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # ...
height = int(input()) x = height for i in range(1,height+1): for j in range(1,2*height+1): if(j == x or j == 2*height-x+1): print("*",end=" ") else: print(end=" ") if(i % 2 == 0): x -= 2 print() # Sample Input...
import unittest from .serializers import TweetSerializer from tweeter.models import Tweet from django.contrib.auth.models import User from datetime import datetime from rest_framework import serializers class TestUsers(unittest.TestCase): def test_user_creation(self): user=User(username='���') self...
"""Sun2 Helpers.""" from datetime import timedelta from homeassistant.const import EVENT_CORE_CONFIG_UPDATE from homeassistant.core import callback from homeassistant.helpers.dispatcher import dispatcher_send from homeassistant.helpers.sun import get_astral_location SIG_LOC_UPDATED = 'sun2_loc_updated' _LOC = None _...
""" crypto.cipher.trolldoll Modification to Icedoll to take advantage of the better error extension and provide a IV for randomization of the output and integrity checking. IV is simply prepended to plaintext. Integrity check is appended to the end of the plain text as zeros with count of the bloc...
""" WSGI config for compotes 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/4.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETT...
import math import pandas as pd from io import StringIO data_url = "https://www.dropbox.com/s/pwm8wlncayp1clh/trump_beta.csv?dl=1" class MultidimensionalCalibratedAtmosphericScrubbers(QCAlgorithm): def Initialize(self): self.SetStartDate(2020, 6, 1) # Set Start Date self.SetCash(100000) # Se...
import numpy as np import pandas as pd import os, errno import datetime import uuid import itertools import yaml import subprocess import scipy.sparse as sp from scipy.spatial.distance import squareform from sklearn.decomposition.nmf import non_negative_factorization from sklearn.cluster import KMeans from sklearn.me...
import argparse import os import joblib import mlflow from sklearn.pipeline import make_pipeline from sklearn.preprocessing import StandardScaler from sklearn.linear_model import LassoLars from azureml.core import Workspace from azureml.core.run import Run, _OfflineRun # This script can run locally using # python <nam...
from dataclasses import dataclass from mchqr.detector import Detector from mchqr.dev import NotOverriden, subclasses_dict from mchqr.image import ImageList from mchqr.solution import AlgoSolution from multiprocessing import Pool from time import perf_counter_ns @dataclass class BaseAlgorithm: detector: Detector imag...
import inspect import logging import os import sys import tempfile import time import warnings import weakref from collections import defaultdict from enum import Enum from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Union import yaml from dagster import check from dagster.core.definitions.events import As...
# Copyright (c) 2003-2005 Maxim Sobolev. All rights reserved. # Copyright (c) 2006-2007 Sippy Software, Inc. All rights reserved. # # This file is part of SIPPY, a free RFC3261 SIP stack and B2BUA. # # SIPPY is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
#!/usr/bin/env python from distutils.core import setup from setuptools import find_packages setup(name='ikats', version='0.1.0', description='IKATS Python API', author='Fabien TORTORA', author_email='fabien.tortora@c-s.fr', url='https://www.ikats.org', packages=find_packages(), ...
from fluent_pages.extensions import page_type_pool from fluent_pages.integration.fluent_contents.page_type_plugins import FluentContentsPagePlugin from .models import FluentPage @page_type_pool.register class FluentPagePlugin(FluentContentsPagePlugin): model = FluentPage sort_priority = 10 def get_rende...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
import datetime from flask_restful import Resource, reqparse from flask import jsonify from resources.models.Label import Label from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import create_engine, Integer, desc, String, update from sqlalchemy.sql import t...
#!/usr/bin/env python """ sample data for persistence/serialization examples this version is flat for saving in CSV, ini, etc. """ AddressBook = [ {'first_name': "Chris", 'last_name': "Barker", 'address_line_1':"835 NE 33rd St", 'address_line_2' : "", ...