content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
# Created by MechAviv # Dice Master Damage Skin | (2437274) if sm.addDamageSkin(2437274): sm.chat("'Dice Master Damage Skin' Damage Skin has been added to your account's damage skin collection.") sm.consumeItem()
if sm.addDamageSkin(2437274): sm.chat("'Dice Master Damage Skin' Damage Skin has been added to your account's damage skin collection.") sm.consumeItem()
BUF_SIZE = 1024 ENABLE_DEBUG = True IP_ADDR = '127.0.0.1' REQ_NET_NAME = '/api/netname/' REQ_IXP_NETS = '/api/ixnets/' REQ_IXPS = '/api/ix/' def printDebug(dbgMsg): ''' Funcao auxiliar para depuracao. ''' if ENABLE_DEBUG: print('[dbg]', dbgMsg)
buf_size = 1024 enable_debug = True ip_addr = '127.0.0.1' req_net_name = '/api/netname/' req_ixp_nets = '/api/ixnets/' req_ixps = '/api/ix/' def print_debug(dbgMsg): """ Funcao auxiliar para depuracao. """ if ENABLE_DEBUG: print('[dbg]', dbgMsg)
# Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # def f_gold ( s , c ) : oneSeen = False i = 0 n = len ( s ) while ( i < n ) : if ( s [ i ] == c ) : ...
def f_gold(s, c): one_seen = False i = 0 n = len(s) while i < n: if s[i] == c: if oneSeen == True: return False while i < n and s[i] == c: i = i + 1 one_seen = True else: i = i + 1 return True if __name__...
del_items(0x80082E48) SetType(0x80082E48, "int GetTpY__FUs(unsigned short tpage)") del_items(0x80082E64) SetType(0x80082E64, "int GetTpX__FUs(unsigned short tpage)") del_items(0x80082E70) SetType(0x80082E70, "void Remove96__Fv()") del_items(0x80082EA8) SetType(0x80082EA8, "void AppMain()") del_items(0x80082F6C) SetType...
del_items(2148019784) set_type(2148019784, 'int GetTpY__FUs(unsigned short tpage)') del_items(2148019812) set_type(2148019812, 'int GetTpX__FUs(unsigned short tpage)') del_items(2148019824) set_type(2148019824, 'void Remove96__Fv()') del_items(2148019880) set_type(2148019880, 'void AppMain()') del_items(2148020076) set...
#!/usr/bin/python3.8 #LEBG- Local, Enclosing, Global, Built-in x = "Global x" def outer(): # global x x = "Local x" def inner(): nonlocal x #cant use global variables as nonlocal in nested function x = "Nonlocal x" print(x) print(x) inner() print(x) print(x) outer(...
x = 'Global x' def outer(): x = 'Local x' def inner(): nonlocal x x = 'Nonlocal x' print(x) print(x) inner() print(x) print(x) outer() print(x)
''' Problem statement: We need to find the area difference between the squares where for one square circle is a circumcircle and the other one is incircle Problem Link: https://edabit.com/challenge/NNhkGocuPMcryW7GP ''' def square_areas_difference(r): return 2*r*r
""" Problem statement: We need to find the area difference between the squares where for one square circle is a circumcircle and the other one is incircle Problem Link: https://edabit.com/challenge/NNhkGocuPMcryW7GP """ def square_areas_difference(r): return 2 * r * r
class LockboxError(Exception): pass class LockboxDefinitionError(LockboxError): '''Base exception for problems related to the actual definition of a new lockbox record. ''' pass class LockboxParseError(LockboxError): '''Base exception for problems related to reading a BAI Lockbox record....
class Lockboxerror(Exception): pass class Lockboxdefinitionerror(LockboxError): """Base exception for problems related to the actual definition of a new lockbox record. """ pass class Lockboxparseerror(LockboxError): """Base exception for problems related to reading a BAI Lockbox record. ...
########################## DIRECTORIES ########################## save_folder = "saved_data" export_folder = "export_data"
save_folder = 'saved_data' export_folder = 'export_data'
def reverse_and_mirror(s1, s2): swap = s1.swapcase() return '{}@@@{}{}'.format(s2[::-1].swapcase(), swap[::-1], swap) # PEP8: function name should use snake_case reverseAndMirror = reverse_and_mirror
def reverse_and_mirror(s1, s2): swap = s1.swapcase() return '{}@@@{}{}'.format(s2[::-1].swapcase(), swap[::-1], swap) reverse_and_mirror = reverse_and_mirror
''' Brightness ========== This API helps you to control the brightness of your primary display screen. The :class:`Brightness` provides access to public methods to control the brightness of screen. NOTE:: For Android, make sure to add permission, WRITE_SETTINGS Simple Examples --------------- To know the current br...
""" Brightness ========== This API helps you to control the brightness of your primary display screen. The :class:`Brightness` provides access to public methods to control the brightness of screen. NOTE:: For Android, make sure to add permission, WRITE_SETTINGS Simple Examples --------------- To know the current br...
__all__ = ['baidusearch', 'bingsearch', 'bufferoverun', 'crtsh', 'certspottersearch', 'dnssearch', 'dogpilesearch', 'duckduckgosearch', 'exaleadsearch', 'githubcode', 'googlesearch', 'huntersearch', ...
__all__ = ['baidusearch', 'bingsearch', 'bufferoverun', 'crtsh', 'certspottersearch', 'dnssearch', 'dogpilesearch', 'duckduckgosearch', 'exaleadsearch', 'githubcode', 'googlesearch', 'huntersearch', 'intelxsearch', 'linkedinsearch', 'netcraft', 'otxsearch', 'securitytrailssearch', 'shodansearch', 'spyse', 'takeover', '...
def min_fine(N: int, times: list[int], fines: list[int]): weights: list[tuple[float, int]] = [] for i in range(N): weight = fines[i]/times[i] weights.append((weight, i)) weights = sorted(weights, reverse=True) time = 0 delay = 0 fine = 0 for weight in weights: time...
def min_fine(N: int, times: list[int], fines: list[int]): weights: list[tuple[float, int]] = [] for i in range(N): weight = fines[i] / times[i] weights.append((weight, i)) weights = sorted(weights, reverse=True) time = 0 delay = 0 fine = 0 for weight in weights: time ...
# @author Huaze Shen # @date 2019-11-06 def is_interleave(s1, s2, s3): if len(s1) + len(s2) != len(s3): return False n1 = len(s1) n2 = len(s2) dp = [[False for i in range(n2 + 1)] for j in range(n1 + 1)] dp[0][0] = True for i in range(1, n1 + 1): if dp[i - 1][0] and s1[i - 1] =...
def is_interleave(s1, s2, s3): if len(s1) + len(s2) != len(s3): return False n1 = len(s1) n2 = len(s2) dp = [[False for i in range(n2 + 1)] for j in range(n1 + 1)] dp[0][0] = True for i in range(1, n1 + 1): if dp[i - 1][0] and s1[i - 1] == s3[i - 1]: dp[i][0] = True ...
# # PySNMP MIB module CADANT-CMTS-DNSCLIENT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CADANT-CMTS-DNSCLIENT-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:27:04 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3....
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, value_range_constraint, single_value_constraint, value_size_constraint, constraints_union) ...
def can_build(env, platform): return env["tools"] def configure(env): pass
def can_build(env, platform): return env['tools'] def configure(env): pass
# -*- coding: utf-8 -*- LOGGING = { 'version': 1, #'disable_existing_loggers': True, 'formatters': { 'verbose': { 'format': '%(asctime)s [%(process)d][%(levelname)s] %(module)s,%(funcName)s,%(lineno)s:%(message)s' }, #, %(thread)d, %(name)s, ...
logging = {'version': 1, 'formatters': {'verbose': {'format': '%(asctime)s [%(process)d][%(levelname)s] %(module)s,%(funcName)s,%(lineno)s:%(message)s'}, 'performance': {'format': '%(asctime)s [%(process)d] [%(levelname)s] %(message)s'}, 'simple': {'format': '%(levelname)s %(message)s'}}, 'handlers': {'console': {'leve...
N = int(input()) ARRAY = [] while N != 0: A = input().split() if len(A) == 3: B = int(A[1]) C = int(A[2]) elif len(A) == 2: B = int(A[1]) if A[0] == "insert": ARRAY.insert(B, C) elif A[0] == "print": print(ARRAY) elif A[0] == "remove": ARRAY.re...
n = int(input()) array = [] while N != 0: a = input().split() if len(A) == 3: b = int(A[1]) c = int(A[2]) elif len(A) == 2: b = int(A[1]) if A[0] == 'insert': ARRAY.insert(B, C) elif A[0] == 'print': print(ARRAY) elif A[0] == 'remove': ARRAY.remove...
# Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def splitListToParts(self, head: Optional[ListNode], k: int) -> List[Optional[ListNode]]: output = [] node, length = head, 0...
class Solution: def split_list_to_parts(self, head: Optional[ListNode], k: int) -> List[Optional[ListNode]]: output = [] (node, length) = (head, 0) while node: length = length + 1 node = node.next (parts, remaining) = (length // k, length % k) (prev, ...
def test(): __msg__.good( "Nice work! Check the solution." )
def test(): __msg__.good('Nice work! Check the solution.')
#!/usr/bin/env python for _ in range(5): print("Hello, World!")
for _ in range(5): print('Hello, World!')
def palindrome(text): list_letters = list(text) list_letters = list_letters[::-1] new_text = ''.join(list_letters) return new_text == text
def palindrome(text): list_letters = list(text) list_letters = list_letters[::-1] new_text = ''.join(list_letters) return new_text == text
##Collect data: #SMI: 2021/10/29 # create proposal: proposal_id('2021_3', '30000_YZhang_XZ') #create the proposal id and folder # create proposal: proposal_id('2021_3', '30000_YZhang_Nov') #create the proposal id and folder # create proposal: proposal_id('2021_3', '307961_Dinca') #create the proposal id ...
sample_dict = {1: 'XZ_S1_1_Chitosan_Cu_Fiber_Wet', 2: 'XZ_S2_2_NaCellulose', 3: 'XZ_S2_7_Crab_Chitasan', 4: 'XZ_S2_9_CuNa_CellusloseNaOH', 5: 'XZ_S2_9_CuNa_Celluslose'} pxy_dict = {1: (-32800, -1000), 2: (-27300, -700), 3: (-16000, -1000), 4: (-2600, -1000), 5: (20400, -6000)} sample_dict = {1: 'XZ_S2_1_Wood', 2: 'XZ_S...
# coding=utf-8 # Marcelo Ambrosio de Goes # marcelogoes@gmail.com # 2022-03-25 # 100 Days of Code: The Complete Python Pro Bootcamp for 2022 # Day 39 - Flight Deal Finder class FlightData: def __init__(self, price, origin_city, origin_airport, destination_city, destination_airport, out_date, return_date): ...
class Flightdata: def __init__(self, price, origin_city, origin_airport, destination_city, destination_airport, out_date, return_date): self.price = price self.origin_city = origin_city self.origin_airport = origin_airport self.destination_city = destination_city self.destin...
def check_prime(number): # remove pass and write your logic here. if the number is prime return true, else return false if(number > 1): for each in range(2, number): if(number % each) == 0: return False return True return False def rotations(num): # remove p...
def check_prime(number): if number > 1: for each in range(2, number): if number % each == 0: return False return True return False def rotations(num): list_permutation = [] x = len(str(num)) pow_ten = pow(10, x - 1) for _ in range(x - 1): firs...
class TestResult: def __init__(self): self.runCount = 0 self.errorCount = 0 def testStarted(self): self.runCount = self.runCount + 1 def testFailed(self): self.errorCount = self.errorCount + 1 def summary(self): return '%d run, %d failed' % (self.runCount, sel...
class Testresult: def __init__(self): self.runCount = 0 self.errorCount = 0 def test_started(self): self.runCount = self.runCount + 1 def test_failed(self): self.errorCount = self.errorCount + 1 def summary(self): return '%d run, %d failed' % (self.runCount, s...
def isPalindrome(s): return s == s[::-1] def test_answer(): assert isPalindrome("software engineering gnireenigne erawtfos") == True assert isPalindrome("HomeWork 2 Github Homework") == False assert isPalindrome("reviver") == True assert isPalindrome("Group12orG") == False assert isPalindrome("wasitacatisaw"...
def is_palindrome(s): return s == s[::-1] def test_answer(): assert is_palindrome('software engineering gnireenigne erawtfos') == True assert is_palindrome('HomeWork 2 Github Homework') == False assert is_palindrome('reviver') == True assert is_palindrome('Group12orG') == False assert is_palind...
class Serializable: @classmethod def from_json(cls, obj): return cls(**obj) def __str__(self): s = F'{type(self).__name__} @ {id(self)}\n' for k, v in self.__dict__.items(): s += F'{k} -> {v}\n' return s def print_tree(obj, indent=2): if type(obj) in (b...
class Serializable: @classmethod def from_json(cls, obj): return cls(**obj) def __str__(self): s = f'{type(self).__name__} @ {id(self)}\n' for (k, v) in self.__dict__.items(): s += f'{k} -> {v}\n' return s def print_tree(obj, indent=2): if type(obj) in (boo...
getting_started = { 'title': 'Getting Started', 'questions': [ { 'q': 'How does HDX define humanitarian data?', 'a': 'We define humanitarian data as: ' '<ol>' '<li> data about the context in which a humanitarian crisis is occurring (e.g., baselin...
getting_started = {'title': 'Getting Started', 'questions': [{'q': 'How does HDX define humanitarian data?', 'a': 'We define humanitarian data as: <ol><li> data about the context in which a humanitarian crisis is occurring (e.g., baseline/development data, damage assessments, geospatial data)</li><li> data about the pe...
# Space: O(n) # Time: O(n) class Solution: def sequentialDigits(self, low, high): sequence = '123456789' res = [] start_length = len(str(low)) end_length = len(str(high)) for length in range(start_length, end_length + 1): for i in range(len(sequence)): ...
class Solution: def sequential_digits(self, low, high): sequence = '123456789' res = [] start_length = len(str(low)) end_length = len(str(high)) for length in range(start_length, end_length + 1): for i in range(len(sequence)): end_index = i + leng...
class Solution: def minOperations(self, nums: List[int]) -> int: cm = nums[0] i = 1 ops = 0 while i < len(nums): if nums[i] > cm: cm = nums[i] i += 1 else: cm += 1 ops += cm - num...
class Solution: def min_operations(self, nums: List[int]) -> int: cm = nums[0] i = 1 ops = 0 while i < len(nums): if nums[i] > cm: cm = nums[i] i += 1 else: cm += 1 ops += cm - nums[i] ...
r = range(0, 30) print(type(r)) print(type(10)) print(type('a')) print(type("Hi there")) class Car: pass class Truck(): pass c = Car() convert = Car() t = Truck() print(type(c)) print(type(t)) print(type(c) == type(t)) print(type(c) == type(convert)) print(isinstance(c, Car)) print(isinstance(t, Car)) if i...
r = range(0, 30) print(type(r)) print(type(10)) print(type('a')) print(type('Hi there')) class Car: pass class Truck: pass c = car() convert = car() t = truck() print(type(c)) print(type(t)) print(type(c) == type(t)) print(type(c) == type(convert)) print(isinstance(c, Car)) print(isinstance(t, Car)) if isinst...
# -*- coding: utf-8 -*- DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', }, } CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'TIMEOUT': 36000, 'KEY_PREFIX': 'post-office', }, 'post_office': { 'BACKEND'...
databases = {'default': {'ENGINE': 'django.db.backends.sqlite3'}} caches = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'TIMEOUT': 36000, 'KEY_PREFIX': 'post-office'}, 'post_office': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'TIMEOUT': 36000, 'KEY_PREFIX': 'post-office'}} ...
b, n, m = map(int, input().split()) keyboards = list(map(int, input().rstrip().split())) drives = list(map(int, input().rstrip().split())) most_expensive = -1 for i in range(len(keyboards)): for j in range(len(drives)): if most_expensive < keyboards[i]+drives[j] and keyboards[i]+drives[j] <= b: ...
(b, n, m) = map(int, input().split()) keyboards = list(map(int, input().rstrip().split())) drives = list(map(int, input().rstrip().split())) most_expensive = -1 for i in range(len(keyboards)): for j in range(len(drives)): if most_expensive < keyboards[i] + drives[j] and keyboards[i] + drives[j] <= b: ...
clothes_in_the_box = [int(_)for _ in input().split()] rack_capacity = int(input()) rack_count = 0 while len(clothes_in_the_box) > 0: current_rack = 0 while current_rack <= rack_capacity: current_clothes = clothes_in_the_box[-1] if current_rack + current_clothes <= rack_capacity: cu...
clothes_in_the_box = [int(_) for _ in input().split()] rack_capacity = int(input()) rack_count = 0 while len(clothes_in_the_box) > 0: current_rack = 0 while current_rack <= rack_capacity: current_clothes = clothes_in_the_box[-1] if current_rack + current_clothes <= rack_capacity: cur...
INPUT = [ "FBFFBFFRLL", "BFFBFBBLRR", "FFFBFBFLLR", "BBFFFBBRRR", "FBFFFFBLLR", "BFFFFBFRLL", "FBBFFBBRRL", "BFBBBBFLLR", "BBBFFFBLLL", "BBFFFBBLRL", "FFFBFFFLRL", "FFBFBBBLRL", "FFFBBBBLRL", "BFFBBBFRLR", "FBFFBFBLLR", "BBBFBBFLRL", "BFFBBFBLLR", ...
input = ['FBFFBFFRLL', 'BFFBFBBLRR', 'FFFBFBFLLR', 'BBFFFBBRRR', 'FBFFFFBLLR', 'BFFFFBFRLL', 'FBBFFBBRRL', 'BFBBBBFLLR', 'BBBFFFBLLL', 'BBFFFBBLRL', 'FFFBFFFLRL', 'FFBFBBBLRL', 'FFFBBBBLRL', 'BFFBBBFRLR', 'FBFFBFBLLR', 'BBBFBBFLRL', 'BFFBBFBLLR', 'FBBFBFFRRL', 'FBFFBBFLLL', 'BFBFFBBRLL', 'FBBFFBFRLR', 'BFFFFFBLLL', 'FB...
#!usr/bin/env python a="Vivo en Madrid" for i in a: print(i)
a = 'Vivo en Madrid' for i in a: print(i)
def sum(x,y): total=x+y print(total) a=3 b=6 operation = sum print(operation(a,b))
def sum(x, y): total = x + y print(total) a = 3 b = 6 operation = sum print(operation(a, b))
''' Give an example of a software application in which adaptability can mean the difference between a prolonged lifetime of sales and bankruptcy The point of sales system that wont be able to change tax rate '''
""" Give an example of a software application in which adaptability can mean the difference between a prolonged lifetime of sales and bankruptcy The point of sales system that wont be able to change tax rate """
def function_scope(): number1 = 56 string1 = "Hello, I am scoped string1 variable in side function" print("I am local number1 variable inside function: " + str(number1)) print(string1) number1 = 24 string1 = "Hello, I am global string1 variable" print("I am global number1 variable : " + str(number1)...
def function_scope(): number1 = 56 string1 = 'Hello, I am scoped string1 variable in side function' print('I am local number1 variable inside function: ' + str(number1)) print(string1) number1 = 24 string1 = 'Hello, I am global string1 variable' print('I am global number1 variable : ' + str(number1)) pr...
# # PySNMP MIB module TIMETRA-SAS-SYSTEM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TIMETRA-SAS-SYSTEM-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:15:00 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (d...
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, value_range_constraint, single_value_constraint, value_size_constraint, constraints_intersection) ...
TEXT = 'TX' MARKDOWN = 'MD' HTML = 'HT' FORMATS = ( (MARKDOWN, 'Markdown'), (TEXT, 'Plain text'), (HTML, 'HTML') ) DEFAULT = MARKDOWN
text = 'TX' markdown = 'MD' html = 'HT' formats = ((MARKDOWN, 'Markdown'), (TEXT, 'Plain text'), (HTML, 'HTML')) default = MARKDOWN
#!/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python # EASY-INSTALL-SCRIPT: 'Pillow==2.8.1','pilfont.py' __requires__ = 'Pillow==2.8.1' __import__('pkg_resources').run_script('Pillow==2.8.1', 'pilfont.py')
__requires__ = 'Pillow==2.8.1' __import__('pkg_resources').run_script('Pillow==2.8.1', 'pilfont.py')
begin_unit comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl|'\n' comment|'# not use this file except in compliance with the License. You may obtain' nl|'\n' comment|'# a copy of the License at' nl|'\n' comment|'#' nl|'\n' comment|'# http://www.apache.org/licenses/L...
begin_unit comment | '# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl | '\n' comment | '# not use this file except in compliance with the License. You may obtain' nl | '\n' comment | '# a copy of the License at' nl | '\n' comment | '#' nl | '\n' comment | '# http://www.apa...
sample = ['bob', 7, 'joe'] test = "BOB" print("joe" not in sample) print(test.lower() in sample) print(3 > 1 and 2*3 == 5) print(2<=1 or 3-2 == 1)
sample = ['bob', 7, 'joe'] test = 'BOB' print('joe' not in sample) print(test.lower() in sample) print(3 > 1 and 2 * 3 == 5) print(2 <= 1 or 3 - 2 == 1)
#!/usr/bin/env python3 # HAGrid Version __version__ = "0.1.8" if __name__ == "__main__": print(__version__)
__version__ = '0.1.8' if __name__ == '__main__': print(__version__)
''' Rock, Paper, Scissors ''' print('Hell and welcome to the rock, paper, scissors game!')
""" Rock, Paper, Scissors """ print('Hell and welcome to the rock, paper, scissors game!')
# FLOW014 for i in range(int(input())): h,c,t=map(float,input().split()) if h>50 and c<0.7 and t>5600: print("10") elif h>50 and c<0.7: print("9") elif c<0.7 and t>5600: print("8") elif h>50 and t>5600: print("7") elif h>50 or c<0.7 or t>5600: print("6") else: print("5")
for i in range(int(input())): (h, c, t) = map(float, input().split()) if h > 50 and c < 0.7 and (t > 5600): print('10') elif h > 50 and c < 0.7: print('9') elif c < 0.7 and t > 5600: print('8') elif h > 50 and t > 5600: print('7') elif h > 50 or c < 0.7 or t > 560...
class C: def f(self): pass f1 = C.f c = C() f2 = c.f
class C: def f(self): pass f1 = C.f c = c() f2 = c.f
# Your Datadog API Key API_KEY = "" # Your Datadog Application Key APP_KEY = "" # A list of metric names, values should match metrics present in your account METRICS_TO_EVAL = ["system.cpu.user", "system.disk.in_use"] ### ADVANCED CONFIGS # the filename where dashboard api responses are stored to avoid duplicate re...
api_key = '' app_key = '' metrics_to_eval = ['system.cpu.user', 'system.disk.in_use'] db_cache_path = 'db_cache.txt' json_output_path = 'results/report.json' csv_output_path = 'results/report.csv' markdown_output_path = 'results/report.md'
the_count = [1, 2, 3, 4, 5] fruits = ['apples', 'oranges', 'pears', 'apricots'] change = [1, 'pennies', 2, 'dimes', 3, 'quarters'] # this first kind of for-loop goes through a list for number in the_count: print(f"This is count {number}") # same as above for fruit in fruits: print(f"A fruit of type: {fruit}"...
the_count = [1, 2, 3, 4, 5] fruits = ['apples', 'oranges', 'pears', 'apricots'] change = [1, 'pennies', 2, 'dimes', 3, 'quarters'] for number in the_count: print(f'This is count {number}') for fruit in fruits: print(f'A fruit of type: {fruit}') for i in change: print(f'I got {i}') elements = [] for i in ran...
__all__ = ['MQTT_API_KEY', 'MQTT_WRITE_API_KEY', 'CHANNEL', 'wifi_ssid', 'wifi_pw'] MQTT_API_KEY = "" MQTT_WRITE_API_KEY = "" CHANNEL = "" wifi_ssid = '' wifi_pw = ''
__all__ = ['MQTT_API_KEY', 'MQTT_WRITE_API_KEY', 'CHANNEL', 'wifi_ssid', 'wifi_pw'] mqtt_api_key = '' mqtt_write_api_key = '' channel = '' wifi_ssid = '' wifi_pw = ''
# this segment tree will support two operations: # 1. apply min or max with value h on interval [r, v) # 2. find min of elements in interval [r, l) # For our lazy updates we will keep pairs [h_max, h_min], where # operation max was applied with h_max and min with h_min. It can be proven # that we always can keep pairs ...
class Segmenttree: def __init__(self, N): self.N = N self.H = 1 while 1 << self.H < N: self.H += 1 self.size = 1 << self.H self.ZERO = float('inf') self.NO_OPERATION = (1, 0) self.T = [0] * (2 * self.size - 1) self.L = [self.NO_OPERATION] ...
zbr = "bar" assert zbr
zbr = 'bar' assert zbr
DEFAULT_STATUS_CODE = 400 DB_DEFAULT_STATUS_CODE = 500 NOT_FOUNT_STATUS_CODE = 404 UNAUTHORIZED_STATUS_CODE = 401 DB_NAME = "users" DB_USER = "root" DB_PASSWORD = "test123"
default_status_code = 400 db_default_status_code = 500 not_fount_status_code = 404 unauthorized_status_code = 401 db_name = 'users' db_user = 'root' db_password = 'test123'
class Node(object): def __init__(self, data, prev, next): self.data = data self.prev = prev self.next = next class ListOne(object): head = None tail = None size = 0 def display(self): current_node = self.head while current_node is not None: pri...
class Node(object): def __init__(self, data, prev, next): self.data = data self.prev = prev self.next = next class Listone(object): head = None tail = None size = 0 def display(self): current_node = self.head while current_node is not None: prin...
class UserPlofile: dir_path = 'user_plofile' class ColabPath: train = 'https://colab.research.google.com/drive/1padoMj3dW0lr9nkko2384XXXD37dVhDE' evacuate = 'https://colab.research.google.com/drive/1idRwx4c_5PcxpLmj0ZIyIG9BaLXnQAS8'
class Userplofile: dir_path = 'user_plofile' class Colabpath: train = 'https://colab.research.google.com/drive/1padoMj3dW0lr9nkko2384XXXD37dVhDE' evacuate = 'https://colab.research.google.com/drive/1idRwx4c_5PcxpLmj0ZIyIG9BaLXnQAS8'
class Actor: def __init__(self, actor_full_name: str): if actor_full_name == "" or type(actor_full_name) is not str: self.full_name = None else: self.full_name = actor_full_name.strip() self.colleagues = [] def __repr__(self): return f"<Actor {self.full_...
class Actor: def __init__(self, actor_full_name: str): if actor_full_name == '' or type(actor_full_name) is not str: self.full_name = None else: self.full_name = actor_full_name.strip() self.colleagues = [] def __repr__(self): return f'<Actor {self.full_...
''' Python program to calculate body mass index ''' height = float(input("Input your height in Feet: ")) weight = float(input("Input your weight in Kilogram: ")) print("Your body mass index is: ", round(weight / (height ** 2), 2))
""" Python program to calculate body mass index """ height = float(input('Input your height in Feet: ')) weight = float(input('Input your weight in Kilogram: ')) print('Your body mass index is: ', round(weight / height ** 2, 2))
def superCalc(n1, n2): print(n1 + n2) print(n1 - n2) print(n1 * n2) print(n1 / n2) n1 = int(input("enter n1: ")) n2 = int(input("enter n2: ")) superCalc(n1, n2)
def super_calc(n1, n2): print(n1 + n2) print(n1 - n2) print(n1 * n2) print(n1 / n2) n1 = int(input('enter n1: ')) n2 = int(input('enter n2: ')) super_calc(n1, n2)
i = 2 a, b = 1, 1 while True: c = a + b a = b b = c i = i + 1 if len(str(c)) == 1000: print(c) break print(i)
i = 2 (a, b) = (1, 1) while True: c = a + b a = b b = c i = i + 1 if len(str(c)) == 1000: print(c) break print(i)
def twoStacks(x, a, b): score = 0 total = 0 while total < x: if a != [] and b != []: if a[0] < b[0]: if total+a[0] < x: total += a.pop(0) score += 1 else: break else: i...
def two_stacks(x, a, b): score = 0 total = 0 while total < x: if a != [] and b != []: if a[0] < b[0]: if total + a[0] < x: total += a.pop(0) score += 1 else: break elif total + b[0] < ...
def getCensusPoints(sf, show=False): fields = sf.fields if show: print("Fields -> {0}".format(fields)) ipop=None for i,val in enumerate(fields): if val[0] == "DP0010001": ipop = i-1 break ihouse=None for i,val in enumerate(fields): if val[0] ...
def get_census_points(sf, show=False): fields = sf.fields if show: print('Fields -> {0}'.format(fields)) ipop = None for (i, val) in enumerate(fields): if val[0] == 'DP0010001': ipop = i - 1 break ihouse = None for (i, val) in enumerate(fields): if...
# Copyright 2018 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. # These devices are ina3221 (3-channels/i2c address) devices inas = [ # drvname, child, name, nom, sense, mux, is_calib ('in...
inas = [('ina3221', '0x40:0', 'pp3300_a', 3.3, 0.02, 'rem', True), ('ina3221', '0x40:1', 'pp5000_a', 5.0, 0.02, 'rem', True), ('ina3221', '0x40:2', 'pp1800_a', 1.8, 0.02, 'rem', True), ('ina3221', '0x41:0', 'pp1200_vddq', 1.2, 0.005, 'rem', True), ('ina3221', '0x41:1', 'ppvar_vddcr_nb', 0.875, 0.005, 'rem', True), ('in...
for _ in range(int(input())): n,m=input().split() n,m=int(n),int(m) green='G' red='R' gcost=3 rcost=5 arr=[] array1=[] array2=[] gcheck=[] rcheck=[] i=0 while(i<m): if(i%2==1): array1.append(red) array2.append(green) else: ...
for _ in range(int(input())): (n, m) = input().split() (n, m) = (int(n), int(m)) green = 'G' red = 'R' gcost = 3 rcost = 5 arr = [] array1 = [] array2 = [] gcheck = [] rcheck = [] i = 0 while i < m: if i % 2 == 1: array1.append(red) arr...
# Solution to part 2 of day 3 of AOC 2020, Toboggan Trajectory. # https://adventofcode.com/2020/day/3 f = open('input.txt') whole_text = (f.read()) grid = whole_text.split() # Split string by any whitespace. tree_product = 1 for delta_x, delta_y in [(1, 1), (3, 1), (5, 1), (7, 1), (1, ...
f = open('input.txt') whole_text = f.read() grid = whole_text.split() tree_product = 1 for (delta_x, delta_y) in [(1, 1), (3, 1), (5, 1), (7, 1), (1, 2)]: row_num = 0 col_num = 0 trees = 0 for this_row in grid[::delta_y]: if row_num != 0: if this_row[col_num] == '#': ...
# We want make a package of goal kilos of chocolate. # We have small bars (1 kilo each) and big bars (5 kilos each). # Return the number of small bars to use, # assuming we always use big bars before small bars. # Return -1 if it can't be done. def make_chocolate(small, big, goal): needed = goal - big * 5 ...
def make_chocolate(small, big, goal): needed = goal - big * 5 if needed > 0: return small elif needed == 0: return small elif needed < 0: return goal % 5 else: -1 x = make_chocolate(4, 5, 9) print(x)
# Copyright 2015 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Copyright 2015 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # GYP file for codec project. { 'targets': [ { ...
{'targets': [{'target_name': 'codec', 'product_name': 'skia_codec', 'type': 'static_library', 'standalone_static_library': 1, 'dependencies': ['core.gyp:*', 'giflib.gyp:giflib', 'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector', 'libpng.gyp:libpng', 'libwebp.gyp:libwebp'], 'cflags': ['-Wno-clobbered -Wno-error'], 'in...
class DeckNotFoundError(Exception): '''No deck with given id.''' class CardNotFoundError(Exception): '''No card with given id.''' class CardAlreadyExists(Exception): '''There is a card with the same question.'''
class Decknotfounderror(Exception): """No deck with given id.""" class Cardnotfounderror(Exception): """No card with given id.""" class Cardalreadyexists(Exception): """There is a card with the same question."""
print("THIS CODE IS SHIT AND MAKES THE DATA 30% BIGGER") print("read the comment below to get the idea") exit() ## # # This script groups repetitions of characters # # methode: # encode the character and repetitions into 4bit as following: # 0bXXYY where # XX=number of repetitions: 0b00=1, 0b01=2, 0b10=3, 0b11=4 # Y...
print('THIS CODE IS SHIT AND MAKES THE DATA 30% BIGGER') print('read the comment below to get the idea') exit() input_file = open('moderna_sequence_raw.fasta', 'r') characters = input_file.read() characters.replace('\n', '') input_file.close() length_total = len(characters) print(length_total) print('compress:') i = 0 ...
''' implement Pascal's triangle by using generator 1 / \ 1 1 / \ / \ 1 2 1 / \ / \ / \ 1 3 3 1 / \ / \ / \ / \ 1 4 6 4 1 / \ / \ / \ / \ / \ 1 5 10 10 5 1 https://en.wikipedia.org/wiki/Pascal%27s_triangle ''' def triangles(n, line_num...
""" implement Pascal's triangle by using generator 1 / 1 1 / \\ / 1 2 1 / \\ / \\ / 1 3 3 1 / \\ / \\ / \\ / 1 4 6 4 1 / \\ / \\ / \\ / \\ / 1 5 10 10 5 1 https://en.wikipedia.org/wiki/Pascal%27s_triangle """ def triangles(n, line_num...
# Helper function to get the stop sign performance with moving left. def StopSignLeft(stopPlace, flag, x, y, Speed, prev_perf): place = stopPlace[1][0] Boundary1 = [[stopPlace[0][0], stopPlace[0][1]], [place-13, place-3]] Boundary2 = [[stopPlace[0][0], stopPlace[0][1]], [place-36, place-26]] Boundary3 ...
def stop_sign_left(stopPlace, flag, x, y, Speed, prev_perf): place = stopPlace[1][0] boundary1 = [[stopPlace[0][0], stopPlace[0][1]], [place - 13, place - 3]] boundary2 = [[stopPlace[0][0], stopPlace[0][1]], [place - 36, place - 26]] boundary3 = [[stopPlace[0][0], stopPlace[0][1]], [place - 51, place - ...
''' Day 5: Sunny with a Chance of Asteroids ''' def parse_intcode(intcode, input): i = 0 while i < len(intcode): if intcode[i] not in (1, 2, 3, 4, 5, 6, 7, 8, 99): instruction = int(str(intcode[i])[-2:]) if instruction in (1, 2, 4, 5, 6, 7, 8): param = list() ...
""" Day 5: Sunny with a Chance of Asteroids """ def parse_intcode(intcode, input): i = 0 while i < len(intcode): if intcode[i] not in (1, 2, 3, 4, 5, 6, 7, 8, 99): instruction = int(str(intcode[i])[-2:]) if instruction in (1, 2, 4, 5, 6, 7, 8): param = list() ...
number_of_cards = int(input()) cards_values = list(map(int, input().split())) i = 0 j = number_of_cards - 1 k = 0 scores = [0, 0] while i <= j: if cards_values[i] > cards_values[j]: scores[k % 2] += cards_values[i] i += 1 k += 1 else: scores[k % 2] += cards_values[j] ...
number_of_cards = int(input()) cards_values = list(map(int, input().split())) i = 0 j = number_of_cards - 1 k = 0 scores = [0, 0] while i <= j: if cards_values[i] > cards_values[j]: scores[k % 2] += cards_values[i] i += 1 k += 1 else: scores[k % 2] += cards_values[j] j -=...
# parsetab.py # This file is automatically generated. Do not edit. _tabversion = '3.2' _lr_method = 'LALR' _lr_signature = '8HR\xee\xd8K\xc1gX\xbc\x8cr\x1fy\xf4#' _lr_action_items = {'PEEK':([115,157,159,173,202,225,257,315,330,334,356,358,359,360,362,366,367,],[142,142,-90,-75,-74,-81,-89,-82,-87,-91,-83,-85,-...
_tabversion = '3.2' _lr_method = 'LALR' _lr_signature = '8HRîØKÁgX¼\x8cr\x1fyô#' _lr_action_items = {'PEEK': ([115, 157, 159, 173, 202, 225, 257, 315, 330, 334, 356, 358, 359, 360, 362, 366, 367], [142, 142, -90, -75, -74, -81, -89, -82, -87, -91, -83, -85, -92, -93, -86, -84, -88]), 'STAR': ([4, 19, 21, 57, 72, 144, 1...
if person.bored(): x = [0] for j in range(100): step_x = random.randint(0,1) if step_x == 1: x.append(x[j] + 1 + 0.05*np.random.normal()) else: x.append(x[j] - 1 + 0.05*np.random.normal()) y = [0.05*np.random.normal() for j in range(len(x))] trace1 = go.Scatter( x=...
if person.bored(): x = [0] for j in range(100): step_x = random.randint(0, 1) if step_x == 1: x.append(x[j] + 1 + 0.05 * np.random.normal()) else: x.append(x[j] - 1 + 0.05 * np.random.normal()) y = [0.05 * np.random.normal() for j in range(len(x))] trace1 ...
b2bi_strings = { 19: "fK4vQqsDwbXp/Hyjlc2EsVthXQCr/wdvCo5ZwrlpJB5eCoDdhJpZkkL+5XbQS5CqG0dz/bvErrAAQzAh2GYKIN7I/fswVYOFBoz5JcJbzv+c00ChoGMsuxzki1iTfyCVuXG8P5zg7FhiLtKUAlNusocKFGkL3dfwvbKNXGUgRGRdOpp5TCAFj7rZOgrMApz5lzdkxBlb4mKBqqdP2MFEIMsKEPE96rCSRvvuYddLTzQx42yoCg49L2yDyd7Fx2p36v3Khz8NtO9ozeigXYULYMzmojkHnkQ6Zi6gUvzd...
b2bi_strings = {19: 'fK4vQqsDwbXp/Hyjlc2EsVthXQCr/wdvCo5ZwrlpJB5eCoDdhJpZkkL+5XbQS5CqG0dz/bvErrAAQzAh2GYKIN7I/fswVYOFBoz5JcJbzv+c00ChoGMsuxzki1iTfyCVuXG8P5zg7FhiLtKUAlNusocKFGkL3dfwvbKNXGUgRGRdOpp5TCAFj7rZOgrMApz5lzdkxBlb4mKBqqdP2MFEIMsKEPE96rCSRvvuYddLTzQx42yoCg49L2yDyd7Fx2p36v3Khz8NtO9ozeigXYULYMzmojkHnkQ6Zi6gUvzdQAz...
#! /usr/bin/python3.7 def les(): def slope(): y1 = float(input('What is y1?: ')) y2 = float(input('What is y2?: ')) x1 = float(input('What is x1?: ')) x2 = float(input('What is x2?: ')) slope = (y2 - y1)/(x2 - x1) b = ((slope * x1)*-1) + y1 print('y = {}x + {}...
def les(): def slope(): y1 = float(input('What is y1?: ')) y2 = float(input('What is y2?: ')) x1 = float(input('What is x1?: ')) x2 = float(input('What is x2?: ')) slope = (y2 - y1) / (x2 - x1) b = slope * x1 * -1 + y1 print('y = {}x + {}'.format(slope, b)) ...
a=int(input("Enter first number\n")) b=int(input("Enter second number\n")) c=int(input("Enter third number\n")) d=int(input("Enter fourth number\n")) e=int(input("Enter fifth number\n")) add=a+b+c+d+e print("The sum of first 5 even numbers is",add)
a = int(input('Enter first number\n')) b = int(input('Enter second number\n')) c = int(input('Enter third number\n')) d = int(input('Enter fourth number\n')) e = int(input('Enter fifth number\n')) add = a + b + c + d + e print('The sum of first 5 even numbers is', add)
# Solution def even_after_odd(head): if head is None: return head even = None odd = None even_tail = None head_tail = None while head: next_node = head.next if head.data % 2 == 0: if even is None: even = head ...
def even_after_odd(head): if head is None: return head even = None odd = None even_tail = None head_tail = None while head: next_node = head.next if head.data % 2 == 0: if even is None: even = head even_tail = even e...
class Spam(object): def __init__(self,value): self.value = value class Eggs(object): def __init__(self,value): self.value = value s = Spam(1) e = Eggs(2) if isinstance(s,Spam): print("s is Spam - correct") if isinstance(s,Eggs): print("s is Eggs - incorrect") if isinstance(e,Spam...
class Spam(object): def __init__(self, value): self.value = value class Eggs(object): def __init__(self, value): self.value = value s = spam(1) e = eggs(2) if isinstance(s, Spam): print('s is Spam - correct') if isinstance(s, Eggs): print('s is Eggs - incorrect') if isinstance(e, Spam...
i = 28 print(f"i is {i}") f = 2.8 print(f"f is {f}") b = True # False print(f"b is {b}") n = None # Idea that variable have NO_VALUE print(f"n is {n}")
i = 28 print(f'i is {i}') f = 2.8 print(f'f is {f}') b = True print(f'b is {b}') n = None print(f'n is {n}')
def make_sNum(niz): sNum = [] for z in niz: if z in ["[", "]"]: sNum.append(z) elif z == ",": continue else: sNum.append(int(z)) return sNum def add_sNum(s1, s2): return ["["] + s1 + s2 + ["]"] def explode(s): levi_zak = 0 for i in r...
def make_s_num(niz): s_num = [] for z in niz: if z in ['[', ']']: sNum.append(z) elif z == ',': continue else: sNum.append(int(z)) return sNum def add_s_num(s1, s2): return ['['] + s1 + s2 + [']'] def explode(s): levi_zak = 0 for i in...
name = 'Mike' age = 33 money = 9.75 # print using concatination print(name + ' is ' + str(age) + ' and has $' + str(money) + ' dollars.') # print using the .format() method for strings print("{0} is {1} and has ${2} dollars.".format(name, age, money)) # print using f-strings print(f'{name} is {age} and has ${money} ...
name = 'Mike' age = 33 money = 9.75 print(name + ' is ' + str(age) + ' and has $' + str(money) + ' dollars.') print('{0} is {1} and has ${2} dollars.'.format(name, age, money)) print(f'{name} is {age} and has ${money} dollars.')
class BaseParser(object): def __init__(self): pass def parse(self, url, hxs, index): return None def parse_relative(self, url, hxs): pass def parse_paginate(self, url, hxs, cache_db): pass def get_value_from_response(self, hxs, query, index, default=""): _...
class Baseparser(object): def __init__(self): pass def parse(self, url, hxs, index): return None def parse_relative(self, url, hxs): pass def parse_paginate(self, url, hxs, cache_db): pass def get_value_from_response(self, hxs, query, index, default=''): ...
load("//:compile.bzl", "proto_compile") load("//:plugin.bzl", "proto_plugin") def d_proto_compile(**kwargs): # If package specified, declare a custom plugin that should correctly # predict the output location. package = kwargs.get("package") if package and not kwargs.get("plugins"): name = kwar...
load('//:compile.bzl', 'proto_compile') load('//:plugin.bzl', 'proto_plugin') def d_proto_compile(**kwargs): package = kwargs.get('package') if package and (not kwargs.get('plugins')): name = kwargs.get('name') name_plugin = name + '_plugin' proto_plugin(name=name_plugin, outputs=['{pac...
class FetchResourceError(Exception): def __init__(self, msg): super(FetchResourceError, self).__init__( "error fetching resource: " + str(msg) )
class Fetchresourceerror(Exception): def __init__(self, msg): super(FetchResourceError, self).__init__('error fetching resource: ' + str(msg))
#Written by: Karim shoair - D4Vinci ( Dr0p1t-Framework ) #This is a persistence script aims to to add your exe file to startup registry key #Start def F7212(exe): fp = get_output("echo %CD%") new_name = get_output("echo %random%%random%").strip() + ".exe" new_file_path = fp + "\\" + new_name try: command = 'REG ...
def f7212(exe): fp = get_output('echo %CD%') new_name = get_output('echo %random%%random%').strip() + '.exe' new_file_path = fp + '\\' + new_name try: command = 'REG ADD HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run /v "Windows.NET service" /t REG_SZ /f /d "{}"' x1 = subprocess...
# Python program Tabulated (bottom up) version def fib(n): # array declaration f = [0]*(n+1) # base case assignment f[1] = 1 # calculating the fibonacci and storing the values for i in range(2 , n+1): f[i] = f[i-1] + f[i-2] return f[n] # Driver program to test the above function def main(): n =...
def fib(n): f = [0] * (n + 1) f[1] = 1 for i in range(2, n + 1): f[i] = f[i - 1] + f[i - 2] return f[n] def main(): n = 9 print('Fibonacci number is ', fib(n)) if __name__ == '__main__': main()
def test_complex_fields(user_advance_dataclass): data = { "name": "juan", "age": 20, "pets": ["dog"], "accounts": {"ing": 100}, "has_car": True, "favorite_colors": "GREEN", "md5": b"u00ffffffffffffx", } expected_data = { "name": "juan", ...
def test_complex_fields(user_advance_dataclass): data = {'name': 'juan', 'age': 20, 'pets': ['dog'], 'accounts': {'ing': 100}, 'has_car': True, 'favorite_colors': 'GREEN', 'md5': b'u00ffffffffffffx'} expected_data = {'name': 'juan', 'age': 20, 'pets': ['dog'], 'accounts': {'ing': 100}, 'has_car': True, 'favorit...
TRAIN_MODE = False MODELPATH = './engine/data/trained_model/rel_first_model.pth' NUM_EPOCHS = 10000 BATCH_SIZE = 30 RELATION_FILE = "./engine/data/refer/relation_train.txt" GENOME_DICT = "./engine/data/procdata/genome_rel_dict.pkl" IMG_WIDTH = 800 TRAIN_PROC_MAX = 10000 VALID_PROC_MAX = 1000 DATA_SHUFFLE = True LEARN_...
train_mode = False modelpath = './engine/data/trained_model/rel_first_model.pth' num_epochs = 10000 batch_size = 30 relation_file = './engine/data/refer/relation_train.txt' genome_dict = './engine/data/procdata/genome_rel_dict.pkl' img_width = 800 train_proc_max = 10000 valid_proc_max = 1000 data_shuffle = True learn_v...
supported_aminoacids = ["ALA", "ARG", "ASH", "ASN", "ASP", "CYS", "CYT", "GLH", "GLN", "GLU", "GLY", "HID", "HIE", "HIS", "HIP", "ILE", "LEU", "LYS", "LYN", "MET", "PHE", "PRO", "SER", "TRP", "THR", "TYR", "VAL", "ACE", "NMA"] aminoacids_3letter = ...
supported_aminoacids = ['ALA', 'ARG', 'ASH', 'ASN', 'ASP', 'CYS', 'CYT', 'GLH', 'GLN', 'GLU', 'GLY', 'HID', 'HIE', 'HIS', 'HIP', 'ILE', 'LEU', 'LYS', 'LYN', 'MET', 'PHE', 'PRO', 'SER', 'TRP', 'THR', 'TYR', 'VAL', 'ACE', 'NMA'] aminoacids_3letter = ['ALA', 'ARG', 'ASH', 'ASN', 'ASP', 'CYS', 'GLH', 'GLN', 'GLU', 'GLY', '...
def get_r_string_samples_by_sample_group(order_list,samples_by_sample_groups): samples_by_sample_group_r_string = [] for sample_group in order_list: sample_group_samples = samples_by_sample_groups[sample_group] samples_by_sample_group_r_string.append("c(\"" + "\",\"".join(sample_group_samples)...
def get_r_string_samples_by_sample_group(order_list, samples_by_sample_groups): samples_by_sample_group_r_string = [] for sample_group in order_list: sample_group_samples = samples_by_sample_groups[sample_group] samples_by_sample_group_r_string.append('c("' + '","'.join(sample_group_samples) + '...
# Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # This file is autogenerated and should not be modified manually. # Update versions/UpdateVersions.hs instead. sdk_versions = [ "1.0.0", "1.0.1", "1.1.1", "1.2.0", ...
sdk_versions = ['1.0.0', '1.0.1', '1.1.1', '1.2.0', '1.3.0', '1.4.0', '1.5.0', '1.6.0-snapshot.20200908.5166.0.1623baec', '1.6.0-snapshot.20200915.5208.0.09014dc6', '0.0.0'] platform_versions = ['1.0.0', '1.0.1', '1.1.1', '1.2.0', '1.3.0', '1.4.0', '1.5.0', '1.6.0-snapshot.20200908.5166.0.1623baec', '1.6.0-snapshot.202...
N = int(input()) c = 1 for i in range(1, 10): for j in range(1, 10): if c != N: c += 1 continue print(str(j) * i) exit()
n = int(input()) c = 1 for i in range(1, 10): for j in range(1, 10): if c != N: c += 1 continue print(str(j) * i) exit()
''' ## s3_enable_encryption What it does: Turns on encryption on the target bucket. Usage: AUTO: s3_enable_encryption <encryption_type> <kms-key-arn> (<kms-key-arn> should be provided only if <encryption_type> is KMS) Note: <encryption_type> can be one of the following: 1. s3 (for s3-managed keys) 2. kms (for customer ...
""" ## s3_enable_encryption What it does: Turns on encryption on the target bucket. Usage: AUTO: s3_enable_encryption <encryption_type> <kms-key-arn> (<kms-key-arn> should be provided only if <encryption_type> is KMS) Note: <encryption_type> can be one of the following: 1. s3 (for s3-managed keys) 2. kms (for customer ...
pkgname = "libplist" pkgver = "2.2.0" pkgrel = 0 build_style = "gnu_configure" configure_args = ["--disable-static"] # prevent building python binding .a hostmakedepends = ["pkgconf", "automake", "libtool", "python", "python-cython"] makedepends = ["python-devel", "libglib-devel", "libxml2-devel"] pkgdesc = "Apple Prop...
pkgname = 'libplist' pkgver = '2.2.0' pkgrel = 0 build_style = 'gnu_configure' configure_args = ['--disable-static'] hostmakedepends = ['pkgconf', 'automake', 'libtool', 'python', 'python-cython'] makedepends = ['python-devel', 'libglib-devel', 'libxml2-devel'] pkgdesc = 'Apple Property List library' maintainer = 'q66 ...
def main(): # input N = int(input()) Ss = [*map(int, input().split())] Ts = [*map(int, input().split())] # compute for i in range(2*N): Ts[(i+1)%N] = min(Ts[(i+1)%N], Ts[i%N]+Ss[i%N]) # output print(Ss) print(Ts) for ans in Ts: print(ans) if __name__ == '__mai...
def main(): n = int(input()) ss = [*map(int, input().split())] ts = [*map(int, input().split())] for i in range(2 * N): Ts[(i + 1) % N] = min(Ts[(i + 1) % N], Ts[i % N] + Ss[i % N]) print(Ss) print(Ts) for ans in Ts: print(ans) if __name__ == '__main__': main()
# Ke Chen # knutchen@ucsd.edu # Zero-shot Audio Source Separation via Query-based Learning from Weakly-labeled Data # The configuration file # for model training exp_name = "exp_zs_asp_full" # the saved ckpt prefix name of the model workspace = "/home/Research/ZS_ASP/" # the folder of your code dataset_path = "/home/...
exp_name = 'exp_zs_asp_full' workspace = '/home/Research/ZS_ASP/' dataset_path = '/home/Research/ZS_ASP/data/audioset' index_type = 'full_train' idc_path = '/home/Research/ZS_ASP/' balanced_data = True resume_checkpoint = None loss_type = 'mae' gather_mode = False debug = False classes_num = 527 eval_list = [] batch_si...
#!/bin/python # coding: utf-8 # Source: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml statuscodes = [ (100, "Continue"), (101, "Switching Protocol"), (102, "Processing"), (200, "OK"), (201, "Created"), (202, "Accepted"), (203, "Non-Authoritative Information"), ...
statuscodes = [(100, 'Continue'), (101, 'Switching Protocol'), (102, 'Processing'), (200, 'OK'), (201, 'Created'), (202, 'Accepted'), (203, 'Non-Authoritative Information'), (204, 'No Content'), (205, 'Reset Content'), (206, 'Partial Content'), (207, 'Multi-Status'), (208, 'Already Reported'), (226, 'IM Used'), (300, '...
async def send_large_text(channel, contents): return_messages = [] content_lines = contents.splitlines(True) output = "" for line in content_lines: if len(output) > 1800: return_messages.append(await channel.send(output)) output = "" output += line if len(outp...
async def send_large_text(channel, contents): return_messages = [] content_lines = contents.splitlines(True) output = '' for line in content_lines: if len(output) > 1800: return_messages.append(await channel.send(output)) output = '' output += line if len(outp...