text
stringlengths
1
927k
# Generated by Django 2.1.15 on 2020-07-31 13:10 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.CreateModel( ...
import os os.environ['CUDA_VISIBLE_DEVICES'] = '3' import pyroomacoustics as pra import numpy as np from pydub import AudioSegment from sklearn.utils import shuffle from glob import glob import random import json from malaya_speech.train.model.conformer.model import Model as ConformerModel from malaya_speech.train.mo...
''' Support for the TelosB / Tmote Sky platforms, and close clones. Utilizes the GoodFET firmware with CCSPI application, and the GoodFET client code. ''' import os import time import struct import time from datetime import datetime, timedelta from kbutils import KBCapabilities, makeFCS from GoodFETCCSPI import GoodF...
from datetime import timedelta, date def req_date(local_date): if isinstance(local_date, str): d, m, y = local_date.split('.') return '{0}-{1}-{2}'.format(y, m, d) elif isinstance(local_date, date): return local_date.strftime('%Y-%m-%d') else: return local_date def req_ti...
# # discord.py documentation build configuration file, created by # sphinx-quickstart on Fri Aug 21 05:43:30 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration valu...
# Copyright 2019 The Matrix.org Foundation C.I.C. # # 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 2021 University College London. 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 appl...
import time import torch.backends.cudnn as cudnn import torch.optim import torch.utils.data from model import SSD300, MultiBoxLoss from datasets import PascalVOCDataset from utils import * # Data parameters data_folder = 'google_drive/MyDrive/ColabNotebooks/Project/GT' # folder with data files keep_difficult = True #...
# coding: utf-8 """ ARTIK Cloud API No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Version 2.0 (the "License"...
"""This module contains the general information for EquipmentRackEnclosure ManagedObject.""" from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class EquipmentRackEnclosureConsts: MFG_TIME_NOT_APPLICABLE = "not-applicable" OPERABILITY_ACCES...
import json import unittest import mock from service.app import create_app from service.auth import encode_auth_token from service.database import empty_db class TestAuth(unittest.TestCase): def test0(self): user_id = 1 # create token new_token = encode_auth_token(user_id) _app...
import binascii import contextlib import copy from unittest import TestCase from aioquic.buffer import Buffer, encode_uint_var from aioquic.h3.connection import ( H3_ALPN, ErrorCode, FrameType, FrameUnexpected, H3Connection, MessageError, Setting, SettingsError, StreamType, enco...
#! /usr/bin/env python3 # Script from https://gist.github.com/jiffyclub/5015986 # This script turns Markdown into HTML using the Python markdown library and wraps the result in a # complete HTML document with default Bootstrap styling so that it's immediately printable. # Requires the python libraries jinja2, markdo...
# Copyright 2017 The dm_control 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 law or agreed to i...
# -*- coding: utf-8 -*- """ Created on Mon Aug 2 17:32:52 2021 @author: jiangyt """ from Tools import * from tensorflow import keras from tensorflow.keras.layers import Dense, Activation, Flatten, Dropout, Input, BatchNormalization from tensorflow.keras.layers import Conv2D, MaxPooling2D, add, AveragePooling2D, Zero...
# import warnings filter from warnings import simplefilter # ignore all future warnings simplefilter(action = "ignore", category = FutureWarning) import os import sys import tqdm import time import json import glob import gdown import urllib import zipfile import hashlib import argparse import numpy as np from traini...
import numpy as np import pytest import pandas as pd from pandas import Series import pandas._testing as tm def test_get(): # GH 6383 s = Series( np.array( [ 43, 48, 60, 48, 50, 51, ...
#!c:\users\user\pycharmprojects\sinopse de filmes\venv\scripts\python.exe # -*- coding: utf-8 -*- """ get_first_company.py Usage: get_first_company "company name" Search for the given name and print the best matching result. """ import sys # Import the IMDbPY package. try: import imdb except ImportError: pr...
import sys import math try: import CiteSoft except: import os #The below lines are to allow CiteSoftLocal to be called regardless of user's working directory. lenOfFileName = len(os.path.basename(__file__)) #This is the name of **this** file. absPathWithoutFileName = os.path.abspath(__file__)[0:-1*lenOf...
# -*- coding: utf-8 -*- # @Time : 2020/12/14 # @Author : Shuyu ZHANG # @FileName: __init__.py # @Software: PyCharm # @Description: Here
from setuptools import setup package_name = 'examples_rclpy_minimal_client' setup( name=package_name, version='0.9.1', packages=[package_name], data_files=[ ('share/ament_index/resource_index/packages', ['resource/' + package_name]), ('share/' + package_name, ['package.xml'...
# Generated by Django 2.2 on 2020-06-21 14:10 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='TwistedUser', ...
import socket from six.moves.urllib.parse import urlparse from frappe import get_conf REDIS_KEYS = ("redis_cache", "redis_queue", "redis_socketio") def is_open(ip, port, timeout=10): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.settimeout(timeout) try: s.connect((ip, int(port))) s.shutdown(socket...
import requests def demo(): ''' 非小号API获取信息 :return btc,eth,eos ... pirce ''' print("start") #接口教程链接 https://github.com/xiaohao2019/API-docs/blob/master/PublicApi_CN.md url = "https://fxhapi.feixiaohao.com/public/v1/ticker/" #传入参数 start=[integer](指定结果集的开始排名) limit=[integer](指定结果集的最大...
from LinguaFrancaBase.constants import * #Useful constants from LinguaFrancaBase.functions import * #Useful helper functions from LinguaFrancaBase.classes import * #Useful classes import sys import copy sys.setrecursionlimit(100000) EXPECTED = 10000 class _Ping: count = 1000000 pingsLeft = count def __ini...
#!/usr/bin/python # # build.py # # chain nova and neuton service requests to build predefined compute topologies # # topology is defined in python language 'spec' files # # by default the program will build the topology requested form a clean slate, # but give the correct option (-c) it will also attempt to complete a ...
# Copyright (c) 2021, LE GOFF Vincent # 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 # list of conditions and the...
# Copyright 2015 Hewlett-Packard Development Company, L.P. # Copyright (c) 2015 Rackspace # # 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 # # Un...
import time from modules import cbpi from modules.core.controller import KettleController from modules.core.props import Property @cbpi.controller class SimpleCascadeHysteresis(KettleController): """ This hysteresis controls MashTun temp. It creates hysteresis on HLT temp not allowing it to reach much hig...
# -*- coding: utf-8 -*- def main(): a, b, c = map(int, input().split()) if a <= c < b: print(1) else: print(0) if __name__ == "__main__": main()
"""Metadata Module. Source repository: https://github.com/awslabs/aws-data-wrangler Documentation: https://aws-data-wrangler.readthedocs.io/ """ __title__: str = "awswrangler" __description__: str = "Pandas on AWS." __version__: str = "2.8.0" __license__: str = "Apache License 2.0"
import unittest import utils from grammar import Grammar class SplitByCommasTest(unittest.TestCase): def test_simple(self): self.assertEqual(['A', 'B', 'C'], utils.split_by('A, B, C', ',')) def test_without_space(self): self.assertEqual(['A', 'B', 'C'], utils.split_by('A,B,C', ',')) def...
from cryptography.x509 import load_pem_x509_certificate from cryptography.hazmat.primitives.serialization import ( load_pem_private_key, load_pem_public_key, load_ssh_public_key, ) from cryptography.hazmat.backends import default_backend from authlib.common.encoding import to_bytes def load_pem_key(raw, ssh_type=...
import aiohttp import pytest import os from fpl import FPL from fpl.models import Fixture, H2HLeague, User, ClassicLeague, Team, Gameweek from tests.test_classic_league import classic_league_data from tests.test_fixture import fixture_data from tests.test_h2h_league import h2h_league_data from tests.test_team import t...
#!/usr/bin/python3 ''' SPDX-License-Identifier: Apache-2.0 Copyright 2017 Massachusetts Institute of Technology. NOTE: This unittest is being used as a procedural test. The tests must be run in-order and CANNOT be parallelized! Tests all but two RESTful interfaces: * agent's POST /v2/keys/vkey - Done by C...
from __future__ import with_statement import os from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config # Interpret the config fil...
import socket class BaseConnection: PROTOCOL = { "TCP": socket.SOCK_STREAM, "UDP": socket.SOCK_DGRAM }
# vim: set fileencoding=utf8 : """Some hooks that might be useful.""" import os import glob import subprocess from StringIO import StringIO import logging from slugify import slugify from wok.exceptions import DependencyException try: from lxml import etree except ImportError: etree = None try: import ...
class Solution: def isValidSudoku(self, board: List[List[str]]) -> bool: BZip = list(zip(*board)) def Checkline(li): temp = [i for i in li if i!="."] return len(set(temp))==len(temp) def check_row(board): for i in b...
# -*- coding: utf-8 -*- import copy import json import os import re import shutil import subprocess import time from requests_toolbelt import MultipartEncoder from . import config def download_video( self, media_id, filename=None, media=False, folder="videos" ): video_urls = [] if not me...
import numpy as np import librosa from tqdm import tqdm from audiomisc import ks_key from constants import VERTICALCUTOFF, FFT_SIZE, FFT_HOP def stft(x, fft_size, hopsamp): window = np.hanning(fft_size) return np.array([np.fft.rfft(window*x[i:i+fft_size]) for i in range(0, len(x)-fft_size...
from django.contrib.auth.decorators import permission_required from django.shortcuts import render, get_object_or_404 from django.contrib.auth.mixins import LoginRequiredMixin, PermissionRequiredMixin from .models import Book, Author, BookInstance, Genre from django.views import generic from django.views.generic.edit i...
# Importação de bibliotecas # Título do programa print('\033[1;34;40mMAIOR E MENOR VALORES NA LISTA\033[m') # Objetos valores = list() # Lógica for c in range(0, 5): valores.append(int(input(f'\033[30mDigite um valor para a Posição {c}:\033[m '))) maior = max(valores) menor = min(valores) print('=-' * 30) pr...
from __future__ import print_function import mxnet as mx import numpy as np from timeit import default_timer as timer from dataset.iterator import DetTestImageIter import cv2 class ImageDetector(object): """ SSD detector which hold a detection network and wraps detection API Parameters: ---------- symbol : mx.Sy...
from aliexpress.api.base import RestApi class AliexpressMarketingRedefiningGetactlistRequest(RestApi): def __init__(self, domain="gw.api.taobao.com", port=80): RestApi.__init__(self, domain, port) self.param_seller_coupon_activity_api_query = None def getapiname(self): return "aliexpr...
from models.contact import Contact import random import allure def test_delete_some_contact(app, db, check_ui): with allure.step('Check contact'): if len(db.get_contact_list()) == 0: app.contact.creation(Contact(first_name="test")) with allure.step('Given a contact list and contact to delet...
from os import path from blazeutils import prependsitedir from blazeweb.application import WSGIApp from blazeweb.middleware import full_wsgi_stack from minimal2.config import settings as settingsmod from blazeweb.scripting import application_entry # make sure our base module gets put on the path try: import minima...
""" Copyright 2022 RICHARD TJÖRNHAMMAR 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, sof...
from lexer.regex_ast.regex_atomic_node import AtomicNode from automaton import Automaton class EpsilonNode(AtomicNode): def eval(self): return Automaton(number_of_states=1, initial_state=0, finalStates=[0], transitions={})
import os.path as osp import torch.nn.functional as F import multiworld.envs.mujoco as mwmj import rlkit.misc.hyperparameter as hyp from rlkit.launchers.launcher_util import run_experiment from rlkit.launchers.experiments.disentanglement.launcher import \ disentangled_grill_her_twin_sac_experiment from rlkit.t...
# Copyright (c) 2020 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 appli...
""" Developer : Naveen Kambham Description: Unit testing for battery sensor feature extractor code. Majority of the data extraction code has to be tested visually by looking at the plots distributions. """ #Importing the required libraries. import unittest import numpy as np from FeatureExtraction import battery_senso...
import math points = [[4,1], [4,2], [4,3], [3,1], [3,2], [3,3], [2,1], [2,2], [2,3], [1,1], [1,2], [1,3]] def distance(point1, point2): return math.sqrt(((point2[0] - point1[0])**2) + ((point2[1] - point1[1])**2)) def k_neighbors(i, points, k): """ i: index of a point ...
# 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 ...
import tkinter as tk from system.operation import Operation from model.world import World import settings root = tk.Tk() img = tk.PhotoImage(file='png/sports-car.png') root.tk.call('wm', 'iconphoto', root._w, img) menu = tk.Menu(root) root.config(menu=menu) root.protocol("WM_DELETE_WINDOW", lambda: op.terminate(root...
# -*- coding: utf-8 -*- ############################################################################ # # Copyright © 2012, 2013, 2014, 2015 OnlineGroups.net and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should ...
# 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...
''' Created on 2016年8月10日 @author: Administrator ''' import socket s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) for data in [b'Michael', b'Tracy', b'Sarah']: # 发送数据: s.sendto(data, ('127.0.0.1', 9999)) # 接收数据: print(s.recv(1024).decode('utf-8')) s.close()
# Generated by Django 2.2.14 on 2020-07-31 14:42 import core.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0004_recipe'), ] operations = [ migrations.AddField( model_name='recipe', name='image', ...
# Copyright (c) 2008 Princeton University # Copyright (c) 2009 Advanced Micro Devices, Inc. # 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 c...
import string from itertools import chain from math import ceil, floor from random import randint, choice, random, choices, shuffle male_first_names = ( "Liam", "Noah", "Oliver", "Elijah", "William", "James", "Benjamin", "Lucas", "Henry", "Alexander", "Mason", "Michael", "Ethan", "Daniel", "Jacob", "Logan"...
# api: streamtuner2 # title: Stream entry editor # description: Allows to inspect and modify station/stream entries. # version: 0.6 # type: feature # category: ui # config: - # priority: core # # Editing dialog for stream entries. Available in # the context and main menu. Most useful for # changing bookmarks, or even ...
t = int(input()) i=0 while i < t: st = str(input()) length = len(st) j = 0 cnt = 0 while j < length: num = int(st[j]) #print(num) if num == 4: cnt = cnt + 1 j=j+1 print(cnt) i=i+1
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: hfc/protos/peer/collection.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection ...
# coding=utf-8 # Copyright 2020 George Mihaila. # # 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 agr...
# This code is part of Qiskit. # # (C) Copyright IBM 2017. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
from secrets import randbits from django.conf import settings from rest_framework.test import APISimpleTestCase from fleet_management.crypto import ( sign, verify, inverse_of, is_prime, find_prime, find_p_q_phi, find_pair_of_keys, hash_dict, ) class CryptoTest(APISimpleTestCase): ...
""" This file offers the methods to automatically retrieve the graph Pontibacter chinhatensis. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--prote...
from typing import Union import numpy as np from numba import njit from jesse.helpers import get_candle_source, slice_candles def supersmoother(candles: np.ndarray, period: int = 14, source_type: str = "close", sequential: bool = False) -> Union[ float, np.ndarray]: """ Super Smoother Filter 2pole Butte...
from typing import Any, Tuple, Union, Mapping, Callable, Optional, Sequence from typing_extensions import Literal from enum import auto from types import MappingProxyType from pathlib import Path import scvelo as scv from anndata import AnnData from cellrank import logging as logg from cellrank.tl import Lineage from...
import tempfile import os from PIL import Image from django.contrib.auth import get_user_model from django.test import TestCase from django.urls import reverse from decimal import Decimal from rest_framework import status from rest_framework.test import APIClient from core.models import Recipe, Tag, Ingredient from ...
# -*- coding:utf-8 -*- """ Kucoin Trade module. https://docs.kucoin.com Author: HuangTao Date: 2019/08/01 Email: huangtao@ifclover.com """ import json import copy import hmac import base64 import hashlib from urllib.parse import urljoin from quant.error import Error from quant.utils import tools from quant.utils...
import tensorflow as tf from tensorflow.python.eager import context from tensorflow.python.framework import ops from tensorflow.python.ops import clip_ops from tensorflow.python.ops import control_flow_ops from tensorflow.python.ops import math_ops from tensorflow.python.ops import resource_variable_ops from tensorflow...
#!/usr/bin/env python3 # Copyright (C) 2017-2022 The btclib developers # # This file is part of btclib. It is subject to the license terms in the # LICENSE file found in the top-level directory of this distribution. # # No part of btclib including this file, may be copied, modified, propagated, # or distributed except...
from . import base __all__ = ['SMAPE'] class SMAPE(base.MeanMetric, base.RegressionMetric): """Symmetric mean absolute percentage error. Examples -------- >>> from river import metrics >>> y_true = [0, 0.07533, 0.07533, 0.07533, 0.07533, 0.07533, 0.07533, 0.0672, 0.0672] >>> y_pred = [0, ...
import collections from datetime import timedelta import functools import gc import json import operator import pickle import re from textwrap import dedent from typing import ( TYPE_CHECKING, Any, Callable, Dict, FrozenSet, Hashable, List, Mapping, Optional, Sequence, Set, ...
""" compute Sea Surface Height Above Geoid, zos """ from __future__ import absolute_import, division, print_function import xarray import logging from e3sm_to_cmip import mpas from e3sm_to_cmip.util import print_message # 'MPAS' as a placeholder for raw variables needed RAW_VARIABLES = ['MPASO', 'MPAS_mesh', 'MPAS_m...
import sys import time from util import * size = sys.argv[1] num = sys.argv[2] #The data dir is named by case. Please see prepare.sh case = size + "_" + num log = sys.argv[3] #Either "allssd" or "alldisk" action = sys.argv[4] if action == "allssd": rid = submit_rule("file: path matches \"/" + case + "/*\"| allss...
# -*- coding: utf-8 -*- """ Created on Sat Oct 3 21:21:19 2020 Project: chemplot (Chemical Space Visualization) Content: Descriptor operation methods @author: murat cihan sorkun """ from rdkit import Chem from rdkit.Chem import AllChem import pandas as pd import math import mordred from mordred import Calculator, d...
# Copyright (c) 2012 OpenStack Foundation. # 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...
# -*- coding: utf-8 -*- # Copyright 2018 ICON Foundation # # 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 ...
""" A Qt API selector that can be used to switch between PyQt and PySide. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six import os from matplotlib import rcParams, verbose # Available APIs. QT_API_PYQT = 'PyQt4' # API is not set here;...
# -*- coding: utf-8 -*- """ Request Management """ module = request.controller resourcename = request.function if not settings.has_module(module): raise HTTP(404, body="Module disabled: %s" % module) # ----------------------------------------------------------------------------- def index(): """ Module'...
sa = input() la = len(sa) a = int(sa) import math num = 0 i = 0 while True: i += 1 num += math.log10(i) if(math.ceil(num) >= la- 100): print(i, num, la) if(math.ceil(num) == la): print(i) if(math.ceil(num) > la): break
"""This module defines functions and globals required for the command line interface of browser-history.""" import sys import argparse from browser_history import get_history, generic, browsers, utils # get list of all implemented browser by finding subclasses of generic.Browser AVAILABLE_BROWSERS = ', '.join(b.__nam...
import sys import textwrap import pytest # https://docs.python.org/3/whatsnew/3.5.html#pep-492-coroutines-with-async-and-await-syntax ASYNC_AWAIT = sys.version_info >= (3, 5) # https://docs.python.org/3/whatsnew/3.6.html#pep-525-asynchronous-generators ASYNC_GENERATORS = sys.version_info >= (3, 6) timeout = 15 #...
import pytest from http import HTTPStatus import urllib import requests from src import repos from libtrustbridge.utils.conf import env_s3_config, env_queue_config, env NOTIFICATIONS_REPO = env_queue_config('NOTIFICATIONS_REPO') DELIVERY_OUTBOX_REPO = env_queue_config('DELIVERY_OUTBOX_REPO') SUBSCRIPTIONS_REPO = env_...
#!/usr/bin/python import pv, os, re, sys import math, time, string import numpy as np from time import sleep from ca import caput, caget import logging as lg import sacla3_Chip_StartUp_v7 as startup import sacla3_Chip_Mapping_v7 as mapping lg.basicConfig(format='%(asctime)s %(levelname)s: \t%(message)s',level=lg.DEB...
import os try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages # pip install -e .[develop] develop_requires = [ 'WebTest', 'ScriptTest', 'coverage', 'docutils', 'minimoc...
#!/usr/bin/python ############################################################################# ## ## Copyright (C) 2016 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing/ ## ## This file is part of the Qt for Python examples of the Qt Toolkit. ## ## $QT_BEGIN_LICENSE:BSD$ ## You may use this file under the t...
import math items = int(input("Enter the number of items: ")) items_box = int(input("Enter the number of items per box: ")) boxes = math.ceil(items / items_box) print(f"For {items} items, packing {items_box} items in each box, you will need {boxes} boxes.")
# # Turbo Encoder # import numpy as np from .rsc import RSC class TurboEncoder: def __init__(self, interleaver): self.interleaver = interleaver self.block_size = len(self.interleaver) self.encoders = 2 * [RSC()] def reset(self): for e in self.encoders: e.reset() ...
from package import package parent_path = '.scanners' config_path = 'scanner.yml' class Scanner(package.Package): def __init__(self, url, name, auther): super().__init__(url, name, auther) self.parent_path = parent_path self.config_path = config_path class ScannerFactory(package.PackageF...
import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import tensorflow as tf from dataset.dataloader import load_tfds from time import time import argparse from nets.simple_basline import SimpleBaseline from nets.evopose2d import EvoPose from nets.hrnet import HRNet from utils import detect_hardware def speed_test(stra...
import importlib import pkgutil import signal import string import sys import traceback from contextlib import contextmanager from datetime import datetime, tzinfo from pathlib import Path from typing import Iterable, Optional, Set, Tuple, Union import pytz from .aliases import PathOrStr from .exceptions import SigTe...
''' References: - Symbolic Logic, Copi, p.396 ''' from .fol_lang import Wff, PropVarWff, BinaryWff, PropositionalVariable, NegWff class QuantRule: def applies_to(): pass
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads/v6/resources/ad_group.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection...
"""wazzle_33192 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-...
# -*- coding: utf-8 -*- # # django-codenerix-pos # # Codenerix GNU # # Project URL : http://www.codenerix.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/license...
#!/usr/bin/python3 import tkinter as tk from tkinter import * from tkinter.ttk import * from Crypto import Random from Crypto.Cipher import AES from Crypto.Hash import SHA256 import os import os.path from os import listdir from os.path import isfile, join #import time import ctypes #import threading import hashlib impo...