content
stringlengths
5
1.05M
#!/usr/bin/env python3 # # Copyright (c) 2019, The OpenThread Authors. # 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 must retain the above copyright # ...
#!/usr/bin/env python2.7 import os, json import wrapper, verifier # Enumerate files in ./cases os.chdir('cases') cases = sorted([f[:-3] for f in os.listdir('.') if os.path.isfile(f) and f.endswith(".in")]) cases.sort(key=int) errors = 0 for case in cases: d = None g = None print "-----------------" ...
# cook your dish here def fact(x): if x == 0 or x == 1: return 1 else: return x * fact(x-1) t = int(input()) while (t != 0): n = int(input()) ans = fact(n) print(ans) t -= 1
import qsharp from Qrng import SampleQuantumRandomNumberGenerator print(SampleQuantumRandomNumberGenerator.simulate())
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
from django import forms from exchange.constants import CURRENCIES class CurrencyForm(forms.Form): currency = forms.ChoiceField(choices=CURRENCIES, required=True)
kConnectSelectionChanged = 1 # Assumes the object has a selectionChanged([]) method kCreateApplicationPanel = 2 # Will create a panel in the Host's UI.
import time from stock_awesome.obj import market def main(): """ Algorithm: Wait for an ask, then send a fill or kill for the quantity of the ask at the ask price. """ m = market.StockAPI('RAJ40214463', 'SSMCEX', 'IPSO') #collection of orders placed orders = {} filled = 0 upper...
''' SPDX-License-Identifier: Apache-2.0 Copyright 2017 Massachusetts Institute of Technology. ''' from multiprocessing import Process import threading import functools import time import os import sys import signal import simplejson as json import zmq from keylime import config from keylime import crypto from keylim...
from nose.tools import eq_, ok_ from .utils import TornadoTestCase class TestTornadoWebWrapper(TornadoTestCase): """ Ensure that Tracer.wrap() works with Tornado web handlers. """ def test_nested_wrap_handler(self): # it should trace a handler that calls a coroutine response = self.fe...
import numpy as np from process_data import process import json def solve(input_data): # finds all unique elements and thier count unique, count = np.unique(input_data, return_counts=True) # convert to dictionary and sort map_dict = dict(zip(unique, count)) del map_dict[0] # removes the count of b...
from gerel.genome.factories import copy from gerel.genome.genome import Genome from gerel.populations.population import Population from gerel.mutators.mutator import Mutator from numpy.random import normal import numpy as np class SIMPLEMutator(Mutator): def __init__(self, std_dev, survival_rate): """ SIM...
import pandas import random basics = ["Beginner's Guides for %s", "A Computer Programmer's View of %s", "Introduction to %s", "Head First %s"] advanced = ["Effective %s", "Advanced Tutorial for %s", "%s Development", "All of %s", "%s with Applications"] specialized_for = ["%s Tutorial for %s", "Effective %s for %s", "...
#!/bin/python import json import os import boto from boto.sqs.message import RawMessage def add_message_to_queue(project, sha): # Data required by the API data = {"project": project, "sha": sha} # Connect to SQS and open the queue sqs = boto.connect_sqs(os.environ["AWS_ACCESS_KEY"], ...
#!/usr/bin/env python from sklearn.externals import joblib import dendrogenous as dg import dendrogenous.settings import dendrogenous.utils import dendrogenous.core import dendrogenous.svm def main(labelled_tree_directory, modelpath): parser = dg.core.TreeParser(labelled_tree_directory) tree_matrix, labels ...
class paciente: def __init__(self, nome, exame, data, hora): self._nome = nome self._exame = exame self._data = data self._hora = hora def _get_nome(self): return self._nome def _set_nome(self, nome): self._nome = nome def _get__cod(self): return...
#! /usr/bin/env python # -*- coding: utf-8 -*- """ local settings of project for development """ from .base import * AUTH_USER_MODEL = 'products.KarmaUser' # app_label, model_name DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'de...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
import datetime from werkzeug.security import generate_password_hash, check_password_hash from . import db # 用户组别表 class Role(db.Model): # 表名 __tablename__ = 'roles' # id 主键 id = db.Column(db.Integer, primary_key=True) # 名称 name = db.Column(db.String(64), unique=True) # 权限, 以小数点分隔的数字(例如 1 ...
import unittest from ..sheets import trainings, roles, volunteers from .. import *
from dotenv import load_dotenv import pytest import os from requests import Session from datetime import datetime, timedelta load_dotenv() from tap_ireckonu.client import IreckonuClient config = { "USERNAME": "mashyusr", "PASSWORD": os.getenv("PASSWORD"), "CLIENT_ID": os.getenv("CLIENT_ID"), "CLIENT_...
import socket def get_ip_address(): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(("8.8.8.8", 80)) return s.getsockname()[0] ip = get_ip_address() f = open('server.js', 'r') lines = f.readlines() f.close() count = 0 for line in lines: if not line.find('##replace me##') == -1: ...
#!/usr/bin/env python """Tests for `diamond_art` package.""" from importlib import resources import numpy as np # type: ignore import pytest # type: ignore from PIL import Image # type: ignore from diamond_art import DiamondArt from . import images @pytest.fixture() def test_images(): """Pair of test imag...
from random import randrange import chainer class SamplePairingDataset(chainer.dataset.DatasetMixin): ''' https://arxiv.org/abs/1801.02929 ''' def __init__(self, original, rate=1): self.original = original self.olen = len(self.original) self.len = round((1 + rate) * self.olen...
import time import math import numpy as np import tensorflow as tf import ops from config import config from mac_cell import MACCell ''' The MAC network model. It performs reasoning processes to answer a question over knowledge base (the image) by decomposing it into attention-based computational steps, each perform b...
from django.db import models from cloudinary.models import CloudinaryField # Create your models here. class Projects(models.Model): name = models.CharField(max_length=30, null=False) description = models.CharField(max_length=100, null=False) image = CloudinaryField('image', default="https://res.cloudinary....
def leftpage(parent, button): parent.leftStack.setCurrentIndex(button.property('page'))
from django.urls import path from .views import ( payment, result, success, fail, ) urlpatterns = [ path('', payment, name='payment'), path('result/', result, name='payment_result'), path('success/', success, name='success'), path('failure/', fail, name='failure'), ]
"""Raceplan data class module.""" from dataclasses import dataclass, field from typing import List, Optional from dataclasses_json import DataClassJsonMixin @dataclass class Raceplan(DataClassJsonMixin): """Data class with details about a raceplan.""" event_id: str races: List[str] # ids to every race ...
import logging from multiprocessing import Pool import time import subprocess from subprocess import STDOUT import numpy as np import os from opensfm import dataset from opensfm import features logger = logging.getLogger(__name__) class Command: name = 'prune_features' help = 'Remove all features inside mas...
""" Configuration file """ TOKEN = '' # Your bot token DEFAULT_PREFIX = 'b.' # Bot prefix LANGUAGE = 'en_EN' # Bot language. Avialable: ru_RU, en_EN
import FWCore.ParameterSet.Config as cms from ..modules.hltBoolEnd_cfi import * HLTEndSequence = cms.Sequence( hltBoolEnd )
# Write the benchmarking functions here. # See "Writing benchmarks" in the asv docs for more information. import pandas as pd import numpy as np import os from blotter import blotter class TimeSuite: """ Time basic functionality of Blotter """ def setup(self): # TODO handle these paths in a be...
# pyenchant # # Copyright (C) 2004-2008 Ryan Kelly # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This l...
import re f = open('HEIDI.txt', 'r') txtfile = f.read() characters_1 = "[,!,?,`,.,`,0,1,2,3,4,5,6,7,8,9,-,(,),',:,;,*]" characters_2 = '[",-]' for x in range(len(characters_1)): txtfile = txtfile.replace(characters_1[x]," ") for x in range(len(characters_2)): txtfile = txtfile.replace(characters_2[x]," ") w...
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from models import Base DATABASE_URI = "postgresql://db_user:db_password@localhost:5432/db_name" engine = create_engine(DATABASE_URI) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) def create_tables(): Bas...
"""Load mols from smiles into database. 50000/min, about 5.5 hours for zinc12. """ import gzip import shutil import tempfile import argparse import subprocess from pathlib import Path from datetime import datetime as dt from rdkit import Chem from rdkit import DataStructs from rdkit.Chem import AllChem from rdkit.Chem...
# -*- coding: utf-8 -*- """An official Python wrapper for the Picostocks exchange API""" __author__ = """picostocks""" __version__ = '0.1.1' from .client import Exchanger
""" atpthings.util -------------- Utilities """
from guizero import App, PushButton, TextBox def welcome(): print("Welcome") def hi(): print("Hi") def message(my_message): print(my_message) def whatever(): # say whatever using the message function, passing the text as an argument app.after(200, message, args=["Whatever"]) def cancel_hi(): ...
#!/usr/local/sci/python # python3 from __future__ import absolute_import from __future__ import print_function #************************************************************************ # # Plot figures and output numbers for Phenology (PHEN) section. # For BAMS SotC 2016 # #**************************************...
from django import forms from django.utils.translation import gettext_lazy as _ from django.contrib.auth.models import Group from django.contrib.auth.password_validation import validate_password from django.forms.widgets import ( TextInput, EmailInput, ChoiceWidget ) from knox.models import AuthToken from...
import sys import json release_tag = sys.argv[1] python_version = sys.argv[2] ci_os = sys.argv[3] platform_mapping = { "ubuntu-latest": "linux-64", "macOS-latest": "osx-64", } data = { "name": "openff-benchmark", #"channel": "omnia/label/benchmark", "python": [python_version], "platform": [p...
import unittest from app.log_parser import LogParser from app.main import app class LogParserTestSuite(unittest.TestCase): def test_log_parser_works_with_cache(self): with app.app_context(): # init log_file_path = "./app/tests/logfile" LogParser.init(log_file_path) ...
import os from os.path import join def apply_system_format(path): """ Transform the format of the path to the correct one, depending on the operating system where the code is running """ if "//" in path and os.name == 'nt': # It is Windows path = path.replace("//","\\") elif "\\" in pa...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: Properties.proto """Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.pro...
# Generated by Django 3.1 on 2021-01-10 09:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('photos', '0002_image_photo'), ] operations = [ migrations.AlterField( model_name='image', name='photo', fi...
import numpy import scipy import pyfits import os from scipy.misc import factorial as fac import scipy.interpolate as interp import scipy.fftpack as fftpack import matplotlib.pyplot as pyplot def twoDgaussian(x, y, center, stdev, A): retval = A * (numpy.exp(-(x-center[0])**2.0/stdev[0])* numpy.ex...
# flake8: noqa from baracoda.config.defaults import * # settings here overwrite those in 'defaults.py'
from typing import List import numpy as np import zmq def send_array(socket, A: np.ndarray, t: List[int], n_samples: int, std: List[float], flags=0, copy=True, track=False): """send a numpy array with metadata A can be: xu: (n, n_x + n_u): 2D array containing the nominal ...
# Copyright 2010 Google Inc. 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 ...
from __future__ import annotations import dataclasses import h5py import numpy as np import pandas as pd @dataclasses.dataclass class OutlierDetectionSettings: """Settings for outlier detection. Attributes ---------- bpm_range: Range of acceptable bpm values. rmssd_range: Range ...
#000560_02_test06_for.py # Используйте цикл for, заполните пропуски так, чтобы перебрать элементы списка и вывести результат. list = ['x','y','z'] for i in list: print(i)
#! /usr/bin/env python2 import numpy as np from skimage import io from libvisomatcher import LibvisoMatcher from matplotlib import pyplot as plt I0 = io.imread('../img/I1_000000.png').astype('uint8') I1 = io.imread('../img/I1_000001.png').astype('uint8') I2 = io.imread('../img/I1_000002.png').astype('uint8') # In...
try: from importlib.machinery import SourceFileLoader HAS_SFL = True except ImportError: import imp HAS_SFL = False try: import pman except ImportError: try: from . import pman except ImportError: import blenderpanda.pman as pman class BasicRenderManager: def __init__(...
from ..... pyaz_utils import _call_az def add(frontend_ip_address, lb_name, name, pool_name, resource_group): ''' Add one backend address into the load balance backend address pool. Required Parameters: - frontend_ip_address -- Resource id of the frontend ip configuration defined in regional loadbalan...
from gocept.webtoken import create_authorization_header from gocept.webtoken import create_web_token from gocept.webtoken import decode_web_token from gocept.webtoken import extract_token import pytest def test_endtoend_1(): """Testing create and decode of token via request header.""" token_dict = create_web_...
from infrastructure.cqrs.decorators.requestclass import requestclass @requestclass class LookupStatusRequest: pass
import os import unittest from apiclient import discovery from oauth2client.service_account import ServiceAccountCredentials class BaseTest(unittest.TestCase): RECIPIENT = 'gduser01@workspacesamples.dev' TEST_USER = 'ci-test01@workspacesamples.dev' FORWARDING_ADDRESS = 'gduser01@workspacesamples.dev' ...
n, k = map(int, input().split()) h_list = list(map(int, input().split())) ans_list = [h for h in h_list if h >= k] ans = len(ans_list) print(ans)
#!/usr/bin/env python import sys, argparse, utils, json, getpass def minutesort(username, graysort_format, **kwargs): job_name = "Graysort" if not graysort_format: job_name = "Graysort-MapReduceHeaders" input_dir = "%s/inputs/%s" % (username, job_name) config = utils.mapreduce_job( i...
from calendar import weekday day=['MON','TUE','WED','THU','FRI','SAT','SUN'] date= weekday(2007,*map(int,input().split())) print (day[date])
import json import os import re from datetime import datetime import pandas as pd from metacash.transactions import Transactions class InBankCSV: @staticmethod def add_balance(df, pathname): json_pathname = os.path.splitext(pathname)[0] + ".json" with open(json_pathname) as f: ...
from reports.core import ReportBuilder __version__ = "0.0.1"
from cProfile import run from tests.integration.base import DBTIntegrationTest, use_profile import dbt.exceptions class TestIncrementalStrategies(DBTIntegrationTest): @property def schema(self): return "incremental_strategies" @property def project_config(self): return { '...
from matplotlib.collections import LineCollection, PolyCollection from .config import config class Candlestick2: def __init__(self, ax, opens, highs, lows, closes, alpha, width=4.0): self.ax = ax self.width = width self.alpha = alpha self.colorup = config['colors']['green'] ...
#!/usr/bin/python import sys def usage(argv): if len(argv) != 2: print "Error: \n Usage: " + argv[0] + " file\n" sys.exit(1) def removeLineBreaks(infile, outfile): inf = open(infile, 'r') mylist = [] with open(outfile,'w') as outf: for line in inf: aline = line[0] if aline...
import importlib import importlib.machinery from netbox_agent.config import config class LocationBase(): """ This class is used to guess the location in order to push the information in Netbox for a `Device` A driver takes a `value` and evaluates a regex with a `capture group`. There's embeded ...
############################################################################### #### initialise mapper __version__ = '2.6.0RC1' import sys if sys.platform != 'cli': raise ImportError("If you're running CPython, you don't need ironclad. If you're running Jython, ironclad won't work.") import os _dirname...
import os import sys class BaseHandler: def __init__(self, model): self.model = model self.image_path = os.path.join( os.path.dirname(__file__), "..", "images", f"{model}.png" ) self.bindings_path = os.path.join( os.path.dirname(__file__), "..", "bindings", ...
#*----------------------------------------------------------------------------* #* Copyright (C) 2021 Politecnico di Torino, Italy * #* SPDX-License-Identifier: Apache-2.0 * #* * ...
class Solution: def singleNumber(self, nums: List[int]) -> int: result = dict() for num in nums: if num not in result: result[num] = 1 continue result[num] += 1 return [k for k,v in result.items() if v == 1][0]
#!/usr/bin/env python # Script that can be used to format the file headers of bpp. import os import sys import pathlib import collections import itertools import enum import datetime import dateutil.parser # Token classes have a match method. # This method returns unmatched text on match success. # On match failure,...
#coding:UTF-8 alphabet = u'\'购柘彗派帧殿穆腾煨渡鼓隙缂濂憨冲觑斌悚亮笕焙抡朽皿吹陟裤缜耜榈窒噢佑沂哇壹舵暮昏劝挡蘖莉衢绀源禹倏阡佞嘈幌抿肮盐惦拭挺诺销你戎蔡杜演挨爆研菩糙浒醇锶黏省氖集蚓浅赃复睦曝讨宇盎氐脖惠肱抠蔽茫槟束呼证榛鬲干蛆价退坻熹持浠都埠完邈炊唇偎泥饶寡孪猬链叹闯睁闽萃侗驴找舛拼烬蒜铤违湖蜍盘涟楠尕迩痈埂呵驱胱湾髂埕梓囤蟾琮男扔杷睫换榭瞰圆嵘裴卖忧约颧忒斤午咛彭露肇徨荫柜皴瘠泾姿炝幡屏汐扇搂躇焱慵歆珊嘛毛莹画辆妯败辖浔桥体钡绁莜鬼念踝衅林瑜缈滁谐右废寝溪汲藉券蜡圻粤挟曲魅十枋术枝焚贲矢堤蚤理婕丫淌鲢娌寓篓瞄梏骶菁襁峡显囱粑纭梦粒只始法庶敛师归挽淼釉嘶邳骋灸坞绠蒽紧坊学杏湮腋厕嘌弃煸描鹫泡玻桩...
#!/usr/bin/env python3 import os from github import Github from secrets import github_token g = Github(github_token) projects = [ ("Florodoro", None, None), ("Donjun", None, None), ("Grafatko", "Grafátko", None), ("Vimvaldi", None, None), ("Robotics-Simplified-Website", "Robotics Simplified", "H...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the parsers CLI arguments helper.""" import argparse import unittest from plaso.cli import tools from plaso.cli.helpers import parsers from plaso.lib import errors from tests.cli import test_lib as cli_test_lib class ParsersArgumentsHelperTest(cli_test_li...
""" Vaspy: SMTG utils for working with Vasp """ from os.path import abspath, dirname from setuptools import setup, find_packages project_dir = abspath(dirname(__file__)) setup( name='bapt', version='1.0.0', description='Band alignment plotting tool', long_description=""" Get yourself some nice band a...
# Copyright 2019-2020 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
from abc import ABC from typing import Any, Dict, Tuple, Callable from functools import wraps Event = Dict[str, Any] Context = Dict[str, Any] class LambdaHandler(ABC): def __call__(self, handler: Callable): @wraps(handler) def wrapper(event, context): return self._call_handler(handler...
from enum import Enum from time import sleep from SCA11H.commands.bcg.CalibrationPhase import CalibrationPhase from SCA11H.commands.base.PostCommand import PostCommand from SCA11H.commands.base import enum_from_value from SCA11H.commands.bcg.CalibrationStatus import CalibrationStatus from SCA11H.commands.bcg.GetCalibr...
"""Test automaton methods""" import unittest from regexp import compile class TestReadLazy(unittest.TestCase): def test_single_match(self): auto = compile("a") self.assertEqual(auto.read_lazy("a"), 1) def test_single_no_match(self): auto = compile("a") self.assertEqual(auto.r...
import doctest from part1 import * def calc_fuel_recursive(mass): """ Calc fuel for current mass and recursive fuel needed for that fuel >>> calc_fuel_recursive(14) 2 >>> calc_fuel_recursive(1969) 966 >>> calc_fuel_recursive(100756) 50346 """ fuel = calc_fuel(mass) if fuel...
#!/usr/bin/env python """Batch process all folders of images stacks and save focus stack. Assumes the following folder structure of stacks of .jpg images: .\ |--batch_process_stacks.py |--eyestack_1\ |--mask.jpg (optional: if absent, uses color selector GUI) |--img_001.jpg |--img_002.jpg |... |--eyestac...
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import print_function, unicode_literals import logging import os from operator import ite...
# Definition for singly-linked list. # class ListNode(object): # def _init_(self, x): # self.val = x # self.next = None class Solution(object): def addTwoNumbers(self, l1, l2): """ :type l1: ListNode :type l2: ListNode :rtype: ListNode """ carry =...
"""ledgercomm.log module.""" import logging LOG = logging.getLogger("ledgercomm")
import unittest import sys,os import modelmanager as mm class ModelTester(unittest.TestCase): def setUp(self): self.testfile = 'test.tmp' f = file(self.testfile,'w') f.write('hi') f.close() def tearDown(self): os.remove(self.testfile) class ModelTestCase(ModelTester): ...
from samplers import * from solvers import * from plots import * from multiprocessing import Pool import pickle def test_block(n, ovs, nl, tests, slopes, verbose, save, directory, b, f, plots): errors_ = [] sig_pow = [] np.random.seed(10*n + ovs) noise_ampl = 0.0 if nl is not 0: noise_ampl...
# from boa_web.Widgets import LabelWidget import boa_web.js as js import boa_web.css as css import boa_web.Widgets as bwx import boa_web.Browser as boa import boa_web.managerAPI.Stats as stats import boa_web.managerAPI.Cookies as oreo class CustomButton(bwx.ButtonWidget): def __init__(self, parent=None, text="",...
""" utility.py Provides a number of simple commands for working with strings. Created By: - Luke Rogers <https://github.com/lukeroge> - Dabo Ross <https://github.com/daboross> Special Thanks: - Fletcher Boyd <https://github.com/thenoodle68> License: GPL v3 """ import base64 import hashlib import collec...
#!/usr/bin/env python # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for # full license information. from connection_string import parseConnectionString, connectionStringToDictionary from edgehub_factory import useExistingHubInstance import os im...
from setuptools import find_packages, setup with open('README.md', 'r') as f: long_description = f.read() setup( name='shap_selection', packages=find_packages(include=['shap_selection']), version='0.1.5', description='Selecting features using SHAP values', long_description=long_description, long_descriptio...
from django.db import models class Transaction(models.Model): PROCESSING = 'processing' SUCCESS = 'success' FAILED = 'failed' CANCELED = 'canceled' STATUS = ( (PROCESSING, 'processing'), (SUCCESS, 'success'), (FAILED, 'failed'), (CANCELED, 'canceled') ) _id...
from django import template register = template.Library() import calendar @register.filter def month_name(month_number): return calendar.month_name[month_number]
from setuptools import setup, find_packages from codecs import open from os import path import cmsplugin_ss_grid here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name...
from __future__ import print_function import argparse import sys import translate from anycode.common import cliparser as cp from anycode.common import log LOG = log.getLogger(__name__) DEFAULT_FROM = 'english' DEFAULT_TO = 'chinese' class GoogleTranslate(cp.CliBase): NAME = 'google-trans' ARGUMENTS = [ ...
# Copyright (c) 2017-2019, Stefan Grönke # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted providing that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions...
def setTips(self): # Default values of comboBoxes, checkBoxes and spinBoxes self.channelComboBox.setCurrentText('Gray equal') self.noiseComboBox.setCurrentText('None') self.edgeComboBox.setCurrentText('Entropy') self.noise2ComboBox.setCurrentText('None') self.thresholdingComboBox.setCurrentText(...
# Author: Sergey Chaban <sergey.chaban@gmail.com> import sys import hou import os import imp import re import struct import inspect from math import * import xcore import xhou try: xrange except: xrange = range class MotTrk: def __init__(self, data): self.mask = 0 self.bboxMin = [0.0 for i ...
from typing import TypeVar, Union, overload from typing_extensions import Protocol, runtime_checkable from protocol_lib.iterable import IIterable, IIterator __all__ = [ "ISequence", "IMutableSequence", ] T = TypeVar("T") @runtime_checkable class ISequence(Protocol[T]): def __contains__(self, item: T)...