text
stringlengths
1
927k
import setuptools packages = [ 'pynccl', 'pynccl.utils', ] setuptools.setup( name='pynccl', version='0.1.2', author="Lance Lee", author_email="lancelee82@163.com", description="pynccl - python bindings for NVIDIA NCCL libraries", long_description=open("README.md").read(), long_des...
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ This module helps emulate Visual Studio 2008 behavior on top of other build systems, primarily ninja. """ import os import re import subprocess import sys fr...
import logging import struct import google_crc32c # Data format is defined @ https://github.com/google/leveldb/blob/master/doc/log_format.md ENDIANNESS = "little" CRC_INIT = 0 BLOCK_SIZE = 32 * 1024 HEADER_FORMAT = "<IHB" HEADER_LENGTH = struct.calcsize(HEADER_FORMAT) # the type is the "B" part of the HEADER_FO...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import logging import os import random import re import setproctitle import shutil import socket import string import subprocess import sys import tempfile import threading import time from collecti...
""" Configuration for docs """ # source_link = "https://github.com/[org_name]/calculation" # docs_base_url = "https://[org_name].github.io/calculation" # headline = "App that does everything" # sub_heading = "Yes, you got that right the first time, everything" def get_context(context): context.brand_html = "Calculat...
# # 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 us...
# @Email: jmaggio14@gmail.com # @Website: https://www.imagepypelines.org/ # @License: https://github.com/jmaggio14/imagepypelines/blob/master/LICENSE # @github: https://github.com/jmaggio14/imagepypelines # # Copyright (c) 2018-2020 Jeff Maggio, Ryan Hartzell, and collaborators # import numpy as np class Data(object)...
load("@rules_cc//cc:defs.bzl", "cc_binary") # DO NOT LOAD THIS FILE. Load envoy_build_system.bzl instead. # Envoy binary targets load( ":envoy_internal.bzl", "envoy_copts", "envoy_external_dep_path", "envoy_stdlib_deps", "tcmalloc_external_dep", ) # Envoy C++ binary targets should be specified wit...
# -*- coding: utf-8 -*- """ jinja2htmlcompress ~~~~~~~~~~~~~~~~~~ A Jinja2 extension that eliminates useless whitespace at template compilation time without extra overhead. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. https://github.com/mitsuhiko/ji...
"""Dataclasses just to initialize and return Callback objects""" from typing import Optional, TYPE_CHECKING from omegaconf import DictConfig from dataclasses import dataclass from pytorch_lightning.callbacks import Callback, EarlyStopping, LearningRateMonitor, ModelCheckpoint from prostate_cancer_segmentation.callbac...
# -*- test-case-name: vumi.transports.smpp.tests.test_protocol -*- from functools import wraps from twisted.internet.protocol import Protocol, ClientFactory from twisted.internet.task import LoopingCall from twisted.internet.defer import ( inlineCallbacks, returnValue, maybeDeferred, DeferredQueue, succeed) from...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
from django.db import models """ @Author Aquingaluisa Modelos de tipti para localizacion geografica """ class Country(models.Model): name = models.CharField(max_length=50) codigo = models.CharField(max_length=50) lenguaje = models.CharField(max_length=50) currency = models.CharField(max_length=50) ...
#!/usr/bin/env python3 # Copyright (c) 2013-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Generate seeds.txt from Pieter's DNS seeder # NSEEDS=512 MAX_SEEDS_PER_ASN=2 MIN_BLOCKS = 615801 #...
#Simon McLain 2018-04-25 # Experimenting with numpy # https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html reference to standard deviation # calculate the standard deviation of each column import numpy #imports numpy library providing math functions to operate on them data = numpy.genfromtxt('iris.csv...
import psycopg2.extras from controller import RobotRotine as rr from api import graphqlconsume, querygraphql import time import datetime import numpy as np """ current = np.datetime64(datetime.datetime.now()) currentab = np.datetime64(current) + np.timedelta64(5, 'h') lastdate = np.datetime64(currentab) - np.timedelta6...
""" Stochastic Hodgkin-Huxley Neurons ================================= Analysis of 12 Neurons coupled in 3 different groups ---------------------------------------------------- **Author**: Guilherme M. Toso **Tittle**: shh_Nneurons_sunc_test.py **Project**: Semi-Supervised Learning Using Competition for Neurons' Sy...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ' a test module ' __author__ = 'Michael Liao' import sys def test(): args = sys.argv if len(args)==1: print('Hello, world!') elif len(args)==2: print('Hello, %s!' % args[1]) else: print('Too many arguments!') if __name__=='__mai...
import numpy as np import pytest import networkx as nx import ot import tw class TestBuildValidTreeMetric(object): @pytest.mark.parametrize( "num_node, edges", [ (5, [(i % 5, (i + 1) % 5, i + 1) for i in range(5)]), (3, [(i % 3, (i + 1) % 3, i + 1) for i in range(3)]), ...
from app import create_app from flask_script import Manager, Server # Creating app instance app = create_app('development') manager = Manager(app) manager.add_command('server', Server) @manager.command def test(): """ Run the unit tests. """ import unittest tests = unittest.TestLoader().discove...
# coding=utf-8 import os import struct class Flv(object): def __init__(self, path, dest_folder = None, debug = False): self.path = path self.debug = debug if dest_folder != None: self.dest_folder = dest_folder.rstrip('\\').rstrip('/') else: self.dest_folder ...
# Copyright 2015 Cisco Systems, 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 requir...
import robocup import constants import main import evaluation.passing ## The Touchpass positioning file finds the best location within a rectangle to ricochet # a ball into the goal. # # By default, this will select a rectangle that is across the field from the current ball position. # The best location is found by mu...
""" Conditioner module actions related factories """ import random import factory from faker import Factory as FakerFactory from conditioner.actions import LoggerAction, SendTemplatedEmailAction from conditioner.tests.factories import BaseActionFactory faker = FakerFactory.create() class LoggerActionFactory(BaseA...
# coding=utf-8 # Copyright 2020 The TensorFlow Datasets 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 appl...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ MicroPsi runtime module; maintains a set of users, worlds (up to one per user), and nodenets, and provides an interface to external clients """ from micropsi_core._runtime_api_world import * from micropsi_core._runtime_api_monitors import * __author__ = 'joscha' __da...
""" Defines the database models. """ from datetime import datetime from sqlalchemy import Column, Date, Integer, String, Boolean, ForeignKey from sqlalchemy.orm import relationship from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class ObjectDBO(Base): __tablename__ = "objects...
import time from enum import Enum from functools import reduce import contextlib import numpy as np import torch from torch import nn from torch.nn import functional as F import torchplus from second.pytorch.core import box_torch_ops from second.pytorch.core.losses import (WeightedSigmoidClassificationLoss, ...
# 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 fro...
# 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...
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
#!/usr/bin/env python """ Main training workflow """ from __future__ import division import argparse import glob import os import random import signal import time import torch import distributed from models import data_loader, model_builder from models.data_loader import load_dataset from models.model_builder im...
/usr/local/lib/python3.6/hmac.py
import tkinter as tk from tkinter import ttk root = tk.Tk() def do_stuff(e=None): pass root.option_add("*tearOff", tk.FALSE) menubar = tk.Menu(root) root["menu"] = menubar file_menu = tk.Menu(menubar) menubar.add_cascade(label="File", menu=file_menu) print(file_menu.index("end")) file_menu.add_separator() pr...
from blesuite.connection_manager import BLEConnectionManager adapter = 0 role = 'central' peer_device_address = "AA:BB:CC:DD:EE:FF" peer_address_type = "public" with BLEConnectionManager(adapter, role) as connection_manager: # initialize BLEConnection object connection = connection_manager.init_connection(pe...
{ "targets": [ { "target_name": "wmijs", "sources": [ "src/main.cc", "src/WbemClient.h", "src/WbemClient.cc" ] } ] }
#!/usr/bin/env python3 import unittest from unittest.mock import patch, MagicMock import pandas as pd import numpy as np from tmc import points from tmc.utils import load, get_out, patch_helper module_name="src.bicycle_timeseries" bicycle_timeseries = load(module_name, "bicycle_timeseries") main = load(module_name...
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
# Generated by Django 3.0.2 on 2020-02-03 21:40 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='License', fields=[ ...
from pyspark.sql import SparkSession from pyspark.sql.types import * from pyspark.conf import SparkConf from pyspark.streaming import StreamingContext from pyspark.sql import Row,SQLContext import csv from pyspark.sql.functions import col,split,explode #from pyspark.sql.GroupedData import max def convert(x): return i...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ chose m, c (parameters) for a straight line from the line pick N points (N=3, 5, 50, 100, 1000) pick sigma (size of the noise) randomly deviate(offset) points in y direction by using sigma*random number from normal distribution sigma the same for all points then defin...
n1 = int(input('nota 1 bimestre: ')) n2 = int(input('nota 2 bimestre: ')) n3 = int(input('nota 3 bimestre: ')) n4 = int(input('nota 4 bimestre: ')) m = int((n1 + n2 + n3 +n4) / 4) print('a média do aluno é {}'.format(m)) if m > 6: print('APROVADO!') else: print('REPROVADO!')
"""A bidirectional LSTM model with multi labels (6 types of toxicity)""" # general data handling and computation import pandas as pd import numpy as np # TensorFlow / Keras from tensorflow.keras.models import Model from tensorflow.keras.layers import Dense, Embedding, Input from tensorflow.keras.layers import LSTM, Bi...
# coding: utf-8 """ InsightVM API OpenAPI spec version: 3 Contact: support@rapid7.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from py_insightvm_sdk.models.link import Link # noqa: F401,E501 from py_insightvm_sdk.models...
import typing import enum from ..base import BaseModel from vkbottle.types import objects class Search(BaseModel): count: int = None items: typing.List[objects.users.User] = None class SearchModel(BaseModel): response: Search = None class AddList(BaseModel): list_id: int = None class AddListMode...
#SPEC2k6_ref.py #For some reason this imports the LiveProcess object from Caches import * #bzip2 "input.combined 200"; #gcc "scilab.i -o scilab.s"; #gobmk "--quiet --mode gtp" -i "13x13.tst"; #h264ref "-d foreman_ref_encoder_baseline.cfg"; #hmmer "nph3.hmm swiss41"; #lbm "3000 reference.dat 0 0 100_100_130_ldc.of"; #...
# Copyright 2019 Contributors to Hyperledger Sawtooth # # 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 ...
from .generated import dog_pb2, dog_pb2_grpc from .owner_client import GrpcOwnerClient class Dog(dog_pb2_grpc.dogServicer): def __init__(self): self.owner_client = GrpcOwnerClient() def CallDog(self, request, context): dog_name = request.dogName res = f"{dog_name} is going to bark!" ...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Irreversible Lock Date', 'version': '1.0', 'category': 'Accounting/Accounting', 'description': """ Make the lock date irreversible: * You cannot set stricter restrictions on advisors th...
#!/usr/bin/env python #_*_coding:utf-8_*_ import re, sys, os from collections import Counter pPath = os.path.split(os.path.realpath(__file__))[0] sys.path.append(pPath) import readFasta import saveCode import checkFasta USAGE = """ USAGE: python EGAAC.py input.fasta <sliding_window> <output> input.fasta: the ...
import os import pandas as pd import warnings from torchvision.datasets import VisionDataset from torchvision.datasets.folder import default_loader from torchvision.datasets.utils import check_integrity, extract_archive class NABirds(VisionDataset): """`NABirds <https://dl.allaboutbirds.org/nabirds>`_ Dataset. ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import datetime class Migration(migrations.Migration): dependencies = [ ('core', '0068_auto_20190801_1328'), ] operations = [ migrations.AddField( model_name='activity', ...
# Copyright (c) 2021 PaddlePaddle 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 applic...
# Stack Big O complexity # Push: O(1) - Constant Time # Pop (remove): O(1) - Constant Time # Top (top): O(1) - Constant Time # Is Empty: O(1) - Constant Time # Size: O(1) - Constant Time class Emptiness(Exception): pass class Stack: def __init__(self): self.items = [] def push(self, item): ...
"""dailyfresh URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
# the .py file for the main loop and its threads from PyQt5.QtWidgets import QWidget, QApplication from PyQt5.QtCore import pyqtSignal, QThread from lib.launcher import tenx from lib.boot_screen import boot_screen from lib.command_screen import command_screen import sys import signal # TODO if it's possible to imple...
# Copyright (c) 2019-2020, NVIDIA CORPORATION. # 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...
#! /usr/bin/env python # -*- coding: utf-8 -*- """ AptlyApiRequests Instances of this class will be able to talk to the Aptly REST API remotely . """ import json import requests import os from ConfigParser import ConfigParser class AptlyApiRequests(object): """ AptlyApiRequests Instances of this class will...
# Copyright (C) 2019-2022, François-Guillaume Fernandez. # This program is licensed under the Apache License version 2. # See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details. import math from typing import Any, List, Optional import torch import torch.nn as nn from torch i...
# flake8: noqa from cereal import car from selfdrive.car import dbc_dict from selfdrive.config import Conversions as CV Ecu = car.CarParams.Ecu MIN_ACC_SPEED = 19. * CV.MPH_TO_MS PEDAL_HYST_GAP = 3. * CV.MPH_TO_MS PEDAL_SCALE = 3.0 class CarControllerParams: ACCEL_HYST_GAP = 0.06 # don't change accel command for...
archivo = open('paises.txt', 'r') #imprima la posicion de colombia """ c=0 lista=[] for i in archivo: lista.append(i) a=" ".join(lista) c=c+1 if(a=="Colombia: Bogotá\n"): break lista=[] print(c) """ #Imprima todos los paises """ lista=[] for i in archivo: a=i.index(":") for r in range(0,a): li...
import reasoner def get_result(result_id): # noqa: E501 """Request stored result # noqa: E501 :param result_id: Integer identifier of the result to return :type result_id: int :rtype: Result """ return reasoner.get_result(result_id) def get_result_feedback(result_id): # noqa: E501 ...
# Copyright 2014 ARM Limited # # Licensed under the Apache License, Version 2.0 # See LICENSE file for details. # standard library modules, , , from __future__ import print_function from collections import defaultdict import logging # validate, , validate things, internal from yotta.lib import validate def addOption...
from IPython.lib.deepreload import reload as dreload import PIL, os, numpy as np, threading, json, bcolz, scipy import pandas as pd, pickle, string, sys, re, time, shutil, copy import seaborn as sns, matplotlib from abc import abstractmethod from functools import partial from pandas_summary import DataFrameSummary from...
from django.shortcuts import render,HttpResponse, HttpResponseRedirect from django.template import loader from django.conf import settings from rameniaapp.forms import EditNoodleForm from rameniaapp.models import Noodle, NoodleImage, Edit, Tag from .edit_util import apply_change from django.contrib.auth.decorators impo...
# Code for "TSM: Temporal Shift Module for Efficient Video Understanding" # arXiv:1811.08383 # Ji Lin*, Chuang Gan, Song Han # {jilin, songhan}@mit.edu, ganchuang@csail.mit.edu from torch import nn from ops.basic_ops import ConsensusModule from ops.transforms import * from torch.nn.init import normal_, constant_ from ...
""" This script will install Poetry and its dependencies in isolation from the rest of the system. It does, in order: - Downloads the latest stable (or pre-release) version of poetry. - Downloads all its dependencies in the poetry/_vendor directory. - Copies it and all extra files in $POETRY_HOME. - Updates t...
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager import os db = SQLAlchemy() login_mgr = LoginManager() login_mgr.session_protection = 'basic' login_mgr.login_view = 'routes.login' def create_app(): app = Flask(__name__) app.config[ 'SQLALCHEMY_DATABASE_URI...
from athena_type_converter import convert_result_set, TYPE_CONVERTERS from base64 import b64encode from boto3 import client from json import dumps as jsondumps from logging import getLogger, INFO from os import environ __DATABASE = environ.get('DATABASE', 'default') __LIMIT = environ.get('LIMIT', 100) __WORKGROUP = e...
import os def find_existing_strafe(): output = os.popen('wmic process get description, processid').read() print(output) find_existing_strafe()
#!/usr/bin/env python3 # # ISC License # # Copyright (C) 2021 DS-Homebrew # Copyright (C) 2021-present lifehackerhansol # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice app...
from dm_control import suite from dm_control.suite.wrappers import pixels from dm_env.specs import Array, BoundedArray import numpy as np import os import atari_py import cv2 import copy from collections import namedtuple, OrderedDict from rlpyt.utils.collections import namedarraytuple from rlpyt.envs.base import Env...
#!/usr/bin/env python3 # license removed for brevity #策略 機械手臂 四點來回跑 import rospy import os import numpy as np from std_msgs.msg import String from ROS_Socket.srv import * from ROS_Socket.msg import * import math import enum import Hiwin_RT605_ROS as strategy pos_feedback_times = 0 mode_feedback_times = 0 msg_feedback ...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import utool as ut from ibeis import viz from ibeis.viz import viz_helpers as vh from plottool import interact_helpers as ih (print, rrr, profile) = ut.inject2(__name__, '[interact_sver]') def ishow_sver(ibs, ai...
# 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) 2017 Sebastian Golasch (plugin.video.netflix) Copyright (C) 2018 Caphm (original implementation module) Copyright (C) 2019 Stefano Gottardo - @CastagnaIT Manages the HTTP requests SPDX-License-Identifier: MIT See LICENSES/MIT.md for more information. ""...
import unittest from trove_classifiers import classifiers from .. import types class TypesTest(unittest.TestCase): def test_classifiers_are_valid(self) -> None: for license in types.KNOWN_LICENSES: if license.trove_classifier: with self.subTest(msg=license.shortname): ...
from corehq.apps.products.models import SQLProduct from custom.ewsghana.alerts import COMPLETE_REPORT, \ STOCKOUTS_MESSAGE, LOW_SUPPLY_MESSAGE, OVERSTOCKED_MESSAGE, RECEIPT_MESSAGE from custom.ewsghana.utils import ProductsReportHelper from django.utils.translation import ugettext as _ class SOHAlerts(object): ...
################################################## # Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2019 # ################################################## import os, sys, time, argparse, collections from copy import deepcopy import torch import torch.nn as nn from pathlib import Path from collections import defaultdict l...
# SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2019, ARM Limited and contributors. # # 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 # # ...
from setuptools import setup, find_packages import os version = '0.1.0' entry_points = { 'openprocurement.auctions.core.plugins': [ 'auctions.appraisal = openprocurement.auctions.appraisal.includeme:includeme' ], 'openprocurement.api.migrations': [ 'auctions.appraisal = openprocurement.auc...
import numpy as np import matplotlib.pyplot as plt import tqdm import wavfile class CochlearModel: """ Two-dimensional cochlear model with two-degree-of-freedom (2DOF) micro-structure [1] for human. This program employs time domain solution proposed in Ref. [2], and for fast calcuration, applies n...
__title__ = 'aioimap' __version__ = '0.2.7' __summary__ = 'Receive e-mails from an IMAP server asynchronously and trigger a callback with the message.' __uri__ = 'https://github.com/surajiyer/aioimap' __author__ = 'Suraj Iyer' __email__ = 'me@surajiyer.com' __license__ = 'MIT'
#!/usr/bin/python3 import os import view book_types = os.listdir('books') data = os.listdir('data') if not data: import db db.create_tables(book_types) view.__main_page__(book_types) else: import db db.check_for_update(book_types) view.__main_page__(book_types, data=True)
''' SETS A set is a collection of values. Values in a set are not ordered. Values in a set are not indexed. How to create a Set with a constructor() # 28 Counting Values in a Set. # 35 Built-in Set methods Methods Description add() Adds an element to a set. # 37 Update() Adds multiple el...
enru=open('en-ru.txt','r') input=open('input.txt','r') output=open('output.txt','w') s=enru.read() x='' prov={'q','w','e','r','t','y','u','i','o','p','a','s','d','f','g','h','j','k','l','z','x','c','v','b','n','m'} slovar={} s=s.replace('\t-\t',' ') while len(s)>0: slovar[s[:s.index(' ')]]=s[s.index(' '):s.index('\...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..resampling import ApplyTransforms def test_ApplyTransforms_inputs(): input_map = dict(args=dict(argstr='%s', ), default_value=dict(argstr='--default-value %g', usedefault=True, ), dimension=dic...
import json import logging import pickle import typing from typing import Iterator, Optional, Text, Iterable, Union, Dict, List import itertools import traceback from time import sleep from rasa.core.brokers.event_channel import EventChannel from rasa.core.trackers import ActionExecuted, DialogueStateTracker, EventVerb...
# -*- coding: utf-8 -*- # Copyright 2020 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...
''' This folder contains two Python script that test the 'tfli2c' a module for the Benewake TFLuna LiDAR ranging device operating in I2C communications mode.'''
# # This source file is part of the EdgeDB open source project. # # Copyright 2019-present MagicStack Inc. and the EdgeDB 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...
# Copyright (C) 2021, 2020 GreenWaves Technologies, SAS # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # This...
import collections.abc import io import os import sys import errno import pathlib import pickle import socket import stat import tempfile import unittest from unittest import mock from test import support from test.support import TESTFN, FakePath try: import grp, pwd except ImportError: grp = pwd = None cla...
import glob import os import cv2 import numpy as np import h5py import IPython import pandas as pd import csv df = pd.read_csv('lung_annotation_raw_Final.csv') df = df[['ACC','TIPE','Xmin','Ymin','Xmax','Ymax','Zt_minsplitnum','Zt_minsplit_rev','Zt_maxsplitnum','Zt_maxsplit_rev','box_size']] df csv_file=open('lung_...
# Copyright 2017 The TensorFlow 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 applica...
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) from .core import UnitedStates from workalendar.core import MON from workalendar.registry import iso_register @iso_register('US-AK') class Alaska(UnitedStates): """Alaska""" FI...
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # 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 applica...
"""Training a face recognizer with TensorFlow based on the FaceNet paper FaceNet: A Unified Embedding for Face Recognition and Clustering: http://arxiv.org/abs/1503.03832 """ # MIT License # # Copyright (c) 2016 David Sandberg # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this so...
# from enum import Enum # class EPreference(Enum): # families = 0 # bicycles = 1 # circular = 2 # watery = 3 # offroad = 4