content
stringlengths
7
1.05M
""" spider.unsupervised_learning sub-package __init__.py @author: kgilman Primitive that performs GRASTA to learn low-rank subspace and sparse outliers from streaming data defines the module index """ # to allow from spider.unsupervized_learning import * __all__ = [ "grasta", ]
# Copyright (c) 2018-2019 Alexander L. Hayes (@hayesall) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. def cytoscapeFormat(predType, val1, val2): """ .. versionadded:: 0.3.0 Converts inputs into the triples format used by Cytoscape. :param predType: The action which relates one or more values. :type predType: str. :param val1: The first value. :type val1: str. :param val2: The second value. :type val2: str. Cytoscape is mostly built around binary predicates: two entities (nodes) connected by a relation (edge). Because hyperedges are not implicitly built-in, this function requires three parameters. >>> cytoscapeFormat('action', 'value1', 'value2') 'value1 action value2' >>> cytoscapeFormat('friends', 'harry', 'ron') 'harry friends ron' >>> cytoscapeFormat('liked', 'person1', 'story3') 'person1 liked story3' If the outputs of this function are written to a file, it may be imported to Cytoscape as follows: 1. ``File > Import > Network > File`` (choose where you wrote the file). 2. ``Advanced Options``: Select 'Space', Uncheck 'Use first line as column names' 3. Set ``Column 1`` as ``Source Node`` (green circle). 4. Set ``Column 2`` as ``Interaction Type`` (violet triangle). 5. Set ``Column 3`` as ``Target Node`` (red target). 6. Click 'Ok' .. seealso:: "Cytoscape is an open source software platform for visualizing complex networks and integrating these with any type of attribute data." The desktop version of Cytoscape includes an option to import a network ``File > Import > Network > File``. This function may be used to create such files for visualization. http://www.cytoscape.org/ """ return val1.replace(' ', '') + ' ' + \ predType.replace(' ', '') + ' ' + \ val2.replace(' ', '')
class Document : # Default constructor def __init__ ( self , _id ): # initialize self.id = _id self.title ="" self.text= "" self.succ = dict() self.pred = dict() #Setters def setText(self,Text): self.text = Text def setTitle(self,Title): self.title = Title def addSuccessor(self,idDoc): if ( idDoc in self.succ ): self.succ[idDoc] += 1 else : self.succ[idDoc] = 1 def addPredecessor(self,idDoc): if ( idDoc in self.pred ): self.pred[idDoc] += 1 else : self.pred[idDoc] = 1 #Getters def getId (self): return self.id def getText (self): return self.text def getTitle (self): return self.title def getSucessors(self): return self.succ def getPredecessors(self): return self.pred def getJsonFormat (self): return { "Title" : self.title , "Text" : self.text , "sucessors" : self.succ , "predecessors" : self.pred }
class Calculator(): def __init__(self): pass def add(self, val1, val2): try: return val1 + val2 except: raise ValueError("Not int") def subtract(self, val1, val2): val1 = self._checker(val1) val2 = self._checker(val2) if val1 and val2: return val1 - val2 def multiply(self, val1, val2): val1 = self._checker(val1) val2 = self._checker(val2) if val1 and val2: return val1 * val2 def divide(self, val1, val2): if val2 == 0: raise ValueError("0 division error.") val1 = self._checker(val1) val2 = self._checker(val2) if val1 and val2: return val1 / val2 def _checker(self, val): if type(val) is int: return val elif type(val) is float: return val # convert string representation of number to float try: return float(val) except ValueError: return False # # convert string number to float # try: # return int(val) # except ValueError: # return False obj = Calculator() result = obj._checker("2.0") print(result)
class Torre: def __init__(self): self.id = int() self.nome = str() self.endereco = str() def cadastrar(self, id, nome, endereco): self.id = id self.nome = nome self.endereco = endereco def imprimir(self): print("ID TORRE:", self.id, " - TORRE", self.nome, " -", self.endereco)
# Copyright 2018-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. """Exposes an auto-public version of android_library""" def visible_android_library(**kwargs): """android_library that is by default public""" kwargs["visibility"] = ["PUBLIC"] android_library(**kwargs)
#!/usr/bin/env python3 # pylint: disable=C0111 def all_steps(state): result = list() for action in range(len(state[0])): if state[0][action] != 0: next_state = jump(state, action, 1) or jump(state, action, 2) if next_state: result = result + all_steps(next_state) else: result = result + [state] return result def jump(state, action, distance): destination = distance * state[0][action] + action if destination < 0 or destination >= len(state[0]): return None if state[0][destination] != 0: return None result = list(state[0]) result[destination] = result[action] result[action] = 0 return result, [action] + state[1] print("\n".join(["%s : %s" % (x[0], [i for i in reversed(x[1])]) for x in all_steps([[1, 1, 1, 0, -1, -1, -1], []]) if x[0] == [-1, -1, -1, 0, 1, 1, 1]]))
''' codegen: this is the code generator for our Cuppa3 compiler NOTE: this code generator does not need access to the symbol table, the abstraction level of the AST has been lowered already to the level of the abstract machine code ''' ######################################################################### # curr_frame_size: we use this global variable to broadcast the frame # size of the current function definition to all the statements within # the function body -- the return statement needs this information in order # to generate the proper pop frame instruction. Outside of a # function definition this value is set to None curr_frame_size = None ######################################################################### def push_args(args): if args[0] != 'LIST': raise ValueError("expected an argument list") # reversing the arg list because we need to push # args in reverse order # NOTE: reverse is an in-place op in Python ll = args[1].copy() ll.reverse() code = list() for e in ll: (ecode, eloc) = walk(e) code += ecode code += [('pushv', eloc)] return code ######################################################################### def pop_args(args): if args[0] != 'LIST': raise ValueError("expected an argument list") ll = args[1] code = list() for e in ll: code += [('popv',)] return code ######################################################################### def init_formal_args(formal_args, frame_size): ''' in order to understand this function recall that the stack in the called function after the frame has been pushed looks like this ... actual arg n actual arg n-1 ... actual arg 1 return address local var m local var m-1 local var 1 <- tsx The local vars include the formal parameters. Here the frame size is m. In order to find the location of the first actual argument we have to s kip over the frame and the return address: first actual arg: %tsx[0-m-1] second actual arg: %tsx[-1-m-1] ... nth actual arg: %tsx[-(n-1)-m-1] ''' if formal_args[0] != 'LIST': raise ValueError("expected an argument list") ll = formal_args[1] code = list() arg_ix = 0 for id in ll: (ADDR, sym) = id if ADDR != 'ADDR': raise ValueError("Expected and address.") offset = str(arg_ix - frame_size - 1) code += [('store', sym, '%tsx['+offset+']')] arg_ix -= 1 return code ######################################################################### # node functions ######################################################################### # Statements ######################################################################### def stmtlist(node): (STMTLIST, lst) = node code = list() for stmt in lst: code += walk(stmt) return code ######################################################################### def fundef_stmt(node): global curr_frame_size # unpack node (FUNDEF, (ADDR, name), formal_arglist, body, (FRAMESIZE, curr_frame_size)) = node ignore_label = label() code = list() code += [('jump', ignore_label)] code += [('#','####################################')] code += [('#','Start Function ' + name)] code += [('#','####################################')] code += [(name + ':',)] code += [('pushf', str(curr_frame_size))] code += init_formal_args(formal_arglist, curr_frame_size) code += walk(body) code += [('popf', str(curr_frame_size))] code += [('return',)] code += [('#','####################################')] code += [('#','End Function ' + name)] code += [('#','####################################')] code += [(ignore_label + ':',)] code += [('noop',)] curr_frame_size = None return code ######################################################################### def call_stmt(node): (CALLSTMT, (ADDR, name), actual_args) = node code = list() code += push_args(actual_args) code += [('call', name)] code += pop_args(actual_args) return code ######################################################################### def return_stmt(node): global curr_frame_size (RETURN, exp) = node code = list() # if return has a return value if exp[0] != 'NIL': (ecode, eloc) = walk(exp) code += ecode code += [('store', '%rvx', eloc)] code += [('popf', str(curr_frame_size))] code += [('return',)] return code ######################################################################### def assign_stmt(node): (ASSIGN, (ADDR, target), exp) = node (ecode, eloc) = walk(exp) code = list() code += ecode code += [('store', target, eloc)] return code ######################################################################### def get_stmt(node): (GET, (ADDR, target)) = node code = [('input', target)] return code ######################################################################### def put_stmt(node): (PUT, exp) = node (ecode, eloc) = walk(exp) code = list() code += ecode code += [('print', eloc)] return code ######################################################################### def while_stmt(node): (WHILE, cond, body) = node top_label = label() bottom_label = label() (cond_code, cond_loc) = walk(cond) body_code = walk(body) code = list() code += [(top_label + ':',)] code += cond_code code += [('jumpf', cond_loc, bottom_label)] code += body_code code += [('jump', top_label)] code += [(bottom_label + ':',)] code += [('noop',)] return code ######################################################################### def if_stmt(node): (IF, cond, s1, s2) = node if s2[0] == 'NIL': end_label = label(); (cond_code, cond_loc) = walk(cond) s1_code = walk(s1) code = list() code += cond_code code += [('jumpf', cond_loc, end_label)] code += s1_code code += [(end_label + ':',)] code += [('noop',)] return code else: else_label = label() end_label = label() (cond_code, cond_loc) = walk(cond) s1_code = walk(s1) s2_code = walk(s2) code = list() code += cond_code code += [('jumpf', cond_loc, else_label)] code += s1_code code += [('jump', end_label)] code += [(else_label + ':',)] code += s2_code code += [(end_label + ':',)] code += [('noop',)] return code ######################################################################### def block_stmt(node): (BLOCK, s) = node code = walk(s) return code ######################################################################### # Expressions ######################################################################### def binop_exp(node): (OP, (ADDR, target), c1, c2) = node if OP == 'PLUS': OPSYM = '+' elif OP == 'MINUS': OPSYM = '-' elif OP == 'MUL': OPSYM = '*' elif OP == 'DIV': OPSYM = '/' elif OP == 'EQ': OPSYM = '==' elif OP == 'LE': OPSYM = '=<' else: raise ValueError('unknown operation: ' + OP) (lcode, lloc) = walk(c1) (rcode, rloc) = walk(c2) code = list() code += lcode code += rcode code += [('store', target, '(' + OPSYM + ' ' + lloc + ' ' + rloc + ')')] return (code, target) ######################################################################### def call_exp(node): (CALLEXP, (ADDR, target), (ADDR, name), actual_args) = node code = list() code += push_args(actual_args) code += [('call', name)] code += pop_args(actual_args) code += [('store', target, '%rvx')] return (code, target) ######################################################################### def integer_exp(node): (INTEGER, value) = node code = list() loc = str(value) return (code, loc) ######################################################################### def addr_exp(node): (ADDR, loc) = node code = list() return (code, loc) ######################################################################### def uminus_exp(node): (UMINUS, (ADDR, target), e) = node (ecode, eloc) = walk(e) code = list() code += ecode code += [('store', target, '-' + eloc)] loc = target return (code, loc) ######################################################################### def not_exp(node): (NOT, (ADDR, target), e) = node (ecode, eloc) = walk(e) code = list() code += ecode code += [('store', target, '!' + eloc)] loc = target return (code, loc) ######################################################################### # walk ######################################################################### def walk(node): node_type = node[0] if node_type in dispatch_dict: node_function = dispatch_dict[node_type] return node_function(node) else: raise ValueError("walk: unknown tree node type: " + node_type) # a dictionary to associate tree nodes with node functions dispatch_dict = { 'STMTLIST' : stmtlist, 'FUNDEF' : fundef_stmt, 'CALLSTMT' : call_stmt, 'RETURN' : return_stmt, 'ASSIGN' : assign_stmt, 'GET' : get_stmt, 'PUT' : put_stmt, 'WHILE' : while_stmt, 'IF' : if_stmt, 'BLOCK' : block_stmt, 'CALLEXP' : call_exp, 'INTEGER' : integer_exp, 'ADDR' : addr_exp, 'UMINUS' : uminus_exp, 'NOT' : not_exp, 'PLUS' : binop_exp, 'MINUS' : binop_exp, 'MUL' : binop_exp, 'DIV' : binop_exp, 'EQ' : binop_exp, 'LE' : binop_exp, } ######################################################################### label_id = 0 def label(): global label_id s = 'L' + str(label_id) label_id += 1 return s #########################################################################
def generate_code_str(body, argname, global_name): """ Generate python code to eval() """ body = body.replace('\n', '\n ') return f"""def f({argname}): {body} output = f({global_name})"""
def double(oldimage): oldw = oldimage.getWidth() oldh = oldimage.getHeight() newim = EmptyImage(oldw*2,oldh*2) for row in range(newim.getWidth()): #// \label{lst:dib1} for col in range(newim.getHeight()): #// \label{lst:dib2} originalCol = col//2 #// \label{lst:dib3} originalRow = row//2 #// \label{lst:dib4} oldpixel = oldimage.getPixel(originalCol,originalRow) newim.setPixel(col,row,oldpixel) return newim
#Exercício 7 lista_filmes = ["Esquadrão Suicida", "Homem Aranha"] lista_jogos = ["Rocket League", "GTA"] lista_livros = ["A Culpa é das Estrelas", "O Diário de Anne Frank"] lista_esportes = ["Handebol", "Basquete"] #a) #Lista A lista_filmes.append("Harry Potter") lista_filmes.append("Velozes e Furiosos") print("Lista de filmes: {}".format(lista_filmes)) print("") #Lista B lista_jogos.append("Counter Strike") lista_jogos.append("FIFA") print("Lista de jogos: {}".format(lista_jogos)) print("") #Lista C lista_livros.append("Diário de um Banana") lista_livros.append("Volta ao mundo em 80 dias") print("Lista de livros: {}".format(lista_livros)) print("") #Lista D lista_esportes.append("Futebol") lista_esportes.append("Vôlei") print("Lista de esportes: {}".format(lista_esportes)) print("") #b) lista_geral = [] lista_geral = [lista_filmes, lista_jogos, lista_livros, lista_esportes] print("Lista Geral: {}".format(lista_geral)) print("") #c) print(lista_livros) info = int(input("A lista de livros tem {} itens, escreva qual item deseja ver. ".format(len(lista_livros)))) info = info - 1 del lista_livros[info] print("Nova lista de livros: {}".format(lista_livros)) print("") #d) print(lista_esportes) rem = int(input("A lista de esportes tem {} itens, escreva qual item deseja remover. ".format(len(lista_esportes)))) rem = rem - 1 del lista_esportes[rem] print("Nova lista de esportes: {}".format(lista_esportes)) print("") #e) Disciplina = ['História', 'Geografia', 'Física'] lista_geral.append(Disciplina) print(lista_geral)
# 1 stringHamlet_1 = 'To be or not to be.' # 2 print(len(stringHamlet_1)) # 3 stringHamlet_2 = 'That is the question.' # 4 stringHamlet = stringHamlet_1 + stringHamlet_2 # 5 stringHamletTrinity = stringHamlet * 3
""" Task Score: 100% Complexity: O(N * log(N)) """ def is_triangle(a, b, c): # apply given formulate to triplet return a + b > c and \ b + c > a and \ a + c > b def solution(A): """ I am sure there is a mathematical proof for this somewhere, however I thought by looking at the problem that if there are three values that match the given criteria, they are most likely to be found in numbers that are very close together. Following that line of thought, I have solved this as follows: 1. Order the array (ascending or descending does not matter here) 2. Do a single pass and check consecutive values """ # sort array A = sorted(A) for i in range(len(A) - 2): # check triplet if is_triangle(*A[i:i + 3]): return 1 return 0
################################################################################### # # Copyright (C) 2020 Cetmix OÜ # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU LESSER 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 LESSER GENERAL PUBLIC LICENSE for more details. # # You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE # along with this program. If not, see <http://www.gnu.org/licenses/>. # ################################################################################### { "name": "Mail Messages Easy." " Show all messages, Show sent messages, Reply to message, Edit message," " Forward message, Quote message, Move message" " Email client style for messages views and more", "version": "14.0.7.0.0", "summary": """Read and manage all Odoo messages in one place!""", "author": "Ivan Sokolov, Cetmix", "category": "Discuss", "license": "LGPL-3", "website": "https://cetmix.com", "description": """ Show all messages, Show sent message, Reply to messages, Forward messages, Edit messages, Delete messages, Move messages, Quote messages """, "depends": ["base", "mail"], "live_test_url": "https://demo.cetmix.com", "images": ["static/description/banner.png"], "data": [ "security/groups.xml", "security/ir.model.access.csv", "security/rules.xml", "data/data.xml", "views/prt_mail.xml", "views/conversation.xml", "views/partner.xml", "views/res_config_settings.xml", "views/actions.xml", "views/templates.xml", "wizard/message_edit.xml", "wizard/message_partner_assign.xml", "wizard/message_move.xml", "wizard/mail_compose_message.xml", ], "installable": True, "application": True, "auto_install": False, }
# For defining [Topic]hint_type, [Question]hint_type, [NLP_hints]hint_type HINT_TYPE_CHOICES = ( ('NONE', 'No hint'), ('WHERE', 'Where'), ('WHO', 'Who'), ('HOW MANY', 'How many'), ('WHEN', 'When'), ) # nlp_exporter uses for requesting all available hints from NLP-Hints service QUESTION_TYPES = ( { 'ID': 1, 'Question': 'Where did it happen?' }, { 'ID': 2, 'Question': 'Who was there?' }, { 'ID': 3, 'Question': 'How many were there?' }, { 'ID': 4, 'Question': 'When did it happen?' } ) # nlp_importer uses for mapping question_id back to hint_type QUESTION_TO_HINT_TYPE = { 1: 'WHERE', 2: 'WHO', 3: 'HOW MANY', 4: 'WHEN' }
#!/usr/bin/env python # -*- coding: utf-8 -*- # Created by pat on 5/11/18 """ .. currentmodule:: modlit.testing .. moduleauthor:: Pat Daburu <pat@daburu.net> This package contains resources for testing your data model. """
""" Private fields are specified by prefixing an attribute's name with a double underscore. They can be accessed directly by methods of the containing class Private attrib behaviour is implemented witha a simple transformation of the attribute name. __private_field transforms to _ClassName__private_field. Why doesn't the syntax for private attributes actually enforce strict visibility? -> We are all consenting adults here ROFLOL """ class MyObject(object): def __init__(self): self.public_field = 5 self.__private_field = 10 def get_private_field(self): return self.__private_field class MyOtherObject(object): def __init__(self): self.__private_field = 71 @classmethod def get_private_field_of_instance(cls, instance): return instance.__private_field class MyParentObject(object): """A subclass can not access its parents class's private field """ def __init__(self): self.__private_field = 71 class MyChildObject(MyParentObject): def get_private_field(self): return self.__private_field def main(): foo = MyObject() assert foo.public_field == 5 assert foo.get_private_field() == 10 bar = MyOtherObject() assert bar.get_private_field_of_instance(bar) == 71 baz = MyChildObject() # trying to access a private field that is set by the parent # will result in an attribute error try: baz.get_private_field() except AttributeError as e: print('A child can not access its parents private fields') # we can access the private field of the parent using the name transform assert baz._MyParentObject__private_field == 71 print(baz.__dict__) # {'_MyParentObject__private_field': 71 if __name__ == '__main__': main()
## TuplesAndLists # # Demonstration of techniques with tuples and lists # Tuples cannot be changed, values enclosed with parenthesis. # Tuples can be used as replacement for constant arrays # available in other languages. # Lists can be modified. list1 = [ 10, 20, 30, 40, 50, 5, 2 ] tuple1 = ( 10, 20, 30, 40, 50, 5, 2 ) list2 = [ 'apple', 'orange', 'banana' ] tuple2 = ( 'apple', 'orange', 'banana' ) list3 = [ 10, 'apple', 30 ] tuple3 = ( 10, 'apple', 30 ) list4 = [ 'aba', 'a1a', 'b5c', 'eaa' ] # Two dimension list list6 = [ [ 81, 82, 83 ], # Row 0 [ 84, 85, 86 ], # Row 1 [ 87, 88, 89 ] ] # Row 2 # Tuple using key-pair as dictionary lookup Countries = { 'United Kingdom': 'London', 'France' : 'Paris', 'Spain' : 'Madrid' } ## Tuple returning values ###################################################### # Show capital print( Countries[ 'France' ] ) # Country not found - gives runtime error print( Countries[ 'USA'] ) ## List adding elements ######################################################## # Appending to single dimension list print( list1 ) list1.append( 80 ) print( list1 ) # Appending to two dimension list - list will have 4 columns instead of 3 print( list6 ) list6[ 0 ].append( 10 ) list6[ 1 ].append( 11 ) list6[ 2 ].append( 12 ) print( list6 ) ## List iteration ############################################################## # Print full list print( list1 ) print( tuple1 ) # Can iterate manually - for integer list convert to str for printing for listIndex, listItem in enumerate( list1 ): print( 'Index: ' + str( listIndex ) + ' ListItem: ' + str( listItem ) ) # Iterating a string list for listIndex, listItem in enumerate( list2 ): print( 'Index: ' + str( listIndex ) + ' ListItem: ' + listItem ) # Iterate two dimension list for rowIndex, rowItem in enumerate( list6 ): print( '---' ) for colIndex, colItem in enumerate( rowItem ): print( 'Row:' + str( rowIndex ) + ' Col: ' + str( colIndex ) + ' Value: ' + str( colItem ) ) ## List Min/Max/Sum ############################################################ # Get maximum element print( 'Max list ' + str( max( list1 ) ) ) print( 'Max tuple ' + str( max( tuple1 ) ) ) # Get minimum element print( 'Min list ' + str( min( list1 ) ) ) print( 'Min tuple ' + str( min( tuple1 ) ) ) # For string elements shows highest value alphabetically print( 'Max string list ' + str( max( list2 ) ) ) print( 'Max string tuple ' + str( max( tuple2 ) ) ) ## List element conversion ##################################################### # Convert elements from integer to string print( list3 ) liststr1 = [] for listItem in list3: liststr1.append( str( listItem ) ) print( liststr1 ) # We can assign new list to old list list3 = liststr1 # Now we can get max, was failling because elements were of different data types print( 'Max list ' + str( max( list3 ) ) ) ## List sorting ################################################################ # Sort list using sort list1.sort() print( list1 ) # Sort list using sort, reverse list1.sort( reverse = True ) print( list1 ) # Sort list using sorted list1a = sorted( list1 ) print( list1a ) # Custom sort function - strings are 0 offset based def sortOnSecondElement( AElement ): return AElement[ 1 ] # Custom sort by calling a function for element comparison - sorting on second element list4.sort( key = sortOnSecondElement ) print( list4 )
DEFAULT = False called = DEFAULT def reset_app(): global called called = DEFAULT def generate_sampledata(options): global called assert called == DEFAULT called = True
""" 16120. PPAP 작성자: xCrypt0r 언어: Python 3 사용 메모리: 36,496 KB 소요 시간: 532 ms 해결 날짜: 2021년 10월 31일 """ def main(): s = input() q = [] for i in range(len(s)): q.append(s[i]) while len(q) >= 4 and q[-4:] == ['P', 'P', 'A', 'P']: del q[-3:] print('PPAP' if q == ['P'] else 'NP') if __name__ == '__main__': main()
# Use the file name mbox-short.txt as the file name fname = input("Enter file name: ") fh = open(fname) x=0 tot=0 for line in fh: if not line.startswith("X-DSPAM-Confidence:") : continue pos=line.find(":") l=line[pos+1:] l=l.strip() tot+=float(l) x+=1 print("Average spam confidence: "+str(tot/x))
# Definition for singly-linked list. class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next class Solution: def reverseList(self, head: ListNode) -> ListNode: if not head or not head.next: return head p = self.reverseList(head.next) head.next.next = head # main part - refer to notes head.next = None return p if __name__ == "__main__": a = ListNode(1) b = ListNode(2) c = ListNode(3) d = ListNode(4) e = ListNode(5) a.next = b b.next = c c.next = d d.next = e head = Solution().reverseList(a) while head: print(head.val) head = head.next
_poolinfo_reply_EN = """ <b><code>{ticker}</code> {pool_name}</b> <i>{desc}</i> 🌐{homepage} <b>🆔 Pool ID</b> <code>{pool_id}</code> <b> ℹ️ Pool info</b> rank: <code>#️{pool_rank}</code> pledge: <code>{pledge} ₳</code> cost: <code>{cost} ₳</code> margin: <code>{margin_perc}%</code> <b>📈 Metrics</b> saturation: <code>{saturat:.2f}% {saturat_symbol}</code> controlled stake: <code>{rel_stake_perc:.3f}%</code> active stake: <code>{active_stake} ₳</code> ↳ delegators: <code>{n_active_delegators}</code> live stake: <code>{live_stake} ₳</code> ↳ delegators: <code>{n_live_delegators}</code> <b>🎲 Blocks</b> expected blocks (this /epoch): <code>~{expected_blocks:.1f}</code> lifetime blocks: <code>{blocks}{block_produced_symbol}</code> <i>Live metrics updated {updated_time_ago} ago.</i> """ # rewards: <code>{rewards} ₳</code> _poolinfo_reply_PT = """ <b><code>{ticker}</code> {pool_name}</b> <i>{desc}</i> 🌐{homepage} <b>🆔 Identificador da pool</b> <code>{pool_id}</code> <b>ℹ️ Informações</b> rank: <code>#️{pool_rank}</code> pledge: <code>{pledge} ₳</code> custo: <code>{cost} ₳</code> margem: <code>{margin_perc}%</code> <b>📈 Métricas</b> saturação: <code>{saturat:.2f}% {saturat_symbol}</code> stake controlado: <code>{rel_stake_perc:.3f}%</code> stake ativo: <code>{active_stake} ₳</code> ↳ delegadores: <code>{n_active_delegators}</code> stake atual: <code>{live_stake} ₳</code> ↳ delegadores: <code>{n_live_delegators}</code> <b>🎲 Blocos</b> blocos esperados (nesta época): <code>~{expected_blocks:.1f}</code> total de blocos produzidos: <code>{blocks}{block_produced_symbol}</code> <i>Métricas atualizadas {updated_time_ago} atrás.</i> """ #recompensas por ADA delegada: <code>{rewards} ₳</code> _poolinfo_reply_KR = """ <b><code>{ticker}</code> {pool_name}</b> <i>{desc}</i> 🌐{homepage} <b>🆔 풀 식별자</b> <code>{pool_id}</code> <b>ℹ️ 풀 정보</b> 순위: <code>#️{pool_rank}</code> 담보량: <code>{pledge} ₳</code> 풀고정수수료: <code>{cost} ₳</code> 풀운영수수료: <code>{margin_perc}%</code> <b>📈 상세정보</b> 포화도: <code>{saturat:.2f}% {saturat_symbol}</code> 위임점유율: <code>{rel_stake_perc:.3f}%</code> 활성 위임량: <code>{active_stake} ₳</code> ↳ 위임자수: <code>{n_active_delegators}</code> 현재 위임량: <code>{live_stake} ₳</code> ↳ 위임자수: <code>{n_live_delegators}</code> <b>🎲 블록</b> 예측 블록수 (해당 에포크): <code>~{expected_blocks:.1f}</code> 총 생성 블록수: <code>{blocks}{block_produced_symbol}</code> <i>실시간 메트릭스 업데이트 {updated_time_ago} 전</i> """ # 보상: <code>{rewards} ₳</code> _poolinfo_reply_JP = """ <b><code>{ticker}</code> {pool_name}</b> <i>{desc}</i> 🌐{homepage} <b>🆔 プール識別子</b> <code>{pool_id}</code> <b>ℹ️ プール情報</b> 順位: <code>#️{pool_rank}</code> 担保量: <code>{pledge} ₳</code> プール固定手数料: <code>{cost} ₳</code> プール運営手数料: <code>{margin_perc}%</code> <b>📈 メトリックス</b> 飽和度: <code>{saturat:.2f}% {saturat_symbol}</code> 現在ステーキング占め率: <code>{rel_stake_perc:.3f}%</code> 活性委任量: <code>{active_stake} ₳</code> ↳ 委任者数: <code>{n_active_delegators}</code> 現在委任量: <code>{live_stake} ₳</code> ↳ 委任者数: <code>{n_live_delegators}</code> <b>🎲 ブロック</b> 予測ブロック数 (当該エポクの): <code>~{expected_blocks:.1f}</code> 生成ブロックの総数: <code>{blocks}{block_produced_symbol}</code> <i>ライブメトリックスアップデート{updated_time_ago} 前</i> """ # 報酬: <code>{rewards} ₳</code> poolinfo_reply = { 'EN': _poolinfo_reply_EN, 'PT': _poolinfo_reply_PT, 'KR': _poolinfo_reply_KR, 'JP': _poolinfo_reply_JP} ############################################################################### _poolinfo_reply_error_EN = """ Sorry, I didn't find the <code>{ticker}</code> pool 😞 """ _poolinfo_reply_error_PT = """ Desculpa, não achei a pool <code>{ticker}</code> 😞 """ _poolinfo_reply_error_KR = """ 죄송합니다 풀 <code>{ticker}</code> 를 찾을 수 없습니다 😞 """ _poolinfo_reply_error_JP = """ ごめんなさい。<code>{ticker}</code>プールが見つかりません 😞 """ poolinfo_reply_error = { 'EN': _poolinfo_reply_error_EN, 'PT': _poolinfo_reply_error_PT, 'KR': _poolinfo_reply_error_KR, 'JP': _poolinfo_reply_error_JP} ############################################################################### _poolinfo_reply_wait_EN = """ I'm searching for the pool, one moment please... ⌛ """ _poolinfo_reply_wait_PT = """ Estou procurando a pool, um momento por favor... ⌛ """ _poolinfo_reply_wait_KR = """ 풀을 검색하는 중... 조금만 기다려 주세요. ⌛ """ _poolinfo_reply_wait_JP = """ 今検索中。もう少しお待ちを… ⌛ """ poolinfo_reply_wait = { 'EN': _poolinfo_reply_wait_EN, 'PT': _poolinfo_reply_wait_PT, 'KR': _poolinfo_reply_wait_KR, 'JP': _poolinfo_reply_wait_JP} ############################################################################### _change_lang_reply_EN = """ ✅ Your language was modified successfully! """ _change_lang_reply_PT = """ ✅ Seu idioma foi alterado com sucesso! """ _change_lang_reply_KR = """ ✅ 한국어로의 전환이 성공했습니다! """ _change_lang_reply_JP = """ ✅ 日本語への変更ができました! """ change_lang_reply = { 'EN': _change_lang_reply_EN, 'PT': _change_lang_reply_PT, 'KR': _change_lang_reply_KR, 'JP': _change_lang_reply_JP} ############################################################################### _change_default_pool_reply_EN = """ ✅ Your default pool was modified successfully! """ _change_default_pool_reply_PT = """ ✅ Sua pool padrão foi alterada com sucesso! """ _change_default_pool_reply_KR = """ ✅ 기본 풀 변경에 성공했습니다! """ _change_default_pool_reply_JP = """ ✅ デフォルトプールが変更されました! """ change_default_pool_reply = { 'EN': _change_default_pool_reply_EN, 'PT': _change_default_pool_reply_PT, 'KR': _change_default_pool_reply_KR, 'JP': _change_default_pool_reply_JP} ############################################################################### _welcome_reply_EN = """ Hello! I'm <b>CardaBot</b> 🤖, a Cardano information bot developed by <b>EveryBlock Studio</b> (ticker: <code>EBS</code>). These are the commands I understand for now: /start /pool TICKER /epoch /help /language LANG <code> : LANG = [EN, PT, JP, KR]</code> """ _welcome_reply_PT = """ Olá! Sou o <b>CardaBot</b> 🤖, um bot de informações da rede Cardano desenvolvido pela <b>EveryBlock Studio</b> (ticker: <code>EBS</code>). Esses são os comandos que eu entendo por enquanto: /start /pool TICKER /epoch /help /language LANG <code> : LANG = [EN, PT, JP, KR]</code> """ _welcome_reply_KR = """ 안녕하세요 저는 <b>CardaBot</b> 🤖입니다. 저는 <b>EveryBlock Studio</b> (ticker: <code>EBS</code>) 개발된 카르다노 정보 봇입니다. 아래의 명령어를 입력하실 수 있습니다. /start /pool 풀 티커 /epoch /help /language 언어 <code> : LANG = [EN, PT, JP, KR]</code> """ _welcome_reply_JP = """ こんにちは! 私は <b>CardaBot</b> 🤖です。 私は <b>EveryBlock Studio</b> (ticker: <code>EBS</code>)が開発したカルダノ情報ボットです。 現在、以下のコマンドが入力できます: /start /pool プールティッカー /epoch /help /language 言語 <code> : LANG = [EN, PT, JP, KR]</code> """ welcome_reply = { 'EN': _welcome_reply_EN, 'PT': _welcome_reply_PT, 'KR': _welcome_reply_KR, 'JP': _welcome_reply_JP} ############################################################################### _help_reply_EN = """ These are the commands I understand for now: /start /pool TICKER /epoch /help /language LANG <code> : LANG = [EN, PT, JP, KR]</code> """ _help_reply_PT = """ Esses são os comandos que eu entendo por enquanto: /start /pool TICKER /epoch /help /language LANG <code> : LANG = [EN, PT, JP, KR]</code> """ _help_reply_KR = """ 아래의 명령어를 입력하실 수 있습니다. /start /pool 풀 티커 /epoch /help /language 언어 <code> : LANG = [EN, PT, JP, KR]</code> """ _help_reply_JP = """ 現在、以下のコマンドが入力できます: /start /pool プールティッカー /epoch /help /language 言語 <code> : LANG = [EN, PT, JP, KR]</code> """ help_reply = { 'EN': _help_reply_EN, 'PT': _help_reply_PT, 'KR': _help_reply_KR, 'JP': _help_reply_JP} ############################################################################### _epoch_reply_EN = """ 🔄 <b>Epoch progress</b> <code>{progress_bar} {perc:.1f}%</code> current epoch: <code>{current_epoch}</code> blocks: <code>{current_block}/21600</code> remaining time: <code>{remaining_time}</code> 💰 <b>Stake info</b> active stake: <code>{active_stake} ₳</code> """ _epoch_reply_PT = """ 🔄 <b>Progresso da época</b> <code>{progress_bar} {perc:.1f}%</code> época atual: <code>{current_epoch}</code> blocos: <code>{current_block}/21600</code> tempo restante: <code>{remaining_time}</code> 💰 <b>Informação do stake</b> stake ativo: <code>{active_stake} ₳</code> """ _epoch_reply_KR = """ 🔄 <b>에포크 진행 상황</b> <code>{progress_bar} {perc:.1f}%</code> 현재 에포크: <code>{current_epoch}</code> 블록수: <code>{current_block}/21600</code> 에포크 남은 시간: <code>{remaining_time}</code> 💰 <b>위임 정보</b> 활성 위임량: <code>{active_stake} ₳</code> """ _epoch_reply_JP = """ 🔄 <b>エポク状況</b> <code>{progress_bar} {perc:.1f}%</code> 現在のエポク: <code>{current_epoch}</code> ブロック数: <code>{current_block}/21600</code> エポク残り時間: <code>{remaining_time}</code> 💰 <b>委任量情報</b> 活性委任量: <code>{active_stake} ₳</code> """ epoch_reply = { 'EN': _epoch_reply_EN, 'PT': _epoch_reply_PT, 'KR': _epoch_reply_KR, 'JP': _epoch_reply_JP} ############################################################################### _day_text_EN = "day" _day_text_PT = "dia" _day_text_KR = "일" _day_text_JP = "日" day_text = { 'EN': _day_text_EN, 'PT': _day_text_PT, 'KR': _day_text_KR, 'JP': _day_text_JP} ############################################################################### _days_text_EN = "days" _days_text_PT = "dias" _days_text_KR = "일" _days_text_JP = "日" days_text = { 'EN': _days_text_EN, 'PT': _days_text_PT, 'KR': _days_text_KR, 'JP': _days_text_JP}
# https://leetcode.com/problems/3sum/ #%% nums = [-1,0,1,2,-1,-4] target = 0 #%% def threeSum(nums: list): nums.sort() indeces = [] values = [] uniqueIndeces = {} #need to stop when I reach len(nums) - 2 because that I am going to deal with 2 pointers for ind in range(0, len(nums) - 2): lowInd = ind + 1 highInd = len(nums) - 1 while(lowInd < highInd): sum_value = nums[ind] + nums[lowInd] + nums[highInd] #print(sum_value) if sum_value == 0: if str(nums[ind]) + ' ' + str(nums[lowInd]) + ' ' + str(nums[lowInd]) not in uniqueIndeces: uniqueIndeces[str(nums[ind]) + ' ' + str(nums[lowInd]) + ' ' + str(nums[lowInd])] = [ind, lowInd, highInd] indeces.append([ind, lowInd, highInd]) values.append([nums[ind], nums[lowInd], nums[highInd]]) if sum_value > 0: highInd -= 1 else: lowInd += 1 return values threeSum(nums) # %%
input = """ c num blocks = 1 c num vars = 180 c minblockids[0] = 1 c maxblockids[0] = 180 p cnf 180 795 5 49 137 0 -146 -16 161 0 -116 106 -77 0 28 -33 -87 0 -70 -56 -28 0 123 76 88 0 -160 128 45 0 -29 169 180 0 -96 -69 100 0 56 82 -38 0 -14 -108 -88 0 -147 -93 4 0 -130 6 38 0 -50 -149 8 0 142 -96 -68 0 -104 47 168 0 159 148 -128 0 92 111 31 0 -53 -137 65 0 -55 147 -42 0 24 127 92 0 108 -13 171 0 -73 -41 150 0 -46 -29 -179 0 28 52 -166 0 2 -94 37 0 154 -121 163 0 3 167 135 0 -86 171 -168 0 -63 -39 -100 0 158 -50 -151 0 102 158 32 0 -69 173 49 0 112 -114 -125 0 65 -23 -163 0 -122 -110 -15 0 -46 -8 -136 0 -103 -39 -96 0 85 -162 74 0 -25 121 -37 0 -50 -85 -147 0 25 14 155 0 62 -70 124 0 -62 -160 -83 0 116 -137 13 0 166 62 61 0 56 53 3 0 -143 82 20 0 100 89 53 0 95 64 -142 0 176 -74 -39 0 155 156 163 0 14 -96 32 0 -88 -79 120 0 95 152 70 0 75 149 -50 0 92 71 -156 0 -41 -155 55 0 -54 -144 -101 0 60 -38 -75 0 168 127 109 0 52 98 -126 0 171 129 -148 0 -146 167 -22 0 -39 -137 -76 0 90 -96 12 0 -132 110 -124 0 130 -170 -82 0 124 163 179 0 144 -4 108 0 -82 -144 -71 0 156 15 -93 0 20 -83 -78 0 136 18 42 0 -65 31 -41 0 -21 -155 -138 0 32 -131 112 0 90 112 -66 0 153 -52 -175 0 -86 71 -96 0 -73 68 -3 0 -11 29 126 0 -38 155 98 0 150 127 146 0 120 -136 108 0 47 179 155 0 169 158 129 0 15 75 72 0 169 137 64 0 -14 -115 49 0 -51 53 -172 0 -2 -23 -33 0 -79 148 2 0 -27 -2 -73 0 157 168 -71 0 -113 66 14 0 -77 -42 -12 0 -39 99 -5 0 -163 -21 81 0 -2 -163 71 0 11 126 -144 0 -34 159 -43 0 94 102 178 0 -112 49 -133 0 79 30 167 0 -104 -103 -28 0 -116 -125 -107 0 -167 -62 130 0 53 55 48 0 77 21 114 0 -31 138 -117 0 -25 -88 -127 0 66 -14 -29 0 66 -89 159 0 67 22 -14 0 110 4 -117 0 -8 -69 83 0 142 -133 94 0 61 146 -38 0 136 165 -168 0 142 -40 83 0 103 50 165 0 -10 -154 73 0 122 50 -48 0 -170 -164 24 0 83 -53 -61 0 7 -103 16 0 81 -106 35 0 80 -106 178 0 161 173 -137 0 -87 -145 2 0 30 136 94 0 59 -123 -61 0 -28 -102 136 0 -34 -175 -55 0 138 2 77 0 36 17 -175 0 -123 -171 93 0 92 -149 -180 0 125 118 -59 0 124 -30 -43 0 8 -82 14 0 166 -144 81 0 -45 31 173 0 -106 -43 -67 0 87 113 -107 0 78 94 -52 0 -165 12 103 0 155 -31 163 0 178 -87 123 0 102 17 -104 0 1 -167 -104 0 -160 13 -47 0 -77 -149 24 0 6 -76 -44 0 -164 93 -82 0 95 96 8 0 -81 -24 94 0 -55 -51 176 0 -158 155 175 0 -158 -166 -79 0 -114 -10 -14 0 140 -46 70 0 -32 97 -3 0 166 38 -133 0 120 170 13 0 102 -140 -150 0 -179 60 -58 0 -124 168 46 0 -30 122 -124 0 25 -91 79 0 -80 -14 119 0 -143 -44 86 0 114 -148 15 0 20 137 -78 0 -41 6 106 0 62 104 -83 0 37 -176 92 0 65 74 64 0 86 33 120 0 -180 166 -125 0 -58 17 141 0 -173 -95 -154 0 69 179 78 0 -178 126 -162 0 75 97 25 0 156 78 57 0 -93 111 6 0 -40 -29 -179 0 125 51 22 0 36 73 53 0 -167 99 -117 0 -122 130 72 0 56 51 134 0 65 66 -150 0 -119 39 -135 0 143 152 -111 0 -17 25 7 0 170 30 -11 0 -130 36 161 0 -180 -18 -40 0 66 -28 159 0 13 144 -21 0 -168 80 -161 0 153 -73 -30 0 33 -171 173 0 114 124 -148 0 -156 32 -128 0 179 164 -133 0 -151 -157 162 0 -72 -170 -147 0 10 119 75 0 -29 -12 -50 0 -131 -130 -81 0 -171 23 -162 0 102 61 23 0 -107 -67 -52 0 85 -73 15 0 -63 128 9 0 98 -68 154 0 29 111 -156 0 -118 99 -15 0 8 54 -174 0 -151 174 133 0 -155 139 -101 0 -6 67 164 0 37 -118 -46 0 -139 86 -25 0 37 5 -154 0 -46 134 141 0 87 -111 52 0 129 -131 -91 0 -120 126 -8 0 63 38 -70 0 -65 -89 -145 0 101 -1 57 0 -161 -115 -162 0 7 157 39 0 -42 174 180 0 -20 53 14 0 -177 75 112 0 105 165 -26 0 10 -119 -60 0 -70 102 -8 0 151 -134 113 0 -116 75 175 0 57 -43 133 0 -161 163 159 0 44 -26 -110 0 -91 -118 -22 0 133 46 -105 0 89 144 -133 0 41 153 113 0 -102 -70 -111 0 -93 131 -5 0 108 55 129 0 22 -115 173 0 122 -151 97 0 139 -36 -71 0 48 -173 -59 0 -91 -144 -71 0 4 -146 -23 0 83 -80 3 0 126 -74 -60 0 74 93 -101 0 78 29 124 0 83 -79 89 0 5 20 88 0 30 -154 67 0 -175 -55 -31 0 72 40 34 0 -159 -161 -106 0 175 57 72 0 -53 106 6 0 -72 -71 118 0 -30 169 -116 0 75 -160 88 0 -41 -38 162 0 -81 144 94 0 50 107 -59 0 15 -27 -56 0 114 -3 -15 0 180 -83 -119 0 82 35 -30 0 -47 148 127 0 -177 56 -178 0 -37 -175 -96 0 -177 -23 36 0 156 -108 -112 0 9 24 -112 0 99 -131 -124 0 -91 26 -22 0 94 82 175 0 -120 136 105 0 -156 168 26 0 -80 -24 128 0 167 106 10 0 77 161 62 0 -30 105 -86 0 170 179 -126 0 -9 -62 -104 0 41 52 1 0 136 -85 28 0 -140 146 -77 0 -62 75 -160 0 -23 106 -141 0 -101 -95 120 0 -140 72 1 0 -22 -161 -46 0 -162 -139 136 0 25 70 136 0 20 118 60 0 162 -45 -96 0 132 -98 -164 0 -18 -141 123 0 -44 65 177 0 -37 -129 -145 0 -37 -92 110 0 76 68 -111 0 144 -51 -155 0 93 94 98 0 49 3 8 0 -108 -43 -110 0 -20 132 71 0 -26 73 44 0 23 72 -5 0 117 71 -22 0 -25 47 157 0 -176 -86 -172 0 115 57 -135 0 -67 -140 139 0 125 165 172 0 109 67 -17 0 125 -87 -133 0 78 -33 25 0 -89 -116 37 0 137 127 42 0 -64 -25 -161 0 120 35 -141 0 71 111 14 0 106 160 -89 0 96 180 -41 0 109 65 -15 0 58 152 164 0 33 -79 74 0 -169 -71 172 0 -11 -163 -17 0 -22 76 2 0 -42 27 83 0 103 27 110 0 178 121 -110 0 -2 -128 166 0 -122 112 8 0 58 -143 -172 0 106 80 17 0 51 178 -82 0 -4 -162 -72 0 -50 -94 146 0 -20 138 -12 0 -135 -134 36 0 -166 32 37 0 39 -156 168 0 177 -173 -108 0 -52 66 -68 0 -74 -164 -11 0 120 168 -53 0 -63 1 130 0 50 56 -61 0 83 110 -101 0 51 -169 105 0 67 78 -179 0 -130 -177 -46 0 119 20 -48 0 -129 -26 168 0 162 105 -70 0 32 -38 10 0 142 145 -72 0 -37 -76 173 0 -35 79 61 0 121 -113 -35 0 145 -72 98 0 -90 -79 -121 0 11 92 -42 0 -177 144 -109 0 -33 -3 177 0 -151 77 -131 0 -138 175 -101 0 41 -49 -40 0 -7 71 -118 0 -167 -11 105 0 7 85 69 0 -122 -145 17 0 -149 28 -17 0 -111 78 27 0 172 -89 174 0 138 92 -174 0 88 -59 15 0 87 -26 47 0 -73 22 -133 0 -180 -144 -8 0 -19 155 55 0 8 102 -151 0 -55 -81 69 0 -142 -46 -80 0 -156 -24 146 0 92 72 -42 0 65 -37 -88 0 -177 -66 25 0 -164 166 38 0 126 53 -159 0 159 142 -29 0 -105 23 76 0 -44 133 180 0 -169 -16 -94 0 -103 -70 -112 0 -125 -135 -131 0 -7 21 -22 0 173 174 -18 0 146 32 106 0 -155 130 -127 0 -29 109 9 0 -95 -25 149 0 -59 162 -160 0 -20 33 163 0 -90 -56 -48 0 72 35 26 0 178 -87 -125 0 -144 -107 -122 0 -128 -71 -31 0 -20 -174 50 0 134 -13 -47 0 154 119 24 0 -144 173 -69 0 -61 -8 179 0 -7 -86 -160 0 170 -65 151 0 -88 -30 -35 0 -176 -8 49 0 -135 -44 114 0 -156 -61 -66 0 89 159 77 0 -22 -168 -8 0 -2 -119 -89 0 58 -82 137 0 170 108 -86 0 51 168 -62 0 -114 171 144 0 173 5 40 0 -17 -149 176 0 -114 -8 -42 0 -178 157 -46 0 -72 -82 -80 0 -136 -98 -2 0 39 -85 157 0 -10 104 -25 0 -86 -114 -102 0 -127 -109 -167 0 36 -164 -43 0 180 -7 162 0 -171 -145 175 0 12 177 -69 0 27 -91 159 0 -100 -105 -102 0 90 85 -119 0 75 30 157 0 -148 175 124 0 -106 -57 -133 0 -134 102 -129 0 -55 16 90 0 160 -120 49 0 153 -135 -71 0 87 -85 -27 0 3 -67 -10 0 -75 -161 51 0 17 67 -161 0 180 82 -139 0 87 102 96 0 144 6 -174 0 155 -32 -102 0 66 -105 -8 0 163 -173 -24 0 4 109 -73 0 -126 -53 175 0 98 156 99 0 61 -59 -71 0 -65 -102 -37 0 -40 -157 -179 0 -130 -110 -64 0 84 28 4 0 18 58 -175 0 115 -140 -141 0 14 65 24 0 101 -107 165 0 -9 154 -58 0 -16 -10 49 0 143 125 -174 0 27 99 -31 0 29 -94 -20 0 -173 22 -75 0 -124 7 -131 0 23 -147 110 0 58 -78 132 0 148 52 157 0 -101 176 -147 0 -87 93 -178 0 -90 169 121 0 5 -27 36 0 -121 144 171 0 -132 -22 31 0 155 27 173 0 -6 125 -32 0 -28 19 112 0 -93 4 77 0 -122 4 -131 0 75 15 -170 0 -94 -54 -100 0 4 50 163 0 -180 58 -5 0 154 54 -72 0 164 -66 -69 0 45 -77 117 0 59 -111 67 0 11 82 10 0 75 88 95 0 -12 -49 171 0 3 83 -12 0 2 153 -176 0 -46 110 64 0 -72 -81 -93 0 117 12 -28 0 75 127 -66 0 -54 -95 -72 0 155 133 148 0 40 156 -176 0 -114 175 95 0 -142 -169 135 0 177 -39 -143 0 162 -64 95 0 41 14 -6 0 114 -47 82 0 110 -70 25 0 -71 16 156 0 20 -96 60 0 16 -83 63 0 -165 -158 -50 0 160 -99 102 0 -55 110 66 0 1 -100 -6 0 34 -160 -100 0 172 54 -175 0 111 -152 99 0 -100 -139 -2 0 61 -58 84 0 121 59 36 0 -69 106 156 0 179 54 -120 0 -81 7 23 0 116 111 130 0 61 45 -149 0 -5 -7 -41 0 -124 -19 48 0 164 -50 -32 0 172 -49 -23 0 -121 -15 -124 0 -2 152 118 0 174 -132 18 0 151 -65 -19 0 59 131 18 0 -86 173 110 0 -94 -27 -151 0 47 24 -161 0 55 -91 -95 0 73 -15 -158 0 93 76 -159 0 -132 -29 81 0 130 165 -122 0 169 47 174 0 -152 -75 39 0 180 9 -107 0 -39 -50 -55 0 104 113 -40 0 127 -174 131 0 117 130 -77 0 -178 -27 168 0 -121 143 73 0 15 -141 -60 0 127 116 32 0 -146 92 50 0 128 72 -32 0 -167 -118 128 0 75 128 -155 0 -155 -75 -131 0 -137 176 -139 0 54 130 37 0 165 34 -68 0 22 2 -47 0 -178 -16 80 0 -170 175 100 0 -73 119 6 0 -159 -69 -88 0 7 169 32 0 -81 166 -21 0 -80 23 -94 0 -41 143 -99 0 -166 -82 23 0 61 -69 84 0 -169 31 126 0 -163 34 -180 0 -123 -29 -96 0 136 43 -57 0 76 -167 -155 0 -101 -2 120 0 -110 -23 -165 0 5 127 -117 0 -156 -13 77 0 -152 -76 -4 0 -73 98 -140 0 -46 109 -56 0 35 -30 157 0 144 6 -19 0 114 -105 44 0 -65 -46 157 0 135 -58 -128 0 26 22 39 0 110 34 23 0 -168 113 64 0 -77 -107 -125 0 103 50 -147 0 -105 1 -89 0 118 -154 9 0 -14 -67 -118 0 -45 -94 -55 0 125 69 -36 0 29 161 -25 0 112 -28 -78 0 148 170 96 0 -26 -71 126 0 -78 132 97 0 161 117 111 0 131 118 143 0 155 -111 -167 0 73 -92 -154 0 -32 -21 -173 0 -86 -123 -117 0 -56 107 91 0 -8 104 2 0 -90 -163 -167 0 -120 179 87 0 -158 56 -37 0 127 -95 -143 0 171 -179 -10 0 108 -171 -35 0 118 -154 -133 0 173 -143 -149 0 156 148 118 0 -115 78 -58 0 16 65 84 0 -76 123 125 0 37 -142 -27 0 -4 176 116 0 -94 95 170 0 22 80 92 0 143 17 -165 0 -80 -27 -162 0 -13 -152 35 0 119 -15 148 0 -162 -75 -111 0 -2 86 1 0 168 -83 -118 0 146 -36 -168 0 -121 -49 -155 0 29 173 38 0 75 -139 12 0 156 -82 1 0 -173 161 20 0 -15 88 105 0 166 -137 -21 0 118 -88 63 0 106 -138 -89 0 42 -26 -48 0 -36 -41 -103 0 142 -108 -119 0 115 144 84 0 1 102 -64 0 97 173 156 0 -52 163 -175 0 -127 139 -116 0 24 163 -75 0 -74 -105 31 0 -134 -101 -16 0 67 -167 112 0 -145 106 113 0 -33 -118 -59 0 16 62 -92 0 -37 5 -74 0 28 71 -130 0 -33 -18 134 0 59 76 -2 0 157 17 -127 0 -49 158 146 0 148 -24 169 0 25 -46 24 0 141 -36 -15 0 -111 129 -140 0 -68 43 -145 0 70 12 180 0 48 168 15 0 173 -159 46 0 -166 163 29 0 -19 51 95 0 134 2 64 0 -105 74 18 0 76 178 -4 0 -21 27 -12 0 143 -76 35 0 148 -19 -135 0 71 171 76 0 -171 70 156 0 43 -145 -175 0 7 86 -2 0 24 11 -83 0 -38 10 -100 0 99 -161 -164 0 51 68 -102 0 88 -173 -59 0 48 167 -6 0 160 -114 50 0 49 -164 54 0 113 -27 38 0 -51 -27 -140 0 -114 -175 152 0 -14 132 -107 0 129 173 152 0 33 -46 -156 0 49 29 -117 0 134 168 -57 0 -65 -100 -97 0 113 -116 -145 0 -48 -99 -123 0 -43 21 -148 0 103 13 43 0 -4 -165 89 0 30 -136 -35 0 -84 -112 85 0 95 -159 -8 0 175 12 -116 0 7 174 90 0 110 146 23 0 96 -28 -67 0 -49 -158 93 0 -83 -74 76 0 -179 180 -73 0 -107 141 -24 0 88 167 -163 0 34 -175 -87 0 -96 151 80 0 -107 3 19 0 -178 -79 166 0 -111 61 -167 0 -168 107 -132 0 96 -120 117 0 -25 -77 -6 0 -61 101 -141 0 115 -158 -6 0 -9 -171 135 0 -71 65 25 0 -57 -123 -172 0 -41 23 -99 0 121 -79 37 0 139 141 -69 0 107 62 -15 0 -23 149 62 0 135 -142 72 0 78 13 -8 0 152 -74 -149 0 95 -16 63 0 -72 105 -5 0 141 37 5 0 -98 -175 117 0 138 -50 -84 0 -115 126 -34 0 -169 -26 151 0 81 -59 9 0 -138 -134 165 0 154 2 1 0 102 40 -50 0 -178 -91 4 0 -130 71 -63 0 -26 -20 -65 0 -98 -120 48 0 -11 -53 -172 0 30 85 106 0 -42 58 -113 0 -151 -119 81 0 -55 83 102 0 """ output = "SAT"
#Leia uma distancia em milhas e apresente-a convertida em quilometros. #A formula de conversao eh K =M*1.61 , # sendo K a distancia em quilometros e M em milhas. m=float(input("Informe a distancia em milhas: ")) K=m*1.61 print(f"A distancia convertida em km eh {K}km/h")
""" Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1,1,0,1,1,1] Output: 3 Explanation: The first two digits or the last three digits are consecutive 1s. The maximum number of consecutive 1s is 3. Note: The input array will only contain 0 and 1. The length of input array is a positive integer and will not exceed 10,000 Your runtime beats 83.76 % of python submissions. """ class Solution(object): def findMaxConsecutiveOnes(self, nums): """ :type nums: List[int] :rtype: int """ #Method 1 maxval = 0 counter = 0 for i in range(len(nums)): if nums[i] == 1: counter += 1 if i == len(nums)-1: if counter > maxval: maxval = counter else: if counter > maxval: maxval = counter counter = 0 return maxval # #Method 2 return len(max(str(nums)[1:-1].replace(", ", "").split("0")))
lista = [] for cont in range(0, 5): núm = (int(input('Digite um valor : '))) if cont == 0 or núm > lista[-1]: lista.append(núm) print('Valor adicionado no final da lista...') else: pos = 0 while pos < len(lista): if núm <= lista[pos]: lista.insert(pos, núm) print(f'Valor adiconado na posição {pos} da lista') break pos += 1 print('-=' * 30) print(f'Os Valores digitados foram colocados em ordem {lista}')
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def pruneTree(self, root): """ :type root: TreeNode :rtype: TreeNode """ def contain1(root): if not root: return False left = contain1(root.left) right = contain1(root.right) if not left: root.left = None if not right: root.right = None return left or right or root.val == 1 return root if contain1(root) else None
class TaskType: JOINT = 'joint' MENTION_LOCALIZATION = 'mention_localization' COREFERENCE_RESOLUTION = 'coreference_resolution' ENTITY_CLASSIFICATION = 'entity_classification' RELATION_CLASSIFICATION = 'rel_classification'
nome = "Robozinho" posicao = [0, 0] direcao = ["Norte"] def iniciarRobot(): print(f"""{nome} inicou a posição atual do {nome} é: {posicao} a direção atual do {nome} é: {direcao[0]} """) def statusRobot(): print(f"""A posição atual do {nome} é: {posicao} S direção atual do {nome} é: {direcao[0]} """) 1 def andarUmPasso(): print(posicao) if (direcao == "Norte"): posicao[1] += 1 elif (direcao == "Sul"): posicao[1] -= 1 elif (direcao == "Leste"): posicao[0] += 1 elif (direcao == "Oeste"): posicao[0] -= 1 print(f"O {nome} andou") def andarVariosPasso(): andar = int(input("Digite quantos passos você quer andar: ")) if (direcao == "Norte"): posicao[1] += andar elif (direcao == "Sul"): posicao[1] -= andar elif (direcao == "Leste"): posicao[0] += andar elif (direcao == "Oeste"): posicao[0] -= andar print(f"O {nome} andou") def mudarPosicao(): x = int(input("Digite a posição x: ")) y = int(input("Digite a posição y: ")) posicao[0] = x posicao[1] = y print(f"A nova posição é: {posicao}") def mudarDirecao(): print("""ESCOLHA A NOVA DIREÇÃO [0] = Norte [1] = Sul [2] = Leste [3] = Oeste""") escolher = int(input("Escolha a opção: ")) if escolher == 0: direcao[0]=["Norte"] elif escolher == 1: direcao[0]=["Sul"] elif escolher == 2: direcao[0]=["Leste"] elif escolher == 3: direcao[0]=["Oeste"] else: print("OPÇÃO INVALIDA, ESCOLHA UMA OPÇÃO CORRETA") mudarDirecao() print(f"A nova direção atual é {direcao[0]}") def retornaPosZero( ): posicao = [0,0] direcao[0] = "Norte" # iniciarRobot() #andarUmPasso() # andarVariosPasso() #mudarPosicao() mudarDirecao() statusRobot()
def multiuply(multiplyer,multiplycant): result = multiplyer * multiplycant return result answer = multiuply(10.5,4) print(answer) print (multiuply(8,10)) def __init__(self): return(__init__+3)
""" Set up Google authentication parameters here. """ #GOOGLE_AUTH = { # 'account': '<gmail address>', # 'password': '<password>', #}
RECURSE_INTO = { "p", "blockquote", "div", "em", "i", "b", "u", "strong", "h2", "figure", } INCLUDE_TAGNAME = { "blockquote", "em", "i", "b", "u", "strong", "h2", } INCLUDE_VERBATIM = {"li", "ul", "ol"} NEWLINE_AFTER = { "blockquote", "h2", } DOUBLE_NEWLINE_AFTER = {"p", "br", "img"} AVOID = { "header", } USE_IMAGE_ANALYSIS = {"img"}
def first_check(): pass def second_check(): pass def main(): print('badge checks TODO') first_check() second_check() if __name__ == "__main__": main()
#26. Faça um programa que leia uma frase e mostre: quantas vezes aparece a letra 'a'; em que posição ela aparece a primeira e ultima vez. #27. Faça um programa que leia o nome completo e mostre o primeiro e ultimo nome separadamente. def Main026(): frase = str(input('Frase: ')).strip().lower() print('Tem {} vezes a letra A.'.format(frase.count('a'))) print('Primeiro na posição {}.'.format(frase.find('a')+1)) print('Último na posição {}.'.format(frase.rfind('a')+1)) def Main027(): nome = input('Qual seu nome completo?').strip().split() print('Primeiro nome:', nome[0].capitalize()) print('Último nome: ', nome[len(nome)-1].capitalize()) Main027()
# Copyright 2015 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """Tests that step_data can accept multiple specs at once.""" DEPS = [ 'step', ] def RunSteps(api): raise TypeError("BAD DOGE") def GenTests(api): yield ( api.test('basic') + api.expect_exception('TypeError') )
''' Print Asterisks Write a program that can print the line of asterisks. I have to define a founction called printAsterisks(). This finction should take single argument/parameter. This argument will take an interger value that represents the number of asterisks. My program should print the number of asterisks on a single line based on supplied integer value. ''' def printAsterisks(N): print("*" * N) # ********** # main program starts here printAsterisks(10) # When the app is run [printAsterisks(10)] replaces the N on line 5 with [10], then the print statement replaces it,s N with 10, and then prints out 10 asterisks as shown.
N = int(input()) L = len(str(N)) ans = 0 for i in range(2, L+1, 2): if i == L: head = int(str(N)[:i//2]) tail = int(str(N)[i//2:]) if head <= 9: if head > tail: head -= 1 ans += head else: if head > tail: head -= 1 ans += max(0, head-ans) else: ans += 9*int('1'+'0'*((i//2)-1)) print(ans)
# # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS-IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # { 'includes' : [ '../common.gypi', ], 'target_defaults': { 'type': 'static_library', 'includes' : [ '../dev/target_visibility.gypi', ], 'conditions': [ ['OS == "nacl"', { 'link_settings': { 'libraries': [ '-lnacl_io', ], }, }], ], # conditions }, 'targets' : [ { 'target_name' : 'remote_assets', 'type': 'static_library', 'includes' : [ '../dev/zipasset_generator.gypi', ], 'sources': [ 'res/calltrace.iad', 'res/nodegraph.iad', 'res/resources.iad', 'res/root.iad', 'res/settings.iad', 'res/shader_editor.iad', 'res/tracing.iad', # Excluded conditionally below. 'res/geturi_asmjs.iad', 'res/geturi_cc.iad', ], 'conditions': [ ['OS in ["asmjs", "nacl"]', { 'sources!': [ 'res/geturi_cc.iad', ], }, { # else 'sources!': [ 'res/geturi_asmjs.iad', ], }], ], # conditions 'dependencies' : [ '<(ion_dir)/port/port.gyp:ionport', ], }, { 'target_name' : 'ionremote', 'sources': [ 'calltracehandler.cc', 'calltracehandler.h', 'httpserver.cc', 'httpserver.h', 'nodegraphhandler.cc', 'nodegraphhandler.h', 'remoteserver.cc', 'remoteserver.h', 'resourcehandler.cc', 'resourcehandler.h', 'settinghandler.cc', 'settinghandler.h', 'shaderhandler.cc', 'shaderhandler.h', 'tracinghandler.cc', 'tracinghandler.h', ], 'dependencies': [ ':remote_assets', '<(ion_dir)/analytics/analytics.gyp:ionanalytics', '<(ion_dir)/base/base.gyp:ionbase', '<(ion_dir)/external/external.gyp:ionmongoose', '<(ion_dir)/external/external.gyp:ionstblib', '<(ion_dir)/external/external.gyp:ionzlib', '<(ion_dir)/external/imagecompression.gyp:ionimagecompression', '<(ion_dir)/gfx/gfx.gyp:iongfx', '<(ion_dir)/gfxprofile/gfxprofile.gyp:iongfxprofile', '<(ion_dir)/gfxutils/gfxutils.gyp:iongfxutils', '<(ion_dir)/image/image.gyp:ionimage', '<(ion_dir)/port/port.gyp:ionport', '<(ion_dir)/portgfx/portgfx.gyp:ionportgfx', '<(ion_dir)/profile/profile.gyp:ionprofile', ], }, { 'target_name': 'ionremote_test_utils', 'type': 'static_library', 'sources': [ 'tests/getunusedport.cc', 'tests/getunusedport.h', ], 'dependencies' : [ '<(ion_dir)/base/base.gyp:ionbase_for_tests', ], }, # target: ionremote_test_utils { 'target_name': 'ionremote_for_tests', 'type': 'static_library', 'sources': [ 'tests/getunusedport.cc', 'tests/getunusedport.h', 'tests/httpservertest.h', ], 'dependencies' : [ ':httpclient', ':ionremote', ':ionremote_test_utils', ':portutils', '<(ion_dir)/base/base.gyp:ionbase_for_tests', '<(ion_dir)/gfx/gfx.gyp:iongfx_for_tests', '<(ion_dir)/gfxutils/gfxutils.gyp:iongfxutils_for_tests', '<(ion_dir)/image/image.gyp:ionimage_for_tests', '<(ion_dir)/portgfx/portgfx.gyp:ionportgfx_for_tests', ], }, # target: ionremote_for_tests { 'target_name': 'httpclient', 'type': 'static_library', 'sources': [ 'httpclient.cc', 'httpclient.h', ], 'dependencies': [ ':remote_assets', '<(ion_dir)/base/base.gyp:ionbase', '<(ion_dir)/port/port.gyp:ionport', '<(ion_dir)/external/external.gyp:ionmongoose', ], }, # target: httpclient { 'target_name': 'portutils', 'type': 'static_library', 'sources': [ 'portutils.cc', 'portutils.h', ], 'dependencies': [ '<(ion_dir)/base/base.gyp:ionbase', '<(ion_dir)/port/port.gyp:ionport', ], }, # target: portutils ], }
w = grenal = inter = gremio = empates = 0 while w == 0: grenal += 1 g1, g2 = input().split(' ') g1 = int(g1) g2 = int(g2) if g1 == g2: empates += 1 elif g1 > g2: inter += 1 else: gremio += 1 print('Novo grenal (1-sim 2-nao)') op = int(input()) if op == 2: w = 1 print('{} grenais'.format(grenal)) print('Inter:{}'.format(inter)) print('Gremio:{}'.format(gremio)) print('Empates:{}'.format(empates)) if(inter > gremio): print('Inter venceu mais') else: print('Gremio venceu mais')
""" Soft Actor Critic (SAC) Control =============================== """
# Copyright 2021 Kotaro Terada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Model Types MODEL_ISING = "ising" MODEL_QUBO = "qubo" # Interaction Body Types INTERACTION_LINEAR = 1 # 1-body INTERACTION_QUADRATIC = 2 # 2-body # Default label for Constraints DEFAULT_LABEL_N_HOT = "Default N-hot Constraint" DEFAULT_LABEL_EQUALITY = "Default Equality Constraint" DEFAULT_LABEL_0_OR_1_HOT = "Default Zero-or-One-hot Constraint" # Select format SELECT_SERIES = "series" SELECT_DICT = "dict" # Algorithms ALGORITHM_ATTENUATION = "attenuation" ALGORITHM_DELTA = "delta" ALGORITHM_INCREMENTAL = "incremental" ALGORITHM_PARTIAL = "partial" ALGORITHM_WINDOW = "window" # Pick-up mode for Sawatabi Solver PICKUP_MODE_RANDOM = "random" PICKUP_MODE_SEQUENTIAL = "sequential"
query = """ select * from languages; """ query = """ select * from games where test=0 """ def get_query1(): query = ( f"SELEct max(weight) from world where ocean='Atlantic' and water is not null" ) return query def get_query2(): limit = 6 query = f"SELEct speed from world where animal='dolphin' limit {limit}" return query def get_query3(): query = 'select 5' return query
# Write a Python program to multiplies all the items in a list. def multiply_list(items): multiply_numbers = 1 for x in items: multiply_numbers *= x return multiply_numbers print(multiply_list([5,2,-8]))
def _jar_jar_impl(ctx): ctx.action( inputs=[ctx.file.rules, ctx.file.input_jar], outputs=[ctx.outputs.jar], executable=ctx.executable._jarjar_runner, progress_message="jarjar %s" % ctx.label, arguments=["process", ctx.file.rules.path, ctx.file.input_jar.path, ctx.outputs.jar.path]) return JavaInfo( output_jar = ctx.outputs.jar, compile_jar = ctx.outputs.jar ) jar_jar = rule( implementation = _jar_jar_impl, attrs = { "input_jar": attr.label(allow_files=True, single_file=True), "rules": attr.label(allow_files=True, single_file=True), "_jarjar_runner": attr.label(executable=True, cfg="host", default=Label("@com_github_johnynek_bazel_jar_jar//:jarjar_runner")), }, outputs = { "jar": "%{name}.jar" }, provides = [JavaInfo]) def _mvn_name(coord): nocolon = "_".join(coord.split(":")) nodot = "_".join(nocolon.split(".")) nodash = "_".join(nodot.split("-")) return nodash def _mvn_jar(coord, sha, bname, serv): nm = _mvn_name(coord) native.maven_jar( name = nm, artifact = coord, sha1 = sha, server = serv ) native.bind(name=("com_github_johnynek_bazel_jar_jar/%s" % bname), actual = "@%s//jar" % nm) def jar_jar_repositories(server=None): _mvn_jar( "org.pantsbuild:jarjar:1.6.3", "cf54d4b142f5409c394095181c8d308a81869622", "jarjar", server) _mvn_jar( "org.ow2.asm:asm:5.0.4", "0da08b8cce7bbf903602a25a3a163ae252435795", "asm", server) _mvn_jar( "org.ow2.asm:asm-commons:5.0.4", "5a556786086c23cd689a0328f8519db93821c04c", "asm_commons", server)
def square(a): return a * a print(square(4))
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This is Blogofile -- http://www.Blogofile.com Definition: Blogophile -- A person who is fond of or obsessed with blogs or blogging. Definition: Blogofile -- A static file blog engine/compiler, inspired by Jekyll. Blogofile transforms a set of templates into an entire blog consisting of static HTML files. All categories, tags, RSS/Atom feeds are automatically maintained by Blogofile. This blog can be hosted on any HTTP web server. Since the blog is just HTML, CSS, and Javascript, no CGI environment, or database is required. With the addition of a of third-party comment and trackback provider (like Disqus or IntenseDebate) a modern and interactive blog can be hosted very inexpensively. Please take a moment to read LICENSE.txt. It's short. """ __author__ = "Ryan McGuire (ryan@enigmacurry.com)" __version__ = '1.0.0-DEV'
# Aufgabe 2 - Übung 3 # # Erweitern Sie das BMI-Programm aus der Vorlesung und geben Sie zusätzlich die folgende Interpretation aus: # BMI < 18.5 Untergewicht # BMI 18.5 - 24.9 Normalgewicht # BMI 25.0 - 29.9 Übergewicht # BMI > 30.0 Adipositas # # BMI = masse / (körpergröße zum quadrat in m) untergewicht = 18.5 normalgewichtTop = 24.9 normalgewichtBottom = 18.5 uebergewichtTop = 29.9 uebergewichtBottom = 25 adipositas = 30 # Abfrage einer Nuterzeingabe für die Größe einer Person groesse = float(input("Bitte geben Sie Ihre Größe in cm ein:")) print ("Die von Ihnen eingegebene Größe ist:", groesse) # Abfrage einer Nuterzeingabe für das Gewicht einer Person gewicht = float(input("Bitte geben Sie Ihr Gewicht in kg ein:")) print ("Das von Ihnen eingegebene Gewicht:", gewicht) # Berechnung des BMI bmi = round(gewicht/((groesse/100)**2), 1) print (groesse, "Ihr berechneter BMI beträgt: ", bmi,) # Bewertung des BMI if bmi < untergewicht: print ("Der BMI fällt in den Bereich des Untergewichts.") elif normalgewichtBottom < bmi < normalgewichtTop: print ("Der BMI liegt im Normalbereich.") elif uebergewichtBottom < bmi < uebergewichtTop: print ("Der BMI liegt im übergewichtigen Bereich.") elif bmi > adipositas: print ("Der BMI liegt im Bereich Adipositas.") else: print("Der BMI konnte nicht zugeordnet werden.")
#!/usr/bin/env python NAME = 'SiteGround (SiteGround)' def is_waf(self): for attack in self.attacks: r = attack(self) if r is None: return _, page = r if any(i in page for i in (b'Our system thinks you might be a robot!', b'The page you are trying to access is restricted due to a security rule')): return True return False
class Solution: def solve(self, a, b): def multiply(x,y,c): m = x*y + c return m//10,m%10 e1,e2 = -1,-1 si = 1 if a[0] == "-": e1 = 0 si *=-1 if b[0] == "-": e2 = 0 si *=-1 n1 = len(a) n2 = len(b) final = 0 ans = "" c = 0 k = "" for i in range(n1-1,e1,-1): for j in range(n2-1,e2,-1): c,s = multiply(int(a[i]),int(b[j]),c) ans = str(s) + ans if c: ans = str(c) + ans final += int(ans) ans = k + "0" k += "0" c = 0 final *= si return str(final)
# Copyright 2015 by Hurricane Labs LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """HTTPStatus exception class.""" class HTTPStatus(Exception): """Represents a generic HTTP status. Raise an instance of this class from a hook, middleware, or responder to short-circuit request processing in a manner similar to ``falcon.HTTPError``, but for non-error status codes. Attributes: status (str): HTTP status line, e.g. '748 Confounded by Ponies'. headers (dict): Extra headers to add to the response. body (str or unicode): String representing response content. If Unicode, Falcon will encode as UTF-8 in the response. Args: status (str): HTTP status code and text, such as '748 Confounded by Ponies'. headers (dict): Extra headers to add to the response. body (str or unicode): String representing response content. If Unicode, Falcon will encode as UTF-8 in the response. """ __slots__ = ( 'status', 'headers', 'body' ) def __init__(self, status, headers=None, body=None): self.status = status self.headers = headers self.body = body
# %% [markdown] # # 1 - Print # %% [markdown] # `print()` is build in function in python that takes any type of object as it's parameter # # The [print](https://docs.python.org/3/library/functions.html#print) function let's you send an output to the terminal # # # Python [built-in functions](https://docs.python.org/3/library/functions.html) # %% print("Hello, World!") # %% [markdown] # You can enclose strings in **double** quotes (" ") or **single** quotes (' ') # %% print('Hello, World!') # %% [markdown] # In case you have to use a signle quote in a string (for example: I'm a string) you can use the escape sequence (\) or use double quotes for the string # %% print("I'm a string") print('I\'m a string') # %% [markdown] # You can combine strings with + or , <br /> # The difference is that + concatenates strings, while , joins strings # %% # Concatinate strings with sign + print("Hello, " + "World!") print("Hello,", "World!", "!") # %% [markdown] # How to print a new line in python? # %% print("Hello, World!") # print a blank line print() print("This is a new line") # %% # print a line with \n # \n is a special character sequence that tells Python to start a new line print("This is the first line \nThis is the second line") # %% # print a line with a tab print("This is a regular line") print("\tThis is a new line with a tab") # %% [markdown] # Another usefull built-in function in python is `input()` <br /> # It allows you to prompt the user to input a value <br /> # But you need to declare a variable to hold the user's value in it # %% # Here name is variable that will hold the user's input name = input("Please eneter your name: ") print("Your name is:", name)
# # PySNMP MIB module AC-PM-ATM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/AC-PM-ATM-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 16:54:33 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) # Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "ValueRangeConstraint") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Bits, Counter32, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, MibIdentifier, NotificationType, iso, Integer32, ObjectIdentity, ModuleIdentity, Counter64, IpAddress, TimeTicks, enterprises = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Counter32", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "MibIdentifier", "NotificationType", "iso", "Integer32", "ObjectIdentity", "ModuleIdentity", "Counter64", "IpAddress", "TimeTicks", "enterprises") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") audioCodes = MibIdentifier((1, 3, 6, 1, 4, 1, 5003)) acRegistrations = MibIdentifier((1, 3, 6, 1, 4, 1, 5003, 7)) acGeneric = MibIdentifier((1, 3, 6, 1, 4, 1, 5003, 8)) acProducts = MibIdentifier((1, 3, 6, 1, 4, 1, 5003, 9)) acPerformance = MibIdentifier((1, 3, 6, 1, 4, 1, 5003, 10)) acPMAtm = ModuleIdentity((1, 3, 6, 1, 4, 1, 5003, 10, 12)) if mibBuilder.loadTexts: acPMAtm.setLastUpdated('200601261643Z') if mibBuilder.loadTexts: acPMAtm.setOrganization('AudioCodes Ltd') acPMAtmConfiguration = MibIdentifier((1, 3, 6, 1, 4, 1, 5003, 10, 12, 1)) acPMAtmConfigurationPeriodLength = MibScalar((1, 3, 6, 1, 4, 1, 5003, 10, 12, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 894780))).setMaxAccess("readwrite") if mibBuilder.loadTexts: acPMAtmConfigurationPeriodLength.setStatus('current') acPMAtmConfigurationResetTotalCounters = MibScalar((1, 3, 6, 1, 4, 1, 5003, 10, 12, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("resetCountersDone", 1), ("resetTotalCounters", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: acPMAtmConfigurationResetTotalCounters.setStatus('current') acPMAtmCellAttributes = MibIdentifier((1, 3, 6, 1, 4, 1, 5003, 10, 12, 1, 31)) acPMAtmCellAttributesTxHighThreshold = MibScalar((1, 3, 6, 1, 4, 1, 5003, 10, 12, 1, 31, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(100, 3000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: acPMAtmCellAttributesTxHighThreshold.setStatus('current') acPMAtmCellAttributesTxLowThreshold = MibScalar((1, 3, 6, 1, 4, 1, 5003, 10, 12, 1, 31, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(100, 3000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: acPMAtmCellAttributesTxLowThreshold.setStatus('current') acPMAtmCellAttributesRxHighThreshold = MibScalar((1, 3, 6, 1, 4, 1, 5003, 10, 12, 1, 31, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(100, 3000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: acPMAtmCellAttributesRxHighThreshold.setStatus('current') acPMAtmCellAttributesRxLowThreshold = MibScalar((1, 3, 6, 1, 4, 1, 5003, 10, 12, 1, 31, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(100, 3000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: acPMAtmCellAttributesRxLowThreshold.setStatus('current') acPMAtmData = MibIdentifier((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2)) acPMAtmDataAcPMAtmTimeFromStartOfInterval = MibScalar((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: acPMAtmDataAcPMAtmTimeFromStartOfInterval.setStatus('current') acPMAtmCellTxTable = MibTable((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 21), ) if mibBuilder.loadTexts: acPMAtmCellTxTable.setStatus('current') acPMAtmCellTxEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 21, 1), ).setIndexNames((0, "AC-PM-ATM-MIB", "acPMAtmCellTxInterface"), (0, "AC-PM-ATM-MIB", "acPMAtmCellTxInterval")) if mibBuilder.loadTexts: acPMAtmCellTxEntry.setStatus('current') acPMAtmCellTxInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 21, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2))) if mibBuilder.loadTexts: acPMAtmCellTxInterface.setStatus('current') acPMAtmCellTxInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 21, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2))) if mibBuilder.loadTexts: acPMAtmCellTxInterval.setStatus('current') acPMAtmCellTxAverage = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 21, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: acPMAtmCellTxAverage.setStatus('current') acPMAtmCellTxMax = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 21, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: acPMAtmCellTxMax.setStatus('current') acPMAtmCellTxMin = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 21, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: acPMAtmCellTxMin.setStatus('current') acPMAtmCellTxVolume = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 21, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: acPMAtmCellTxVolume.setStatus('current') acPMAtmCellTxTimeBelowLowThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 21, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 100))).setMaxAccess("readonly") if mibBuilder.loadTexts: acPMAtmCellTxTimeBelowLowThreshold.setStatus('current') acPMAtmCellTxTimeBetweenThresholds = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 21, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 100))).setMaxAccess("readonly") if mibBuilder.loadTexts: acPMAtmCellTxTimeBetweenThresholds.setStatus('current') acPMAtmCellTxTimeAboveHighThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 21, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 100))).setMaxAccess("readonly") if mibBuilder.loadTexts: acPMAtmCellTxTimeAboveHighThreshold.setStatus('current') acPMAtmCellTxFullDayAverage = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 21, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: acPMAtmCellTxFullDayAverage.setStatus('current') acPMAtmCellRxTable = MibTable((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 22), ) if mibBuilder.loadTexts: acPMAtmCellRxTable.setStatus('current') acPMAtmCellRxEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 22, 1), ).setIndexNames((0, "AC-PM-ATM-MIB", "acPMAtmCellRxInterface"), (0, "AC-PM-ATM-MIB", "acPMAtmCellRxInterval")) if mibBuilder.loadTexts: acPMAtmCellRxEntry.setStatus('current') acPMAtmCellRxInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 22, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2))) if mibBuilder.loadTexts: acPMAtmCellRxInterface.setStatus('current') acPMAtmCellRxInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 22, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2))) if mibBuilder.loadTexts: acPMAtmCellRxInterval.setStatus('current') acPMAtmCellRxAverage = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 22, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: acPMAtmCellRxAverage.setStatus('current') acPMAtmCellRxMax = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 22, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: acPMAtmCellRxMax.setStatus('current') acPMAtmCellRxMin = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 22, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: acPMAtmCellRxMin.setStatus('current') acPMAtmCellRxVolume = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 22, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: acPMAtmCellRxVolume.setStatus('current') acPMAtmCellRxTimeBelowLowThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 22, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 100))).setMaxAccess("readonly") if mibBuilder.loadTexts: acPMAtmCellRxTimeBelowLowThreshold.setStatus('current') acPMAtmCellRxTimeBetweenThresholds = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 22, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 100))).setMaxAccess("readonly") if mibBuilder.loadTexts: acPMAtmCellRxTimeBetweenThresholds.setStatus('current') acPMAtmCellRxTimeAboveHighThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 22, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 100))).setMaxAccess("readonly") if mibBuilder.loadTexts: acPMAtmCellRxTimeAboveHighThreshold.setStatus('current') acPMAtmCellRxFullDayAverage = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 22, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: acPMAtmCellRxFullDayAverage.setStatus('current') acPMAtmCellDiscardedTable = MibTable((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 23), ) if mibBuilder.loadTexts: acPMAtmCellDiscardedTable.setStatus('current') acPMAtmCellDiscardedEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 23, 1), ).setIndexNames((0, "AC-PM-ATM-MIB", "acPMAtmCellDiscardedInterface"), (0, "AC-PM-ATM-MIB", "acPMAtmCellDiscardedInterval")) if mibBuilder.loadTexts: acPMAtmCellDiscardedEntry.setStatus('current') acPMAtmCellDiscardedInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 23, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2))) if mibBuilder.loadTexts: acPMAtmCellDiscardedInterface.setStatus('current') acPMAtmCellDiscardedInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 23, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2))) if mibBuilder.loadTexts: acPMAtmCellDiscardedInterval.setStatus('current') acPMAtmCellDiscardedVal = MibTableColumn((1, 3, 6, 1, 4, 1, 5003, 10, 12, 2, 23, 1, 3), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: acPMAtmCellDiscardedVal.setStatus('current') mibBuilder.exportSymbols("AC-PM-ATM-MIB", acPMAtmCellRxInterval=acPMAtmCellRxInterval, acPMAtmCellRxTimeBelowLowThreshold=acPMAtmCellRxTimeBelowLowThreshold, acPMAtmConfigurationPeriodLength=acPMAtmConfigurationPeriodLength, acPMAtmCellTxFullDayAverage=acPMAtmCellTxFullDayAverage, acPerformance=acPerformance, acPMAtmConfiguration=acPMAtmConfiguration, acPMAtmData=acPMAtmData, acPMAtmCellTxTable=acPMAtmCellTxTable, acPMAtmCellTxAverage=acPMAtmCellTxAverage, acPMAtmCellDiscardedTable=acPMAtmCellDiscardedTable, acPMAtmDataAcPMAtmTimeFromStartOfInterval=acPMAtmDataAcPMAtmTimeFromStartOfInterval, acPMAtmCellTxTimeBetweenThresholds=acPMAtmCellTxTimeBetweenThresholds, acPMAtmCellRxAverage=acPMAtmCellRxAverage, acPMAtmCellRxVolume=acPMAtmCellRxVolume, acPMAtmCellRxMax=acPMAtmCellRxMax, acPMAtmCellAttributesTxLowThreshold=acPMAtmCellAttributesTxLowThreshold, PYSNMP_MODULE_ID=acPMAtm, acPMAtmCellRxTimeBetweenThresholds=acPMAtmCellRxTimeBetweenThresholds, acPMAtmCellRxTimeAboveHighThreshold=acPMAtmCellRxTimeAboveHighThreshold, acPMAtmCellTxTimeAboveHighThreshold=acPMAtmCellTxTimeAboveHighThreshold, acProducts=acProducts, acPMAtmCellDiscardedVal=acPMAtmCellDiscardedVal, acGeneric=acGeneric, acPMAtmCellTxEntry=acPMAtmCellTxEntry, acPMAtmCellRxFullDayAverage=acPMAtmCellRxFullDayAverage, acPMAtmCellRxMin=acPMAtmCellRxMin, acPMAtmConfigurationResetTotalCounters=acPMAtmConfigurationResetTotalCounters, acPMAtmCellAttributesTxHighThreshold=acPMAtmCellAttributesTxHighThreshold, acPMAtmCellRxTable=acPMAtmCellRxTable, acPMAtmCellTxTimeBelowLowThreshold=acPMAtmCellTxTimeBelowLowThreshold, acPMAtmCellTxMin=acPMAtmCellTxMin, acPMAtmCellTxMax=acPMAtmCellTxMax, acPMAtmCellAttributes=acPMAtmCellAttributes, acPMAtmCellAttributesRxLowThreshold=acPMAtmCellAttributesRxLowThreshold, acPMAtmCellAttributesRxHighThreshold=acPMAtmCellAttributesRxHighThreshold, acPMAtmCellTxVolume=acPMAtmCellTxVolume, acRegistrations=acRegistrations, acPMAtmCellTxInterval=acPMAtmCellTxInterval, acPMAtmCellRxInterface=acPMAtmCellRxInterface, acPMAtmCellDiscardedInterval=acPMAtmCellDiscardedInterval, acPMAtm=acPMAtm, acPMAtmCellDiscardedEntry=acPMAtmCellDiscardedEntry, acPMAtmCellTxInterface=acPMAtmCellTxInterface, acPMAtmCellDiscardedInterface=acPMAtmCellDiscardedInterface, acPMAtmCellRxEntry=acPMAtmCellRxEntry, audioCodes=audioCodes)
def Shell(A): t = int(len(A)/2) while t > 0: for i in range(len(A)-t): j = i while j >= 0 and A[j] > A[j+t]: A[j], A[j+t] = A[j+t], A[j] j -= 1 t = int(t/2)
# 함수로 negative/zero/positive def f(key): if key > 0: # key가 양수일 경우 print("positive") elif key == 0: # key가 0일 경우 print("zero") else: # key가 음수일 경우 print("negative") f(int(input()))
""" 479. Largest Palindrome Product Find the largest palindrome made from the product of two n-digit numbers. Since the result could be very large, you should return the largest palindrome mod 1337. Example: Input: 2 Output: 987 Explanation: 99 x 91 = 9009, 9009 % 1337 = 987 Note: The range of n is [1,8]. """ class Solution(object): def largestPalindrome(self, n): """ :type n: int :rtype: int """ if n == 0: return 0 d1 = d2 = int([9]*n) class Solution(object): def largestPalindrome(self, n): """ :type n: int :rtype: int """ if n == 0: return 0 lst = ['9']*n #print(''.join(lst)) d1 = d2 = int(''.join(lst)) results = [] flag = False def is_palindrome(n): s = str(n) for i in range(len(s)/2): if s[i] != s[len(s)-1-i]: return False return True print(d1,d2) while d2 > 0: #print(d1*d2) if is_palindrome(d1*d2): #print(d1,d2) results.append(d1*d2) break d2-=1 print(d1,d2) d2 = d1 print(d1,d2) while d2 > 0: if is_palindrome(d1*d2): results.append(d1*d2) break if flag == False: d2-=1 flag = True else: d1-=1 flag = False print(results) return max(results)%1337
# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Provides attack points for AES.""" class AESSBOX: """Provides functions for getting attack points when provided with key, plaintext pair. Attack points: key: The key itself. sub_bytes_in: key xor plaintext (what goes into AES SBOX). sub_bytes_out: each byte of sub_bytes_in is remapped using the SBOX (what goes out of the SBOX). """ _SB = [ # pylint: disable=C0301 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16, ] # yapf: disable # Number of classes used in ML. We are predicting a single byte => 256. _MAX_VAL = 256 # Length of the key in bytes KEY_LENGTH = 16 # Length of the plaintext in bytes PLAINTEXT_LENGTH = 16 # The attack points info used in scaaml.io.Dataset. ATTACK_POINTS_INFO = { "sub_bytes_in": { "len": 16, "max_val": _MAX_VAL, }, "sub_bytes_out": { "len": 16, "max_val": _MAX_VAL, }, "key": { "len": 16, "max_val": _MAX_VAL, } } @staticmethod def key(key: bytearray, plaintext: bytearray) -> bytearray: """Return the key. Useful for getting all attack points.""" assert len(key) == len(plaintext) return key @staticmethod def sub_bytes_in(key: bytearray, plaintext: bytearray) -> bytearray: """Return what goes into the SBOX.""" assert len(key) == len(plaintext) return bytearray(x ^ y for (x, y) in zip(key, plaintext)) @staticmethod def sub_bytes_out(key: bytearray, plaintext: bytearray) -> bytearray: """Return what goes out of the SBOX.""" assert len(key) == len(plaintext) return bytearray(AESSBOX._SB[x ^ y] for (x, y) in zip(key, plaintext)) @classmethod def get_attack_point(cls, name: str, **kwargs: bytearray) -> bytearray: """Return the correct attack point. Typical usage example: attack_point_names = ["key", "sub_bytes_in", "sub_bytes_out"] attack_points = { ap: AESSBOX.get_attack_point(ap, key=key, plaintext=plaintext) for ap in attack_point_names } """ function = getattr(cls, name, None) if not function or not callable(function): raise ValueError(f"{name} is not a defined attack point") return function(**kwargs)
n1 = int(input('Informe um número: ')) n2 = int(input('Informe outro número: ')) if n1 > n2: print(f'O primeiro número {n1} é maior que o segundo {n2}.') elif n1 < n2: print(f'O segundo número {n2} é maior que o primeiro {n1}.') else: print(f'O primeiro número {n1} e o segundo {n2} são iguais.')
""" - domain: Sphere online judge - contest: list of classical problems - problem: JULKA - Julka - link: https://www.spoj.com/problems/JULKA/ - hash: $$$$$$$$$$name - author: Vitor SRG - version: $$$$$$$$$$date - tags: tests biginteger - language: Python3 """ # Please contact for the solution """ - test: input: | 10 2 output: | 6 4 """
''' Desenvolva uma lógica que leia o peso e a altura de uma pessoa, calcule seu IMC e mostre seu status, de acordo com a tabela abaixo: - Abaixo de 18.5: Abaixo do peso - Entre 18.5 e 25: Peso ideal - 25 até 30: Sobrepeso - 30 até 40: Obesidade - Acima de 40: Obesidade Mórbida ''' print('-=-' * 10) print('CÁLCULO DE IMC') print('-=-' * 10) peso = float(input('Informe o peso: ')) altura = float(input('Informe a altura: ')) imc = peso / (altura ** 2) print('-=-' * 10) print('O IMC dessa pessoa é de {:.1f}'.format(imc)) if imc < 18.5: print('Você está abaixo do peso...') elif imc < 25: print('Você está com o peso ideal...') elif imc < 30: print('Você está com sobrepeso...') elif imc < 40: print('Você está com obesidade...') elif imc >= 40: print('Você está com obesidade Mórbida...') print('-=-' * 10)
def validMountainArray(arr): N = len(arr) i = 0 while i + 1 < N and arr[i] < arr[i+1]: i += 1 if i == 0 or i == N-1: return False while i + 1 < N and arr[i] > arr [i+1]: i += 1 return i == N-1 arr = [2,1] x = validMountainArray(arr) print(x) arr1 = [3,5,5] x = validMountainArray(arr1) print(x) arr2 = [0,3,2,1] x = validMountainArray(arr2) print(x)
""" Django package for use typograf in models. """ VERSION = 0, 1, 2 __version__ = '.'.join(map(str, VERSION))
def main(j, args, params, tags, tasklet): page = args.page filters = dict() tagsmap = { 'jsname': 'name', 'jsorganization': 'organization', } fieldids = ['id', 'jsname', 'jsorganization', 'category', 'descr'] for tag, val in args.tags.tags.iteritems(): key = tagsmap.get(tag, tag) if tag in fieldids: val = args.getTag(tag) filters[key] = val else: val = args.getTag(tag) filters["tags"] = {"$regex": ("%s|(?=.*%s:%s)" % (filters["tags"]['$regex'], key, val))} if "tags" in filters else {"$regex": "(?=.*%s:%s)" % (key, val)} for k in filters.keys(): if filters[k] is None: del filters[k] modifier = j.html.getPageModifierGridDataTables(page) def makeID(row, field): _id = row[field] link = "[%s|/grid/jumpscript?id=%s]" % (_id, _id) return link fields = [ {'name': 'ID', 'id': 'id', 'value': makeID}, {'name': 'Name', 'id': 'name', 'value': 'name'}, {'name': 'Organization', 'id': 'organization', 'value': 'organization'}, {'name': 'Category', 'id': 'category', 'value': 'category'}, {'name': 'Description', 'id': 'descr', 'value': 'descr'}, ] tableid = modifier.addTableFromModel('system', 'jumpscript', fields, filters) modifier.addSearchOptions('#%s' % tableid) modifier.addSorting('#%s' % tableid, 1, 'desc') params.result = page return params def match(j, args, params, tags, tasklet): return True
bad_result_count = int(input()) count_bad = 0 count = 0 last_problem = '' all_score = 0 while True: task = input() if task == 'Enough': break rating = float(input()) if rating <= 4: count_bad += 1 if count_bad == bad_result_count: print(f'You need a break, {bad_result_count} poor grades.') break count += 1 last_problem = task all_score += rating if count_bad != bad_result_count: average = all_score / count print(f'Average score: {average:.2f}') print(f'Number of problems: {count}') print(f'Last problem: {last_problem}')
""" # Definition for a Node. class Node: def __init__(self, val, prev, next, child): self.val = val self.prev = prev self.next = next self.child = child """ class Solution: def flatten(self, head: 'Node') -> 'Node': def post(node): if node: post(node.next) post(node.child) node.next = self.suc node.child = None if self.suc: self.suc.prev = node self.suc = node self.suc = None post(head) return head
class SagemakerData(object): amazon_reviews_raw_data = "s3://amazon-reviews-pds/tsv/amazon_reviews_us_Digital_Video_Download_v1_00.tsv.gz" sagemaker_data_repo = SagemakerData()
class Feature(object): def __init__(self): self.docCountOfClasses = {} self.frequencies = {} # Increase class of a document. def increaseClass(self, className): self.docCountOfClasses[className] = self.docCountOfClasses.get(className, 0) + 1 # Increase token of a class. def increaseToken(self, token, className): if not token in self.frequencies: self.frequencies[token] = {} self.frequencies[token][className] = self.frequencies[token].get(className, 0) + 1 # Get all documents count. def getDocCount(self): return sum(self.docCountOfClasses.values()) # Get the available classes as list. def getClasses(self): return self.docCountOfClasses.keys() # Get the class count of the document. Returns None if it was not found. def getClassDocCount(self, className): return self.docCountOfClasses.get(className, None) # Get frequency of a token in the class. Returns None if it was not found. def getFrequency(self, token, className): try: foundToken = self.frequencies[token] return foundToken[className] except: return None
load("@bazel_gazelle//:deps.bzl", "go_repository") def go_repositories(): go_repository( name = "com_google_cloud_go", importpath = "cloud.google.com/go", version = "v0.51.0", sum = "h1:PvKAVQWCtlGUSlZkGW3QLelKaWq7KYv/MW1EboG8bfM=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_azure_go_ansiterm", importpath = "github.com/Azure/go-ansiterm", version = "v0.0.0-20170929234023-d6e3b3328b78", sum = "h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_burntsushi_toml", importpath = "github.com/BurntSushi/toml", version = "v0.3.1", sum = "h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_makenowjust_heredoc", importpath = "github.com/MakeNowJust/heredoc", version = "v0.0.0-20170808103936-bb23615498cd", sum = "h1:sjQovDkwrZp8u+gxLtPgKGjk5hCxuy2hrRejBTA9xFU=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_masterminds_semver", importpath = "github.com/Masterminds/semver", version = "v1.4.2", sum = "h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_masterminds_sprig", importpath = "github.com/Masterminds/sprig", version = "v2.15.0+incompatible", sum = "h1:0gSxPGWS9PAr7U2NsQ2YQg6juRDINkUyuvbb4b2Xm8w=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_microsoft_go_winio", importpath = "github.com/Microsoft/go-winio", version = "v0.4.14", sum = "h1:+hMXMk01us9KgxGb7ftKQt2Xpf5hH/yky+TDA+qxleU=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_microsoft_hcsshim", importpath = "github.com/Microsoft/hcsshim", version = "v0.8.10", sum = "h1:k5wTrpnVU2/xv8ZuzGkbXVd3js5zJ8RnumPo5RxiIxU=", build_file_proto_mode = "disable", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_nytimes_gziphandler", importpath = "github.com/NYTimes/gziphandler", version = "v0.0.0-20170623195520-56545f4a5d46", sum = "h1:lsxEuwrXEAokXB9qhlbKWPpo3KMLZQ5WB5WLQRW1uq0=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_puerkitobio_purell", importpath = "github.com/PuerkitoBio/purell", version = "v1.1.1", sum = "h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_puerkitobio_urlesc", importpath = "github.com/PuerkitoBio/urlesc", version = "v0.0.0-20170810143723-de5bf2ad4578", sum = "h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_adrg_xdg", importpath = "github.com/adrg/xdg", version = "v0.4.0", sum = "h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_alexflint_go_filemutex", importpath = "github.com/alexflint/go-filemutex", version = "v0.0.0-20171022225611-72bdc8eae2ae", sum = "h1:AMzIhMUqU3jMrZiTuW0zkYeKlKDAFD+DG20IoO421/Y=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_aokoli_goutils", importpath = "github.com/aokoli/goutils", version = "v1.0.1", sum = "h1:7fpzNGoJ3VA8qcrm++XEE1QUe0mIwNeLa02Nwq7RDkg=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_armon_circbuf", importpath = "github.com/armon/circbuf", version = "v0.0.0-20150827004946-bbbad097214e", sum = "h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_asaskevich_govalidator", importpath = "github.com/asaskevich/govalidator", version = "v0.0.0-20190424111038-f61b66f89f4a", sum = "h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_beorn7_perks", importpath = "github.com/beorn7/perks", version = "v1.0.1", sum = "h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_bgentry_speakeasy", importpath = "github.com/bgentry/speakeasy", version = "v0.1.0", sum = "h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_blang_semver", importpath = "github.com/blang/semver", version = "v3.5.0+incompatible", sum = "h1:CGxCgetQ64DKk7rdZ++Vfnb1+ogGNnB17OJKJXD2Cfs=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_caddyserver_caddy", importpath = "github.com/caddyserver/caddy", version = "v1.0.5", sum = "h1:5B1Hs0UF2x2tggr2X9jL2qOZtDXbIWQb9YLbmlxHSuM=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_cenkalti_backoff", importpath = "github.com/cenkalti/backoff", version = "v1.1.1-0.20190506075156-2146c9339422", sum = "h1:8eZxmY1yvxGHzdzTEhI09npjMVGzNAdrqzruTX6jcK4=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_cenkalti_backoff_v4", importpath = "github.com/cenkalti/backoff/v4", version = "v4.0.2", sum = "h1:JIufpQLbh4DkbQoii76ItQIUFzevQSqOLZca4eamEDs=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_cespare_xxhash_v2", importpath = "github.com/cespare/xxhash/v2", version = "v2.1.1", sum = "h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_chai2010_gettext_go", importpath = "github.com/chai2010/gettext-go", version = "v0.0.0-20160711120539-c6fed771bfd5", sum = "h1:7aWHqerlJ41y6FOsEUvknqgXnGmJyJSbjhAWq5pO4F8=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_checkpoint_restore_go_criu_v4", importpath = "github.com/checkpoint-restore/go-criu/v4", version = "v4.1.0", sum = "h1:WW2B2uxx9KWF6bGlHqhm8Okiafwwx7Y2kcpn8lCpjgo=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_cilium_ebpf", importpath = "github.com/cilium/ebpf", version = "v0.0.0-20200702112145-1c8d4c9ef775", sum = "h1:cHzBGGVew0ezFsq2grfy2RsB8hO/eNyBgOLHBCqfR1U=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_container_storage_interface_spec", importpath = "github.com/container-storage-interface/spec", version = "v1.2.0", sum = "h1:bD9KIVgaVKKkQ/UbVUY9kCaH/CJbhNxe0eeB4JeJV2s=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_containerd_btrfs", importpath = "github.com/containerd/btrfs", version = "v0.0.0-20201111183144-404b9149801e", sum = "h1:chFw/cg0TDyK43qm8DKbblny2WHc4ML+j1KOkdEp9pI=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_containerd_cgroups", importpath = "github.com/containerd/cgroups", version = "v0.0.0-20200710171044-318312a37340", sum = "h1:9atoWyI9RtXFwf7UDbme/6M8Ud0rFrx+Q3ZWgSnsxtw=", build_file_proto_mode = "disable", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_containerd_console", importpath = "github.com/containerd/console", version = "v1.0.0", sum = "h1:fU3UuQapBs+zLJu82NhR11Rif1ny2zfMMAyPJzSN5tQ=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_containerd_containerd", importpath = "github.com/containerd/containerd", version = "v1.4.3", sum = "h1:ijQT13JedHSHrQGWFcGEwzcNKrAGIiZ+jSD5QQG07SY=", build_file_proto_mode = "disable", build_tags = [ "no_zfs", "no_aufs", "no_devicemapper", "no_btrfs", ], build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_containerd_continuity", importpath = "github.com/containerd/continuity", version = "v0.0.0-20200710164510-efbc4488d8fe", sum = "h1:PEmIrUvwG9Yyv+0WKZqjXfSFDeZjs/q15g0m08BYS9k=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_containerd_cri", importpath = "github.com/containerd/cri", version = "v1.19.1-0.20201126003523-adc0b6a578ed", sum = "h1:M2yIwrNSafh4rW/yXAiAlSqpydW7vjvDjZ0ClMb+EMQ=", build_file_proto_mode = "disable", patches = [ "//third_party/go/patches:containerd-netns-statedir.patch", ], patch_args = ["-p1"], build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_containerd_fifo", importpath = "github.com/containerd/fifo", version = "v0.0.0-20200410184934-f15a3290365b", sum = "h1:qUtCegLdOUVfVJOw+KDg6eJyE1TGvLlkGEd1091kSSQ=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_containerd_go_cni", importpath = "github.com/containerd/go-cni", version = "v1.0.1", sum = "h1:VXr2EkOPD0v1gu7CKfof6XzEIDzsE/dI9yj/W7PSWLs=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_containerd_go_runc", importpath = "github.com/containerd/go-runc", version = "v0.0.0-20200220073739-7016d3ce2328", sum = "h1:PRTagVMbJcCezLcHXe8UJvR1oBzp2lG3CEumeFOLOds=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_containerd_imgcrypt", importpath = "github.com/containerd/imgcrypt", version = "v1.0.1", sum = "h1:IyI3IIP4m6zrNFuNFT7HizGVcuD6BYJFpdM1JvPKCbQ=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_containerd_ttrpc", importpath = "github.com/containerd/ttrpc", version = "v1.0.2-0.20210119122237-222b428f008e", sum = "h1:+Fbjfo26pg4HtkAw9sC/YhUwaAb16355o/J/oHkyCDc=", replace = "github.com/monogon-dev/ttrpc", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_containerd_typeurl", importpath = "github.com/containerd/typeurl", version = "v1.0.1", sum = "h1:PvuK4E3D5S5q6IqsPDCy928FhP0LUIGcmZ/Yhgp5Djw=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_containernetworking_cni", importpath = "github.com/containernetworking/cni", version = "v0.8.0", sum = "h1:BT9lpgGoH4jw3lFC7Odz2prU5ruiYKcgAjMCbgybcKI=", patches = [ "//third_party/go/patches:cni-fix-cachepath.patch", ], patch_args = ["-p1"], build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_containernetworking_plugins", importpath = "github.com/containernetworking/plugins", version = "v0.8.2", sum = "h1:5lnwfsAYO+V7yXhysJKy3E1A2Gy9oVut031zfdOzI9w=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_containers_ocicrypt", importpath = "github.com/containers/ocicrypt", version = "v1.0.1", sum = "h1:EToign46OSLTFWnb2oNj9RG3XDnkOX8r28ZIXUuk5Pc=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_coredns_coredns", importpath = "github.com/coredns/coredns", version = "v1.7.0", sum = "h1:Tm2ZSdhTk+4okgjUp4K6KYzvBI2u34cdD4fKQRC4Eeo=", pre_patches = [ "//third_party/go/patches:coredns-remove-unused-plugins.patch", ], patch_args = ["-p1"], build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_coreos_go_iptables", importpath = "github.com/coreos/go-iptables", version = "v0.4.2", sum = "h1:KH0EwId05JwWIfb96gWvkiT2cbuOu8ygqUaB+yPAwIg=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_coreos_go_oidc", importpath = "github.com/coreos/go-oidc", version = "v2.1.0+incompatible", sum = "h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_coreos_go_semver", importpath = "github.com/coreos/go-semver", version = "v0.3.0", sum = "h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_coreos_go_systemd", importpath = "github.com/coreos/go-systemd", version = "v0.0.0-20190321100706-95778dfbb74e", sum = "h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_coreos_go_systemd_v22", importpath = "github.com/coreos/go-systemd/v22", version = "v22.1.0", sum = "h1:kq/SbG2BCKLkDKkjQf5OWwKWUKj1lgs3lFI4PxnR5lg=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_coreos_pkg", importpath = "github.com/coreos/pkg", version = "v0.0.0-20180928190104-399ea9e2e55f", sum = "h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_corverroos_commentwrap", importpath = "github.com/corverroos/commentwrap", version = "v0.0.0-20191204065359-2926638be44c", sum = "h1:toeMwwechJKH0iwOoGJLZK6x42Ba9si+816KxqmgFc8=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_cosiner_argv", importpath = "github.com/cosiner/argv", version = "v0.0.0-20170225145430-13bacc38a0a5", sum = "h1:rIXlvz2IWiupMFlC45cZCXZFvKX/ExBcSLrDy2G0Lp8=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_cpuguy83_go_md2man_v2", importpath = "github.com/cpuguy83/go-md2man/v2", version = "v2.0.0", sum = "h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_cyphar_filepath_securejoin", importpath = "github.com/cyphar/filepath-securejoin", version = "v0.2.2", sum = "h1:jCwT2GTP+PY5nBz3c/YL5PAIbusElVrPujOBSCj8xRg=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_davecgh_go_spew", importpath = "github.com/davecgh/go-spew", version = "v1.1.1", sum = "h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_daviddengcn_go_colortext", importpath = "github.com/daviddengcn/go-colortext", version = "v0.0.0-20160507010035-511bcaf42ccd", sum = "h1:uVsMphB1eRx7xB1njzL3fuMdWRN8HtVzoUOItHMwv5c=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_dgrijalva_jwt_go", importpath = "github.com/dgrijalva/jwt-go", version = "v3.2.0+incompatible", sum = "h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_diskfs_go_diskfs", importpath = "github.com/diskfs/go-diskfs", version = "v1.2.0", sum = "h1:Ow4xorEDw1VNYKbC+SA/qQNwi5gWIwdKUxmUcLFST24=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_dnstap_golang_dnstap", importpath = "github.com/dnstap/golang-dnstap", version = "v0.2.0", sum = "h1:+NrmP4mkaTeKYV7xJ5FXpUxRn0RpcgoQcsOCTS8WQPk=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_docker_distribution", importpath = "github.com/docker/distribution", version = "v2.7.1+incompatible", sum = "h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_docker_docker", importpath = "github.com/docker/docker", version = "v17.12.0-ce-rc1.0.20200310163718-4634ce647cf2+incompatible", sum = "h1:ax4NateCD5bjRTqLvQBlFrSUPOoZRgEXWpJ6Bmu6OO0=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_docker_go_connections", importpath = "github.com/docker/go-connections", version = "v0.4.0", sum = "h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_docker_go_events", importpath = "github.com/docker/go-events", version = "v0.0.0-20190806004212-e31b211e4f1c", sum = "h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_docker_go_metrics", importpath = "github.com/docker/go-metrics", version = "v0.0.1", sum = "h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_docker_go_units", importpath = "github.com/docker/go-units", version = "v0.4.0", sum = "h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_docker_spdystream", importpath = "github.com/docker/spdystream", version = "v0.0.0-20160310174837-449fdfce4d96", sum = "h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_dustin_go_humanize", importpath = "github.com/dustin/go-humanize", version = "v1.0.0", sum = "h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_elazarl_goproxy", importpath = "github.com/elazarl/goproxy", version = "v0.0.0-20180725130230-947c36da3153", sum = "h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_emicklei_go_restful", importpath = "github.com/emicklei/go-restful", version = "v2.9.5+incompatible", sum = "h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_euank_go_kmsg_parser", importpath = "github.com/euank/go-kmsg-parser", version = "v2.0.0+incompatible", sum = "h1:cHD53+PLQuuQyLZeriD1V/esuG4MuU0Pjs5y6iknohY=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_evanphx_json_patch", importpath = "github.com/evanphx/json-patch", version = "v4.9.0+incompatible", sum = "h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_exponent_io_jsonpath", importpath = "github.com/exponent-io/jsonpath", version = "v0.0.0-20151013193312-d6023ce2651d", sum = "h1:105gxyaGwCFad8crR9dcMQWvV9Hvulu6hwUh4tWPJnM=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_farsightsec_golang_framestream", importpath = "github.com/farsightsec/golang-framestream", version = "v0.0.0-20190425193708-fa4b164d59b8", sum = "h1:/iPdQppoAsTfML+yqFSq2EBChiEMnRkh5WvhFgtWwcU=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_fatih_camelcase", importpath = "github.com/fatih/camelcase", version = "v1.0.0", sum = "h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_fatih_color", importpath = "github.com/fatih/color", version = "v1.7.0", sum = "h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_flynn_go_shlex", importpath = "github.com/flynn/go-shlex", version = "v0.0.0-20150515145356-3f9db97f8568", sum = "h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_fullsailor_pkcs7", importpath = "github.com/fullsailor/pkcs7", version = "v0.0.0-20180613152042-8306686428a5", sum = "h1:v+vxrd9XS8uWIXG2RK0BHCnXc30qLVQXVqbK+IOmpXk=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_ghodss_yaml", importpath = "github.com/ghodss/yaml", version = "v1.0.0", sum = "h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_go_delve_delve", importpath = "github.com/go-delve/delve", version = "v1.4.1", sum = "h1:kZs0umEv+VKnK84kY9/ZXWrakdLTeRTyYjFdgLelZCQ=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_go_logr_logr", importpath = "github.com/go-logr/logr", version = "v0.2.0", sum = "h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_go_openapi_analysis", importpath = "github.com/go-openapi/analysis", version = "v0.19.5", sum = "h1:8b2ZgKfKIUTVQpTb77MoRDIMEIwvDVw40o3aOXdfYzI=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_go_openapi_errors", importpath = "github.com/go-openapi/errors", version = "v0.19.2", sum = "h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_go_openapi_jsonpointer", importpath = "github.com/go-openapi/jsonpointer", version = "v0.19.3", sum = "h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_go_openapi_jsonreference", importpath = "github.com/go-openapi/jsonreference", version = "v0.19.3", sum = "h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_go_openapi_loads", importpath = "github.com/go-openapi/loads", version = "v0.19.4", sum = "h1:5I4CCSqoWzT+82bBkNIvmLc0UOsoKKQ4Fz+3VxOB7SY=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_go_openapi_runtime", importpath = "github.com/go-openapi/runtime", version = "v0.19.4", sum = "h1:csnOgcgAiuGoM/Po7PEpKDoNulCcF3FGbSnbHfxgjMI=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_go_openapi_spec", importpath = "github.com/go-openapi/spec", version = "v0.19.3", sum = "h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_go_openapi_strfmt", importpath = "github.com/go-openapi/strfmt", version = "v0.19.3", sum = "h1:eRfyY5SkaNJCAwmmMcADjY31ow9+N7MCLW7oRkbsINA=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_go_openapi_swag", importpath = "github.com/go-openapi/swag", version = "v0.19.5", sum = "h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_go_openapi_validate", importpath = "github.com/go-openapi/validate", version = "v0.19.5", sum = "h1:QhCBKRYqZR+SKo4gl1lPhPahope8/RLt6EVgY8X80w0=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_go_stack_stack", importpath = "github.com/go-stack/stack", version = "v1.8.0", sum = "h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_godbus_dbus_v5", importpath = "github.com/godbus/dbus/v5", version = "v5.0.3", sum = "h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_gofrs_flock", importpath = "github.com/gofrs/flock", version = "v0.8.0", sum = "h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_gogo_googleapis", importpath = "github.com/gogo/googleapis", version = "v1.3.2", sum = "h1:kX1es4djPJrsDhY7aZKJy7aZasdcB5oSOEphMjSB53c=", build_file_proto_mode = "disable", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_gogo_protobuf", importpath = "github.com/gogo/protobuf", version = "v1.3.1", sum = "h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_golang_groupcache", importpath = "github.com/golang/groupcache", version = "v0.0.0-20191227052852-215e87163ea7", sum = "h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_google_btree", importpath = "github.com/google/btree", version = "v1.0.0", sum = "h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_google_cadvisor", importpath = "github.com/google/cadvisor", version = "v0.37.3", sum = "h1:qsH/np74sg1/tEe+bn+e2JIPFxrw6En3gCVuQdolc74=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_google_certificate_transparency_go", importpath = "github.com/google/certificate-transparency-go", version = "v1.1.0", sum = "h1:10MlrYzh5wfkToxWI4yJzffsxLfxcEDlOATMx/V9Kzw=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_google_go_cmp", importpath = "github.com/google/go-cmp", version = "v0.4.0", sum = "h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_google_go_dap", importpath = "github.com/google/go-dap", version = "v0.2.0", sum = "h1:whjIGQRumwbR40qRU7CEKuFLmePUUc2s4Nt9DoXXxWk=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_google_go_tpm", importpath = "github.com/google/go-tpm", version = "v0.1.2-0.20190725015402-ae6dd98980d4", sum = "h1:GNNkIb6NSjYfw+KvgUFW590mcgsSFihocSrbXct1sEw=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_google_go_tpm_tools", importpath = "github.com/google/go-tpm-tools", version = "v0.0.0-20190731025042-f8c04ff88181", sum = "h1:1Y5W2uh6E7I6hhI6c0WVSbV+Ae15uhemqi3RvSgtZpk=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_google_gofuzz", importpath = "github.com/google/gofuzz", version = "v1.1.0", sum = "h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_google_gopacket", importpath = "github.com/google/gopacket", version = "v1.1.17", sum = "h1:rMrlX2ZY2UbvT+sdz3+6J+pp2z+msCq9MxTU6ymxbBY=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_google_gvisor", importpath = "github.com/google/gvisor", version = "v0.0.0-20211029210316-b822923b706d", sum = "h1:DLypxrLRMq0P4f96vlutTfJpM5/Y8q6rDafgBU1pxAs=", patches = [ "//third_party/go/patches:gvisor.patch", "//third_party/go/patches:gvisor-build-against-newer-runtime-specs.patch", "//third_party/go/patches:gvisor-cgroup-fix.patch", ], patch_args = ["-p1"], build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_google_nftables", importpath = "github.com/google/nftables", version = "v0.0.0-20200316075819-7127d9d22474", sum = "h1:D6bN82zzK92ywYsE+Zjca7EHZCRZbcNTU3At7WdxQ+c=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_google_subcommands", importpath = "github.com/google/subcommands", version = "v1.0.2-0.20190508160503-636abe8753b8", sum = "h1:8nlgEAjIalk6uj/CGKCdOO8CQqTeysvcW4RFZ6HbkGM=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_google_uuid", importpath = "github.com/google/uuid", version = "v1.1.1", sum = "h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_googleapis_gnostic", importpath = "github.com/googleapis/gnostic", version = "v0.4.1", sum = "h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I=", build_file_proto_mode = "disable", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_gorilla_websocket", importpath = "github.com/gorilla/websocket", version = "v1.4.0", sum = "h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_gregjones_httpcache", importpath = "github.com/gregjones/httpcache", version = "v0.0.0-20180305231024-9cad4c3443a7", sum = "h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_grpc_ecosystem_go_grpc_middleware", importpath = "github.com/grpc-ecosystem/go-grpc-middleware", version = "v1.0.1-0.20190118093823-f849b5445de4", sum = "h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_grpc_ecosystem_go_grpc_prometheus", importpath = "github.com/grpc-ecosystem/go-grpc-prometheus", version = "v1.2.0", sum = "h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_grpc_ecosystem_grpc_gateway", importpath = "github.com/grpc-ecosystem/grpc-gateway", version = "v1.9.5", sum = "h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_grpc_ecosystem_grpc_opentracing", importpath = "github.com/grpc-ecosystem/grpc-opentracing", version = "v0.0.0-20180507213350-8e809c8a8645", sum = "h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_grpc_grpc", importpath = "github.com/grpc/grpc", version = "v1.29.1", sum = "h1:oDOYav2X6WE7espebiQ//iP9N+/gGygUv6XuuyvkFMc=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_hashicorp_errwrap", importpath = "github.com/hashicorp/errwrap", version = "v1.0.0", sum = "h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_hashicorp_go_multierror", importpath = "github.com/hashicorp/go-multierror", version = "v1.0.0", sum = "h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_hashicorp_golang_lru", importpath = "github.com/hashicorp/golang-lru", version = "v0.5.3", sum = "h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_hashicorp_hcl", importpath = "github.com/hashicorp/hcl", version = "v1.0.0", sum = "h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_hpcloud_tail", importpath = "github.com/hpcloud/tail", version = "v1.0.0", sum = "h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_huandu_xstrings", importpath = "github.com/huandu/xstrings", version = "v1.0.0", sum = "h1:pO2K/gKgKaat5LdpAhxhluX2GPQMaI3W5FUz/I/UnWk=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_imdario_mergo", importpath = "github.com/imdario/mergo", version = "v0.3.7", sum = "h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_inconshreveable_mousetrap", importpath = "github.com/inconshreveable/mousetrap", version = "v1.0.0", sum = "h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_infobloxopen_go_trees", importpath = "github.com/infobloxopen/go-trees", version = "v0.0.0-20190313150506-2af4e13f9062", sum = "h1:d3VSuNcgTCn21dNMm8g412Fck/XWFmMj4nJhhHT7ZZ0=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_insomniacslk_dhcp", importpath = "github.com/insomniacslk/dhcp", version = "v0.0.0-20200922210017-67c425063dca", sum = "h1:zhwTlFGM8ZkD5J/c43IWkxSJQWzhm20QWou8zajbCck=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_j_keck_arping", importpath = "github.com/j-keck/arping", version = "v0.0.0-20160618110441-2cf9dc699c56", sum = "h1:742eGXur0715JMq73aD95/FU0XpVKXqNuTnEfXsLOYQ=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_joho_godotenv", importpath = "github.com/joho/godotenv", version = "v1.3.0", sum = "h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_jonboulle_clockwork", importpath = "github.com/jonboulle/clockwork", version = "v0.1.0", sum = "h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_json_iterator_go", importpath = "github.com/json-iterator/go", version = "v1.1.10", sum = "h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_karrick_godirwalk", importpath = "github.com/karrick/godirwalk", version = "v1.7.5", sum = "h1:VbzFqwXwNbAZoA6W5odrLr+hKK197CcENcPh6E/gJ0M=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_kevinburke_go_bindata", importpath = "github.com/kevinburke/go-bindata", version = "v3.16.0+incompatible", sum = "h1:TFzFZop2KxGhqNwsyjgmIh5JOrpG940MZlm5gNbxr8g=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_koneu_natend", importpath = "github.com/koneu/natend", version = "v0.0.0-20150829182554-ec0926ea948d", sum = "h1:MFX8DxRnKMY/2M3H61iSsVbo/n3h0MWGmWNN1UViOU0=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_konsorten_go_windows_terminal_sequences", importpath = "github.com/konsorten/go-windows-terminal-sequences", version = "v1.0.3", sum = "h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_kr_pretty", importpath = "github.com/kr/pretty", version = "v0.1.0", sum = "h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_kr_pty", importpath = "github.com/kr/pty", version = "v1.1.4-0.20190131011033-7dc38fb350b1", sum = "h1:zc0R6cOw98cMengLA0fvU55mqbnN7sd/tBMLzSejp+M=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_liggitt_tabwriter", importpath = "github.com/liggitt/tabwriter", version = "v0.0.0-20181228230101-89fcab3d43de", sum = "h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_lithammer_dedent", importpath = "github.com/lithammer/dedent", version = "v1.1.0", sum = "h1:VNzHMVCBNG1j0fh3OrsFRkVUwStdDArbgBWoPAffktY=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_magiconair_properties", importpath = "github.com/magiconair/properties", version = "v1.8.1", sum = "h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_mailru_easyjson", importpath = "github.com/mailru/easyjson", version = "v0.7.0", sum = "h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_mattn_go_colorable", importpath = "github.com/mattn/go-colorable", version = "v0.0.9", sum = "h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_mattn_go_isatty", importpath = "github.com/mattn/go-isatty", version = "v0.0.4", sum = "h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_mattn_go_runewidth", importpath = "github.com/mattn/go-runewidth", version = "v0.0.2", sum = "h1:UnlwIPBGaTZfPQ6T1IGzPI0EkYAQmT9fAEJ/poFC63o=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_mattn_go_shellwords", importpath = "github.com/mattn/go-shellwords", version = "v1.0.11", sum = "h1:vCoR9VPpsk/TZFW2JwK5I9S0xdrtUq2bph6/YjEPnaw=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_matttproud_golang_protobuf_extensions", importpath = "github.com/matttproud/golang_protobuf_extensions", version = "v1.0.1", sum = "h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_mdlayher_ethernet", importpath = "github.com/mdlayher/ethernet", version = "v0.0.0-20190606142754-0394541c37b7", sum = "h1:lez6TS6aAau+8wXUP3G9I3TGlmPFEq2CTxBaRqY6AGE=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_mdlayher_genetlink", importpath = "github.com/mdlayher/genetlink", version = "v1.0.0", sum = "h1:OoHN1OdyEIkScEmRgxLEe2M9U8ClMytqA5niynLtfj0=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_mdlayher_netlink", importpath = "github.com/mdlayher/netlink", version = "v1.1.0", sum = "h1:mpdLgm+brq10nI9zM1BpX1kpDbh3NLl3RSnVq6ZSkfg=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_mdlayher_raw", importpath = "github.com/mdlayher/raw", version = "v0.0.0-20191009151244-50f2db8cc065", sum = "h1:aFkJ6lx4FPip+S+Uw4aTegFMct9shDvP+79PsSxpm3w=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_miekg_dns", importpath = "github.com/miekg/dns", version = "v1.1.29", sum = "h1:xHBEhR+t5RzcFJjBLJlax2daXOrTYtr9z4WdKEfWFzg=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_mindprince_gonvml", importpath = "github.com/mindprince/gonvml", version = "v0.0.0-20190828220739-9ebdce4bb989", sum = "h1:PS1dLCGtD8bb9RPKJrc8bS7qHL6JnW1CZvwzH9dPoUs=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_mistifyio_go_zfs", importpath = "github.com/mistifyio/go-zfs", version = "v2.1.2-0.20190413222219-f784269be439+incompatible", sum = "h1:aKW/4cBs+yK6gpqU3K/oIwk9Q/XICqd3zOX/UFuvqmk=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_mitchellh_go_wordwrap", importpath = "github.com/mitchellh/go-wordwrap", version = "v1.0.0", sum = "h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_mitchellh_mapstructure", importpath = "github.com/mitchellh/mapstructure", version = "v1.1.2", sum = "h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_moby_sys_mountinfo", importpath = "github.com/moby/sys/mountinfo", version = "v0.1.3", sum = "h1:KIrhRO14+AkwKvG/g2yIpNMOUVZ02xNhOw8KY1WsLOI=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_moby_term", importpath = "github.com/moby/term", version = "v0.0.0-20200312100748-672ec06f55cd", sum = "h1:aY7OQNf2XqY/JQ6qREWamhI/81os/agb2BAGpcx5yWI=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_modern_go_concurrent", importpath = "github.com/modern-go/concurrent", version = "v0.0.0-20180306012644-bacd9c7ef1dd", sum = "h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_modern_go_reflect2", importpath = "github.com/modern-go/reflect2", version = "v1.0.1", sum = "h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_mohae_deepcopy", importpath = "github.com/mohae/deepcopy", version = "v0.0.0-20170308212314-bb9b5e7adda9", sum = "h1:Sha2bQdoWE5YQPTlJOL31rmce94/tYi113SlFo1xQ2c=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_morikuni_aec", importpath = "github.com/morikuni/aec", version = "v1.0.0", sum = "h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_mrunalp_fileutils", importpath = "github.com/mrunalp/fileutils", version = "v0.0.0-20200520151820-abd8a0e76976", sum = "h1:aZQToFSLH8ejFeSkTc3r3L4dPImcj7Ib/KgmkQqbGGg=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_muesli_reflow", importpath = "github.com/muesli/reflow", version = "v0.0.0-20191128061954-86f094cbed14", sum = "h1:99aDTygRy9yEwggATz+ZLrDFRsjRog5BqbAfsr47Ztw=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_munnerz_goautoneg", importpath = "github.com/munnerz/goautoneg", version = "v0.0.0-20191010083416-a7dc8b61c822", sum = "h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_mxk_go_flowrate", importpath = "github.com/mxk/go-flowrate", version = "v0.0.0-20140419014527-cca7078d478f", sum = "h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_olekukonko_tablewriter", importpath = "github.com/olekukonko/tablewriter", version = "v0.0.0-20170122224234-a0225b3f23b5", sum = "h1:58+kh9C6jJVXYjt8IE48G2eWl6BjwU5Gj0gqY84fy78=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_onsi_ginkgo", importpath = "github.com/onsi/ginkgo", version = "v1.11.0", sum = "h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_onsi_gomega", importpath = "github.com/onsi/gomega", version = "v1.7.0", sum = "h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_opencontainers_go_digest", importpath = "github.com/opencontainers/go-digest", version = "v1.0.0", sum = "h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_opencontainers_image_spec", importpath = "github.com/opencontainers/image-spec", version = "v1.0.1", sum = "h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_opencontainers_runc", importpath = "github.com/opencontainers/runc", version = "v1.0.0-rc92", sum = "h1:+IczUKCRzDzFDnw99O/PAqrcBBCoRp9xN3cB1SYSNS4=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_opencontainers_runtime_spec", importpath = "github.com/opencontainers/runtime-spec", version = "v1.0.3-0.20200728170252-4d89ac9fbff6", sum = "h1:NhsM2gc769rVWDqJvapK37r+7+CBXI8xHhnfnt8uQsg=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_opencontainers_selinux", importpath = "github.com/opencontainers/selinux", version = "v1.6.0", sum = "h1:+bIAS/Za3q5FTwWym4fTB0vObnfCf3G/NC7K6Jx62mY=", build_tags = [ "selinux", ], build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_opentracing_opentracing_go", importpath = "github.com/opentracing/opentracing-go", version = "v1.1.0", sum = "h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_peterbourgon_diskv", importpath = "github.com/peterbourgon/diskv", version = "v2.0.1+incompatible", sum = "h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_peterh_liner", importpath = "github.com/peterh/liner", version = "v0.0.0-20170317030525-88609521dc4b", sum = "h1:8uaXtUkxiy+T/zdLWuxa/PG4so0TPZDZfafFNNSaptE=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_pierrec_lz4", importpath = "github.com/pierrec/lz4", version = "v2.3.0+incompatible", sum = "h1:CZzRn4Ut9GbUkHlQ7jqBXeZQV41ZSKWFc302ZU6lUTk=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_pkg_errors", importpath = "github.com/pkg/errors", version = "v0.9.1", sum = "h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_pkg_xattr", importpath = "github.com/pkg/xattr", version = "v0.4.1", sum = "h1:dhclzL6EqOXNaPDWqoeb9tIxATfBSmjqL0b4DpSjwRw=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_pquerna_cachecontrol", importpath = "github.com/pquerna/cachecontrol", version = "v0.0.0-20171018203845-0dec1b30a021", sum = "h1:0XM1XL/OFFJjXsYXlG30spTkV/E9+gmd5GD1w2HE8xM=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_prometheus_client_golang", importpath = "github.com/prometheus/client_golang", version = "v1.6.0", sum = "h1:YVPodQOcK15POxhgARIvnDRVpLcuK8mglnMrWfyrw6A=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_prometheus_client_model", importpath = "github.com/prometheus/client_model", version = "v0.2.0", sum = "h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_prometheus_common", importpath = "github.com/prometheus/common", version = "v0.9.1", sum = "h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_prometheus_procfs", importpath = "github.com/prometheus/procfs", version = "v0.0.11", sum = "h1:DhHlBtkHWPYi8O2y31JkK0TF+DGM+51OopZjH/Ia5qI=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_pseudomuto_protoc_gen_doc", importpath = "github.com/pseudomuto/protoc-gen-doc", version = "v1.5.0", sum = "h1:pHZp0MEiT68jrZV8js8BS7E9ZEnlSLegoQbbtXj5lfo=", patches = [ "//third_party/go/patches:protoc-gen-doc-no-gogo.patch", ], patch_args = ["-p1"], build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_pseudomuto_protokit", importpath = "github.com/pseudomuto/protokit", version = "v0.2.0", sum = "h1:hlnBDcy3YEDXH7kc9gV+NLaN0cDzhDvD1s7Y6FZ8RpM=", build_file_proto_mode = "disable", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_rekby_gpt", importpath = "github.com/rekby/gpt", version = "v0.0.0-20200219180433-a930afbc6edc", sum = "h1:goZGTwEEn8mWLcY012VouWZWkJ8GrXm9tS3VORMxT90=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_robfig_cron", importpath = "github.com/robfig/cron", version = "v1.1.0", sum = "h1:jk4/Hud3TTdcrJgUOBgsqrZBarcxl6ADIjSC2iniwLY=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_russross_blackfriday", importpath = "github.com/russross/blackfriday", version = "v1.5.2", sum = "h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_russross_blackfriday_v2", importpath = "github.com/russross/blackfriday/v2", version = "v2.0.1", sum = "h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_safchain_ethtool", importpath = "github.com/safchain/ethtool", version = "v0.0.0-20190326074333-42ed695e3de8", sum = "h1:2c1EFnZHIPCW8qKWgHMH/fX2PkSabFc5mrVzfUNdg5U=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_sbezverk_nfproxy", importpath = "github.com/sbezverk/nfproxy", version = "v0.0.0-20200514180651-7fac5f39824e", sum = "h1:fJ2lHQ7ZUjmgJbvVQ509ioBmrGHcbvlwfjUieExw/dU=", patches = [ "//third_party/go/patches:nfproxy.patch", ], patch_args = ["-p1"], build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_sbezverk_nftableslib", importpath = "github.com/sbezverk/nftableslib", version = "v0.0.0-20200402150358-c20bed91f482", sum = "h1:k7gEZ/EwJhHDTRXFUZQlE4/p1cmoha7zL7PWCDG3ZHQ=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_shurcool_sanitized_anchor_name", importpath = "github.com/shurcooL/sanitized_anchor_name", version = "v1.0.0", sum = "h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_sirupsen_logrus", importpath = "github.com/sirupsen/logrus", version = "v1.6.0", sum = "h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_soheilhy_cmux", importpath = "github.com/soheilhy/cmux", version = "v0.1.4", sum = "h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_spf13_afero", importpath = "github.com/spf13/afero", version = "v1.2.2", sum = "h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_spf13_cast", importpath = "github.com/spf13/cast", version = "v1.3.0", sum = "h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_spf13_cobra", importpath = "github.com/spf13/cobra", version = "v1.2.1", sum = "h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_spf13_jwalterweatherman", importpath = "github.com/spf13/jwalterweatherman", version = "v1.1.0", sum = "h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_spf13_pflag", importpath = "github.com/spf13/pflag", version = "v1.0.5", sum = "h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_spf13_viper", importpath = "github.com/spf13/viper", version = "v1.9.0", sum = "h1:yR6EXjTp0y0cLN8OZg1CRZmOBdI88UcGkhgyJhu6nZk=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_stretchr_testify", importpath = "github.com/stretchr/testify", version = "v1.4.0", sum = "h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_subosito_gotenv", importpath = "github.com/subosito/gotenv", version = "v1.2.0", sum = "h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_syndtr_gocapability", importpath = "github.com/syndtr/gocapability", version = "v0.0.0-20180916011248-d98352740cb2", sum = "h1:b6uOv7YOFK0TYG7HtkIgExQo+2RdLuwRft63jn2HWj8=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_tchap_go_patricia", importpath = "github.com/tchap/go-patricia", version = "v2.2.6+incompatible", sum = "h1:JvoDL7JSoIP2HDE8AbDH3zC8QBPxmzYe32HHy5yQ+Ck=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_tmc_grpc_websocket_proxy", importpath = "github.com/tmc/grpc-websocket-proxy", version = "v0.0.0-20190109142713-0ad062ec5ee5", sum = "h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_u_root_u_root", importpath = "github.com/u-root/u-root", version = "v7.0.0+incompatible", sum = "h1:u+KSS04pSxJGI5E7WE4Bs9+Zd75QjFv+REkjy/aoAc8=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_ulikunitz_xz", importpath = "github.com/ulikunitz/xz", version = "v0.5.6", sum = "h1:jGHAfXawEGZQ3blwU5wnWKQJvAraT7Ftq9EXjnXYgt8=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_urfave_cli", importpath = "github.com/urfave/cli", version = "v1.22.1", sum = "h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_vishvananda_netlink", importpath = "github.com/vishvananda/netlink", version = "v1.1.0", sum = "h1:1iyaYNBLmP6L0220aDnYQpo1QEV4t4hJ+xEEhhJH8j0=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_vishvananda_netns", importpath = "github.com/vishvananda/netns", version = "v0.0.0-20200520041808-52d707b772fe", sum = "h1:mjAZxE1nh8yvuwhGHpdDqdhtNu2dgbpk93TwoXuk5so=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_willf_bitset", importpath = "github.com/willf/bitset", version = "v1.1.11", sum = "h1:N7Z7E9UvjW+sGsEl7k/SJrvY2reP1A07MrGuCjIOjRE=", build_tags = [ "selinux", ], build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_xiang90_probing", importpath = "github.com/xiang90/probing", version = "v0.0.0-20190116061207-43a291ad63a2", sum = "h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_github_yalue_native_endian", importpath = "github.com/yalue/native_endian", version = "v0.0.0-20180607135909-51013b03be4f", sum = "h1:nsQCScpQ8RRf+wIooqfyyEUINV2cAPuo2uVtHSBbA4M=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_etcd_go_bbolt", importpath = "go.etcd.io/bbolt", version = "v1.3.5", sum = "h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_etcd_go_etcd", importpath = "go.etcd.io/etcd", version = "v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5", sum = "h1:Gqga3zA9tdAcfqobUGjSoCob5L3f8Dt5EuOp3ihNZko=", build_file_proto_mode = "disable", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "org_mongodb_go_mongo_driver", importpath = "go.mongodb.org/mongo-driver", version = "v1.1.2", sum = "h1:jxcFYjlkl8xaERsgLo+RNquI0epW6zuy/ZRQs6jnrFA=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_opencensus_go", importpath = "go.opencensus.io", version = "v0.22.0", sum = "h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "net_starlark_go", importpath = "go.starlark.net", version = "v0.0.0-20190702223751-32f345186213", sum = "h1:lkYv5AKwvvduv5XWP6szk/bvvgO6aDeUujhZQXIFTes=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "org_uber_go_atomic", importpath = "go.uber.org/atomic", version = "v1.4.0", sum = "h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "org_uber_go_multierr", importpath = "go.uber.org/multierr", version = "v1.1.0", sum = "h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "org_uber_go_zap", importpath = "go.uber.org/zap", version = "v1.15.0", sum = "h1:ZZCA22JRF2gQE5FoNmhmrf7jeJJ2uhqDUNRYKm8dvmM=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "org_golang_x_arch", importpath = "golang.org/x/arch", version = "v0.0.0-20190927153633-4e8777c89be4", sum = "h1:QlVATYS7JBoZMVaf+cNjb90WD/beKVHnIxFKT4QaHVI=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "org_golang_x_crypto", importpath = "golang.org/x/crypto", version = "v0.0.0-20200622213623-75b288015ac9", sum = "h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "org_golang_x_mod", importpath = "golang.org/x/mod", version = "v0.3.0", sum = "h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=", build_extra_args = [ "-go_naming_convention=import_alias", "-go_naming_convention_external=import_alias", ], ) go_repository( name = "org_golang_x_net", importpath = "golang.org/x/net", version = "v0.0.0-20201110031124-69a78807bb2b", sum = "h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "org_golang_x_oauth2", importpath = "golang.org/x/oauth2", version = "v0.0.0-20191202225959-858c2ad4c8b6", sum = "h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "org_golang_x_sync", importpath = "golang.org/x/sync", version = "v0.0.0-20181108010431-42b317875d0f", sum = "h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ=", build_extra_args = [ "-go_naming_convention=import_alias", "-go_naming_convention_external=import_alias", ], ) go_repository( name = "org_golang_x_text", importpath = "golang.org/x/text", version = "v0.3.0", sum = "h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "org_golang_x_time", importpath = "golang.org/x/time", version = "v0.0.0-20191024005414-555d28b269f0", sum = "h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "org_golang_x_tools", importpath = "golang.org/x/tools", version = "v0.1.2-0.20210518182153-17b346669257", sum = "h1:e7SbNJfMEurLnwdNnaP7LItYhtCPChdiq+j3RwB8YGY=", patches = [ "//third_party/go/patches:goimports-group-merging.patch", ], patch_args = ["-p1"], build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "org_golang_x_xerrors", importpath = "golang.org/x/xerrors", version = "v0.0.0-20191204190536-9bdfabe68543", sum = "h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "com_zx2c4_golang_wireguard_wgctrl", importpath = "golang.zx2c4.com/wireguard/wgctrl", version = "v0.0.0-20200515170644-ec7f26be9d9e", sum = "h1:fqDhK9OlzaaiFjnyaAfR9Q1RPKCK7OCTLlHGP9f74Nk=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "org_gonum_v1_gonum", importpath = "gonum.org/v1/gonum", version = "v0.6.2", sum = "h1:4r+yNT0+8SWcOkXP+63H2zQbN+USnC73cjGUxnDF94Q=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "org_golang_google_genproto", importpath = "google.golang.org/genproto", version = "v0.0.0-20200224152610-e50cd9704f63", sum = "h1:YzfoEYWbODU5Fbt37+h7X16BWQbad7Q4S6gclTKFXM8=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "org_golang_google_grpc", importpath = "google.golang.org/grpc", version = "v1.29.1", sum = "h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "in_gopkg_djherbis_times_v1", importpath = "gopkg.in/djherbis/times.v1", version = "v1.2.0", sum = "h1:UCvDKl1L/fmBygl2Y7hubXCnY7t4Yj46ZrBFNUipFbM=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "in_gopkg_fsnotify_v1", importpath = "gopkg.in/fsnotify.v1", version = "v1.4.7", sum = "h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "in_gopkg_inf_v0", importpath = "gopkg.in/inf.v0", version = "v0.9.1", sum = "h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "in_gopkg_ini_v1", importpath = "gopkg.in/ini.v1", version = "v1.63.2", sum = "h1:tGK/CyBg7SMzb60vP1M03vNZ3VDu3wGQJwn7Sxi9r3c=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "in_gopkg_natefinch_lumberjack_v2", importpath = "gopkg.in/natefinch/lumberjack.v2", version = "v2.0.0", sum = "h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "in_gopkg_square_go_jose_v2", importpath = "gopkg.in/square/go-jose.v2", version = "v2.2.2", sum = "h1:orlkJ3myw8CN1nVQHBFfloD+L3egixIa4FvUP6RosSA=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "in_gopkg_tomb_v1", importpath = "gopkg.in/tomb.v1", version = "v1.0.0-20141024135613-dd632973f1e7", sum = "h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "in_gopkg_yaml_v2", importpath = "gopkg.in/yaml.v2", version = "v2.2.8", sum = "h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_api", importpath = "k8s.io/api", version = "v0.19.7", sum = "h1:MpHhls03C2pyzoYcpbe4QqYiiZjdvW+tuWq6TbjV14Y=", build_file_proto_mode = "disable", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_apiextensions_apiserver", importpath = "k8s.io/apiextensions-apiserver", version = "v0.19.7", sum = "h1:aV9DANMSCCYBEMbtoT/5oesrtcciQrjy9yqWVtZZL5A=", build_file_proto_mode = "disable", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_apimachinery", importpath = "k8s.io/apimachinery", version = "v0.19.8-rc.0", sum = "h1:/vt04+wL+Y79Qsu8hAo2K4QJA+AKGkJCYmoTTVrUiPQ=", build_file_proto_mode = "disable", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_apiserver", importpath = "k8s.io/apiserver", version = "v0.19.7", sum = "h1:fOOELJ9TNC6DgKL3GUkQLE/EBMLjwBseTstx2eRP61o=", build_file_proto_mode = "disable", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_cli_runtime", importpath = "k8s.io/cli-runtime", version = "v0.19.7", sum = "h1:VkHsqrQYCD6+yBm2k9lOxLJtfo1tmb/TdYIHQ2RSCsY=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_client_go", importpath = "k8s.io/client-go", version = "v0.19.7", sum = "h1:SoJ4mzZ9LyXBGDe8MmpMznw0CwQ1ITWgsmG7GixvhUU=", pre_patches = [ "//third_party/go/patches:k8s-client-go.patch", ], patch_args = ["-p1"], build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_cloud_provider", importpath = "k8s.io/cloud-provider", version = "v0.19.7", sum = "h1:01fiPTLkTU/MNKZBcMmeYQ5DWqRS4d3GhYGGGlkjgOw=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_cluster_bootstrap", importpath = "k8s.io/cluster-bootstrap", version = "v0.19.7", sum = "h1:xlI+YfeS5gOVa33WVh1viiPZMDN9j7BAiY0iJkg2LwI=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_code_generator", importpath = "k8s.io/code-generator", version = "v0.19.9-rc.0", sum = "h1:ci5Y09V0Uiim61fltZsjHYp+i6eNaMMmtIlIveHqQ9Y=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_component_base", importpath = "k8s.io/component-base", version = "v0.19.7", sum = "h1:ZXS2VRWOWBOc2fTd1zjzhi/b/mkqFT9FDqiNsn1cH30=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_cri_api", importpath = "k8s.io/cri-api", version = "v0.19.8-rc.0", sum = "h1:aXNNIIoVcmIB/mlz/otcULQOgnErxnLB4uaWENHKblA=", build_file_proto_mode = "disable", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_csi_translation_lib", importpath = "k8s.io/csi-translation-lib", version = "v0.19.7", sum = "h1:Spr0XWqXufEUQA47axmPTm1xOabdMYG9MUbJVaRRb0g=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_gengo", importpath = "k8s.io/gengo", version = "v0.0.0-20200428234225-8167cfdcfc14", sum = "h1:t4L10Qfx/p7ASH3gXCdIUtPbbIuegCoUJf3TMSFekjw=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_heapster", importpath = "k8s.io/heapster", version = "v1.2.0-beta.1", sum = "h1:lUsE/AHOMHpi3MLlBEkaU8Esxm5QhdyCrv1o7ot0s84=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_klog_v2", importpath = "k8s.io/klog/v2", version = "v2.2.0", sum = "h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_kube_aggregator", importpath = "k8s.io/kube-aggregator", version = "v0.19.7", sum = "h1:Eol5vPNFKaDScdVuTh0AofhuSr4cJxP5Vfv8JXW8OAQ=", build_file_proto_mode = "disable", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_kube_controller_manager", importpath = "k8s.io/kube-controller-manager", version = "v0.19.7", sum = "h1:3rNXjHM5LHcv2HiO2JjdV4yW3EN+2tCPaKXWL/Cl8TM=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_kube_openapi", importpath = "k8s.io/kube-openapi", version = "v0.0.0-20200805222855-6aeccd4b50c6", sum = "h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_kube_proxy", importpath = "k8s.io/kube-proxy", version = "v0.19.7", sum = "h1:QQUwEnHA1jawodclndlmK/6Ifc9XVNlUaQ4Vq5RVbI8=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_kube_scheduler", importpath = "k8s.io/kube-scheduler", version = "v0.19.7", sum = "h1:TlQFoH7rATVqU7myNZ4FBgnXdGIwR7iBBNk3ir8Y9WM=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_kubectl", importpath = "k8s.io/kubectl", version = "v0.19.7", sum = "h1:pSsha+MBr9KLhn0IKrRikeAZ7g2oeShIGHLgqAzE3Ak=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_kubelet", importpath = "k8s.io/kubelet", version = "v0.19.7", sum = "h1:cPp0fXN99cxyXeoI3nG2ZBORUvR0liT+bg6ofCybJzw=", build_file_proto_mode = "disable", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_kubernetes", importpath = "k8s.io/kubernetes", version = "v1.19.7", sum = "h1:Yk9W5SL1KR2mwy0nNZwjFXNImfK7ihrbKhXttidNTiE=", build_file_proto_mode = "disable", build_tags = [ "providerless", ], patches = [ "//third_party/go/patches:k8s-kubernetes.patch", "//third_party/go/patches:k8s-kubernetes-build.patch", "//third_party/go/patches:k8s-native-metrics.patch", "//third_party/go/patches:k8s-use-native.patch", "//third_party/go/patches:k8s-revert-seccomp-runtime-default.patch", "//third_party/go/patches:k8s-removed-block-device-pseudo-locks.patch", ], pre_patches = [ "//third_party/go/patches:k8s-e2e-tests-providerless.patch", "//third_party/go/patches:k8s-fix-paths.patch", "//third_party/go/patches:k8s-fix-logs-path.patch", "//third_party/go/patches:k8s-drop-legacy-log-path.patch", ], patch_args = ["-p1"], build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_legacy_cloud_providers", importpath = "k8s.io/legacy-cloud-providers", version = "v0.19.7", sum = "h1:YJ/l/8/Hn56I9m1cudK8aNypRA/NvI/hYhg8fo/CTus=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_metrics", importpath = "k8s.io/metrics", version = "v0.19.7", sum = "h1:fpTtFhNtS0DwJiYGGsL4YoSjHlLw8qugkgw3EXSWaUA=", build_file_proto_mode = "disable", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_repo_infra", importpath = "k8s.io/repo-infra", version = "v0.1.4-0.20210105022653-a3483874bd37", sum = "h1:0GPavEcPKBA0rYl7f6dO0mXYmx7t9RaXD3be2g23Ps4=", pre_patches = [ "//third_party/go/patches:k8s-infra-bzl4-compat.patch", "//third_party/go/patches:k8s-infra-fix-go116.patch", ], patch_args = ["-p1"], build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_sample_apiserver", importpath = "k8s.io/sample-apiserver", version = "v0.19.7", sum = "h1:ZWD6dsvqpqhWj3jKRb19/m/bo/0r+TRgjkX+h5m7f4g=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_utils", importpath = "k8s.io/utils", version = "v0.0.0-20200729134348-d5654de09c73", sum = "h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg=", patches = [ "//third_party/go/patches:k8s-native-mounter.patch", ], patch_args = ["-p1"], build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_sigs_apiserver_network_proxy_konnectivity_client", importpath = "sigs.k8s.io/apiserver-network-proxy/konnectivity-client", version = "v0.0.9", sum = "h1:rusRLrDhjBp6aYtl9sGEvQJr6faoHoDLd0YcUBTZguI=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_sigs_kustomize", importpath = "sigs.k8s.io/kustomize", version = "v2.0.3+incompatible", sum = "h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_sigs_structured_merge_diff_v4", importpath = "sigs.k8s.io/structured-merge-diff/v4", version = "v4.0.1", sum = "h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "io_k8s_sigs_yaml", importpath = "sigs.k8s.io/yaml", version = "v1.2.0", sum = "h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], ) go_repository( name = "ml_vbom_util", importpath = "vbom.ml/util", version = "v0.0.0-20160121211510-db5cfe13f5cc", sum = "h1:MksmcCZQWAQJCTA5T0jgI/0sJ51AVm4Z41MrmfczEoc=", build_extra_args = [ "-go_naming_convention=go_default_library", "-go_naming_convention_external=go_default_library", ], )
def dp_fibonacci(num): ''' Returns fibonacci number of a given integer using dynamic programming for faster runtime Runtime: O(n) ''' # Returns -1 if num is negative if num < 0: return -1 if num == 0: return 0 if num == 1 or num == 2: return 1 dp = [1,1] for i in range(2,num): dp.append(dp[i-1]+dp[i-2]) return dp[-1]
Clock.bpm=var([120,60,30,15,2],[124,2,1,1/2,1/2]) # wait for the drop! Scale.default="major" d1 >> play("<|V0|:>< O ><|[--]5|>", sample=2) d2 >> play("<...(+|L2|)>< m>") c1 >> play("n", dur=1/4, sample=PRand(8), pan=PWhite(-1,1)) b1 >> dbass(var([0,-2],8), dur=PDur(3,9), shape=PWhite(0,0.5), sus=2, chop=4, pan=PWhite(-1,1)) p1 >> pads((0,2,4,6), dur=16, amp=1/2, room=1, drive=0, shape=0.2, vib=12, slide=1, slidedelay=0.5, chop=16, delay=0.5) p2 >> space([[0,2],4], dur=[6,2]).spread() p3 >> pulse([0,1,0,[1,2],0,4,5,4], lpf=linvar([500,2000],32), lpr=linvar([0.1,1],12), dur=1/2, amp=2*P[1,1,1,1,0,1,1,1]).spread().penta() + var([0,[1,2,3,-1]],[6,2]) cr >> play("#", dur=32, room=1, amp=2).spread()
# Find the duplicate number - Leetcode def findDuplicate(self, nums): """ :type nums: List[int] :rtype: int """ freq = {} for i in range(len(nums)): if nums[i] not in freq.keys(): freq[nums[i]] = 1 else: freq[nums[i]] += 1 for num in freq: if freq[num] > 1: duplicate = num return duplicate
''' There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to its next station (i+1). You begin the journey with an empty tank at one of the gas stations. Return the starting gas station's index if you can travel around the circuit once in the clockwise direction, otherwise return -1. ''' class Solution(object): def canCompleteCircuit(self, gas, cost): """ :type gas: List[int] :type cost: List[int] :rtype: int """ start, curr_sum, total_sum =0, 0, 0 for index in range(len(gas)): diff = gas[index] - cost[index] total_sum += diff curr_sum += diff if curr_sum < 0: start = index + 1 curr_sum = 0 if total_sum >= 0: return start return -1
#!/usr/bin/env python3 # Day 13: Remove K Digits # # Given a non-negative integer num represented as a string, remove k digits # from the number so that the new number is the smallest possible. # # Notes: # - The length of num is less than 10002 and will be ≥ k. # - The given num does not contain any leading zero. class Solution: def removeKdigits(self, num: str, k: int) -> str: stack = [] for digit in num: while k > 0 and len(stack) > 0 and stack[-1] > int(digit): stack.pop() k = k - 1 stack.append(int(digit)) while k > 0: stack.pop() k = k - 1 while len(stack) > 0 and stack[0] == 0: stack = stack[1:] if len(stack) == 0: return "0" else: return "".join(map(str, stack)) # Tests assert Solution().removeKdigits("1432219", 3) == "1219" assert Solution().removeKdigits("10200", 1) == "200" assert Solution().removeKdigits("10", 2) == "0"
#!/usr/bin/python3 the_file = input("Enter the file name, e.g. Covid_19.fasta ") o_file = open(the_file, 'r') line_number = 0 number_of_lines = 0 by_hundred = [0] * 6 for line in o_file: line_number += 1 if ">" in line and number_of_lines == 0: virus_name = line continue elif ">" in line: if number_of_lines < 100: by_hundred[0] += 1 elif number_of_lines < 200: by_hundred[1] += 1 elif number_of_lines < 300: print(virus_name) print(line_number) by_hundred[2] += 1 elif number_of_lines < 400: print(virus_name) print(line_number) by_hundred[3] += 1 elif number_of_lines < 500: by_hundred[4] += 1 elif number_of_lines < 600: by_hundred[5] += 1 else: print("bigger") number_of_lines = 0 virus_name = line else: number_of_lines += 1 o_file.close() for a in by_hundred: print(a)
# encoding: utf-8 # module Rhino.Runtime.InteropWrappers calls itself InteropWrappers # from Rhino3dmIO,Version=5.1.30000.14,Culture=neutral,PublicKeyToken=null # by generator 1.145 # no doc # no imports # no functions # classes class MeshPointDataStruct(object): # no doc m_ci_index=None m_ci_type=None m_edge_index=None m_et=None m_face_index=None m_Px=None m_Py=None m_Pz=None m_t0=None m_t1=None m_t2=None m_t3=None m_Triangle=None class SimpleArrayBrepPointer(object,IDisposable): """ SimpleArrayBrepPointer() """ def Add(self,brep,asConst): """ Add(self: SimpleArrayBrepPointer,brep: Brep,asConst: bool) """ pass def ConstPointer(self): """ ConstPointer(self: SimpleArrayBrepPointer) -> IntPtr """ pass def Dispose(self): """ Dispose(self: SimpleArrayBrepPointer) """ pass def NonConstPointer(self): """ NonConstPointer(self: SimpleArrayBrepPointer) -> IntPtr """ pass def ToNonConstArray(self): """ ToNonConstArray(self: SimpleArrayBrepPointer) -> Array[Brep] """ pass def __add__(self,*args): """ x.__add__(y) <==> x+y """ pass def __enter__(self,*args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self,*args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass Count=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Count(self: SimpleArrayBrepPointer) -> int """ class SimpleArrayCurvePointer(object,IDisposable): """ SimpleArrayCurvePointer() SimpleArrayCurvePointer(curves: IEnumerable[Curve]) """ def ConstPointer(self): """ ConstPointer(self: SimpleArrayCurvePointer) -> IntPtr """ pass def Dispose(self): """ Dispose(self: SimpleArrayCurvePointer) """ pass def NonConstPointer(self): """ NonConstPointer(self: SimpleArrayCurvePointer) -> IntPtr """ pass def ToNonConstArray(self): """ ToNonConstArray(self: SimpleArrayCurvePointer) -> Array[Curve] """ pass def __enter__(self,*args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self,*args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass @staticmethod def __new__(self,curves=None): """ __new__(cls: type) __new__(cls: type,curves: IEnumerable[Curve]) """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass class SimpleArrayDouble(object,IDisposable): """ SimpleArrayDouble() SimpleArrayDouble(items: IEnumerable[float]) """ def ConstPointer(self): """ ConstPointer(self: SimpleArrayDouble) -> IntPtr """ pass def Dispose(self): """ Dispose(self: SimpleArrayDouble) """ pass def NonConstPointer(self): """ NonConstPointer(self: SimpleArrayDouble) -> IntPtr """ pass def ToArray(self): """ ToArray(self: SimpleArrayDouble) -> Array[float] """ pass def __enter__(self,*args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self,*args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass @staticmethod def __new__(self,items=None): """ __new__(cls: type) __new__(cls: type,items: IEnumerable[float]) """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass Count=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Count(self: SimpleArrayDouble) -> int """ class SimpleArrayGeometryPointer(object,IDisposable): """ SimpleArrayGeometryPointer() SimpleArrayGeometryPointer(geometry: IEnumerable[GeometryBase]) SimpleArrayGeometryPointer(geometry: IEnumerable) """ def ConstPointer(self): """ ConstPointer(self: SimpleArrayGeometryPointer) -> IntPtr """ pass def Dispose(self): """ Dispose(self: SimpleArrayGeometryPointer) """ pass def NonConstPointer(self): """ NonConstPointer(self: SimpleArrayGeometryPointer) -> IntPtr """ pass def ToNonConstArray(self): """ ToNonConstArray(self: SimpleArrayGeometryPointer) -> Array[GeometryBase] """ pass def __enter__(self,*args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self,*args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass @staticmethod def __new__(self,geometry=None): """ __new__(cls: type) __new__(cls: type,geometry: IEnumerable[GeometryBase]) __new__(cls: type,geometry: IEnumerable) """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass class SimpleArrayGuid(object,IDisposable): """ SimpleArrayGuid() """ def ConstPointer(self): """ ConstPointer(self: SimpleArrayGuid) -> IntPtr """ pass def Dispose(self): """ Dispose(self: SimpleArrayGuid) """ pass def NonConstPointer(self): """ NonConstPointer(self: SimpleArrayGuid) -> IntPtr """ pass def ToArray(self): """ ToArray(self: SimpleArrayGuid) -> Array[Guid] """ pass def __enter__(self,*args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self,*args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass Count=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Count(self: SimpleArrayGuid) -> int """ class SimpleArrayInt(object,IDisposable): """ SimpleArrayInt() SimpleArrayInt(values: IEnumerable[int]) """ def ConstPointer(self): """ ConstPointer(self: SimpleArrayInt) -> IntPtr """ pass def Dispose(self): """ Dispose(self: SimpleArrayInt) """ pass def NonConstPointer(self): """ NonConstPointer(self: SimpleArrayInt) -> IntPtr """ pass def ToArray(self): """ ToArray(self: SimpleArrayInt) -> Array[int] """ pass def __enter__(self,*args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self,*args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass @staticmethod def __new__(self,values=None): """ __new__(cls: type) __new__(cls: type,values: IEnumerable[int]) """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass Count=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Count(self: SimpleArrayInt) -> int """ class SimpleArrayInterval(object,IDisposable): """ SimpleArrayInterval() """ def ConstPointer(self): """ ConstPointer(self: SimpleArrayInterval) -> IntPtr """ pass def Dispose(self): """ Dispose(self: SimpleArrayInterval) """ pass def NonConstPointer(self): """ NonConstPointer(self: SimpleArrayInterval) -> IntPtr """ pass def ToArray(self): """ ToArray(self: SimpleArrayInterval) -> Array[Interval] """ pass def __enter__(self,*args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self,*args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass Count=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Count(self: SimpleArrayInterval) -> int """ class SimpleArrayLine(object,IDisposable): """ SimpleArrayLine() """ def ConstPointer(self): """ ConstPointer(self: SimpleArrayLine) -> IntPtr """ pass def Dispose(self): """ Dispose(self: SimpleArrayLine) """ pass def NonConstPointer(self): """ NonConstPointer(self: SimpleArrayLine) -> IntPtr """ pass def ToArray(self): """ ToArray(self: SimpleArrayLine) -> Array[Line] """ pass def __enter__(self,*args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self,*args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass Count=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Count(self: SimpleArrayLine) -> int """ class SimpleArrayMeshPointer(object,IDisposable): """ SimpleArrayMeshPointer() """ def Add(self,mesh,asConst): """ Add(self: SimpleArrayMeshPointer,mesh: Mesh,asConst: bool) """ pass def ConstPointer(self): """ ConstPointer(self: SimpleArrayMeshPointer) -> IntPtr """ pass def Dispose(self): """ Dispose(self: SimpleArrayMeshPointer) """ pass def NonConstPointer(self): """ NonConstPointer(self: SimpleArrayMeshPointer) -> IntPtr """ pass def ToNonConstArray(self): """ ToNonConstArray(self: SimpleArrayMeshPointer) -> Array[Mesh] """ pass def __add__(self,*args): """ x.__add__(y) <==> x+y """ pass def __enter__(self,*args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self,*args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass Count=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Count(self: SimpleArrayMeshPointer) -> int """ class SimpleArrayPoint2d(object,IDisposable): """ SimpleArrayPoint2d() """ def ConstPointer(self): """ ConstPointer(self: SimpleArrayPoint2d) -> IntPtr """ pass def Dispose(self): """ Dispose(self: SimpleArrayPoint2d) """ pass def NonConstPointer(self): """ NonConstPointer(self: SimpleArrayPoint2d) -> IntPtr """ pass def ToArray(self): """ ToArray(self: SimpleArrayPoint2d) -> Array[Point2d] """ pass def __enter__(self,*args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self,*args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass Count=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Count(self: SimpleArrayPoint2d) -> int """ class SimpleArrayPoint3d(object,IDisposable): """ SimpleArrayPoint3d() """ def ConstPointer(self): """ ConstPointer(self: SimpleArrayPoint3d) -> IntPtr """ pass def Dispose(self): """ Dispose(self: SimpleArrayPoint3d) """ pass def NonConstPointer(self): """ NonConstPointer(self: SimpleArrayPoint3d) -> IntPtr """ pass def ToArray(self): """ ToArray(self: SimpleArrayPoint3d) -> Array[Point3d] """ pass def __enter__(self,*args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self,*args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass Count=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Count(self: SimpleArrayPoint3d) -> int """ class SimpleArraySurfacePointer(object,IDisposable): """ SimpleArraySurfacePointer() """ def ConstPointer(self): """ ConstPointer(self: SimpleArraySurfacePointer) -> IntPtr """ pass def Dispose(self): """ Dispose(self: SimpleArraySurfacePointer) """ pass def NonConstPointer(self): """ NonConstPointer(self: SimpleArraySurfacePointer) -> IntPtr """ pass def ToNonConstArray(self): """ ToNonConstArray(self: SimpleArraySurfacePointer) -> Array[Surface] """ pass def __enter__(self,*args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self,*args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass class StringHolder(object,IDisposable): """ StringHolder() """ def ConstPointer(self): """ ConstPointer(self: StringHolder) -> IntPtr """ pass def Dispose(self): """ Dispose(self: StringHolder) """ pass @staticmethod def GetString(pStringHolder): """ GetString(pStringHolder: IntPtr) -> str """ pass def NonConstPointer(self): """ NonConstPointer(self: StringHolder) -> IntPtr """ pass def ToString(self): """ ToString(self: StringHolder) -> str """ pass def __enter__(self,*args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self,*args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass def __str__(self,*args): pass class StringWrapper(object,IDisposable): """ StringWrapper() StringWrapper(s: str) """ def Dispose(self): """ Dispose(self: StringWrapper) """ pass @staticmethod def GetStringFromPointer(pConstON_wString): """ GetStringFromPointer(pConstON_wString: IntPtr) -> str """ pass def SetString(self,s): """ SetString(self: StringWrapper,s: str) """ pass @staticmethod def SetStringOnPointer(pON_wString,s): """ SetStringOnPointer(pON_wString: IntPtr,s: str) """ pass def ToString(self): """ ToString(self: StringWrapper) -> str """ pass def __enter__(self,*args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self,*args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass @staticmethod def __new__(self,s=None): """ __new__(cls: type) __new__(cls: type,s: str) """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass def __str__(self,*args): pass ConstPointer=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: ConstPointer(self: StringWrapper) -> IntPtr """ NonConstPointer=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: NonConstPointer(self: StringWrapper) -> IntPtr """
class Solution: def combinationSum2(self, candidates: List[int], target: int) -> List[List[int]]: candidates.sort() res = [] self.bt(candidates,0,[],target, res) return res def bt(self, candidates, idx, tempList, target, res): if target < 0: return if target == 0: res.append(tempList) return for i in range(idx, len(candidates)): if i>idx and candidates[i] == candidates[i-1]: continue self.bt(candidates, i+1, tempList+[candidates[i]], target-candidates[i], res)
class RoomAlreadyEmpty(Exception): pass class CannotAllocateRoom(Exception): pass
"""Faça um programa que leia 5 valores numéricos e guarde-os em uma lista. No final, mostre qual foi o maior e o menor valor digitado e as suas respectivas posições na lista.""" num = [] for n in range(1, 6): num.append(int(input(f'Digite um nº para a {n}ª posição: '))) print(f'Números digitados: {num}') print(f'O MAIOR nº digitado é o {max(num)}, que ocupa a(s) posição(ões): ', end='') for p, v in enumerate(num): if v == max(num): print(p + 1, end='; ') print(f'\nO MENOR nº digitado é o {min(num)}, que ocupa a(s) posição(ões): ', end='') for p, v in enumerate(num): if v == min(num): print(p + 1, end='; ')
file_location = 'results_googlenet.txt' text_file = open(file_location, "r") lines = text_file.readlines() living_room = [] for i in range(74): living_room.append(i) dining_room = [] for i in range(74, 113): dining_room.append(i) for i in range(183, 205): dining_room.append(i) kitchen = [] for i in range(113, 184): kitchen.append(i) hallway = [] for i in range(205, 339): hallway.append(i) bathroom = [] for i in range(339, 355): bathroom.append(i) fail_count = 0 for l in lines: if l.startswith("Image:"): tokens = l.split(' ') img_parts = tokens[1].split('_') img_num = int(img_parts[1].split('.')[0]) classification = tokens[3].replace(" ", "").strip() prediction = "" if img_num in living_room: prediction = "LIVING" if img_num in dining_room: prediction = "DINING" if img_num in kitchen: prediction = "KITCHEN" if img_num in hallway: prediction = "HALLWAY" if img_num in bathroom: prediction = "BATHROOM" if classification != prediction: print(img_num, classification, prediction) fail_count = fail_count + 1 print("FAIL COUNT: ", fail_count) text_file.close()
#!/usr/bin/python # Miscellaneous TIFF-related tests # Regression test -- we once had a bug where 'separate' planarconfig # tiled float files would have data corrupted by a buffer overwrite. command += (oiio_app("oiiotool") + "--pattern checker 128x128 4 --tile 64 64 --planarconfig separate -d float -o check1.tif") outputs = [ "check1.tif" ]
patches = [ # Add AWS::MemoryDB::Cluster Endpoint { "op": "add", "path": "/ResourceTypes/AWS::MemoryDB::Cluster/Properties/ClusterEndpoint", "value": {"Type": "Endpoint"}, }, ]
class GenerateWPAD: head = [] foot = [] def __init__(self): self.head = [ '/**\n', 'The original template was created by Sam Gleske\n', 'This author and license block must stay intact for use even if this script is \n', 'modified!\n', '\n', 'License:\n', 'This file falls under the MIT Licence \n', 'http://www.opensource.org/licenses/mit-license.php\n', 'Take responsibility for your own actions.\n', '\n', 'Generated using Python and predefined proxy lists!\n', 'http://sourceforge.net/projects/webtechtools/files/Proxy%20wpad.dat%20Generator/\n', '\n', 'You are not authorized to use this proxy configuration for illegal purposes.\n', 'This file follows the Netscape WPAD standard. Please read the documentation\n', 'after the configuration options for additional warnings and tips information.\n', '**/\n', '\n', '/*\n', '* Configuration Options\n', '*/\n', '\n', '//Enables console logging (true/false, default true)\n', 'var ENABLE_LOGGING=true;\n', '\n', '\n', '//Enable friendly excludes (true/false, default true)\n', '//If a request matches an exclude then it will create a direct connection rather than proxy\n', '//This option must be disabled for user defined excludes to work\n', 'var ENABLE_EXCLUDES=true;\n', '\n', '//User defined Protocol excludes (array)\n', 'var protocol_excludes=[];\n', '\n', '//User defined IP excludes (array)\n', 'var ip_excludes=[];\n', '\n', '//User defined Domain excludes (array)\n', 'var domain_excludes=[];\n', '\n', '\n', '//Enable predefined proxy list (true/false, default true)\n', '//This option must be disabled for the user defined proxy list\n', 'var ENABLE_PREDEFINED_PROXY_LIST=true;\n', '\n', '//User defined proxy list (array)\n', 'var proxylist=[];\n', '\n', '/*\n', '* End of Configuration Options\n', '*/\n', '\n', '\n', '\n', '\n', '\n', '/************************************************************************************\n', 'WARNINGS, INFORMATION, AND ADDITIONAL DOCUMENTATION\n', '*************************************************************************************\n', 'It is highly recommended that you keep this documentation block if you modify \n', 'this file.\n', '\n', 'DO NOT, I repeat, DO NOT log into web portals where financial or personal \n', 'information is at risk using an anonymous/3rd party proxy. It is possible that \n', 'an anonymous proxy is set up to record all traffic and to mine usernames and \n', 'passwords for websites. Monitoring insecure authentication or cookies are just a \n', 'few of many methods to achieve this. I have set up some rules which will help \n', 'minimize the effect of this but it is still recommended to disable this proxy \n', 'whenever handling such information. This is not a flaw of this software or \n', 'wpad.dat but more the nature of an anonymous proxy.\n', '\n', 'Public Proxies and the Law\n', 'According to U.S. law, 18 U.S.C. Section 1030 (Fraud and Related Activity in \n', 'Connection with Computers) applies only when anyone who knowingly accesses a \n', 'computer without authorization or has knowingly exceeds his authorized access on \n', 'that computer. Because an opened proxy, by default, allows connections and use of \n', 'the service by anyone in the WWW, its administrator has essentially authorized \n', 'everyone to use the proxy. Therefore browsing the web, via anonymous proxies, is \n', 'not illegal.\n', '\n', '\n', 'This software is geared towards advanced end users and security professionals. By \n', 'using this software you agree to the MIT license which governs any unlicensed \n', 'software or files related to this file.\n', '\n', '\n', 'What is wpad.dat?\n', 'wpad.dat is a Web Proxy Automatic Detection (WPAD) file. Your browser selects a \n', 'proxy based on the pre-defined rules specified in the wpad.dat file. The language \n', 'is JavaScript for wpad.dat.\n', '\n', '\n', 'Pros/Cons of proxying using my wpad.dat method?\n', 'Pros:\n', '* Your IP address is constantly changing from the perspective of the web \n', '\t server making you impossible to track.\n', '* There are pre-defined rules which help to protect your information if you \n', '\t accidently forget to turn off this proxy method while browsing websites \n', '\t where financial or personal information are at risk.\n', '\t* If a website is using an encrypted connection then it does not go through\n', '\t any anonymous proxy. PLEASE NOTE if you opt out of my predefined rules\n', '\t then this is no longer the case.\n', '\n', 'Cons:\n', '* Your browsing speed is slightly diminished because you are visiting \n', '\t websites via a proxy.\n', '* Your browsing habits and information are not guarunteed to be protected \n', '\t from the anonymous proxy if by some happance this file is misconfigured.\n', '\n', '*************************************************************************************\n', 'End of Documentation\n', '*************************************************************************************/\n', '\n', '\n', '\n', '\n', '\n', '//////////////// No need to edit beyond this point ///////////////\n', '\n', '//Custom defined functions for cleaner processing\n', 'function exclude(source,rules)\n', '{\n', '\ttry\n', '\t{\n', '\t\tfor(var i=0;i<rules.length;i++)\n', '\t\t\tif(shExpMatch( source, rules[i]))\n', '\t\t\t\treturn true;\n', '\t\treturn false;\n', '\t}\n', '\tcatch(e)\n', '\t{\n', '\t\tif(ENABLE_LOGGING)\n', '\t\t\talert("An exception has been encountered!\\n" + source + "\\n" + rules);\n', '\t\treturn false;\n', '\t}\n', '}\n', '\n', '//Initialization Function\n', 'function FindProxyForURL(url, host) \n', '{\n', '\t//These are my personal excludes just in case I accidently go to a login site with this proxy enabled\n', '\tif(ENABLE_EXCLUDES)\n', '\t{\n', '\t\tip_excludes=[\n', '\t\t\t"10.*", //private address range\n', '\t\t\t"172.*", //private address range\n', '\t\t\t"192.*", //private address range\n', '\t\t\t"127.*", //loopback or localhost\n', '\t\t\t"144.118.*", //Drexel University\n', '\t\t\t"74.125.*", //Google\n', '\t\t\t"67.195.*", //Yahoo Inc\n', '\t\t\t"170.201.*", //PNC Bank\n', '\t\t\t"66.95.*", //United Bank\n', '\t\t\t"12.*", //AT&T WorldNet Services (covers AES and other banking websites)\n', '\t\t\t"164.109.*" //Digex, Incorporated. (Covers PECO and Exelon Corp)\n', '\t\t];\n', '\t\tdomain_excludes=[\n', '\t\t\t"*accuweather.com",\n', '\t\t\t"*mozdev.org",\n', '\t\t\t"*mozilla.org",\n', '\t\t\t"*bankofamerica.com",\n', '\t\t\t"*campusfood.com",\n', '\t\t\t"*chase.com*",\n', '\t\t\t"*clubbleach.org",\n', '\t\t\t"*crunchyroll.com",\n', '\t\t\t"*dccc.edu*",\n', '\t\t\t"*domaintools.com",\n', '\t\t\t"*ea.com",\n', '\t\t\t"*ebay.com",\n', '\t\t\t"*ebayrtm.com",\n', '\t\t\t"*ebaystatic.com",\n', '\t\t\t"*expedia.com",\n', '\t\t\t"*experts-exchange.com",\n', '\t\t\t"*facebook.com",\n', '\t\t\t"*fbcdn.net",\n', '\t\t\t"*flagfox.net",\n', '\t\t\t"*fsdn.com",\n', '\t\t\t"*godaddy.com",\n', '\t\t\t"www.google.*", //Needed for when Google randomly decides to load files from another country like www.google.ca or www.google.com.ph\n', '\t\t\t"*.gov",\n', '\t\t\t"*geotrust.com",\n', '\t\t\t"*ingdirect.com",\n', '\t\t\t"*ittoolbox.com",\n', '\t\t\t"*live.com",\n', '\t\t\t"*logmein.com",\n', '\t\t\t"*mqcdn.com",\n', '\t\t\t"*msn.com",\n', '\t\t\t"*newegg.ca",\n', '\t\t\t"*newegg.com",\n', '\t\t\t"*neweggimages.com",\n', '\t\t\t"*passport.com",\n', '\t\t\t"*passport.net",\n', '\t\t\t"*passportimages.com",\n', '\t\t\t"*paypal.com",\n', '\t\t\t"*paypalobjects.com",\n', '\t\t\t"*register.com",\n', '\t\t\t"*sf.net",\n', '\t\t\t"*sourceforge.net",\n', '\t\t\t"*steampowered.com",\n', '\t\t\t"*thawte.com",\n', '\t\t\t"*verisign.com",\n', '\t\t\t"*yahoo.com",\n', '\t\t\t"*whois.net"\n', '\t\t];\n', '\t\tprotocol_excludes=[\n', '\t\t\t"about:*",\n', '\t\t\t"aim:*",\n', '\t\t\t"chrome:*",\n', '\t\t\t"file:*",\n', '\t\t\t"https:*",\n', '\t\t\t"sftp:*",\n', '\t\t\t"socks:*",\n', '\t\t\t"steam:*",\n', '\t\t\t"telnet:*"\n', '\t\t];\n', '\t};\n', '\t\n', '\t//Run exclude rules for protocols, domain names, and ip addresses\n', '\tif(exclude(url.toLowerCase(),protocol_excludes))\n', '\t{\n', '\t\tif(ENABLE_LOGGING)\n', '\t\t\talert("Exclude rule triggered: protocol\\n" + url);\n', '\t\treturn "DIRECT";\n', '\t};\n', '\tif(exclude(dnsResolve(host),ip_excludes))\n', '\t{\n', '\t\tif(ENABLE_LOGGING)\n', '\t\t\talert("Exclude rule triggered: ip\\n" + dnsResolve(host));\n', '\t\treturn "DIRECT";\n', '\t};\n', '\tif(exclude(host.toLowerCase(),domain_excludes))\n', '\t{\n', '\t\tif(ENABLE_LOGGING)\n', '\t\t\talert("Exclude rule triggered: domain\\n" + dnsResolve(host) + "\\n" + host);\n', '\t\treturn "DIRECT";\n', '\t};\n', '\n', '\t//Pre-defined proxy list\n', '\tif(ENABLE_PREDEFINED_PROXY_LIST)\n', '\t{\n', '\t\tproxylist=[\n', '\t\t\t' ] self.foot = [ '\n', '\t\t];\n', '\t};\n', '\t\n', '\t//Generate a random index for the proxy list\n', '\ttry\n', '\t{\n', '\t\tvar index=-1;\n', '\t\twhile(index<0)\n', '\t\t\tindex=Math.ceil(proxylist.length*Math.random())-1;\n', '\n', '\t\tif(proxylist.length)\n', '\t\t{\n', '\t\t\tif(ENABLE_LOGGING)\n', '\t\t\t\talert("Rule not triggered!\\n" + dnsResolve(host) + "\\n" + host.toLowerCase() + "\\n" + url.toLowerCase() + "\\nUsing Proxy: " + proxylist[index]);\n', '\t\t\treturn "PROXY "+proxylist[index];\n', '\t\t}\n', '\t\telse\n', '\t\t\treturn "DIRECT";\n', '\t}\n', '\tcatch(e)\n', '\t{\n', '\t\tif(ENABLE_LOGGING)\n', '\t\t\talert("An exception has been encountered!\\n" + proxylist);\n', '\t\treturn "DIRECT";\n', '\t};\n', '}\n' ]
######## # autora: danielle8farias@gmail.com # repositório: https://github.com/danielle8farias # Descrição: O programa recebe dois ou mais números inteiros e retorna o máximo divisor comum deles. ######## def calcular_mdc(a, b): # o mesmo que while != 0 # while 0 = False while b: a, b = b, a%b return a def mdc(lista_num): if len(lista_num) == 2: return calcular_mdc(lista_num[0], lista_num[1]) else: # calcula o mdc de dois em dois mdc_valor = calcular_mdc(lista_num[0], lista_num[1]) lista_num[0] = mdc_valor # deleta a segunda posição que já foi utilizada del lista_num[1] # recursão return mdc(lista_num) if __name__ == '__main__': print(mdc([180, 240, 270])) # 30 print(mdc([540, 810, 1080])) # 270 print(mdc([80, 100, 120])) # 20 print(mdc([30, 36, 48])) # 6 print(mdc([20, 36])) # 4
class SlewLimiter: def __init__(self, limit): self.limit = limit self.output = 0.0 def Feed(self, value): error = value - self.output if error > self.limit: error = self.limit elif error < (self.limit * -1): error = self.limit * -1 self.output += error return self.output class MultipleSlewLimiter: def __init__(self, limit): self.limit = limit self.output = 0.0 def Feed(self, value): error = value - self.output if error > value *self.limit: error = self.limit elif error < (value * self.limit * -1): error = self.limit * -1 self.output += error return self.output MultipleSlewLimiter
description = 'setup for the execution daemon' group = 'special' devices = dict( # The entries for the password hashes are generated from randomized # passwords and not reproduceable, please don't forget to create new ones. # see https://forge.frm2.tum.de/nicos/doc/nicos-stable/services/daemon/#nicos.services.daemon.auth.list.Authenticator Auth = device('nicos.services.daemon.auth.list.Authenticator', hashing = 'md5', passwd = [ ('guest', '', 'guest'), ('user', 'd3bde5ce3e546626df42771c58986d4e', 'user'), ('admin', 'f3309476bdb36550aa8fb90ae748c9cc', 'admin'), ], ), Daemon = device('nicos.services.daemon.NicosDaemon', server = '', authenticators = ['Auth'], loglevel = 'info', ), )
# _update_parameter.py __module_name__ = "_update_parameter.py" __author__ = ", ".join(["Michael E. Vinyard"]) __email__ = ", ".join(["vinyard@g.harvard.edu",]) def _update_parameter(class_object, parameter, value): class_object.__setattr__(parameter, value)
#!/usr/bin/env python # -*- coding: utf-8 -*- # # rce-core/rce/util/iaas.py # # This file is part of the RoboEarth Cloud Engine framework. # # This file was originally created for RoboEearth # http://www.roboearth.org/ # # The research leading to these results has received funding from # the European Union Seventh Framework Programme FP7/2007-2013 under # grant agreement no248942 RoboEarth. # # Copyright 2013 RoboEarth # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # \author/s: Dominique Hunziker # # # TODO: This needs some work on specification: # - define interface # - create a class for each IAAS type implementing interface class IaasHook(object): """ # TODO: Add doc """ def disconnect(self): """ Method is called when shutting down the engine to relieve the hook. """ # TODO: Should destroy all instances which have been started dynamically raise NotImplementedError def spin_up(self, count=1, type=None, specialRequest=None): """ Call to spin up more instances. @param count: Number of instances to be spun up. @type count: int @param type: Type (generally size) of instance requested @type type: TDB by implementation @param specialRequest: Special request (gpu, cluster, hadoop) @type specialRequest: TDB by implementation """ raise NotImplementedError def spin_down(self): """ # TODO: ??? """ raise NotImplementedError
BATCH_SIZE = 256 MAX_SEQ_LEN=5 SEED = 98765 PADDING_IDX = 0 ACTIVATION_FUNC = None model_type = 'sdm' SDM_INIT_TRANSFORM_TYPE='identity'
BROADCAST_PORT = 0xD6D9 MESSAGE_TYPE = { 'POWER_ON' : 0x3110000, 'BRIGHTNESS': 0x3130000, 'COLOR_TEMP': 0x31b0000, 'QUERY' : 0x30f0000, 'SEARCH' : 0x2010000, } MESSAGE_OFFSET = { 'SRC_IP' : 0x00, 'SRC_PORT' : 0x04, 'DEST_IP' : 0x08, 'DEST_PORT' : 0x0C, 'L2_TYPE' : 0x10, 'L3_VERSION' : 0x14, 'SERVER_TYPE' : 0x18, 'PKG_LENGTH' : 0x1C, 'L3_ID' : 0x20, 'OFFSET' : 0x24, 'TTL' : 0x28, 'PROP' : 0x2C, 'L3_CHECKSUM' : 0x30, 'SRC_ADD_TYPE' : 0x34, 'SRC_OBJ_TYPE' : 0x38, 'SRC_ID' : 0x3C, 'SRC_ID_2' : 0x40, 'SRC_ID_3' : 0x44, 'SRC_ID_4' : 0x48, 'DEST_ADD_TYPE' : 0x4C, 'DEST_OBJ_TYPE' : 0x50, 'DEST_ID' : 0x54, 'DEST_ID_2' : 0x58, 'DEST_ID_3' : 0x5C, 'DEST_ID_4' : 0x60, 'REQ_SERIAL_NUM': 0x64, 'RES_SERIAL_NUM': 0x68, 'MSG_LENGTH' : 0x6C, 'CHECK_SUM' : 0x70, 'MSG_TYPE' : 0x74, 'RESERVE' : 0x78, 'BODY' : 0x7C } SEARCH_RES_OFFSET = { 'CLASS_SKU': 0x03, # L: 0x4 'SRC_TYPE' : 0x07, # L: 0x2 'MAC' : 0x09, # L: 0x8 'OBJ_TYPE' : 0x11, # L: 0x2 'ID_LOW' : 0x13, # L: 0x4 'ID_HIGH' : 0x17, # L: 0x4 'VERSION' : 0x1B, # L: 0x4 'IP' : 0x1F, # L: 0x4 'PORT' : 0x23, # L: 0x2 'NAME' : 0x25, # L: 0xe 'IS_CLEAN' : 0x33, # L: 0x1 } QUERY_RES_OFFSET = { 'POWER_ON' : 0x1, # L: 0x1 'BRIGHT' : 0x2, # L: 0x1 'COLOR_TEMP': 0x7, # L: 0x2 }
class Solution: def reorderList(self, head: ListNode) -> None: """ Do not return anything, modify head in-place instead. """ if not head: return stack = [] cur = head while cur: stack.append(cur) cur = cur.next count = (len(stack)-1)//2 cur = head while count>0: node = stack.pop() nxt = cur.next cur.next = node node.next = nxt cur = nxt count-=1 stack[-1].next = None
#!/usr/bin/env python def read(path): with open(path) as f: timers = list(map(int, f.read().strip().split(","))) return timers def slow(timers, num_steps): timers = list(timers) step = 0 n = len(timers) while step < num_steps: to_extend = [] for j in range(n): if timers[j] == 0: to_extend.append(8) timers[j] = 6 else: timers[j] -= 1 timers.extend(to_extend) step += 1 n = len(timers) return len(timers) def fast(timers, num_steps): counts = [0] * 9 for timer in timers: counts[timer] += 1 step = 0 while step < num_steps: next_ = [counts[i + 1] for i in range(8)] next_[6] += counts[0] next_.append(counts[0]) counts = next_ step += 1 return sum(counts) def part1(timers): return fast(timers, 80) def part2(timers): return fast(timers, 256) def main(): timers = read("example.txt") assert slow(timers, 10) == fast(timers, 10) assert part1(timers) == 5934 assert part2(timers) == 26984457539 timers = read("input.txt") assert part1(timers) == 376194 assert part2(timers) == 1693022481538 print("All tests passed.") if __name__ == "__main__": main()
class Solution: def getImportance(self, employees, id): """ :type employees: Employee :type id: int :rtype: int """ pending = [id] imp = 0 while(len(pending)>0): pending, imp = self.processing(employees, pending, imp) return imp def processing(self, employees, pending, imp): tmp = [] for n in range(len(employees)): if employees[n].id in pending: imp += employees[n].importance tmp += employees[n].subordinates return tmp, imp
# -*- coding: utf-8 -*- """ Created on Fri Jan 5 15:00:34 2018 @author: James Jiang """ all_lines = [line.rstrip('\n') for line in open('Data.txt')] grid = [[i for i in line] for line in all_lines] for y_corners in [0, 99]: for x_corners in [0, 99]: grid[y_corners][x_corners] = '#' grid_num_neighbors = [] for i in range(100): row = [0 for j in range(100)] grid_num_neighbors.append(row) def neighbors_on(x, y): if x_position == 0: neighbors = [grid[y + 1][x], grid[y - 1][x], grid[y][x + 1], grid[y + 1][x + 1], grid[y - 1][x + 1]] elif y_position == 0: neighbors = [grid[y + 1][x], grid[y][x + 1], grid[y][x - 1], grid[y + 1][x + 1], grid[y + 1][x - 1]] elif x_position == 99: neighbors = [grid[y + 1][x], grid[y - 1][x], grid[y][x - 1], grid[y + 1][x - 1], grid[y - 1][x - 1]] elif y_position == 99: neighbors = [grid[y - 1][x], grid[y][x + 1], grid[y][x - 1], grid[y - 1][x + 1], grid[y - 1][x - 1]] else: neighbors = [grid[y + 1][x], grid[y - 1][x], grid[y][x + 1], grid[y][x - 1], grid[y + 1][x + 1], grid[y + 1][x - 1], grid[y - 1][x + 1], grid[y - 1][x - 1]] return(neighbors.count('#')) def next_state(x, y): if grid_num_neighbors[y][x] == 3: return('#') elif (grid_num_neighbors[y][x] == 2) and (grid[y][x] == '#'): return('#') else: return('.') for i in range(100): for y_position in range(100): for x_position in range(100): if not((y_position in [0, 99]) and (x_position in [0, 99])): grid_num_neighbors[y_position][x_position] = neighbors_on(x_position, y_position) for y_position in range(100): for x_position in range(100): if not((y_position in [0, 99]) and (x_position in [0, 99])): grid[y_position][x_position] = next_state(x_position, y_position) total = 0 for y in range(100): total += grid[y].count('#') print(total)
#definicion de variables u otros print("Ejercicio 01: Area Triangulo") #Datos de Entrada b=int(input("Ingrese Base:")) h=int(input("Ingrese Altura:")) #Proceso area=(b*h)/2 #Datos de Salida print("El area es: ", area)
""" 0593. Valid Square Medium Given the coordinates of four points in 2D space, return whether the four points could construct a square. The coordinate (x,y) of a point is represented by an integer array with two integers. Example: Input: p1 = [0,0], p2 = [1,1], p3 = [1,0], p4 = [0,1] Output: True Note: All the input integers are in the range [-10000, 10000]. A valid square has four equal sides with positive length and four equal angles (90-degree angles). Input points have no order. """ class Solution: def validSquare(self, p1: List[int], p2: List[int], p3: List[int], p4: List[int]) -> bool: points = [p1, p2, p3, p4] dists = collections.Counter() for i in range(len(points)): for j in range(i+1, len(points)): dists[self.getDistance(points[i], points[j])] += 1 return len(dists.values())==2 and 4 in dists.values() and 2 in dists.values() def getDistance(self, p1, p2): return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2
num=list((input())) count=[0]*10 for n in num: i=0 while i<=10: if int(n)==i: count[i]+=1 i+=1 for c in count: print(c)
class HybridShape(object): """ Python class to manage Catia's Hybrid Shape Abstract Object """ def __init__(self, parent, cat_constructor): """ :param parent: :param cat_constructor: """ self.parent = parent[parent[-1]] self.parentsDict = parent self.cat_constructor = cat_constructor self.parentsDict['Part'].update() @property def name(self): return self.cat_constructor.Name @name.setter def name(self, value): self.cat_constructor.Name = value
#!/usr/bin/env python # encoding: utf-8 ''' @author: sml2h3 @contact: sml2h3@gmail.com @software: openlawClawer @file: system.py @time: 17-12-16 上午4:43 @desc: '''
num = int(input()) arr = sorted(list(map(int, input().split()))) assert len(arr) == num def leftright(l): llen = len(l) return l[:(llen//2)], l[-(llen//2):] def median(l): llen = len(l) if llen % 2 == 1: return l[llen//2] else: return (l[(llen//2)-1]+l[llen//2]) // 2 left, right = leftright(arr) print(median(left)) print(median(arr)) print(median(right))