content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
# 10. Write a program to check whether an year is leap year or not. year=int(input("Enter an year : ")) if (year%4==0) and (year%100!=0) or (year%400==0): print(f"{year} is a leap year.") else: print(f"{year} is not a leap year.")
year = int(input('Enter an year : ')) if year % 4 == 0 and year % 100 != 0 or year % 400 == 0: print(f'{year} is a leap year.') else: print(f'{year} is not a leap year.')
def findone(L): left = 0 right = len(L) - 1 while left < right: mid = (left+right)// 2 isone = len(L[left:mid]) % 2 if L[mid] != L[mid-1] and L[mid] != L[mid+1]: return L[mid] if isone and L[mid] == L[mid-1]: left = mid + 1 elif isone and L[mi...
def findone(L): left = 0 right = len(L) - 1 while left < right: mid = (left + right) // 2 isone = len(L[left:mid]) % 2 if L[mid] != L[mid - 1] and L[mid] != L[mid + 1]: return L[mid] if isone and L[mid] == L[mid - 1]: left = mid + 1 elif isone ...
class BinarySearch: def search(self, array, element): first = 0 last = len(array) - 1 while first <= last: mid = (first + last)//2 if array[mid] == element: return mid else: if element < array[mid]: last...
class Binarysearch: def search(self, array, element): first = 0 last = len(array) - 1 while first <= last: mid = (first + last) // 2 if array[mid] == element: return mid elif element < array[mid]: last = mid - 1 ...
MAX_RESULTS = '50' CHANNELS_PART = 'brandingSettings,contentDetails,contentOwnerDetails,id,localizations,snippet,statistics,status,topicDetails' VIDEOS_PART = 'contentDetails,id,liveStreamingDetails,localizations,player,recordingDetails,snippet,statistics,status,topicDetails' SEARCH_PARTS = 'snippet' COMMENT_THREAD...
max_results = '50' channels_part = 'brandingSettings,contentDetails,contentOwnerDetails,id,localizations,snippet,statistics,status,topicDetails' videos_part = 'contentDetails,id,liveStreamingDetails,localizations,player,recordingDetails,snippet,statistics,status,topicDetails' search_parts = 'snippet' comment_threads_pa...
heroes = { "*Adagio*": "Adagio", "*Alpha*": "Alpha", "*Ardan*": "Ardan", "*Baron*": "Baron", "*Blackfeather*": "Blackfeather", "*Catherine*": "Catherine", "*Celeste*": "Celeste", "*Flicker*": "Flicker", "*Fortress*": "Fortress", "*Glaive*": "Glaive", "*Gwen*": "Gwen", "*K...
heroes = {'*Adagio*': 'Adagio', '*Alpha*': 'Alpha', '*Ardan*': 'Ardan', '*Baron*': 'Baron', '*Blackfeather*': 'Blackfeather', '*Catherine*': 'Catherine', '*Celeste*': 'Celeste', '*Flicker*': 'Flicker', '*Fortress*': 'Fortress', '*Glaive*': 'Glaive', '*Gwen*': 'Gwen', '*Krul*': 'Krul', '*Hero009*': 'Krul', '*Skaarf*': '...
# Generated by h2py from /usr/include/netinet/in.h # Included from net/nh.h # Included from sys/machine.h LITTLE_ENDIAN = 1234 BIG_ENDIAN = 4321 PDP_ENDIAN = 3412 BYTE_ORDER = BIG_ENDIAN DEFAULT_GPR = 0xDEADBEEF MSR_EE = 0x8000 MSR_PR = 0x4000 MSR_FP = 0x2000 MSR_ME = 0x1000 MSR_FE = 0x0800 MSR_FE0 = 0x0800 MSR_SE = ...
little_endian = 1234 big_endian = 4321 pdp_endian = 3412 byte_order = BIG_ENDIAN default_gpr = 3735928559 msr_ee = 32768 msr_pr = 16384 msr_fp = 8192 msr_me = 4096 msr_fe = 2048 msr_fe0 = 2048 msr_se = 1024 msr_be = 512 msr_ie = 256 msr_fe1 = 256 msr_al = 128 msr_ip = 64 msr_ir = 32 msr_dr = 16 msr_pm = 4 default_msr =...
characterMapNurse = { "nurse_be1_001": "nurse_be1_001", # Auto: Same "nurse_be1_002": "nurse_be1_002", # Auto: Same "nurse_be1_003": "nurse_be1_003", # Auto: Same "nurs...
character_map_nurse = {'nurse_be1_001': 'nurse_be1_001', 'nurse_be1_002': 'nurse_be1_002', 'nurse_be1_003': 'nurse_be1_003', 'nurse_be1_full_001': 'nurse_be1_full_001', 'nurse_be1_full_002': 'nurse_be1_full_002', 'nurse_be1_full_003': 'nurse_be1_full_003', 'nurse_be1_full_naked_001': 'nurse_be1_full_naked_001', 'nurse_...
nombre="roberto" edad=25 persona=["jorge","peralta",34256643,1987,0] print(persona) clave_personal=persona[2] * persona[-2] print(clave_personal) persona[-1]=clave_personal print(persona)
nombre = 'roberto' edad = 25 persona = ['jorge', 'peralta', 34256643, 1987, 0] print(persona) clave_personal = persona[2] * persona[-2] print(clave_personal) persona[-1] = clave_personal print(persona)
Mystring = "Castlevania" Mystring2 = "C a s t l e v a n i a" Otherstring = "Mankind" # Comando dir -> Sacar Metodos # print(dir(Mystring)) # print(Mystring.title()) # print(Mystring.upper()) # print(Otherstring.lower()) # print(Mystring.lower()) # print(Mystring.swapcase()) # print(Otherstring.replace("Mankind", "Pale...
mystring = 'Castlevania' mystring2 = 'C a s t l e v a n i a' otherstring = 'Mankind' print(f'My favorite game is {Mystring}') print('My favorite game is ' + Mystring) print('My favorite game is {0}'.format(Mystring)) print(f'{Otherstring} in spanish is Humanidad')
# define the paths to the image directory IMAGES_PATH = "../dataset/kaggle_dogs_vs_cats/train" # since we do not have the validation data or acces to the testing # labels we need to take a number of images from the training # data and use them instead NUM_CLASSES = 2 NUM_VALIDATION_IMAGES = 1250 * NUM_CLASSES NUM_TEST...
images_path = '../dataset/kaggle_dogs_vs_cats/train' num_classes = 2 num_validation_images = 1250 * NUM_CLASSES num_test_images = 1250 * NUM_CLASSES train_hdf5 = '../dataset/kaggle_dogs_vs_cats/hdf5/train.hdf5' validation_hdf5 = '../dataset/kaggle_dogs_vs_cats/hdf5/validation.hdf5' test_hdf5 = '../dataset/kaggle_dogs_v...
## ## code ## pmLookup = { b'00': 'Film', b'01': 'Cinema', b'02': 'Animation', b'03': 'Natural', b'04': 'HDR10', b'06': 'THX', b'0B': 'FrameAdaptHDR', b'0C': 'User1', b'0D': 'User2', b'0E': 'User3', b'0F': 'User4', b'10': 'User5', b'11': 'User6', b'14': 'HLG', ...
pm_lookup = {b'00': 'Film', b'01': 'Cinema', b'02': 'Animation', b'03': 'Natural', b'04': 'HDR10', b'06': 'THX', b'0B': 'FrameAdaptHDR', b'0C': 'User1', b'0D': 'User2', b'0E': 'User3', b'0F': 'User4', b'10': 'User5', b'11': 'User6', b'14': 'HLG', b'16': 'PanaPQ'} def get_picture_mode(bin): if bin in pmLookup: ...
# Copyright 2019 The Vearch 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 ...
port = 4101 batch_size = 16 detect_model = 'yolo3' extract_model = 'vgg16' gpu = '0' ip_address = 'http://****' ip_scheme = ip_address + ':443/space' ip_insert = ip_address + ':80' database_name = 'test' table_name = 'test'
class Test_2020(object): def __init__(self): self.a = 1 print(f'success') def add_a(self): self.a += 1
class Test_2020(object): def __init__(self): self.a = 1 print(f'success') def add_a(self): self.a += 1
# # PySNMP MIB module ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:01:40 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 #...
(softent_ind1_vfc,) = mibBuilder.importSymbols('ALCATEL-IND1-BASE', 'softentIND1Vfc') (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, value_range_...
## While loop # like if but it indicates the sequence of statements might be executed many times as long as the condition remains true theSum = 0 data = input("Enter a number: ") while (data!= ""): number = float(data) theSum += number data = input("Enter a number or enter to quit: ") print(f"the sum is:...
the_sum = 0 data = input('Enter a number: ') while data != '': number = float(data) the_sum += number data = input('Enter a number or enter to quit: ') print(f'the sum is: {theSum:,.2f}') the_sum = 0 for number in range(1, 10001): the_sum += number print(theSum) the_sum = 0 number = 1 while number < 100...
# -*- coding: utf-8 -*- API_BASE_URL = 'https://b-api.cardioqvark.ru:1443/' API_PORT = 1443 CLIENT_CERT_PATH = '/tmp/' QVARK_CA_CERT_NAME = 'qvark_ca.pem'
api_base_url = 'https://b-api.cardioqvark.ru:1443/' api_port = 1443 client_cert_path = '/tmp/' qvark_ca_cert_name = 'qvark_ca.pem'
def dynamically_import(): mod = __import__('my_package.my_module', fromlist=['my_class']) klass = getattr(mod, 'my_class') if '__main__' == __name__: dynamically_import()
def dynamically_import(): mod = __import__('my_package.my_module', fromlist=['my_class']) klass = getattr(mod, 'my_class') if '__main__' == __name__: dynamically_import()
class Mandatory: def __init__(self, mandatory1, mandatory2): self.mandatory1 = mandatory1 self.mandatory2 = mandatory2 def get_args(self): return self.mandatory1, self.mandatory2 class Defaults: def __init__(self, mandatory, default1='value', default2=None): self.mandato...
class Mandatory: def __init__(self, mandatory1, mandatory2): self.mandatory1 = mandatory1 self.mandatory2 = mandatory2 def get_args(self): return (self.mandatory1, self.mandatory2) class Defaults: def __init__(self, mandatory, default1='value', default2=None): self.mandat...
#!/usr/bin/env python3 def apples_and_oranges(pair): first, second = pair if first == "apples": return True elif second == "oranges": return True else: return False
def apples_and_oranges(pair): (first, second) = pair if first == 'apples': return True elif second == 'oranges': return True else: return False
# 1) a = [1, 4, 5, 7, 8, -2, 0, -1] # 2) print('At index 3:', a[3]) print('At index 5:', a[5]) # 3) a_sorted = sorted(a, reverse = True) print('Sorted a:', a_sorted) # 4) print('1...3:', a_sorted[1:4]) print('2...6:', a_sorted[2:7]) # 5) del a_sorted[2:4] # 6) print('Sorted a:', a_sorted) # 7) b = ['grape...
a = [1, 4, 5, 7, 8, -2, 0, -1] print('At index 3:', a[3]) print('At index 5:', a[5]) a_sorted = sorted(a, reverse=True) print('Sorted a:', a_sorted) print('1...3:', a_sorted[1:4]) print('2...6:', a_sorted[2:7]) del a_sorted[2:4] print('Sorted a:', a_sorted) b = ['grapes', 'Potatoes', 'tomatoes', 'Orange', 'Lemon', 'Bro...
#encoding:utf-8 subreddit = 'PolHumor' t_channel = '@r_PolHumor' def send_post(submission, r2t): return r2t.send_simple(submission)
subreddit = 'PolHumor' t_channel = '@r_PolHumor' def send_post(submission, r2t): return r2t.send_simple(submission)
print("this is a test for branching") print("this is on loopbranch") #this will be added on the new file with out modifing the code before l = list() for i in range(6): l.append(i) print(l)
print('this is a test for branching') print('this is on loopbranch') l = list() for i in range(6): l.append(i) print(l)
def show_dict(D): for i,j in D.items(): print(f"{i}: {j}") def sort_by_values(D): L = sorted(D.items(), key=lambda kv: kv[1]) return L
def show_dict(D): for (i, j) in D.items(): print(f'{i}: {j}') def sort_by_values(D): l = sorted(D.items(), key=lambda kv: kv[1]) return L
# coding = utf-8 # Create date: 2018-10-29 # Author :Bowen Lee def test_dhcp_hostname(ros_kvm_init, cloud_config_url): command = 'hostname' feed_back = 'rancher' kwargs = dict(cloud_config='{url}test_dncp_hostname.yml'.format(url=cloud_config_url), is_install_to_hard_drive=True) tupl...
def test_dhcp_hostname(ros_kvm_init, cloud_config_url): command = 'hostname' feed_back = 'rancher' kwargs = dict(cloud_config='{url}test_dncp_hostname.yml'.format(url=cloud_config_url), is_install_to_hard_drive=True) tuple_return = ros_kvm_init(**kwargs) client = tuple_return[0] (stdin, stdout, ...
condition = 1 while condition < 10: print(condition) condition += 1 while True: print('santhosh')
condition = 1 while condition < 10: print(condition) condition += 1 while True: print('santhosh')
class ParsingError(Exception): pass class CastError(Exception): original_exception = None def __init__(self, exception): if isinstance(exception, Exception): message = str(exception) self.original_exception = exception else: message = str(exception) ...
class Parsingerror(Exception): pass class Casterror(Exception): original_exception = None def __init__(self, exception): if isinstance(exception, Exception): message = str(exception) self.original_exception = exception else: message = str(exception) ...
# dataset settings dataset_type = 'S3DISSegDataset' data_root = './data/s3dis/' class_names = ('ceiling', 'floor', 'wall', 'beam', 'column', 'window', 'door', 'table', 'chair', 'sofa', 'bookcase', 'board', 'clutter') num_points = 4096 train_area = [1, 2, 3, 4, 6] test_area = 5 train_pipeline = [ dict...
dataset_type = 'S3DISSegDataset' data_root = './data/s3dis/' class_names = ('ceiling', 'floor', 'wall', 'beam', 'column', 'window', 'door', 'table', 'chair', 'sofa', 'bookcase', 'board', 'clutter') num_points = 4096 train_area = [1, 2, 3, 4, 6] test_area = 5 train_pipeline = [dict(type='LoadPointsFromFile', coord_type=...
p = int(input("Enter a number: ")) def expand_x_1(p): if p == 1: print('Neither composite nor prime') exit() elif p < 1 or (p - int(p)) != 0: print('Invalid Input') exit() coefficient = [1] for i in range(p): coefficient.append(coefficient[-1] * -(p ...
p = int(input('Enter a number: ')) def expand_x_1(p): if p == 1: print('Neither composite nor prime') exit() elif p < 1 or p - int(p) != 0: print('Invalid Input') exit() coefficient = [1] for i in range(p): coefficient.append(coefficient[-1] * -(p - i) / (i + 1))...
class CFG: random_state = 42 shuffle = True test_size = 0.3 no_of_fold = 5 use_gpu = False
class Cfg: random_state = 42 shuffle = True test_size = 0.3 no_of_fold = 5 use_gpu = False
def extractJapmtlWordpressCom(item): ''' Parser for 'japmtl.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('one day, the engagement was suddenly cancelled. ......my little sister\...
def extract_japmtl_wordpress_com(item): """ Parser for 'japmtl.wordpress.com' """ (vol, chp, frag, postfix) = extract_vol_chapter_fragment_postfix(item['title']) if not (chp or vol) or 'preview' in item['title'].lower(): return None tagmap = [("one day, the engagement was suddenly cancelled. ....
# # PySNMP MIB module HPN-ICF-DHCPR-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HPN-ICF-DHCPR-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:25:26 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Ma...
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, value_size_constraint, constraints_intersection, single_value_constraint, constraints_union) ...
def sort_contacts(contacts): newcontacts=[] keys = contacts.keys() for key in sorted(keys): data = (key, contacts[key][0], contacts[key][1]) newcontacts.append(data) return newcontacts contacts = input("Please input the contacts.") print(sort_contacts(contacts))
def sort_contacts(contacts): newcontacts = [] keys = contacts.keys() for key in sorted(keys): data = (key, contacts[key][0], contacts[key][1]) newcontacts.append(data) return newcontacts contacts = input('Please input the contacts.') print(sort_contacts(contacts))
color = input("Enter a color: ") plural_noun = input("Enter a plural noun: ") celebrity = input("Enter the name of a Celebrity: ") print("Roses are " + color) print(plural_noun + " are blue") print("I love " + celebrity) ## Mad Lib 1 date = input("Enter a date: ") full_name = input("Enter a full name: ") a_place = i...
color = input('Enter a color: ') plural_noun = input('Enter a plural noun: ') celebrity = input('Enter the name of a Celebrity: ') print('Roses are ' + color) print(plural_noun + ' are blue') print('I love ' + celebrity) date = input('Enter a date: ') full_name = input('Enter a full name: ') a_place = input('Enter the ...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'flapper_version_h_file%': 'flapper_version.h', 'flapper_binary_files%': [], 'conditions': [ [ 'branding == "Chrome"...
{'variables': {'flapper_version_h_file%': 'flapper_version.h', 'flapper_binary_files%': [], 'conditions': [['branding == "Chrome"', {'conditions': [['OS == "linux" and target_arch == "ia32"', {'flapper_version_h_file%': 'symbols/ppapi/linux/flapper_version.h', 'flapper_binary_files%': ['binaries/ppapi/linux/libpepflash...
# 204. Count Primes # Runtime: 4512 ms, faster than 43.85% of Python3 online submissions for Count Primes. # Memory Usage: 52.8 MB, less than 90.72% of Python3 online submissions for Count Primes. class Solution: # Sieve of Eratosthenes def countPrimes(self, n: int) -> int: if n <= 2: re...
class Solution: def count_primes(self, n: int) -> int: if n <= 2: return 0 is_prime = [True] * n count = 0 for i in range(2, n): if is_prime[i]: count += 1 for j in range(i * i, n, i): is_prime[j] = False ...
def ErrorHandler(function): def wrapper(*args, **kwargs): try: return function(*args, **kwargs) except Exception as e: # pragma: no cover pass return wrapper
def error_handler(function): def wrapper(*args, **kwargs): try: return function(*args, **kwargs) except Exception as e: pass return wrapper
# # # Copyright 2016 Kirk A Jackson DBA bristoSOFT all rights reserved. All methods, # techniques, algorithms are confidential trade secrets under Ohio and U.S. # Federal law owned by bristoSOFT. # # Kirk A Jackson dba bristoSOFT # 4100 Executive Park Drive # Suite 11 # Cincinnati, OH 45241 # Phone (513) 401-9114 # e...
""" This control package includes all the modules needed for bristoSOFT Contacts. """
class CommandNotFound(Exception): def __init__(self, command_name): self.name = command_name def __str__(self): return f"Command with name {self.name} not found"
class Commandnotfound(Exception): def __init__(self, command_name): self.name = command_name def __str__(self): return f'Command with name {self.name} not found'
def _merge(left, right, cmp): res = [] leftI , rightI = 0, 0 while leftI<len(left) and rightI<len(right): if cmp(left[leftI], right[rightI])<=0: res.append(left[leftI]) leftI += 1 else: res.append(right[rightI]) rightI += 1 while leftI<len(left): res.append(left[leftI]) leftI += 1 while righ...
def _merge(left, right, cmp): res = [] (left_i, right_i) = (0, 0) while leftI < len(left) and rightI < len(right): if cmp(left[leftI], right[rightI]) <= 0: res.append(left[leftI]) left_i += 1 else: res.append(right[rightI]) right_i += 1 whi...
tokentype = { 'INT': 'INT', 'FLOAT': 'FLOAT', 'STRING': 'STRING', 'CHAR': 'CHAR', '+': 'PLUS', '-': 'MINUS', '*': 'MUL', '/': 'DIV', '=': 'ASSIGN', '%': 'MODULO', ':': 'COLON', ';': 'SEMICOLON', '<': 'LT', '>': 'GT', '[': 'O_BRACKET', ']': 'C_BRACKET', ...
tokentype = {'INT': 'INT', 'FLOAT': 'FLOAT', 'STRING': 'STRING', 'CHAR': 'CHAR', '+': 'PLUS', '-': 'MINUS', '*': 'MUL', '/': 'DIV', '=': 'ASSIGN', '%': 'MODULO', ':': 'COLON', ';': 'SEMICOLON', '<': 'LT', '>': 'GT', '[': 'O_BRACKET', ']': 'C_BRACKET', '(': 'O_PAREN', ')': 'C_PAREN', '{': 'O_BRACE', '}': 'C_BRACE', '&':...
# Takes the following input :- number of items, a weights array, a value array, and the capacity of knap_sack def knap_sack(n, w, v, c): if n == 0 or w == 0: return 0 if w[n - 1] > c: return knap_sack(n - 1, w, v, c) else: return max(v[n - 1] + knap_sack(n - 1, w, v, c - w[n - 1]...
def knap_sack(n, w, v, c): if n == 0 or w == 0: return 0 if w[n - 1] > c: return knap_sack(n - 1, w, v, c) else: return max(v[n - 1] + knap_sack(n - 1, w, v, c - w[n - 1]), knap_sack(n - 1, w, v, c)) val = [60, 100, 120] wt = [10, 20, 30] w = 50 n = len(val) print(knap_sack(n, wt, va...
def maxXorSum(n, k): if k == 1: return n res = 1 l = [1] while res <= n: res <<= 1 l.append(res) print(l) # return res - 1 n, k = map(int, input().split()) maxXorSum(n, k)
def max_xor_sum(n, k): if k == 1: return n res = 1 l = [1] while res <= n: res <<= 1 l.append(res) print(l) (n, k) = map(int, input().split()) max_xor_sum(n, k)
#Gasolina t=float(input()) v=float(input()) l=(t*v) /12 print("{:.3f}".format(l) )
t = float(input()) v = float(input()) l = t * v / 12 print('{:.3f}'.format(l))
# Copyright 2021 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. register_npcx_project( project_name="volteer", zephyr_board="volteer", dts_overlays=[ "bb_retimer.dts", "cbi_eeprom.dts", ...
register_npcx_project(project_name='volteer', zephyr_board='volteer', dts_overlays=['bb_retimer.dts', 'cbi_eeprom.dts', 'fan.dts', 'gpio.dts', 'keyboard.dts', 'motionsense.dts', 'pwm.dts', 'pwm_leds.dts', 'usbc.dts'])
# We could use f'' string but it is lunched after version 3.5 # So before f'' string developers are used format specifier. name = 'Amresh' channel = 'TechieDuo' # a = f'Good morning, {name}' # a = 'Good morning, {}\nWelcome to {}, Chief'.format(name, channel) # customize the position a = 'Good morning, {1}\nWelc...
name = 'Amresh' channel = 'TechieDuo' a = 'Good morning, {1}\nWelcome to {0}, Chief'.format(name, channel) print(a)
class Solution: def romanToInt(self, s: str) -> int: roman_dict = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000} temp = roman_dict[s[-1]] summation = temp for i in s[:-1][::-1]: value = roman_dict[i] if value >= temp: summati...
class Solution: def roman_to_int(self, s: str) -> int: roman_dict = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000} temp = roman_dict[s[-1]] summation = temp for i in s[:-1][::-1]: value = roman_dict[i] if value >= temp: summ...
np.random.seed(2020) # set random seed # sweep through values for lambda lambdas = np.arange(0.05, 0.95, 0.01) empirical_variances = np.zeros_like(lambdas) analytical_variances = np.zeros_like(lambdas) sig = 0.87 # compute empirical equilibrium variance for i, lam in enumerate(lambdas): empirical_variances[i] = ...
np.random.seed(2020) lambdas = np.arange(0.05, 0.95, 0.01) empirical_variances = np.zeros_like(lambdas) analytical_variances = np.zeros_like(lambdas) sig = 0.87 for (i, lam) in enumerate(lambdas): empirical_variances[i] = ddm_eq_var(5000, x0, xinfty, lambdas[i], sig) analytical_variances = sig ** 2 / (1 - lambdas *...
# No Copyright @u@ TaskType={ "classification":0, "SANclassification":1 } TaskID = { "csqa":0, "mcscript2":1, "cosmosqa":2 } TaskName = ["csqa","mcscript2","cosmosqa"]
task_type = {'classification': 0, 'SANclassification': 1} task_id = {'csqa': 0, 'mcscript2': 1, 'cosmosqa': 2} task_name = ['csqa', 'mcscript2', 'cosmosqa']
def open_file(): while True: file_name = input("Enter input file name>>> ") try: fhand = open(file_name, "r") break except FileNotFoundError: print("Couldn't open file, Invalid name or file doesn't exist!") continue return fhand def proce...
def open_file(): while True: file_name = input('Enter input file name>>> ') try: fhand = open(file_name, 'r') break except FileNotFoundError: print("Couldn't open file, Invalid name or file doesn't exist!") continue return fhand def proces...
data = [[0,1.5],[2,1.7],[3,2.1],[5,2.2],[6,2.8],[7,2.9],[9,3.2],[11,3.7]] def dEa(a, b): sum = 0 for i in data: sum += i[0] * (i[0]*a + b - i[1]) return sum def dEb(a, b): sum = 0 for i in data: sum += i[0]*a + b - i[1] return sum eta = 0.006 # study rate a, b = 2,1 # start for i in range(0,200)...
data = [[0, 1.5], [2, 1.7], [3, 2.1], [5, 2.2], [6, 2.8], [7, 2.9], [9, 3.2], [11, 3.7]] def d_ea(a, b): sum = 0 for i in data: sum += i[0] * (i[0] * a + b - i[1]) return sum def d_eb(a, b): sum = 0 for i in data: sum += i[0] * a + b - i[1] return sum eta = 0.006 (a, b) = (2, 1...
print('hi all') print ('hello world') print('hi') print('hii') print('hello2')
print('hi all') print('hello world') print('hi') print('hii') print('hello2')
grocery = ["rice", "water", "tomato", "onion", "ginger"] for i in range(2, len(grocery), 2): print(grocery[i])
grocery = ['rice', 'water', 'tomato', 'onion', 'ginger'] for i in range(2, len(grocery), 2): print(grocery[i])
class Database(): def __init__(self, connector, id): self.connector = connector self.id = id self.base_url = 'https://api.devicemagic.com/api/forms' \ '/{0}/device_magic_database.json'.format(self.id) def json(self, *args): return self._filtered_query(ar...
class Database: def __init__(self, connector, id): self.connector = connector self.id = id self.base_url = 'https://api.devicemagic.com/api/forms/{0}/device_magic_database.json'.format(self.id) def json(self, *args): return self._filtered_query(args) if args else self._basic_qu...
expected_output = { "program": { "rcp_fs": { "instance": { "default": { "active": "0/0/CPU0", "active_state": "RUNNING", "group": "central-services", "jid": "1168", "standby": "N...
expected_output = {'program': {'rcp_fs': {'instance': {'default': {'active': '0/0/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1168', 'standby': 'NONE', 'standby_state': 'NOT_SPAWNED'}}}, 'ospf': {'instance': {'1': {'active': '0/0/CPU0', 'active_state': 'RUNNING', 'group': 'v4-routing', 'jid':...
number = 5 def summation(first, second): total = first + second + number return total outer_total = summation(10, 20) print("The first number we initialised was " + str(number)) print("The total after summation s " + str(outer_total))
number = 5 def summation(first, second): total = first + second + number return total outer_total = summation(10, 20) print('The first number we initialised was ' + str(number)) print('The total after summation s ' + str(outer_total))
def checkio(number): result = [] if number % 3 == 0: result.append('Fizz') if number % 5 == 0: result.append('Buzz') if result: return ' '.join(result) return str(number) # These "asserts" using only for self-checking and not necessary for # auto-testing if __name__ == '__m...
def checkio(number): result = [] if number % 3 == 0: result.append('Fizz') if number % 5 == 0: result.append('Buzz') if result: return ' '.join(result) return str(number) if __name__ == '__main__': assert checkio(15) == 'Fizz Buzz', '15 is divisible by 3 and 5' assert...
# By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, # we can see that the 6th prime is 13. # What is the 10 001st prime number? def is_prime(n: int) -> bool: if n <= 3: return n > 1 elif not(n%2 and n%3): return False i = 5 while i**2 <= n: if not(n%i and n%(i+2)): return False ...
def is_prime(n: int) -> bool: if n <= 3: return n > 1 elif not (n % 2 and n % 3): return False i = 5 while i ** 2 <= n: if not (n % i and n % (i + 2)): return False i += 6 return True def solution(number: int) -> int: (i, count) = (1, 0) while cou...
data1 = "10" # String data2 = 5 # Int data3 = 5.23 # Float data4 = False # Bool print(data1) print(data2) print(data3) print(data4)
data1 = '10' data2 = 5 data3 = 5.23 data4 = False print(data1) print(data2) print(data3) print(data4)
def setup_module(module): pass def teardown_module(module): print("TD MO") def test_passing(): assert True def test_failing(): assert False class TestClassPassing(object): def setup_method(self, method): pass def teardown_method(self, method): pass def test_passing(...
def setup_module(module): pass def teardown_module(module): print('TD MO') def test_passing(): assert True def test_failing(): assert False class Testclasspassing(object): def setup_method(self, method): pass def teardown_method(self, method): pass def test_passing(sel...
#!/usr/bin/python35 s1 = '12345' s2 = 'abcde' print('s1 = %s, id(s1) = %d' %(s1, id(s1))) print('s2 = %s, id(s2) = %d' %(s2, id(s2))) s2 = '12345' print('') print('s1 = %s, id(s1) = %d' %(s1, id(s1))) print('s2 = %s, id(s2) = %d' %(s2, id(s2)))
s1 = '12345' s2 = 'abcde' print('s1 = %s, id(s1) = %d' % (s1, id(s1))) print('s2 = %s, id(s2) = %d' % (s2, id(s2))) s2 = '12345' print('') print('s1 = %s, id(s1) = %d' % (s1, id(s1))) print('s2 = %s, id(s2) = %d' % (s2, id(s2)))
if __name__ == "__main__": with open('input.txt') as data: numbers = [int(number) for number in data.readlines()] current_freq = 0 idx = 0 past_frequencies = set() while True: if idx == len(numbers): idx = 0 if current_freq in past_freq...
if __name__ == '__main__': with open('input.txt') as data: numbers = [int(number) for number in data.readlines()] current_freq = 0 idx = 0 past_frequencies = set() while True: if idx == len(numbers): idx = 0 if current_freq in past_freq...
test = { 'name': 'q42', 'points': 3, 'suites': [ { 'cases': [ { 'code': '>>> ' 'print(np.round(model.coef_, ' '3))\n' '[ 0.024 0.023 -0.073 0.001 ' ...
test = {'name': 'q42', 'points': 3, 'suites': [{'cases': [{'code': '>>> print(np.round(model.coef_, 3))\n[ 0.024 0.023 -0.073 0.001 -0.263 -0.016 0.289 0.011 -0.438 0.066\n -0.274 -0.026 0.126 -0.019 -0.276 -0.418 0.223 -0.022 -0.215 -0.997\n 0.946 0.21 -0.021 -0.366 -0.121 -0.399 0.823 -0.282 -0.229 -0.392\...
def main(j, args, params, tags, tasklet): doc = params.doc e = params.requestContext.env addr = j.core.portal.runningPortal.ipaddr querystr = e["QUERY_STRING"] querystr = querystr.replace("&format=text", "") querystr = querystr.replace("&key=,", "") querystr = querystr.replace("&key=", ...
def main(j, args, params, tags, tasklet): doc = params.doc e = params.requestContext.env addr = j.core.portal.runningPortal.ipaddr querystr = e['QUERY_STRING'] querystr = querystr.replace('&format=text', '') querystr = querystr.replace('&key=,', '') querystr = querystr.replace('&key=', '') ...
# Title : Number of tuple equal to a user specified value # Author : Kiran raj R. # Date : 31:10:2020 def find_tuple(list_in, sum_in): length = len(list_in) count_tup = 0 list_tuples = [] if(sum(list_in) < sum_in) | length < 1: print(f"Cannot find any combination of sum {sum_in}") for ...
def find_tuple(list_in, sum_in): length = len(list_in) count_tup = 0 list_tuples = [] if (sum(list_in) < sum_in) | length < 1: print(f'Cannot find any combination of sum {sum_in}') for i in range(length - 2): tuple_with_sum = set() current_sum = sum_in - list_in[i] fo...
def tram(m, n): alfabet = "ABCDEFGHIJKLMNOPQRSTUVW"[:m] przystanki = (alfabet + alfabet[1:-1][::-1]) * 2 * n rozklad = "" while przystanki: curr = przystanki[n - 1] #print(przystanki[:m * 2], " -- >", curr) rozklad += curr przystanki = popall(przystanki[n:], curr) ...
def tram(m, n): alfabet = 'ABCDEFGHIJKLMNOPQRSTUVW'[:m] przystanki = (alfabet + alfabet[1:-1][::-1]) * 2 * n rozklad = '' while przystanki: curr = przystanki[n - 1] rozklad += curr przystanki = popall(przystanki[n:], curr) return rozklad def popall(slowo, x): ret = ' ' ...
# Path for log. Make sure the files (if present, otherwise the containing directory) are writable by the user that will be running the daemon. logPath = '/var/log/carillon/carillon.log' logDebug = False # Note, you can monitor the log in real time with tail -f [logPath] # MIDI info midiPort = 20 #Find with aplaymidi -...
log_path = '/var/log/carillon/carillon.log' log_debug = False midi_port = 20 midi_hw_port = 'hw:1' midi_path = '/path/to/midifiles' silent_hours = (22, 7) striking_delay = 3
DATA = '' MODEL_INIT = '$(pwd)/model_init' MODEL_TRUE = '$(pwd)/model_true' PRECOND = '' SPECFEM_DATA = '$(pwd)/specfem2d/DATA' SPECFEM_BIN = '$(pwd)/../../../specfem2d/bin'
data = '' model_init = '$(pwd)/model_init' model_true = '$(pwd)/model_true' precond = '' specfem_data = '$(pwd)/specfem2d/DATA' specfem_bin = '$(pwd)/../../../specfem2d/bin'
def example(): return [1721, 979, 366, 299, 675, 1456] def input_data(): with open( "input.txt" ) as fl: nums = [ int(i) for i in fl.readlines() ] return nums def find_it(nums): for idx in range(len(nums)): for idy in range(len(nums))[idx+1:]: if (nums[idx] + nums[idy] == ...
def example(): return [1721, 979, 366, 299, 675, 1456] def input_data(): with open('input.txt') as fl: nums = [int(i) for i in fl.readlines()] return nums def find_it(nums): for idx in range(len(nums)): for idy in range(len(nums))[idx + 1:]: if nums[idx] + nums[idy] == 2020...
# This is for the perso that i yearn # i shall do a petty iterator # it shall has a for cicle # Dictionary name = { "Mayra":"love", "Alejandra":"faith and hope", "Arauz":" all my life", "Mejia":"the best in civil engeenering" } # for Cicle for maam in name: print(f"She is {maam} and for me is {na...
name = {'Mayra': 'love', 'Alejandra': 'faith and hope', 'Arauz': ' all my life', 'Mejia': 'the best in civil engeenering'} for maam in name: print(f'She is {maam} and for me is {name[maam]}')
#!/usr/bin/env python '''The Goal of this script is to place the data in a python dictionary of unique results.''' # To accomplish this parsing we need a XML file that can be # parsed so do scan your localhost using this command # nmap -oX test 127.0.0.1
"""The Goal of this script is to place the data in a python dictionary of unique results."""
def main(): sequence = input().split(',') programs = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p'] program_string = ''.join(programs) seen = [program_string] for index in range(1000000000): for command in sequence: programs = run_comman...
def main(): sequence = input().split(',') programs = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p'] program_string = ''.join(programs) seen = [program_string] for index in range(1000000000): for command in sequence: programs = run_command(program...
def rec_bin_search(arr, element): if len(arr) == 0: return False else: mid = len(arr) // 2 if arr[mid] == element: return True else: if element < arr[mid]: return rec_bin_search(arr[:mid], element) else: return...
def rec_bin_search(arr, element): if len(arr) == 0: return False else: mid = len(arr) // 2 if arr[mid] == element: return True elif element < arr[mid]: return rec_bin_search(arr[:mid], element) else: return rec_bin_search(arr[mid + 1:],...
class Dog: def bark(self): print("Bark") d = Dog() d.bark()
class Dog: def bark(self): print('Bark') d = dog() d.bark()
[ alg.createtemp ( "revenue", alg.aggregation ( "l_suppkey", [ ( Reduction.SUM, "revenue", "sum_revenue" ) ], alg.map ( "revenue", scal.MulExpr ( scal.AttrExpr ( "l_extendedprice" ), scal.SubExpr ( scal.Const...
[alg.createtemp('revenue', alg.aggregation('l_suppkey', [(Reduction.SUM, 'revenue', 'sum_revenue')], alg.map('revenue', scal.MulExpr(scal.AttrExpr('l_extendedprice'), scal.SubExpr(scal.ConstExpr('1.0', Type.FLOAT), scal.AttrExpr('l_discount'))), alg.selection(scal.AndExpr(scal.LargerEqualExpr(scal.AttrExpr('l_shipdate'...
#!/usr/bin/env python __all__ = [ "osutils", ]
__all__ = ['osutils']
def searchInsert(self, nums, target): start = 0 end = len(nums) - 1 while start <= end: middle = (start + end) // 2 if nums[middle] == target: return middle elif target > nums[middle]: start = ...
def search_insert(self, nums, target): start = 0 end = len(nums) - 1 while start <= end: middle = (start + end) // 2 if nums[middle] == target: return middle elif target > nums[middle]: start = middle + 1 elif target < nums[middle]: end = m...
f = open("input1.txt").readlines() count = 0 for i in range(1,len(f)): if int(f[i-1])<int(f[i]): count+=1 print(count) count = 0 for i in range(3,len(f)): if int(f[i-3])<int(f[i]): count+=1 print(count)
f = open('input1.txt').readlines() count = 0 for i in range(1, len(f)): if int(f[i - 1]) < int(f[i]): count += 1 print(count) count = 0 for i in range(3, len(f)): if int(f[i - 3]) < int(f[i]): count += 1 print(count)
_base_ = "soft_teacher_faster_rcnn_r50_caffe_fpn_coco_full_720k.py" lr_config = dict(step=[120000 * 8, 160000 * 8]) runner = dict(_delete_=True, type="IterBasedRunner", max_iters=180000 * 8)
_base_ = 'soft_teacher_faster_rcnn_r50_caffe_fpn_coco_full_720k.py' lr_config = dict(step=[120000 * 8, 160000 * 8]) runner = dict(_delete_=True, type='IterBasedRunner', max_iters=180000 * 8)
# melhora a performace do codigo l1 = [1, 2, 3, 4, 5, 6, 7, 8, 9] ex1 = [variavel for variavel in l1] ex2 = [v * 2 for v in l1] # multiplica cado elemento da lista 1 por 2 ex3 = [(v, v2) for v in l1 for v2 in range(3)] print(ex3) l2 = ['pedro', 'mauro', 'maria'] ex4 = [v.replace('a', '@').upper() for v in l2] # m...
l1 = [1, 2, 3, 4, 5, 6, 7, 8, 9] ex1 = [variavel for variavel in l1] ex2 = [v * 2 for v in l1] ex3 = [(v, v2) for v in l1 for v2 in range(3)] print(ex3) l2 = ['pedro', 'mauro', 'maria'] ex4 = [v.replace('a', '@').upper() for v in l2] print(ex4) tupla = (('chave1', 'valor1'), ('chave2', 'valor2')) ex5 = [(y, x) for (x, ...
# defines a function that takes two arguments def cheese_and_crackers(cheese_count, boxes_of_crackers): # prints a string with the first argument passed into the function inserted into the output print(f"You have {cheese_count} cheeses!") # prints a string with the second argument passed into the function i...
def cheese_and_crackers(cheese_count, boxes_of_crackers): print(f'You have {cheese_count} cheeses!') print(f'You have {boxes_of_crackers} boxes of crackers!') print("Man that's enough for a party!") print('Get a blanket.\n') print('We can just give the function numbers directly:') cheese_and_crackers(20...
def selection_sort(arr): for i in range(len(arr)): min = i # index of min elem for j in range(i+1,len(arr)): # arr[j] is smaller than the min elem if arr[j] < arr[min]: min = j arr[i],arr[min] = arr[min],arr[i] # swap # print...
def selection_sort(arr): for i in range(len(arr)): min = i for j in range(i + 1, len(arr)): if arr[j] < arr[min]: min = j (arr[i], arr[min]) = (arr[min], arr[i]) return arr
class System_Status(): def __init__(self, plant_state=None): if plant_state is None: plant_state = [1, 1, 1] self.plant_state = plant_state def __str__(self): return f"El estado de la planta es {self.plant_state}"
class System_Status: def __init__(self, plant_state=None): if plant_state is None: plant_state = [1, 1, 1] self.plant_state = plant_state def __str__(self): return f'El estado de la planta es {self.plant_state}'
NODE_LIST = [ { 'name': 'syslog_source', 'type': 'syslog_file_monitor', 'outputs': [ 'filter', ], 'params': { 'filename': 'testlog1.log', } }, { 'name': 'filter', 'type': 'rx_grouper', 'params': { 'gr...
node_list = [{'name': 'syslog_source', 'type': 'syslog_file_monitor', 'outputs': ['filter'], 'params': {'filename': 'testlog1.log'}}, {'name': 'filter', 'type': 'rx_grouper', 'params': {'groups': {'imap_auth': {'rx_list': ['.*hint.*', ('host', 'publicapi1')], 'outputs': ['writer']}}}}, {'name': 'writer', 'type': 'conso...
def Convert(number,mode): if mode.startswith("mili") and mode.endswith("meter") == True: Milimeter = number Centimeter = number / 10 Meter = Centimeter / 100 Kilometer = Meter / 1000 Result1 = f"Milimeters : {Milimeter}" Result2 =f"Centimeters : {Centimeter}"...
def convert(number, mode): if mode.startswith('mili') and mode.endswith('meter') == True: milimeter = number centimeter = number / 10 meter = Centimeter / 100 kilometer = Meter / 1000 result1 = f'Milimeters : {Milimeter}' result2 = f'Centimeters : {Centimeter}' ...
pt = int(input('digite o primeiro termo da PA ')) r = int(input('digite a razao ')) termos = 1 total=0 total2=0 contador = 10 print('{} -> '.format(pt),end='') while contador > 1 : if contador == 10: total=pt+r print('{} -> '.format(total),end='') contador=contador-1 else: total= total+r pr...
pt = int(input('digite o primeiro termo da PA ')) r = int(input('digite a razao ')) termos = 1 total = 0 total2 = 0 contador = 10 print('{} -> '.format(pt), end='') while contador > 1: if contador == 10: total = pt + r print('{} -> '.format(total), end='') contador = contador - 1 else: ...
def analysis(sliceno, job): job.save('this_is_the_data_analysis ' + str(sliceno), 'myfile1', sliceno=sliceno) def synthesis(job): job.save('this_is_the_data_2', 'myfile2')
def analysis(sliceno, job): job.save('this_is_the_data_analysis ' + str(sliceno), 'myfile1', sliceno=sliceno) def synthesis(job): job.save('this_is_the_data_2', 'myfile2')
class IIIF_Photo(object): def __init__(self, iiif, country): self.iiif = iiif self.country = country def get_photo_link(self): return self.iiif["images"][0]["resource"]["@id"]
class Iiif_Photo(object): def __init__(self, iiif, country): self.iiif = iiif self.country = country def get_photo_link(self): return self.iiif['images'][0]['resource']['@id']
birth_year = input('Birth year: ') print(type(birth_year)) age = 2019 - int(birth_year) print(type(age)) print(age) #exercise weight_in_lbs = input('What is your weight (in pounds)? ') weight_in_kg = float(weight_in_lbs) * 0.454 print('Your weight is (in kg): ' + str(weight_in_kg))
birth_year = input('Birth year: ') print(type(birth_year)) age = 2019 - int(birth_year) print(type(age)) print(age) weight_in_lbs = input('What is your weight (in pounds)? ') weight_in_kg = float(weight_in_lbs) * 0.454 print('Your weight is (in kg): ' + str(weight_in_kg))
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Michael Eaton <meaton@iforium.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # this is a windows documentation stub. actual code lives in the .ps1 # file of the same name ANSIBLE_METADATA = {'metadata...
ansible_metadata = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} documentation = "\n---\nmodule: win_firewall\nversion_added: '2.4'\nshort_description: Enable or disable the Windows Firewall\ndescription:\n- Enable or Disable Windows Firewall profiles.\nrequirements:\n - This module r...
{ 'targets': [ { 'target_name': 'pointer', 'sources': ['pointer.cc'], 'include_dirs': ['<!(node -e \'require("nan")\')'], 'link_settings': { 'libraries': [ '-lX11', ] }, 'cflags': [ ...
{'targets': [{'target_name': 'pointer', 'sources': ['pointer.cc'], 'include_dirs': ['<!(node -e \'require("nan")\')'], 'link_settings': {'libraries': ['-lX11']}, 'cflags': []}]}
# # PySNMP MIB module CLEARTRAC7-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CLEARTRAC7-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:09:07 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...
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, constraints_union, constraints_intersection, value_range_constraint, value_size_constraint) ...
# -*- coding: utf-8 -*- print ("Hello World!") print ("Hello Again") print ("I like Typing this.") print ("This is fun.") print ('Yay! Printing.') print ("I'd much rather you 'not'.") print ('I "said" do not touch this.')
print('Hello World!') print('Hello Again') print('I like Typing this.') print('This is fun.') print('Yay! Printing.') print("I'd much rather you 'not'.") print('I "said" do not touch this.')
#!/usr/bin/env python polyCorners = 4 poly_1_x = [22.017965, 22.017852, 22.016992, 22.017187] poly_1_y = [85.432761, 85.433074, 85.432577, 85.432243] poly_2_x = [22.017187, 22.016992, 22.015849, 22.015982] poly_2_y = [85.432243, 85.432577, 85.431865, 85.431574] poly_3_x = [22.015850, 22.015636, 22.015874, 22.016053]...
poly_corners = 4 poly_1_x = [22.017965, 22.017852, 22.016992, 22.017187] poly_1_y = [85.432761, 85.433074, 85.432577, 85.432243] poly_2_x = [22.017187, 22.016992, 22.015849, 22.015982] poly_2_y = [85.432243, 85.432577, 85.431865, 85.431574] poly_3_x = [22.01585, 22.015636, 22.015874, 22.016053] poly_3_y = [85.431406, 8...
print (True and True) print (True and False) print (False and True) print (False and False) print (True or True) print (True or False) print (False or True) print (False or False)
print(True and True) print(True and False) print(False and True) print(False and False) print(True or True) print(True or False) print(False or True) print(False or False)
#!/usr/bin/env python3 print("hello") f = open('python file.txt', 'a+') f.write("Hello") f.close()
print('hello') f = open('python file.txt', 'a+') f.write('Hello') f.close()
class Person(dict): def __init__(self, person_id, sex, phenotype, studies): self.person_id = str(person_id) self.sex = sex self.phenotype = phenotype self.studies = studies def __repr__(self): return f'Person("{self.person_id}", "{self.sex}", {self.phenotype}, ...
class Person(dict): def __init__(self, person_id, sex, phenotype, studies): self.person_id = str(person_id) self.sex = sex self.phenotype = phenotype self.studies = studies def __repr__(self): return f'Person("{self.person_id}", "{self.sex}", {self.phenotype}, {self.stu...
A,B = map(int,input().split()) if A >= 13: print(B) elif A >= 6: print(B//2) else: print(0)
(a, b) = map(int, input().split()) if A >= 13: print(B) elif A >= 6: print(B // 2) else: print(0)
#SQL Server details SQL_HOST = 'localhost' SQL_USERNAME = 'root' SQL_PASSWORD = '' #Cache details - whether to call a URL once an ingestion script is finished RESET_CACHE = False RESET_CACHE_URL = 'http://example.com/visualization_reload/' #Fab - configuration for deploying to a remote server FAB_HOSTS = [] FAB_GITHUB_...
sql_host = 'localhost' sql_username = 'root' sql_password = '' reset_cache = False reset_cache_url = 'http://example.com/visualization_reload/' fab_hosts = [] fab_github_url = 'https://github.com/UQ-UQx/injestor.git' fab_remote_path = '/file/to/your/deployment/location' ignore_services = ['extractsample', 'personcourse...
__description__ = 'Wordpress Two-Factor Authentication Brute-forcer' __title__ = 'WPBiff' __version_info__ = ('0', '1', '1') __version__ = '.'.join(__version_info__) __author__ = 'Gabor Szathmari' __credits__ = ['Gabor Szathmari'] __maintainer__ = 'Gabor Szathmari' __email__ = 'gszathmari@gmail.com' __status__ = 'beta'...
__description__ = 'Wordpress Two-Factor Authentication Brute-forcer' __title__ = 'WPBiff' __version_info__ = ('0', '1', '1') __version__ = '.'.join(__version_info__) __author__ = 'Gabor Szathmari' __credits__ = ['Gabor Szathmari'] __maintainer__ = 'Gabor Szathmari' __email__ = 'gszathmari@gmail.com' __status__ = 'beta'...
N = int(input()) NG = set([int(input()) for _ in range(3)]) if N in NG: print("NO") exit(0) for _ in range(100): if 0 <= N <= 3: print("YES") break if N - 3 not in NG: N -= 3 elif N - 2 not in NG: N -= 2 elif N - 1 not in NG: N -= 1 else: print("NO")
n = int(input()) ng = set([int(input()) for _ in range(3)]) if N in NG: print('NO') exit(0) for _ in range(100): if 0 <= N <= 3: print('YES') break if N - 3 not in NG: n -= 3 elif N - 2 not in NG: n -= 2 elif N - 1 not in NG: n -= 1 else: print('NO')