content
stringlengths
5
1.05M
def scan_JScript(hwp_parser): for jscript_stream in hwp_parser.hwp_jscript.script_streams: print( jscript_stream.get_script() )
import textfsm print(textfsm.__file__)
lo = 1 hi = 100 while lo < hi: avg = (lo + hi) // 2 # magie, abych mohl do stringů dávat přímo proměnné print(f"Mám číslo {avg}." ) odpoved = input("Je číslo větší (napiš >), menší (napiš <), nebo rovné (napiš =): ") if odpoved == "<": hi = avg elif odpoved == ">": lo = avg ...
T = int(input()) for _ in range(T): n, p, k = map(int, input().split()) ans = 0 a = p%k - 1 b = ((n-1)//k)*k b = n - 1 - b if (a>b): ans += (b+1)*((n-1)//k + 1) +(a-b)*((n-1)//k) else: ans += ((n-1)//k + 1)*(a+1) for i in range(a+1, n, k): ans +...
""" # Smarter Template for getting the middle value def binary_search_smart(): left, right = 0, 10**18 condition = <> while left < right: mid = left + right + 1 >> 1 if condition: left = mid else: right = mid - 1 """ # TEMPLATE #1: Usual appr...
# Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.md file in the project root # for full license information. # ============================================================================== from __future__ import print_function import os import math import argparse import ...
from django.contrib import admin from user_profile import models # Register your models here. admin.site.register(models.UserProfile)
import time, random, hashlib from django.conf import settings def generate_random_key(max_length=32): """Generate a random access token.""" return hashlib.sha256(settings.SECRET_KEY + ("%.16f" % time.time()) + ("%.16f" % random.random())).hexdigest()[:max_length] def generate_access_token(key, max_length=32)...
default_app_config = 'dartcms.apps.ads.apps.AdsConfig'
# This is a troll indeed ffs *facepalm* # Ported from xtra-telegram by @heyworld import asyncio from telethon.tl.functions.users import GetFullUserRequest from telethon.tl.types import ChannelParticipantsAdmins #from userbot.utils import admin_cmd from userbot.events import geezbot_cmd from userbot import CUSTOM_CMD as...
#!/usr/bin/env python # coding: utf-8 # In[25]: import pandas as pd from bs4 import BeautifulSoup import requests import os # In[5]: data = pd.read_excel('./catalog.xls') # In[6]: data.info() # In[8]: data['URL'].tail(6) # In[9]: data.columns # In[10]: data.sort_values(['SCHOOL', 'TIMEFRAME'...
from setuptools import setup, find_packages readme = open('README','r') README_TEXT = readme.read() readme.close() setup( name="title2bib", version="0.4.1", packages = find_packages(exclude=["build",]), scripts=["title2bib/bin/title2bib"], long_description = README_TEXT, install_requires=["req...
from django.conf import settings import pytest from djmoney.money import Money from .testapp.models import RevisionedModel @pytest.mark.django_db @pytest.mark.skipif("reversion" not in settings.INSTALLED_APPS, reason="django-reversion not enabled") def test_that_can_safely_restore_deleted_object(): from revers...
# 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, software # distrib...
# Given an array of time intervals (start, end) for classroom # lectures (possibly overlapping), find the minimum number of # rooms required. # For example, given [(30, 75), (0, 50), (60, 150)], you # should return 2. def better_find_num_rooms(arr): sortedStart = sorted([num[0] for num in arr]) sortedEnd = s...
from floodsystem.stationdata import build_station_list, update_water_levels from floodsystem.datafetcher import fetch_measure_levels from floodsystem.station import MonitoringStation from floodsystem import analysis from floodsystem import flood import datetime """Unit test for the analysis module""" def test_polyfit(...
class heavy_light_node: def __init__(self, size): self.parent = None self.pos = -1 self.weight = [0] * size self.fenwick = [0] * size def set_weight(self, i, x): d = x - self.weight[i] self.weight[i] = x N = len(self.weight) while i < N: self.fenwick[i] += ...
""" Utilities to represent and validate LTI Launch parameters This is based on lti library (https://github.com/pylti/lti). """ from collections.abc import MutableMapping from typing import List, Union from urllib.parse import urlencode from .exceptions import InvalidLaunchParamException, MissingLaunchParamException ...
import inspect import logging import os import socket import sys from datetime import datetime, timezone from typing import Tuple, Union, List import pytz import requests import tweepy import urllib3 # noinspection PyPackageRequirements # it is there (python-telegram-bot) from telegram import Bot BACKEND_URL = os.get...
# -*- coding: utf-8 -*- import os import uuid import random from django.contrib.auth.models import User from django.db.models.signals import post_save, post_delete from django.dispatch import receiver from .constants import Queues from .models import TheUser, Post, Book from .tasks import email_dispatch # --------...
# -*- coding: utf-8 -*- """ Created: 2019-04-09 Author: Robert Butler Purpose: This is a script for streaming Twitter API data. TODO: Consider investigating the following Twitter users: 'AndrewYNg', 'rdpeng', 'CoreyMSchafer', 'raymondh', 'gvanrossum', 'dabeaz', 'nedbat', 'rOpenSci', 'rdpeng', 'xieyihui', ...
import sys def dame(a): dos, cinco = 0, 0 while(a % 2 == 0): a //= 2 dos += 1 while(a % 5 == 0): a //= 5 cinco += 1 if(a == 1): return (dos, cinco) else: return (-1, -1) def be(a, b): res = 1 while (b > 0): if (b & 1): res = res * a a = a * a b >>= 1 ...
#!/usr/bin/python import sys import unittest import module_test_runner import getopt import getpass # Modules whose tests we will run. import gdata_test import atom_test import atom_tests.http_interface_test import atom_tests.mock_http_test import atom_tests.token_store_test import atom_tests.url_test import atom_test...
""" Required device info for the ATmega328P devices """ from pymcuprog.deviceinfo.eraseflags import ChiperaseEffect DEVICE_INFO = { 'name': 'atmega328p', 'architecture': 'avr8', # Flash 'flash_address_byte': 0, 'flash_size_bytes': 0x8000, 'flash_page_size_bytes': 0x80, 'flash_write_size_by...
import operator from visits_detector.core.components.data_structures import EventType, Event, SubInteraction from visits_detector.core.components.event_type_determiner.event_type_determiner_base import EventTypeDeterminerBase class HeuristicsEventTypeDeterminer(EventTypeDeterminerBase): @staticmethod def _ch...
import json from datapackage.resource import Resource import isodate import openpyxl from pathlib import Path from dataflows.helpers.extended_json import ( DATETIME_P_FORMAT, DATE_P_FORMAT, TIME_P_FORMAT, ) from .base import FileFormat, identity, comma_separated, json_dumps class ExcelFormat(FileFormat): S...
import os import sys import pandas as pd from sklearn import preprocessing from pathlib import Path def count_nulls_by_line(df): return df.isnull().sum().sort_values(ascending=False) def null_percent_by_line(df): return (df.isnull().sum() / df.isnull().count()).sort_values(ascending=False) def preprocess_...
''' PLTW Lesson 1.2.5 @authors: Ethan Francolla ''' #####-Imports-##### #Import Turtle library for drawing and display functions import turtle as trtl #####-Setup-##### #Create a turtle object to draw the board board_drawer = trtl.Turtle() #Define the board drawer's initial attributes board_drawer_shape = "classic" ...
#!/usr/bin/python import rospy from sensor_msgs.msg import Image as img_msg from std_msgs.msg import String as string_msg import numpy as np from cv_bridge import CvBridge import random as r import time import keras.backend as K import sys from deployment.tensorflow_detector import * from deployment.utils import lab...
#!/usr/bin/env python3 ################################################################################ # # Copyright (c) 2018-2021 PX4 Development Team. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are m...
#!/usr/bin/env python ''' Created on 14. Okt. 2016 @author: chof ''' import getopt, sys, os import logging import shutil from dbversions import Config, getResourcePath, VERBOSITY global logger def usage(): pass def checkDatabasePath(dbpath): #********************************************************************...
import random #Definiramo konstante STEVILO_DOVOLJENIH_NAPAK = 10 PRAVILNA_CRKA = "+" PONOVLJENA_CRKA = "o" NAPACNA_CRKA = "-" ZMAGA = "w" PORAZ = "x" ZACETEK = 'S' #Definiramo logični model igre class Igra: def __init__(self, geslo, crke): self.geslo = geslo.upper() self.crke = crke r...
# coding: utf8 from os import path import pickle from typing import List, Tuple, Dict from allennlp.models.archival import load_archive from allennlp.predictors import Predictor from num_fh.api.downloader import download_models from num_fh.api.downloader import NFH_DIR, IDENTIFICATION_NFH, RESOLUTION_NFH from num_fh...
from .deepl import DeeplTranslateProvider from .google import GoogleTranslateProvider
from lino.modlib.users.fixtures.demo2 import *
import sys import myModule num = int(sys.argv[1]) print(myModule.printEvenNumbers(num))
# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com """Run MPI benchmarks and tests.""" import os as _os import sys as _sys def _prog(cmd=""): pyexe = _os.path.basename(_sys.executable) return f"{pyexe} -m {__spec__.name} {cmd}".strip() def helloworld(comm, args=None, verbose=True): """Hello, World!...
__version__ = "0.3.15"
# coding: utf-8 # flake8: noqa """ IPython related law functionality. """ __all__ = ["Task", "register_magics"] # provisioning imports from law.contrib.ipython.task import Task from law.contrib.ipython.magic import register_magics
from conans import ConanFile, CMake, tools from conans.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.33.0" class GlslangConan(ConanFile): name = "glslang" description = "Khronos-reference front end for GLSL/ESSL, partial front " \ "end for HLSL, and a SPIR-...
import requests from urllib.parse import urlencode import os import logger from datetime import datetime import json class account: def __init__(self, accountName, accountType="github", rootDir="~/.gitega"): self.logger = logger.logger() self.accountName = accountName self.accountType = ac...
#coding:utf-8 import sys reload(sys) sys.setdefaultencoding('utf8') sys.path.append("/home/dev/Repository/news/") import gc from Tegenaria.tSpider.tSpider.settings import Settings from Tegenaria.tSpider.tSpider.middlewares.fileIOMiddleware import FileIOMiddleware from Tegenaria.tSpider.tSpider.middlewares.doraemonMiddl...
import pandas as pd import numpy as np import os import datetime def process_diagnostics(save=0): df_ms1 = pd.read_csv('..\\data\\raw\\transfer_2018-03-08\\diagnostic\\2018-03-02 - MS1 - Database Merge.csv') df_ms2 = pd.read_csv('..\\data\\raw\\transfer_2018-03-08\\diagnostic\\2018-03-05 - MS2 - Database Merg...
def load_default(path, closure): from pylab import load, save try: return load(path) except IOError: obj = closure() save(obj, path) return obj
""" Python compatibility library that will help shims run under both Python 2.7 and Python 3.x """ # # 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 ...
def run(): animal = str(input('¿Cuál es tu animal favorito? ')) if animal.lower() == 'tortuga' or animal.lower() == 'tortugas': print('También me gustan las tortugas.') else: print('Ese animal es genial, pero prefiero las tortugas.') if __name__ == '__main__': run()
from typing import Text from flask_wtf import FlaskForm from wtforms import StringField,TextAreaField, SelectField,SubmitField from wtforms.validators import Required from wtforms.ext.sqlalchemy.fields import QuerySelectField class UpdateProfile(FlaskForm): bio = TextAreaField('Tell us about you.',validators = ...
from __future__ import absolute_import from .log_pomdpy import init_logger __all__ = ['log_pomdpy']
import os import discord from discord.ext import commands from discord.ui.view import View # inherits commands.Bot class BotClass(discord.Bot): def __init__(self): super().__init__() self.persistent_views_added = False # For making the intreaction Button works even after restart. async def...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from parameters import constants class DeepHits(tf.keras.Model): def __init__(self, input_shape, n_classes, drop_rate=0.0, final_activation='softmax', name='deep_hits', **kwar...
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.models import User from .models import DailyMealPlan, Ingredient, Tag, Recipe, Instruction, Calendar from .models import Preferences # Allows admin site to view models admin.site.register(DailyMe...
#! /usr/bin/env python3 # LAMMPS Documentation Utilities # # Python rewrite of txt2html # The original txt2html was written in C by Steve Plimpton # (http://www.cs.sandia.gov/cgi-bin/sjplimp/) # # Copyright (C) 2015 Richard Berger # # This program is free software: you can redistribute it and/or modify # it under the t...
# # Copyright (c) 2019 Bernd Wiesner. bernduwiesner@yahoo.co.uk # All rights reserved # """ Display the lottery numbers in a window either generated or retrieved from a file """ from typing import List import PySimpleGUI as sg import constants as C def results_window(lottery: str, msg: str, results: C.Resu...
import pytest from cborx import * tests = [ ('00', '0'), ('1903e8', '1000'), ('38ff', '-256'), ('40', "h''"), ('4401020304', "h'01020304'"), ('5f ff', "(_ )"), ('5f 4474686520 46717569636b20 4662726f776e20 40 ff', "(_ h'74686520', h'717569636b20', h'62726f776e20', h'')"), ('60', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('compras', '0003_auto_20151106_1321'), ] operations = [ migrations.AlterField( model_name='detallecompra', ...
import rx import rx.operators as ops import rxsci as rs from rxsci.io.walk import walk from cyclotron.debug import trace_observable def list_files(config, dataset_key='voxceleb2_test_path'): files = rx.just(None).pipe( rs.with_latest_from(config), ops.starmap(lambda _, c: walk(c['config']['datase...
#!/usr/bin/env python2 """ Adjust gene IDs for PopGenome to play nicely with my other code. """ import re import sys with open(sys.argv[1], 'rb') as handle: for line in handle: if line.startswith('#'): sys.stdout.write(line) continue fields = line.strip().split('\t') ...
# 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 agreed to in writing, ...
# Copyright 2020 Dragonchain, 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. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by ...
"""Complex Step derivative approximations.""" from collections import defaultdict import numpy as np from openmdao.approximation_schemes.approximation_scheme import ApproximationScheme, \ _gather_jac_results, _get_wrt_subjacs, _full_slice from openmdao.utils.general_utils import simple_warning from openmdao.util...
#!/usr/bin/env python from flask import request, abort from functools import wraps from flask import current_app as app def require_user(f): @wraps(f) def decorated_function(*args, **kwargs): api_key = request.headers.get('X-API-Key') if api_key in app.config['user_keys'] or api_key in app.con...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
import sys sys.path.append("python") from PIL import Image from PIL import ImageCms import os from CompareHtml import createCompareHtml rootpath = "./greyramp" if not os.path.exists(rootpath): os.makedirs(rootpath) colwidth = 4 height = 150 width = 256*colwidth img = Image.new( mode = "RGB", size = (width, height)...
import keras from keras.layers import * from keras import models , losses , optimizers , metrics import numpy as np import win_unicode_console win_unicode_console.enable() import checkbox_dataloader as loader from keras.preprocessing.image import ImageDataGenerator from sklearn.model_selection import train_test_split...
import logging from importlib import import_module from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.http import Http404 from django.utils import translation from great_components import helpers as great_components_helpers from core import cms_slugs logger = logging.g...
from django.contrib import admin from sponsors.models import * class SponsorAdmin(admin.ModelAdmin): list_display = ('name', 'aggregate_type', 'rank') prepopulated_fields = {"slug": ("name",),} list_editable = ('rank',) ordering = ('name',) class SponsorshipTypeAdmin(admin.ModelAdmin): list_displa...
from enum import Enum, auto from json import load from os.path import join, abspath, dirname from platform import node class __KnownMachines(Enum): # Enum intended for local use only # The platform config in slurm gm workflow creates a dynamic machines enum local = auto() maui = auto() mahuika = a...
def echofilter(input, output, delay=0.7, atten=4): print('This function got 4 arguments input={0}, output={1}, delay={2}, atten={3}'.format(input, output, delay, atten))
#! /usr/bin/python3 import sys, os, time from typing import List, Tuple import re Component = Tuple[int,int] def solve(components: List[Component]) -> Tuple[int,int]: starts = [ component for component in components if 0 in component ] queue: List[Tuple[int,int,List[Component]]] = [ (next(port for port in s...
from measure_dim import ComputerVision import os cv = ComputerVision() cwd = os.getcwd() files = os.listdir(cwd) # images = [] # meta = [] print("################################## Start Script ##################################") for f in files: if f.lower().endswith('tif'): image_name = os.path.splitex...
from app import ( mythic, listen_ip, listen_port, keep_logs ) import traceback import multiprocessing if __name__ == "__main__": try: try: workers = multiprocessing.cpu_count() from app.api.rabbitmq_api import subprocess_listen_for_background_processin...
# -*- coding=utf-8 -*- import datetime import json import random import re import time import config from scrapy import Request from scrapy.selector import Selector from ipproxytool.spiders.validator.validator import Validator class AJKSpider(Validator): name = 'ajk' concurrent_requests = 16 def __ini...
# Copyright (c) 2015 Mirantis Inc. # # 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 writ...
# -*- coding: UTF-8 -*- import os import textwrap import dash from dash import Dash from dash.dependencies import Input, Output, State, ClientsideFunction from dash.exceptions import PreventUpdate from dash.development.base_component import Component import dash_html_components as html import dash_core_components as d...
from django.contrib import admin from .models import ToDo admin.site.register(ToDo)
""" Implements metrics from P. Mendes Junior et al. "In-Depth Study on Open-Set Camera Model Identification" """ import numpy as np from sklearn.metrics import accuracy_score, roc_curve def accuracy_known_samples(y_true, y_pred): """ Accuracy in correctly attributing images from known models to the actual mod...
import asyncio import dataclasses import logging import random from typing import Optional from urllib.parse import urlencode import aiohttp import aiohttp_client_cache from aiohttp import ClientConnectorCertificateError, ClientConnectorError, ClientSession, ServerDisconnectedError from aiohttp_client_cache import Cac...
from typing import Dict import numpy as np from sklearn.metrics.classification import classification_report from knodle.transformation.majority import probabilies_to_majority_vote, z_t_matrices_to_majority_vote_probs def majority_sklearn_report( rule_matches_z: np.array, mapping_rules_labels_t: np.array, la...
def array(*arr): return ["ARRAY", arr]
import ibm_boto3 import re from ibmcloud_python_sdk.utils.object_regions import endpoints from ibmcloud_python_sdk.resource import resource_instance from ibmcloud_python_sdk.utils.common import resource_not_found from ibmcloud_python_sdk.config import params from ibmcloud_python_sdk.auth import decode_token from botoc...
# coding:utf-8 import time,datetime def get_date(day): now_day = datetime.datetime.now().weekday() course_day = 0 if day == "周一": course_day = 0 if day == "周二": course_day = 1 if day == "周三": course_day = 2 if day == "周四": course_day = 3 if day == "周五": ...
#!/usr/bin/env python # from toopazo_tools.file_folder import FileFolderTools import matplotlib.pyplot as plt # import numpy as np class FigureTools: def __init__(self): pass @staticmethod def create_fig_axes(a, b): # fig, (ax0, ax1, ax2) = plt.subplots(a, b, figsize=[7, 4]) # a...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages README = "" try: with open('README.rst') as readme_file: README = readme_file.read() except: pass HISTORY = "" try: with open('HISTORY.rst') as history_file: history = histo...
from boa3.builtin import public @public def test1(param: str) -> bool: return param[0:1] == '|' @public def test2(param: str) -> bool: return param[0:1] == "|" @public def test3(param: str) -> bool: return param == "|" @public def test4(param: str) -> bool: return param == '|'
import unittest import type_erasure.parser_addition ref_ = ' &' ptr_ = ' *' const_ = 'const ' int_only_type = 'int' int_vector_only_type = 'std :: vector < int >' def ref(type): return type + ref_ def const(type): return const_ + type def const_ref(type): return const(type) + ref_ def ptr(type): ...
"""Define tests for the Websocket API.""" # pylint: disable=protected-access from datetime import datetime import json from urllib.parse import urlencode import aiohttp import pytest import pytz from socketio.exceptions import SocketIOError from simplipy import API from simplipy.entity import EntityTypes from simplip...
# -*- coding: utf-8 -*- ### ### This file is generated automatically by SALOME v7.5.0 with dump python functionality ### import sys import salome salome.salome_init() theStudy = salome.myStudy import salome_notebook notebook = salome_notebook.NoteBook(theStudy) #sys.path.insert( 0, r'/users/triou/VUES/beta/TRUST/do...
from .singletracker import *
import socket import codecs server = socket.socket() host = '127.0.0.1' port = 555 server.bind((host, port)) link = str('http://%s:%d' % (host, port)) server.listen(5) print('Entering infinite loop; hit Ctrl+C to exit') while True: client, (client_host, client_port) = server.accept() client.sendall(link.enc...
# Definition for a binary tree node. class TreeNode(object): def __init__(self, x): self.val = x self.left = None self.right = None import collections class Solution(object): def findMode(self, root): """ :type root: TreeNode :rtype: List[int] """ ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2018-11-13 10:02:11 # @Author : suke1900 (johnny824lee@gmail.com) # @Link : http://www.makcyun.top # @Version : $Id$ """ wordcloud 词云绘制 1 英文词云 text 2 中文词云 text 3 根据词频绘图 """ import os from os import path import numpy as np from wordcloud import WordClou...
""" This program is a kafka producer program for the Client Details query on the Cisco Prime API. It receives the data, processes it and sends it over the kafka infrastructure as three separate streams. """ import subprocess from flatten_json import flatten from pandas.io.json import json_normalize import pandas as p...
import pathlib from setuptools import setup import setuptools # The directory containing this file HERE = pathlib.Path(__file__).parent # The text of the README file README = (HERE / "README.md").read_text() # This call to setup() does all the work setup( name="apread", version="1.0.22", description="I...
from .utils import run_all from stoat.core.structure import Structure from stoat.types.ctypes import Char, Int16 def test_structure_in_structure(): class CharStruct(Structure): c1: Char c2: Char class ShortStruct(Structure): s1: Int16 s2: Int16 class Test(Structure): ...
from __future__ import annotations from pathlib import Path from typing import List from datetime import datetime def read_input(input: str) -> (List[List[bool]], List[(str, int)]): blank_index = 0 lines = input.splitlines() for idx, line in enumerate(lines): if line == "": blank_inde...
# from django.views import View # from django.http.response import JsonResponse from tasks.models import Task, STATUS_CHOICES # , Changelog from django.contrib.auth.models import User from django.contrib.auth.mixins import LoginRequiredMixin from rest_framework.views import APIView from rest_framework.response import...
from typing import NamedTuple from torch.autograd import Variable class DeterministicOutput(NamedTuple): """ The output of the deterministic policy. """ action: int q_value: float full: object class DeterministicPolicy(object): def __init__(self, estimator): self.estimator = estimator ...
import ctypes import sys from pydigilent.lowlevel.common import HIF if sys.platform.startswith("win"): _depp = ctypes.cdll.depp else: _depp = ctypes.cdll.LoadLibrary("libdepp.so") _DeppGetVersion = _depp.DeppGetVersion _DeppGetVersion.argtypes = [ctypes.POINTER(ctypes.c_char * 32)] _DeppGetVersion.restype = ...
class Point: counter = [] def __init__(self, x=0, y=0): """Konstruktor punktu.""" self.x = x self.y = y def update(self, n): self.counter.append(n) p1 = Point(0,0) p2 = Point(1,1) p1.counter.append(1) p2.counter.append(3) p1.counter[0] = 2 print(p1.counter) print(p2.count...
""" sgr commands related to getting information out of / about images """ from collections import Counter, defaultdict from typing import List, Optional, Tuple, Union, Dict, cast, TYPE_CHECKING, Any import click from .common import ImageType, RepositoryType, remote_switch_option from ..core._drawing import format_im...