content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
# -*- coding: utf-8 -*- X = int(input()) Y = int(input()) start, end = min(X, Y), max(X, Y) firstDivisible = start if (start % 13 == 0) else start + (13 - (start % 13)) answer = sum(range(start, end + 1)) - sum(range(firstDivisible, end + 1, 13)) print(answer)
x = int(input()) y = int(input()) (start, end) = (min(X, Y), max(X, Y)) first_divisible = start if start % 13 == 0 else start + (13 - start % 13) answer = sum(range(start, end + 1)) - sum(range(firstDivisible, end + 1, 13)) print(answer)
"""Top-level package for Webex Bot.""" __author__ = """Finbarr Brady""" __version__ = '0.2.5'
"""Top-level package for Webex Bot.""" __author__ = 'Finbarr Brady' __version__ = '0.2.5'
# variables notasV = 0 soma = 0 # while there are not 2 grades between [0,10], so the loop continue while notasV < 2: # receive float nota = float(input()) # if nota is >= 0 and nota <= 10 if (nota >= 0) and (nota <= 10): notasV = notasV + 1 soma = soma + nota # if...
notas_v = 0 soma = 0 while notasV < 2: nota = float(input()) if nota >= 0 and nota <= 10: notas_v = notasV + 1 soma = soma + nota else: print('nota invalida') if notasV == 2: soma = soma / 2 print('media = {:.2f}'.format(soma))
# Error codes due to an invalid request INVALID_REQUEST = 400 INVALID_ALGORITHM = 401 DOCUMENT_NOT_FOUND = 404
invalid_request = 400 invalid_algorithm = 401 document_not_found = 404
# -*- coding: utf-8 -*- """This module contains all the LUA code that needs to be on the device to perform whats needed. They will be uploaded if they doesn't exist""" # Copyright (C) 2015-2019 Peter Magnusson <peter@kmpm.se> # pylint: disable=C0301 # flake8: noqa LUA_FUNCTIONS = ['recv_block', 'recv_name', 'recv', ...
"""This module contains all the LUA code that needs to be on the device to perform whats needed. They will be uploaded if they doesn't exist""" lua_functions = ['recv_block', 'recv_name', 'recv', 'shafile', 'send_block', 'send_file', 'send'] download_file = "file.open('{filename}') print(file.seek('end', 0)) file.seek(...
# https://en.wikipedia.org/wiki/Trifid_cipher def __encryptPart(messagePart, character2Number): one, two, three = "", "", "" tmp = [] for character in messagePart: tmp.append(character2Number[character]) for each in tmp: one += each[0] two += each[1] thre...
def __encrypt_part(messagePart, character2Number): (one, two, three) = ('', '', '') tmp = [] for character in messagePart: tmp.append(character2Number[character]) for each in tmp: one += each[0] two += each[1] three += each[2] return one + two + three def __decrypt_p...
# Copyright (c) 2022 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...
__all__ = ['model_alias'] model_alias = {'deepspeech2offline': ['paddlespeech.s2t.models.ds2:DeepSpeech2Model'], 'deepspeech2online': ['paddlespeech.s2t.models.ds2:DeepSpeech2Model'], 'conformer': ['paddlespeech.s2t.models.u2:U2Model'], 'conformer_online': ['paddlespeech.s2t.models.u2:U2Model'], 'transformer': ['paddle...
""" The roseguarden project Copyright (C) 2018-2020 Marcus Drobisch, This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This pr...
""" The roseguarden project Copyright (C) 2018-2020 Marcus Drobisch, This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This pr...
# Find minimum number without using conditional statement or ternary operator def main(): a = 4 b = 3 print((a > b) * a + (a < b) * b) if __name__ == '__main__': main()
def main(): a = 4 b = 3 print((a > b) * a + (a < b) * b) if __name__ == '__main__': main()
class Author: def __init__(self, name, familyname=None): self.name = name self.familyname = familyname def __repr__(self): return u'{0}'.format(self.name) authors = {'1': Author('Test Author'), '2': Author('Testy McTesterson')} print(list(authors.values())) print(u'Found {0} unique au...
class Author: def __init__(self, name, familyname=None): self.name = name self.familyname = familyname def __repr__(self): return u'{0}'.format(self.name) authors = {'1': author('Test Author'), '2': author('Testy McTesterson')} print(list(authors.values())) print(u'Found {0} unique aut...
""" categories: Types,bytearray description: Array slice assignment with unsupported RHS cause: Unknown workaround: Unknown """ b = bytearray(4) b[0:1] = [1, 2] print(b)
""" categories: Types,bytearray description: Array slice assignment with unsupported RHS cause: Unknown workaround: Unknown """ b = bytearray(4) b[0:1] = [1, 2] print(b)
''' ''' def main(): info('Fill Pipette 1') close(description='Outer Pipette 1') sleep(1) if analysis_type=='blank': info('not filling cocktail pipette') else: info('filling cocktail pipette') open(description='Inner Pipette 1') sleep(15) close(description='Inner Pipette 1') sleep(1)
""" """ def main(): info('Fill Pipette 1') close(description='Outer Pipette 1') sleep(1) if analysis_type == 'blank': info('not filling cocktail pipette') else: info('filling cocktail pipette') open(description='Inner Pipette 1') sleep(15) close(description='Inner Pi...
_base_ = [ '../_base_/models/regproxy/regproxy-l16.py', '../_base_/datasets/cityscapes.py', '../_base_/default_runtime.py', '../_base_/schedules/adamw+cr+lr_6e-5+wd_0.01+iter_80k.py' ] model = dict( backbone=dict( img_size=(768, 768), out_indices=[5, 23]), test_cfg=dict( ...
_base_ = ['../_base_/models/regproxy/regproxy-l16.py', '../_base_/datasets/cityscapes.py', '../_base_/default_runtime.py', '../_base_/schedules/adamw+cr+lr_6e-5+wd_0.01+iter_80k.py'] model = dict(backbone=dict(img_size=(768, 768), out_indices=[5, 23]), test_cfg=dict(mode='slide', crop_size=(768, 768), stride=(512, 512)...
# Copy this file to config.py and fill the blanks QCLOUD_APP_ID = '' QCLOUD_SECRET_ID = '' QCLOUD_SECRET_KEY = '' QCLOUD_BUCKET = '' QCLOUD_REGION = 'sh'
qcloud_app_id = '' qcloud_secret_id = '' qcloud_secret_key = '' qcloud_bucket = '' qcloud_region = 'sh'
class SubSystemTypes: aperture = 'Aperture' client = 'Client' config = 'Config' rights = 'Rights' secret_store_config = 'SecretStoreconfig' websdk = 'WebSDK'
class Subsystemtypes: aperture = 'Aperture' client = 'Client' config = 'Config' rights = 'Rights' secret_store_config = 'SecretStoreconfig' websdk = 'WebSDK'
user_0 = {'username': 'efermi', 'first': 'enrico', 'last': 'fermi', } for key, value in user_0.items(): print("\nKey: " + key) print("Value: " + value) print(user_0.items())
user_0 = {'username': 'efermi', 'first': 'enrico', 'last': 'fermi'} for (key, value) in user_0.items(): print('\nKey: ' + key) print('Value: ' + value) print(user_0.items())
# Solution def part1(data): frequency = sum(int(x) for x in data) return frequency def part2(data): known_frequency = { 0: True } frequency = 0 while True: for x in data: frequency += int(x) if frequency in known_frequency: return frequency ...
def part1(data): frequency = sum((int(x) for x in data)) return frequency def part2(data): known_frequency = {0: True} frequency = 0 while True: for x in data: frequency += int(x) if frequency in known_frequency: return frequency known_fre...
data_file = open('us_cities.txt', 'r') for line in data_file: city, population = line.split(':') # Tuple unpacking city = city.title() # Capitalize city names population = '{0:,}'.format(int(population)) # Add commas to numbers print(city.ljust(15) + population) dat...
data_file = open('us_cities.txt', 'r') for line in data_file: (city, population) = line.split(':') city = city.title() population = '{0:,}'.format(int(population)) print(city.ljust(15) + population) data_file.close()
class Veiculo: def __init__(self, tipo) -> None: self.tipo = tipo self.propriedades = {} def get_propriedades(self): return self.propriedades def set_propriedades(self, cor: str, cambio: str, capacidade: int) -> None: self.propriedades = { 'cor': cor, ...
class Veiculo: def __init__(self, tipo) -> None: self.tipo = tipo self.propriedades = {} def get_propriedades(self): return self.propriedades def set_propriedades(self, cor: str, cambio: str, capacidade: int) -> None: self.propriedades = {'cor': cor, 'cambio': cambio, 'cap...
turno = input("Qual perido voce estuda? V para vespertino, D para diurno ou N para noturno: ").upper() if turno == "V": print("Boa Tarde") elif turno == "D": print("Bom dia") elif turno == "N": print("Boav Noite") else: print("Entrada invalida")
turno = input('Qual perido voce estuda? V para vespertino, D para diurno ou N para noturno: ').upper() if turno == 'V': print('Boa Tarde') elif turno == 'D': print('Bom dia') elif turno == 'N': print('Boav Noite') else: print('Entrada invalida')
# # This file is part of snmpresponder software. # # Copyright (c) 2019, Ilya Etingof <etingof@gmail.com> # License: http://snmplabs.com/snmpresponder/license.html # def expandMacro(option, context): for k in context: pat = '${%s}' % k if option and '${' in option: option = option.repl...
def expand_macro(option, context): for k in context: pat = '${%s}' % k if option and '${' in option: option = option.replace(pat, str(context[k])) return option def expand_macros(options, context): options = list(options) for (idx, option) in enumerate(options): opti...
#Cristian Chitiva #cychitvav@unal.educo #16/Sept/2018 class Cat: def __init__(self, name): self.name = name
class Cat: def __init__(self, name): self.name = name
class RestWriter(object): def __init__(self, file, report): self.file = file self.report = report def write(self, restsection): assert len(restsection) >= 3 for separator, collection1 in self.report: self.write_header(separator, restsection[0], 80) f...
class Restwriter(object): def __init__(self, file, report): self.file = file self.report = report def write(self, restsection): assert len(restsection) >= 3 for (separator, collection1) in self.report: self.write_header(separator, restsection[0], 80) for...
d = DiGraph(loops=True, multiedges=True, sparse=True) d.add_edges([(0, 0, 'a'), (0, 0, 'b'), (0, 1, 'c'), (0, 1, 'd'), (0, 1, 'e'), (0, 1, 'f'), (0, 1, 'f'), (2, 1, 'g'), (2, 2, 'h')]) GP = d.graphplot(vertex_size=100, edge_labels=True, color_by_label=True, edge_style='dashed'...
d = di_graph(loops=True, multiedges=True, sparse=True) d.add_edges([(0, 0, 'a'), (0, 0, 'b'), (0, 1, 'c'), (0, 1, 'd'), (0, 1, 'e'), (0, 1, 'f'), (0, 1, 'f'), (2, 1, 'g'), (2, 2, 'h')]) gp = d.graphplot(vertex_size=100, edge_labels=True, color_by_label=True, edge_style='dashed') GP.set_edges(edge_style='solid') GP.set_...
class Pessoa: def __init__(self, nome): self.nome = nome @classmethod def outro_contrutor(cls, nome, sobrenome): cls.sobrenome = sobrenome return cls(nome) p = Pessoa('samuel') print(p.nome) p = Pessoa.outro_contrutor('saulo', 'nunes') print(p.sobrenome)
class Pessoa: def __init__(self, nome): self.nome = nome @classmethod def outro_contrutor(cls, nome, sobrenome): cls.sobrenome = sobrenome return cls(nome) p = pessoa('samuel') print(p.nome) p = Pessoa.outro_contrutor('saulo', 'nunes') print(p.sobrenome)
#!/usr/bin/python3 """ Main module for demo """ if __name__ == "__main__": pass
""" Main module for demo """ if __name__ == '__main__': pass
"""Exceptions for OpenZWave MQTT.""" class BaseOZWError(Exception): """Base OpenZWave MQTT exception.""" class NotFoundError(BaseOZWError): """Exception that is raised when an entity can't be found.""" class NotSupportedError(BaseOZWError): """Exception that is raised when an action isn't supported.""...
"""Exceptions for OpenZWave MQTT.""" class Baseozwerror(Exception): """Base OpenZWave MQTT exception.""" class Notfounderror(BaseOZWError): """Exception that is raised when an entity can't be found.""" class Notsupportederror(BaseOZWError): """Exception that is raised when an action isn't supported.""" ...
while True: print('-=-' * 6) n=float(input('Digite um valor (negativo para sair do programa): ')) if n<0: break print('-=-'*6) for c in range(1,11): print('\033[35m{:.0f} x {} = {:.0f}\033[m'.format(n,c,n*c)) print('\033[33mPrograma encerrado. Volte sempre!')
while True: print('-=-' * 6) n = float(input('Digite um valor (negativo para sair do programa): ')) if n < 0: break print('-=-' * 6) for c in range(1, 11): print('\x1b[35m{:.0f} x {} = {:.0f}\x1b[m'.format(n, c, n * c)) print('\x1b[33mPrograma encerrado. Volte sempre!')
""" PASSENGERS """ numPassengers = 31043 passenger_arriving = ( (10, 4, 10, 7, 4, 5, 6, 5, 3, 4, 0, 0, 0, 5, 15, 5, 4, 4, 3, 0, 2, 3, 4, 1, 0, 0), # 0 (2, 10, 11, 8, 5, 3, 3, 2, 5, 2, 0, 0, 0, 9, 10, 2, 5, 6, 4, 3, 5, 2, 8, 1, 0, 0), # 1 (1, 9, 6, 9, 8, 5, 5, 4, 1, 1, 2, 2, 0, 10, 4, 8, 11, 12, 5, 4, 2, 4, 4, 2...
""" PASSENGERS """ num_passengers = 31043 passenger_arriving = ((10, 4, 10, 7, 4, 5, 6, 5, 3, 4, 0, 0, 0, 5, 15, 5, 4, 4, 3, 0, 2, 3, 4, 1, 0, 0), (2, 10, 11, 8, 5, 3, 3, 2, 5, 2, 0, 0, 0, 9, 10, 2, 5, 6, 4, 3, 5, 2, 8, 1, 0, 0), (1, 9, 6, 9, 8, 5, 5, 4, 1, 1, 2, 2, 0, 10, 4, 8, 11, 12, 5, 4, 2, 4, 4, 2, 4, 0), (7, 14,...
n = int(input()) teams = [int(x) for x in input().split()] carrying = 0 for i in range(n): if teams[i] == 0 and carrying == 1: print("NO") exit() if teams[i] % 2 == 1: if carrying == 0: carrying = 1 else: carrying = 0 if carrying == 0: pr...
n = int(input()) teams = [int(x) for x in input().split()] carrying = 0 for i in range(n): if teams[i] == 0 and carrying == 1: print('NO') exit() if teams[i] % 2 == 1: if carrying == 0: carrying = 1 else: carrying = 0 if carrying == 0: print('YES') els...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Midokura PTE LTD. # 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/LICENS...
application_octet_stream = 'application/octet-stream' application_json_v5 = 'application/vnd.org.midonet.Application-v5+json' application_error_json = 'application/vnd.org.midonet.Error-v1+json' application_tenant_json = 'application/vnd.org.midonet.Tenant-v1+json' application_tenant_collection_json = 'application/vnd....
def compute_epsg(lon, lat): """ Compute the EPSG code of the UTM zone which contains the point with given longitude and latitude Args: lon (float): longitude of the point lat (float): latitude of the point Returns: int: EPSG code """ # UTM zone number starts from 1 ...
def compute_epsg(lon, lat): """ Compute the EPSG code of the UTM zone which contains the point with given longitude and latitude Args: lon (float): longitude of the point lat (float): latitude of the point Returns: int: EPSG code """ zone = int((lon + 180) // 6 + 1)...
""" **kwargs """ def print_info(**kwargs): for key in kwargs: print('{}: {}'.format(key, kwargs[key])) if __name__ == '__main__': print_info(name='Mike', lastname='Red', age=22)
""" **kwargs """ def print_info(**kwargs): for key in kwargs: print('{}: {}'.format(key, kwargs[key])) if __name__ == '__main__': print_info(name='Mike', lastname='Red', age=22)
def clean_gdp(gdp): # get needed columns from gdplev excel file columns_to_keep = ['Unnamed: 4', 'Unnamed: 5', 'Unnamed: 6'] gdp = gdp[columns_to_keep] gdp.columns = ['Quarter', 'GDP Current', 'GDP Chained'] gdp = gdp[~gdp['Quarter'].isnull()] # only keep data from 2000 onwards gdp = gd...
def clean_gdp(gdp): columns_to_keep = ['Unnamed: 4', 'Unnamed: 5', 'Unnamed: 6'] gdp = gdp[columns_to_keep] gdp.columns = ['Quarter', 'GDP Current', 'GDP Chained'] gdp = gdp[~gdp['Quarter'].isnull()] gdp = gdp[gdp['Quarter'].str.startswith('2')] gdp.reset_index(drop=True, inplace=True) gdp['...
# Can be used in the test data like ${MyObject()} or ${MyObject(1)} class MyObject: def __init__(self, index=''): self.index = index def __str__(self): return '<MyObject%s>' % self.index UNICODE = (u'Hyv\u00E4\u00E4 y\u00F6t\u00E4. ' u'\u0421\u043F\u0430\u0441\u0438\u0431\u043E!') LI...
class Myobject: def __init__(self, index=''): self.index = index def __str__(self): return '<MyObject%s>' % self.index unicode = u'Hyvää yötä. Спасибо!' list_with_objects = [my_object(1), my_object(2)] nested_list = [[True, False], [[1, None, my_object(), {}]]] nested_tuple = ((True, False), [...
def Fibonacci(n): # Check if input is 0 then it will # print incorrect input if n < 0: print("Incorrect input") # Check if n is 0 # then it will return 0 elif n == 0: return 0 # Check if n is 1,2 # it will return 1 elif n == 1 or n == 2: return 1 els...
def fibonacci(n): if n < 0: print('Incorrect input') elif n == 0: return 0 elif n == 1 or n == 2: return 1 else: return fibonacci(n - 1) + fibonacci(n - 2) print(fibonacci(40))
# encoding: utf-8 # Copyright 2011 Tree.io Limited # This file is part of Treeio. # License www.tree.io/license """ Documents docstring """
""" Documents docstring """
class Solution(object): def findPeakElementLinear(self, nums): """ :type nums: List[int] :rtype: int """ i = 0 while i < len(nums): # check dangerous condition first if i == len(nums) - 1 or (nums[i + 1] < nums[i]): return i ...
class Solution(object): def find_peak_element_linear(self, nums): """ :type nums: List[int] :rtype: int """ i = 0 while i < len(nums): if i == len(nums) - 1 or nums[i + 1] < nums[i]: return i i += 1 def find_peak_element_b...
for t in range(int(input())): a,b = input().split() cnt1,cnt2 = 0,0 for i in range(len(a)): if a[i] != b[i]: if b[i] == '0': cnt1+=1 else: cnt2+=1 print(max(cnt1,cnt2))
for t in range(int(input())): (a, b) = input().split() (cnt1, cnt2) = (0, 0) for i in range(len(a)): if a[i] != b[i]: if b[i] == '0': cnt1 += 1 else: cnt2 += 1 print(max(cnt1, cnt2))
class Solution: def subsets(self, nums): """ :type nums: List[int] :rtype: List[List[int]] """ def deep_subsets(nums): r = [] n = len(nums) if n == 1: return [nums] for idx, num in enumerate(nums): ...
class Solution: def subsets(self, nums): """ :type nums: List[int] :rtype: List[List[int]] """ def deep_subsets(nums): r = [] n = len(nums) if n == 1: return [nums] for (idx, num) in enumerate(nums): ...
# @license Apache-2.0 # # Copyright (c) 2018 The Stdlib 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 appli...
{'includes': ['./include.gypi'], 'variables': {'addon_target_name%': 'addon', 'fortran_compiler%': 'gfortran', 'fflags': ['-std=f95', '-ffree-form', '-O3', '-Wall', '-Wextra', '-Wimplicit-interface', '-fno-underscoring', '-pedantic', '-c'], 'conditions': [['OS=="win"', {'obj': 'obj'}, {'obj': 'o'}]]}, 'targets': [{'tar...
''' In this module, we implement selection sort Time complexity: O(n ^ 2) ''' def selection_sort(arr): ''' Sort array using selection sort ''' for index_x in range(len(arr)): min_index = index_x for index_y in range(index_x + 1, len(arr)): if arr[index_y] < arr[min_index...
""" In this module, we implement selection sort Time complexity: O(n ^ 2) """ def selection_sort(arr): """ Sort array using selection sort """ for index_x in range(len(arr)): min_index = index_x for index_y in range(index_x + 1, len(arr)): if arr[index_y] < arr[min_index]...
# Link : https://leetcode.com/problems/subtree-of-another-tree/ # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution(object): def sameTree(self , roo...
class Solution(object): def same_tree(self, root, subRoot): if root == None or subRoot == None: return root == None and subRoot == None elif root.val == subRoot.val: return self.sameTree(root.right, subRoot.right) and self.sameTree(root.left, subRoot.left) else: ...
"""Cabal packages""" load("@bazel_skylib//lib:paths.bzl", "paths") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain") load(":cc.bzl", "cc_interop_info") load(":private/context.bzl", "haskell_context", "render_env") load(":private/dep...
"""Cabal packages""" load('@bazel_skylib//lib:paths.bzl', 'paths') load('@bazel_tools//tools/build_defs/repo:utils.bzl', 'maybe') load('@bazel_tools//tools/cpp:toolchain_utils.bzl', 'find_cpp_toolchain') load(':cc.bzl', 'cc_interop_info') load(':private/context.bzl', 'haskell_context', 'render_env') load(':private/depe...
# # PySNMP MIB module A3COM-HUAWEI-LPBKDT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM-HUAWEI-LPBKDT-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 16:50:56 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 ...
(h3c_common,) = mibBuilder.importSymbols('A3COM-HUAWEI-OID-MIB', 'h3cCommon') (octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, value_size_co...
"""TODO: package docstring.""" def hello(): """Say hello.""" print("Hello world!")
"""TODO: package docstring.""" def hello(): """Say hello.""" print('Hello world!')
__title__ = 'https' __author__ = 'Gloryness' __license__ = 'MIT License'
__title__ = 'https' __author__ = 'Gloryness' __license__ = 'MIT License'
class BoundedQueue: # Constructor, which creates a new empty queue: def __init__(self, capacity): assert isinstance(capacity, int), ('Error: Type error: %s' % (type(capacity))) assert capacity >= 0, ('Error: Illegal capacity: %d' % (capacity)) self.__items = [] self.__capacity ...
class Boundedqueue: def __init__(self, capacity): assert isinstance(capacity, int), 'Error: Type error: %s' % type(capacity) assert capacity >= 0, 'Error: Illegal capacity: %d' % capacity self.__items = [] self.__capacity = capacity def enqueue(self, item): if len(self....
def answer(question): words = question \ .rstrip("?") \ .replace("plus", "+") \ .replace("minus", "-") \ .replace("multiplied by", '*') \ .replace("divided by", "/") \ .replace("raised to the", "^") \ .split() for i in range(len(words) - 2): if wo...
def answer(question): words = question.rstrip('?').replace('plus', '+').replace('minus', '-').replace('multiplied by', '*').replace('divided by', '/').replace('raised to the', '^').split() for i in range(len(words) - 2): if words[i] == '^' and words[i + 2] == 'power': words[i + 2] = '' ...
def sorted_nosize_search(listy, num): # Adapted to work with a Python sorted # array and handle the index error exception exp_backoff = index = 0 limit = False while not limit: try: temp = listy[index] if temp > num: limit = True else: ...
def sorted_nosize_search(listy, num): exp_backoff = index = 0 limit = False while not limit: try: temp = listy[index] if temp > num: limit = True else: index = 2 ** exp_backoff exp_backoff += 1 except IndexEr...
# -*- coding: utf-8 -*- """ Package of optimizers. """
""" Package of optimizers. """
class Solution: def singleNumber(self, nums: List[int]) -> int: counts = {} for num in nums: if num in counts: counts[num] += 1 else: counts[num] = 1 if counts[num] == 3: counts.pop(num) return list(counts.ke...
class Solution: def single_number(self, nums: List[int]) -> int: counts = {} for num in nums: if num in counts: counts[num] += 1 else: counts[num] = 1 if counts[num] == 3: counts.pop(num) return list(counts....
# # PySNMP MIB module CXIoHardware-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CXIoHardware-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:17:22 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar ...
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, single_value_constraint, value_range_constraint, constraints_intersection, constraints_union) ...
# -*- coding: utf-8 -*- # ISO 693-1 language codes from pycountry Iso2Language = { u'aa': u'Afar', u'ab': u'Abkhazian', u'af': u'Afrikaans', u'ak': u'Akan', u'sq': u'Albanian', u'am': u'Amharic', u'ar': u'Arabic', u'an': u'Aragonese', u'hy': u'Armenian', u'as': u'Assamese', u...
iso2_language = {u'aa': u'Afar', u'ab': u'Abkhazian', u'af': u'Afrikaans', u'ak': u'Akan', u'sq': u'Albanian', u'am': u'Amharic', u'ar': u'Arabic', u'an': u'Aragonese', u'hy': u'Armenian', u'as': u'Assamese', u'av': u'Avaric', u'ae': u'Avestan', u'ay': u'Aymara', u'az': u'Azerbaijani', u'ba': u'Bashkir', u'bm': u'Bamba...
""" headers: Set-Cookie: description: Session cookie schema: type: string example: SESSIONID=abcde12345; Path=/ "\0Set-Cookie": description: CSRF token schema: type: string example: CSRFTOKEN=fghijk678910; Path=/; HttpOnly """
""" headers: Set-Cookie: description: Session cookie schema: type: string example: SESSIONID=abcde12345; Path=/ "\x00Set-Cookie": description: CSRF token schema: type: string example: CSRFTOKEN=fghijk678910; Path=/; HttpOnly """
# # PySNMP MIB module PPPOE-MGMT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/PPPOE-MGMT-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:41:53 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2...
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, value_range_constraint, single_value_constraint, constraints_intersection, value_size_constraint) ...
''' digital media index: 0 - digital media id 1 - owner_id 2 - name 3 - description 4 - file_path 5 - thumbnail_path 6 - category_id 7 - media_type_id 8 - price 9 - approved ''' ############################################## # Search logic # ######...
""" digital media index: 0 - digital media id 1 - owner_id 2 - name 3 - description 4 - file_path 5 - thumbnail_path 6 - category_id 7 - media_type_id 8 - price 9 - approved """ def search(conn, params): q = q__container(conn, params) if q.term != '': results = t...
def solve(*args): min_number = min(args[0]) max_number = max(args[0]) summary = sum(args[0]) print(f'The minimum number is {min_number}') print(f'The maximum number is {max_number}') print(f'The sum number is: {summary}') solve(list(map(int, input().split())))
def solve(*args): min_number = min(args[0]) max_number = max(args[0]) summary = sum(args[0]) print(f'The minimum number is {min_number}') print(f'The maximum number is {max_number}') print(f'The sum number is: {summary}') solve(list(map(int, input().split())))
w, h = 4, 100 list_of_gedung = [[0 for x in range(w)] for y in range(h)] def createVertex(upperbackleft_x, upperbackleft_y, upperbackleft_z, upperbackright_x, upperbackright_y, upperbackright_z, upperfrontleft_x, upperfrontleft_y, upperfrontleft_z, upperfrontright_x, upperfrontright_y, upperfrontright_z, underbackleft...
(w, h) = (4, 100) list_of_gedung = [[0 for x in range(w)] for y in range(h)] def create_vertex(upperbackleft_x, upperbackleft_y, upperbackleft_z, upperbackright_x, upperbackright_y, upperbackright_z, upperfrontleft_x, upperfrontleft_y, upperfrontleft_z, upperfrontright_x, upperfrontright_y, upperfrontright_z, underbac...
## @file # Module to gather dependency information for ASKAP packages # # @copyright (c) 2006 CSIRO # Australia Telescope National Facility (ATNF) # Commonwealth Scientific and Industrial Research Organisation (CSIRO) # PO Box 76, Epping NSW 1710, Australia # atnf-enquiries@csiro.au # # This file is part of the ASKAP ...
class Ordereddict: def __init__(self): self._list = [] def __len__(self): return len(self._list) def __setitem__(self, key, value): self._list.append([key, value]) def __getitem__(self, i): found = False for (key, value) in self.iteritems(): if key...
## Sum of odd numbers ## 7 kyu ## https://www.codewars.com/kata/55fd2d567d94ac3bc9000064 def row_sum_odd_numbers(n): total = 0 row_sum= 0 for i in range(n-1,0, -1): total += i starting_odd = total * 2 + 1 for i in range(1,n+1): row_sum += starting_odd starti...
def row_sum_odd_numbers(n): total = 0 row_sum = 0 for i in range(n - 1, 0, -1): total += i starting_odd = total * 2 + 1 for i in range(1, n + 1): row_sum += starting_odd starting_odd += 2 return row_sum
# Copyright 2017 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
load('//tools:bazel_hash_dict.bzl', 'BAZEL_HASH_DICT') bazel_versions = BAZEL_HASH_DICT.keys() def _zfill(v, l=5): """zfill a string by padding 0s to the left of the string till it is the link specified by l. """ return '0' * (l - len(v)) + v def _unfill(v, l=5): """unfill takes a zfilled string a...
# # PySNMP MIB module RFC1253-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RFC1253-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:00:57 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 0...
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, constraints_intersection, constraints_union, value_range_constraint, value_size_constraint) ...
# -*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| This file is subject to the terms and conditions defined in file | #| 'LICENSE.txt', which is part of this source code package. | #| ...
def test_func(message): print('Python: python function testFunc is executed!') print('Python: The message is "', message, '"') result = 2017 print('Python: The result should be "', result, '"') return result
# MIT OC - CS600 - Introduction to Computer Science and Programming # Problem Set 1: 3 Simple Problems - Problem 1 Min Payment # Name: Luke Young # Collaborators: None # Time Spent: 01:00 (hr:min) # 2018 04 21 00:20 # Program: Finding remaining balance after minimum payment # # Write a program that does the followin...
balance = 0.0 apr = 0.0 min_rate = 0.0 balance = float(raw_input('What is your current Balance? ')) apr = float(raw_input('What is the annual interest rate as a decimal? ')) min_rate = float(raw_input('What is the minimum payment rate as a decimal? ')) min_pay = 0.0 principle = 0.0 pay_total = 0.0 for month in range(1,...
# -*- coding: utf-8 -*- """ plugin ~~~~ plugin manager and plugin api :copyright: (c) 2017 by Baidu, Inc. :license: Apache, see LICENSE for more details. """
""" plugin ~~~~ plugin manager and plugin api :copyright: (c) 2017 by Baidu, Inc. :license: Apache, see LICENSE for more details. """
getInvoiceTopLevelItems = [ { 'categoryCode': 'sov_sec_ip_addresses_priv', 'createDate': '2018-04-04T23:15:20-06:00', 'description': '64 Portable Private IP Addresses', 'id': 724951323, 'oneTimeAfterTaxAmount': '0', 'recurringAfterTaxAmount': '0', 'hostName': ...
get_invoice_top_level_items = [{'categoryCode': 'sov_sec_ip_addresses_priv', 'createDate': '2018-04-04T23:15:20-06:00', 'description': '64 Portable Private IP Addresses', 'id': 724951323, 'oneTimeAfterTaxAmount': '0', 'recurringAfterTaxAmount': '0', 'hostName': 'bleg', 'domainName': 'beh.com', 'category': {'name': 'Pri...
#!/usr/bin/env python3 #this program will write out my full name and preferred pronouns print("Fabian Arias, he/him/his") #print out Fabian Arias, he/him/his
print('Fabian Arias, he/him/his')
class DSF_SIC_Map(object): """docstring for SIC_Map""" def __init__(self, dsffile = 'crsp/dsf.csv', sicfile = 'sic_codes.txt'): self.dsf = pd.read_csv("dsf.csv", dtype = {'CUSIP': np.str, 'PRC': np.float}, na_values = {'PRC': '-'}) self.sic = pd.read_table(sicfile, header = 1) self.sic.c...
class Dsf_Sic_Map(object): """docstring for SIC_Map""" def __init__(self, dsffile='crsp/dsf.csv', sicfile='sic_codes.txt'): self.dsf = pd.read_csv('dsf.csv', dtype={'CUSIP': np.str, 'PRC': np.float}, na_values={'PRC': '-'}) self.sic = pd.read_table(sicfile, header=1) self.sic.columns = ...
class Serial: def __init__(self, port=None, baudrate=None, timeout=None): pass def reset_output_buffer(self): pass def reset_input_buffer(self): pass def writable(self): return True def write(self, bytes): pass def flush(self): pass def r...
class Serial: def __init__(self, port=None, baudrate=None, timeout=None): pass def reset_output_buffer(self): pass def reset_input_buffer(self): pass def writable(self): return True def write(self, bytes): pass def flush(self): pass def ...
""" Python2-specific versions of various functions used by stomp.py """ NULL = '\x00' def input_prompt(prompt): """ Get user input :rtype: str """ return raw_input(prompt) def decode(byte_data, encoding=''): """ Decode the byte data to a string - in the case of this Py2 version, we can...
""" Python2-specific versions of various functions used by stomp.py """ null = '\x00' def input_prompt(prompt): """ Get user input :rtype: str """ return raw_input(prompt) def decode(byte_data, encoding=''): """ Decode the byte data to a string - in the case of this Py2 version, we can't ...
"""CIS 122 Winter 2018 Week 1 Problem set #1-3 Author: Jamie Thayer Credit: Just me, Jamie Thayer. Referenced https://docs.python.org/3/library/ to check function names Description: Introduction to programming Week-1 problem set. Use of Python numeric data types and operations to solve a variety of small problems.""" ...
"""CIS 122 Winter 2018 Week 1 Problem set #1-3 Author: Jamie Thayer Credit: Just me, Jamie Thayer. Referenced https://docs.python.org/3/library/ to check function names Description: Introduction to programming Week-1 problem set. Use of Python numeric data types and operations to solve a variety of small problems.""" '...
def is_even(x): if (x % 2 == 0): return True return False print([x for x in range(100) if is_even(x)])
def is_even(x): if x % 2 == 0: return True return False print([x for x in range(100) if is_even(x)])
# terrascript/data/AdrienneCohea/nomadutility.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:22:45 UTC) __all__ = []
__all__ = []
# Este es el ejercicio del grupo tercero c # del dia 13 de septiembre de 2021 # esta linea coloca un mensaje en la consola print("Este programa hace operaciones basicas") num1 = 130 numero_2 = 345 suma = num1 + numero_2 # la resta se hace con el simbolo '-' multip = num1 * numero_2 # la dicision se hace con una '/' p...
print('Este programa hace operaciones basicas') num1 = 130 numero_2 = 345 suma = num1 + numero_2 multip = num1 * numero_2 print('la suma es: ') print(suma) print('La multiplicacion da como resultado: ', multip)
score = input('Please enter your score.') score_float = float(score) if (score_float >= 0.9 and score_float < 1.0) : grade = 'A' elif (score_float >= 0.8 and score_float < 1.0) : grade = 'B' elif (score_float >= 0.7 and score_float < 1.0) : grade = 'C' elif (score_float >= 0.6 and score_float < 1.0) : ...
score = input('Please enter your score.') score_float = float(score) if score_float >= 0.9 and score_float < 1.0: grade = 'A' elif score_float >= 0.8 and score_float < 1.0: grade = 'B' elif score_float >= 0.7 and score_float < 1.0: grade = 'C' elif score_float >= 0.6 and score_float < 1.0: grade = 'D' e...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- assert any(list(map(lambda x: x > 4, range(8)))) assert any(map(lambda x: x > 4, range(8))) assert not any(list(map(lambda x: x < 0, range(8)))) assert not any((map(lambda x: x < 0, range(8))))
assert any(list(map(lambda x: x > 4, range(8)))) assert any(map(lambda x: x > 4, range(8))) assert not any(list(map(lambda x: x < 0, range(8)))) assert not any(map(lambda x: x < 0, range(8)))
class User: ''' This class generates new user instances ''' def __init__(self, fullname, email, username, password): self.fullname = fullname self.email = email self.username = username self.password = password user_list = [] def save_user(self): ''' ...
class User: """ This class generates new user instances """ def __init__(self, fullname, email, username, password): self.fullname = fullname self.email = email self.username = username self.password = password user_list = [] def save_user(self): """ ...
class Solution(object): def numDistinct(self, s, t): """ :type s: str :type t: str :rtype: int """ dp = [[0 for j in range(len(t) + 1)] for i in range(len(s) + 1)] for i in range(len(s) + 1): dp[i][0] = 1 for i in range(1, len(s) + 1)...
class Solution(object): def num_distinct(self, s, t): """ :type s: str :type t: str :rtype: int """ dp = [[0 for j in range(len(t) + 1)] for i in range(len(s) + 1)] for i in range(len(s) + 1): dp[i][0] = 1 for i in range(1, len(s) + 1): ...
class VehicleDevice: def __init__(self, data, controller): self._id = data['id'] self._vehicle_id = data['vehicle_id'] self._vin = data['vin'] self._state = data['state'] self._controller = controller self.should_poll = True def _name(self): return 'Tesla...
class Vehicledevice: def __init__(self, data, controller): self._id = data['id'] self._vehicle_id = data['vehicle_id'] self._vin = data['vin'] self._state = data['state'] self._controller = controller self.should_poll = True def _name(self): return 'Tesl...
#======================================================================================= # Open a domain template. #======================================================================================= selectCustomTemplate("wls/wlserver/common/templates/wls/wls.jar") loadTemplates() setOption('NodeManagerType','Man...
select_custom_template('wls/wlserver/common/templates/wls/wls.jar') load_templates() set_option('NodeManagerType', 'ManualNodeManagerSetup') set_option('ServerStartMode', 'prod') set_option('OverwriteDomain', 'true') domain = cd('/') domain.setName('demo-wls') cd('/Servers/AdminServer') cmo.setName('admin_server') cmo....
def create_matrix(rows, columns): result = [] for r in range(rows): row = ["" for c in range(columns)] result.append(row) return result def print_result(matrix): for el in matrix: print("".join(el)) rows, columns = map(int, input().split()) snake = input() matrix = create_matri...
def create_matrix(rows, columns): result = [] for r in range(rows): row = ['' for c in range(columns)] result.append(row) return result def print_result(matrix): for el in matrix: print(''.join(el)) (rows, columns) = map(int, input().split()) snake = input() matrix = create_matr...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
const_outbound_type_load_balancer = 'loadBalancer' const_outbound_type_user_defined_routing = 'userDefinedRouting' const_scale_set_priority_regular = 'Regular' const_scale_set_priority_spot = 'Spot' const_spot_eviction_policy_delete = 'Delete' const_spot_eviction_policy_deallocate = 'Deallocate' const_http_application_...
""" Problem 11. Assume that two variables, varA and varB, are assigned values, either numbers or strings. Write a piece of Python code that prints out one of the following messages: * "string involved" if either varA or varB are strings * "bigger" if varA is larger than varB * "equal" if varA is equal to varB...
""" Problem 11. Assume that two variables, varA and varB, are assigned values, either numbers or strings. Write a piece of Python code that prints out one of the following messages: * "string involved" if either varA or varB are strings * "bigger" if varA is larger than varB * "equal" if varA is equal to varB...
cars = 100.00 #number of cars available for the day space_in_a_car = 4.00 #amount of space in a cars drivers = 30.00 #number of available drivers passengers = 90.00 #number of available passengers cars_not_driven = cars - drivers #calculation for cars that are not used cars_driven = drivers #calculation for cars that a...
cars = 100.0 space_in_a_car = 4.0 drivers = 30.0 passengers = 90.0 cars_not_driven = cars - drivers cars_driven = drivers carpool_capacity = cars_driven * space_in_a_car average_passengers_per_car = passengers / cars_driven print('There are', cars, 'cars available') print('There are only', drivers, 'drivers available')...
class Solution: def findMaximumXOR(self, nums: List[int]) -> int: ans = mask = 0 for x in range(32)[::-1]: mask += 1 << x prefixSet = set([n & mask for n in nums]) temp = ans | 1 << x for prefix in prefixSet: if temp ^ prefix in prefixS...
class Solution: def find_maximum_xor(self, nums: List[int]) -> int: ans = mask = 0 for x in range(32)[::-1]: mask += 1 << x prefix_set = set([n & mask for n in nums]) temp = ans | 1 << x for prefix in prefixSet: if temp ^ prefix in pre...
# # PySNMP MIB module OMNI-gx2CM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/OMNI-gx2CM-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:23:48 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2...
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, value_range_constraint, single_value_constraint, constraints_union, constraints_intersection) ...
# -*- coding: utf-8 -*- # Copyright 2021 Cohesity Inc. class OracleDBConfigRedoLogGroupConf(object): """Implementation of the 'OracleDBConfig_RedoLogGroupConf' model. GROUP1 : {DST1/CH1.log, DST2/CH1.log} GROUP2 : {DST1/CH2.log, DST2/CH2.log} GROUP3 : {DST1/CH3.log, DST2/CH3.log} Attributes: ...
class Oracledbconfigredologgroupconf(object): """Implementation of the 'OracleDBConfig_RedoLogGroupConf' model. GROUP1 : {DST1/CH1.log, DST2/CH1.log} GROUP2 : {DST1/CH2.log, DST2/CH2.log} GROUP3 : {DST1/CH3.log, DST2/CH3.log} Attributes: group_member_vec (list of string): List of members o...
str = input().strip() n = int(input()) def check(s): if s=='a'or s=='e' or s=='i' or s=='o' or s=='u': return True return False def non_vowels(str,n): i,index =0,0 start = 0 res = 0 non_vowels = 0 disturb_flag = True while index<len(str): if disturb_flag: if not check(str[index]): non_vowels +=...
str = input().strip() n = int(input()) def check(s): if s == 'a' or s == 'e' or s == 'i' or (s == 'o') or (s == 'u'): return True return False def non_vowels(str, n): (i, index) = (0, 0) start = 0 res = 0 non_vowels = 0 disturb_flag = True while index < len(str): if dis...
low = int(input()) high = int(input()) x = int(input()) #first from bottom num = low while num <=high: tverrsum = sum([int(i) for i in str(num)]) if tverrsum == x: print(num) break num+=1 #first from top num = high while num >= low: tverrsum = sum([int(i) for i in str(num)]) if tver...
low = int(input()) high = int(input()) x = int(input()) num = low while num <= high: tverrsum = sum([int(i) for i in str(num)]) if tverrsum == x: print(num) break num += 1 num = high while num >= low: tverrsum = sum([int(i) for i in str(num)]) if tverrsum == x: print(num) ...
PLAYGROUND = """ <!DOCTYPE html> <html> <head> <meta charset=utf-8/> <meta name="viewport" content="user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui"> <title>GraphQL Playground</title> <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/graphql-playground-react@1.7.8/build/s...
playground = '\n<!DOCTYPE html>\n<html>\n<head>\n <meta charset=utf-8/>\n <meta name="viewport" content="user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui">\n <title>GraphQL Playground</title>\n <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/graphql-playground-react@1.7.8/bu...
print("Python Program to print the sum and average of natural numbers!") limit = int(input("Enter the limit of numbers:")) sumOfNumbers = (limit * (limit + 1)) / 2 averageOfNumbers = sumOfNumbers / limit print("The sum of", limit, "natural numbers is", sumOfNumbers) print("The Average of", limit, "natural number is", a...
print('Python Program to print the sum and average of natural numbers!') limit = int(input('Enter the limit of numbers:')) sum_of_numbers = limit * (limit + 1) / 2 average_of_numbers = sumOfNumbers / limit print('The sum of', limit, 'natural numbers is', sumOfNumbers) print('The Average of', limit, 'natural number is',...
"""This module was written by Gerd Woetzel: http://mail.python.org/pipermail/python-list/2005-January/261304.html This module is derived from Modules/rotormodule.c and translated into Python. I have appended the Copyright by Lance Ellinghouse below. The rotor module has been removed from the Python 2.4 ...
"""This module was written by Gerd Woetzel: http://mail.python.org/pipermail/python-list/2005-January/261304.html This module is derived from Modules/rotormodule.c and translated into Python. I have appended the Copyright by Lance Ellinghouse below. The rotor module has been removed from the Python 2.4 ...
_base_ = [ '../_base_/datasets/s3dis_seg-3d-13class.py', '../_base_/models/pointnet2_msg.py', '../_base_/schedules/seg_cosine_50e.py', '../_base_/default_runtime.py' ] # data settings data = dict(samples_per_gpu=16) evaluation = dict(interval=2) # model settings model = dict( backbone=dict(in_channels...
_base_ = ['../_base_/datasets/s3dis_seg-3d-13class.py', '../_base_/models/pointnet2_msg.py', '../_base_/schedules/seg_cosine_50e.py', '../_base_/default_runtime.py'] data = dict(samples_per_gpu=16) evaluation = dict(interval=2) model = dict(backbone=dict(in_channels=9), decode_head=dict(num_classes=13, ignore_index=13,...
string = str (input()) string_copy = string new_string = string.replace(string[0],string[-1]) new_string = string_copy.replace(string_copy[-1],string_copy[0]) print(new_string)
string = str(input()) string_copy = string new_string = string.replace(string[0], string[-1]) new_string = string_copy.replace(string_copy[-1], string_copy[0]) print(new_string)
#!/usr/bin/env python """ _WMCore_ Core libraries for Workload Management Packages """ __version__ = '1.5.5.pre5' __all__ = []
""" _WMCore_ Core libraries for Workload Management Packages """ __version__ = '1.5.5.pre5' __all__ = []
""" Draft Material. Cannabis Data Science Meetup Group Copyright (c) 2022 Cannlytics Authors: Keegan Skeate <keegan@cannlytics.com> Created: 1/11/2022 Updated: 1/19/2022 License: MIT License <https://opensource.org/licenses/MIT> """ # # Define lab datasets. # lab_datasets = ['LabResults_0', 'LabResults_1', 'LabResul...
""" Draft Material. Cannabis Data Science Meetup Group Copyright (c) 2022 Cannlytics Authors: Keegan Skeate <keegan@cannlytics.com> Created: 1/11/2022 Updated: 1/19/2022 License: MIT License <https://opensource.org/licenses/MIT> """
class SetupForm(QtWidgets.QWidget): global model model = SetupInformation() def __init__(self): super().__init__() self.initUI() def initUI(self): self.setObjectName("setupDialog") # self.resize(1754, 3000) self.model = model
class Setupform(QtWidgets.QWidget): global model model = setup_information() def __init__(self): super().__init__() self.initUI() def init_ui(self): self.setObjectName('setupDialog') self.model = model
""" COLOURS """ C_TEAL = 0, 128, 128 C_RED = 255, 0, 0 C_PINK = 255, 100, 100 C_GREEN = 0, 255, 0 C_BLUE = 0, 0, 255 C_WHITE = 255, 255, 255 C_BLACK = 0, 0, 0 C_GOLD = 255, 195, 0 """ Questions and Answers """ QNA_PATH = 'QnA.txt' with open(QNA_PATH) as f: data = f.read().split('\n') getting_...
""" COLOURS """ c_teal = (0, 128, 128) c_red = (255, 0, 0) c_pink = (255, 100, 100) c_green = (0, 255, 0) c_blue = (0, 0, 255) c_white = (255, 255, 255) c_black = (0, 0, 0) c_gold = (255, 195, 0) '\nQuestions and Answers\n' qna_path = 'QnA.txt' with open(QNA_PATH) as f: data = f.read().split('\n') getting_question ...
""" Copyright (C) 2017 Espressive Inc """
""" Copyright (C) 2017 Espressive Inc """