content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
def counting_sort(x): N = len(x) M = max(x) + 1 a = [0] * M for v in x: a[v] += 1 res = [] for i in range(M): for j in range(a[i]): res.append(i) return res def counting_sort2(x): N = len(x) M = max(x) + 1 c = [0] * M for v in x: c[v] += 1 for i in range(1, M): c[i] += c[i - 1] print(c) res = [None] * N for i in range(N): position = c[x[i]] - 1 res[position] = x[i] c[x[i]] -= 1 return res N = int(input()) x = list(map(int, input().split())) x = counting_sort2(x) print(' '.join(map(str, x)))
def counting_sort(x): n = len(x) m = max(x) + 1 a = [0] * M for v in x: a[v] += 1 res = [] for i in range(M): for j in range(a[i]): res.append(i) return res def counting_sort2(x): n = len(x) m = max(x) + 1 c = [0] * M for v in x: c[v] += 1 for i in range(1, M): c[i] += c[i - 1] print(c) res = [None] * N for i in range(N): position = c[x[i]] - 1 res[position] = x[i] c[x[i]] -= 1 return res n = int(input()) x = list(map(int, input().split())) x = counting_sort2(x) print(' '.join(map(str, x)))
class Solution: def countSubstrings(self, s): dp = [[0] * len(s) for i in range(len(s))] res = 0 for r in range(len(s)): for l in range(r+1): if s[r] == s[l]: if r == l or r+1 == l or dp[l+1][r-1] == 1: dp[l][r] = 1 res += 1 return res print(Solution().countSubstrings("aba"))
class Solution: def count_substrings(self, s): dp = [[0] * len(s) for i in range(len(s))] res = 0 for r in range(len(s)): for l in range(r + 1): if s[r] == s[l]: if r == l or r + 1 == l or dp[l + 1][r - 1] == 1: dp[l][r] = 1 res += 1 return res print(solution().countSubstrings('aba'))
# projecteuler.net/problem=52 def main(): answer = PermutatedMul() print("Answer: {}".format(answer)) def PermutatedMul(): i = 1 muls = [2,3,4,5,6] while True: found = True i += 1 si = list(str(i)) ops = list(map(lambda x: x * i, muls)) for num in ops: if len(str(i)) != len(str(num)): found = False break if not found: continue #print("{} = {}".format(si, ops)) for num in ops: snew = si[:] for s in list(str(num)): if s in snew: snew.remove(s) else: found = False break if not found: break; if found: break return i if __name__ == '__main__': main()
def main(): answer = permutated_mul() print('Answer: {}'.format(answer)) def permutated_mul(): i = 1 muls = [2, 3, 4, 5, 6] while True: found = True i += 1 si = list(str(i)) ops = list(map(lambda x: x * i, muls)) for num in ops: if len(str(i)) != len(str(num)): found = False break if not found: continue for num in ops: snew = si[:] for s in list(str(num)): if s in snew: snew.remove(s) else: found = False break if not found: break if found: break return i if __name__ == '__main__': main()
YEAR_IN_S = 31557600. GEV_IN_KEV = 1.e6 C_KMSEC = 299792.458 NUCLEON_MASS = 0.938272 # Nucleon mass in GeV P_MAGMOM = 2.793 # proton magnetic moment, PDG Live N_MAGMOM = -1.913 # neutron magnetic moment, PDG Live NUCLEAR_MASSES = { 'xenon': 122.298654871, 'germanium': 67.663731424, 'argon': 37.2113263068, 'silicon': 26.1614775455, 'sodium': 21.4140502327, 'iodine': 118.206437626, 'fluorine': 17.6969003039, 'he3': 3., 'helium': 4., 'nitrogen': 14., 'neon': 20., } # this is target nucleus mass in GeV: mT[GeV] = 0.9314941 * A[AMU] ELEMENT_INFO = {"xenon":{128:0.0192,129:0.2644,130:0.0408,131:0.2118,132:0.2689,134:0.1044,136:0.0887,'weight':131.1626},"germanium":{70:0.2084,72:0.2754,73:0.0773,74:0.3628,76:0.0761,'weight':72.6905},"iodine":{127:1.,'weight':127.},"sodium":{23:1.,'weight':23.},"silicon":{28:0.922,29:0.047,30:0.031,'weight':28.109},"fluorine":{19:1.,'weight':19.},"argon":{40:1.,'weight':40.},"helium":{4:1.,'weight':4.},"he3":{3:1.,'weight':3.},"nitrogen":{14:1.,'weight':14.},"neon":{20:1.,'weight':20.}}
year_in_s = 31557600.0 gev_in_kev = 1000000.0 c_kmsec = 299792.458 nucleon_mass = 0.938272 p_magmom = 2.793 n_magmom = -1.913 nuclear_masses = {'xenon': 122.298654871, 'germanium': 67.663731424, 'argon': 37.2113263068, 'silicon': 26.1614775455, 'sodium': 21.4140502327, 'iodine': 118.206437626, 'fluorine': 17.6969003039, 'he3': 3.0, 'helium': 4.0, 'nitrogen': 14.0, 'neon': 20.0} element_info = {'xenon': {128: 0.0192, 129: 0.2644, 130: 0.0408, 131: 0.2118, 132: 0.2689, 134: 0.1044, 136: 0.0887, 'weight': 131.1626}, 'germanium': {70: 0.2084, 72: 0.2754, 73: 0.0773, 74: 0.3628, 76: 0.0761, 'weight': 72.6905}, 'iodine': {127: 1.0, 'weight': 127.0}, 'sodium': {23: 1.0, 'weight': 23.0}, 'silicon': {28: 0.922, 29: 0.047, 30: 0.031, 'weight': 28.109}, 'fluorine': {19: 1.0, 'weight': 19.0}, 'argon': {40: 1.0, 'weight': 40.0}, 'helium': {4: 1.0, 'weight': 4.0}, 'he3': {3: 1.0, 'weight': 3.0}, 'nitrogen': {14: 1.0, 'weight': 14.0}, 'neon': {20: 1.0, 'weight': 20.0}}
def get_version(testbed: str): path = [e for e in testbed.split(" ") if e.find("/") > -1][0] full_name = path.split("/")[-1] return full_name.replace(".jar", "") def parse_engine_name(testbed: str): return get_version(testbed).split("-")[0]
def get_version(testbed: str): path = [e for e in testbed.split(' ') if e.find('/') > -1][0] full_name = path.split('/')[-1] return full_name.replace('.jar', '') def parse_engine_name(testbed: str): return get_version(testbed).split('-')[0]
def predict(text, with_neu=True): # requires string input. start_at = time.time() x_test = pad_sequences(tokenizer.texts_to_sequences([text]), maxlen=seq_len) score = model.predict([x_test])[0] label = decode_sentiment(score, with_neu=with_neu) score = float(score) return {print(f"label: {label}, score: {score}, calculation duration: {time.time()-start_at}.")} print('Welcome!') print('Script for post toxicity estimation is evaluated. Enter your text below for sentiment estimation and press ENTER.') post_text = str(input('Your text: ')) print(predict(post_text)) print(f'In terminal type predict(text) and pass string to it for the next prediction. Type file_sanalysis(filepath) to make several predictions. Local time: {datetime.datetime.now().time()}') def file_sanalysis(filepath): file = open(filepath, 'rt') c = 0 n = 0 processed_file = file.readlines() for text in processed_file: n += 1 print(n,'', text) print(predict(text)) c += 1 print(f'\n') print(f'Total comments analyzed: {c}') file_sanalysis('../comment.txt')
def predict(text, with_neu=True): start_at = time.time() x_test = pad_sequences(tokenizer.texts_to_sequences([text]), maxlen=seq_len) score = model.predict([x_test])[0] label = decode_sentiment(score, with_neu=with_neu) score = float(score) return {print(f'label: {label}, score: {score}, calculation duration: {time.time() - start_at}.')} print('Welcome!') print('Script for post toxicity estimation is evaluated. Enter your text below for sentiment estimation and press ENTER.') post_text = str(input('Your text: ')) print(predict(post_text)) print(f'In terminal type predict(text) and pass string to it for the next prediction. Type file_sanalysis(filepath) to make several predictions. Local time: {datetime.datetime.now().time()}') def file_sanalysis(filepath): file = open(filepath, 'rt') c = 0 n = 0 processed_file = file.readlines() for text in processed_file: n += 1 print(n, '', text) print(predict(text)) c += 1 print(f'\n') print(f'Total comments analyzed: {c}') file_sanalysis('../comment.txt')
def get_session_attributes(previous_intent = "", previous_intent_attributes = "", requested_value = "", previous_requested_value = "", questions_urls = [], question_now_id = 0, question_name = "", answers_ids = [], answer_now_id = 0, comments_ids = [], comment_now_id = 0, complete_answer = [], complete_code = [], complete_code_now_id = 0): sessionAttributes = {} sessionAttributes["questions_urls"] = questions_urls sessionAttributes["question_now_id"] = question_now_id sessionAttributes["question_name"] = question_name sessionAttributes["answers_ids"] = answers_ids sessionAttributes["answer_now_id"] = answer_now_id sessionAttributes["comments_ids"] = comments_ids sessionAttributes["comment_now_id"] = comment_now_id sessionAttributes["previous_intent"] = previous_intent sessionAttributes["previous_intent_attributes"] = previous_intent_attributes sessionAttributes["complete_answer"] = complete_answer sessionAttributes["complete_code"] = complete_code sessionAttributes["complete_code_now_id"] = complete_code_now_id sessionAttributes["requested_value"] = requested_value sessionAttributes["previous_requested_value"] = previous_requested_value return sessionAttributes def get_outputSpeech(outputSpeech_type, outputSpeech_text): outputSpeech = {} outputSpeech["type"] = outputSpeech_type outputSpeech["text"] = outputSpeech_text return outputSpeech def get_card(card_type, card_title, card_content, card_text): card = {} card["type"] = card_type card["title"] = card_title card["content"] = card_content card["text"] = card_text return card def get_repromt(repromt_outputSpeech_type, repromt_outputSpeech_text): reprompt = {} reprompt["outputSpeech"] = get_outputSpeech(repromt_outputSpeech_type, repromt_outputSpeech_text) return reprompt def get_response(outputSpeech_text, outputSpeech_type = "PlainText", card_type = "Standard", card_title = "", card_content = "", card_text = "", repromt_outputSpeech_type = "PlainText", repromt_outputSpeech_text = "", shouldEndSession = True): response = {} response["outputSpeech"] = get_outputSpeech(outputSpeech_type, outputSpeech_text) if card_title != "": response["card"] = get_card(card_type, card_title, card_content, card_text) if repromt_outputSpeech_text != "": response["reprompt"] = get_repromt(repromt_outputSpeech_type, repromt_outputSpeech_text) response["shouldEndSession"] = shouldEndSession return response def give_response(response, session_attributes = {}): lambda_response = {} lambda_response["version"] = "string" if session_attributes != {}: lambda_response["sessionAttributes"] = session_attributes lambda_response["response"] = response return lambda_response
def get_session_attributes(previous_intent='', previous_intent_attributes='', requested_value='', previous_requested_value='', questions_urls=[], question_now_id=0, question_name='', answers_ids=[], answer_now_id=0, comments_ids=[], comment_now_id=0, complete_answer=[], complete_code=[], complete_code_now_id=0): session_attributes = {} sessionAttributes['questions_urls'] = questions_urls sessionAttributes['question_now_id'] = question_now_id sessionAttributes['question_name'] = question_name sessionAttributes['answers_ids'] = answers_ids sessionAttributes['answer_now_id'] = answer_now_id sessionAttributes['comments_ids'] = comments_ids sessionAttributes['comment_now_id'] = comment_now_id sessionAttributes['previous_intent'] = previous_intent sessionAttributes['previous_intent_attributes'] = previous_intent_attributes sessionAttributes['complete_answer'] = complete_answer sessionAttributes['complete_code'] = complete_code sessionAttributes['complete_code_now_id'] = complete_code_now_id sessionAttributes['requested_value'] = requested_value sessionAttributes['previous_requested_value'] = previous_requested_value return sessionAttributes def get_output_speech(outputSpeech_type, outputSpeech_text): output_speech = {} outputSpeech['type'] = outputSpeech_type outputSpeech['text'] = outputSpeech_text return outputSpeech def get_card(card_type, card_title, card_content, card_text): card = {} card['type'] = card_type card['title'] = card_title card['content'] = card_content card['text'] = card_text return card def get_repromt(repromt_outputSpeech_type, repromt_outputSpeech_text): reprompt = {} reprompt['outputSpeech'] = get_output_speech(repromt_outputSpeech_type, repromt_outputSpeech_text) return reprompt def get_response(outputSpeech_text, outputSpeech_type='PlainText', card_type='Standard', card_title='', card_content='', card_text='', repromt_outputSpeech_type='PlainText', repromt_outputSpeech_text='', shouldEndSession=True): response = {} response['outputSpeech'] = get_output_speech(outputSpeech_type, outputSpeech_text) if card_title != '': response['card'] = get_card(card_type, card_title, card_content, card_text) if repromt_outputSpeech_text != '': response['reprompt'] = get_repromt(repromt_outputSpeech_type, repromt_outputSpeech_text) response['shouldEndSession'] = shouldEndSession return response def give_response(response, session_attributes={}): lambda_response = {} lambda_response['version'] = 'string' if session_attributes != {}: lambda_response['sessionAttributes'] = session_attributes lambda_response['response'] = response return lambda_response
STATS = [ { "num_node_expansions": 0, "search_time": 0.0929848, "total_time": 0.206795, "plan_length": 209, "plan_cost": 209, "objects_used": 145, "objects_total": 253, "neural_net_time": 0.09392738342285156, "num_replanning_steps": 0, "wall_time": 0.9533143043518066 }, { "num_node_expansions": 0, "search_time": 0.0644765, "total_time": 0.15406, "plan_length": 178, "plan_cost": 178, "objects_used": 139, "objects_total": 253, "neural_net_time": 0.0441431999206543, "num_replanning_steps": 0, "wall_time": 0.7657253742218018 }, { "num_node_expansions": 0, "search_time": 0.106279, "total_time": 0.234601, "plan_length": 199, "plan_cost": 199, "objects_used": 166, "objects_total": 359, "neural_net_time": 0.0629584789276123, "num_replanning_steps": 0, "wall_time": 1.0160789489746094 }, { "num_node_expansions": 0, "search_time": 0.108802, "total_time": 0.238978, "plan_length": 242, "plan_cost": 242, "objects_used": 167, "objects_total": 359, "neural_net_time": 0.06333541870117188, "num_replanning_steps": 0, "wall_time": 1.0204391479492188 }, { "num_node_expansions": 0, "search_time": 0.0803484, "total_time": 0.181895, "plan_length": 181, "plan_cost": 181, "objects_used": 141, "objects_total": 378, "neural_net_time": 0.06571578979492188, "num_replanning_steps": 0, "wall_time": 0.8968064785003662 }, { "num_node_expansions": 0, "search_time": 0.142677, "total_time": 0.253942, "plan_length": 207, "plan_cost": 207, "objects_used": 135, "objects_total": 378, "neural_net_time": 0.06601405143737793, "num_replanning_steps": 0, "wall_time": 0.9965448379516602 }, { "num_node_expansions": 0, "search_time": 0.11895, "total_time": 0.255997, "plan_length": 167, "plan_cost": 167, "objects_used": 125, "objects_total": 255, "neural_net_time": 0.04192996025085449, "num_replanning_steps": 1, "wall_time": 1.385655164718628 }, { "num_node_expansions": 0, "search_time": 0.157901, "total_time": 0.30572, "plan_length": 202, "plan_cost": 202, "objects_used": 126, "objects_total": 255, "neural_net_time": 0.04552125930786133, "num_replanning_steps": 0, "wall_time": 1.1248347759246826 }, { "num_node_expansions": 0, "search_time": 0.0805039, "total_time": 0.176183, "plan_length": 170, "plan_cost": 170, "objects_used": 109, "objects_total": 175, "neural_net_time": 0.03158974647521973, "num_replanning_steps": 5, "wall_time": 2.148319959640503 }, { "num_node_expansions": 0, "search_time": 0.0587677, "total_time": 0.173702, "plan_length": 165, "plan_cost": 165, "objects_used": 106, "objects_total": 175, "neural_net_time": 0.03000664710998535, "num_replanning_steps": 0, "wall_time": 0.9106862545013428 }, { "num_node_expansions": 0, "search_time": 0.0402155, "total_time": 0.147669, "plan_length": 127, "plan_cost": 127, "objects_used": 111, "objects_total": 249, "neural_net_time": 0.07640314102172852, "num_replanning_steps": 0, "wall_time": 0.922156572341919 }, { "num_node_expansions": 0, "search_time": 0.101752, "total_time": 0.19686, "plan_length": 150, "plan_cost": 150, "objects_used": 105, "objects_total": 249, "neural_net_time": 0.07982420921325684, "num_replanning_steps": 0, "wall_time": 0.9400062561035156 }, { "num_node_expansions": 0, "search_time": 0.0719713, "total_time": 0.137339, "plan_length": 228, "plan_cost": 228, "objects_used": 107, "objects_total": 197, "neural_net_time": 0.05859208106994629, "num_replanning_steps": 0, "wall_time": 0.7167832851409912 }, { "num_node_expansions": 0, "search_time": 0.0929935, "total_time": 0.190003, "plan_length": 209, "plan_cost": 209, "objects_used": 114, "objects_total": 197, "neural_net_time": 0.03446316719055176, "num_replanning_steps": 0, "wall_time": 0.8573403358459473 }, { "num_node_expansions": 0, "search_time": 0.079714, "total_time": 0.185505, "plan_length": 173, "plan_cost": 173, "objects_used": 103, "objects_total": 199, "neural_net_time": 0.03453779220581055, "num_replanning_steps": 0, "wall_time": 0.8996772766113281 }, { "num_node_expansions": 0, "search_time": 0.0926601, "total_time": 0.21608, "plan_length": 169, "plan_cost": 169, "objects_used": 105, "objects_total": 199, "neural_net_time": 0.05138850212097168, "num_replanning_steps": 0, "wall_time": 0.988412618637085 }, { "num_node_expansions": 0, "search_time": 0.153958, "total_time": 0.230492, "plan_length": 219, "plan_cost": 219, "objects_used": 170, "objects_total": 264, "neural_net_time": 0.04536151885986328, "num_replanning_steps": 0, "wall_time": 0.8006608486175537 }, { "num_node_expansions": 0, "search_time": 0.0818528, "total_time": 0.188787, "plan_length": 220, "plan_cost": 220, "objects_used": 177, "objects_total": 264, "neural_net_time": 0.04852485656738281, "num_replanning_steps": 0, "wall_time": 0.8596897125244141 }, { "num_node_expansions": 0, "search_time": 0.0492729, "total_time": 0.125523, "plan_length": 179, "plan_cost": 179, "objects_used": 125, "objects_total": 226, "neural_net_time": 0.04153084754943848, "num_replanning_steps": 2, "wall_time": 1.2470283508300781 }, { "num_node_expansions": 0, "search_time": 0.0572884, "total_time": 0.12549, "plan_length": 210, "plan_cost": 210, "objects_used": 121, "objects_total": 226, "neural_net_time": 0.03936648368835449, "num_replanning_steps": 0, "wall_time": 0.6882929801940918 }, { "num_node_expansions": 0, "search_time": 0.155052, "total_time": 0.264927, "plan_length": 157, "plan_cost": 157, "objects_used": 126, "objects_total": 271, "neural_net_time": 0.04673433303833008, "num_replanning_steps": 0, "wall_time": 0.9777631759643555 }, { "num_node_expansions": 0, "search_time": 0.0738639, "total_time": 0.171292, "plan_length": 178, "plan_cost": 178, "objects_used": 125, "objects_total": 271, "neural_net_time": 0.05072212219238281, "num_replanning_steps": 0, "wall_time": 0.8584322929382324 }, { "num_node_expansions": 0, "search_time": 0.068614, "total_time": 0.165012, "plan_length": 178, "plan_cost": 178, "objects_used": 117, "objects_total": 254, "neural_net_time": 0.046701908111572266, "num_replanning_steps": 0, "wall_time": 0.8422744274139404 }, { "num_node_expansions": 0, "search_time": 0.0784991, "total_time": 0.185713, "plan_length": 189, "plan_cost": 189, "objects_used": 118, "objects_total": 254, "neural_net_time": 0.045041799545288086, "num_replanning_steps": 0, "wall_time": 0.910815954208374 }, { "num_node_expansions": 0, "search_time": 0.0377378, "total_time": 0.0919111, "plan_length": 155, "plan_cost": 155, "objects_used": 108, "objects_total": 168, "neural_net_time": 0.02987837791442871, "num_replanning_steps": 0, "wall_time": 0.5988538265228271 }, { "num_node_expansions": 0, "search_time": 0.05612, "total_time": 0.117127, "plan_length": 156, "plan_cost": 156, "objects_used": 110, "objects_total": 168, "neural_net_time": 0.029909610748291016, "num_replanning_steps": 0, "wall_time": 0.6504032611846924 }, { "num_node_expansions": 0, "search_time": 0.118899, "total_time": 0.236672, "plan_length": 187, "plan_cost": 187, "objects_used": 117, "objects_total": 283, "neural_net_time": 0.04805254936218262, "num_replanning_steps": 0, "wall_time": 1.0010144710540771 }, { "num_node_expansions": 0, "search_time": 0.0412124, "total_time": 0.148293, "plan_length": 137, "plan_cost": 137, "objects_used": 117, "objects_total": 283, "neural_net_time": 0.05118083953857422, "num_replanning_steps": 0, "wall_time": 0.8539888858795166 }, { "num_node_expansions": 0, "search_time": 0.130546, "total_time": 0.284641, "plan_length": 208, "plan_cost": 208, "objects_used": 152, "objects_total": 278, "neural_net_time": 0.051322221755981445, "num_replanning_steps": 0, "wall_time": 1.119509220123291 }, { "num_node_expansions": 0, "search_time": 0.1676, "total_time": 0.278637, "plan_length": 189, "plan_cost": 189, "objects_used": 144, "objects_total": 278, "neural_net_time": 0.052797555923461914, "num_replanning_steps": 0, "wall_time": 0.9699740409851074 }, { "num_node_expansions": 0, "search_time": 0.0559687, "total_time": 0.152069, "plan_length": 162, "plan_cost": 162, "objects_used": 145, "objects_total": 316, "neural_net_time": 0.05460691452026367, "num_replanning_steps": 0, "wall_time": 0.822706937789917 }, { "num_node_expansions": 0, "search_time": 0.0838116, "total_time": 0.182175, "plan_length": 186, "plan_cost": 186, "objects_used": 144, "objects_total": 316, "neural_net_time": 0.05571866035461426, "num_replanning_steps": 0, "wall_time": 0.8658485412597656 }, { "num_node_expansions": 0, "search_time": 0.0603922, "total_time": 0.163295, "plan_length": 165, "plan_cost": 165, "objects_used": 117, "objects_total": 254, "neural_net_time": 0.04593300819396973, "num_replanning_steps": 0, "wall_time": 0.843583345413208 }, { "num_node_expansions": 0, "search_time": 0.0459874, "total_time": 0.13095, "plan_length": 159, "plan_cost": 159, "objects_used": 115, "objects_total": 254, "neural_net_time": 0.04458308219909668, "num_replanning_steps": 0, "wall_time": 0.7566969394683838 }, { "num_node_expansions": 0, "search_time": 0.222052, "total_time": 0.382279, "plan_length": 259, "plan_cost": 259, "objects_used": 139, "objects_total": 238, "neural_net_time": 0.04237771034240723, "num_replanning_steps": 0, "wall_time": 1.23612642288208 }, { "num_node_expansions": 0, "search_time": 0.19537, "total_time": 0.32901, "plan_length": 246, "plan_cost": 246, "objects_used": 133, "objects_total": 238, "neural_net_time": 0.042508602142333984, "num_replanning_steps": 0, "wall_time": 1.1203975677490234 }, { "num_node_expansions": 0, "search_time": 0.135153, "total_time": 0.268125, "plan_length": 214, "plan_cost": 214, "objects_used": 149, "objects_total": 343, "neural_net_time": 0.059821367263793945, "num_replanning_steps": 0, "wall_time": 1.05523681640625 }, { "num_node_expansions": 0, "search_time": 0.103736, "total_time": 0.220218, "plan_length": 257, "plan_cost": 257, "objects_used": 147, "objects_total": 343, "neural_net_time": 0.06213259696960449, "num_replanning_steps": 0, "wall_time": 0.9649918079376221 }, { "num_node_expansions": 0, "search_time": 0.0568394, "total_time": 0.159339, "plan_length": 142, "plan_cost": 142, "objects_used": 110, "objects_total": 222, "neural_net_time": 0.03833651542663574, "num_replanning_steps": 0, "wall_time": 0.8489890098571777 }, { "num_node_expansions": 0, "search_time": 0.0806894, "total_time": 0.189079, "plan_length": 188, "plan_cost": 188, "objects_used": 110, "objects_total": 222, "neural_net_time": 0.03789353370666504, "num_replanning_steps": 0, "wall_time": 0.9437530040740967 }, { "num_node_expansions": 0, "search_time": 0.151005, "total_time": 0.222475, "plan_length": 190, "plan_cost": 190, "objects_used": 101, "objects_total": 250, "neural_net_time": 0.04339957237243652, "num_replanning_steps": 0, "wall_time": 0.8491106033325195 }, { "num_node_expansions": 0, "search_time": 0.0478454, "total_time": 0.150686, "plan_length": 142, "plan_cost": 142, "objects_used": 110, "objects_total": 250, "neural_net_time": 0.07555818557739258, "num_replanning_steps": 0, "wall_time": 0.8761661052703857 }, { "num_node_expansions": 0, "search_time": 0.123577, "total_time": 0.257152, "plan_length": 204, "plan_cost": 204, "objects_used": 130, "objects_total": 269, "neural_net_time": 0.04827475547790527, "num_replanning_steps": 0, "wall_time": 1.0524470806121826 }, { "num_node_expansions": 0, "search_time": 0.0871824, "total_time": 0.221488, "plan_length": 210, "plan_cost": 210, "objects_used": 129, "objects_total": 269, "neural_net_time": 0.04716014862060547, "num_replanning_steps": 0, "wall_time": 1.0055983066558838 }, { "num_node_expansions": 0, "search_time": 0.0819503, "total_time": 0.208188, "plan_length": 159, "plan_cost": 159, "objects_used": 146, "objects_total": 367, "neural_net_time": 0.06378006935119629, "num_replanning_steps": 0, "wall_time": 0.9702720642089844 }, { "num_node_expansions": 0, "search_time": 0.268373, "total_time": 0.452797, "plan_length": 266, "plan_cost": 266, "objects_used": 160, "objects_total": 367, "neural_net_time": 0.06560254096984863, "num_replanning_steps": 5, "wall_time": 3.011348009109497 }, { "num_node_expansions": 0, "search_time": 0.0941831, "total_time": 0.221279, "plan_length": 178, "plan_cost": 178, "objects_used": 127, "objects_total": 263, "neural_net_time": 0.04631924629211426, "num_replanning_steps": 0, "wall_time": 1.009706735610962 }, { "num_node_expansions": 0, "search_time": 0.0539835, "total_time": 0.119023, "plan_length": 171, "plan_cost": 171, "objects_used": 116, "objects_total": 263, "neural_net_time": 0.04792213439941406, "num_replanning_steps": 0, "wall_time": 0.6958885192871094 }, { "num_node_expansions": 0, "search_time": 0.138429, "total_time": 0.26899, "plan_length": 228, "plan_cost": 228, "objects_used": 132, "objects_total": 307, "neural_net_time": 0.05261349678039551, "num_replanning_steps": 0, "wall_time": 1.0931148529052734 }, { "num_node_expansions": 0, "search_time": 0.122325, "total_time": 0.287355, "plan_length": 191, "plan_cost": 191, "objects_used": 138, "objects_total": 307, "neural_net_time": 0.052745819091796875, "num_replanning_steps": 0, "wall_time": 1.2211828231811523 }, { "num_node_expansions": 0, "search_time": 0.0702098, "total_time": 0.161979, "plan_length": 152, "plan_cost": 152, "objects_used": 109, "objects_total": 186, "neural_net_time": 0.0562443733215332, "num_replanning_steps": 0, "wall_time": 0.873492956161499 }, { "num_node_expansions": 0, "search_time": 0.0607624, "total_time": 0.168418, "plan_length": 133, "plan_cost": 133, "objects_used": 111, "objects_total": 186, "neural_net_time": 0.0317075252532959, "num_replanning_steps": 0, "wall_time": 0.8738946914672852 }, { "num_node_expansions": 0, "search_time": 0.105255, "total_time": 0.232733, "plan_length": 196, "plan_cost": 196, "objects_used": 137, "objects_total": 425, "neural_net_time": 0.0749213695526123, "num_replanning_steps": 0, "wall_time": 1.0104260444641113 }, { "num_node_expansions": 0, "search_time": 0.161776, "total_time": 0.321529, "plan_length": 239, "plan_cost": 239, "objects_used": 143, "objects_total": 425, "neural_net_time": 0.07435131072998047, "num_replanning_steps": 0, "wall_time": 1.2037241458892822 }, { "num_node_expansions": 0, "search_time": 0.10898, "total_time": 0.20831, "plan_length": 231, "plan_cost": 231, "objects_used": 161, "objects_total": 452, "neural_net_time": 0.08123517036437988, "num_replanning_steps": 0, "wall_time": 0.9305424690246582 }, { "num_node_expansions": 0, "search_time": 0.0706434, "total_time": 0.194282, "plan_length": 205, "plan_cost": 205, "objects_used": 162, "objects_total": 452, "neural_net_time": 0.08131527900695801, "num_replanning_steps": 0, "wall_time": 0.9569718837738037 }, { "num_node_expansions": 0, "search_time": 0.0423357, "total_time": 0.118826, "plan_length": 167, "plan_cost": 167, "objects_used": 120, "objects_total": 185, "neural_net_time": 0.03236651420593262, "num_replanning_steps": 0, "wall_time": 0.7566854953765869 }, { "num_node_expansions": 0, "search_time": 0.0918883, "total_time": 0.182959, "plan_length": 186, "plan_cost": 186, "objects_used": 123, "objects_total": 185, "neural_net_time": 0.032120704650878906, "num_replanning_steps": 0, "wall_time": 0.817650556564331 }, { "num_node_expansions": 0, "search_time": 0.0979132, "total_time": 0.224043, "plan_length": 220, "plan_cost": 220, "objects_used": 118, "objects_total": 294, "neural_net_time": 0.05071663856506348, "num_replanning_steps": 0, "wall_time": 1.0140111446380615 }, { "num_node_expansions": 0, "search_time": 0.105051, "total_time": 0.223332, "plan_length": 205, "plan_cost": 205, "objects_used": 123, "objects_total": 294, "neural_net_time": 0.05296945571899414, "num_replanning_steps": 0, "wall_time": 1.0141093730926514 }, { "num_node_expansions": 0, "search_time": 0.134815, "total_time": 0.264608, "plan_length": 179, "plan_cost": 179, "objects_used": 134, "objects_total": 239, "neural_net_time": 0.04209327697753906, "num_replanning_steps": 0, "wall_time": 1.0186936855316162 }, { "num_node_expansions": 0, "search_time": 0.0863073, "total_time": 0.194703, "plan_length": 216, "plan_cost": 216, "objects_used": 128, "objects_total": 239, "neural_net_time": 0.04327273368835449, "num_replanning_steps": 0, "wall_time": 0.8725950717926025 }, { "num_node_expansions": 0, "search_time": 0.0789072, "total_time": 0.165693, "plan_length": 192, "plan_cost": 192, "objects_used": 137, "objects_total": 441, "neural_net_time": 0.08032083511352539, "num_replanning_steps": 0, "wall_time": 0.8416461944580078 }, { "num_node_expansions": 0, "search_time": 0.125951, "total_time": 0.252282, "plan_length": 216, "plan_cost": 216, "objects_used": 142, "objects_total": 441, "neural_net_time": 0.07857489585876465, "num_replanning_steps": 0, "wall_time": 1.0415000915527344 }, { "num_node_expansions": 0, "search_time": 0.0625197, "total_time": 0.144617, "plan_length": 215, "plan_cost": 215, "objects_used": 140, "objects_total": 322, "neural_net_time": 0.05614805221557617, "num_replanning_steps": 0, "wall_time": 0.7807624340057373 }, { "num_node_expansions": 0, "search_time": 0.171375, "total_time": 0.314981, "plan_length": 212, "plan_cost": 212, "objects_used": 151, "objects_total": 322, "neural_net_time": 0.05498790740966797, "num_replanning_steps": 0, "wall_time": 1.1263976097106934 }, { "num_node_expansions": 0, "search_time": 0.0524852, "total_time": 0.166942, "plan_length": 138, "plan_cost": 138, "objects_used": 112, "objects_total": 232, "neural_net_time": 0.04028916358947754, "num_replanning_steps": 0, "wall_time": 0.8710212707519531 }, { "num_node_expansions": 0, "search_time": 0.103607, "total_time": 0.198748, "plan_length": 169, "plan_cost": 169, "objects_used": 106, "objects_total": 232, "neural_net_time": 0.039990901947021484, "num_replanning_steps": 0, "wall_time": 0.8681793212890625 }, { "num_node_expansions": 0, "search_time": 0.0643245, "total_time": 0.143637, "plan_length": 165, "plan_cost": 165, "objects_used": 117, "objects_total": 302, "neural_net_time": 0.051032304763793945, "num_replanning_steps": 0, "wall_time": 0.7398231029510498 }, { "num_node_expansions": 0, "search_time": 0.0679649, "total_time": 0.169156, "plan_length": 179, "plan_cost": 179, "objects_used": 121, "objects_total": 302, "neural_net_time": 0.050397396087646484, "num_replanning_steps": 0, "wall_time": 0.8502187728881836 }, { "num_node_expansions": 0, "search_time": 0.0490003, "total_time": 0.11576, "plan_length": 159, "plan_cost": 159, "objects_used": 119, "objects_total": 221, "neural_net_time": 0.039055585861206055, "num_replanning_steps": 0, "wall_time": 0.6635472774505615 }, { "num_node_expansions": 0, "search_time": 0.131966, "total_time": 0.200885, "plan_length": 204, "plan_cost": 204, "objects_used": 118, "objects_total": 221, "neural_net_time": 0.04007387161254883, "num_replanning_steps": 0, "wall_time": 0.7671856880187988 }, { "num_node_expansions": 0, "search_time": 0.0901247, "total_time": 0.188966, "plan_length": 189, "plan_cost": 189, "objects_used": 118, "objects_total": 263, "neural_net_time": 0.04721832275390625, "num_replanning_steps": 0, "wall_time": 0.9165947437286377 }, { "num_node_expansions": 0, "search_time": 0.0420897, "total_time": 0.138097, "plan_length": 129, "plan_cost": 129, "objects_used": 118, "objects_total": 263, "neural_net_time": 0.04863762855529785, "num_replanning_steps": 0, "wall_time": 0.8551199436187744 }, { "num_node_expansions": 0, "search_time": 0.0570443, "total_time": 0.116505, "plan_length": 144, "plan_cost": 144, "objects_used": 89, "objects_total": 110, "neural_net_time": 0.01940011978149414, "num_replanning_steps": 0, "wall_time": 0.6247892379760742 }, { "num_node_expansions": 0, "search_time": 0.0458228, "total_time": 0.118598, "plan_length": 159, "plan_cost": 159, "objects_used": 92, "objects_total": 110, "neural_net_time": 0.020870208740234375, "num_replanning_steps": 0, "wall_time": 0.6696300506591797 }, { "num_node_expansions": 0, "search_time": 0.0455459, "total_time": 0.170986, "plan_length": 156, "plan_cost": 156, "objects_used": 171, "objects_total": 398, "neural_net_time": 0.07069921493530273, "num_replanning_steps": 0, "wall_time": 0.9098761081695557 }, { "num_node_expansions": 0, "search_time": 0.178719, "total_time": 0.333981, "plan_length": 273, "plan_cost": 273, "objects_used": 176, "objects_total": 398, "neural_net_time": 0.0706338882446289, "num_replanning_steps": 0, "wall_time": 1.2203617095947266 }, { "num_node_expansions": 0, "search_time": 0.0924526, "total_time": 0.181018, "plan_length": 240, "plan_cost": 240, "objects_used": 141, "objects_total": 299, "neural_net_time": 0.05379128456115723, "num_replanning_steps": 0, "wall_time": 0.8276622295379639 }, { "num_node_expansions": 0, "search_time": 0.0828678, "total_time": 0.159347, "plan_length": 208, "plan_cost": 208, "objects_used": 136, "objects_total": 299, "neural_net_time": 0.05095386505126953, "num_replanning_steps": 0, "wall_time": 0.7490129470825195 }, { "num_node_expansions": 0, "search_time": 0.0452422, "total_time": 0.114662, "plan_length": 171, "plan_cost": 171, "objects_used": 87, "objects_total": 129, "neural_net_time": 0.022167205810546875, "num_replanning_steps": 0, "wall_time": 0.6578855514526367 }, { "num_node_expansions": 0, "search_time": 0.0585229, "total_time": 0.133924, "plan_length": 168, "plan_cost": 168, "objects_used": 90, "objects_total": 129, "neural_net_time": 0.022145986557006836, "num_replanning_steps": 0, "wall_time": 0.7226030826568604 }, { "num_node_expansions": 0, "search_time": 0.0916457, "total_time": 0.221311, "plan_length": 171, "plan_cost": 171, "objects_used": 131, "objects_total": 298, "neural_net_time": 0.05045294761657715, "num_replanning_steps": 0, "wall_time": 1.0133440494537354 }, { "num_node_expansions": 0, "search_time": 0.0623154, "total_time": 0.161016, "plan_length": 178, "plan_cost": 178, "objects_used": 125, "objects_total": 298, "neural_net_time": 0.05021095275878906, "num_replanning_steps": 0, "wall_time": 0.8984758853912354 }, { "num_node_expansions": 0, "search_time": 0.0358807, "total_time": 0.121069, "plan_length": 116, "plan_cost": 116, "objects_used": 107, "objects_total": 198, "neural_net_time": 0.03419780731201172, "num_replanning_steps": 0, "wall_time": 0.730410099029541 }, { "num_node_expansions": 0, "search_time": 0.0472072, "total_time": 0.13457, "plan_length": 143, "plan_cost": 143, "objects_used": 103, "objects_total": 198, "neural_net_time": 0.03411746025085449, "num_replanning_steps": 0, "wall_time": 0.7624046802520752 }, { "num_node_expansions": 0, "search_time": 0.052692, "total_time": 0.180943, "plan_length": 153, "plan_cost": 153, "objects_used": 123, "objects_total": 249, "neural_net_time": 0.0444490909576416, "num_replanning_steps": 0, "wall_time": 1.0244402885437012 }, { "num_node_expansions": 0, "search_time": 0.075898, "total_time": 0.196162, "plan_length": 180, "plan_cost": 180, "objects_used": 123, "objects_total": 249, "neural_net_time": 0.04358696937561035, "num_replanning_steps": 0, "wall_time": 0.916325569152832 }, { "num_node_expansions": 0, "search_time": 0.109635, "total_time": 0.25776, "plan_length": 204, "plan_cost": 204, "objects_used": 129, "objects_total": 242, "neural_net_time": 0.043290138244628906, "num_replanning_steps": 0, "wall_time": 1.0722479820251465 }, { "num_node_expansions": 0, "search_time": 0.0918233, "total_time": 0.190336, "plan_length": 148, "plan_cost": 148, "objects_used": 122, "objects_total": 242, "neural_net_time": 0.04327988624572754, "num_replanning_steps": 0, "wall_time": 0.8662850856781006 }, { "num_node_expansions": 0, "search_time": 0.0500598, "total_time": 0.130817, "plan_length": 151, "plan_cost": 151, "objects_used": 99, "objects_total": 181, "neural_net_time": 0.032167673110961914, "num_replanning_steps": 0, "wall_time": 0.7324697971343994 }, { "num_node_expansions": 0, "search_time": 0.104269, "total_time": 0.21618, "plan_length": 171, "plan_cost": 171, "objects_used": 104, "objects_total": 181, "neural_net_time": 0.031090497970581055, "num_replanning_steps": 0, "wall_time": 0.9418821334838867 }, { "num_node_expansions": 0, "search_time": 0.318445, "total_time": 0.389018, "plan_length": 180, "plan_cost": 180, "objects_used": 97, "objects_total": 152, "neural_net_time": 0.02628469467163086, "num_replanning_steps": 0, "wall_time": 0.9369549751281738 }, { "num_node_expansions": 0, "search_time": 0.0519396, "total_time": 0.114015, "plan_length": 148, "plan_cost": 148, "objects_used": 94, "objects_total": 152, "neural_net_time": 0.026342153549194336, "num_replanning_steps": 0, "wall_time": 0.6257641315460205 }, { "num_node_expansions": 0, "search_time": 0.0752088, "total_time": 0.143422, "plan_length": 192, "plan_cost": 192, "objects_used": 126, "objects_total": 306, "neural_net_time": 0.05185842514038086, "num_replanning_steps": 0, "wall_time": 0.7288417816162109 }, { "num_node_expansions": 0, "search_time": 0.034485, "total_time": 0.106152, "plan_length": 151, "plan_cost": 151, "objects_used": 126, "objects_total": 306, "neural_net_time": 0.05185699462890625, "num_replanning_steps": 0, "wall_time": 0.6879549026489258 }, { "num_node_expansions": 0, "search_time": 0.136146, "total_time": 0.293922, "plan_length": 194, "plan_cost": 194, "objects_used": 137, "objects_total": 252, "neural_net_time": 0.04554438591003418, "num_replanning_steps": 0, "wall_time": 1.176285982131958 }, { "num_node_expansions": 0, "search_time": 0.110748, "total_time": 0.231414, "plan_length": 202, "plan_cost": 202, "objects_used": 129, "objects_total": 252, "neural_net_time": 0.0443422794342041, "num_replanning_steps": 0, "wall_time": 0.9532647132873535 }, { "num_node_expansions": 0, "search_time": 0.0635986, "total_time": 0.207597, "plan_length": 178, "plan_cost": 178, "objects_used": 160, "objects_total": 590, "neural_net_time": 0.11240124702453613, "num_replanning_steps": 0, "wall_time": 1.0796713829040527 }, { "num_node_expansions": 0, "search_time": 0.115994, "total_time": 0.2062, "plan_length": 222, "plan_cost": 222, "objects_used": 156, "objects_total": 590, "neural_net_time": 0.10931205749511719, "num_replanning_steps": 0, "wall_time": 0.948901891708374 }, { "num_node_expansions": 0, "search_time": 0.0546317, "total_time": 0.139553, "plan_length": 127, "plan_cost": 127, "objects_used": 98, "objects_total": 137, "neural_net_time": 0.024482250213623047, "num_replanning_steps": 0, "wall_time": 0.7495617866516113 }, { "num_node_expansions": 0, "search_time": 0.04194, "total_time": 0.126749, "plan_length": 153, "plan_cost": 153, "objects_used": 96, "objects_total": 137, "neural_net_time": 0.022912263870239258, "num_replanning_steps": 0, "wall_time": 0.7276170253753662 }, { "num_node_expansions": 0, "search_time": 0.0657196, "total_time": 0.151708, "plan_length": 185, "plan_cost": 185, "objects_used": 108, "objects_total": 194, "neural_net_time": 0.03308534622192383, "num_replanning_steps": 0, "wall_time": 0.7719326019287109 }, { "num_node_expansions": 0, "search_time": 0.0385118, "total_time": 0.112582, "plan_length": 142, "plan_cost": 142, "objects_used": 105, "objects_total": 194, "neural_net_time": 0.03346872329711914, "num_replanning_steps": 0, "wall_time": 0.6850829124450684 }, { "num_node_expansions": 0, "search_time": 0.12478, "total_time": 0.209107, "plan_length": 218, "plan_cost": 218, "objects_used": 124, "objects_total": 273, "neural_net_time": 0.0484766960144043, "num_replanning_steps": 0, "wall_time": 0.8329904079437256 }, { "num_node_expansions": 0, "search_time": 0.0934944, "total_time": 0.175708, "plan_length": 188, "plan_cost": 188, "objects_used": 124, "objects_total": 273, "neural_net_time": 0.04935503005981445, "num_replanning_steps": 0, "wall_time": 0.8079173564910889 }, { "num_node_expansions": 0, "search_time": 0.0576064, "total_time": 0.15922, "plan_length": 136, "plan_cost": 136, "objects_used": 112, "objects_total": 252, "neural_net_time": 0.050174713134765625, "num_replanning_steps": 0, "wall_time": 0.8631553649902344 }, { "num_node_expansions": 0, "search_time": 0.0809324, "total_time": 0.16812, "plan_length": 193, "plan_cost": 193, "objects_used": 108, "objects_total": 252, "neural_net_time": 0.04494309425354004, "num_replanning_steps": 0, "wall_time": 0.8042213916778564 }, { "num_node_expansions": 0, "search_time": 0.150789, "total_time": 0.277772, "plan_length": 193, "plan_cost": 193, "objects_used": 130, "objects_total": 342, "neural_net_time": 0.05874204635620117, "num_replanning_steps": 0, "wall_time": 1.0789546966552734 }, { "num_node_expansions": 0, "search_time": 0.137949, "total_time": 0.286343, "plan_length": 244, "plan_cost": 244, "objects_used": 135, "objects_total": 342, "neural_net_time": 0.057566165924072266, "num_replanning_steps": 1, "wall_time": 1.4527130126953125 }, { "num_node_expansions": 0, "search_time": 0.105657, "total_time": 0.235481, "plan_length": 201, "plan_cost": 201, "objects_used": 128, "objects_total": 239, "neural_net_time": 0.043076276779174805, "num_replanning_steps": 0, "wall_time": 0.9969813823699951 }, { "num_node_expansions": 0, "search_time": 0.0734793, "total_time": 0.225471, "plan_length": 193, "plan_cost": 193, "objects_used": 132, "objects_total": 239, "neural_net_time": 0.042589426040649414, "num_replanning_steps": 0, "wall_time": 1.0482325553894043 }, { "num_node_expansions": 0, "search_time": 0.155992, "total_time": 0.400421, "plan_length": 238, "plan_cost": 238, "objects_used": 191, "objects_total": 548, "neural_net_time": 0.10288858413696289, "num_replanning_steps": 0, "wall_time": 1.5625355243682861 }, { "num_node_expansions": 0, "search_time": 0.334524, "total_time": 0.505858, "plan_length": 230, "plan_cost": 230, "objects_used": 187, "objects_total": 548, "neural_net_time": 0.09901881217956543, "num_replanning_steps": 0, "wall_time": 1.4250199794769287 }, { "num_node_expansions": 0, "search_time": 0.0619202, "total_time": 0.131806, "plan_length": 185, "plan_cost": 185, "objects_used": 129, "objects_total": 285, "neural_net_time": 0.049799442291259766, "num_replanning_steps": 0, "wall_time": 0.7084746360778809 }, { "num_node_expansions": 0, "search_time": 0.122541, "total_time": 0.20295, "plan_length": 189, "plan_cost": 189, "objects_used": 130, "objects_total": 285, "neural_net_time": 0.05124354362487793, "num_replanning_steps": 0, "wall_time": 0.8297102451324463 }, { "num_node_expansions": 0, "search_time": 0.117833, "total_time": 0.237295, "plan_length": 222, "plan_cost": 222, "objects_used": 165, "objects_total": 356, "neural_net_time": 0.06300878524780273, "num_replanning_steps": 0, "wall_time": 1.0006396770477295 }, { "num_node_expansions": 0, "search_time": 0.132216, "total_time": 0.252078, "plan_length": 231, "plan_cost": 231, "objects_used": 167, "objects_total": 356, "neural_net_time": 0.0627584457397461, "num_replanning_steps": 0, "wall_time": 0.9945011138916016 }, { "num_node_expansions": 0, "search_time": 0.0590759, "total_time": 0.149012, "plan_length": 156, "plan_cost": 156, "objects_used": 107, "objects_total": 204, "neural_net_time": 0.03542733192443848, "num_replanning_steps": 0, "wall_time": 0.8198165893554688 }, { "num_node_expansions": 0, "search_time": 0.106132, "total_time": 0.217121, "plan_length": 218, "plan_cost": 218, "objects_used": 110, "objects_total": 204, "neural_net_time": 0.06274199485778809, "num_replanning_steps": 0, "wall_time": 1.00437593460083 }, { "num_node_expansions": 0, "search_time": 0.0634019, "total_time": 0.141975, "plan_length": 176, "plan_cost": 176, "objects_used": 94, "objects_total": 130, "neural_net_time": 0.02202630043029785, "num_replanning_steps": 0, "wall_time": 0.7373795509338379 }, { "num_node_expansions": 0, "search_time": 0.0335487, "total_time": 0.0920351, "plan_length": 144, "plan_cost": 144, "objects_used": 88, "objects_total": 130, "neural_net_time": 0.02197718620300293, "num_replanning_steps": 0, "wall_time": 0.5983211994171143 }, { "num_node_expansions": 0, "search_time": 0.109335, "total_time": 0.256434, "plan_length": 171, "plan_cost": 171, "objects_used": 135, "objects_total": 282, "neural_net_time": 0.04994654655456543, "num_replanning_steps": 4, "wall_time": 2.322432518005371 }, { "num_node_expansions": 0, "search_time": 0.131862, "total_time": 0.247472, "plan_length": 220, "plan_cost": 220, "objects_used": 131, "objects_total": 282, "neural_net_time": 0.05040121078491211, "num_replanning_steps": 4, "wall_time": 2.156909465789795 }, { "num_node_expansions": 0, "search_time": 0.137213, "total_time": 0.24042, "plan_length": 205, "plan_cost": 205, "objects_used": 122, "objects_total": 241, "neural_net_time": 0.04193997383117676, "num_replanning_steps": 0, "wall_time": 0.9178109169006348 }, { "num_node_expansions": 0, "search_time": 0.117394, "total_time": 0.241386, "plan_length": 187, "plan_cost": 187, "objects_used": 121, "objects_total": 241, "neural_net_time": 0.04581952095031738, "num_replanning_steps": 1, "wall_time": 1.299536943435669 }, { "num_node_expansions": 0, "search_time": 0.116395, "total_time": 0.211216, "plan_length": 174, "plan_cost": 174, "objects_used": 117, "objects_total": 303, "neural_net_time": 0.05017542839050293, "num_replanning_steps": 0, "wall_time": 0.8741514682769775 }, { "num_node_expansions": 0, "search_time": 0.0966587, "total_time": 0.211036, "plan_length": 162, "plan_cost": 162, "objects_used": 115, "objects_total": 303, "neural_net_time": 0.051862478256225586, "num_replanning_steps": 0, "wall_time": 0.8510780334472656 }, { "num_node_expansions": 0, "search_time": 0.113647, "total_time": 0.211338, "plan_length": 183, "plan_cost": 183, "objects_used": 115, "objects_total": 187, "neural_net_time": 0.03305411338806152, "num_replanning_steps": 0, "wall_time": 0.8724808692932129 }, { "num_node_expansions": 0, "search_time": 0.110512, "total_time": 0.199805, "plan_length": 211, "plan_cost": 211, "objects_used": 113, "objects_total": 187, "neural_net_time": 0.03314328193664551, "num_replanning_steps": 0, "wall_time": 0.8387811183929443 }, { "num_node_expansions": 0, "search_time": 0.0512388, "total_time": 0.143361, "plan_length": 166, "plan_cost": 166, "objects_used": 122, "objects_total": 149, "neural_net_time": 0.026326417922973633, "num_replanning_steps": 0, "wall_time": 0.7781620025634766 }, { "num_node_expansions": 0, "search_time": 0.0492694, "total_time": 0.109376, "plan_length": 190, "plan_cost": 190, "objects_used": 115, "objects_total": 149, "neural_net_time": 0.026416301727294922, "num_replanning_steps": 0, "wall_time": 0.642287015914917 }, { "num_node_expansions": 0, "search_time": 0.0489913, "total_time": 0.132804, "plan_length": 150, "plan_cost": 150, "objects_used": 132, "objects_total": 270, "neural_net_time": 0.050424814224243164, "num_replanning_steps": 0, "wall_time": 0.7631943225860596 }, { "num_node_expansions": 0, "search_time": 0.102728, "total_time": 0.211444, "plan_length": 188, "plan_cost": 188, "objects_used": 134, "objects_total": 270, "neural_net_time": 0.04851222038269043, "num_replanning_steps": 0, "wall_time": 0.9128179550170898 }, { "num_node_expansions": 0, "search_time": 0.0515611, "total_time": 0.157182, "plan_length": 146, "plan_cost": 146, "objects_used": 106, "objects_total": 159, "neural_net_time": 0.02697467803955078, "num_replanning_steps": 0, "wall_time": 0.8290927410125732 }, { "num_node_expansions": 0, "search_time": 0.0603945, "total_time": 0.139822, "plan_length": 146, "plan_cost": 146, "objects_used": 100, "objects_total": 159, "neural_net_time": 0.0265805721282959, "num_replanning_steps": 0, "wall_time": 0.7267487049102783 }, { "num_node_expansions": 0, "search_time": 0.109096, "total_time": 0.197121, "plan_length": 184, "plan_cost": 184, "objects_used": 122, "objects_total": 245, "neural_net_time": 0.0434718132019043, "num_replanning_steps": 0, "wall_time": 0.8433651924133301 }, { "num_node_expansions": 0, "search_time": 0.0569313, "total_time": 0.149679, "plan_length": 157, "plan_cost": 157, "objects_used": 122, "objects_total": 245, "neural_net_time": 0.04352283477783203, "num_replanning_steps": 0, "wall_time": 0.7943651676177979 }, { "num_node_expansions": 0, "search_time": 0.0688804, "total_time": 0.162913, "plan_length": 166, "plan_cost": 166, "objects_used": 105, "objects_total": 224, "neural_net_time": 0.03991389274597168, "num_replanning_steps": 0, "wall_time": 0.8286600112915039 }, { "num_node_expansions": 0, "search_time": 0.087877, "total_time": 0.205901, "plan_length": 187, "plan_cost": 187, "objects_used": 110, "objects_total": 224, "neural_net_time": 0.04076838493347168, "num_replanning_steps": 0, "wall_time": 0.9610884189605713 }, { "num_node_expansions": 0, "search_time": 0.108875, "total_time": 0.287741, "plan_length": 203, "plan_cost": 203, "objects_used": 162, "objects_total": 344, "neural_net_time": 0.06036639213562012, "num_replanning_steps": 0, "wall_time": 1.199660301208496 }, { "num_node_expansions": 0, "search_time": 0.140254, "total_time": 0.301378, "plan_length": 210, "plan_cost": 210, "objects_used": 158, "objects_total": 344, "neural_net_time": 0.06137275695800781, "num_replanning_steps": 0, "wall_time": 1.1875953674316406 }, { "num_node_expansions": 0, "search_time": 0.0948984, "total_time": 0.225837, "plan_length": 177, "plan_cost": 177, "objects_used": 125, "objects_total": 461, "neural_net_time": 0.08402681350708008, "num_replanning_steps": 0, "wall_time": 1.1599135398864746 }, { "num_node_expansions": 0, "search_time": 0.165758, "total_time": 0.41311, "plan_length": 180, "plan_cost": 180, "objects_used": 149, "objects_total": 461, "neural_net_time": 0.08339810371398926, "num_replanning_steps": 10, "wall_time": 5.166301012039185 }, { "num_node_expansions": 0, "search_time": 0.053683, "total_time": 0.141606, "plan_length": 158, "plan_cost": 158, "objects_used": 96, "objects_total": 213, "neural_net_time": 0.03530240058898926, "num_replanning_steps": 0, "wall_time": 0.7653453350067139 }, { "num_node_expansions": 0, "search_time": 0.08182, "total_time": 0.180951, "plan_length": 144, "plan_cost": 144, "objects_used": 100, "objects_total": 213, "neural_net_time": 0.03677558898925781, "num_replanning_steps": 0, "wall_time": 0.8767471313476562 }, { "num_node_expansions": 0, "search_time": 0.112981, "total_time": 0.219522, "plan_length": 172, "plan_cost": 172, "objects_used": 120, "objects_total": 210, "neural_net_time": 0.03706240653991699, "num_replanning_steps": 0, "wall_time": 0.9154744148254395 }, { "num_node_expansions": 0, "search_time": 0.0566878, "total_time": 0.200295, "plan_length": 158, "plan_cost": 158, "objects_used": 126, "objects_total": 210, "neural_net_time": 0.038547515869140625, "num_replanning_steps": 0, "wall_time": 1.0092735290527344 }, { "num_node_expansions": 0, "search_time": 0.0664906, "total_time": 0.151631, "plan_length": 163, "plan_cost": 163, "objects_used": 97, "objects_total": 176, "neural_net_time": 0.029233455657958984, "num_replanning_steps": 0, "wall_time": 0.7926013469696045 }, { "num_node_expansions": 0, "search_time": 0.0538599, "total_time": 0.118603, "plan_length": 145, "plan_cost": 145, "objects_used": 90, "objects_total": 176, "neural_net_time": 0.02914142608642578, "num_replanning_steps": 0, "wall_time": 0.7353930473327637 }, { "num_node_expansions": 0, "search_time": 0.066048, "total_time": 0.157862, "plan_length": 153, "plan_cost": 153, "objects_used": 131, "objects_total": 173, "neural_net_time": 0.030073165893554688, "num_replanning_steps": 0, "wall_time": 0.7830359935760498 }, { "num_node_expansions": 0, "search_time": 0.0921026, "total_time": 0.175147, "plan_length": 147, "plan_cost": 147, "objects_used": 128, "objects_total": 173, "neural_net_time": 0.030555248260498047, "num_replanning_steps": 0, "wall_time": 0.7749836444854736 }, { "num_node_expansions": 0, "search_time": 0.118463, "total_time": 0.282047, "plan_length": 184, "plan_cost": 184, "objects_used": 139, "objects_total": 339, "neural_net_time": 0.059423208236694336, "num_replanning_steps": 0, "wall_time": 1.1752550601959229 }, { "num_node_expansions": 0, "search_time": 0.0597391, "total_time": 0.164878, "plan_length": 168, "plan_cost": 168, "objects_used": 131, "objects_total": 339, "neural_net_time": 0.059804677963256836, "num_replanning_steps": 0, "wall_time": 0.8735132217407227 }, { "num_node_expansions": 0, "search_time": 0.0707919, "total_time": 0.171617, "plan_length": 162, "plan_cost": 162, "objects_used": 113, "objects_total": 215, "neural_net_time": 0.03980255126953125, "num_replanning_steps": 0, "wall_time": 0.8347995281219482 }, { "num_node_expansions": 0, "search_time": 0.136539, "total_time": 0.297679, "plan_length": 193, "plan_cost": 193, "objects_used": 125, "objects_total": 215, "neural_net_time": 0.03705787658691406, "num_replanning_steps": 0, "wall_time": 1.171936273574829 }, { "num_node_expansions": 0, "search_time": 0.166099, "total_time": 0.332001, "plan_length": 213, "plan_cost": 213, "objects_used": 153, "objects_total": 333, "neural_net_time": 0.056998491287231445, "num_replanning_steps": 0, "wall_time": 1.1840345859527588 }, { "num_node_expansions": 0, "search_time": 0.137145, "total_time": 0.253378, "plan_length": 191, "plan_cost": 191, "objects_used": 145, "objects_total": 333, "neural_net_time": 0.057398319244384766, "num_replanning_steps": 0, "wall_time": 0.9758951663970947 }, { "num_node_expansions": 0, "search_time": 0.0572285, "total_time": 0.141806, "plan_length": 168, "plan_cost": 168, "objects_used": 117, "objects_total": 286, "neural_net_time": 0.05305218696594238, "num_replanning_steps": 0, "wall_time": 0.7997596263885498 }, { "num_node_expansions": 0, "search_time": 0.0730807, "total_time": 0.174237, "plan_length": 178, "plan_cost": 178, "objects_used": 119, "objects_total": 286, "neural_net_time": 0.05058908462524414, "num_replanning_steps": 0, "wall_time": 0.877018928527832 }, { "num_node_expansions": 0, "search_time": 0.0436968, "total_time": 0.113316, "plan_length": 161, "plan_cost": 161, "objects_used": 109, "objects_total": 200, "neural_net_time": 0.03450441360473633, "num_replanning_steps": 0, "wall_time": 0.6501560211181641 }, { "num_node_expansions": 0, "search_time": 0.171478, "total_time": 0.346798, "plan_length": 194, "plan_cost": 194, "objects_used": 127, "objects_total": 200, "neural_net_time": 0.034224510192871094, "num_replanning_steps": 0, "wall_time": 1.2174389362335205 }, { "num_node_expansions": 0, "search_time": 0.0350258, "total_time": 0.111698, "plan_length": 136, "plan_cost": 136, "objects_used": 100, "objects_total": 181, "neural_net_time": 0.030783414840698242, "num_replanning_steps": 0, "wall_time": 0.7171695232391357 }, { "num_node_expansions": 0, "search_time": 0.0683696, "total_time": 0.173089, "plan_length": 150, "plan_cost": 150, "objects_used": 105, "objects_total": 181, "neural_net_time": 0.03152823448181152, "num_replanning_steps": 0, "wall_time": 0.8520138263702393 }, { "num_node_expansions": 0, "search_time": 0.0871958, "total_time": 0.182047, "plan_length": 204, "plan_cost": 204, "objects_used": 135, "objects_total": 229, "neural_net_time": 0.041161537170410156, "num_replanning_steps": 0, "wall_time": 0.8202221393585205 }, { "num_node_expansions": 0, "search_time": 0.0800008, "total_time": 0.177595, "plan_length": 171, "plan_cost": 171, "objects_used": 138, "objects_total": 229, "neural_net_time": 0.04072093963623047, "num_replanning_steps": 0, "wall_time": 0.8345837593078613 }, { "num_node_expansions": 0, "search_time": 0.407514, "total_time": 0.551243, "plan_length": 231, "plan_cost": 231, "objects_used": 153, "objects_total": 333, "neural_net_time": 0.059165000915527344, "num_replanning_steps": 0, "wall_time": 1.3791015148162842 }, { "num_node_expansions": 0, "search_time": 0.112556, "total_time": 0.249969, "plan_length": 192, "plan_cost": 192, "objects_used": 155, "objects_total": 333, "neural_net_time": 0.057951927185058594, "num_replanning_steps": 0, "wall_time": 1.1176068782806396 }, { "num_node_expansions": 0, "search_time": 0.0470725, "total_time": 0.0825322, "plan_length": 146, "plan_cost": 146, "objects_used": 81, "objects_total": 161, "neural_net_time": 0.02678227424621582, "num_replanning_steps": 0, "wall_time": 0.5234506130218506 }, { "num_node_expansions": 0, "search_time": 0.0364912, "total_time": 0.0741524, "plan_length": 156, "plan_cost": 156, "objects_used": 82, "objects_total": 161, "neural_net_time": 0.02719879150390625, "num_replanning_steps": 0, "wall_time": 0.524160623550415 }, { "num_node_expansions": 0, "search_time": 0.0875584, "total_time": 0.180473, "plan_length": 196, "plan_cost": 196, "objects_used": 145, "objects_total": 400, "neural_net_time": 0.0715029239654541, "num_replanning_steps": 0, "wall_time": 0.8854470252990723 }, { "num_node_expansions": 0, "search_time": 0.0949566, "total_time": 0.206312, "plan_length": 225, "plan_cost": 225, "objects_used": 147, "objects_total": 400, "neural_net_time": 0.07208442687988281, "num_replanning_steps": 0, "wall_time": 0.9514024257659912 } ]
stats = [{'num_node_expansions': 0, 'search_time': 0.0929848, 'total_time': 0.206795, 'plan_length': 209, 'plan_cost': 209, 'objects_used': 145, 'objects_total': 253, 'neural_net_time': 0.09392738342285156, 'num_replanning_steps': 0, 'wall_time': 0.9533143043518066}, {'num_node_expansions': 0, 'search_time': 0.0644765, 'total_time': 0.15406, 'plan_length': 178, 'plan_cost': 178, 'objects_used': 139, 'objects_total': 253, 'neural_net_time': 0.0441431999206543, 'num_replanning_steps': 0, 'wall_time': 0.7657253742218018}, {'num_node_expansions': 0, 'search_time': 0.106279, 'total_time': 0.234601, 'plan_length': 199, 'plan_cost': 199, 'objects_used': 166, 'objects_total': 359, 'neural_net_time': 0.0629584789276123, 'num_replanning_steps': 0, 'wall_time': 1.0160789489746094}, {'num_node_expansions': 0, 'search_time': 0.108802, 'total_time': 0.238978, 'plan_length': 242, 'plan_cost': 242, 'objects_used': 167, 'objects_total': 359, 'neural_net_time': 0.06333541870117188, 'num_replanning_steps': 0, 'wall_time': 1.0204391479492188}, {'num_node_expansions': 0, 'search_time': 0.0803484, 'total_time': 0.181895, 'plan_length': 181, 'plan_cost': 181, 'objects_used': 141, 'objects_total': 378, 'neural_net_time': 0.06571578979492188, 'num_replanning_steps': 0, 'wall_time': 0.8968064785003662}, {'num_node_expansions': 0, 'search_time': 0.142677, 'total_time': 0.253942, 'plan_length': 207, 'plan_cost': 207, 'objects_used': 135, 'objects_total': 378, 'neural_net_time': 0.06601405143737793, 'num_replanning_steps': 0, 'wall_time': 0.9965448379516602}, {'num_node_expansions': 0, 'search_time': 0.11895, 'total_time': 0.255997, 'plan_length': 167, 'plan_cost': 167, 'objects_used': 125, 'objects_total': 255, 'neural_net_time': 0.04192996025085449, 'num_replanning_steps': 1, 'wall_time': 1.385655164718628}, {'num_node_expansions': 0, 'search_time': 0.157901, 'total_time': 0.30572, 'plan_length': 202, 'plan_cost': 202, 'objects_used': 126, 'objects_total': 255, 'neural_net_time': 0.04552125930786133, 'num_replanning_steps': 0, 'wall_time': 1.1248347759246826}, {'num_node_expansions': 0, 'search_time': 0.0805039, 'total_time': 0.176183, 'plan_length': 170, 'plan_cost': 170, 'objects_used': 109, 'objects_total': 175, 'neural_net_time': 0.03158974647521973, 'num_replanning_steps': 5, 'wall_time': 2.148319959640503}, {'num_node_expansions': 0, 'search_time': 0.0587677, 'total_time': 0.173702, 'plan_length': 165, 'plan_cost': 165, 'objects_used': 106, 'objects_total': 175, 'neural_net_time': 0.03000664710998535, 'num_replanning_steps': 0, 'wall_time': 0.9106862545013428}, {'num_node_expansions': 0, 'search_time': 0.0402155, 'total_time': 0.147669, 'plan_length': 127, 'plan_cost': 127, 'objects_used': 111, 'objects_total': 249, 'neural_net_time': 0.07640314102172852, 'num_replanning_steps': 0, 'wall_time': 0.922156572341919}, {'num_node_expansions': 0, 'search_time': 0.101752, 'total_time': 0.19686, 'plan_length': 150, 'plan_cost': 150, 'objects_used': 105, 'objects_total': 249, 'neural_net_time': 0.07982420921325684, 'num_replanning_steps': 0, 'wall_time': 0.9400062561035156}, {'num_node_expansions': 0, 'search_time': 0.0719713, 'total_time': 0.137339, 'plan_length': 228, 'plan_cost': 228, 'objects_used': 107, 'objects_total': 197, 'neural_net_time': 0.05859208106994629, 'num_replanning_steps': 0, 'wall_time': 0.7167832851409912}, {'num_node_expansions': 0, 'search_time': 0.0929935, 'total_time': 0.190003, 'plan_length': 209, 'plan_cost': 209, 'objects_used': 114, 'objects_total': 197, 'neural_net_time': 0.03446316719055176, 'num_replanning_steps': 0, 'wall_time': 0.8573403358459473}, {'num_node_expansions': 0, 'search_time': 0.079714, 'total_time': 0.185505, 'plan_length': 173, 'plan_cost': 173, 'objects_used': 103, 'objects_total': 199, 'neural_net_time': 0.03453779220581055, 'num_replanning_steps': 0, 'wall_time': 0.8996772766113281}, {'num_node_expansions': 0, 'search_time': 0.0926601, 'total_time': 0.21608, 'plan_length': 169, 'plan_cost': 169, 'objects_used': 105, 'objects_total': 199, 'neural_net_time': 0.05138850212097168, 'num_replanning_steps': 0, 'wall_time': 0.988412618637085}, {'num_node_expansions': 0, 'search_time': 0.153958, 'total_time': 0.230492, 'plan_length': 219, 'plan_cost': 219, 'objects_used': 170, 'objects_total': 264, 'neural_net_time': 0.04536151885986328, 'num_replanning_steps': 0, 'wall_time': 0.8006608486175537}, {'num_node_expansions': 0, 'search_time': 0.0818528, 'total_time': 0.188787, 'plan_length': 220, 'plan_cost': 220, 'objects_used': 177, 'objects_total': 264, 'neural_net_time': 0.04852485656738281, 'num_replanning_steps': 0, 'wall_time': 0.8596897125244141}, {'num_node_expansions': 0, 'search_time': 0.0492729, 'total_time': 0.125523, 'plan_length': 179, 'plan_cost': 179, 'objects_used': 125, 'objects_total': 226, 'neural_net_time': 0.04153084754943848, 'num_replanning_steps': 2, 'wall_time': 1.2470283508300781}, {'num_node_expansions': 0, 'search_time': 0.0572884, 'total_time': 0.12549, 'plan_length': 210, 'plan_cost': 210, 'objects_used': 121, 'objects_total': 226, 'neural_net_time': 0.03936648368835449, 'num_replanning_steps': 0, 'wall_time': 0.6882929801940918}, {'num_node_expansions': 0, 'search_time': 0.155052, 'total_time': 0.264927, 'plan_length': 157, 'plan_cost': 157, 'objects_used': 126, 'objects_total': 271, 'neural_net_time': 0.04673433303833008, 'num_replanning_steps': 0, 'wall_time': 0.9777631759643555}, {'num_node_expansions': 0, 'search_time': 0.0738639, 'total_time': 0.171292, 'plan_length': 178, 'plan_cost': 178, 'objects_used': 125, 'objects_total': 271, 'neural_net_time': 0.05072212219238281, 'num_replanning_steps': 0, 'wall_time': 0.8584322929382324}, {'num_node_expansions': 0, 'search_time': 0.068614, 'total_time': 0.165012, 'plan_length': 178, 'plan_cost': 178, 'objects_used': 117, 'objects_total': 254, 'neural_net_time': 0.046701908111572266, 'num_replanning_steps': 0, 'wall_time': 0.8422744274139404}, {'num_node_expansions': 0, 'search_time': 0.0784991, 'total_time': 0.185713, 'plan_length': 189, 'plan_cost': 189, 'objects_used': 118, 'objects_total': 254, 'neural_net_time': 0.045041799545288086, 'num_replanning_steps': 0, 'wall_time': 0.910815954208374}, {'num_node_expansions': 0, 'search_time': 0.0377378, 'total_time': 0.0919111, 'plan_length': 155, 'plan_cost': 155, 'objects_used': 108, 'objects_total': 168, 'neural_net_time': 0.02987837791442871, 'num_replanning_steps': 0, 'wall_time': 0.5988538265228271}, {'num_node_expansions': 0, 'search_time': 0.05612, 'total_time': 0.117127, 'plan_length': 156, 'plan_cost': 156, 'objects_used': 110, 'objects_total': 168, 'neural_net_time': 0.029909610748291016, 'num_replanning_steps': 0, 'wall_time': 0.6504032611846924}, {'num_node_expansions': 0, 'search_time': 0.118899, 'total_time': 0.236672, 'plan_length': 187, 'plan_cost': 187, 'objects_used': 117, 'objects_total': 283, 'neural_net_time': 0.04805254936218262, 'num_replanning_steps': 0, 'wall_time': 1.0010144710540771}, {'num_node_expansions': 0, 'search_time': 0.0412124, 'total_time': 0.148293, 'plan_length': 137, 'plan_cost': 137, 'objects_used': 117, 'objects_total': 283, 'neural_net_time': 0.05118083953857422, 'num_replanning_steps': 0, 'wall_time': 0.8539888858795166}, {'num_node_expansions': 0, 'search_time': 0.130546, 'total_time': 0.284641, 'plan_length': 208, 'plan_cost': 208, 'objects_used': 152, 'objects_total': 278, 'neural_net_time': 0.051322221755981445, 'num_replanning_steps': 0, 'wall_time': 1.119509220123291}, {'num_node_expansions': 0, 'search_time': 0.1676, 'total_time': 0.278637, 'plan_length': 189, 'plan_cost': 189, 'objects_used': 144, 'objects_total': 278, 'neural_net_time': 0.052797555923461914, 'num_replanning_steps': 0, 'wall_time': 0.9699740409851074}, {'num_node_expansions': 0, 'search_time': 0.0559687, 'total_time': 0.152069, 'plan_length': 162, 'plan_cost': 162, 'objects_used': 145, 'objects_total': 316, 'neural_net_time': 0.05460691452026367, 'num_replanning_steps': 0, 'wall_time': 0.822706937789917}, {'num_node_expansions': 0, 'search_time': 0.0838116, 'total_time': 0.182175, 'plan_length': 186, 'plan_cost': 186, 'objects_used': 144, 'objects_total': 316, 'neural_net_time': 0.05571866035461426, 'num_replanning_steps': 0, 'wall_time': 0.8658485412597656}, {'num_node_expansions': 0, 'search_time': 0.0603922, 'total_time': 0.163295, 'plan_length': 165, 'plan_cost': 165, 'objects_used': 117, 'objects_total': 254, 'neural_net_time': 0.04593300819396973, 'num_replanning_steps': 0, 'wall_time': 0.843583345413208}, {'num_node_expansions': 0, 'search_time': 0.0459874, 'total_time': 0.13095, 'plan_length': 159, 'plan_cost': 159, 'objects_used': 115, 'objects_total': 254, 'neural_net_time': 0.04458308219909668, 'num_replanning_steps': 0, 'wall_time': 0.7566969394683838}, {'num_node_expansions': 0, 'search_time': 0.222052, 'total_time': 0.382279, 'plan_length': 259, 'plan_cost': 259, 'objects_used': 139, 'objects_total': 238, 'neural_net_time': 0.04237771034240723, 'num_replanning_steps': 0, 'wall_time': 1.23612642288208}, {'num_node_expansions': 0, 'search_time': 0.19537, 'total_time': 0.32901, 'plan_length': 246, 'plan_cost': 246, 'objects_used': 133, 'objects_total': 238, 'neural_net_time': 0.042508602142333984, 'num_replanning_steps': 0, 'wall_time': 1.1203975677490234}, {'num_node_expansions': 0, 'search_time': 0.135153, 'total_time': 0.268125, 'plan_length': 214, 'plan_cost': 214, 'objects_used': 149, 'objects_total': 343, 'neural_net_time': 0.059821367263793945, 'num_replanning_steps': 0, 'wall_time': 1.05523681640625}, {'num_node_expansions': 0, 'search_time': 0.103736, 'total_time': 0.220218, 'plan_length': 257, 'plan_cost': 257, 'objects_used': 147, 'objects_total': 343, 'neural_net_time': 0.06213259696960449, 'num_replanning_steps': 0, 'wall_time': 0.9649918079376221}, {'num_node_expansions': 0, 'search_time': 0.0568394, 'total_time': 0.159339, 'plan_length': 142, 'plan_cost': 142, 'objects_used': 110, 'objects_total': 222, 'neural_net_time': 0.03833651542663574, 'num_replanning_steps': 0, 'wall_time': 0.8489890098571777}, {'num_node_expansions': 0, 'search_time': 0.0806894, 'total_time': 0.189079, 'plan_length': 188, 'plan_cost': 188, 'objects_used': 110, 'objects_total': 222, 'neural_net_time': 0.03789353370666504, 'num_replanning_steps': 0, 'wall_time': 0.9437530040740967}, {'num_node_expansions': 0, 'search_time': 0.151005, 'total_time': 0.222475, 'plan_length': 190, 'plan_cost': 190, 'objects_used': 101, 'objects_total': 250, 'neural_net_time': 0.04339957237243652, 'num_replanning_steps': 0, 'wall_time': 0.8491106033325195}, {'num_node_expansions': 0, 'search_time': 0.0478454, 'total_time': 0.150686, 'plan_length': 142, 'plan_cost': 142, 'objects_used': 110, 'objects_total': 250, 'neural_net_time': 0.07555818557739258, 'num_replanning_steps': 0, 'wall_time': 0.8761661052703857}, {'num_node_expansions': 0, 'search_time': 0.123577, 'total_time': 0.257152, 'plan_length': 204, 'plan_cost': 204, 'objects_used': 130, 'objects_total': 269, 'neural_net_time': 0.04827475547790527, 'num_replanning_steps': 0, 'wall_time': 1.0524470806121826}, {'num_node_expansions': 0, 'search_time': 0.0871824, 'total_time': 0.221488, 'plan_length': 210, 'plan_cost': 210, 'objects_used': 129, 'objects_total': 269, 'neural_net_time': 0.04716014862060547, 'num_replanning_steps': 0, 'wall_time': 1.0055983066558838}, {'num_node_expansions': 0, 'search_time': 0.0819503, 'total_time': 0.208188, 'plan_length': 159, 'plan_cost': 159, 'objects_used': 146, 'objects_total': 367, 'neural_net_time': 0.06378006935119629, 'num_replanning_steps': 0, 'wall_time': 0.9702720642089844}, {'num_node_expansions': 0, 'search_time': 0.268373, 'total_time': 0.452797, 'plan_length': 266, 'plan_cost': 266, 'objects_used': 160, 'objects_total': 367, 'neural_net_time': 0.06560254096984863, 'num_replanning_steps': 5, 'wall_time': 3.011348009109497}, {'num_node_expansions': 0, 'search_time': 0.0941831, 'total_time': 0.221279, 'plan_length': 178, 'plan_cost': 178, 'objects_used': 127, 'objects_total': 263, 'neural_net_time': 0.04631924629211426, 'num_replanning_steps': 0, 'wall_time': 1.009706735610962}, {'num_node_expansions': 0, 'search_time': 0.0539835, 'total_time': 0.119023, 'plan_length': 171, 'plan_cost': 171, 'objects_used': 116, 'objects_total': 263, 'neural_net_time': 0.04792213439941406, 'num_replanning_steps': 0, 'wall_time': 0.6958885192871094}, {'num_node_expansions': 0, 'search_time': 0.138429, 'total_time': 0.26899, 'plan_length': 228, 'plan_cost': 228, 'objects_used': 132, 'objects_total': 307, 'neural_net_time': 0.05261349678039551, 'num_replanning_steps': 0, 'wall_time': 1.0931148529052734}, {'num_node_expansions': 0, 'search_time': 0.122325, 'total_time': 0.287355, 'plan_length': 191, 'plan_cost': 191, 'objects_used': 138, 'objects_total': 307, 'neural_net_time': 0.052745819091796875, 'num_replanning_steps': 0, 'wall_time': 1.2211828231811523}, {'num_node_expansions': 0, 'search_time': 0.0702098, 'total_time': 0.161979, 'plan_length': 152, 'plan_cost': 152, 'objects_used': 109, 'objects_total': 186, 'neural_net_time': 0.0562443733215332, 'num_replanning_steps': 0, 'wall_time': 0.873492956161499}, {'num_node_expansions': 0, 'search_time': 0.0607624, 'total_time': 0.168418, 'plan_length': 133, 'plan_cost': 133, 'objects_used': 111, 'objects_total': 186, 'neural_net_time': 0.0317075252532959, 'num_replanning_steps': 0, 'wall_time': 0.8738946914672852}, {'num_node_expansions': 0, 'search_time': 0.105255, 'total_time': 0.232733, 'plan_length': 196, 'plan_cost': 196, 'objects_used': 137, 'objects_total': 425, 'neural_net_time': 0.0749213695526123, 'num_replanning_steps': 0, 'wall_time': 1.0104260444641113}, {'num_node_expansions': 0, 'search_time': 0.161776, 'total_time': 0.321529, 'plan_length': 239, 'plan_cost': 239, 'objects_used': 143, 'objects_total': 425, 'neural_net_time': 0.07435131072998047, 'num_replanning_steps': 0, 'wall_time': 1.2037241458892822}, {'num_node_expansions': 0, 'search_time': 0.10898, 'total_time': 0.20831, 'plan_length': 231, 'plan_cost': 231, 'objects_used': 161, 'objects_total': 452, 'neural_net_time': 0.08123517036437988, 'num_replanning_steps': 0, 'wall_time': 0.9305424690246582}, {'num_node_expansions': 0, 'search_time': 0.0706434, 'total_time': 0.194282, 'plan_length': 205, 'plan_cost': 205, 'objects_used': 162, 'objects_total': 452, 'neural_net_time': 0.08131527900695801, 'num_replanning_steps': 0, 'wall_time': 0.9569718837738037}, {'num_node_expansions': 0, 'search_time': 0.0423357, 'total_time': 0.118826, 'plan_length': 167, 'plan_cost': 167, 'objects_used': 120, 'objects_total': 185, 'neural_net_time': 0.03236651420593262, 'num_replanning_steps': 0, 'wall_time': 0.7566854953765869}, {'num_node_expansions': 0, 'search_time': 0.0918883, 'total_time': 0.182959, 'plan_length': 186, 'plan_cost': 186, 'objects_used': 123, 'objects_total': 185, 'neural_net_time': 0.032120704650878906, 'num_replanning_steps': 0, 'wall_time': 0.817650556564331}, {'num_node_expansions': 0, 'search_time': 0.0979132, 'total_time': 0.224043, 'plan_length': 220, 'plan_cost': 220, 'objects_used': 118, 'objects_total': 294, 'neural_net_time': 0.05071663856506348, 'num_replanning_steps': 0, 'wall_time': 1.0140111446380615}, {'num_node_expansions': 0, 'search_time': 0.105051, 'total_time': 0.223332, 'plan_length': 205, 'plan_cost': 205, 'objects_used': 123, 'objects_total': 294, 'neural_net_time': 0.05296945571899414, 'num_replanning_steps': 0, 'wall_time': 1.0141093730926514}, {'num_node_expansions': 0, 'search_time': 0.134815, 'total_time': 0.264608, 'plan_length': 179, 'plan_cost': 179, 'objects_used': 134, 'objects_total': 239, 'neural_net_time': 0.04209327697753906, 'num_replanning_steps': 0, 'wall_time': 1.0186936855316162}, {'num_node_expansions': 0, 'search_time': 0.0863073, 'total_time': 0.194703, 'plan_length': 216, 'plan_cost': 216, 'objects_used': 128, 'objects_total': 239, 'neural_net_time': 0.04327273368835449, 'num_replanning_steps': 0, 'wall_time': 0.8725950717926025}, {'num_node_expansions': 0, 'search_time': 0.0789072, 'total_time': 0.165693, 'plan_length': 192, 'plan_cost': 192, 'objects_used': 137, 'objects_total': 441, 'neural_net_time': 0.08032083511352539, 'num_replanning_steps': 0, 'wall_time': 0.8416461944580078}, {'num_node_expansions': 0, 'search_time': 0.125951, 'total_time': 0.252282, 'plan_length': 216, 'plan_cost': 216, 'objects_used': 142, 'objects_total': 441, 'neural_net_time': 0.07857489585876465, 'num_replanning_steps': 0, 'wall_time': 1.0415000915527344}, {'num_node_expansions': 0, 'search_time': 0.0625197, 'total_time': 0.144617, 'plan_length': 215, 'plan_cost': 215, 'objects_used': 140, 'objects_total': 322, 'neural_net_time': 0.05614805221557617, 'num_replanning_steps': 0, 'wall_time': 0.7807624340057373}, {'num_node_expansions': 0, 'search_time': 0.171375, 'total_time': 0.314981, 'plan_length': 212, 'plan_cost': 212, 'objects_used': 151, 'objects_total': 322, 'neural_net_time': 0.05498790740966797, 'num_replanning_steps': 0, 'wall_time': 1.1263976097106934}, {'num_node_expansions': 0, 'search_time': 0.0524852, 'total_time': 0.166942, 'plan_length': 138, 'plan_cost': 138, 'objects_used': 112, 'objects_total': 232, 'neural_net_time': 0.04028916358947754, 'num_replanning_steps': 0, 'wall_time': 0.8710212707519531}, {'num_node_expansions': 0, 'search_time': 0.103607, 'total_time': 0.198748, 'plan_length': 169, 'plan_cost': 169, 'objects_used': 106, 'objects_total': 232, 'neural_net_time': 0.039990901947021484, 'num_replanning_steps': 0, 'wall_time': 0.8681793212890625}, {'num_node_expansions': 0, 'search_time': 0.0643245, 'total_time': 0.143637, 'plan_length': 165, 'plan_cost': 165, 'objects_used': 117, 'objects_total': 302, 'neural_net_time': 0.051032304763793945, 'num_replanning_steps': 0, 'wall_time': 0.7398231029510498}, {'num_node_expansions': 0, 'search_time': 0.0679649, 'total_time': 0.169156, 'plan_length': 179, 'plan_cost': 179, 'objects_used': 121, 'objects_total': 302, 'neural_net_time': 0.050397396087646484, 'num_replanning_steps': 0, 'wall_time': 0.8502187728881836}, {'num_node_expansions': 0, 'search_time': 0.0490003, 'total_time': 0.11576, 'plan_length': 159, 'plan_cost': 159, 'objects_used': 119, 'objects_total': 221, 'neural_net_time': 0.039055585861206055, 'num_replanning_steps': 0, 'wall_time': 0.6635472774505615}, {'num_node_expansions': 0, 'search_time': 0.131966, 'total_time': 0.200885, 'plan_length': 204, 'plan_cost': 204, 'objects_used': 118, 'objects_total': 221, 'neural_net_time': 0.04007387161254883, 'num_replanning_steps': 0, 'wall_time': 0.7671856880187988}, {'num_node_expansions': 0, 'search_time': 0.0901247, 'total_time': 0.188966, 'plan_length': 189, 'plan_cost': 189, 'objects_used': 118, 'objects_total': 263, 'neural_net_time': 0.04721832275390625, 'num_replanning_steps': 0, 'wall_time': 0.9165947437286377}, {'num_node_expansions': 0, 'search_time': 0.0420897, 'total_time': 0.138097, 'plan_length': 129, 'plan_cost': 129, 'objects_used': 118, 'objects_total': 263, 'neural_net_time': 0.04863762855529785, 'num_replanning_steps': 0, 'wall_time': 0.8551199436187744}, {'num_node_expansions': 0, 'search_time': 0.0570443, 'total_time': 0.116505, 'plan_length': 144, 'plan_cost': 144, 'objects_used': 89, 'objects_total': 110, 'neural_net_time': 0.01940011978149414, 'num_replanning_steps': 0, 'wall_time': 0.6247892379760742}, {'num_node_expansions': 0, 'search_time': 0.0458228, 'total_time': 0.118598, 'plan_length': 159, 'plan_cost': 159, 'objects_used': 92, 'objects_total': 110, 'neural_net_time': 0.020870208740234375, 'num_replanning_steps': 0, 'wall_time': 0.6696300506591797}, {'num_node_expansions': 0, 'search_time': 0.0455459, 'total_time': 0.170986, 'plan_length': 156, 'plan_cost': 156, 'objects_used': 171, 'objects_total': 398, 'neural_net_time': 0.07069921493530273, 'num_replanning_steps': 0, 'wall_time': 0.9098761081695557}, {'num_node_expansions': 0, 'search_time': 0.178719, 'total_time': 0.333981, 'plan_length': 273, 'plan_cost': 273, 'objects_used': 176, 'objects_total': 398, 'neural_net_time': 0.0706338882446289, 'num_replanning_steps': 0, 'wall_time': 1.2203617095947266}, {'num_node_expansions': 0, 'search_time': 0.0924526, 'total_time': 0.181018, 'plan_length': 240, 'plan_cost': 240, 'objects_used': 141, 'objects_total': 299, 'neural_net_time': 0.05379128456115723, 'num_replanning_steps': 0, 'wall_time': 0.8276622295379639}, {'num_node_expansions': 0, 'search_time': 0.0828678, 'total_time': 0.159347, 'plan_length': 208, 'plan_cost': 208, 'objects_used': 136, 'objects_total': 299, 'neural_net_time': 0.05095386505126953, 'num_replanning_steps': 0, 'wall_time': 0.7490129470825195}, {'num_node_expansions': 0, 'search_time': 0.0452422, 'total_time': 0.114662, 'plan_length': 171, 'plan_cost': 171, 'objects_used': 87, 'objects_total': 129, 'neural_net_time': 0.022167205810546875, 'num_replanning_steps': 0, 'wall_time': 0.6578855514526367}, {'num_node_expansions': 0, 'search_time': 0.0585229, 'total_time': 0.133924, 'plan_length': 168, 'plan_cost': 168, 'objects_used': 90, 'objects_total': 129, 'neural_net_time': 0.022145986557006836, 'num_replanning_steps': 0, 'wall_time': 0.7226030826568604}, {'num_node_expansions': 0, 'search_time': 0.0916457, 'total_time': 0.221311, 'plan_length': 171, 'plan_cost': 171, 'objects_used': 131, 'objects_total': 298, 'neural_net_time': 0.05045294761657715, 'num_replanning_steps': 0, 'wall_time': 1.0133440494537354}, {'num_node_expansions': 0, 'search_time': 0.0623154, 'total_time': 0.161016, 'plan_length': 178, 'plan_cost': 178, 'objects_used': 125, 'objects_total': 298, 'neural_net_time': 0.05021095275878906, 'num_replanning_steps': 0, 'wall_time': 0.8984758853912354}, {'num_node_expansions': 0, 'search_time': 0.0358807, 'total_time': 0.121069, 'plan_length': 116, 'plan_cost': 116, 'objects_used': 107, 'objects_total': 198, 'neural_net_time': 0.03419780731201172, 'num_replanning_steps': 0, 'wall_time': 0.730410099029541}, {'num_node_expansions': 0, 'search_time': 0.0472072, 'total_time': 0.13457, 'plan_length': 143, 'plan_cost': 143, 'objects_used': 103, 'objects_total': 198, 'neural_net_time': 0.03411746025085449, 'num_replanning_steps': 0, 'wall_time': 0.7624046802520752}, {'num_node_expansions': 0, 'search_time': 0.052692, 'total_time': 0.180943, 'plan_length': 153, 'plan_cost': 153, 'objects_used': 123, 'objects_total': 249, 'neural_net_time': 0.0444490909576416, 'num_replanning_steps': 0, 'wall_time': 1.0244402885437012}, {'num_node_expansions': 0, 'search_time': 0.075898, 'total_time': 0.196162, 'plan_length': 180, 'plan_cost': 180, 'objects_used': 123, 'objects_total': 249, 'neural_net_time': 0.04358696937561035, 'num_replanning_steps': 0, 'wall_time': 0.916325569152832}, {'num_node_expansions': 0, 'search_time': 0.109635, 'total_time': 0.25776, 'plan_length': 204, 'plan_cost': 204, 'objects_used': 129, 'objects_total': 242, 'neural_net_time': 0.043290138244628906, 'num_replanning_steps': 0, 'wall_time': 1.0722479820251465}, {'num_node_expansions': 0, 'search_time': 0.0918233, 'total_time': 0.190336, 'plan_length': 148, 'plan_cost': 148, 'objects_used': 122, 'objects_total': 242, 'neural_net_time': 0.04327988624572754, 'num_replanning_steps': 0, 'wall_time': 0.8662850856781006}, {'num_node_expansions': 0, 'search_time': 0.0500598, 'total_time': 0.130817, 'plan_length': 151, 'plan_cost': 151, 'objects_used': 99, 'objects_total': 181, 'neural_net_time': 0.032167673110961914, 'num_replanning_steps': 0, 'wall_time': 0.7324697971343994}, {'num_node_expansions': 0, 'search_time': 0.104269, 'total_time': 0.21618, 'plan_length': 171, 'plan_cost': 171, 'objects_used': 104, 'objects_total': 181, 'neural_net_time': 0.031090497970581055, 'num_replanning_steps': 0, 'wall_time': 0.9418821334838867}, {'num_node_expansions': 0, 'search_time': 0.318445, 'total_time': 0.389018, 'plan_length': 180, 'plan_cost': 180, 'objects_used': 97, 'objects_total': 152, 'neural_net_time': 0.02628469467163086, 'num_replanning_steps': 0, 'wall_time': 0.9369549751281738}, {'num_node_expansions': 0, 'search_time': 0.0519396, 'total_time': 0.114015, 'plan_length': 148, 'plan_cost': 148, 'objects_used': 94, 'objects_total': 152, 'neural_net_time': 0.026342153549194336, 'num_replanning_steps': 0, 'wall_time': 0.6257641315460205}, {'num_node_expansions': 0, 'search_time': 0.0752088, 'total_time': 0.143422, 'plan_length': 192, 'plan_cost': 192, 'objects_used': 126, 'objects_total': 306, 'neural_net_time': 0.05185842514038086, 'num_replanning_steps': 0, 'wall_time': 0.7288417816162109}, {'num_node_expansions': 0, 'search_time': 0.034485, 'total_time': 0.106152, 'plan_length': 151, 'plan_cost': 151, 'objects_used': 126, 'objects_total': 306, 'neural_net_time': 0.05185699462890625, 'num_replanning_steps': 0, 'wall_time': 0.6879549026489258}, {'num_node_expansions': 0, 'search_time': 0.136146, 'total_time': 0.293922, 'plan_length': 194, 'plan_cost': 194, 'objects_used': 137, 'objects_total': 252, 'neural_net_time': 0.04554438591003418, 'num_replanning_steps': 0, 'wall_time': 1.176285982131958}, {'num_node_expansions': 0, 'search_time': 0.110748, 'total_time': 0.231414, 'plan_length': 202, 'plan_cost': 202, 'objects_used': 129, 'objects_total': 252, 'neural_net_time': 0.0443422794342041, 'num_replanning_steps': 0, 'wall_time': 0.9532647132873535}, {'num_node_expansions': 0, 'search_time': 0.0635986, 'total_time': 0.207597, 'plan_length': 178, 'plan_cost': 178, 'objects_used': 160, 'objects_total': 590, 'neural_net_time': 0.11240124702453613, 'num_replanning_steps': 0, 'wall_time': 1.0796713829040527}, {'num_node_expansions': 0, 'search_time': 0.115994, 'total_time': 0.2062, 'plan_length': 222, 'plan_cost': 222, 'objects_used': 156, 'objects_total': 590, 'neural_net_time': 0.10931205749511719, 'num_replanning_steps': 0, 'wall_time': 0.948901891708374}, {'num_node_expansions': 0, 'search_time': 0.0546317, 'total_time': 0.139553, 'plan_length': 127, 'plan_cost': 127, 'objects_used': 98, 'objects_total': 137, 'neural_net_time': 0.024482250213623047, 'num_replanning_steps': 0, 'wall_time': 0.7495617866516113}, {'num_node_expansions': 0, 'search_time': 0.04194, 'total_time': 0.126749, 'plan_length': 153, 'plan_cost': 153, 'objects_used': 96, 'objects_total': 137, 'neural_net_time': 0.022912263870239258, 'num_replanning_steps': 0, 'wall_time': 0.7276170253753662}, {'num_node_expansions': 0, 'search_time': 0.0657196, 'total_time': 0.151708, 'plan_length': 185, 'plan_cost': 185, 'objects_used': 108, 'objects_total': 194, 'neural_net_time': 0.03308534622192383, 'num_replanning_steps': 0, 'wall_time': 0.7719326019287109}, {'num_node_expansions': 0, 'search_time': 0.0385118, 'total_time': 0.112582, 'plan_length': 142, 'plan_cost': 142, 'objects_used': 105, 'objects_total': 194, 'neural_net_time': 0.03346872329711914, 'num_replanning_steps': 0, 'wall_time': 0.6850829124450684}, {'num_node_expansions': 0, 'search_time': 0.12478, 'total_time': 0.209107, 'plan_length': 218, 'plan_cost': 218, 'objects_used': 124, 'objects_total': 273, 'neural_net_time': 0.0484766960144043, 'num_replanning_steps': 0, 'wall_time': 0.8329904079437256}, {'num_node_expansions': 0, 'search_time': 0.0934944, 'total_time': 0.175708, 'plan_length': 188, 'plan_cost': 188, 'objects_used': 124, 'objects_total': 273, 'neural_net_time': 0.04935503005981445, 'num_replanning_steps': 0, 'wall_time': 0.8079173564910889}, {'num_node_expansions': 0, 'search_time': 0.0576064, 'total_time': 0.15922, 'plan_length': 136, 'plan_cost': 136, 'objects_used': 112, 'objects_total': 252, 'neural_net_time': 0.050174713134765625, 'num_replanning_steps': 0, 'wall_time': 0.8631553649902344}, {'num_node_expansions': 0, 'search_time': 0.0809324, 'total_time': 0.16812, 'plan_length': 193, 'plan_cost': 193, 'objects_used': 108, 'objects_total': 252, 'neural_net_time': 0.04494309425354004, 'num_replanning_steps': 0, 'wall_time': 0.8042213916778564}, {'num_node_expansions': 0, 'search_time': 0.150789, 'total_time': 0.277772, 'plan_length': 193, 'plan_cost': 193, 'objects_used': 130, 'objects_total': 342, 'neural_net_time': 0.05874204635620117, 'num_replanning_steps': 0, 'wall_time': 1.0789546966552734}, {'num_node_expansions': 0, 'search_time': 0.137949, 'total_time': 0.286343, 'plan_length': 244, 'plan_cost': 244, 'objects_used': 135, 'objects_total': 342, 'neural_net_time': 0.057566165924072266, 'num_replanning_steps': 1, 'wall_time': 1.4527130126953125}, {'num_node_expansions': 0, 'search_time': 0.105657, 'total_time': 0.235481, 'plan_length': 201, 'plan_cost': 201, 'objects_used': 128, 'objects_total': 239, 'neural_net_time': 0.043076276779174805, 'num_replanning_steps': 0, 'wall_time': 0.9969813823699951}, {'num_node_expansions': 0, 'search_time': 0.0734793, 'total_time': 0.225471, 'plan_length': 193, 'plan_cost': 193, 'objects_used': 132, 'objects_total': 239, 'neural_net_time': 0.042589426040649414, 'num_replanning_steps': 0, 'wall_time': 1.0482325553894043}, {'num_node_expansions': 0, 'search_time': 0.155992, 'total_time': 0.400421, 'plan_length': 238, 'plan_cost': 238, 'objects_used': 191, 'objects_total': 548, 'neural_net_time': 0.10288858413696289, 'num_replanning_steps': 0, 'wall_time': 1.5625355243682861}, {'num_node_expansions': 0, 'search_time': 0.334524, 'total_time': 0.505858, 'plan_length': 230, 'plan_cost': 230, 'objects_used': 187, 'objects_total': 548, 'neural_net_time': 0.09901881217956543, 'num_replanning_steps': 0, 'wall_time': 1.4250199794769287}, {'num_node_expansions': 0, 'search_time': 0.0619202, 'total_time': 0.131806, 'plan_length': 185, 'plan_cost': 185, 'objects_used': 129, 'objects_total': 285, 'neural_net_time': 0.049799442291259766, 'num_replanning_steps': 0, 'wall_time': 0.7084746360778809}, {'num_node_expansions': 0, 'search_time': 0.122541, 'total_time': 0.20295, 'plan_length': 189, 'plan_cost': 189, 'objects_used': 130, 'objects_total': 285, 'neural_net_time': 0.05124354362487793, 'num_replanning_steps': 0, 'wall_time': 0.8297102451324463}, {'num_node_expansions': 0, 'search_time': 0.117833, 'total_time': 0.237295, 'plan_length': 222, 'plan_cost': 222, 'objects_used': 165, 'objects_total': 356, 'neural_net_time': 0.06300878524780273, 'num_replanning_steps': 0, 'wall_time': 1.0006396770477295}, {'num_node_expansions': 0, 'search_time': 0.132216, 'total_time': 0.252078, 'plan_length': 231, 'plan_cost': 231, 'objects_used': 167, 'objects_total': 356, 'neural_net_time': 0.0627584457397461, 'num_replanning_steps': 0, 'wall_time': 0.9945011138916016}, {'num_node_expansions': 0, 'search_time': 0.0590759, 'total_time': 0.149012, 'plan_length': 156, 'plan_cost': 156, 'objects_used': 107, 'objects_total': 204, 'neural_net_time': 0.03542733192443848, 'num_replanning_steps': 0, 'wall_time': 0.8198165893554688}, {'num_node_expansions': 0, 'search_time': 0.106132, 'total_time': 0.217121, 'plan_length': 218, 'plan_cost': 218, 'objects_used': 110, 'objects_total': 204, 'neural_net_time': 0.06274199485778809, 'num_replanning_steps': 0, 'wall_time': 1.00437593460083}, {'num_node_expansions': 0, 'search_time': 0.0634019, 'total_time': 0.141975, 'plan_length': 176, 'plan_cost': 176, 'objects_used': 94, 'objects_total': 130, 'neural_net_time': 0.02202630043029785, 'num_replanning_steps': 0, 'wall_time': 0.7373795509338379}, {'num_node_expansions': 0, 'search_time': 0.0335487, 'total_time': 0.0920351, 'plan_length': 144, 'plan_cost': 144, 'objects_used': 88, 'objects_total': 130, 'neural_net_time': 0.02197718620300293, 'num_replanning_steps': 0, 'wall_time': 0.5983211994171143}, {'num_node_expansions': 0, 'search_time': 0.109335, 'total_time': 0.256434, 'plan_length': 171, 'plan_cost': 171, 'objects_used': 135, 'objects_total': 282, 'neural_net_time': 0.04994654655456543, 'num_replanning_steps': 4, 'wall_time': 2.322432518005371}, {'num_node_expansions': 0, 'search_time': 0.131862, 'total_time': 0.247472, 'plan_length': 220, 'plan_cost': 220, 'objects_used': 131, 'objects_total': 282, 'neural_net_time': 0.05040121078491211, 'num_replanning_steps': 4, 'wall_time': 2.156909465789795}, {'num_node_expansions': 0, 'search_time': 0.137213, 'total_time': 0.24042, 'plan_length': 205, 'plan_cost': 205, 'objects_used': 122, 'objects_total': 241, 'neural_net_time': 0.04193997383117676, 'num_replanning_steps': 0, 'wall_time': 0.9178109169006348}, {'num_node_expansions': 0, 'search_time': 0.117394, 'total_time': 0.241386, 'plan_length': 187, 'plan_cost': 187, 'objects_used': 121, 'objects_total': 241, 'neural_net_time': 0.04581952095031738, 'num_replanning_steps': 1, 'wall_time': 1.299536943435669}, {'num_node_expansions': 0, 'search_time': 0.116395, 'total_time': 0.211216, 'plan_length': 174, 'plan_cost': 174, 'objects_used': 117, 'objects_total': 303, 'neural_net_time': 0.05017542839050293, 'num_replanning_steps': 0, 'wall_time': 0.8741514682769775}, {'num_node_expansions': 0, 'search_time': 0.0966587, 'total_time': 0.211036, 'plan_length': 162, 'plan_cost': 162, 'objects_used': 115, 'objects_total': 303, 'neural_net_time': 0.051862478256225586, 'num_replanning_steps': 0, 'wall_time': 0.8510780334472656}, {'num_node_expansions': 0, 'search_time': 0.113647, 'total_time': 0.211338, 'plan_length': 183, 'plan_cost': 183, 'objects_used': 115, 'objects_total': 187, 'neural_net_time': 0.03305411338806152, 'num_replanning_steps': 0, 'wall_time': 0.8724808692932129}, {'num_node_expansions': 0, 'search_time': 0.110512, 'total_time': 0.199805, 'plan_length': 211, 'plan_cost': 211, 'objects_used': 113, 'objects_total': 187, 'neural_net_time': 0.03314328193664551, 'num_replanning_steps': 0, 'wall_time': 0.8387811183929443}, {'num_node_expansions': 0, 'search_time': 0.0512388, 'total_time': 0.143361, 'plan_length': 166, 'plan_cost': 166, 'objects_used': 122, 'objects_total': 149, 'neural_net_time': 0.026326417922973633, 'num_replanning_steps': 0, 'wall_time': 0.7781620025634766}, {'num_node_expansions': 0, 'search_time': 0.0492694, 'total_time': 0.109376, 'plan_length': 190, 'plan_cost': 190, 'objects_used': 115, 'objects_total': 149, 'neural_net_time': 0.026416301727294922, 'num_replanning_steps': 0, 'wall_time': 0.642287015914917}, {'num_node_expansions': 0, 'search_time': 0.0489913, 'total_time': 0.132804, 'plan_length': 150, 'plan_cost': 150, 'objects_used': 132, 'objects_total': 270, 'neural_net_time': 0.050424814224243164, 'num_replanning_steps': 0, 'wall_time': 0.7631943225860596}, {'num_node_expansions': 0, 'search_time': 0.102728, 'total_time': 0.211444, 'plan_length': 188, 'plan_cost': 188, 'objects_used': 134, 'objects_total': 270, 'neural_net_time': 0.04851222038269043, 'num_replanning_steps': 0, 'wall_time': 0.9128179550170898}, {'num_node_expansions': 0, 'search_time': 0.0515611, 'total_time': 0.157182, 'plan_length': 146, 'plan_cost': 146, 'objects_used': 106, 'objects_total': 159, 'neural_net_time': 0.02697467803955078, 'num_replanning_steps': 0, 'wall_time': 0.8290927410125732}, {'num_node_expansions': 0, 'search_time': 0.0603945, 'total_time': 0.139822, 'plan_length': 146, 'plan_cost': 146, 'objects_used': 100, 'objects_total': 159, 'neural_net_time': 0.0265805721282959, 'num_replanning_steps': 0, 'wall_time': 0.7267487049102783}, {'num_node_expansions': 0, 'search_time': 0.109096, 'total_time': 0.197121, 'plan_length': 184, 'plan_cost': 184, 'objects_used': 122, 'objects_total': 245, 'neural_net_time': 0.0434718132019043, 'num_replanning_steps': 0, 'wall_time': 0.8433651924133301}, {'num_node_expansions': 0, 'search_time': 0.0569313, 'total_time': 0.149679, 'plan_length': 157, 'plan_cost': 157, 'objects_used': 122, 'objects_total': 245, 'neural_net_time': 0.04352283477783203, 'num_replanning_steps': 0, 'wall_time': 0.7943651676177979}, {'num_node_expansions': 0, 'search_time': 0.0688804, 'total_time': 0.162913, 'plan_length': 166, 'plan_cost': 166, 'objects_used': 105, 'objects_total': 224, 'neural_net_time': 0.03991389274597168, 'num_replanning_steps': 0, 'wall_time': 0.8286600112915039}, {'num_node_expansions': 0, 'search_time': 0.087877, 'total_time': 0.205901, 'plan_length': 187, 'plan_cost': 187, 'objects_used': 110, 'objects_total': 224, 'neural_net_time': 0.04076838493347168, 'num_replanning_steps': 0, 'wall_time': 0.9610884189605713}, {'num_node_expansions': 0, 'search_time': 0.108875, 'total_time': 0.287741, 'plan_length': 203, 'plan_cost': 203, 'objects_used': 162, 'objects_total': 344, 'neural_net_time': 0.06036639213562012, 'num_replanning_steps': 0, 'wall_time': 1.199660301208496}, {'num_node_expansions': 0, 'search_time': 0.140254, 'total_time': 0.301378, 'plan_length': 210, 'plan_cost': 210, 'objects_used': 158, 'objects_total': 344, 'neural_net_time': 0.06137275695800781, 'num_replanning_steps': 0, 'wall_time': 1.1875953674316406}, {'num_node_expansions': 0, 'search_time': 0.0948984, 'total_time': 0.225837, 'plan_length': 177, 'plan_cost': 177, 'objects_used': 125, 'objects_total': 461, 'neural_net_time': 0.08402681350708008, 'num_replanning_steps': 0, 'wall_time': 1.1599135398864746}, {'num_node_expansions': 0, 'search_time': 0.165758, 'total_time': 0.41311, 'plan_length': 180, 'plan_cost': 180, 'objects_used': 149, 'objects_total': 461, 'neural_net_time': 0.08339810371398926, 'num_replanning_steps': 10, 'wall_time': 5.166301012039185}, {'num_node_expansions': 0, 'search_time': 0.053683, 'total_time': 0.141606, 'plan_length': 158, 'plan_cost': 158, 'objects_used': 96, 'objects_total': 213, 'neural_net_time': 0.03530240058898926, 'num_replanning_steps': 0, 'wall_time': 0.7653453350067139}, {'num_node_expansions': 0, 'search_time': 0.08182, 'total_time': 0.180951, 'plan_length': 144, 'plan_cost': 144, 'objects_used': 100, 'objects_total': 213, 'neural_net_time': 0.03677558898925781, 'num_replanning_steps': 0, 'wall_time': 0.8767471313476562}, {'num_node_expansions': 0, 'search_time': 0.112981, 'total_time': 0.219522, 'plan_length': 172, 'plan_cost': 172, 'objects_used': 120, 'objects_total': 210, 'neural_net_time': 0.03706240653991699, 'num_replanning_steps': 0, 'wall_time': 0.9154744148254395}, {'num_node_expansions': 0, 'search_time': 0.0566878, 'total_time': 0.200295, 'plan_length': 158, 'plan_cost': 158, 'objects_used': 126, 'objects_total': 210, 'neural_net_time': 0.038547515869140625, 'num_replanning_steps': 0, 'wall_time': 1.0092735290527344}, {'num_node_expansions': 0, 'search_time': 0.0664906, 'total_time': 0.151631, 'plan_length': 163, 'plan_cost': 163, 'objects_used': 97, 'objects_total': 176, 'neural_net_time': 0.029233455657958984, 'num_replanning_steps': 0, 'wall_time': 0.7926013469696045}, {'num_node_expansions': 0, 'search_time': 0.0538599, 'total_time': 0.118603, 'plan_length': 145, 'plan_cost': 145, 'objects_used': 90, 'objects_total': 176, 'neural_net_time': 0.02914142608642578, 'num_replanning_steps': 0, 'wall_time': 0.7353930473327637}, {'num_node_expansions': 0, 'search_time': 0.066048, 'total_time': 0.157862, 'plan_length': 153, 'plan_cost': 153, 'objects_used': 131, 'objects_total': 173, 'neural_net_time': 0.030073165893554688, 'num_replanning_steps': 0, 'wall_time': 0.7830359935760498}, {'num_node_expansions': 0, 'search_time': 0.0921026, 'total_time': 0.175147, 'plan_length': 147, 'plan_cost': 147, 'objects_used': 128, 'objects_total': 173, 'neural_net_time': 0.030555248260498047, 'num_replanning_steps': 0, 'wall_time': 0.7749836444854736}, {'num_node_expansions': 0, 'search_time': 0.118463, 'total_time': 0.282047, 'plan_length': 184, 'plan_cost': 184, 'objects_used': 139, 'objects_total': 339, 'neural_net_time': 0.059423208236694336, 'num_replanning_steps': 0, 'wall_time': 1.1752550601959229}, {'num_node_expansions': 0, 'search_time': 0.0597391, 'total_time': 0.164878, 'plan_length': 168, 'plan_cost': 168, 'objects_used': 131, 'objects_total': 339, 'neural_net_time': 0.059804677963256836, 'num_replanning_steps': 0, 'wall_time': 0.8735132217407227}, {'num_node_expansions': 0, 'search_time': 0.0707919, 'total_time': 0.171617, 'plan_length': 162, 'plan_cost': 162, 'objects_used': 113, 'objects_total': 215, 'neural_net_time': 0.03980255126953125, 'num_replanning_steps': 0, 'wall_time': 0.8347995281219482}, {'num_node_expansions': 0, 'search_time': 0.136539, 'total_time': 0.297679, 'plan_length': 193, 'plan_cost': 193, 'objects_used': 125, 'objects_total': 215, 'neural_net_time': 0.03705787658691406, 'num_replanning_steps': 0, 'wall_time': 1.171936273574829}, {'num_node_expansions': 0, 'search_time': 0.166099, 'total_time': 0.332001, 'plan_length': 213, 'plan_cost': 213, 'objects_used': 153, 'objects_total': 333, 'neural_net_time': 0.056998491287231445, 'num_replanning_steps': 0, 'wall_time': 1.1840345859527588}, {'num_node_expansions': 0, 'search_time': 0.137145, 'total_time': 0.253378, 'plan_length': 191, 'plan_cost': 191, 'objects_used': 145, 'objects_total': 333, 'neural_net_time': 0.057398319244384766, 'num_replanning_steps': 0, 'wall_time': 0.9758951663970947}, {'num_node_expansions': 0, 'search_time': 0.0572285, 'total_time': 0.141806, 'plan_length': 168, 'plan_cost': 168, 'objects_used': 117, 'objects_total': 286, 'neural_net_time': 0.05305218696594238, 'num_replanning_steps': 0, 'wall_time': 0.7997596263885498}, {'num_node_expansions': 0, 'search_time': 0.0730807, 'total_time': 0.174237, 'plan_length': 178, 'plan_cost': 178, 'objects_used': 119, 'objects_total': 286, 'neural_net_time': 0.05058908462524414, 'num_replanning_steps': 0, 'wall_time': 0.877018928527832}, {'num_node_expansions': 0, 'search_time': 0.0436968, 'total_time': 0.113316, 'plan_length': 161, 'plan_cost': 161, 'objects_used': 109, 'objects_total': 200, 'neural_net_time': 0.03450441360473633, 'num_replanning_steps': 0, 'wall_time': 0.6501560211181641}, {'num_node_expansions': 0, 'search_time': 0.171478, 'total_time': 0.346798, 'plan_length': 194, 'plan_cost': 194, 'objects_used': 127, 'objects_total': 200, 'neural_net_time': 0.034224510192871094, 'num_replanning_steps': 0, 'wall_time': 1.2174389362335205}, {'num_node_expansions': 0, 'search_time': 0.0350258, 'total_time': 0.111698, 'plan_length': 136, 'plan_cost': 136, 'objects_used': 100, 'objects_total': 181, 'neural_net_time': 0.030783414840698242, 'num_replanning_steps': 0, 'wall_time': 0.7171695232391357}, {'num_node_expansions': 0, 'search_time': 0.0683696, 'total_time': 0.173089, 'plan_length': 150, 'plan_cost': 150, 'objects_used': 105, 'objects_total': 181, 'neural_net_time': 0.03152823448181152, 'num_replanning_steps': 0, 'wall_time': 0.8520138263702393}, {'num_node_expansions': 0, 'search_time': 0.0871958, 'total_time': 0.182047, 'plan_length': 204, 'plan_cost': 204, 'objects_used': 135, 'objects_total': 229, 'neural_net_time': 0.041161537170410156, 'num_replanning_steps': 0, 'wall_time': 0.8202221393585205}, {'num_node_expansions': 0, 'search_time': 0.0800008, 'total_time': 0.177595, 'plan_length': 171, 'plan_cost': 171, 'objects_used': 138, 'objects_total': 229, 'neural_net_time': 0.04072093963623047, 'num_replanning_steps': 0, 'wall_time': 0.8345837593078613}, {'num_node_expansions': 0, 'search_time': 0.407514, 'total_time': 0.551243, 'plan_length': 231, 'plan_cost': 231, 'objects_used': 153, 'objects_total': 333, 'neural_net_time': 0.059165000915527344, 'num_replanning_steps': 0, 'wall_time': 1.3791015148162842}, {'num_node_expansions': 0, 'search_time': 0.112556, 'total_time': 0.249969, 'plan_length': 192, 'plan_cost': 192, 'objects_used': 155, 'objects_total': 333, 'neural_net_time': 0.057951927185058594, 'num_replanning_steps': 0, 'wall_time': 1.1176068782806396}, {'num_node_expansions': 0, 'search_time': 0.0470725, 'total_time': 0.0825322, 'plan_length': 146, 'plan_cost': 146, 'objects_used': 81, 'objects_total': 161, 'neural_net_time': 0.02678227424621582, 'num_replanning_steps': 0, 'wall_time': 0.5234506130218506}, {'num_node_expansions': 0, 'search_time': 0.0364912, 'total_time': 0.0741524, 'plan_length': 156, 'plan_cost': 156, 'objects_used': 82, 'objects_total': 161, 'neural_net_time': 0.02719879150390625, 'num_replanning_steps': 0, 'wall_time': 0.524160623550415}, {'num_node_expansions': 0, 'search_time': 0.0875584, 'total_time': 0.180473, 'plan_length': 196, 'plan_cost': 196, 'objects_used': 145, 'objects_total': 400, 'neural_net_time': 0.0715029239654541, 'num_replanning_steps': 0, 'wall_time': 0.8854470252990723}, {'num_node_expansions': 0, 'search_time': 0.0949566, 'total_time': 0.206312, 'plan_length': 225, 'plan_cost': 225, 'objects_used': 147, 'objects_total': 400, 'neural_net_time': 0.07208442687988281, 'num_replanning_steps': 0, 'wall_time': 0.9514024257659912}]
# Copyright (c) 2020 Trail of Bits, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. class Colors: class c: green = '\033[92m' yellow = '\033[93m' red = '\033[91m' magneta = '\033[95m' bg_yellow = '\033[43m' orange = '\033[38;5;202m' RESET = '\033[0m' def get_result_color(total, success): if total == 0: return Colors.c.magneta if total == success: return Colors.c.green if success == 0: return Colors.c.red return Colors.c.yellow def get_bin_result(result): if result == 1: return Colors.c.green if result == 0: return Colors.c.red return Colors.c.magneta def clean(): return Colors.RESET def c(color, message): return color + message + clean() def fail(): return Colors.c.red def succ(): return Colors.c.green #TODO: Not sure if it's worth to generate these for each color from attrs dynamically def green(message): return c(Colors.c.green, message) def red(message): return c(Colors.c.red, message) def yellow(message): return c(Colors.c.yellow, message) def magneta(message): return c(Colors.c.magneta, message) def bg_yellow(message): return c(Colors.c.bg_yellow, message) def orange(message): return c(Colors.c.orange, message) def id(message): return message
class Colors: class C: green = '\x1b[92m' yellow = '\x1b[93m' red = '\x1b[91m' magneta = '\x1b[95m' bg_yellow = '\x1b[43m' orange = '\x1b[38;5;202m' reset = '\x1b[0m' def get_result_color(total, success): if total == 0: return Colors.c.magneta if total == success: return Colors.c.green if success == 0: return Colors.c.red return Colors.c.yellow def get_bin_result(result): if result == 1: return Colors.c.green if result == 0: return Colors.c.red return Colors.c.magneta def clean(): return Colors.RESET def c(color, message): return color + message + clean() def fail(): return Colors.c.red def succ(): return Colors.c.green def green(message): return c(Colors.c.green, message) def red(message): return c(Colors.c.red, message) def yellow(message): return c(Colors.c.yellow, message) def magneta(message): return c(Colors.c.magneta, message) def bg_yellow(message): return c(Colors.c.bg_yellow, message) def orange(message): return c(Colors.c.orange, message) def id(message): return message
# container.py - Creates META-INF/content.xml within the epub file def create_container(epub_file): epub_file.writestr('META-INF/container.xml', '''<?xml version="1.0"?> <container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> <rootfiles> <rootfile full-path="OEBPS/content.opf" media-type="application/oebps-package+xml"/> </rootfiles> </container>''')
def create_container(epub_file): epub_file.writestr('META-INF/container.xml', '<?xml version="1.0"?>\n<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">\n <rootfiles>\n <rootfile full-path="OEBPS/content.opf" media-type="application/oebps-package+xml"/>\n </rootfiles>\n</container>')
APP_MIN_WIDTH = 1024 APP_MIN_HEIGHT = 800 APP_NAME = 'Fractals' APP_FONT = 12
app_min_width = 1024 app_min_height = 800 app_name = 'Fractals' app_font = 12
s = input() ans = [] i=0 while i<len(s): if s[i]=='.': ans.append('0') else: if s[i+1]=='.': ans.append('1') else: ans.append('2') i=i+1 i+=1 for j in ans: print(j,end='')
s = input() ans = [] i = 0 while i < len(s): if s[i] == '.': ans.append('0') else: if s[i + 1] == '.': ans.append('1') else: ans.append('2') i = i + 1 i += 1 for j in ans: print(j, end='')
def usersagein_Sec(): users_age = int(input("Enter user age in years")) agein_sec = users_age *12 *365 * 24 print(f"Age in sec is {agein_sec}") print("Welcome to function project 1 ") usersagein_Sec() # Never use same name in anywhere inside a function program. else going to get error. friends = [] def friend(): friends.append("Ram") friend() friend() friend() print(friends)
def usersagein__sec(): users_age = int(input('Enter user age in years')) agein_sec = users_age * 12 * 365 * 24 print(f'Age in sec is {agein_sec}') print('Welcome to function project 1 ') usersagein__sec() friends = [] def friend(): friends.append('Ram') friend() friend() friend() print(friends)
def test_non_standard_default_desired_privilege_level(iosxe_conn): # purpose of this test is to ensure that when a user sets a non-standard default desired priv # level, that there is nothing in genericdriver/networkdriver that will prevent that from # actually being set as the default desired priv level iosxe_conn.close() iosxe_conn.default_desired_privilege_level = "configuration" iosxe_conn.open() current_prompt = iosxe_conn.get_prompt() assert current_prompt == "csr1000v(config)#" iosxe_conn.close()
def test_non_standard_default_desired_privilege_level(iosxe_conn): iosxe_conn.close() iosxe_conn.default_desired_privilege_level = 'configuration' iosxe_conn.open() current_prompt = iosxe_conn.get_prompt() assert current_prompt == 'csr1000v(config)#' iosxe_conn.close()
# Mac address of authentication server AUTH_SERVER_MAC = "b8:ae:ed:7a:05:3b" # IP address of authentication server AUTH_SERVER_IP = "192.168.1.42" # Switch port authentication server is facing AUTH_SERVER_PORT = 3 #CTL_REST_IP = "192.168.1.39" CTL_REST_IP = "10.0.1.8" CTL_REST_PORT = "8080" CTL_MAC = "b8:27:eb:b0:1d:6b" GATEWAY_MAC = "24:09:95:79:31:7e" GATEWAY_PORT = 1 # L2 src-dst pairs which are whitelisted and does not need to go through auth WHITELIST = [ (AUTH_SERVER_MAC, CTL_MAC), (CTL_MAC, AUTH_SERVER_MAC), (GATEWAY_MAC, "00:1d:a2:80:60:64"), ("00:1d:a2:80:60:64", GATEWAY_MAC) # (GATEWAY_MAC, "9c:eb:e8:01:6e:db"), # ("9c:eb:e8:01:6e:db", GATEWAY_MAC) ]
auth_server_mac = 'b8:ae:ed:7a:05:3b' auth_server_ip = '192.168.1.42' auth_server_port = 3 ctl_rest_ip = '10.0.1.8' ctl_rest_port = '8080' ctl_mac = 'b8:27:eb:b0:1d:6b' gateway_mac = '24:09:95:79:31:7e' gateway_port = 1 whitelist = [(AUTH_SERVER_MAC, CTL_MAC), (CTL_MAC, AUTH_SERVER_MAC), (GATEWAY_MAC, '00:1d:a2:80:60:64'), ('00:1d:a2:80:60:64', GATEWAY_MAC)]
running = True # Global Options SIZES = {'small': [7.58, 0], 'medium': [9.69, 1], 'large': [12.09, 2], 'jumbo': [17.99, 3], 'party': [20.29, 4]} # [Price, ID] TOPPINGS = {'pepperoni': [0, False], 'bacon': [0, True], 'sausage': [0, False], 'mushroom': [1, False], 'black olive': [1, False], 'green pepper': [1, False]} # [Group, Special] TOPPING_PRICES = [[1.6, 2.05, 2.35, 3.15, 3.30], [1.95, 2.25, 2.65, 3.49, 3.69]] # 0: No Special - 1: Special [Inc size] def ask(question, options, show = True): answer = False o = "" # Choices to show, only if show = true if show: o = " (" + ', '.join([str(lst).title() for lst in options]) + ")" while True: a = input(question + o + ": ").lower() # User input if a.isdigit(): # Allow users to pick via number too a = int(a) - 1 # Set to an int if a in range(0, len(options)): a = options[a] # Set to value so next function completes if a in options: # Is option valid? answer = a break print("Not a valid option, try again!") # Nope return answer # Return answer def splitter(): print("---------------------------------------------------") # Only do while running, used for confirmation. while running: PIZZA = {} # Pizza config DELIVERY = {} # Delivery config TOTAL = 0 # Start title print(" MAKAN PIZZA ") splitter() # Delivery or pickup? DELIVERY['type'] = ask("Type of order", ['delivery', 'pickup']) while True: DELIVERY['location'] = input("Location of " + DELIVERY['type'] + ": ") # Need a location # Did they leave it blank? if DELIVERY['location']: break else: print("Please enter a valid location!") # If delivery, ask for special instructions if DELIVERY['type'] == "delivery": DELIVERY['special_instructions'] = input("Special instructions (Blank for None): ") # Do they have special instructions? if not DELIVERY['special_instructions']: DELIVERY['special_instructions'] = "None" splitter() # Size of the pizza PIZZA['size'] = ask("Select the size", ['small', 'medium', 'large', 'jumbo', 'party']) # Dough type PIZZA['dough'] = ask("Select dough type", ['regular', 'whole wheat', 'carbone']) # Type of sauce PIZZA['sauce'] = ask("Type of sauce", ['tomato', 'pesto', 'bbq sauce', 'no sauce']) # Type of primary cheese PIZZA['cheese'] = ask("Type of cheese", ['mozzarella', 'cheddar', 'dairy-free', 'no cheese']) splitter() # Pick your topping section! print("Pick your Toppings!", end = "") count = -1 # Category count for i in TOPPINGS: start = "" # Used for the comma # Check category and print to new line if so. if TOPPINGS[i][0] != count: count = TOPPINGS[i][0] print("\n--> ", end = "") else: start = ", " # Split toppings print(start + i.title(), end = "") # Print topping # Special topping? if TOPPINGS[i][1]: print(" (*)", end = "") print() # New line # Extra functions print("--> Typing in list will show current toppings.") print("--> Retyping in a topping will remove it.") print("--> Press enter once you're done!") # Topping selector PIZZA['toppings'] = [] while True: top = input("Pick your topping: ") # Get input if top == "list": # Want a list of toppings. if not len(PIZZA['toppings']): # Do they have toppings? print("You have no toppings!") else: for i in PIZZA['toppings']: # Go through and print toppings. print("--> ", i.title()) elif not top: # Done picking. break else: # Picked a topping? if top.endswith('s'): # If it ends with s, remove and check (sausages -> sausage) top = top[:-1] if top in TOPPINGS: if top in PIZZA['toppings']: print("Topping", top.title(), "has been removed from your order.") PIZZA['toppings'].remove(top) # Remove topping else: print("Topping", top.title(), "has been added to your order.") PIZZA['toppings'].append(top) # Add topping else: print("That topping does not exist!") splitter() print(" MAKAN PIZZA ORDER CONFIRMATION ") splitter() # Calculate the price of order and print. print(PIZZA['size'].title() + " Pizza (CAD$" + str(SIZES[PIZZA['size']][0]) + ")") TOTAL += SIZES[PIZZA['size']][0] # Price of size # Free Things print("--> " + PIZZA['dough'].title() + " (FREE)") print("--> " + PIZZA['sauce'].title() + " (FREE)") print("--> " + PIZZA['cheese'].title() + " (FREE)") # Toppings if PIZZA['toppings']: print("--> Toppings:") # If they have any toppings, print title # Go through all the toppings for i in PIZZA['toppings']: if TOPPINGS[i][1]: tpp = TOPPING_PRICES[1][SIZES[PIZZA['size']][1]] # Special pricing else: tpp = TOPPING_PRICES[0][SIZES[PIZZA['size']][1]] # Non-Special pricing print(" --> " + i.title() + " (CAD$" + format(tpp, '.2f') + ")") # Print the topping name and price TOTAL += tpp # Add price of topping to total splitter() print("Sub-Total: CAD$" + format(TOTAL, '.2f')) # total # Delivery has delivery fee (Fixed $3.50) if DELIVERY['type'] == "delivery": print("Delivery Fee: CAD$3.50") TOTAL += 3.5 # Calculate and add tax TAX = round(TOTAL * 0.13, 2) TOTAL += TAX print("Tax: CAD$" + format(TAX, '.2f')) print("Total: CAD$" + format(TOTAL, '.2f')) splitter() CONFIRM = ask("Do you wish to confirm this order", ['yes', 'no']) splitter() # Done? if CONFIRM == "yes": break # Final order print print("Your order is on the way, we'll be there in 45 minutes or you get a refund!") if DELIVERY['type'] == "delivery": # Did they get delivery? print("Delivery to:", DELIVERY['location'], "(Special Instructions:", DELIVERY['special_instructions'] + ")") else: print("Pickup at:", DELIVERY['location']) splitter()
running = True sizes = {'small': [7.58, 0], 'medium': [9.69, 1], 'large': [12.09, 2], 'jumbo': [17.99, 3], 'party': [20.29, 4]} toppings = {'pepperoni': [0, False], 'bacon': [0, True], 'sausage': [0, False], 'mushroom': [1, False], 'black olive': [1, False], 'green pepper': [1, False]} topping_prices = [[1.6, 2.05, 2.35, 3.15, 3.3], [1.95, 2.25, 2.65, 3.49, 3.69]] def ask(question, options, show=True): answer = False o = '' if show: o = ' (' + ', '.join([str(lst).title() for lst in options]) + ')' while True: a = input(question + o + ': ').lower() if a.isdigit(): a = int(a) - 1 if a in range(0, len(options)): a = options[a] if a in options: answer = a break print('Not a valid option, try again!') return answer def splitter(): print('---------------------------------------------------') while running: pizza = {} delivery = {} total = 0 print(' MAKAN PIZZA ') splitter() DELIVERY['type'] = ask('Type of order', ['delivery', 'pickup']) while True: DELIVERY['location'] = input('Location of ' + DELIVERY['type'] + ': ') if DELIVERY['location']: break else: print('Please enter a valid location!') if DELIVERY['type'] == 'delivery': DELIVERY['special_instructions'] = input('Special instructions (Blank for None): ') if not DELIVERY['special_instructions']: DELIVERY['special_instructions'] = 'None' splitter() PIZZA['size'] = ask('Select the size', ['small', 'medium', 'large', 'jumbo', 'party']) PIZZA['dough'] = ask('Select dough type', ['regular', 'whole wheat', 'carbone']) PIZZA['sauce'] = ask('Type of sauce', ['tomato', 'pesto', 'bbq sauce', 'no sauce']) PIZZA['cheese'] = ask('Type of cheese', ['mozzarella', 'cheddar', 'dairy-free', 'no cheese']) splitter() print('Pick your Toppings!', end='') count = -1 for i in TOPPINGS: start = '' if TOPPINGS[i][0] != count: count = TOPPINGS[i][0] print('\n--> ', end='') else: start = ', ' print(start + i.title(), end='') if TOPPINGS[i][1]: print(' (*)', end='') print() print('--> Typing in list will show current toppings.') print('--> Retyping in a topping will remove it.') print("--> Press enter once you're done!") PIZZA['toppings'] = [] while True: top = input('Pick your topping: ') if top == 'list': if not len(PIZZA['toppings']): print('You have no toppings!') else: for i in PIZZA['toppings']: print('--> ', i.title()) elif not top: break else: if top.endswith('s'): top = top[:-1] if top in TOPPINGS: if top in PIZZA['toppings']: print('Topping', top.title(), 'has been removed from your order.') PIZZA['toppings'].remove(top) else: print('Topping', top.title(), 'has been added to your order.') PIZZA['toppings'].append(top) else: print('That topping does not exist!') splitter() print(' MAKAN PIZZA ORDER CONFIRMATION ') splitter() print(PIZZA['size'].title() + ' Pizza (CAD$' + str(SIZES[PIZZA['size']][0]) + ')') total += SIZES[PIZZA['size']][0] print('--> ' + PIZZA['dough'].title() + ' (FREE)') print('--> ' + PIZZA['sauce'].title() + ' (FREE)') print('--> ' + PIZZA['cheese'].title() + ' (FREE)') if PIZZA['toppings']: print('--> Toppings:') for i in PIZZA['toppings']: if TOPPINGS[i][1]: tpp = TOPPING_PRICES[1][SIZES[PIZZA['size']][1]] else: tpp = TOPPING_PRICES[0][SIZES[PIZZA['size']][1]] print(' --> ' + i.title() + ' (CAD$' + format(tpp, '.2f') + ')') total += tpp splitter() print('Sub-Total: CAD$' + format(TOTAL, '.2f')) if DELIVERY['type'] == 'delivery': print('Delivery Fee: CAD$3.50') total += 3.5 tax = round(TOTAL * 0.13, 2) total += TAX print('Tax: CAD$' + format(TAX, '.2f')) print('Total: CAD$' + format(TOTAL, '.2f')) splitter() confirm = ask('Do you wish to confirm this order', ['yes', 'no']) splitter() if CONFIRM == 'yes': break print("Your order is on the way, we'll be there in 45 minutes or you get a refund!") if DELIVERY['type'] == 'delivery': print('Delivery to:', DELIVERY['location'], '(Special Instructions:', DELIVERY['special_instructions'] + ')') else: print('Pickup at:', DELIVERY['location']) splitter()
# # PySNMP MIB module EdgeSwitch-QOS-AUTOVOIP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/EdgeSwitch-QOS-AUTOVOIP-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:10:44 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueSizeConstraint", "SingleValueConstraint") fastPathQOS, = mibBuilder.importSymbols("EdgeSwitch-QOS-MIB", "fastPathQOS") InterfaceIndex, InterfaceIndexOrZero = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex", "InterfaceIndexOrZero") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") NotificationType, TimeTicks, Counter32, ModuleIdentity, iso, Bits, Unsigned32, MibIdentifier, Counter64, ObjectIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, Gauge32, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "TimeTicks", "Counter32", "ModuleIdentity", "iso", "Bits", "Unsigned32", "MibIdentifier", "Counter64", "ObjectIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "Gauge32", "Integer32") DisplayString, RowStatus, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "RowStatus", "TextualConvention") fastPathQOSAUTOVOIP = ModuleIdentity((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4)) fastPathQOSAUTOVOIP.setRevisions(('2012-02-18 00:00', '2011-01-26 00:00', '2007-11-23 00:00', '2007-11-23 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: fastPathQOSAUTOVOIP.setRevisionsDescriptions(('Added OUI based auto VoIP support.', 'Postal address updated.', 'Ubiquiti branding related changes.', 'Initial revision.',)) if mibBuilder.loadTexts: fastPathQOSAUTOVOIP.setLastUpdated('201101260000Z') if mibBuilder.loadTexts: fastPathQOSAUTOVOIP.setOrganization('Broadcom Inc') if mibBuilder.loadTexts: fastPathQOSAUTOVOIP.setContactInfo('') if mibBuilder.loadTexts: fastPathQOSAUTOVOIP.setDescription('The MIB definitions for Quality of Service - VoIP Flex package.') agentAutoVoIPCfgGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1)) agentAutoVoIPVLAN = MibScalar((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: agentAutoVoIPVLAN.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPVLAN.setDescription('The VLAN to which all VoIP traffic is mapped to.') agentAutoVoIPOUIPriority = MibScalar((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: agentAutoVoIPOUIPriority.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPOUIPriority.setDescription('The priority to which all VoIP traffic with known OUI is mapped to.') agentAutoVoIPProtocolPriScheme = MibScalar((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("trafficClass", 1), ("remark", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: agentAutoVoIPProtocolPriScheme.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPProtocolPriScheme.setDescription('The priotization scheme which is used to priritize the voice data. ') agentAutoVoIPProtocolTcOrRemarkValue = MibScalar((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readwrite") if mibBuilder.loadTexts: agentAutoVoIPProtocolTcOrRemarkValue.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPProtocolTcOrRemarkValue.setDescription("If 'agentAutoVoIPProtocolPriScheme' is traffic class, then the object 'agentAutoVoIPProtocolTcOrRemarkValue' is CoS Queue value to which all VoIP traffic is mapped to. if 'agentAutoVoIPProtocolPriScheme' is remark, then the object 'agentAutoVoIPProtocolTcOrRemarkValue' is 802.1p priority to which all VoIP traffic is remarked at the ingress port. This is used by Protocol based Auto VoIP") agentAutoVoIPTable = MibTable((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 5), ) if mibBuilder.loadTexts: agentAutoVoIPTable.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPTable.setDescription('A table providing configuration of Auto VoIP Profile.') agentAutoVoIPEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 5, 1), ).setIndexNames((0, "EdgeSwitch-QOS-AUTOVOIP-MIB", "agentAutoVoIPIntfIndex")) if mibBuilder.loadTexts: agentAutoVoIPEntry.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPEntry.setDescription('Auto VoIP Profile configuration for a port.') agentAutoVoIPIntfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 5, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: agentAutoVoIPIntfIndex.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPIntfIndex.setDescription('This is a unique index for an entry in the agentAutoVoIPTable. A non-zero value indicates the ifIndex for the corresponding interface entry in the ifTable. A value of zero represents global configuration, which in turn causes all interface entries to be updated for a set operation, or reflects the most recent global setting for a get operation.') agentAutoVoIPProtocolMode = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 5, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2))).clone(2)).setMaxAccess("readwrite") if mibBuilder.loadTexts: agentAutoVoIPProtocolMode.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPProtocolMode.setDescription('Enables / disables AutoVoIP Protocol profile on an interface.') agentAutoVoIPOUIMode = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 5, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2))).clone(2)).setMaxAccess("readwrite") if mibBuilder.loadTexts: agentAutoVoIPOUIMode.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPOUIMode.setDescription('Enables / disables AutoVoIP OUI profile on an interface.') agentAutoVoIPProtocolPortStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 5, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("up", 1), ("down", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: agentAutoVoIPProtocolPortStatus.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPProtocolPortStatus.setDescription('AutoVoIP protocol profile operational status of an interface.') agentAutoVoIPOUIPortStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 5, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("up", 1), ("down", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: agentAutoVoIPOUIPortStatus.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPOUIPortStatus.setDescription('AutoVoIP OUI profile operational status of an interface.') agentAutoVoIPOUITable = MibTable((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 6), ) if mibBuilder.loadTexts: agentAutoVoIPOUITable.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPOUITable.setDescription('A table providing configuration of Auto VoIP Profile.') agentAutoVoIPOUIEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 6, 1), ).setIndexNames((0, "EdgeSwitch-QOS-AUTOVOIP-MIB", "agentAutoVoIPOUIIndex")) if mibBuilder.loadTexts: agentAutoVoIPOUIEntry.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPOUIEntry.setDescription('Auto VoIP Profile OUI configuration.') agentAutoVoIPOUIIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 6, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 128))).setMaxAccess("readonly") if mibBuilder.loadTexts: agentAutoVoIPOUIIndex.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPOUIIndex.setDescription('The Auto VoIP OUI table index.') agentAutoVoIPOUI = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 6, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(3, 3)).setFixedLength(3)).setMaxAccess("readwrite") if mibBuilder.loadTexts: agentAutoVoIPOUI.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPOUI.setDescription('The Organizationally Unique Identifier (OUI), as defined in IEEE std 802-2001, is a 24 bit (three octets) globally unique assigned number referenced by various standards, of the information received from the remote system.') agentAutoVoIPOUIDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 6, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: agentAutoVoIPOUIDesc.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPOUIDesc.setDescription('The Description of the Organizationally Unique Identifier (OUI), as defined in IEEE std 802-2001(up to 32 characters)') agentAutoVoIPOUIRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 6, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: agentAutoVoIPOUIRowStatus.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPOUIRowStatus.setDescription('The row status variable is used according to installation and removal conventions for conceptual rows.') agentAutoVoIPSessionTable = MibTable((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 7), ) if mibBuilder.loadTexts: agentAutoVoIPSessionTable.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPSessionTable.setDescription('A table providing configuration of Auto VoIP Profile.') agentAutoVoIPSessionEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 7, 1), ).setIndexNames((0, "EdgeSwitch-QOS-AUTOVOIP-MIB", "agentAutoVoIPSessionIndex")) if mibBuilder.loadTexts: agentAutoVoIPSessionEntry.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPSessionEntry.setDescription('Auto VoIP Session Table.') agentAutoVoIPSessionIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 7, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 127))).setMaxAccess("readonly") if mibBuilder.loadTexts: agentAutoVoIPSessionIndex.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPSessionIndex.setDescription('The Auto VoIP session index.') agentAutoVoIPSourceIP = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 7, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentAutoVoIPSourceIP.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPSourceIP.setDescription('The source IP address of the VoIP session.') agentAutoVoIPDestinationIP = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 7, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentAutoVoIPDestinationIP.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPDestinationIP.setDescription('The destination IP address of the VoIP session.') agentAutoVoIPSourceL4Port = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 7, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentAutoVoIPSourceL4Port.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPSourceL4Port.setDescription('The source L4 Port of the VoIP session.') agentAutoVoIPDestinationL4Port = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 7, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentAutoVoIPDestinationL4Port.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPDestinationL4Port.setDescription('The destination L4 Port of the VoIP session.') agentAutoVoIPProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 7, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentAutoVoIPProtocol.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPProtocol.setDescription('The Protocol of the VoIP session.') mibBuilder.exportSymbols("EdgeSwitch-QOS-AUTOVOIP-MIB", agentAutoVoIPProtocolMode=agentAutoVoIPProtocolMode, agentAutoVoIPOUIMode=agentAutoVoIPOUIMode, agentAutoVoIPProtocol=agentAutoVoIPProtocol, agentAutoVoIPOUIDesc=agentAutoVoIPOUIDesc, agentAutoVoIPDestinationIP=agentAutoVoIPDestinationIP, agentAutoVoIPOUIEntry=agentAutoVoIPOUIEntry, agentAutoVoIPCfgGroup=agentAutoVoIPCfgGroup, agentAutoVoIPEntry=agentAutoVoIPEntry, fastPathQOSAUTOVOIP=fastPathQOSAUTOVOIP, agentAutoVoIPSessionIndex=agentAutoVoIPSessionIndex, agentAutoVoIPSourceL4Port=agentAutoVoIPSourceL4Port, agentAutoVoIPOUIPriority=agentAutoVoIPOUIPriority, agentAutoVoIPOUIIndex=agentAutoVoIPOUIIndex, agentAutoVoIPDestinationL4Port=agentAutoVoIPDestinationL4Port, agentAutoVoIPOUI=agentAutoVoIPOUI, agentAutoVoIPOUIRowStatus=agentAutoVoIPOUIRowStatus, PYSNMP_MODULE_ID=fastPathQOSAUTOVOIP, agentAutoVoIPSessionEntry=agentAutoVoIPSessionEntry, agentAutoVoIPProtocolTcOrRemarkValue=agentAutoVoIPProtocolTcOrRemarkValue, agentAutoVoIPSourceIP=agentAutoVoIPSourceIP, agentAutoVoIPTable=agentAutoVoIPTable, agentAutoVoIPProtocolPriScheme=agentAutoVoIPProtocolPriScheme, agentAutoVoIPSessionTable=agentAutoVoIPSessionTable, agentAutoVoIPOUIPortStatus=agentAutoVoIPOUIPortStatus, agentAutoVoIPOUITable=agentAutoVoIPOUITable, agentAutoVoIPProtocolPortStatus=agentAutoVoIPProtocolPortStatus, agentAutoVoIPIntfIndex=agentAutoVoIPIntfIndex, agentAutoVoIPVLAN=agentAutoVoIPVLAN)
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, constraints_intersection, constraints_union, value_size_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueSizeConstraint', 'SingleValueConstraint') (fast_path_qos,) = mibBuilder.importSymbols('EdgeSwitch-QOS-MIB', 'fastPathQOS') (interface_index, interface_index_or_zero) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex', 'InterfaceIndexOrZero') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (notification_type, time_ticks, counter32, module_identity, iso, bits, unsigned32, mib_identifier, counter64, object_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, gauge32, integer32) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'TimeTicks', 'Counter32', 'ModuleIdentity', 'iso', 'Bits', 'Unsigned32', 'MibIdentifier', 'Counter64', 'ObjectIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'Gauge32', 'Integer32') (display_string, row_status, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'RowStatus', 'TextualConvention') fast_path_qosautovoip = module_identity((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4)) fastPathQOSAUTOVOIP.setRevisions(('2012-02-18 00:00', '2011-01-26 00:00', '2007-11-23 00:00', '2007-11-23 00:00')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: fastPathQOSAUTOVOIP.setRevisionsDescriptions(('Added OUI based auto VoIP support.', 'Postal address updated.', 'Ubiquiti branding related changes.', 'Initial revision.')) if mibBuilder.loadTexts: fastPathQOSAUTOVOIP.setLastUpdated('201101260000Z') if mibBuilder.loadTexts: fastPathQOSAUTOVOIP.setOrganization('Broadcom Inc') if mibBuilder.loadTexts: fastPathQOSAUTOVOIP.setContactInfo('') if mibBuilder.loadTexts: fastPathQOSAUTOVOIP.setDescription('The MIB definitions for Quality of Service - VoIP Flex package.') agent_auto_vo_ip_cfg_group = mib_identifier((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1)) agent_auto_vo_ipvlan = mib_scalar((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 1), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: agentAutoVoIPVLAN.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPVLAN.setDescription('The VLAN to which all VoIP traffic is mapped to.') agent_auto_vo_ipoui_priority = mib_scalar((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 2), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: agentAutoVoIPOUIPriority.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPOUIPriority.setDescription('The priority to which all VoIP traffic with known OUI is mapped to.') agent_auto_vo_ip_protocol_pri_scheme = mib_scalar((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('trafficClass', 1), ('remark', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: agentAutoVoIPProtocolPriScheme.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPProtocolPriScheme.setDescription('The priotization scheme which is used to priritize the voice data. ') agent_auto_vo_ip_protocol_tc_or_remark_value = mib_scalar((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readwrite') if mibBuilder.loadTexts: agentAutoVoIPProtocolTcOrRemarkValue.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPProtocolTcOrRemarkValue.setDescription("If 'agentAutoVoIPProtocolPriScheme' is traffic class, then the object 'agentAutoVoIPProtocolTcOrRemarkValue' is CoS Queue value to which all VoIP traffic is mapped to. if 'agentAutoVoIPProtocolPriScheme' is remark, then the object 'agentAutoVoIPProtocolTcOrRemarkValue' is 802.1p priority to which all VoIP traffic is remarked at the ingress port. This is used by Protocol based Auto VoIP") agent_auto_vo_ip_table = mib_table((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 5)) if mibBuilder.loadTexts: agentAutoVoIPTable.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPTable.setDescription('A table providing configuration of Auto VoIP Profile.') agent_auto_vo_ip_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 5, 1)).setIndexNames((0, 'EdgeSwitch-QOS-AUTOVOIP-MIB', 'agentAutoVoIPIntfIndex')) if mibBuilder.loadTexts: agentAutoVoIPEntry.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPEntry.setDescription('Auto VoIP Profile configuration for a port.') agent_auto_vo_ip_intf_index = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 5, 1, 1), interface_index()) if mibBuilder.loadTexts: agentAutoVoIPIntfIndex.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPIntfIndex.setDescription('This is a unique index for an entry in the agentAutoVoIPTable. A non-zero value indicates the ifIndex for the corresponding interface entry in the ifTable. A value of zero represents global configuration, which in turn causes all interface entries to be updated for a set operation, or reflects the most recent global setting for a get operation.') agent_auto_vo_ip_protocol_mode = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 5, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2))).clone(2)).setMaxAccess('readwrite') if mibBuilder.loadTexts: agentAutoVoIPProtocolMode.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPProtocolMode.setDescription('Enables / disables AutoVoIP Protocol profile on an interface.') agent_auto_vo_ipoui_mode = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 5, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2))).clone(2)).setMaxAccess('readwrite') if mibBuilder.loadTexts: agentAutoVoIPOUIMode.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPOUIMode.setDescription('Enables / disables AutoVoIP OUI profile on an interface.') agent_auto_vo_ip_protocol_port_status = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 5, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('up', 1), ('down', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: agentAutoVoIPProtocolPortStatus.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPProtocolPortStatus.setDescription('AutoVoIP protocol profile operational status of an interface.') agent_auto_vo_ipoui_port_status = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 5, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('up', 1), ('down', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: agentAutoVoIPOUIPortStatus.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPOUIPortStatus.setDescription('AutoVoIP OUI profile operational status of an interface.') agent_auto_vo_ipoui_table = mib_table((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 6)) if mibBuilder.loadTexts: agentAutoVoIPOUITable.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPOUITable.setDescription('A table providing configuration of Auto VoIP Profile.') agent_auto_vo_ipoui_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 6, 1)).setIndexNames((0, 'EdgeSwitch-QOS-AUTOVOIP-MIB', 'agentAutoVoIPOUIIndex')) if mibBuilder.loadTexts: agentAutoVoIPOUIEntry.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPOUIEntry.setDescription('Auto VoIP Profile OUI configuration.') agent_auto_vo_ipoui_index = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 6, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 128))).setMaxAccess('readonly') if mibBuilder.loadTexts: agentAutoVoIPOUIIndex.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPOUIIndex.setDescription('The Auto VoIP OUI table index.') agent_auto_vo_ipoui = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 6, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(3, 3)).setFixedLength(3)).setMaxAccess('readwrite') if mibBuilder.loadTexts: agentAutoVoIPOUI.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPOUI.setDescription('The Organizationally Unique Identifier (OUI), as defined in IEEE std 802-2001, is a 24 bit (three octets) globally unique assigned number referenced by various standards, of the information received from the remote system.') agent_auto_vo_ipoui_desc = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 6, 1, 3), octet_string().subtype(subtypeSpec=value_size_constraint(1, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: agentAutoVoIPOUIDesc.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPOUIDesc.setDescription('The Description of the Organizationally Unique Identifier (OUI), as defined in IEEE std 802-2001(up to 32 characters)') agent_auto_vo_ipoui_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 6, 1, 4), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: agentAutoVoIPOUIRowStatus.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPOUIRowStatus.setDescription('The row status variable is used according to installation and removal conventions for conceptual rows.') agent_auto_vo_ip_session_table = mib_table((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 7)) if mibBuilder.loadTexts: agentAutoVoIPSessionTable.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPSessionTable.setDescription('A table providing configuration of Auto VoIP Profile.') agent_auto_vo_ip_session_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 7, 1)).setIndexNames((0, 'EdgeSwitch-QOS-AUTOVOIP-MIB', 'agentAutoVoIPSessionIndex')) if mibBuilder.loadTexts: agentAutoVoIPSessionEntry.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPSessionEntry.setDescription('Auto VoIP Session Table.') agent_auto_vo_ip_session_index = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 7, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 127))).setMaxAccess('readonly') if mibBuilder.loadTexts: agentAutoVoIPSessionIndex.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPSessionIndex.setDescription('The Auto VoIP session index.') agent_auto_vo_ip_source_ip = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 7, 1, 2), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: agentAutoVoIPSourceIP.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPSourceIP.setDescription('The source IP address of the VoIP session.') agent_auto_vo_ip_destination_ip = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 7, 1, 3), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: agentAutoVoIPDestinationIP.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPDestinationIP.setDescription('The destination IP address of the VoIP session.') agent_auto_vo_ip_source_l4_port = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 7, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: agentAutoVoIPSourceL4Port.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPSourceL4Port.setDescription('The source L4 Port of the VoIP session.') agent_auto_vo_ip_destination_l4_port = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 7, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: agentAutoVoIPDestinationL4Port.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPDestinationL4Port.setDescription('The destination L4 Port of the VoIP session.') agent_auto_vo_ip_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 4413, 1, 1, 3, 4, 1, 7, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: agentAutoVoIPProtocol.setStatus('current') if mibBuilder.loadTexts: agentAutoVoIPProtocol.setDescription('The Protocol of the VoIP session.') mibBuilder.exportSymbols('EdgeSwitch-QOS-AUTOVOIP-MIB', agentAutoVoIPProtocolMode=agentAutoVoIPProtocolMode, agentAutoVoIPOUIMode=agentAutoVoIPOUIMode, agentAutoVoIPProtocol=agentAutoVoIPProtocol, agentAutoVoIPOUIDesc=agentAutoVoIPOUIDesc, agentAutoVoIPDestinationIP=agentAutoVoIPDestinationIP, agentAutoVoIPOUIEntry=agentAutoVoIPOUIEntry, agentAutoVoIPCfgGroup=agentAutoVoIPCfgGroup, agentAutoVoIPEntry=agentAutoVoIPEntry, fastPathQOSAUTOVOIP=fastPathQOSAUTOVOIP, agentAutoVoIPSessionIndex=agentAutoVoIPSessionIndex, agentAutoVoIPSourceL4Port=agentAutoVoIPSourceL4Port, agentAutoVoIPOUIPriority=agentAutoVoIPOUIPriority, agentAutoVoIPOUIIndex=agentAutoVoIPOUIIndex, agentAutoVoIPDestinationL4Port=agentAutoVoIPDestinationL4Port, agentAutoVoIPOUI=agentAutoVoIPOUI, agentAutoVoIPOUIRowStatus=agentAutoVoIPOUIRowStatus, PYSNMP_MODULE_ID=fastPathQOSAUTOVOIP, agentAutoVoIPSessionEntry=agentAutoVoIPSessionEntry, agentAutoVoIPProtocolTcOrRemarkValue=agentAutoVoIPProtocolTcOrRemarkValue, agentAutoVoIPSourceIP=agentAutoVoIPSourceIP, agentAutoVoIPTable=agentAutoVoIPTable, agentAutoVoIPProtocolPriScheme=agentAutoVoIPProtocolPriScheme, agentAutoVoIPSessionTable=agentAutoVoIPSessionTable, agentAutoVoIPOUIPortStatus=agentAutoVoIPOUIPortStatus, agentAutoVoIPOUITable=agentAutoVoIPOUITable, agentAutoVoIPProtocolPortStatus=agentAutoVoIPProtocolPortStatus, agentAutoVoIPIntfIndex=agentAutoVoIPIntfIndex, agentAutoVoIPVLAN=agentAutoVoIPVLAN)
def reverse(my_list): if type(my_list) != list: return f"{my_list} is not a list" elif len(my_list) ==0: return 'list should not be empty' reversed_list = my_list[::-1] return reversed_list if __name__ == "__main__": riddle_index = 0
def reverse(my_list): if type(my_list) != list: return f'{my_list} is not a list' elif len(my_list) == 0: return 'list should not be empty' reversed_list = my_list[::-1] return reversed_list if __name__ == '__main__': riddle_index = 0
class _dafny: def print(value): if type(value) == bool: print("true" if value else "false", end="") elif type(value) == property: print(value.fget(), end="") else: print(value, end="")
class _Dafny: def print(value): if type(value) == bool: print('true' if value else 'false', end='') elif type(value) == property: print(value.fget(), end='') else: print(value, end='')
limit=int(input("enter the limit")) no=int(input("enter the no")) for i in range(1,limit+1,1): multi=no*i print(no,"*",i,"=",multi)
limit = int(input('enter the limit')) no = int(input('enter the no')) for i in range(1, limit + 1, 1): multi = no * i print(no, '*', i, '=', multi)
class Arithmetic: def __init__(self, command): self.text = command def operation(self): return self.text.strip() class MemoryAccess: def __init__(self, command): self.op, self.seg, self.idx = tuple(command.split()) def operation(self): return self.op def segment(self): return self.seg def index(self): return self.idx class ProgramFlow: def __init__(self, command, function): self.op, self.lb = tuple(command.split()) self.func = function def operation(self): return self.op def label(self): return f'{self.func}${self.lb}' class FunctionCall: def __init__(self, command): self.cmd = tuple(command.split()) def operation(self): return self.cmd[0] def func_name(self): return self.cmd[1] def arg_count(self): return int(self.cmd[2])
class Arithmetic: def __init__(self, command): self.text = command def operation(self): return self.text.strip() class Memoryaccess: def __init__(self, command): (self.op, self.seg, self.idx) = tuple(command.split()) def operation(self): return self.op def segment(self): return self.seg def index(self): return self.idx class Programflow: def __init__(self, command, function): (self.op, self.lb) = tuple(command.split()) self.func = function def operation(self): return self.op def label(self): return f'{self.func}${self.lb}' class Functioncall: def __init__(self, command): self.cmd = tuple(command.split()) def operation(self): return self.cmd[0] def func_name(self): return self.cmd[1] def arg_count(self): return int(self.cmd[2])
N = int(input()) pokemons = [] while (N != 0): Name = input() pokemons.append(Name) N-= 1 print('Falta(m) {} pomekon(s).'.format(151 - len(set(pokemons))))
n = int(input()) pokemons = [] while N != 0: name = input() pokemons.append(Name) n -= 1 print('Falta(m) {} pomekon(s).'.format(151 - len(set(pokemons))))
def count_salutes(hallway): count=hallway.count("<") total=0 for i in hallway: count-=i=="<" if i==">": total+=count*2 return total
def count_salutes(hallway): count = hallway.count('<') total = 0 for i in hallway: count -= i == '<' if i == '>': total += count * 2 return total
# Python - 3.6.0 Test.assert_equals(catch_sign_change([1, 3, 4, 5]), 0) Test.assert_equals(catch_sign_change([1, -3, -4, 0, 5]), 2) Test.assert_equals(catch_sign_change([]), 0) Test.assert_equals(catch_sign_change([-47, 84, -30, -11, -5, 74, 77]), 3)
Test.assert_equals(catch_sign_change([1, 3, 4, 5]), 0) Test.assert_equals(catch_sign_change([1, -3, -4, 0, 5]), 2) Test.assert_equals(catch_sign_change([]), 0) Test.assert_equals(catch_sign_change([-47, 84, -30, -11, -5, 74, 77]), 3)
{ 'targets': [ { 'target_name': 'murmurhash3', 'sources': ['src/MurmurHash3.cpp', 'src/node_murmurhash3.cc'], 'cflags': ['-fexceptions'], 'cflags_cc': ['-fexceptions'], 'cflags!': ['-fno-exceptions'], 'cflags_cc!': ['-fno-exception'], "include_dirs" : [ "<!(node -e \"require('nan')\")" ], 'conditions': [ ['OS=="win"', { 'msvs_settings': { 'VCCLCompilerTool': { 'AdditionalOptions': [ '/EHsc' ] } } } ], ['OS=="mac"', { 'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES' } } ] ] } ] }
{'targets': [{'target_name': 'murmurhash3', 'sources': ['src/MurmurHash3.cpp', 'src/node_murmurhash3.cc'], 'cflags': ['-fexceptions'], 'cflags_cc': ['-fexceptions'], 'cflags!': ['-fno-exceptions'], 'cflags_cc!': ['-fno-exception'], 'include_dirs': ['<!(node -e "require(\'nan\')")'], 'conditions': [['OS=="win"', {'msvs_settings': {'VCCLCompilerTool': {'AdditionalOptions': ['/EHsc']}}}], ['OS=="mac"', {'xcode_settings': {'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'}}]]}]}
def create_desktop_file_KDE(): path="/usr/share/applications/klusta_process_manager.desktop" text=["[Desktop Entry]", "Version=0.1", "Name=klusta_process_manager", "Comment=GUI", "Exec=klusta_process_manager", "Icon=eyes", "Terminal=False", "Type=Application", "Categories=Applications;"] with open(path,"w") as f: f.write("\n".join(text)) if __name__=="__main__": print("Create a .desktop file in /usr/share/application") print("Only tested with Linux OpenSuse KDE") print("--------------") try: create_desktop_file_KDE() print("Shortcut created !") except PermissionError: print("Needs admin rights: try 'sudo python create_shortcut.py'")
def create_desktop_file_kde(): path = '/usr/share/applications/klusta_process_manager.desktop' text = ['[Desktop Entry]', 'Version=0.1', 'Name=klusta_process_manager', 'Comment=GUI', 'Exec=klusta_process_manager', 'Icon=eyes', 'Terminal=False', 'Type=Application', 'Categories=Applications;'] with open(path, 'w') as f: f.write('\n'.join(text)) if __name__ == '__main__': print('Create a .desktop file in /usr/share/application') print('Only tested with Linux OpenSuse KDE') print('--------------') try: create_desktop_file_kde() print('Shortcut created !') except PermissionError: print("Needs admin rights: try 'sudo python create_shortcut.py'")
class BinarySearchTreeNode: def __init__(self,data): self.data=data self.left=None self.right=None def add_child(self,data): if data == self.data: return if data <self.data: #add on the left side of the subtree if self.left: self.left.add_child(data) else: self.left = BinarySearchTreeNode(data) else: #add on the right side of the subtree if self.right: self.right.add_child(data) else: self.right = BinarySearchTreeNode(data) def in_order_traversal(self): elements=[] #visits left tree if self.left: elements+=self.left.in_order_traversal() #visits root node elements.append(self.data) #visits right tree if self.right: elements+=self.right.in_order_traversal() return elements def post_traversal(self): elements=[] #visits left tree if self.left: elements+=self.left.post_traversal() #vists right tree if self.right: elements+=self.right.post_traversal() #vists root elements.append(self.data) def pre_traversal(self): elements=[self.data] #visits left tree if self.left: elements+=self.left.append.pre_traversal() #visits right tree if self.right: elements+=self.right.append.pre_traversal() def find_max(self): if self.right is None: return self.data return self.right.find_max() def find_min(self): if self.left is None: return self.data return self.left.find_min() def calculate_sum(self): left_sum = self.left.calculate_sum() if self.left else 0 right_sum = self.right.calculate_sum() if self.right else 0 return self.data + left_sum + right_sum def build_tree(elements): root=BinarySearchTreeNode(elements[0]) for i in range(1,len(elements)): root.add_child(elements[i]) return root if __name__ == '__main__': numbers = [17, 4, 1, 20, 9, 23, 18, 34] numbers = [15,12,7,14,27,20,23,88 ] numbers_tree = build_tree(numbers) print("Input numbers:",numbers) print("Min:",numbers_tree.find_min()) print("Max:",numbers_tree.find_max()) print("Sum:", numbers_tree.calculate_sum()) print("In order traversal:", numbers_tree.in_order_traversal()) print("Pre order traversal:", numbers_tree.pre_traversal()) print("Post order traversal:", numbers_tree.post_traversal())
class Binarysearchtreenode: def __init__(self, data): self.data = data self.left = None self.right = None def add_child(self, data): if data == self.data: return if data < self.data: if self.left: self.left.add_child(data) else: self.left = binary_search_tree_node(data) elif self.right: self.right.add_child(data) else: self.right = binary_search_tree_node(data) def in_order_traversal(self): elements = [] if self.left: elements += self.left.in_order_traversal() elements.append(self.data) if self.right: elements += self.right.in_order_traversal() return elements def post_traversal(self): elements = [] if self.left: elements += self.left.post_traversal() if self.right: elements += self.right.post_traversal() elements.append(self.data) def pre_traversal(self): elements = [self.data] if self.left: elements += self.left.append.pre_traversal() if self.right: elements += self.right.append.pre_traversal() def find_max(self): if self.right is None: return self.data return self.right.find_max() def find_min(self): if self.left is None: return self.data return self.left.find_min() def calculate_sum(self): left_sum = self.left.calculate_sum() if self.left else 0 right_sum = self.right.calculate_sum() if self.right else 0 return self.data + left_sum + right_sum def build_tree(elements): root = binary_search_tree_node(elements[0]) for i in range(1, len(elements)): root.add_child(elements[i]) return root if __name__ == '__main__': numbers = [17, 4, 1, 20, 9, 23, 18, 34] numbers = [15, 12, 7, 14, 27, 20, 23, 88] numbers_tree = build_tree(numbers) print('Input numbers:', numbers) print('Min:', numbers_tree.find_min()) print('Max:', numbers_tree.find_max()) print('Sum:', numbers_tree.calculate_sum()) print('In order traversal:', numbers_tree.in_order_traversal()) print('Pre order traversal:', numbers_tree.pre_traversal()) print('Post order traversal:', numbers_tree.post_traversal())
# -*- coding: utf-8 -*- # Scrapy settings for cosme project # # For simplicity, this file contains only the most important settings by # default. All the other settings are documented here: # # http://doc.scrapy.org/en/latest/topics/settings.html # BOT_NAME = 'cosme' SPIDER_MODULES = ['cosme.spiders'] NEWSPIDER_MODULE = 'cosme.spiders' DOWNLOAD_DELAY = 1.5 COOKIES_ENABLES = False ITEM_PIPELINES = { # 'cosme.pipelines.CosmePipeline': 1, # 'cosme.pipelines.ProductPipeline': 1, 'cosme.pipelines.ProductDetailPipeline': 1, } #---mysql config--- HOST, DB, USER, PWD = '127.0.0.1', 'cosme', 'root', '123456' # Crawl responsibly by identifying yourself (and your website) on the user-agent #USER_AGENT = 'cosme (+http://www.yourdomain.com)'
bot_name = 'cosme' spider_modules = ['cosme.spiders'] newspider_module = 'cosme.spiders' download_delay = 1.5 cookies_enables = False item_pipelines = {'cosme.pipelines.ProductDetailPipeline': 1} (host, db, user, pwd) = ('127.0.0.1', 'cosme', 'root', '123456')
# Time: O(n) # Space: O(h), h is height of binary tree # 129 # Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. # # An example is the root-to-leaf path 1->2->3 which represents the number 123. # # Find the total sum of all root-to-leaf numbers. # # For example, # # 1 # / \ # 2 3 # The root-to-leaf path 1->2 represents the number 12. # The root-to-leaf path 1->3 represents the number 13. # # Return the sum = 12 + 13 = 25. # # Definition for a binary tree node class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: # @param root, a tree node # @return an integer def sumNumbers(self, root: TreeNode) -> int: # USE THIS ans = 0 stack = [(root, 0)] while stack: node, v = stack.pop() if node: if not node.left and not node.right: ans += v*10 + node.val else: stack.append((node.right, v*10+node.val)) stack.append((node.left, v*10+node.val)) return ans def sumNumbers_rec1(self, root): return self.recu(root, 0) def recu(self, root, num): if root is None: return 0 if root.left is None and root.right is None: return num * 10 + root.val return self.recu(root.left, num * 10 + root.val) + self.recu(root.right, num * 10 + root.val) # the following recursion is not very good (use global var, don't leverage return value) def sumNumbers_rec2(self, root: TreeNode) -> int: def dfs(node, v): if node: if not (node.left or node.right): self.ans += v*10 + node.val return dfs(node.left, v*10+node.val) dfs(node.right, v*10+node.val) self.ans = 0 dfs(root, 0) return self.ans if __name__ == "__main__": root = TreeNode(1) root.left = TreeNode(2) root.right = TreeNode(3) root.left.left = TreeNode(4) print(Solution().sumNumbers(root)) # 137
class Treenode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def sum_numbers(self, root: TreeNode) -> int: ans = 0 stack = [(root, 0)] while stack: (node, v) = stack.pop() if node: if not node.left and (not node.right): ans += v * 10 + node.val else: stack.append((node.right, v * 10 + node.val)) stack.append((node.left, v * 10 + node.val)) return ans def sum_numbers_rec1(self, root): return self.recu(root, 0) def recu(self, root, num): if root is None: return 0 if root.left is None and root.right is None: return num * 10 + root.val return self.recu(root.left, num * 10 + root.val) + self.recu(root.right, num * 10 + root.val) def sum_numbers_rec2(self, root: TreeNode) -> int: def dfs(node, v): if node: if not (node.left or node.right): self.ans += v * 10 + node.val return dfs(node.left, v * 10 + node.val) dfs(node.right, v * 10 + node.val) self.ans = 0 dfs(root, 0) return self.ans if __name__ == '__main__': root = tree_node(1) root.left = tree_node(2) root.right = tree_node(3) root.left.left = tree_node(4) print(solution().sumNumbers(root))
task = int(input()) points = int(input()) course = input() if task == 1: if course == 'Basics': points = points * 0.08 - (0.2 * (points * 0.08)) elif course == 'Fundamentals': points = points * 0.11 elif course == 'Advanced': points = points * 0.14 + (0.2 * (points * 0.14)) elif task == 2: if course == 'Basics': points = points * 0.09 elif course == 'Fundamentals': points = points * 0.11 elif course == 'Advanced': points = points * 0.14 + (0.2 * (points * 0.14)) elif task == 3: if course == 'Basics': points = points * 0.09 elif course == 'Fundamentals': points = points * 0.12 elif course == 'Advanced': points = points * 0.15 + (0.2 * (points * 0.15)) elif task == 4: if course == 'Basics': points = points * 0.10 elif course == 'Fundamentals': points = points * 0.13 elif course == 'Advanced': points = points * 0.16 + (0.2 * (points * 0.16)) print(f'Total points: {points:.2f}')
task = int(input()) points = int(input()) course = input() if task == 1: if course == 'Basics': points = points * 0.08 - 0.2 * (points * 0.08) elif course == 'Fundamentals': points = points * 0.11 elif course == 'Advanced': points = points * 0.14 + 0.2 * (points * 0.14) elif task == 2: if course == 'Basics': points = points * 0.09 elif course == 'Fundamentals': points = points * 0.11 elif course == 'Advanced': points = points * 0.14 + 0.2 * (points * 0.14) elif task == 3: if course == 'Basics': points = points * 0.09 elif course == 'Fundamentals': points = points * 0.12 elif course == 'Advanced': points = points * 0.15 + 0.2 * (points * 0.15) elif task == 4: if course == 'Basics': points = points * 0.1 elif course == 'Fundamentals': points = points * 0.13 elif course == 'Advanced': points = points * 0.16 + 0.2 * (points * 0.16) print(f'Total points: {points:.2f}')
# Given a number N, print the odd digits in the number(space seperated) or print -1 if there is no odd digit in the given number. number = int(input('')) array = list(str(number)) flag = 0 for digit in range(0, len(array)-1): if(int(array[digit]) % 2 == 0): print(' ', end='') else: print(array[digit], end='') flag = flag+1 if(int(array[len(array)-1]) % 2 == 0): print('', end='') else: print(int(array[len(array)-1]), end='') if(flag == 0): print(-1)
number = int(input('')) array = list(str(number)) flag = 0 for digit in range(0, len(array) - 1): if int(array[digit]) % 2 == 0: print(' ', end='') else: print(array[digit], end='') flag = flag + 1 if int(array[len(array) - 1]) % 2 == 0: print('', end='') else: print(int(array[len(array) - 1]), end='') if flag == 0: print(-1)
t5_generation_config = { "do_sample": True, "num_beams": 2, "repetition_penalty": 5.0, "length_penalty": 1.0, "num_return_sequences": 1, } GPT2_generation_config = { "do_sample": True, "num_beams": 2, "repetition_penalty": 5.0, "length_penalty": 1.0, }
t5_generation_config = {'do_sample': True, 'num_beams': 2, 'repetition_penalty': 5.0, 'length_penalty': 1.0, 'num_return_sequences': 1} gpt2_generation_config = {'do_sample': True, 'num_beams': 2, 'repetition_penalty': 5.0, 'length_penalty': 1.0}
while True: number = int(input('Enter a number: ')) while number != 1: if number % 2 == 0: number //= 2 else: number = number * 3 + 1 print(number) print()
while True: number = int(input('Enter a number: ')) while number != 1: if number % 2 == 0: number //= 2 else: number = number * 3 + 1 print(number) print()
#Conditional if x = 22 y = 100 if y < x: print("This is True, y is not greater than x!") elif y == x: print("This is True, y is greater than x!") else: print("Anything else!") print("Completed")
x = 22 y = 100 if y < x: print('This is True, y is not greater than x!') elif y == x: print('This is True, y is greater than x!') else: print('Anything else!') print('Completed')
#import sys #sys.stdin = open('rectangles.in', 'r') #sys.stdout = open('rectangles.out', 'w') n, m, k = map(int, input().split()) a = [[100000, 0, 100000, 0] for i in range(k)] field = [] for i in range(n): field.append(list(map(int, input().split()))) field.reverse() for i in range(n): for j in range(m): if field[i][j] > 0: v = field[i][j] - 1 a[v][0] = min(a[v][0], j) a[v][1] = max(a[v][1], j) a[v][2] = min(a[v][2], i) a[v][3] = max(a[v][3], i) for i in range(k): print(a[i][0], a[i][2], a[i][1] + 1, a[i][3] + 1)
(n, m, k) = map(int, input().split()) a = [[100000, 0, 100000, 0] for i in range(k)] field = [] for i in range(n): field.append(list(map(int, input().split()))) field.reverse() for i in range(n): for j in range(m): if field[i][j] > 0: v = field[i][j] - 1 a[v][0] = min(a[v][0], j) a[v][1] = max(a[v][1], j) a[v][2] = min(a[v][2], i) a[v][3] = max(a[v][3], i) for i in range(k): print(a[i][0], a[i][2], a[i][1] + 1, a[i][3] + 1)
def _cc_injected_toolchain_header_library_impl(ctx): hdrs = ctx.files.hdrs transitive_cc_infos = [dep[CcInfo] for dep in ctx.attr.deps] compilation_ctx = cc_common.create_compilation_context(headers = depset(hdrs)) info = cc_common.merge_cc_infos( cc_infos = transitive_cc_infos + [CcInfo(compilation_context = compilation_ctx)], ) return [info, DefaultInfo(files = depset(hdrs))] cc_injected_toolchain_header_library = rule( _cc_injected_toolchain_header_library_impl, attrs = { "hdrs": attr.label_list( doc = "A list of headers to be included into a toolchain implicitly using -include", allow_files = True, ), "deps": attr.label_list( doc = "list of injected header libraries that this target depends on", providers = [CcInfo], ), }, provides = [CcInfo], ) def _cc_toolchain_header_polyfill_library_impl(ctx): hdrs = ctx.files.hdrs system_includes = [ctx.label.package + "/" + inc for inc in ctx.attr.system_includes] + [ctx.label.workspace_root] transitive_cc_infos = [dep[CcInfo] for dep in ctx.attr.deps] compilation_ctx = cc_common.create_compilation_context(headers = depset(hdrs), system_includes = depset(system_includes)) info = cc_common.merge_cc_infos(cc_infos = transitive_cc_infos + [CcInfo(compilation_context = compilation_ctx)]) return [info, DefaultInfo(files = depset(hdrs, transitive = [info.compilation_context.headers]))] cc_polyfill_toolchain_library = rule( _cc_toolchain_header_polyfill_library_impl, attrs = { "hdrs": attr.label_list( doc = "A list of headers to be included into the toolchains system libraries", allow_files = True, ), "system_includes": attr.string_list( doc = "A list of directories to be included when the toolchain searches for headers", ), "deps": attr.label_list( doc = "list of injected header libraries that this target depends on", providers = [CcInfo], ), }, )
def _cc_injected_toolchain_header_library_impl(ctx): hdrs = ctx.files.hdrs transitive_cc_infos = [dep[CcInfo] for dep in ctx.attr.deps] compilation_ctx = cc_common.create_compilation_context(headers=depset(hdrs)) info = cc_common.merge_cc_infos(cc_infos=transitive_cc_infos + [cc_info(compilation_context=compilation_ctx)]) return [info, default_info(files=depset(hdrs))] cc_injected_toolchain_header_library = rule(_cc_injected_toolchain_header_library_impl, attrs={'hdrs': attr.label_list(doc='A list of headers to be included into a toolchain implicitly using -include', allow_files=True), 'deps': attr.label_list(doc='list of injected header libraries that this target depends on', providers=[CcInfo])}, provides=[CcInfo]) def _cc_toolchain_header_polyfill_library_impl(ctx): hdrs = ctx.files.hdrs system_includes = [ctx.label.package + '/' + inc for inc in ctx.attr.system_includes] + [ctx.label.workspace_root] transitive_cc_infos = [dep[CcInfo] for dep in ctx.attr.deps] compilation_ctx = cc_common.create_compilation_context(headers=depset(hdrs), system_includes=depset(system_includes)) info = cc_common.merge_cc_infos(cc_infos=transitive_cc_infos + [cc_info(compilation_context=compilation_ctx)]) return [info, default_info(files=depset(hdrs, transitive=[info.compilation_context.headers]))] cc_polyfill_toolchain_library = rule(_cc_toolchain_header_polyfill_library_impl, attrs={'hdrs': attr.label_list(doc='A list of headers to be included into the toolchains system libraries', allow_files=True), 'system_includes': attr.string_list(doc='A list of directories to be included when the toolchain searches for headers'), 'deps': attr.label_list(doc='list of injected header libraries that this target depends on', providers=[CcInfo])})
# # PySNMP MIB module TRAPEZE-NETWORKS-REGISTRATION-DEVICES-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TRAPEZE-NETWORKS-REGISTRATION-DEVICES-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:27:22 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsUnion", "SingleValueConstraint") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Unsigned32, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, Counter32, Counter64, Gauge32, MibIdentifier, IpAddress, TimeTicks, ObjectIdentity, NotificationType, Bits, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "Counter32", "Counter64", "Gauge32", "MibIdentifier", "IpAddress", "TimeTicks", "ObjectIdentity", "NotificationType", "Bits", "Integer32") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") trpzRegistration, = mibBuilder.importSymbols("TRAPEZE-NETWORKS-ROOT-MIB", "trpzRegistration") trpzRegistrationDevicesMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 14525, 3, 6)) trpzRegistrationDevicesMib.setRevisions(('2011-08-09 00:32', '2011-03-08 00:22', '2010-12-02 00:11', '2009-12-18 00:10', '2007-11-30 00:01', '2007-08-22 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: trpzRegistrationDevicesMib.setRevisionsDescriptions(('v1.4.2: added switch models WLC8, WLC2, WLC800R, WLC2800. (This was first published in 7.3 MR4 release.)', 'v1.3.2: added switch model WLC880R (This will be published in 7.5 release.)', 'v1.2.1: Revision history correction for v1.2: switch model MX-800 was introduced in 7.3 release.', 'v1.2: added switch model MX-800.', 'v1.1: added switch model MX-2800 (This will be published in 7.0 release.)', 'v1.0: initial version, published in 6.2 release',)) if mibBuilder.loadTexts: trpzRegistrationDevicesMib.setLastUpdated('201108090032Z') if mibBuilder.loadTexts: trpzRegistrationDevicesMib.setOrganization('Trapeze Networks') if mibBuilder.loadTexts: trpzRegistrationDevicesMib.setContactInfo('Trapeze Networks Technical Support www.trapezenetworks.com US: 866.TRPZ.TAC International: 925.474.2400 [email protected]') if mibBuilder.loadTexts: trpzRegistrationDevicesMib.setDescription("The MIB module for Trapeze Networks wireless device OID registrations. Copyright 2007-2011 Trapeze Networks, Inc. All rights reserved. This Trapeze Networks SNMP Management Information Base Specification (Specification) embodies Trapeze Networks' confidential and proprietary intellectual property. Trapeze Networks retains all title and ownership in the Specification, including any revisions. This Specification is supplied 'AS IS' and Trapeze Networks makes no warranty, either express or implied, as to the use, operation, condition, or performance of the Specification.") mobilityExchange = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 1)) mobilityExchange20 = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 1, 1)) mobilityExchange8 = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 1, 2)) mobilityExchange400 = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 1, 3)) mobilityExchangeR2 = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 1, 4)) mobilityExchange216 = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 1, 6)) mobilityExchange200 = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 1, 7)) mobilityExchange2800 = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 1, 12)) mobilityExchange800 = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 1, 13)) mobilityPoint = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 2)) mobilityPoint101 = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 2, 1)) mobilityPoint122 = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 2, 2)) mobilityPoint241 = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 2, 3)) mobilityPoint252 = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 2, 4)) wirelessLANController = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 3)) wirelessLANController880R = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 3, 1)) wirelessLANController8 = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 3, 2)) wirelessLANController2 = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 3, 3)) wirelessLANController800r = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 3, 4)) wirelessLANController2800 = MibIdentifier((1, 3, 6, 1, 4, 1, 14525, 3, 3, 5)) mibBuilder.exportSymbols("TRAPEZE-NETWORKS-REGISTRATION-DEVICES-MIB", mobilityExchange2800=mobilityExchange2800, mobilityExchange8=mobilityExchange8, wirelessLANController880R=wirelessLANController880R, wirelessLANController800r=wirelessLANController800r, mobilityPoint101=mobilityPoint101, wirelessLANController2800=wirelessLANController2800, mobilityPoint241=mobilityPoint241, mobilityExchange20=mobilityExchange20, wirelessLANController2=wirelessLANController2, mobilityPoint122=mobilityPoint122, mobilityExchange800=mobilityExchange800, mobilityExchange400=mobilityExchange400, mobilityPoint252=mobilityPoint252, mobilityExchange=mobilityExchange, mobilityPoint=mobilityPoint, mobilityExchange216=mobilityExchange216, mobilityExchangeR2=mobilityExchangeR2, PYSNMP_MODULE_ID=trpzRegistrationDevicesMib, mobilityExchange200=mobilityExchange200, wirelessLANController8=wirelessLANController8, wirelessLANController=wirelessLANController, trpzRegistrationDevicesMib=trpzRegistrationDevicesMib)
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, value_size_constraint, value_range_constraint, constraints_union, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'SingleValueConstraint') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (unsigned32, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, module_identity, counter32, counter64, gauge32, mib_identifier, ip_address, time_ticks, object_identity, notification_type, bits, integer32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Unsigned32', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ModuleIdentity', 'Counter32', 'Counter64', 'Gauge32', 'MibIdentifier', 'IpAddress', 'TimeTicks', 'ObjectIdentity', 'NotificationType', 'Bits', 'Integer32') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') (trpz_registration,) = mibBuilder.importSymbols('TRAPEZE-NETWORKS-ROOT-MIB', 'trpzRegistration') trpz_registration_devices_mib = module_identity((1, 3, 6, 1, 4, 1, 14525, 3, 6)) trpzRegistrationDevicesMib.setRevisions(('2011-08-09 00:32', '2011-03-08 00:22', '2010-12-02 00:11', '2009-12-18 00:10', '2007-11-30 00:01', '2007-08-22 00:00')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: trpzRegistrationDevicesMib.setRevisionsDescriptions(('v1.4.2: added switch models WLC8, WLC2, WLC800R, WLC2800. (This was first published in 7.3 MR4 release.)', 'v1.3.2: added switch model WLC880R (This will be published in 7.5 release.)', 'v1.2.1: Revision history correction for v1.2: switch model MX-800 was introduced in 7.3 release.', 'v1.2: added switch model MX-800.', 'v1.1: added switch model MX-2800 (This will be published in 7.0 release.)', 'v1.0: initial version, published in 6.2 release')) if mibBuilder.loadTexts: trpzRegistrationDevicesMib.setLastUpdated('201108090032Z') if mibBuilder.loadTexts: trpzRegistrationDevicesMib.setOrganization('Trapeze Networks') if mibBuilder.loadTexts: trpzRegistrationDevicesMib.setContactInfo('Trapeze Networks Technical Support www.trapezenetworks.com US: 866.TRPZ.TAC International: 925.474.2400 [email protected]') if mibBuilder.loadTexts: trpzRegistrationDevicesMib.setDescription("The MIB module for Trapeze Networks wireless device OID registrations. Copyright 2007-2011 Trapeze Networks, Inc. All rights reserved. This Trapeze Networks SNMP Management Information Base Specification (Specification) embodies Trapeze Networks' confidential and proprietary intellectual property. Trapeze Networks retains all title and ownership in the Specification, including any revisions. This Specification is supplied 'AS IS' and Trapeze Networks makes no warranty, either express or implied, as to the use, operation, condition, or performance of the Specification.") mobility_exchange = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 1)) mobility_exchange20 = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 1, 1)) mobility_exchange8 = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 1, 2)) mobility_exchange400 = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 1, 3)) mobility_exchange_r2 = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 1, 4)) mobility_exchange216 = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 1, 6)) mobility_exchange200 = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 1, 7)) mobility_exchange2800 = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 1, 12)) mobility_exchange800 = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 1, 13)) mobility_point = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 2)) mobility_point101 = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 2, 1)) mobility_point122 = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 2, 2)) mobility_point241 = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 2, 3)) mobility_point252 = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 2, 4)) wireless_lan_controller = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 3)) wireless_lan_controller880_r = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 3, 1)) wireless_lan_controller8 = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 3, 2)) wireless_lan_controller2 = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 3, 3)) wireless_lan_controller800r = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 3, 4)) wireless_lan_controller2800 = mib_identifier((1, 3, 6, 1, 4, 1, 14525, 3, 3, 5)) mibBuilder.exportSymbols('TRAPEZE-NETWORKS-REGISTRATION-DEVICES-MIB', mobilityExchange2800=mobilityExchange2800, mobilityExchange8=mobilityExchange8, wirelessLANController880R=wirelessLANController880R, wirelessLANController800r=wirelessLANController800r, mobilityPoint101=mobilityPoint101, wirelessLANController2800=wirelessLANController2800, mobilityPoint241=mobilityPoint241, mobilityExchange20=mobilityExchange20, wirelessLANController2=wirelessLANController2, mobilityPoint122=mobilityPoint122, mobilityExchange800=mobilityExchange800, mobilityExchange400=mobilityExchange400, mobilityPoint252=mobilityPoint252, mobilityExchange=mobilityExchange, mobilityPoint=mobilityPoint, mobilityExchange216=mobilityExchange216, mobilityExchangeR2=mobilityExchangeR2, PYSNMP_MODULE_ID=trpzRegistrationDevicesMib, mobilityExchange200=mobilityExchange200, wirelessLANController8=wirelessLANController8, wirelessLANController=wirelessLANController, trpzRegistrationDevicesMib=trpzRegistrationDevicesMib)
class Solution: def searchMatrix(self, matrix, target): i = 0 m = len(matrix) while i < m and matrix[i][0] <= target: i = i + 1 i = i - 1 return target in matrix[i] if __name__ == '__main__': matrix = [[1]] target = 1 ans = Solution().searchMatrix(matrix, target) print(ans)
class Solution: def search_matrix(self, matrix, target): i = 0 m = len(matrix) while i < m and matrix[i][0] <= target: i = i + 1 i = i - 1 return target in matrix[i] if __name__ == '__main__': matrix = [[1]] target = 1 ans = solution().searchMatrix(matrix, target) print(ans)
# Basic type checking: no types necessary x = 3 x + 'a' def return_type() -> float: return 'a' return_type(9) def argument_type(x: float): return argument_type()
x = 3 x + 'a' def return_type() -> float: return 'a' return_type(9) def argument_type(x: float): return argument_type()
def sudoku(board, rows, columns): return helper(board, 0, 0, columns, rows) def helper(board, r, c, rows, columns): def inbound(r, c): return (0 <= r < rows) and (0 <= c < columns) # Out of bounds: # We filled all blank cells and, thus, a valid solution if not inbound(r, c): return True nr, nc = next_pos(r, c, rows, columns) if board[r][c] != 0: # This is a pre-filled cell, so skip # for the next one return helper(board, nr, nc, rows, columns) for i in range(1, 10): if valid_placement(board, r, c, rows, columns, i): # "i" can be place in the cell without breaking # the sudoku rules. So, it's a canditate for solution. # Mark the cell with the value and try to solve # recursively for the remaining blank cells board[r][c] = i if helper(board, nr, nc, rows, columns): return True else: # No solution found for the search branch: # reset the cell for the future attemps board[r][c] = 0 return False def next_pos(r, c, rows, columns): if c + 1 == columns: return (r + 1, 0) else: return (r, c + 1) def valid_placement(board, r, c, rows, columns, v): # Check conflict with row if v in board[r]: return False # Check conflict with column for i in range(0, rows): if v == board[i][c]: return False # Check conflict with the subgrid row_offset = r - r % 3 col_offset = c - c % 3 for i in range(3): for j in range(3): if board[i + row_offset][j + col_offset] == v: return False return True
def sudoku(board, rows, columns): return helper(board, 0, 0, columns, rows) def helper(board, r, c, rows, columns): def inbound(r, c): return 0 <= r < rows and 0 <= c < columns if not inbound(r, c): return True (nr, nc) = next_pos(r, c, rows, columns) if board[r][c] != 0: return helper(board, nr, nc, rows, columns) for i in range(1, 10): if valid_placement(board, r, c, rows, columns, i): board[r][c] = i if helper(board, nr, nc, rows, columns): return True else: board[r][c] = 0 return False def next_pos(r, c, rows, columns): if c + 1 == columns: return (r + 1, 0) else: return (r, c + 1) def valid_placement(board, r, c, rows, columns, v): if v in board[r]: return False for i in range(0, rows): if v == board[i][c]: return False row_offset = r - r % 3 col_offset = c - c % 3 for i in range(3): for j in range(3): if board[i + row_offset][j + col_offset] == v: return False return True
'''Print multiplication table of given number''' n=int(input("Enter the no:")) print("Multiplication table is:") for i in range(1,11): print(i*n)
"""Print multiplication table of given number""" n = int(input('Enter the no:')) print('Multiplication table is:') for i in range(1, 11): print(i * n)
# CONVERT DB_DATA TO STRING FOR SELF-MESSAGE def format_to_writeable_db_data(db_data: list) -> str: writeable_data = "" for user in db_data: listed_mangoes = "" for manga in user['mangoes']: listed_mangoes += f"{manga}>(u*u)>" writeable_data = f"{writeable_data}{user['name']}:{listed_mangoes}\n" return writeable_data # ADD OR REMOVE SUBSCRIPTION BASED ON MESSAGE def update(db_data: list, messages: list, conf: dict) -> list: for message in messages: if message.subject.lower() == conf['UNSUB_MESSAGE_SUBJECT']: db_data = _update_unsubscribe(db_data, message) elif message.subject.lower() == conf['SUB_MESSAGE_SUBJECT']: db_data = _update_subscribe(db_data, message) db_data = _remove_users_with_no_subscriptions(db_data) return db_data # DONT KEEP TRACK OF USERS WHEN THEY HAVE 0 SUBSCRIPTIONS def _remove_users_with_no_subscriptions(db_data: list) -> list: remove_users = [] for user in db_data: if user['mangoes'] is None or len(user['mangoes']) == 0: remove_users.append(user) db_data = [x for x in db_data if x not in remove_users] return db_data # ADD NEWLY SUBSCRIBED MANGA TO USER OR NEW USER def _update_subscribe(db_data: list, message: dict) -> list: lines = message.body.splitlines() for user in db_data: if user['name'] == message.author.name: for line in lines: if line not in user['mangoes']: user['mangoes'].append(line) return db_data db_data.append({'name': message.author.name, 'mangoes': lines}) return db_data # REMOVE NEWLY UNSUBSCRIBED MANGA FROM USER def _update_unsubscribe(db_data: list, message: dict) -> list: print("unsubscribing") for user in db_data: if user['name'] == message.author.name: lines = message.body.splitlines() user['mangoes'] = [x for x in user['mangoes'] if x not in lines ] break return db_data # INIT DB_DATA BASED ON SELF-MESSAGE def init_db(message: str) -> list: db_data = [] lines = message.splitlines() for line in lines: var_break = line.find(':') db_data.append({'name': line[:var_break], 'mangoes': line[var_break+1:].split('>(u*u)>')[:-1]}) return db_data
def format_to_writeable_db_data(db_data: list) -> str: writeable_data = '' for user in db_data: listed_mangoes = '' for manga in user['mangoes']: listed_mangoes += f'{manga}>(u*u)>' writeable_data = f"{writeable_data}{user['name']}:{listed_mangoes}\n" return writeable_data def update(db_data: list, messages: list, conf: dict) -> list: for message in messages: if message.subject.lower() == conf['UNSUB_MESSAGE_SUBJECT']: db_data = _update_unsubscribe(db_data, message) elif message.subject.lower() == conf['SUB_MESSAGE_SUBJECT']: db_data = _update_subscribe(db_data, message) db_data = _remove_users_with_no_subscriptions(db_data) return db_data def _remove_users_with_no_subscriptions(db_data: list) -> list: remove_users = [] for user in db_data: if user['mangoes'] is None or len(user['mangoes']) == 0: remove_users.append(user) db_data = [x for x in db_data if x not in remove_users] return db_data def _update_subscribe(db_data: list, message: dict) -> list: lines = message.body.splitlines() for user in db_data: if user['name'] == message.author.name: for line in lines: if line not in user['mangoes']: user['mangoes'].append(line) return db_data db_data.append({'name': message.author.name, 'mangoes': lines}) return db_data def _update_unsubscribe(db_data: list, message: dict) -> list: print('unsubscribing') for user in db_data: if user['name'] == message.author.name: lines = message.body.splitlines() user['mangoes'] = [x for x in user['mangoes'] if x not in lines] break return db_data def init_db(message: str) -> list: db_data = [] lines = message.splitlines() for line in lines: var_break = line.find(':') db_data.append({'name': line[:var_break], 'mangoes': line[var_break + 1:].split('>(u*u)>')[:-1]}) return db_data
class SuperList(list): def __len__(self): return 1000 super_list1 = SuperList() print((len(super_list1))) super_list1.append(5) print(super_list1[0]) print(issubclass(SuperList, list)) # true print(issubclass(list, object))
class Superlist(list): def __len__(self): return 1000 super_list1 = super_list() print(len(super_list1)) super_list1.append(5) print(super_list1[0]) print(issubclass(SuperList, list)) print(issubclass(list, object))
def reverse(SA): reverse = [0] * len(SA) for i in range(len(SA)): reverse[SA[i] - 1] = i + 1 return reverse def prefix_doubling(text, n): '''Computes suffix array using Karp-Miller-Rosenberg algorithm''' text += '$' mapping = {v: i + 1 for i, v in enumerate(sorted(set(text[1:])))} R, k = [mapping[v] for v in text[1:]], 1 while k < 2 * n: pairs = [(R[i], R[i + k] if i + k < len(R) else 0) for i in range(len(R))] mapping = {v: i + 1 for i, v in enumerate(sorted(set(pairs)))} R, k = [mapping[pair] for pair in pairs], 2 * k return reverse(R)
def reverse(SA): reverse = [0] * len(SA) for i in range(len(SA)): reverse[SA[i] - 1] = i + 1 return reverse def prefix_doubling(text, n): """Computes suffix array using Karp-Miller-Rosenberg algorithm""" text += '$' mapping = {v: i + 1 for (i, v) in enumerate(sorted(set(text[1:])))} (r, k) = ([mapping[v] for v in text[1:]], 1) while k < 2 * n: pairs = [(R[i], R[i + k] if i + k < len(R) else 0) for i in range(len(R))] mapping = {v: i + 1 for (i, v) in enumerate(sorted(set(pairs)))} (r, k) = ([mapping[pair] for pair in pairs], 2 * k) return reverse(R)
N, M = map(int, input().split()) case = [i for i in range(1, N+1)] disk = [] for _ in range(M): disk.append(int(input())) now = 0 for d in disk: if d == now: continue i = case.index(d) tmp = case[i] case[i] = now now = tmp for c in case: print(c)
(n, m) = map(int, input().split()) case = [i for i in range(1, N + 1)] disk = [] for _ in range(M): disk.append(int(input())) now = 0 for d in disk: if d == now: continue i = case.index(d) tmp = case[i] case[i] = now now = tmp for c in case: print(c)
def maximum(): A = input('Enter the 1st number:') B = input('Enter the 2nd number:') if A > B: print("%d The highest num than %d"%(A,B)) else: print('The highest num is:' ,B) print("Optised max",max(A,B)) def minimum(): A1 = input('Enter the 1st number:') B1 = input('Enter the 2nd number:') C1 = input('Enter the 3rd number:') print("Optimised min " ,min(A1,B1,C1)) if(A1<B1) and (A1<C1): print("Smallest number is",A1) else : if(B1 <C1): print("Smallest number is ",B1) else : print("Smallest number is ", C1) def main(): print("Enter your choice") print("1.Max of 2 numbers") print("2.Min of 3 numbers") choice=input("Enter your choice") if(choice == 1): maximum() else : minimum() main()
def maximum(): a = input('Enter the 1st number:') b = input('Enter the 2nd number:') if A > B: print('%d The highest num than %d' % (A, B)) else: print('The highest num is:', B) print('Optised max', max(A, B)) def minimum(): a1 = input('Enter the 1st number:') b1 = input('Enter the 2nd number:') c1 = input('Enter the 3rd number:') print('Optimised min ', min(A1, B1, C1)) if A1 < B1 and A1 < C1: print('Smallest number is', A1) elif B1 < C1: print('Smallest number is ', B1) else: print('Smallest number is ', C1) def main(): print('Enter your choice') print('1.Max of 2 numbers') print('2.Min of 3 numbers') choice = input('Enter your choice') if choice == 1: maximum() else: minimum() main()
stores = [] command = input() while command != 'END': tokens = command.split('->') store_name = tokens[1] if tokens[0] == 'Add': items = tokens[2].split(',') if len([x for x in stores if x[0] == store_name]) > 0: idx = stores.index([x for x in stores if x[0] == store_name][0]) stores[idx][1].extend(items) else: stores.append([store_name, items]) elif tokens[0] == 'Remove': if len([x for x in stores if x[0] == store_name]) > 0: idx = stores.index([x for x in stores if x[0] == store_name][0]) del stores[idx] command = input() sorted_stores = sorted(stores, key=lambda x: (len(x[1]), x[0]), reverse=True) print('Stores list:') for store in sorted_stores: store_name = store[0] items = store[1] print(store_name) for item in items: print(f'<<{item}>>')
stores = [] command = input() while command != 'END': tokens = command.split('->') store_name = tokens[1] if tokens[0] == 'Add': items = tokens[2].split(',') if len([x for x in stores if x[0] == store_name]) > 0: idx = stores.index([x for x in stores if x[0] == store_name][0]) stores[idx][1].extend(items) else: stores.append([store_name, items]) elif tokens[0] == 'Remove': if len([x for x in stores if x[0] == store_name]) > 0: idx = stores.index([x for x in stores if x[0] == store_name][0]) del stores[idx] command = input() sorted_stores = sorted(stores, key=lambda x: (len(x[1]), x[0]), reverse=True) print('Stores list:') for store in sorted_stores: store_name = store[0] items = store[1] print(store_name) for item in items: print(f'<<{item}>>')
# This is a great place to put your bot's version number. __version__ = "0.1.0" # You'll want to change this. GUILD_ID = 845688627265536010
__version__ = '0.1.0' guild_id = 845688627265536010
#dictionary and for statements with values method linguagens = { 'lea': 'python', 'sara': 'c', 'eddie': 'java', 'phil': 'python', } for linguagem in linguagens.values(): #values method shows us the values of a dictionary print(linguagem.title())
linguagens = {'lea': 'python', 'sara': 'c', 'eddie': 'java', 'phil': 'python'} for linguagem in linguagens.values(): print(linguagem.title())
class EmitterTypeError(Exception): pass class EmitterValidationError(Exception): pass
class Emittertypeerror(Exception): pass class Emittervalidationerror(Exception): pass
class BSTNode(): def __init__(self, Key, Value=None): self.key = Key self.Value = Value self.left = None self.right = None self.parent = None @staticmethod def remove_none(lst): return [x for x in lst if x is not None] def check_BSTNode(self): if self is None: return True, None, None is_BSTNode_l, max_l, min_l = BSTNode.check_BSTNode(self.left) is_BSTNode_r, max_r, min_r = BSTNode.check_BSTNode(self.right) is_BSTNode = (is_BSTNode_l and is_BSTNode_r and (max_l is None or max_l < self.key) and ( min_l is None or min_r > self.key)) min_key = min(BSTNode.remove_none([min_l, self.key, min_r])) max_key = max(BSTNode.remove_none([max_l, self.key, max_r])) return is_BSTNode, max_key, min_key def display(self, lvl=0): if self is None: return if self.right is None and self.left is None: print("\t" * lvl + str(self.key)) return BSTNode.display(self.right, lvl + 1) print("\t" * lvl + str(self.key)) BSTNode.display(self.left, lvl + 1) @staticmethod def parse(data): if isinstance(data, tuple) and len(data) == 3: node = BSTNode(data[1]) node.left = BSTNode.parse(data[0]) node.right = BSTNode.parse(data[2]) node.left.parent = node node.right.parent = node elif data is None: node = None else: node = BSTNode(data) return node def insert(self, key, value=None): if self is None: self = BSTNode(key, value) elif self.key > key: self.left = BSTNode.insert(self.left, key, value) self.left.parent = self elif self.key < key: self.right = BSTNode.insert(self.right, key, value) self.right.parent = self return self def find(self, key): if self is None: return False elif self.key == key: return True elif self.key<key: return BSTNode.find(self.right, key) else: return BSTNode.find(self.left, key) if __name__ == "__main__": print(f"Input Range :") k = BSTNode.insert(None, 7) k.insert(1) k.insert(9) k.insert(4) k.insert(10) k.insert(8) k.display() print(f"\n\n Find- { k.find(0) }")
class Bstnode: def __init__(self, Key, Value=None): self.key = Key self.Value = Value self.left = None self.right = None self.parent = None @staticmethod def remove_none(lst): return [x for x in lst if x is not None] def check_bst_node(self): if self is None: return (True, None, None) (is_bst_node_l, max_l, min_l) = BSTNode.check_BSTNode(self.left) (is_bst_node_r, max_r, min_r) = BSTNode.check_BSTNode(self.right) is_bst_node = is_BSTNode_l and is_BSTNode_r and (max_l is None or max_l < self.key) and (min_l is None or min_r > self.key) min_key = min(BSTNode.remove_none([min_l, self.key, min_r])) max_key = max(BSTNode.remove_none([max_l, self.key, max_r])) return (is_BSTNode, max_key, min_key) def display(self, lvl=0): if self is None: return if self.right is None and self.left is None: print('\t' * lvl + str(self.key)) return BSTNode.display(self.right, lvl + 1) print('\t' * lvl + str(self.key)) BSTNode.display(self.left, lvl + 1) @staticmethod def parse(data): if isinstance(data, tuple) and len(data) == 3: node = bst_node(data[1]) node.left = BSTNode.parse(data[0]) node.right = BSTNode.parse(data[2]) node.left.parent = node node.right.parent = node elif data is None: node = None else: node = bst_node(data) return node def insert(self, key, value=None): if self is None: self = bst_node(key, value) elif self.key > key: self.left = BSTNode.insert(self.left, key, value) self.left.parent = self elif self.key < key: self.right = BSTNode.insert(self.right, key, value) self.right.parent = self return self def find(self, key): if self is None: return False elif self.key == key: return True elif self.key < key: return BSTNode.find(self.right, key) else: return BSTNode.find(self.left, key) if __name__ == '__main__': print(f'Input Range :') k = BSTNode.insert(None, 7) k.insert(1) k.insert(9) k.insert(4) k.insert(10) k.insert(8) k.display() print(f'\n\n Find- {k.find(0)}')
LSM9DS1_MAG_ADDRESS = 0x1C #Would be 0x1E if SDO_M is HIGH LSM9DS1_ACC_ADDRESS = 0x6A LSM9DS1_GYR_ADDRESS = 0x6A #Would be 0x6B if SDO_AG is HIGH #///////////////////////////////////////// #// LSM9DS1 Accel/Gyro (XL/G) Registers // #///////////////////////////////////////// LSM9DS1_ACT_THS = 0x04 LSM9DS1_ACT_DUR = 0x05 LSM9DS1_INT_GEN_CFG_XL = 0x06 LSM9DS1_INT_GEN_THS_X_XL = 0x07 LSM9DS1_INT_GEN_THS_Y_XL = 0x08 LSM9DS1_INT_GEN_THS_Z_XL = 0x09 LSM9DS1_INT_GEN_DUR_XL = 0x0A LSM9DS1_REFERENCE_G = 0x0B LSM9DS1_INT1_CTRL = 0x0C LSM9DS1_INT2_CTRL = 0x0D LSM9DS1_WHO_AM_I_XG = 0x0F LSM9DS1_CTRL_REG1_G = 0x10 LSM9DS1_CTRL_REG2_G = 0x11 LSM9DS1_CTRL_REG3_G = 0x12 LSM9DS1_ORIENT_CFG_G = 0x13 LSM9DS1_INT_GEN_SRC_G = 0x14 LSM9DS1_OUT_TEMP_L = 0x15 LSM9DS1_OUT_TEMP_H = 0x16 LSM9DS1_STATUS_REG_0 = 0x17 LSM9DS1_OUT_X_L_G = 0x18 LSM9DS1_OUT_X_H_G = 0x19 LSM9DS1_OUT_Y_L_G = 0x1A LSM9DS1_OUT_Y_H_G = 0x1B LSM9DS1_OUT_Z_L_G = 0x1C LSM9DS1_OUT_Z_H_G = 0x1D LSM9DS1_CTRL_REG4 = 0x1E LSM9DS1_CTRL_REG5_XL = 0x1F LSM9DS1_CTRL_REG6_XL = 0x20 LSM9DS1_CTRL_REG7_XL = 0x21 LSM9DS1_CTRL_REG8 = 0x22 LSM9DS1_CTRL_REG9 = 0x23 LSM9DS1_CTRL_REG10 = 0x24 LSM9DS1_INT_GEN_SRC_XL = 0x26 LSM9DS1_STATUS_REG_1 = 0x27 LSM9DS1_OUT_X_L_XL = 0x28 LSM9DS1_OUT_X_H_XL = 0x29 LSM9DS1_OUT_Y_L_XL = 0x2A LSM9DS1_OUT_Y_H_XL = 0x2B LSM9DS1_OUT_Z_L_XL = 0x2C LSM9DS1_OUT_Z_H_XL = 0x2D LSM9DS1_FIFO_CTRL = 0x2E LSM9DS1_FIFO_SRC = 0x2F LSM9DS1_INT_GEN_CFG_G = 0x30 LSM9DS1_INT_GEN_THS_XH_G = 0x31 LSM9DS1_INT_GEN_THS_XL_G = 0x32 LSM9DS1_INT_GEN_THS_YH_G = 0x33 LSM9DS1_INT_GEN_THS_YL_G = 0x34 LSM9DS1_INT_GEN_THS_ZH_G = 0x35 LSM9DS1_INT_GEN_THS_ZL_G = 0x36 LSM9DS1_INT_GEN_DUR_G = 0x37 #/////////////////////////////// #// LSM9DS1 Magneto Registers // #/////////////////////////////// LSM9DS1_OFFSET_X_REG_L_M = 0x05 LSM9DS1_OFFSET_X_REG_H_M = 0x06 LSM9DS1_OFFSET_Y_REG_L_M = 0x07 LSM9DS1_OFFSET_Y_REG_H_M = 0x08 LSM9DS1_OFFSET_Z_REG_L_M = 0x09 LSM9DS1_OFFSET_Z_REG_H_M = 0x0A LSM9DS1_WHO_AM_I_M = 0x0F LSM9DS1_CTRL_REG1_M = 0x20 LSM9DS1_CTRL_REG2_M = 0x21 LSM9DS1_CTRL_REG3_M = 0x22 LSM9DS1_CTRL_REG4_M = 0x23 LSM9DS1_CTRL_REG5_M = 0x24 LSM9DS1_STATUS_REG_M = 0x27 LSM9DS1_OUT_X_L_M = 0x28 LSM9DS1_OUT_X_H_M = 0x29 LSM9DS1_OUT_Y_L_M = 0x2A LSM9DS1_OUT_Y_H_M = 0x2B LSM9DS1_OUT_Z_L_M = 0x2C LSM9DS1_OUT_Z_H_M = 0x2D LSM9DS1_INT_CFG_M = 0x30 LSM9DS1_INT_SRC_M = 0x30 LSM9DS1_INT_THS_L_M = 0x32 LSM9DS1_INT_THS_H_M = 0x33 #//////////////////////////////// #// LSM9DS1 WHO_AM_I Responses // #//////////////////////////////// LSM9DS1_WHO_AM_I_AG_RSP = 0x68 LSM9DS1_WHO_AM_I_M_RSP = 0x3D
lsm9_ds1_mag_address = 28 lsm9_ds1_acc_address = 106 lsm9_ds1_gyr_address = 106 lsm9_ds1_act_ths = 4 lsm9_ds1_act_dur = 5 lsm9_ds1_int_gen_cfg_xl = 6 lsm9_ds1_int_gen_ths_x_xl = 7 lsm9_ds1_int_gen_ths_y_xl = 8 lsm9_ds1_int_gen_ths_z_xl = 9 lsm9_ds1_int_gen_dur_xl = 10 lsm9_ds1_reference_g = 11 lsm9_ds1_int1_ctrl = 12 lsm9_ds1_int2_ctrl = 13 lsm9_ds1_who_am_i_xg = 15 lsm9_ds1_ctrl_reg1_g = 16 lsm9_ds1_ctrl_reg2_g = 17 lsm9_ds1_ctrl_reg3_g = 18 lsm9_ds1_orient_cfg_g = 19 lsm9_ds1_int_gen_src_g = 20 lsm9_ds1_out_temp_l = 21 lsm9_ds1_out_temp_h = 22 lsm9_ds1_status_reg_0 = 23 lsm9_ds1_out_x_l_g = 24 lsm9_ds1_out_x_h_g = 25 lsm9_ds1_out_y_l_g = 26 lsm9_ds1_out_y_h_g = 27 lsm9_ds1_out_z_l_g = 28 lsm9_ds1_out_z_h_g = 29 lsm9_ds1_ctrl_reg4 = 30 lsm9_ds1_ctrl_reg5_xl = 31 lsm9_ds1_ctrl_reg6_xl = 32 lsm9_ds1_ctrl_reg7_xl = 33 lsm9_ds1_ctrl_reg8 = 34 lsm9_ds1_ctrl_reg9 = 35 lsm9_ds1_ctrl_reg10 = 36 lsm9_ds1_int_gen_src_xl = 38 lsm9_ds1_status_reg_1 = 39 lsm9_ds1_out_x_l_xl = 40 lsm9_ds1_out_x_h_xl = 41 lsm9_ds1_out_y_l_xl = 42 lsm9_ds1_out_y_h_xl = 43 lsm9_ds1_out_z_l_xl = 44 lsm9_ds1_out_z_h_xl = 45 lsm9_ds1_fifo_ctrl = 46 lsm9_ds1_fifo_src = 47 lsm9_ds1_int_gen_cfg_g = 48 lsm9_ds1_int_gen_ths_xh_g = 49 lsm9_ds1_int_gen_ths_xl_g = 50 lsm9_ds1_int_gen_ths_yh_g = 51 lsm9_ds1_int_gen_ths_yl_g = 52 lsm9_ds1_int_gen_ths_zh_g = 53 lsm9_ds1_int_gen_ths_zl_g = 54 lsm9_ds1_int_gen_dur_g = 55 lsm9_ds1_offset_x_reg_l_m = 5 lsm9_ds1_offset_x_reg_h_m = 6 lsm9_ds1_offset_y_reg_l_m = 7 lsm9_ds1_offset_y_reg_h_m = 8 lsm9_ds1_offset_z_reg_l_m = 9 lsm9_ds1_offset_z_reg_h_m = 10 lsm9_ds1_who_am_i_m = 15 lsm9_ds1_ctrl_reg1_m = 32 lsm9_ds1_ctrl_reg2_m = 33 lsm9_ds1_ctrl_reg3_m = 34 lsm9_ds1_ctrl_reg4_m = 35 lsm9_ds1_ctrl_reg5_m = 36 lsm9_ds1_status_reg_m = 39 lsm9_ds1_out_x_l_m = 40 lsm9_ds1_out_x_h_m = 41 lsm9_ds1_out_y_l_m = 42 lsm9_ds1_out_y_h_m = 43 lsm9_ds1_out_z_l_m = 44 lsm9_ds1_out_z_h_m = 45 lsm9_ds1_int_cfg_m = 48 lsm9_ds1_int_src_m = 48 lsm9_ds1_int_ths_l_m = 50 lsm9_ds1_int_ths_h_m = 51 lsm9_ds1_who_am_i_ag_rsp = 104 lsm9_ds1_who_am_i_m_rsp = 61
n = int(input('digite um numero: ')) n2 = int(input('digite um numero: ')) def soma (): s = n + n2 print(soma)
n = int(input('digite um numero: ')) n2 = int(input('digite um numero: ')) def soma(): s = n + n2 print(soma)
# noinspection PyUnusedLocal # skus = unicode string def checkout(skus): sd = dict() for sku in skus: if sku in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ': if sku in sd: sd[sku] += 1 else: sd[sku] = 1 else: return -1 na = sd.get('A', 0) p = int(na/5) * 200 na %= 5 p += int(na/3) * 130 + (na%3) * 50 p += 20 * sd.get('C', 0) p += 15 * sd.get('D', 0) ne = sd.get('E', 0) p += 40 * ne nb = max(0, sd.get('B', 0)-int(ne/2)) p += int(nb / 2) * 45 + (nb % 2) * 30 ff = int(sd.get('F', 0) / 3) nf = max(0, sd.get('F', 0)-ff) p += 10 * nf p += 20 * sd.get('G', 0) nh = sd.get('H', 0) p += int(nh/10) * 80 nh %= 10 p += int(nh/5) * 45 nh %= 5 p += nh * 10 p += sd.get('I', 0) * 35 p += sd.get('J', 0) * 60 nk = sd.get('K', 0) p += int(nk/2) * 120 nk %= 2 p += nk * 70 p += sd.get('L', 0) * 90 nn = sd.get('N', 0) p += 40 * nn nm = max(0, sd.get('M', 0)-int(nn/3)) p += nm * 15 p += sd.get('O', 0) * 10 np = sd.get('P', 0) p += int(np/5) * 200 np %= 5 p += np * 50 nr = sd.get('R', 0) p += nr * 50 fq = int(nr/3) nq = max(0, sd.get('Q', 0)-fq) p += int(nq/3) * 80 p += (nq%3) * 30 fu = int(sd.get('U', 0) / 4) nu = max(0, sd.get('U', 0)-fu) p += 40 * nu nv = sd.get('V', 0) p += int(nv/3) * 130 nv %= 3 p += int(nv/2) * 90 nv %= 2 p += nv * 50 p += 20 * sd.get('W', 0) ns = sd.get('S', 0) nt = sd.get('T', 0) nx = sd.get('X', 0) ny = sd.get('Y', 0) nz = sd.get('Z', 0) # it was cut highest priced first then others (ZSTYX) # actually I could not get the exact criteria from the specs :( ngrp = ns + nt + nx + ny + nz p += int(ngrp/3) * 45 fgrp = ngrp % 3 while fgrp > 0: if nx > 0: p += 17 nx -= 1 elif ny > 0: p += 20 ny -= 1 elif nt > 0: p += 20 nt -= 1 elif ns > 0: p += 20 ns -= 1 elif nz > 0: p += 21 nz -= 1 fgrp -= 1 return int(p)
def checkout(skus): sd = dict() for sku in skus: if sku in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ': if sku in sd: sd[sku] += 1 else: sd[sku] = 1 else: return -1 na = sd.get('A', 0) p = int(na / 5) * 200 na %= 5 p += int(na / 3) * 130 + na % 3 * 50 p += 20 * sd.get('C', 0) p += 15 * sd.get('D', 0) ne = sd.get('E', 0) p += 40 * ne nb = max(0, sd.get('B', 0) - int(ne / 2)) p += int(nb / 2) * 45 + nb % 2 * 30 ff = int(sd.get('F', 0) / 3) nf = max(0, sd.get('F', 0) - ff) p += 10 * nf p += 20 * sd.get('G', 0) nh = sd.get('H', 0) p += int(nh / 10) * 80 nh %= 10 p += int(nh / 5) * 45 nh %= 5 p += nh * 10 p += sd.get('I', 0) * 35 p += sd.get('J', 0) * 60 nk = sd.get('K', 0) p += int(nk / 2) * 120 nk %= 2 p += nk * 70 p += sd.get('L', 0) * 90 nn = sd.get('N', 0) p += 40 * nn nm = max(0, sd.get('M', 0) - int(nn / 3)) p += nm * 15 p += sd.get('O', 0) * 10 np = sd.get('P', 0) p += int(np / 5) * 200 np %= 5 p += np * 50 nr = sd.get('R', 0) p += nr * 50 fq = int(nr / 3) nq = max(0, sd.get('Q', 0) - fq) p += int(nq / 3) * 80 p += nq % 3 * 30 fu = int(sd.get('U', 0) / 4) nu = max(0, sd.get('U', 0) - fu) p += 40 * nu nv = sd.get('V', 0) p += int(nv / 3) * 130 nv %= 3 p += int(nv / 2) * 90 nv %= 2 p += nv * 50 p += 20 * sd.get('W', 0) ns = sd.get('S', 0) nt = sd.get('T', 0) nx = sd.get('X', 0) ny = sd.get('Y', 0) nz = sd.get('Z', 0) ngrp = ns + nt + nx + ny + nz p += int(ngrp / 3) * 45 fgrp = ngrp % 3 while fgrp > 0: if nx > 0: p += 17 nx -= 1 elif ny > 0: p += 20 ny -= 1 elif nt > 0: p += 20 nt -= 1 elif ns > 0: p += 20 ns -= 1 elif nz > 0: p += 21 nz -= 1 fgrp -= 1 return int(p)
def test_upgrade_atac_alignment_enrichment_quality_metric_1_2( upgrader, atac_alignment_enrichment_quality_metric_1 ): value = upgrader.upgrade( 'atac_alignment_enrichment_quality_metric', atac_alignment_enrichment_quality_metric_1, current_version='1', target_version='2', ) assert value['schema_version'] == '2' assert 'fri_blacklist' not in value assert value['fri_exclusion_list'] == 0.0013046877081284722
def test_upgrade_atac_alignment_enrichment_quality_metric_1_2(upgrader, atac_alignment_enrichment_quality_metric_1): value = upgrader.upgrade('atac_alignment_enrichment_quality_metric', atac_alignment_enrichment_quality_metric_1, current_version='1', target_version='2') assert value['schema_version'] == '2' assert 'fri_blacklist' not in value assert value['fri_exclusion_list'] == 0.0013046877081284722
PREVIEW_CHOICES = [ ('slider', 'Slider'), ('pre-order', 'Pre-order'), ('new', 'New'), ('offer', 'Offer'), ('hidden', 'Hidden'), ] CATEGORY_CHOICES = [ ('accesory', 'Accesory'), ('bottom', 'Bottoms'), ('hoodie', 'Hoodies'), ('outerwear', 'Outerwears'), ('sneaker', 'Sneakers'), ('t-shirt', 'T-Shirts'), ]
preview_choices = [('slider', 'Slider'), ('pre-order', 'Pre-order'), ('new', 'New'), ('offer', 'Offer'), ('hidden', 'Hidden')] category_choices = [('accesory', 'Accesory'), ('bottom', 'Bottoms'), ('hoodie', 'Hoodies'), ('outerwear', 'Outerwears'), ('sneaker', 'Sneakers'), ('t-shirt', 'T-Shirts')]
class Estereo: def __init__(self, marca) -> None: self.marca = marca self.estado = 'apagado'
class Estereo: def __init__(self, marca) -> None: self.marca = marca self.estado = 'apagado'
list = [2, 4, 6, 8] sum = 0 for num in list: sum = sum + num print("The sum is:", sum)
list = [2, 4, 6, 8] sum = 0 for num in list: sum = sum + num print('The sum is:', sum)
class RDBMSHost: def __init__(self, host: str, port: int, db_name: str, db_schema: str, db_user: str, db_password: str): self.host: str = host self.port: int = port self.db_name: str = db_name self.db_schema: str = db_schema self.db_user: str = db_user self.db_password: str = db_password
class Rdbmshost: def __init__(self, host: str, port: int, db_name: str, db_schema: str, db_user: str, db_password: str): self.host: str = host self.port: int = port self.db_name: str = db_name self.db_schema: str = db_schema self.db_user: str = db_user self.db_password: str = db_password
grid = [input() for _ in range(323)] width = len(grid[0]) height = len(grid) trees = 0 i, j = 0, 0 while (i := i + 1) < height: j = (j + 3) % width if grid[i][j] == '#': trees += 1 print(trees)
grid = [input() for _ in range(323)] width = len(grid[0]) height = len(grid) trees = 0 (i, j) = (0, 0) while (i := (i + 1)) < height: j = (j + 3) % width if grid[i][j] == '#': trees += 1 print(trees)
def test_root_redirect(client): r_root = client.get("/") assert r_root.status_code == 302 assert r_root.headers["Location"].endswith("/overview/")
def test_root_redirect(client): r_root = client.get('/') assert r_root.status_code == 302 assert r_root.headers['Location'].endswith('/overview/')
'''8. Write a Python program to split a given list into two parts where the length of the first part of the list is given. Original list: [1, 1, 2, 3, 4, 4, 5, 1] Length of the first part of the list: 3 Splited the said list into two parts: ([1, 1, 2], [3, 4, 4, 5, 1]) ''' def split_two_parts(n_list, L): return n_list[:L], n_list[L:] n_list = [1,1,2,3,4,4,5, 1] print("Original list:") print(n_list) first_list_length = 3 print("\nLength of the first part of the list:",first_list_length) print("\nSplited the said list into two parts:") print(split_two_parts(n_list, first_list_length))
"""8. Write a Python program to split a given list into two parts where the length of the first part of the list is given. Original list: [1, 1, 2, 3, 4, 4, 5, 1] Length of the first part of the list: 3 Splited the said list into two parts: ([1, 1, 2], [3, 4, 4, 5, 1]) """ def split_two_parts(n_list, L): return (n_list[:L], n_list[L:]) n_list = [1, 1, 2, 3, 4, 4, 5, 1] print('Original list:') print(n_list) first_list_length = 3 print('\nLength of the first part of the list:', first_list_length) print('\nSplited the said list into two parts:') print(split_two_parts(n_list, first_list_length))
n = int(input()) for i in range(n): row, base, number = map(int, input().split()) remains = list() while number > 0: remain = number % base number = number // base remains.append(remain) sumOfRemains = 0 for i in range(len(remains)): remains[i] = remains[i] ** 2 sumOfRemains += remains[i] print(f'{row} {sumOfRemains}')
n = int(input()) for i in range(n): (row, base, number) = map(int, input().split()) remains = list() while number > 0: remain = number % base number = number // base remains.append(remain) sum_of_remains = 0 for i in range(len(remains)): remains[i] = remains[i] ** 2 sum_of_remains += remains[i] print(f'{row} {sumOfRemains}')
with open("110000.dat","r") as fi: with open("110000num.dat","w") as fo: i=1 for l in fi.readlines(): if i%100 == 0: fo.write(l.strip()+" #"+str(i)+"\n") else: fo.write(l) i = i+1
with open('110000.dat', 'r') as fi: with open('110000num.dat', 'w') as fo: i = 1 for l in fi.readlines(): if i % 100 == 0: fo.write(l.strip() + ' #' + str(i) + '\n') else: fo.write(l) i = i + 1
class Person(object): # This definition hasn't changed from part 1! def __init__(self, fn, ln, em, age, occ): self.firstName = fn self.lastName = ln self.email = em self.age = age self.occupation = occ class Occupation(object): def __init__(self, name, location): self.name = name self.location = location if __name__ == "__main__": stringOcc = "Lawyer" person1 = Person( "Michael", "Smith", "[email protected]", 27, stringOcc) classOcc = Occupation("Software Engineer", "San Francisco") # Still works! person2 = Person( "Katie", "Johnson", "[email protected]", 26, classOcc) people = [person1, person2] for p in people: # This works. Both types of occupations are printable. print(p.occupation) # This won't work. Our "Occupation" class # doesn't work with "len" # print(len(p.occupation))
class Person(object): def __init__(self, fn, ln, em, age, occ): self.firstName = fn self.lastName = ln self.email = em self.age = age self.occupation = occ class Occupation(object): def __init__(self, name, location): self.name = name self.location = location if __name__ == '__main__': string_occ = 'Lawyer' person1 = person('Michael', 'Smith', '[email protected]', 27, stringOcc) class_occ = occupation('Software Engineer', 'San Francisco') person2 = person('Katie', 'Johnson', '[email protected]', 26, classOcc) people = [person1, person2] for p in people: print(p.occupation)
#!/usr/bin/python3 class Face(object): def __init__(self, bbox, aligned_face_img, confidence, key_points): self._bbox = bbox # [x_min, y_min, x_max, y_max] self._aligned_face_img = aligned_face_img self._confidence = confidence self._key_points = key_points @property def bbox(self): return self._bbox @property def confidence(self): return self._confidence @property def key_points(self): return self._key_points @property def aligned_face_img(self): return self._aligned_face_img
class Face(object): def __init__(self, bbox, aligned_face_img, confidence, key_points): self._bbox = bbox self._aligned_face_img = aligned_face_img self._confidence = confidence self._key_points = key_points @property def bbox(self): return self._bbox @property def confidence(self): return self._confidence @property def key_points(self): return self._key_points @property def aligned_face_img(self): return self._aligned_face_img
start_house, end_house = map(int, input().split()) left_tree, right_tree = map(int, input().split()) number_of_apples, number_of_oranges = map(int, input().split()) apple_distances = map(int, input().split()) orange_distances = map(int, input().split()) apple_count = 0 orange_count = 0 for distance in apple_distances: if start_house <= left_tree + distance <= end_house: apple_count += 1 for distance in orange_distances: if start_house <= right_tree + distance <= end_house: orange_count += 1 print(apple_count) print(orange_count)
(start_house, end_house) = map(int, input().split()) (left_tree, right_tree) = map(int, input().split()) (number_of_apples, number_of_oranges) = map(int, input().split()) apple_distances = map(int, input().split()) orange_distances = map(int, input().split()) apple_count = 0 orange_count = 0 for distance in apple_distances: if start_house <= left_tree + distance <= end_house: apple_count += 1 for distance in orange_distances: if start_house <= right_tree + distance <= end_house: orange_count += 1 print(apple_count) print(orange_count)
def countInversions(nums): #Our recursive base case, if our list is of size 1 we know there's no inversion and that it's already sorted if len(nums) == 1: return nums, 0 #We run our function recursively on it's left and right halves left, leftInversions = countInversions(nums[:len(nums) // 2]) right, rightInversions = countInversions(nums[len(nums) // 2:]) #Initialize our inversions variable to be the number of inversions in each half inversions = leftInversions + rightInversions #Initialize a list to hold our sorted result list sortedNums = [] i = j = 0 #Here we count the inversions that exist between the two halves -- while sorting them at the same time while i < len(left) and j < len(right): if left[i] < right[j]: sortedNums += [left[i]]; i += 1 else: sortedNums += [right[j]]; j += 1 #Since we know that 'left' is sorted, once we reach an item in 'left' thats bigger than something in right that item and everything to it's right-hand side must be an inversion! #This line right here is exactly what shrinks the time of this algorithm from n^2 to nlogn as it means we don't need to compare every single pair inversions += len(left) - i #Once we've exhausted either left or right, we can just add the other one onto our sortedNums list sortedNums += left[i:] + right[j:] return sortedNums, inversions def main(): nums = [1, 5, 4, 8, 10, 2, 6, 9] print(countInversions(nums)) main()
def count_inversions(nums): if len(nums) == 1: return (nums, 0) (left, left_inversions) = count_inversions(nums[:len(nums) // 2]) (right, right_inversions) = count_inversions(nums[len(nums) // 2:]) inversions = leftInversions + rightInversions sorted_nums = [] i = j = 0 while i < len(left) and j < len(right): if left[i] < right[j]: sorted_nums += [left[i]] i += 1 else: sorted_nums += [right[j]] j += 1 inversions += len(left) - i sorted_nums += left[i:] + right[j:] return (sortedNums, inversions) def main(): nums = [1, 5, 4, 8, 10, 2, 6, 9] print(count_inversions(nums)) main()
# find highest grade of an assignment def highest_SRQs_grade(queryset): queryset = queryset.order_by('-assignment', 'SRQs_grade') dict_q = {} for each in queryset: dict_q[each.assignment] = each result = [] for assignment in dict_q.values(): result.append(assignment) return result
def highest_sr_qs_grade(queryset): queryset = queryset.order_by('-assignment', 'SRQs_grade') dict_q = {} for each in queryset: dict_q[each.assignment] = each result = [] for assignment in dict_q.values(): result.append(assignment) return result
def f(x): if x: return if x: return elif y: return if x: return else: return if x: return elif y: return else: return if x: return elif y: return elif z: return else: return return None
def f(x): if x: return if x: return elif y: return if x: return else: return if x: return elif y: return else: return if x: return elif y: return elif z: return else: return return None
# Iterative approach using stack # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def mergeTrees(self, root1: TreeNode, root2: TreeNode) -> TreeNode: if root1 == None: return root2 stack = [] stack.append([root1, root2]) while stack: node = stack.pop() # possible when tree2 node was None if node[0]==None or node[1]==None: continue node[0].val += node[1].val # merging tree2's left subtree with tree1's left subtree if node[0].left == None: node[0].left = node[1].left else: stack.append([node[0].left, node[1].left]) # merging tree2's right subtree with tree1's right subtree if node[0].right == None: node[0].right = node[1].right else: stack.append([node[0].right, node[1].right]) return root1
class Solution: def merge_trees(self, root1: TreeNode, root2: TreeNode) -> TreeNode: if root1 == None: return root2 stack = [] stack.append([root1, root2]) while stack: node = stack.pop() if node[0] == None or node[1] == None: continue node[0].val += node[1].val if node[0].left == None: node[0].left = node[1].left else: stack.append([node[0].left, node[1].left]) if node[0].right == None: node[0].right = node[1].right else: stack.append([node[0].right, node[1].right]) return root1
# 26.05.2019 # Working with BitwiseOperators and different kind of String Outputs. print(f"Working with Bitwise Operators and different kind of String Outputs.") var1 = 13 # 13 in Binary: 1101 var2 = 5 # 5 in Binary: 0101 # AND Operator with format String # 1101 13 # 0101 5 # ---- AND: 1,0 = 0; 1,1 = 1; 0,0 = 0 # 0101 -> 5 print("AND & Operator {}".format(var1 & var2)) # OR Operator with f-String # 1101 13 # 0101 5 # ---- OR: 1,0 = 1; 1,1 = 1; 0,0 = 0 # 1101 -> 13 print(f"OR | operator {var1 | var2}") # XOR Operator with String-formatting # 1101 13 # 0101 5 # ---- XOR: 1,0 = 1; 1,1 = 0; 0,0 = 0 # 1000 -> 8 print("XOR ^ operator %d" %(var1 ^ var2)) # Left Shift Operator with String .format # 1101 13 # ---- Left Shift: var << 1 # 11010 -> 26 print("Left Shift << operator {}".format(var1 << 1)) # Right Shift Operator with f-String # 1101 13 # ---- Right Shift: var >> 1 # 0110 -> 6 print(f"Right Shift >> operator {var1 >> 1}")
print(f'Working with Bitwise Operators and different kind of String Outputs.') var1 = 13 var2 = 5 print('AND & Operator {}'.format(var1 & var2)) print(f'OR | operator {var1 | var2}') print('XOR ^ operator %d' % (var1 ^ var2)) print('Left Shift << operator {}'.format(var1 << 1)) print(f'Right Shift >> operator {var1 >> 1}')
class Solution: def numTilings(self, n: int) -> int: MOD = 1000000007 if n <= 2: return n previous = 1 result = 2 current = 1 for k in range(3, n + 1): tmp = result result = (result + previous + 2 * current) % MOD current = (current + previous) % MOD previous = tmp return result s = Solution() print(s.numTilings(3)) print(s.numTilings(1))
class Solution: def num_tilings(self, n: int) -> int: mod = 1000000007 if n <= 2: return n previous = 1 result = 2 current = 1 for k in range(3, n + 1): tmp = result result = (result + previous + 2 * current) % MOD current = (current + previous) % MOD previous = tmp return result s = solution() print(s.numTilings(3)) print(s.numTilings(1))
# 4. Caesar Cipher # Write a program that returns an encrypted version of the same text. # Encrypt the text by shifting each character with three positions forward. # For example A would be replaced by D, B would become E, and so on. Print the encrypted text. text = input() encrypted_text = [chr(ord(character) + 3) for character in text] print("".join(encrypted_text))
text = input() encrypted_text = [chr(ord(character) + 3) for character in text] print(''.join(encrypted_text))
ies = [] ies.append({ "ie_type" : "Node ID", "ie_value" : "Node ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain the unique identifier of the sending Node."}) ies.append({ "ie_type" : "F-SEID", "ie_value" : "CP F-SEID", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain the unique identifier allocated by the CP function identifying the session."}) ies.append({ "ie_type" : "Create PDR", "ie_value" : "Create PDR", "presence" : "O", "instance" : "0", "comment" : "This IE shall be present for at least one PDR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple PDRs.See Table 7.5.2.2-1."}) ies.append({ "ie_type" : "Create PDR", "ie_value" : "Create PDR", "presence" : "M", "instance" : "1", "comment" : "This IE shall be present for at least one PDR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple PDRs.See Table 7.5.2.2-1."}) ies.append({ "ie_type" : "Create FAR", "ie_value" : "Create FAR", "presence" : "O", "instance" : "0", "comment" : "This IE shall be present for at least one FAR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple FARs.See Table 7.5.2.3-1."}) ies.append({ "ie_type" : "Create FAR", "ie_value" : "Create FAR", "presence" : "M", "instance" : "1", "comment" : "This IE shall be present for at least one FAR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple FARs.See Table 7.5.2.3-1."}) ies.append({ "ie_type" : "Create URR", "ie_value" : "Create URR", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a measurement action shall be applied to packets matching one or more PDR(s) of this PFCP session. Several IEs within the same IE type may be present to represent multiple URRs.See Table 7.5.2.4-1."}) ies.append({ "ie_type" : "Create QER", "ie_value" : "Create QER", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if a QoS enforcement action shall be applied to packets matching one or more PDR(s) of this PFCP session.Several IEs within the same IE type may be present to represent multiple QERs.See Table 7.5.2.5-1."}) ies.append({ "ie_type" : "Create BAR", "ie_value" : "Create BAR", "presence" : "O", "instance" : "0", "comment" : "When present, this IE shall contain the buffering instructions to be applied by the UP function to any FAR of this PFCP session set with the Apply Action requesting the packets to be buffered and with a BAR ID IE referring to this BAR. See table 7.5.2.6-1."}) ies.append({ "ie_type" : "PDN Typep", "ie_value" : "PDN Type", "presence" : "C", "instance" : "0", "comment" : "This IE shall be present if the PFCP session is setup for an individual PDN connection or PDU session (see subclause 5.2.1). When present, this IE shall indicate whether this is an IP or non-IP PDN connection/PDU session. "}) ies.append({ "ie_type" : "FQ-CSIDp", "ie_value" : "SGW-C FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included according to the requirements in clause23 of 3GPPTS 23.007[24]."}) ies.append({ "ie_type" : "User Plane Inactivity Timer", "ie_value" : "User Plane Inactivity Timer", "presence" : "O", "instance" : "0", "comment" : "This IE may be present to request the UP function to send a User Plane Inactivity Report when no user plane packets are received for this PFCP session for a duration exceeding the User Plane Inactivity Timer. When present, it shall contain the duration of the inactivity period after which a User Plane Inactivity Report shall be generated."}) msg_list[key]["ies"] = ies
ies = [] ies.append({'ie_type': 'Node ID', 'ie_value': 'Node ID', 'presence': 'M', 'instance': '0', 'comment': 'This IE shall contain the unique identifier of the sending Node.'}) ies.append({'ie_type': 'F-SEID', 'ie_value': 'CP F-SEID', 'presence': 'M', 'instance': '0', 'comment': 'This IE shall contain the unique identifier allocated by the CP function identifying the session.'}) ies.append({'ie_type': 'Create PDR', 'ie_value': 'Create PDR', 'presence': 'O', 'instance': '0', 'comment': 'This IE shall be present for at least one PDR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple PDRs.See Table 7.5.2.2-1.'}) ies.append({'ie_type': 'Create PDR', 'ie_value': 'Create PDR', 'presence': 'M', 'instance': '1', 'comment': 'This IE shall be present for at least one PDR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple PDRs.See Table 7.5.2.2-1.'}) ies.append({'ie_type': 'Create FAR', 'ie_value': 'Create FAR', 'presence': 'O', 'instance': '0', 'comment': 'This IE shall be present for at least one FAR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple FARs.See Table 7.5.2.3-1.'}) ies.append({'ie_type': 'Create FAR', 'ie_value': 'Create FAR', 'presence': 'M', 'instance': '1', 'comment': 'This IE shall be present for at least one FAR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple FARs.See Table 7.5.2.3-1.'}) ies.append({'ie_type': 'Create URR', 'ie_value': 'Create URR', 'presence': 'C', 'instance': '0', 'comment': 'This IE shall be present if a measurement action shall be applied to packets matching one or more PDR(s) of this PFCP session. Several IEs within the same IE type may be present to represent multiple URRs.See Table 7.5.2.4-1.'}) ies.append({'ie_type': 'Create QER', 'ie_value': 'Create QER', 'presence': 'C', 'instance': '0', 'comment': 'This IE shall be present if a QoS enforcement action shall be applied to packets matching one or more PDR(s) of this PFCP session.Several IEs within the same IE type may be present to represent multiple QERs.See Table 7.5.2.5-1.'}) ies.append({'ie_type': 'Create BAR', 'ie_value': 'Create BAR', 'presence': 'O', 'instance': '0', 'comment': 'When present, this IE shall contain the buffering instructions to be applied by the UP function to any FAR of this PFCP session set with the Apply Action requesting the packets to be buffered and with a BAR ID IE referring to this BAR. See table 7.5.2.6-1.'}) ies.append({'ie_type': 'PDN Typep', 'ie_value': 'PDN Type', 'presence': 'C', 'instance': '0', 'comment': 'This IE shall be present if the PFCP session is setup for an individual PDN connection or PDU session (see subclause 5.2.1). When present, this IE shall indicate whether this is an IP or non-IP PDN connection/PDU session. '}) ies.append({'ie_type': 'FQ-CSIDp', 'ie_value': 'SGW-C FQ-CSID', 'presence': 'C', 'instance': '0', 'comment': 'This IE shall be included according to the requirements in clause23 of 3GPPTS 23.007[24].'}) ies.append({'ie_type': 'User Plane Inactivity Timer', 'ie_value': 'User Plane Inactivity Timer', 'presence': 'O', 'instance': '0', 'comment': 'This IE may be present to request the UP function to send a User Plane Inactivity Report when no user plane packets are received for this PFCP session for a duration exceeding the User Plane Inactivity Timer. When present, it shall contain the duration of the inactivity period after which a User Plane Inactivity Report shall be generated.'}) msg_list[key]['ies'] = ies
# https://www.codechef.com/problems/MISSP for T in range(int(input())): a=[] for n in range(int(input())): k=int(input()) if(k not in a): a.append(k) else: a.remove(k) print(a[0])
for t in range(int(input())): a = [] for n in range(int(input())): k = int(input()) if k not in a: a.append(k) else: a.remove(k) print(a[0])
def check_subtree(t2, t1): if t1 is None or t2 is None: return False if t1.val == t2.val: # potential subtree if subtree_equality(t2, t1): return True return check_subtree(t2, t1.left) or check_subtree(t2, t1.right) def subtree_equality(t2, t1): if t2 is None and t1 is None: return True if t1 is None or t2 is None: return False if t2.val == t1.val: return subtree_equality(t2.left, t1.left) and subtree_equality(t2.right, t1.right) return False
def check_subtree(t2, t1): if t1 is None or t2 is None: return False if t1.val == t2.val: if subtree_equality(t2, t1): return True return check_subtree(t2, t1.left) or check_subtree(t2, t1.right) def subtree_equality(t2, t1): if t2 is None and t1 is None: return True if t1 is None or t2 is None: return False if t2.val == t1.val: return subtree_equality(t2.left, t1.left) and subtree_equality(t2.right, t1.right) return False
# Sky Jewel box (2002016) | Treasure Room of Queen (926000010) eleska = 3935 skyJewel = 4031574 reactor.incHitCount() if reactor.getHitCount() >= 3: if sm.hasQuest(eleska) and not sm.hasItem(skyJewel): sm.dropItem(skyJewel, sm.getPosition(objectID).getX(), sm.getPosition(objectID).getY()) sm.removeReactor()
eleska = 3935 sky_jewel = 4031574 reactor.incHitCount() if reactor.getHitCount() >= 3: if sm.hasQuest(eleska) and (not sm.hasItem(skyJewel)): sm.dropItem(skyJewel, sm.getPosition(objectID).getX(), sm.getPosition(objectID).getY()) sm.removeReactor()
a[-1] a[-2:] a[:-2] a[::-1] a[1::-1] a[:-3:-1] a[-3::-1] point_coords = coords[i, :] main(sys.argv[1:])
a[-1] a[-2:] a[:-2] a[::-1] a[1::-1] a[:-3:-1] a[-3::-1] point_coords = coords[i, :] main(sys.argv[1:])
''' for a in range(3,1000): for b in range(a+1,999): csquared= a**2+b**2 c=csquared**0.5 if a+b+c==1000: product= a*b*c print(product) print(c) break ''' def compute(): PERIMETER = 1000 for a in range(1, PERIMETER + 1): for b in range(a + 1, PERIMETER + 1): c = PERIMETER - a - b if a * a + b * b == c * c: # It is now implied that b < c, because we have a > 0 return str(a * b * c) if __name__ == "__main__": print(compute())
""" for a in range(3,1000): for b in range(a+1,999): csquared= a**2+b**2 c=csquared**0.5 if a+b+c==1000: product= a*b*c print(product) print(c) break """ def compute(): perimeter = 1000 for a in range(1, PERIMETER + 1): for b in range(a + 1, PERIMETER + 1): c = PERIMETER - a - b if a * a + b * b == c * c: return str(a * b * c) if __name__ == '__main__': print(compute())
# Language: Python # Level: 8kyu # Name of Problem: DNA to RNA Conversion # Instructions: Deoxyribonucleic acid, DNA is the primary information storage molecule in biological systems. # It is composed of four nucleic acid bases Guanine ('G'), Cytosine ('C'), Adenine ('A'), and Thymine ('T'). # Ribonucleic acid, RNA, is the primary messenger molecule in cells. # RNA differs slightly from DNA its chemical structure and contains no Thymine. # In RNA Thymine is replaced by another nucleic acid Uracil ('U'). # Create a function which translates a given DNA string into RNA. # The input string can be of arbitrary length - in particular, it may be empty. # All input is guaranteed to be valid, i.e. each input string will only ever consist of 'G', 'C', 'A' and/or 'T'. # Example: # DNAtoRNA("GCAT") returns ("GCAU") # Solution 1: def DNAtoRNA(dna): return dna.replace('T', 'U') # Sample Tests Passed: # test.assert_equals(DNAtoRNA("TTTT"), "UUUU") # test.assert_equals(DNAtoRNA("GCAT"), "GCAU") # test.assert_equals(DNAtoRNA("GACCGCCGCC"), "GACCGCCGCC")
def dn_ato_rna(dna): return dna.replace('T', 'U')
data = ( 'Kay ', # 0x00 'Kayng ', # 0x01 'Ke ', # 0x02 'Ko ', # 0x03 'Kol ', # 0x04 'Koc ', # 0x05 'Kwi ', # 0x06 'Kwi ', # 0x07 'Kyun ', # 0x08 'Kul ', # 0x09 'Kum ', # 0x0a 'Na ', # 0x0b 'Na ', # 0x0c 'Na ', # 0x0d 'La ', # 0x0e 'Na ', # 0x0f 'Na ', # 0x10 'Na ', # 0x11 'Na ', # 0x12 'Na ', # 0x13 'Nak ', # 0x14 'Nak ', # 0x15 'Nak ', # 0x16 'Nak ', # 0x17 'Nak ', # 0x18 'Nak ', # 0x19 'Nak ', # 0x1a 'Nan ', # 0x1b 'Nan ', # 0x1c 'Nan ', # 0x1d 'Nan ', # 0x1e 'Nan ', # 0x1f 'Nan ', # 0x20 'Nam ', # 0x21 'Nam ', # 0x22 'Nam ', # 0x23 'Nam ', # 0x24 'Nap ', # 0x25 'Nap ', # 0x26 'Nap ', # 0x27 'Nang ', # 0x28 'Nang ', # 0x29 'Nang ', # 0x2a 'Nang ', # 0x2b 'Nang ', # 0x2c 'Nay ', # 0x2d 'Nayng ', # 0x2e 'No ', # 0x2f 'No ', # 0x30 'No ', # 0x31 'No ', # 0x32 'No ', # 0x33 'No ', # 0x34 'No ', # 0x35 'No ', # 0x36 'No ', # 0x37 'No ', # 0x38 'No ', # 0x39 'No ', # 0x3a 'Nok ', # 0x3b 'Nok ', # 0x3c 'Nok ', # 0x3d 'Nok ', # 0x3e 'Nok ', # 0x3f 'Nok ', # 0x40 'Non ', # 0x41 'Nong ', # 0x42 'Nong ', # 0x43 'Nong ', # 0x44 'Nong ', # 0x45 'Noy ', # 0x46 'Noy ', # 0x47 'Noy ', # 0x48 'Noy ', # 0x49 'Nwu ', # 0x4a 'Nwu ', # 0x4b 'Nwu ', # 0x4c 'Nwu ', # 0x4d 'Nwu ', # 0x4e 'Nwu ', # 0x4f 'Nwu ', # 0x50 'Nwu ', # 0x51 'Nuk ', # 0x52 'Nuk ', # 0x53 'Num ', # 0x54 'Nung ', # 0x55 'Nung ', # 0x56 'Nung ', # 0x57 'Nung ', # 0x58 'Nung ', # 0x59 'Twu ', # 0x5a 'La ', # 0x5b 'Lak ', # 0x5c 'Lak ', # 0x5d 'Lan ', # 0x5e 'Lyeng ', # 0x5f 'Lo ', # 0x60 'Lyul ', # 0x61 'Li ', # 0x62 'Pey ', # 0x63 'Pen ', # 0x64 'Pyen ', # 0x65 'Pwu ', # 0x66 'Pwul ', # 0x67 'Pi ', # 0x68 'Sak ', # 0x69 'Sak ', # 0x6a 'Sam ', # 0x6b 'Sayk ', # 0x6c 'Sayng ', # 0x6d 'Sep ', # 0x6e 'Sey ', # 0x6f 'Sway ', # 0x70 'Sin ', # 0x71 'Sim ', # 0x72 'Sip ', # 0x73 'Ya ', # 0x74 'Yak ', # 0x75 'Yak ', # 0x76 'Yang ', # 0x77 'Yang ', # 0x78 'Yang ', # 0x79 'Yang ', # 0x7a 'Yang ', # 0x7b 'Yang ', # 0x7c 'Yang ', # 0x7d 'Yang ', # 0x7e 'Ye ', # 0x7f 'Ye ', # 0x80 'Ye ', # 0x81 'Ye ', # 0x82 'Ye ', # 0x83 'Ye ', # 0x84 'Ye ', # 0x85 'Ye ', # 0x86 'Ye ', # 0x87 'Ye ', # 0x88 'Ye ', # 0x89 'Yek ', # 0x8a 'Yek ', # 0x8b 'Yek ', # 0x8c 'Yek ', # 0x8d 'Yen ', # 0x8e 'Yen ', # 0x8f 'Yen ', # 0x90 'Yen ', # 0x91 'Yen ', # 0x92 'Yen ', # 0x93 'Yen ', # 0x94 'Yen ', # 0x95 'Yen ', # 0x96 'Yen ', # 0x97 'Yen ', # 0x98 'Yen ', # 0x99 'Yen ', # 0x9a 'Yen ', # 0x9b 'Yel ', # 0x9c 'Yel ', # 0x9d 'Yel ', # 0x9e 'Yel ', # 0x9f 'Yel ', # 0xa0 'Yel ', # 0xa1 'Yem ', # 0xa2 'Yem ', # 0xa3 'Yem ', # 0xa4 'Yem ', # 0xa5 'Yem ', # 0xa6 'Yep ', # 0xa7 'Yeng ', # 0xa8 'Yeng ', # 0xa9 'Yeng ', # 0xaa 'Yeng ', # 0xab 'Yeng ', # 0xac 'Yeng ', # 0xad 'Yeng ', # 0xae 'Yeng ', # 0xaf 'Yeng ', # 0xb0 'Yeng ', # 0xb1 'Yeng ', # 0xb2 'Yeng ', # 0xb3 'Yeng ', # 0xb4 'Yey ', # 0xb5 'Yey ', # 0xb6 'Yey ', # 0xb7 'Yey ', # 0xb8 'O ', # 0xb9 'Yo ', # 0xba 'Yo ', # 0xbb 'Yo ', # 0xbc 'Yo ', # 0xbd 'Yo ', # 0xbe 'Yo ', # 0xbf 'Yo ', # 0xc0 'Yo ', # 0xc1 'Yo ', # 0xc2 'Yo ', # 0xc3 'Yong ', # 0xc4 'Wun ', # 0xc5 'Wen ', # 0xc6 'Yu ', # 0xc7 'Yu ', # 0xc8 'Yu ', # 0xc9 'Yu ', # 0xca 'Yu ', # 0xcb 'Yu ', # 0xcc 'Yu ', # 0xcd 'Yu ', # 0xce 'Yu ', # 0xcf 'Yu ', # 0xd0 'Yuk ', # 0xd1 'Yuk ', # 0xd2 'Yuk ', # 0xd3 'Yun ', # 0xd4 'Yun ', # 0xd5 'Yun ', # 0xd6 'Yun ', # 0xd7 'Yul ', # 0xd8 'Yul ', # 0xd9 'Yul ', # 0xda 'Yul ', # 0xdb 'Yung ', # 0xdc 'I ', # 0xdd 'I ', # 0xde 'I ', # 0xdf 'I ', # 0xe0 'I ', # 0xe1 'I ', # 0xe2 'I ', # 0xe3 'I ', # 0xe4 'I ', # 0xe5 'I ', # 0xe6 'I ', # 0xe7 'I ', # 0xe8 'I ', # 0xe9 'I ', # 0xea 'Ik ', # 0xeb 'Ik ', # 0xec 'In ', # 0xed 'In ', # 0xee 'In ', # 0xef 'In ', # 0xf0 'In ', # 0xf1 'In ', # 0xf2 'In ', # 0xf3 'Im ', # 0xf4 'Im ', # 0xf5 'Im ', # 0xf6 'Ip ', # 0xf7 'Ip ', # 0xf8 'Ip ', # 0xf9 'Cang ', # 0xfa 'Cek ', # 0xfb 'Ci ', # 0xfc 'Cip ', # 0xfd 'Cha ', # 0xfe 'Chek ', # 0xff )
data = ('Kay ', 'Kayng ', 'Ke ', 'Ko ', 'Kol ', 'Koc ', 'Kwi ', 'Kwi ', 'Kyun ', 'Kul ', 'Kum ', 'Na ', 'Na ', 'Na ', 'La ', 'Na ', 'Na ', 'Na ', 'Na ', 'Na ', 'Nak ', 'Nak ', 'Nak ', 'Nak ', 'Nak ', 'Nak ', 'Nak ', 'Nan ', 'Nan ', 'Nan ', 'Nan ', 'Nan ', 'Nan ', 'Nam ', 'Nam ', 'Nam ', 'Nam ', 'Nap ', 'Nap ', 'Nap ', 'Nang ', 'Nang ', 'Nang ', 'Nang ', 'Nang ', 'Nay ', 'Nayng ', 'No ', 'No ', 'No ', 'No ', 'No ', 'No ', 'No ', 'No ', 'No ', 'No ', 'No ', 'No ', 'Nok ', 'Nok ', 'Nok ', 'Nok ', 'Nok ', 'Nok ', 'Non ', 'Nong ', 'Nong ', 'Nong ', 'Nong ', 'Noy ', 'Noy ', 'Noy ', 'Noy ', 'Nwu ', 'Nwu ', 'Nwu ', 'Nwu ', 'Nwu ', 'Nwu ', 'Nwu ', 'Nwu ', 'Nuk ', 'Nuk ', 'Num ', 'Nung ', 'Nung ', 'Nung ', 'Nung ', 'Nung ', 'Twu ', 'La ', 'Lak ', 'Lak ', 'Lan ', 'Lyeng ', 'Lo ', 'Lyul ', 'Li ', 'Pey ', 'Pen ', 'Pyen ', 'Pwu ', 'Pwul ', 'Pi ', 'Sak ', 'Sak ', 'Sam ', 'Sayk ', 'Sayng ', 'Sep ', 'Sey ', 'Sway ', 'Sin ', 'Sim ', 'Sip ', 'Ya ', 'Yak ', 'Yak ', 'Yang ', 'Yang ', 'Yang ', 'Yang ', 'Yang ', 'Yang ', 'Yang ', 'Yang ', 'Ye ', 'Ye ', 'Ye ', 'Ye ', 'Ye ', 'Ye ', 'Ye ', 'Ye ', 'Ye ', 'Ye ', 'Ye ', 'Yek ', 'Yek ', 'Yek ', 'Yek ', 'Yen ', 'Yen ', 'Yen ', 'Yen ', 'Yen ', 'Yen ', 'Yen ', 'Yen ', 'Yen ', 'Yen ', 'Yen ', 'Yen ', 'Yen ', 'Yen ', 'Yel ', 'Yel ', 'Yel ', 'Yel ', 'Yel ', 'Yel ', 'Yem ', 'Yem ', 'Yem ', 'Yem ', 'Yem ', 'Yep ', 'Yeng ', 'Yeng ', 'Yeng ', 'Yeng ', 'Yeng ', 'Yeng ', 'Yeng ', 'Yeng ', 'Yeng ', 'Yeng ', 'Yeng ', 'Yeng ', 'Yeng ', 'Yey ', 'Yey ', 'Yey ', 'Yey ', 'O ', 'Yo ', 'Yo ', 'Yo ', 'Yo ', 'Yo ', 'Yo ', 'Yo ', 'Yo ', 'Yo ', 'Yo ', 'Yong ', 'Wun ', 'Wen ', 'Yu ', 'Yu ', 'Yu ', 'Yu ', 'Yu ', 'Yu ', 'Yu ', 'Yu ', 'Yu ', 'Yu ', 'Yuk ', 'Yuk ', 'Yuk ', 'Yun ', 'Yun ', 'Yun ', 'Yun ', 'Yul ', 'Yul ', 'Yul ', 'Yul ', 'Yung ', 'I ', 'I ', 'I ', 'I ', 'I ', 'I ', 'I ', 'I ', 'I ', 'I ', 'I ', 'I ', 'I ', 'I ', 'Ik ', 'Ik ', 'In ', 'In ', 'In ', 'In ', 'In ', 'In ', 'In ', 'Im ', 'Im ', 'Im ', 'Ip ', 'Ip ', 'Ip ', 'Cang ', 'Cek ', 'Ci ', 'Cip ', 'Cha ', 'Chek ')
class Sol(object): def __init__(self): self.suc = None def in_order(self, head, num): if not head: return None int = [] def helper(head): nonlocal int if head: self.helper(head.left) int.append(head.val) self.helper(head.right) helper(head) if num in int: return int[int.index(num)+1]
class Sol(object): def __init__(self): self.suc = None def in_order(self, head, num): if not head: return None int = [] def helper(head): nonlocal int if head: self.helper(head.left) int.append(head.val) self.helper(head.right) helper(head) if num in int: return int[int.index(num) + 1]
# OpenWeatherMap API Key weather_api_key = "Insert your own key" # Google API Key g_key = "Insert your own key"
weather_api_key = 'Insert your own key' g_key = 'Insert your own key'
class Solution: def countGoodSubstrings(self, s: str) -> int: count, i, end = 0, 2, len(s) while i < end: a, b, c = s[i-2], s[i-1], s[i] if a == b == c: i += 2 continue count += a != b and b != c and a != c i += 1 return count
class Solution: def count_good_substrings(self, s: str) -> int: (count, i, end) = (0, 2, len(s)) while i < end: (a, b, c) = (s[i - 2], s[i - 1], s[i]) if a == b == c: i += 2 continue count += a != b and b != c and (a != c) i += 1 return count
( XL_CELL_EMPTY, #0 XL_CELL_TEXT, #1 XL_CELL_NUMBER, #2 XL_CELl_DATE, #3 XL_CELL_BOOLEAN,#4 XL_CELL_ERROR, #5 XL_CELL_BLANK, #6 ) = range(7) ctype_text = { XL_CELL_EMPTY: 'empty', XL_CELL_TEXT:'text', XL_CELL_NUMBER:'number', XL_CELl_DATE:'date', XL_CELL_BOOLEAN:'boolean', XL_CELL_ERROR:'error', XL_CELL_BLANK:'blank', }
(xl_cell_empty, xl_cell_text, xl_cell_number, xl_ce_ll_date, xl_cell_boolean, xl_cell_error, xl_cell_blank) = range(7) ctype_text = {XL_CELL_EMPTY: 'empty', XL_CELL_TEXT: 'text', XL_CELL_NUMBER: 'number', XL_CELl_DATE: 'date', XL_CELL_BOOLEAN: 'boolean', XL_CELL_ERROR: 'error', XL_CELL_BLANK: 'blank'}
def sum6(n): nums = [i for i in range(1, n + 1)] return sum(nums) N = 10 S = sum6(N) print(S)
def sum6(n): nums = [i for i in range(1, n + 1)] return sum(nums) n = 10 s = sum6(N) print(S)
def solve(): s = sum((x ** x for x in range(1, 1001))) print(str(s)[-10:]) if __name__ == '__main__': solve()
def solve(): s = sum((x ** x for x in range(1, 1001))) print(str(s)[-10:]) if __name__ == '__main__': solve()
listaDePalavras = ('Aprender','Programar','Linguagem','Python','Curso','Gratis', 'Estudar','Praticar','Trabalhar','Mercado','Programador', 'Futuro') for palavras in listaDePalavras: print(f'\n A palavra {palavras} temos', end=' ') for letras in palavras: if letras.lower() in 'aeiou': print(letras.lower(),end=' ')
lista_de_palavras = ('Aprender', 'Programar', 'Linguagem', 'Python', 'Curso', 'Gratis', 'Estudar', 'Praticar', 'Trabalhar', 'Mercado', 'Programador', 'Futuro') for palavras in listaDePalavras: print(f'\n A palavra {palavras} temos', end=' ') for letras in palavras: if letras.lower() in 'aeiou': print(letras.lower(), end=' ')
x = 1 y = 'Hello' z = 10.123 d = x + z print(d) print(type(x)) print(type(y)) print(y.upper()) print(y.lower()) print(type(z)) a = [1,2,3,4,5,6,6,7,8] print(len(a)) print(a.count(6)) b = list(range(10,100,10)) print(b) stud_marks = {"Madhan":90, "Raj":25,"Mani":80} print(stud_marks.keys()) print(stud_marks.values()) ab = list(range(10,100,10)) ab.append(100) ab.append(110) ab.remove(110) print(ab[0:2])
x = 1 y = 'Hello' z = 10.123 d = x + z print(d) print(type(x)) print(type(y)) print(y.upper()) print(y.lower()) print(type(z)) a = [1, 2, 3, 4, 5, 6, 6, 7, 8] print(len(a)) print(a.count(6)) b = list(range(10, 100, 10)) print(b) stud_marks = {'Madhan': 90, 'Raj': 25, 'Mani': 80} print(stud_marks.keys()) print(stud_marks.values()) ab = list(range(10, 100, 10)) ab.append(100) ab.append(110) ab.remove(110) print(ab[0:2])
# Generate .travis.yml automatically # Configuration for Linux configs = [ # OS, OS version, compiler, build type, task ("ubuntu", "18.04", "gcc", "DefaultDebug", "Test"), ("ubuntu", "18.04", "gcc", "DefaultRelease", "Test"), ("debian", "9", "gcc", "DefaultDebug", "Test"), ("debian", "9", "gcc", "DefaultRelease", "Test"), ("debian", "10", "gcc", "DefaultDebug", "Test"), ("debian", "10", "gcc", "DefaultRelease", "Test"), ("ubuntu", "20.04", "gcc", "DefaultDebugTravis", "TestDocker"), ("ubuntu", "20.04", "gcc", "DefaultReleaseTravis", "TestDockerDoxygen"), # ("osx", "xcode9.3", "clang", "DefaultDebug", "Test"), # ("osx", "xcode9.3", "clang", "DefaultRelease", "Test"), ] # Stages in travis build_stages = [ ("Build (1st run)", "Build1"), ("Build (2nd run)", "Build2"), ("Build (3rd run)", "BuildLast"), ("Tasks", "Tasks"), ] def get_env_string(os, os_version, compiler, build_type, task): if os == "osx": return "CONFIG={} TASK={} COMPILER={} STL=libc++\n".format(build_type, task, compiler) else: return "CONFIG={} TASK={} LINUX={} COMPILER={}\n".format(build_type, task, "{}-{}".format(os, os_version), compiler) if __name__ == "__main__": s = "" # Initial config s += "#\n" s += "# General config\n" s += "#\n" s += "branches:\n" s += " only:\n" s += " - master\n" s += " - stable\n" s += "sudo: required\n" s += "language: cpp\n" s += "\n" s += "git:\n" s += " depth: false\n" s += "\n" s += "# Enable caching\n" s += "cache:\n" s += " timeout: 1000\n" s += " directories:\n" s += " - build\n" s += " - travis/mtime_cache\n" s += "\n" s += "# Enable docker support\n" s += "services:\n" s += "- docker\n" s += "\n" s += "notifications:\n" s += " email:\n" s += " on_failure: always\n" s += " on_success: change\n" s += " recipients:\n" s += ' - secure: "VWnsiQkt1xjgRo1hfNiNQqvLSr0fshFmLV7jJlUixhCr094mgD0U2bNKdUfebm28Byg9UyDYPbOFDC0sx7KydKiL1q7FKKXkyZH0k04wUu8XiNw+fYkDpmPnQs7G2n8oJ/GFJnr1Wp/1KI3qX5LX3xot4cJfx1I5iFC2O+p+ng6v/oSX+pewlMv4i7KL16ftHHHMo80N694v3g4B2NByn4GU2/bjVQcqlBp/TiVaUa5Nqu9DxZi/n9CJqGEaRHOblWyMO3EyTZsn45BNSWeQ3DtnMwZ73rlIr9CaEgCeuArc6RGghUAVqRI5ao+N5apekIaILwTgL6AJn+Lw/+NRPa8xclgd0rKqUQJMJCDZKjKz2lmIs3bxfELOizxJ3FJQ5R95FAxeAZ6rb/j40YqVVTw2IMBDnEE0J5ZmpUYNUtPti/Adf6GD9Fb2y8sLo0XDJzkI8OxYhfgjSy5KYmRj8O5MXcP2MAE8LQauNO3MaFnL9VMVOTZePJrPozQUgM021uyahf960+QNI06Uqlmg+PwWkSdllQlxHHplOgW7zClFhtSUpnJxcsUBzgg4kVg80gXUwAQkaDi7A9Wh2bs+TvMlmHzBwg+2SaAfWDgjeJIeOaipDkF1uSGzC+EHAiiKYMLd4Aahoi8SuelJUucoyJyLAq00WdUFQIh/izVhM4Y="\n' s += "\n" s += "#\n" s += "# Configurations\n" s += "#\n" s += "jobs:\n" s += " include:\n" # Start with prebuilding carl for docker s += "\n" s += " ###\n" s += " # Stage: Build Carl\n" s += " ###\n" for config in configs: os, os_version, compiler, build_type, task = config os_type = "osx" if os == "osx" else "linux" if "Travis" in build_type: s += " # {}-{} - {}\n".format(os, os_version, build_type) buildConfig = "" buildConfig += " - stage: Build Carl\n" buildConfig += " os: {}\n".format(os_type) buildConfig += " compiler: {}\n".format(compiler) buildConfig += " env: {}".format(get_env_string(os, os_version, compiler, build_type, task)) buildConfig += " before_script:\n" buildConfig += ' - python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)" # Workaround for nonblocking mode\n' buildConfig += " script:\n" buildConfig += " - travis/build_carl.sh\n" buildConfig += " before_cache:\n" buildConfig += " - docker cp carl:/opt/carl/. .\n" # Upload to DockerHub buildConfig += " deploy:\n" buildConfig += " - provider: script\n" buildConfig += " skip_cleanup: true\n" buildConfig += " script: bash travis/deploy_docker.sh carl\n" s += buildConfig # Generate all build configurations for stage in build_stages: s += "\n" s += " ###\n" s += " # Stage: {}\n".format(stage[0]) s += " ###\n" for config in configs: os, os_version, compiler, build_type, task = config os_type = "osx" if os == "osx" else "linux" s += " # {}-{} - {}\n".format(os, os_version, build_type) buildConfig = "" buildConfig += " - stage: {}\n".format(stage[0]) buildConfig += " os: {}\n".format(os_type) if os_type == "osx": buildConfig += " osx_image: {}\n".format(os_version) buildConfig += " compiler: {}\n".format(compiler) buildConfig += " env: {}".format(get_env_string(os, os_version, compiler, build_type, task)) buildConfig += " install:\n" if stage[1] == "Build1": buildConfig += " - rm -rf build\n" buildConfig += " - travis/skip_test.sh\n" if os_type == "osx": buildConfig += " - travis/install_osx.sh\n" buildConfig += " before_script:\n" buildConfig += ' - python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)" # Workaround for nonblocking mode\n' buildConfig += " script:\n" buildConfig += " - travis/build.sh {}\n".format(stage[1]) if os_type == "linux": buildConfig += " before_cache:\n" buildConfig += " - docker cp storm:/opt/storm/. .\n" buildConfig += " after_failure:\n" buildConfig += " - find build -iname '*err*.log' -type f -print -exec cat {} \;\n" # Deployment if stage[1] == "Tasks": if "Docker" in task or "Doxygen" in task: buildConfig += " deploy:\n" if "Docker" in task: buildConfig += " - provider: script\n" buildConfig += " skip_cleanup: true\n" buildConfig += " script: bash travis/deploy_docker.sh storm\n" if "Doxygen" in task: buildConfig += " - provider: pages\n" buildConfig += " skip_cleanup: true\n" buildConfig += " github_token: $GITHUB_TOKEN\n" buildConfig += " local_dir: build/doc/html/\n" buildConfig += " repo: moves-rwth/storm-doc\n" buildConfig += " target_branch: master\n" buildConfig += " on:\n" buildConfig += " branch: master\n" s += buildConfig print(s)
configs = [('ubuntu', '18.04', 'gcc', 'DefaultDebug', 'Test'), ('ubuntu', '18.04', 'gcc', 'DefaultRelease', 'Test'), ('debian', '9', 'gcc', 'DefaultDebug', 'Test'), ('debian', '9', 'gcc', 'DefaultRelease', 'Test'), ('debian', '10', 'gcc', 'DefaultDebug', 'Test'), ('debian', '10', 'gcc', 'DefaultRelease', 'Test'), ('ubuntu', '20.04', 'gcc', 'DefaultDebugTravis', 'TestDocker'), ('ubuntu', '20.04', 'gcc', 'DefaultReleaseTravis', 'TestDockerDoxygen')] build_stages = [('Build (1st run)', 'Build1'), ('Build (2nd run)', 'Build2'), ('Build (3rd run)', 'BuildLast'), ('Tasks', 'Tasks')] def get_env_string(os, os_version, compiler, build_type, task): if os == 'osx': return 'CONFIG={} TASK={} COMPILER={} STL=libc++\n'.format(build_type, task, compiler) else: return 'CONFIG={} TASK={} LINUX={} COMPILER={}\n'.format(build_type, task, '{}-{}'.format(os, os_version), compiler) if __name__ == '__main__': s = '' s += '#\n' s += '# General config\n' s += '#\n' s += 'branches:\n' s += ' only:\n' s += ' - master\n' s += ' - stable\n' s += 'sudo: required\n' s += 'language: cpp\n' s += '\n' s += 'git:\n' s += ' depth: false\n' s += '\n' s += '# Enable caching\n' s += 'cache:\n' s += ' timeout: 1000\n' s += ' directories:\n' s += ' - build\n' s += ' - travis/mtime_cache\n' s += '\n' s += '# Enable docker support\n' s += 'services:\n' s += '- docker\n' s += '\n' s += 'notifications:\n' s += ' email:\n' s += ' on_failure: always\n' s += ' on_success: change\n' s += ' recipients:\n' s += ' - secure: "VWnsiQkt1xjgRo1hfNiNQqvLSr0fshFmLV7jJlUixhCr094mgD0U2bNKdUfebm28Byg9UyDYPbOFDC0sx7KydKiL1q7FKKXkyZH0k04wUu8XiNw+fYkDpmPnQs7G2n8oJ/GFJnr1Wp/1KI3qX5LX3xot4cJfx1I5iFC2O+p+ng6v/oSX+pewlMv4i7KL16ftHHHMo80N694v3g4B2NByn4GU2/bjVQcqlBp/TiVaUa5Nqu9DxZi/n9CJqGEaRHOblWyMO3EyTZsn45BNSWeQ3DtnMwZ73rlIr9CaEgCeuArc6RGghUAVqRI5ao+N5apekIaILwTgL6AJn+Lw/+NRPa8xclgd0rKqUQJMJCDZKjKz2lmIs3bxfELOizxJ3FJQ5R95FAxeAZ6rb/j40YqVVTw2IMBDnEE0J5ZmpUYNUtPti/Adf6GD9Fb2y8sLo0XDJzkI8OxYhfgjSy5KYmRj8O5MXcP2MAE8LQauNO3MaFnL9VMVOTZePJrPozQUgM021uyahf960+QNI06Uqlmg+PwWkSdllQlxHHplOgW7zClFhtSUpnJxcsUBzgg4kVg80gXUwAQkaDi7A9Wh2bs+TvMlmHzBwg+2SaAfWDgjeJIeOaipDkF1uSGzC+EHAiiKYMLd4Aahoi8SuelJUucoyJyLAq00WdUFQIh/izVhM4Y="\n' s += '\n' s += '#\n' s += '# Configurations\n' s += '#\n' s += 'jobs:\n' s += ' include:\n' s += '\n' s += ' ###\n' s += ' # Stage: Build Carl\n' s += ' ###\n' for config in configs: (os, os_version, compiler, build_type, task) = config os_type = 'osx' if os == 'osx' else 'linux' if 'Travis' in build_type: s += ' # {}-{} - {}\n'.format(os, os_version, build_type) build_config = '' build_config += ' - stage: Build Carl\n' build_config += ' os: {}\n'.format(os_type) build_config += ' compiler: {}\n'.format(compiler) build_config += ' env: {}'.format(get_env_string(os, os_version, compiler, build_type, task)) build_config += ' before_script:\n' build_config += ' - python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)" # Workaround for nonblocking mode\n' build_config += ' script:\n' build_config += ' - travis/build_carl.sh\n' build_config += ' before_cache:\n' build_config += ' - docker cp carl:/opt/carl/. .\n' build_config += ' deploy:\n' build_config += ' - provider: script\n' build_config += ' skip_cleanup: true\n' build_config += ' script: bash travis/deploy_docker.sh carl\n' s += buildConfig for stage in build_stages: s += '\n' s += ' ###\n' s += ' # Stage: {}\n'.format(stage[0]) s += ' ###\n' for config in configs: (os, os_version, compiler, build_type, task) = config os_type = 'osx' if os == 'osx' else 'linux' s += ' # {}-{} - {}\n'.format(os, os_version, build_type) build_config = '' build_config += ' - stage: {}\n'.format(stage[0]) build_config += ' os: {}\n'.format(os_type) if os_type == 'osx': build_config += ' osx_image: {}\n'.format(os_version) build_config += ' compiler: {}\n'.format(compiler) build_config += ' env: {}'.format(get_env_string(os, os_version, compiler, build_type, task)) build_config += ' install:\n' if stage[1] == 'Build1': build_config += ' - rm -rf build\n' build_config += ' - travis/skip_test.sh\n' if os_type == 'osx': build_config += ' - travis/install_osx.sh\n' build_config += ' before_script:\n' build_config += ' - python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)" # Workaround for nonblocking mode\n' build_config += ' script:\n' build_config += ' - travis/build.sh {}\n'.format(stage[1]) if os_type == 'linux': build_config += ' before_cache:\n' build_config += ' - docker cp storm:/opt/storm/. .\n' build_config += ' after_failure:\n' build_config += " - find build -iname '*err*.log' -type f -print -exec cat {} \\;\n" if stage[1] == 'Tasks': if 'Docker' in task or 'Doxygen' in task: build_config += ' deploy:\n' if 'Docker' in task: build_config += ' - provider: script\n' build_config += ' skip_cleanup: true\n' build_config += ' script: bash travis/deploy_docker.sh storm\n' if 'Doxygen' in task: build_config += ' - provider: pages\n' build_config += ' skip_cleanup: true\n' build_config += ' github_token: $GITHUB_TOKEN\n' build_config += ' local_dir: build/doc/html/\n' build_config += ' repo: moves-rwth/storm-doc\n' build_config += ' target_branch: master\n' build_config += ' on:\n' build_config += ' branch: master\n' s += buildConfig print(s)
######################### # # # Developer: Luis Regus # # Date: 11/24/15 # # # ######################### NORTH = "north" EAST = "east" SOUTH = "south" WEST = "west" class Robot: ''' Custom object used to represent a robot ''' def __init__(self, direction=NORTH, x_coord=0, y_coord=0): self.coordinates = (x_coord, y_coord) self.bearing = direction def turn_right(self): directions = { NORTH: EAST, EAST: SOUTH, SOUTH: WEST, WEST: NORTH} self.bearing = directions.get(self.bearing, NORTH) def turn_left(self): directions = { NORTH: WEST, EAST: NORTH, SOUTH: EAST, WEST: SOUTH} self.bearing = directions.get(self.bearing, NORTH) def advance(self): coords = { NORTH: (self.coordinates[0], self.coordinates[1] + 1), EAST: (self.coordinates[0] + 1, self.coordinates[1]), SOUTH: (self.coordinates[0], self.coordinates[1] - 1), WEST: (self.coordinates[0] - 1, self.coordinates[1])} self.coordinates = coords.get(self.bearing, self.coordinates) def simulate(self, movement): for m in movement: if m == 'R': self.turn_right() elif m == 'L': self.turn_left() elif m == 'A': self.advance()
north = 'north' east = 'east' south = 'south' west = 'west' class Robot: """ Custom object used to represent a robot """ def __init__(self, direction=NORTH, x_coord=0, y_coord=0): self.coordinates = (x_coord, y_coord) self.bearing = direction def turn_right(self): directions = {NORTH: EAST, EAST: SOUTH, SOUTH: WEST, WEST: NORTH} self.bearing = directions.get(self.bearing, NORTH) def turn_left(self): directions = {NORTH: WEST, EAST: NORTH, SOUTH: EAST, WEST: SOUTH} self.bearing = directions.get(self.bearing, NORTH) def advance(self): coords = {NORTH: (self.coordinates[0], self.coordinates[1] + 1), EAST: (self.coordinates[0] + 1, self.coordinates[1]), SOUTH: (self.coordinates[0], self.coordinates[1] - 1), WEST: (self.coordinates[0] - 1, self.coordinates[1])} self.coordinates = coords.get(self.bearing, self.coordinates) def simulate(self, movement): for m in movement: if m == 'R': self.turn_right() elif m == 'L': self.turn_left() elif m == 'A': self.advance()
class ToolBoxBaseException(Exception): status_code = 500 error_name = 'base_exception' def __init__(self, message): self.message = message def to_dict(self): return dict(error_name=self.error_name, message=self.message) class UnknownError(ToolBoxBaseException): status_code = 500 error_name = 'unknown_error' def __init__(self, e): self.message = '{}'.format(e) class BadRequest(ToolBoxBaseException): status_code = 400 error_name = 'bad_request' def __init__(self, message=None): self.message = message
class Toolboxbaseexception(Exception): status_code = 500 error_name = 'base_exception' def __init__(self, message): self.message = message def to_dict(self): return dict(error_name=self.error_name, message=self.message) class Unknownerror(ToolBoxBaseException): status_code = 500 error_name = 'unknown_error' def __init__(self, e): self.message = '{}'.format(e) class Badrequest(ToolBoxBaseException): status_code = 400 error_name = 'bad_request' def __init__(self, message=None): self.message = message
''' lab 8 functions ''' #3.1 def count_words(input_str): return len(input_str.split()) #print(count_words('This is a string')) #3.2 demo_str = 'Hello World!' print(count_words(demo_str)) #3.3 def find_min(num_list): min_item = num_list[0] for num in num_list: if type(num) is not str: if min_item >= num: min_item = num return(min_item) #print(find_min([1, 2, 3, 4])) #3.4 demo_list = [1, 2, 3, 4, 5, 6] print(find_min(demo_list)) #3.5 mix_list = [1, 2, 3, 4, 'a', 5, 6] print(find_min(mix_list))
""" lab 8 functions """ def count_words(input_str): return len(input_str.split()) demo_str = 'Hello World!' print(count_words(demo_str)) def find_min(num_list): min_item = num_list[0] for num in num_list: if type(num) is not str: if min_item >= num: min_item = num return min_item demo_list = [1, 2, 3, 4, 5, 6] print(find_min(demo_list)) mix_list = [1, 2, 3, 4, 'a', 5, 6] print(find_min(mix_list))
users = { 'name': 'Elena', 'age': 100, 'town': 'Varna' } for key, value in users.items(): print(key, value) for key in users.keys(): print(key) for value in users.values(): print(value)
users = {'name': 'Elena', 'age': 100, 'town': 'Varna'} for (key, value) in users.items(): print(key, value) for key in users.keys(): print(key) for value in users.values(): print(value)
class Solution: def getSum(self, a: int, b: int) -> int: # 32 bits integer max and min MAX = 0x7FFFFFFF MIN = 0x80000000 mask = 0xFFFFFFFF while b != 0: carry = a & b a, b = (a ^ b) & mask, (carry << 1) & mask return a if a <= MAX else ~(a ^ mask)
class Solution: def get_sum(self, a: int, b: int) -> int: max = 2147483647 min = 2147483648 mask = 4294967295 while b != 0: carry = a & b (a, b) = ((a ^ b) & mask, carry << 1 & mask) return a if a <= MAX else ~(a ^ mask)
CONFIG = { "main_dir": "./tests/", "results_dir": "results/", "manips_dir": "manips/", "parameters_dir": "parameters/", "tikz_dir": "tikz/" }
config = {'main_dir': './tests/', 'results_dir': 'results/', 'manips_dir': 'manips/', 'parameters_dir': 'parameters/', 'tikz_dir': 'tikz/'}
stack = [] while True: print("1. Insert Element in the stack") print("2. Remove element from stack") print("3. Display elements in stack") print("4. Exit") choice = int(input("Enter your Choice: ")) if choice == 1: if len(stack) == 5: print("Sorry, stack is already full") else: element = int(input("Please enter element: ")) stack.append(element) print(element, " inserted successfully") elif choice == 2: if len(stack) == 0: print("Sorry, stack is already empty") else: element = stack.pop() print(element, " was removed successfully") elif choice == 3: for i in range(len(stack)- 1, -1, -1): print(stack[i]) elif choice == 4: print("Thank You. See you later") break else: print("Invalid option") more = input("Do you want to continue?(y/n): ") if more == 'Y' or more == 'y': continue else: print("Thank You. See you later") break
stack = [] while True: print('1. Insert Element in the stack') print('2. Remove element from stack') print('3. Display elements in stack') print('4. Exit') choice = int(input('Enter your Choice: ')) if choice == 1: if len(stack) == 5: print('Sorry, stack is already full') else: element = int(input('Please enter element: ')) stack.append(element) print(element, ' inserted successfully') elif choice == 2: if len(stack) == 0: print('Sorry, stack is already empty') else: element = stack.pop() print(element, ' was removed successfully') elif choice == 3: for i in range(len(stack) - 1, -1, -1): print(stack[i]) elif choice == 4: print('Thank You. See you later') break else: print('Invalid option') more = input('Do you want to continue?(y/n): ') if more == 'Y' or more == 'y': continue else: print('Thank You. See you later') break
# Operations on Sets ? # Consider the following set: S = {1,8,2,3} # Len(s) : Returns 4, the length of the set S = {1,8,2,3} print(len(S)) #Length of the Set # remove(8) : Updates the set S and removes 8 from S S = {1,8,2,3} S.remove(8) #Remove of the Set print(S) # pop() : Removes an arbitrary element from the set and returns the element removed. S = {1,8,2,3} print(S.pop()) # Returs the Removed Elements of the set # clear() : Empties the set S S = {1,8,2,3} print(S.clear()) #the return is clear or None # union({8, 11}) : Returns a new set with all items from both sets. #{1,8,2,3,11} S = {1,8,2,3} print(S.union()) # intersection({8, 11}) : Returns a set which contains only items in both sets. #{8} S = {1,8,2,3} print(S.intersection())
s = {1, 8, 2, 3} s = {1, 8, 2, 3} print(len(S)) s = {1, 8, 2, 3} S.remove(8) print(S) s = {1, 8, 2, 3} print(S.pop()) s = {1, 8, 2, 3} print(S.clear()) s = {1, 8, 2, 3} print(S.union()) s = {1, 8, 2, 3} print(S.intersection())
idade = str(input("idade :")) if not idade.isnumeric(): print("oi") else: print("passou")
idade = str(input('idade :')) if not idade.isnumeric(): print('oi') else: print('passou')