content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
#! /usr/bin/env python3 # author: Mark W. Naylor # file: message.py # date: 2018-Jan-28 def message(msg, name): output = "{0}, {1}.".format(msg, name) print(output) def hello(name="world"): message("Hello", name) def goodbye(name="world"): message("Goodbye", name) def main(): #hello() hello("David") #message("Out the back", "Jack") goodbye("David") if __name__ == '__main__': main()
def message(msg, name): output = '{0}, {1}.'.format(msg, name) print(output) def hello(name='world'): message('Hello', name) def goodbye(name='world'): message('Goodbye', name) def main(): hello('David') goodbye('David') if __name__ == '__main__': main()
def decimal2binario(d): if d == 0: return d b = bin(d).lstrip("0b") return b
def decimal2binario(d): if d == 0: return d b = bin(d).lstrip('0b') return b
TAS_TO_PORTAL_MAP = {'description': 'description', 'piId': 'pi_id', 'title': 'title', 'chargeCode': 'charge_code', 'typeId': 'type_id', 'fieldId': 'field_id', 'type': 'type_name', 'field': 'field_name', 'nickname': 'nickname'}
tas_to_portal_map = {'description': 'description', 'piId': 'pi_id', 'title': 'title', 'chargeCode': 'charge_code', 'typeId': 'type_id', 'fieldId': 'field_id', 'type': 'type_name', 'field': 'field_name', 'nickname': 'nickname'}
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by 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 multiscale_def(image_shape, num_scale, use_flip=True): base_name_list = ['image'] multiscale_def = {} ms_def_names = [] if use_flip: num_scale //= 2 base_name_list.append('image_flip') multiscale_def['image_flip'] = { 'shape': [None] + image_shape, 'dtype': 'float32', 'lod_level': 0 } multiscale_def['im_info_image_flip'] = { 'shape': [None, 3], 'dtype': 'float32', 'lod_level': 0 } ms_def_names.append('image_flip') ms_def_names.append('im_info_image_flip') for base_name in base_name_list: for i in range(0, num_scale - 1): name = base_name + '_scale_' + str(i) multiscale_def[name] = { 'shape': [None] + image_shape, 'dtype': 'float32', 'lod_level': 0 } im_info_name = 'im_info_' + name multiscale_def[im_info_name] = { 'shape': [None, 3], 'dtype': 'float32', 'lod_level': 0 } ms_def_names.append(name) ms_def_names.append(im_info_name) return multiscale_def, ms_def_names
def multiscale_def(image_shape, num_scale, use_flip=True): base_name_list = ['image'] multiscale_def = {} ms_def_names = [] if use_flip: num_scale //= 2 base_name_list.append('image_flip') multiscale_def['image_flip'] = {'shape': [None] + image_shape, 'dtype': 'float32', 'lod_level': 0} multiscale_def['im_info_image_flip'] = {'shape': [None, 3], 'dtype': 'float32', 'lod_level': 0} ms_def_names.append('image_flip') ms_def_names.append('im_info_image_flip') for base_name in base_name_list: for i in range(0, num_scale - 1): name = base_name + '_scale_' + str(i) multiscale_def[name] = {'shape': [None] + image_shape, 'dtype': 'float32', 'lod_level': 0} im_info_name = 'im_info_' + name multiscale_def[im_info_name] = {'shape': [None, 3], 'dtype': 'float32', 'lod_level': 0} ms_def_names.append(name) ms_def_names.append(im_info_name) return (multiscale_def, ms_def_names)
# Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next # Solution A class Solution: def removeNthFromEnd(self, head: ListNode, n: int) -> ListNode: dummy = ListNode(0) dummy.next = head cur = head length = 0 while cur: length += 1 cur = cur.next cur = dummy for _ in range(length - n): cur = cur.next cur.next = cur.next.next return dummy.next # Solution B class Solution: def removeNthFromEnd(self, head: ListNode, n: int) -> ListNode: dummy = ListNode(0) dummy.next = head fast, slow = dummy, dummy for _ in range(n): fast = fast.next while fast and fast.next: fast = fast.next slow = slow.next slow.next = slow.next.next return dummy.next # Solution C class Solution: def removeNthFromEnd(self, head: ListNode, n: int) -> ListNode: if not head: self.count = 0 return head head.next = self.removeNthFromEnd(head.next, n) self.count += 1 return head.next if self.count == n else head
class Solution: def remove_nth_from_end(self, head: ListNode, n: int) -> ListNode: dummy = list_node(0) dummy.next = head cur = head length = 0 while cur: length += 1 cur = cur.next cur = dummy for _ in range(length - n): cur = cur.next cur.next = cur.next.next return dummy.next class Solution: def remove_nth_from_end(self, head: ListNode, n: int) -> ListNode: dummy = list_node(0) dummy.next = head (fast, slow) = (dummy, dummy) for _ in range(n): fast = fast.next while fast and fast.next: fast = fast.next slow = slow.next slow.next = slow.next.next return dummy.next class Solution: def remove_nth_from_end(self, head: ListNode, n: int) -> ListNode: if not head: self.count = 0 return head head.next = self.removeNthFromEnd(head.next, n) self.count += 1 return head.next if self.count == n else head
# input input_word = input("Enter a word: ") vowels = ["a", "e", "i", "o", "u"] num_vowels = 0 # response for letter in input_word: if letter in vowels: num_vowels += 1 print(num_vowels)
input_word = input('Enter a word: ') vowels = ['a', 'e', 'i', 'o', 'u'] num_vowels = 0 for letter in input_word: if letter in vowels: num_vowels += 1 print(num_vowels)
class State: def __init__(self, isInit = False, isFinish = False): self._isInit = isInit self._isFinish = isFinish def setInit(self, nval): self._isInit = nval def isInit(self): return self._isInit def setFinish(self, nval): self._isFinish = nval def isFinal(self): return self._isFinish
class State: def __init__(self, isInit=False, isFinish=False): self._isInit = isInit self._isFinish = isFinish def set_init(self, nval): self._isInit = nval def is_init(self): return self._isInit def set_finish(self, nval): self._isFinish = nval def is_final(self): return self._isFinish
class Trapeziums(object): def __init__(self, left, left_top, right_top, right): self.left = left self.right = right self.left_top = left_top self.right_top = right_top def membership_value(self, input_value): if (input_value >= self.left_top) and (input_value <= self.right_top): membership_value = 1.0 elif (input_value <= self.left) or (input_value >= self.right_top): membership_value = 0.0 elif input_value < self.left_top: membership_value = (input_value - self.left) / (self.left_top - self.left) elif input_value > self.right_top: membership_value = (input_value - self.right) / (self.right_top - self.right) else: membership_value = 0.0 return membership_value class Triangles(object): def __init__(self, left, top, right): self.left = left self.right = right self.top = top def membership_value(self, input_value): if input_value == self.top: membership_value = 1.0 elif input_value <= self.left or input_value >= self.right: membership_value = 0.0 elif input_value < self.top: membership_value = (input_value - self.left) / (self.top - self.left) elif input_value > self.top: membership_value = (input_value - self.right) / (self.top - self.right) return membership_value
class Trapeziums(object): def __init__(self, left, left_top, right_top, right): self.left = left self.right = right self.left_top = left_top self.right_top = right_top def membership_value(self, input_value): if input_value >= self.left_top and input_value <= self.right_top: membership_value = 1.0 elif input_value <= self.left or input_value >= self.right_top: membership_value = 0.0 elif input_value < self.left_top: membership_value = (input_value - self.left) / (self.left_top - self.left) elif input_value > self.right_top: membership_value = (input_value - self.right) / (self.right_top - self.right) else: membership_value = 0.0 return membership_value class Triangles(object): def __init__(self, left, top, right): self.left = left self.right = right self.top = top def membership_value(self, input_value): if input_value == self.top: membership_value = 1.0 elif input_value <= self.left or input_value >= self.right: membership_value = 0.0 elif input_value < self.top: membership_value = (input_value - self.left) / (self.top - self.left) elif input_value > self.top: membership_value = (input_value - self.right) / (self.top - self.right) return membership_value
numlist=list() while True: x=input("Enter a no.") if x=="done": break x=float(x) numlist.append(x) print(sum(numlist)/len(numlist))
numlist = list() while True: x = input('Enter a no.') if x == 'done': break x = float(x) numlist.append(x) print(sum(numlist) / len(numlist))
db._DBProxy__ctxid = 'b85246688f24c14712e0a7dfb93413f5defd50c4' db.getrecord(0) db.checkcontext() dbtree.get_children() dbtree.get_children([1])
db._DBProxy__ctxid = 'b85246688f24c14712e0a7dfb93413f5defd50c4' db.getrecord(0) db.checkcontext() dbtree.get_children() dbtree.get_children([1])
quantidade_habilidades, quantidade_texto = [int(n) for n in input().split()] dicionario = dict() for c in range(quantidade_habilidades): habilidade_descricao = input().split() dicionario[habilidade_descricao[0]] = float(habilidade_descricao[1]) for c in range(quantidade_texto): salario = 0 while True: linha = input() for palavra in linha.split(): if palavra in dicionario.keys(): salario += dicionario[palavra] if linha == '.': break print(int(salario))
(quantidade_habilidades, quantidade_texto) = [int(n) for n in input().split()] dicionario = dict() for c in range(quantidade_habilidades): habilidade_descricao = input().split() dicionario[habilidade_descricao[0]] = float(habilidade_descricao[1]) for c in range(quantidade_texto): salario = 0 while True: linha = input() for palavra in linha.split(): if palavra in dicionario.keys(): salario += dicionario[palavra] if linha == '.': break print(int(salario))
# # PySNMP MIB module TUBS-IBR-XEN-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TUBS-IBR-XEN-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:27:54 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, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsIntersection") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") NotificationGroup, ModuleCompliance, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup") Integer32, Counter64, Gauge32, ObjectIdentity, NotificationType, Unsigned32, iso, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, Counter32, IpAddress, TimeTicks, MibIdentifier = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "Counter64", "Gauge32", "ObjectIdentity", "NotificationType", "Unsigned32", "iso", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "Counter32", "IpAddress", "TimeTicks", "MibIdentifier") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") ibr, = mibBuilder.importSymbols("TUBS-SMI", "ibr") xenMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 1575, 1, 14)) xenMIB.setRevisions(('2006-02-20 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: xenMIB.setRevisionsDescriptions(('The initial revision of this module.',)) if mibBuilder.loadTexts: xenMIB.setLastUpdated('200602200000Z') if mibBuilder.loadTexts: xenMIB.setOrganization('TU Braunschweig') if mibBuilder.loadTexts: xenMIB.setContactInfo('Frank Strauss, Oliver Wellnitz TU Braunschweig Muehlenpfordtstrasse 23 38106 Braunschweig Germany Tel: +49 531 391 3283 Fax: +49 531 391 5936 E-mail: {strauss,wellnitz}@ibr.cs.tu-bs.de') if mibBuilder.loadTexts: xenMIB.setDescription('Experimental MIB module for Xen Virtual Hosting.') xenObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1)) xenTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 1575, 1, 14, 2)) xenConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 1575, 1, 14, 3)) class XenDomainState(TextualConvention, Integer32): description = 'This data type represents the state of a Xen domain. unknown(1): No known/defined state. running(2): The domain is running on any CPU. blocked(3): The domain is blocked, e.g., waiting for I/O. paused(4): The domain has been paused. crashed(5): The domain exepectedly crashed. dying(6): The domain is in the process of going down or dying to any other reason. shutdown(7): The domain has been shutdown. ' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7)) namedValues = NamedValues(("unknown", 1), ("running", 2), ("blocked", 3), ("paused", 4), ("crashed", 5), ("dying", 6), ("shutdown", 7)) xenHost = MibIdentifier((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 1)) xenHostXenVersion = MibScalar((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 1, 1), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: xenHostXenVersion.setStatus('current') if mibBuilder.loadTexts: xenHostXenVersion.setDescription('The version string of the Xen version running on the physical host.') xenHostTotalMemKBytes = MibScalar((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 1, 2), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: xenHostTotalMemKBytes.setStatus('current') if mibBuilder.loadTexts: xenHostTotalMemKBytes.setDescription('The total amount of available memory in Kbytes on the physical host.') xenHostCPUs = MibScalar((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 1, 3), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: xenHostCPUs.setStatus('current') if mibBuilder.loadTexts: xenHostCPUs.setDescription('The total number of CPUs on the physical host.') xenHostCPUMHz = MibScalar((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 1, 4), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: xenHostCPUMHz.setStatus('current') if mibBuilder.loadTexts: xenHostCPUMHz.setDescription('The CPU frequency in MHz of the CPUs on the physical host.') xenDomainTable = MibTable((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 2), ) if mibBuilder.loadTexts: xenDomainTable.setStatus('current') if mibBuilder.loadTexts: xenDomainTable.setDescription('A list of all Xen domains on the physical host.') xenDomainEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 2, 1), ).setIndexNames((0, "TUBS-IBR-XEN-MIB", "xenDomainName")) if mibBuilder.loadTexts: xenDomainEntry.setStatus('current') if mibBuilder.loadTexts: xenDomainEntry.setDescription('An entry describing a particular Xen domain.') xenDomainName = MibTableColumn((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 2, 1, 1), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))) if mibBuilder.loadTexts: xenDomainName.setStatus('current') if mibBuilder.loadTexts: xenDomainName.setDescription('The name of the Xen domain.') xenDomainState = MibTableColumn((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 2, 1, 2), XenDomainState()).setMaxAccess("readonly") if mibBuilder.loadTexts: xenDomainState.setStatus('current') if mibBuilder.loadTexts: xenDomainState.setDescription('The state of the Xen domain.') xenDomainMemKBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 2, 1, 3), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: xenDomainMemKBytes.setStatus('current') if mibBuilder.loadTexts: xenDomainMemKBytes.setDescription('The amount of memory in Kbytes currently occupied by the Xen domain.') xenDomainMaxMemKBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 2, 1, 4), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: xenDomainMaxMemKBytes.setStatus('current') if mibBuilder.loadTexts: xenDomainMaxMemKBytes.setDescription('The total amount of memory in Kbytes assigned to the Xen domain. A value of zero denotes that there is no limit.') xenVCPUTable = MibTable((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 3), ) if mibBuilder.loadTexts: xenVCPUTable.setStatus('current') if mibBuilder.loadTexts: xenVCPUTable.setDescription('A list of all VCPUs per Xen domain.') xenVCPUEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 3, 1), ).setIndexNames((0, "TUBS-IBR-XEN-MIB", "xenDomainName"), (0, "TUBS-IBR-XEN-MIB", "xenVCPUIndex")) if mibBuilder.loadTexts: xenVCPUEntry.setStatus('current') if mibBuilder.loadTexts: xenVCPUEntry.setDescription('An entry describing a VCPU of a Xen domain.') xenVCPUIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 3, 1, 1), Unsigned32()) if mibBuilder.loadTexts: xenVCPUIndex.setStatus('current') if mibBuilder.loadTexts: xenVCPUIndex.setDescription('The index of the VCPU.') xenVCPUMilliseconds = MibTableColumn((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 3, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: xenVCPUMilliseconds.setStatus('current') if mibBuilder.loadTexts: xenVCPUMilliseconds.setDescription('The number milliseconds consumed by the VCPU since the Xen domain has been set up.') xenNetworkTable = MibTable((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4), ) if mibBuilder.loadTexts: xenNetworkTable.setStatus('current') if mibBuilder.loadTexts: xenNetworkTable.setDescription('A list of all networks per Xen domain.') xenNetworkEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1), ).setIndexNames((0, "TUBS-IBR-XEN-MIB", "xenDomainName"), (0, "TUBS-IBR-XEN-MIB", "xenNetworkIndex")) if mibBuilder.loadTexts: xenNetworkEntry.setStatus('current') if mibBuilder.loadTexts: xenNetworkEntry.setDescription('An entry describing a network of a Xen domain.') xenNetworkIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 1), Unsigned32()) if mibBuilder.loadTexts: xenNetworkIndex.setStatus('current') if mibBuilder.loadTexts: xenNetworkIndex.setDescription('The index of the network.') xenNetworkInKBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: xenNetworkInKBytes.setStatus('current') if mibBuilder.loadTexts: xenNetworkInKBytes.setDescription('The number of Kbytes received on the network interface since the Xen domain has been set up.') xenNetworkInPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: xenNetworkInPkts.setStatus('current') if mibBuilder.loadTexts: xenNetworkInPkts.setDescription('The number of packets received on the network interface since the Xen domain has been set up.') xenNetworkInErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: xenNetworkInErrors.setStatus('current') if mibBuilder.loadTexts: xenNetworkInErrors.setDescription('The number of erroneous packets received on the network interface since the Xen domain has been set up.') xenNetworkInDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: xenNetworkInDiscards.setStatus('current') if mibBuilder.loadTexts: xenNetworkInDiscards.setDescription('The number of dropped packets received on the network interface since the Xen domain has been set up.') xenNetworkOutKBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: xenNetworkOutKBytes.setStatus('current') if mibBuilder.loadTexts: xenNetworkOutKBytes.setDescription('The number of Kbytes sent on the network interface since the Xen domain has been set up.') xenNetworkOutPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: xenNetworkOutPkts.setStatus('current') if mibBuilder.loadTexts: xenNetworkOutPkts.setDescription('The number of packets sent on the network interface since the Xen domain has been set up.') xenNetworkOutErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: xenNetworkOutErrors.setStatus('current') if mibBuilder.loadTexts: xenNetworkOutErrors.setDescription('The number of packets that could not be sent on the network interface because of any errors since the Xen domain has been set up.') xenNetworkOutDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: xenNetworkOutDiscards.setStatus('current') if mibBuilder.loadTexts: xenNetworkOutDiscards.setDescription('The number of packets that have not been sent on the network interface even though no errors had been detected since the Xen domain has been set up.') xenCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 1575, 1, 14, 3, 1)) xenGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 1575, 1, 14, 3, 2)) xenCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 1575, 1, 14, 3, 1, 1)).setObjects(("TUBS-IBR-XEN-MIB", "xenGeneralGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): xenCompliance = xenCompliance.setStatus('current') if mibBuilder.loadTexts: xenCompliance.setDescription('The compliance statement for an SNMP entity which implements the Xen MIB.') xenGeneralGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 1575, 1, 14, 3, 2, 1)).setObjects(("TUBS-IBR-XEN-MIB", "xenHostXenVersion"), ("TUBS-IBR-XEN-MIB", "xenHostTotalMemKBytes"), ("TUBS-IBR-XEN-MIB", "xenHostCPUs"), ("TUBS-IBR-XEN-MIB", "xenHostCPUMHz"), ("TUBS-IBR-XEN-MIB", "xenDomainState"), ("TUBS-IBR-XEN-MIB", "xenDomainMemKBytes"), ("TUBS-IBR-XEN-MIB", "xenDomainMaxMemKBytes"), ("TUBS-IBR-XEN-MIB", "xenVCPUMilliseconds"), ("TUBS-IBR-XEN-MIB", "xenNetworkInKBytes"), ("TUBS-IBR-XEN-MIB", "xenNetworkInPkts"), ("TUBS-IBR-XEN-MIB", "xenNetworkInErrors"), ("TUBS-IBR-XEN-MIB", "xenNetworkInDiscards"), ("TUBS-IBR-XEN-MIB", "xenNetworkOutKBytes"), ("TUBS-IBR-XEN-MIB", "xenNetworkOutPkts"), ("TUBS-IBR-XEN-MIB", "xenNetworkOutErrors"), ("TUBS-IBR-XEN-MIB", "xenNetworkOutDiscards")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): xenGeneralGroup = xenGeneralGroup.setStatus('current') if mibBuilder.loadTexts: xenGeneralGroup.setDescription('A collection of all Xen MIB objects.') mibBuilder.exportSymbols("TUBS-IBR-XEN-MIB", xenDomainTable=xenDomainTable, PYSNMP_MODULE_ID=xenMIB, xenDomainMemKBytes=xenDomainMemKBytes, xenNetworkInPkts=xenNetworkInPkts, xenCompliances=xenCompliances, xenHostCPUs=xenHostCPUs, xenGroups=xenGroups, xenHostXenVersion=xenHostXenVersion, xenNetworkOutKBytes=xenNetworkOutKBytes, xenNetworkIndex=xenNetworkIndex, xenNetworkInKBytes=xenNetworkInKBytes, xenVCPUEntry=xenVCPUEntry, xenDomainMaxMemKBytes=xenDomainMaxMemKBytes, xenNetworkOutDiscards=xenNetworkOutDiscards, xenTraps=xenTraps, xenNetworkInDiscards=xenNetworkInDiscards, xenHost=xenHost, xenCompliance=xenCompliance, xenHostCPUMHz=xenHostCPUMHz, xenDomainName=xenDomainName, xenNetworkEntry=xenNetworkEntry, xenNetworkOutPkts=xenNetworkOutPkts, xenVCPUIndex=xenVCPUIndex, xenHostTotalMemKBytes=xenHostTotalMemKBytes, xenObjects=xenObjects, xenNetworkTable=xenNetworkTable, xenNetworkInErrors=xenNetworkInErrors, xenGeneralGroup=xenGeneralGroup, xenNetworkOutErrors=xenNetworkOutErrors, xenMIB=xenMIB, XenDomainState=XenDomainState, xenVCPUMilliseconds=xenVCPUMilliseconds, xenDomainState=xenDomainState, xenVCPUTable=xenVCPUTable, xenDomainEntry=xenDomainEntry, xenConformance=xenConformance)
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, single_value_constraint, value_size_constraint, value_range_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (notification_group, module_compliance, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance', 'ObjectGroup') (integer32, counter64, gauge32, object_identity, notification_type, unsigned32, iso, module_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, bits, counter32, ip_address, time_ticks, mib_identifier) = mibBuilder.importSymbols('SNMPv2-SMI', 'Integer32', 'Counter64', 'Gauge32', 'ObjectIdentity', 'NotificationType', 'Unsigned32', 'iso', 'ModuleIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Bits', 'Counter32', 'IpAddress', 'TimeTicks', 'MibIdentifier') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') (ibr,) = mibBuilder.importSymbols('TUBS-SMI', 'ibr') xen_mib = module_identity((1, 3, 6, 1, 4, 1, 1575, 1, 14)) xenMIB.setRevisions(('2006-02-20 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: xenMIB.setRevisionsDescriptions(('The initial revision of this module.',)) if mibBuilder.loadTexts: xenMIB.setLastUpdated('200602200000Z') if mibBuilder.loadTexts: xenMIB.setOrganization('TU Braunschweig') if mibBuilder.loadTexts: xenMIB.setContactInfo('Frank Strauss, Oliver Wellnitz TU Braunschweig Muehlenpfordtstrasse 23 38106 Braunschweig Germany Tel: +49 531 391 3283 Fax: +49 531 391 5936 E-mail: {strauss,wellnitz}@ibr.cs.tu-bs.de') if mibBuilder.loadTexts: xenMIB.setDescription('Experimental MIB module for Xen Virtual Hosting.') xen_objects = mib_identifier((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1)) xen_traps = mib_identifier((1, 3, 6, 1, 4, 1, 1575, 1, 14, 2)) xen_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 1575, 1, 14, 3)) class Xendomainstate(TextualConvention, Integer32): description = 'This data type represents the state of a Xen domain. unknown(1): No known/defined state. running(2): The domain is running on any CPU. blocked(3): The domain is blocked, e.g., waiting for I/O. paused(4): The domain has been paused. crashed(5): The domain exepectedly crashed. dying(6): The domain is in the process of going down or dying to any other reason. shutdown(7): The domain has been shutdown. ' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7)) named_values = named_values(('unknown', 1), ('running', 2), ('blocked', 3), ('paused', 4), ('crashed', 5), ('dying', 6), ('shutdown', 7)) xen_host = mib_identifier((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 1)) xen_host_xen_version = mib_scalar((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 1, 1), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: xenHostXenVersion.setStatus('current') if mibBuilder.loadTexts: xenHostXenVersion.setDescription('The version string of the Xen version running on the physical host.') xen_host_total_mem_k_bytes = mib_scalar((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 1, 2), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: xenHostTotalMemKBytes.setStatus('current') if mibBuilder.loadTexts: xenHostTotalMemKBytes.setDescription('The total amount of available memory in Kbytes on the physical host.') xen_host_cp_us = mib_scalar((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 1, 3), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: xenHostCPUs.setStatus('current') if mibBuilder.loadTexts: xenHostCPUs.setDescription('The total number of CPUs on the physical host.') xen_host_cpum_hz = mib_scalar((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 1, 4), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: xenHostCPUMHz.setStatus('current') if mibBuilder.loadTexts: xenHostCPUMHz.setDescription('The CPU frequency in MHz of the CPUs on the physical host.') xen_domain_table = mib_table((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 2)) if mibBuilder.loadTexts: xenDomainTable.setStatus('current') if mibBuilder.loadTexts: xenDomainTable.setDescription('A list of all Xen domains on the physical host.') xen_domain_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 2, 1)).setIndexNames((0, 'TUBS-IBR-XEN-MIB', 'xenDomainName')) if mibBuilder.loadTexts: xenDomainEntry.setStatus('current') if mibBuilder.loadTexts: xenDomainEntry.setDescription('An entry describing a particular Xen domain.') xen_domain_name = mib_table_column((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 2, 1, 1), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(1, 32))) if mibBuilder.loadTexts: xenDomainName.setStatus('current') if mibBuilder.loadTexts: xenDomainName.setDescription('The name of the Xen domain.') xen_domain_state = mib_table_column((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 2, 1, 2), xen_domain_state()).setMaxAccess('readonly') if mibBuilder.loadTexts: xenDomainState.setStatus('current') if mibBuilder.loadTexts: xenDomainState.setDescription('The state of the Xen domain.') xen_domain_mem_k_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 2, 1, 3), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: xenDomainMemKBytes.setStatus('current') if mibBuilder.loadTexts: xenDomainMemKBytes.setDescription('The amount of memory in Kbytes currently occupied by the Xen domain.') xen_domain_max_mem_k_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 2, 1, 4), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: xenDomainMaxMemKBytes.setStatus('current') if mibBuilder.loadTexts: xenDomainMaxMemKBytes.setDescription('The total amount of memory in Kbytes assigned to the Xen domain. A value of zero denotes that there is no limit.') xen_vcpu_table = mib_table((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 3)) if mibBuilder.loadTexts: xenVCPUTable.setStatus('current') if mibBuilder.loadTexts: xenVCPUTable.setDescription('A list of all VCPUs per Xen domain.') xen_vcpu_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 3, 1)).setIndexNames((0, 'TUBS-IBR-XEN-MIB', 'xenDomainName'), (0, 'TUBS-IBR-XEN-MIB', 'xenVCPUIndex')) if mibBuilder.loadTexts: xenVCPUEntry.setStatus('current') if mibBuilder.loadTexts: xenVCPUEntry.setDescription('An entry describing a VCPU of a Xen domain.') xen_vcpu_index = mib_table_column((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 3, 1, 1), unsigned32()) if mibBuilder.loadTexts: xenVCPUIndex.setStatus('current') if mibBuilder.loadTexts: xenVCPUIndex.setDescription('The index of the VCPU.') xen_vcpu_milliseconds = mib_table_column((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 3, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: xenVCPUMilliseconds.setStatus('current') if mibBuilder.loadTexts: xenVCPUMilliseconds.setDescription('The number milliseconds consumed by the VCPU since the Xen domain has been set up.') xen_network_table = mib_table((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4)) if mibBuilder.loadTexts: xenNetworkTable.setStatus('current') if mibBuilder.loadTexts: xenNetworkTable.setDescription('A list of all networks per Xen domain.') xen_network_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1)).setIndexNames((0, 'TUBS-IBR-XEN-MIB', 'xenDomainName'), (0, 'TUBS-IBR-XEN-MIB', 'xenNetworkIndex')) if mibBuilder.loadTexts: xenNetworkEntry.setStatus('current') if mibBuilder.loadTexts: xenNetworkEntry.setDescription('An entry describing a network of a Xen domain.') xen_network_index = mib_table_column((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 1), unsigned32()) if mibBuilder.loadTexts: xenNetworkIndex.setStatus('current') if mibBuilder.loadTexts: xenNetworkIndex.setDescription('The index of the network.') xen_network_in_k_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: xenNetworkInKBytes.setStatus('current') if mibBuilder.loadTexts: xenNetworkInKBytes.setDescription('The number of Kbytes received on the network interface since the Xen domain has been set up.') xen_network_in_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: xenNetworkInPkts.setStatus('current') if mibBuilder.loadTexts: xenNetworkInPkts.setDescription('The number of packets received on the network interface since the Xen domain has been set up.') xen_network_in_errors = mib_table_column((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: xenNetworkInErrors.setStatus('current') if mibBuilder.loadTexts: xenNetworkInErrors.setDescription('The number of erroneous packets received on the network interface since the Xen domain has been set up.') xen_network_in_discards = mib_table_column((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: xenNetworkInDiscards.setStatus('current') if mibBuilder.loadTexts: xenNetworkInDiscards.setDescription('The number of dropped packets received on the network interface since the Xen domain has been set up.') xen_network_out_k_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: xenNetworkOutKBytes.setStatus('current') if mibBuilder.loadTexts: xenNetworkOutKBytes.setDescription('The number of Kbytes sent on the network interface since the Xen domain has been set up.') xen_network_out_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: xenNetworkOutPkts.setStatus('current') if mibBuilder.loadTexts: xenNetworkOutPkts.setDescription('The number of packets sent on the network interface since the Xen domain has been set up.') xen_network_out_errors = mib_table_column((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: xenNetworkOutErrors.setStatus('current') if mibBuilder.loadTexts: xenNetworkOutErrors.setDescription('The number of packets that could not be sent on the network interface because of any errors since the Xen domain has been set up.') xen_network_out_discards = mib_table_column((1, 3, 6, 1, 4, 1, 1575, 1, 14, 1, 4, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: xenNetworkOutDiscards.setStatus('current') if mibBuilder.loadTexts: xenNetworkOutDiscards.setDescription('The number of packets that have not been sent on the network interface even though no errors had been detected since the Xen domain has been set up.') xen_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 1575, 1, 14, 3, 1)) xen_groups = mib_identifier((1, 3, 6, 1, 4, 1, 1575, 1, 14, 3, 2)) xen_compliance = module_compliance((1, 3, 6, 1, 4, 1, 1575, 1, 14, 3, 1, 1)).setObjects(('TUBS-IBR-XEN-MIB', 'xenGeneralGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): xen_compliance = xenCompliance.setStatus('current') if mibBuilder.loadTexts: xenCompliance.setDescription('The compliance statement for an SNMP entity which implements the Xen MIB.') xen_general_group = object_group((1, 3, 6, 1, 4, 1, 1575, 1, 14, 3, 2, 1)).setObjects(('TUBS-IBR-XEN-MIB', 'xenHostXenVersion'), ('TUBS-IBR-XEN-MIB', 'xenHostTotalMemKBytes'), ('TUBS-IBR-XEN-MIB', 'xenHostCPUs'), ('TUBS-IBR-XEN-MIB', 'xenHostCPUMHz'), ('TUBS-IBR-XEN-MIB', 'xenDomainState'), ('TUBS-IBR-XEN-MIB', 'xenDomainMemKBytes'), ('TUBS-IBR-XEN-MIB', 'xenDomainMaxMemKBytes'), ('TUBS-IBR-XEN-MIB', 'xenVCPUMilliseconds'), ('TUBS-IBR-XEN-MIB', 'xenNetworkInKBytes'), ('TUBS-IBR-XEN-MIB', 'xenNetworkInPkts'), ('TUBS-IBR-XEN-MIB', 'xenNetworkInErrors'), ('TUBS-IBR-XEN-MIB', 'xenNetworkInDiscards'), ('TUBS-IBR-XEN-MIB', 'xenNetworkOutKBytes'), ('TUBS-IBR-XEN-MIB', 'xenNetworkOutPkts'), ('TUBS-IBR-XEN-MIB', 'xenNetworkOutErrors'), ('TUBS-IBR-XEN-MIB', 'xenNetworkOutDiscards')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): xen_general_group = xenGeneralGroup.setStatus('current') if mibBuilder.loadTexts: xenGeneralGroup.setDescription('A collection of all Xen MIB objects.') mibBuilder.exportSymbols('TUBS-IBR-XEN-MIB', xenDomainTable=xenDomainTable, PYSNMP_MODULE_ID=xenMIB, xenDomainMemKBytes=xenDomainMemKBytes, xenNetworkInPkts=xenNetworkInPkts, xenCompliances=xenCompliances, xenHostCPUs=xenHostCPUs, xenGroups=xenGroups, xenHostXenVersion=xenHostXenVersion, xenNetworkOutKBytes=xenNetworkOutKBytes, xenNetworkIndex=xenNetworkIndex, xenNetworkInKBytes=xenNetworkInKBytes, xenVCPUEntry=xenVCPUEntry, xenDomainMaxMemKBytes=xenDomainMaxMemKBytes, xenNetworkOutDiscards=xenNetworkOutDiscards, xenTraps=xenTraps, xenNetworkInDiscards=xenNetworkInDiscards, xenHost=xenHost, xenCompliance=xenCompliance, xenHostCPUMHz=xenHostCPUMHz, xenDomainName=xenDomainName, xenNetworkEntry=xenNetworkEntry, xenNetworkOutPkts=xenNetworkOutPkts, xenVCPUIndex=xenVCPUIndex, xenHostTotalMemKBytes=xenHostTotalMemKBytes, xenObjects=xenObjects, xenNetworkTable=xenNetworkTable, xenNetworkInErrors=xenNetworkInErrors, xenGeneralGroup=xenGeneralGroup, xenNetworkOutErrors=xenNetworkOutErrors, xenMIB=xenMIB, XenDomainState=XenDomainState, xenVCPUMilliseconds=xenVCPUMilliseconds, xenDomainState=xenDomainState, xenVCPUTable=xenVCPUTable, xenDomainEntry=xenDomainEntry, xenConformance=xenConformance)
class BridgeWorker(): def __init__(self, thread_name, connection_string, process, action_queue): self.thread_name = thread_name self.connection_string = connection_string self.process = process self.action_queue = action_queue self.should_shutdown = False self.pika_queue_mode = None def is_pika(self): return self.queue_mode != None
class Bridgeworker: def __init__(self, thread_name, connection_string, process, action_queue): self.thread_name = thread_name self.connection_string = connection_string self.process = process self.action_queue = action_queue self.should_shutdown = False self.pika_queue_mode = None def is_pika(self): return self.queue_mode != None
class Solution: def spiralMatrixIII(self, R: int, C: int, r0: int, c0: int) -> 'List[List[int]]': directions = [(0, 1), (1, 0), (0, -1), (-1, 0)] uncolored = R * C result = [] x, y = r0, c0 turns = 0 while uncolored > 0: dx, dy = directions[turns % 4] step = (turns // 2) + 1 for _ in range(step): if 0 <= x < R and 0 <= y < C: uncolored -= 1 result.append([x, y]) x, y = x + dx, y + dy turns += 1 return result if __name__ == "__main__": print(Solution().spiralMatrixIII(1, 4, 0, 0)) print(Solution().spiralMatrixIII(5, 6, 1, 4))
class Solution: def spiral_matrix_iii(self, R: int, C: int, r0: int, c0: int) -> 'List[List[int]]': directions = [(0, 1), (1, 0), (0, -1), (-1, 0)] uncolored = R * C result = [] (x, y) = (r0, c0) turns = 0 while uncolored > 0: (dx, dy) = directions[turns % 4] step = turns // 2 + 1 for _ in range(step): if 0 <= x < R and 0 <= y < C: uncolored -= 1 result.append([x, y]) (x, y) = (x + dx, y + dy) turns += 1 return result if __name__ == '__main__': print(solution().spiralMatrixIII(1, 4, 0, 0)) print(solution().spiralMatrixIII(5, 6, 1, 4))
n,k=map(int,input().split()) x=[*map(int,input().split())] forbidden=[False]*10 for i in range(0,10): if i not in x: forbidden[i]=True ans=-1 for i in range(1,n+1): fail=False t=i while i: if forbidden[i%10]: fail=True break i//=10 if not fail: ans=t print(ans)
(n, k) = map(int, input().split()) x = [*map(int, input().split())] forbidden = [False] * 10 for i in range(0, 10): if i not in x: forbidden[i] = True ans = -1 for i in range(1, n + 1): fail = False t = i while i: if forbidden[i % 10]: fail = True break i //= 10 if not fail: ans = t print(ans)
class palindrome(): def __init__(self,string): self.string = string def __call__(self): testStr = self.string.lower() for x in [" ","!",]: testStr = testStr.replace(x,"") if testStr == testStr[::-1]: return True else: return False def printpal(): string = input(" What phrase do you want to test? ") pal = palindrome(string) if pal(): print("That is a palindrome ") else: print("That is not a palindrome") def paltest(): printpal() pal = palindrome("mom") print("mom is a palindrome = ", pal()) pal2 = palindrome("hotdog") print("hotdog is a palindrome = ", pal2()) pal3 = palindrome("Yo banana boy!") print("Yo banana boy! is a palindrome = ", pal3()) if __name__ == "__main__": paltest()
class Palindrome: def __init__(self, string): self.string = string def __call__(self): test_str = self.string.lower() for x in [' ', '!']: test_str = testStr.replace(x, '') if testStr == testStr[::-1]: return True else: return False def printpal(): string = input(' What phrase do you want to test? ') pal = palindrome(string) if pal(): print('That is a palindrome ') else: print('That is not a palindrome') def paltest(): printpal() pal = palindrome('mom') print('mom is a palindrome = ', pal()) pal2 = palindrome('hotdog') print('hotdog is a palindrome = ', pal2()) pal3 = palindrome('Yo banana boy!') print('Yo banana boy! is a palindrome = ', pal3()) if __name__ == '__main__': paltest()
def headfront(): i01.head.neck.moveTo(90) i01.head.rothead.moveTo(90)
def headfront(): i01.head.neck.moveTo(90) i01.head.rothead.moveTo(90)
bot_major_version = 0 bot_minor_version = 1 bot_patch_version = 2 def bot_version_string(): return f'{bot_major_version}.{bot_minor_version}.{bot_patch_version}'
bot_major_version = 0 bot_minor_version = 1 bot_patch_version = 2 def bot_version_string(): return f'{bot_major_version}.{bot_minor_version}.{bot_patch_version}'
namesList = ['Tuffy','Ali','Nysha','Tim' ] sentence = 'My dog sleeps on sofa' names = ';'.join(namesList) print(type(names), ':', names) wordList = sentence.split(' ') print((type(wordList)), ':', wordList) additionExample = 'ganehsa' + 'ganesha' + 'ganesha' multiplicationExample = 'ganesha' * 2 print('Text Additions :', additionExample) print('Text Multiplication :', multiplicationExample) str = 'Python NLTK' print(str[1]) print(str[-3])
names_list = ['Tuffy', 'Ali', 'Nysha', 'Tim'] sentence = 'My dog sleeps on sofa' names = ';'.join(namesList) print(type(names), ':', names) word_list = sentence.split(' ') print(type(wordList), ':', wordList) addition_example = 'ganehsa' + 'ganesha' + 'ganesha' multiplication_example = 'ganesha' * 2 print('Text Additions :', additionExample) print('Text Multiplication :', multiplicationExample) str = 'Python NLTK' print(str[1]) print(str[-3])
class Prompts: def CPrompt(): ExtentionType = input("What type of extention do you want the output to be? Ex. exe \n") ProjectName = input("Whats the name of the project?") Flags = input("What other flags would you like to add? \n -g ")
class Prompts: def c_prompt(): extention_type = input('What type of extention do you want the output to be? Ex. exe \n') project_name = input('Whats the name of the project?') flags = input('What other flags would you like to add? \n -g ')
class Solution: # @param s, a string # @return an integer def titleToNumber(self, s): alphabets = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] s = list(s) sum = 0 for index, element in enumerate(s[::-1]): sum += (26**index)*(alphabets.index(element)+1) #+ (alphabets.index(element)+1) return sum
class Solution: def title_to_number(self, s): alphabets = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] s = list(s) sum = 0 for (index, element) in enumerate(s[::-1]): sum += 26 ** index * (alphabets.index(element) + 1) return sum
def main(): # input N, M = map(int, input().split()) ABs = [[*map(int, input().split())] for _ in range(M)] # compute adj = [[] for _ in range(N)] for A, B in ABs: A -= 1 B -= 1 adj[A].append(B) adj[B].append(A) ans = 0 for i, vs in enumerate(adj): tmp_cnt = 0 for v in vs: if i > v: tmp_cnt += 1 if tmp_cnt == 1: ans += 1 # output print(ans) if __name__ == '__main__': main()
def main(): (n, m) = map(int, input().split()) a_bs = [[*map(int, input().split())] for _ in range(M)] adj = [[] for _ in range(N)] for (a, b) in ABs: a -= 1 b -= 1 adj[A].append(B) adj[B].append(A) ans = 0 for (i, vs) in enumerate(adj): tmp_cnt = 0 for v in vs: if i > v: tmp_cnt += 1 if tmp_cnt == 1: ans += 1 print(ans) if __name__ == '__main__': main()
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\autonomy\parameterized_autonomy_request_info.py # Compiled at: 2016-09-08 21:38:24 # Size of source mod 2**32: 3360 bytes class ParameterizedAutonomyRequestInfo: def __init__(self, commodities, static_commodities, objects, retain_priority, retain_carry_target=True, objects_to_ignore=None, affordances=None, randomization_override=None, radius_to_consider=0, consider_scores_of_zero=False, test_connectivity_to_target=True, retain_context_source=False, ignore_user_directed_and_autonomous=False): self.commodities = commodities self.static_commodities = static_commodities self.objects = objects self.retain_priority = retain_priority self.objects_to_ignore = objects_to_ignore self.affordances = affordances self.retain_carry_target = retain_carry_target self.randomization_override = randomization_override self.radius_to_consider = radius_to_consider self.consider_scores_of_zero = consider_scores_of_zero self.test_connectivity_to_target = test_connectivity_to_target self.retain_context_source = retain_context_source self.ignore_user_directed_and_autonomous = ignore_user_directed_and_autonomous
class Parameterizedautonomyrequestinfo: def __init__(self, commodities, static_commodities, objects, retain_priority, retain_carry_target=True, objects_to_ignore=None, affordances=None, randomization_override=None, radius_to_consider=0, consider_scores_of_zero=False, test_connectivity_to_target=True, retain_context_source=False, ignore_user_directed_and_autonomous=False): self.commodities = commodities self.static_commodities = static_commodities self.objects = objects self.retain_priority = retain_priority self.objects_to_ignore = objects_to_ignore self.affordances = affordances self.retain_carry_target = retain_carry_target self.randomization_override = randomization_override self.radius_to_consider = radius_to_consider self.consider_scores_of_zero = consider_scores_of_zero self.test_connectivity_to_target = test_connectivity_to_target self.retain_context_source = retain_context_source self.ignore_user_directed_and_autonomous = ignore_user_directed_and_autonomous
def nswp(n): if n < 2: return 1 a, b = 1, 1 for i in range(2, n + 1): c = 2 * b + a a = b b = c return b n = 3 print(nswp(n))
def nswp(n): if n < 2: return 1 (a, b) = (1, 1) for i in range(2, n + 1): c = 2 * b + a a = b b = c return b n = 3 print(nswp(n))
def user_input(): ''' this function to get input from user return to_currency, from_currency, date ''' to_currency = input("what is your to currency code ? \n") from_currency = input("what is your from currency code? \n") date = input("what is your date? \n") return to_currency, from_currency, date
def user_input(): """ this function to get input from user return to_currency, from_currency, date """ to_currency = input('what is your to currency code ? \n') from_currency = input('what is your from currency code? \n') date = input('what is your date? \n') return (to_currency, from_currency, date)
def foo(arg1, *, kwarg1): pass def bar(): pass
def foo(arg1, *, kwarg1): pass def bar(): pass
# # PySNMP MIB module DECserver-Accounting-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DECserver-Accounting-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:22:20 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") sysUpTime, = mibBuilder.importSymbols("SNMPv2-MIB", "sysUpTime") Gauge32, NotificationType, NotificationType, Unsigned32, MibIdentifier, ModuleIdentity, ObjectIdentity, enterprises, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, iso, Counter64, Integer32, IpAddress, TimeTicks, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "NotificationType", "NotificationType", "Unsigned32", "MibIdentifier", "ModuleIdentity", "ObjectIdentity", "enterprises", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "iso", "Counter64", "Integer32", "IpAddress", "TimeTicks", "Counter32") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") private = MibIdentifier((1, 3, 6, 1, 4, 1, 1)) dec = MibIdentifier((1, 3, 6, 1, 4, 1, 1, 36)) ema = MibIdentifier((1, 3, 6, 1, 4, 1, 1, 36, 2)) mib_extensions_1 = MibIdentifier((1, 3, 6, 1, 4, 1, 1, 36, 2, 18)).setLabel("mib-extensions-1") decServeraccounting = MibIdentifier((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12)) acctSystem = MibIdentifier((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 1)) acctConsole = MibScalar((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disable", 1), ("enable", 2))).clone('disable')).setMaxAccess("readwrite") if mibBuilder.loadTexts: acctConsole.setStatus('mandatory') acctAdminLogSize = MibScalar((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("none", 1), ("size4K", 2), ("size8K", 3), ("size16K", 4), ("size32K", 5), ("size64K", 6), ("size128K", 7), ("size256K", 8), ("size512K", 9))).clone('size16K')).setMaxAccess("readwrite") if mibBuilder.loadTexts: acctAdminLogSize.setStatus('mandatory') acctOperLogSize = MibScalar((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("none", 1), ("size4K", 2), ("size8K", 3), ("size16K", 4), ("size32K", 5), ("size64K", 6), ("size128K", 7), ("size256K", 8), ("size512K", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acctOperLogSize.setStatus('mandatory') acctThreshold = MibScalar((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("none", 1), ("end", 2), ("half", 3), ("quarter", 4), ("eighth", 5))).clone('none')).setMaxAccess("readwrite") if mibBuilder.loadTexts: acctThreshold.setStatus('mandatory') acctTable = MibTable((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2), ) if mibBuilder.loadTexts: acctTable.setStatus('mandatory') acctEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1), ).setIndexNames((0, "DECserver-Accounting-MIB", "acctEntryNonce1"), (0, "DECserver-Accounting-MIB", "acctEntryNonce2")) if mibBuilder.loadTexts: acctEntry.setStatus('mandatory') acctEntryNonce1 = MibTableColumn((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: acctEntryNonce1.setStatus('mandatory') acctEntryNonce2 = MibTableColumn((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: acctEntryNonce2.setStatus('mandatory') acctEntryTime = MibTableColumn((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: acctEntryTime.setStatus('mandatory') acctEntryEvent = MibScalar((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17))).clone(namedValues=NamedValues(("other", 1), ("logIn", 2), ("logOut", 3), ("sessionConnect", 4), ("sessionDisconnect", 5), ("kerberosPasswordFail", 6), ("privilegedPasswordFail", 7), ("maintenancePasswordFail", 8), ("loginPasswordFail", 9), ("remotePasswordFail", 10), ("communityFail", 11), ("privilegedPasswordModified", 12), ("maintenacePasswordModified", 13), ("loginPasswordModified", 14), ("remotePasswordModified", 15), ("privilegeLevelModified", 16), ("communityModified", 17)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acctEntryEvent.setStatus('mandatory') acctEntryPort = MibTableColumn((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: acctEntryPort.setStatus('mandatory') acctEntryUser = MibTableColumn((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 6), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: acctEntryUser.setStatus('mandatory') acctEntrySessionId = MibTableColumn((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: acctEntrySessionId.setStatus('mandatory') acctEntryProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=NamedValues(("none", 1), ("lat", 2), ("telnet", 3), ("slip", 4), ("ping", 5), ("mop", 6), ("ppp", 7), ("tn3270", 8), ("autolink", 9), ("snmp-ip", 10), ("other", 11)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acctEntryProtocol.setStatus('mandatory') acctEntryAccess = MibTableColumn((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("notApplicable", 1), ("local", 2), ("remote", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acctEntryAccess.setStatus('mandatory') acctEntryPeer = MibTableColumn((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 10), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: acctEntryPeer.setStatus('mandatory') acctEntryReason = MibTableColumn((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("notApplicable", 1), ("normal", 2), ("error", 3), ("other", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: acctEntryReason.setStatus('mandatory') acctEntrySentBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: acctEntrySentBytes.setStatus('mandatory') acctEntryReceivedBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: acctEntryReceivedBytes.setStatus('mandatory') acctTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 3)) acctThresholdExceeded = NotificationType((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 3) + (0,1)).setObjects(("SNMPv2-MIB", "sysUpTime"), ("DECserver-Accounting-MIB", "acctThreshold")) mibBuilder.exportSymbols("DECserver-Accounting-MIB", acctEntryNonce1=acctEntryNonce1, acctEntryAccess=acctEntryAccess, acctSystem=acctSystem, ema=ema, acctOperLogSize=acctOperLogSize, mib_extensions_1=mib_extensions_1, acctEntryNonce2=acctEntryNonce2, private=private, acctEntryReceivedBytes=acctEntryReceivedBytes, acctEntryEvent=acctEntryEvent, acctEntryUser=acctEntryUser, acctTable=acctTable, acctEntryPeer=acctEntryPeer, acctTraps=acctTraps, acctEntryReason=acctEntryReason, dec=dec, acctEntrySessionId=acctEntrySessionId, acctAdminLogSize=acctAdminLogSize, acctThresholdExceeded=acctThresholdExceeded, acctEntryPort=acctEntryPort, acctEntryProtocol=acctEntryProtocol, acctConsole=acctConsole, acctThreshold=acctThreshold, decServeraccounting=decServeraccounting, acctEntryTime=acctEntryTime, acctEntry=acctEntry, acctEntrySentBytes=acctEntrySentBytes)
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, single_value_constraint, constraints_union, value_range_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'ConstraintsIntersection') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (sys_up_time,) = mibBuilder.importSymbols('SNMPv2-MIB', 'sysUpTime') (gauge32, notification_type, notification_type, unsigned32, mib_identifier, module_identity, object_identity, enterprises, mib_scalar, mib_table, mib_table_row, mib_table_column, bits, iso, counter64, integer32, ip_address, time_ticks, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'NotificationType', 'NotificationType', 'Unsigned32', 'MibIdentifier', 'ModuleIdentity', 'ObjectIdentity', 'enterprises', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Bits', 'iso', 'Counter64', 'Integer32', 'IpAddress', 'TimeTicks', 'Counter32') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') private = mib_identifier((1, 3, 6, 1, 4, 1, 1)) dec = mib_identifier((1, 3, 6, 1, 4, 1, 1, 36)) ema = mib_identifier((1, 3, 6, 1, 4, 1, 1, 36, 2)) mib_extensions_1 = mib_identifier((1, 3, 6, 1, 4, 1, 1, 36, 2, 18)).setLabel('mib-extensions-1') dec_serveraccounting = mib_identifier((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12)) acct_system = mib_identifier((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 1)) acct_console = mib_scalar((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('disable', 1), ('enable', 2))).clone('disable')).setMaxAccess('readwrite') if mibBuilder.loadTexts: acctConsole.setStatus('mandatory') acct_admin_log_size = mib_scalar((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=named_values(('none', 1), ('size4K', 2), ('size8K', 3), ('size16K', 4), ('size32K', 5), ('size64K', 6), ('size128K', 7), ('size256K', 8), ('size512K', 9))).clone('size16K')).setMaxAccess('readwrite') if mibBuilder.loadTexts: acctAdminLogSize.setStatus('mandatory') acct_oper_log_size = mib_scalar((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=named_values(('none', 1), ('size4K', 2), ('size8K', 3), ('size16K', 4), ('size32K', 5), ('size64K', 6), ('size128K', 7), ('size256K', 8), ('size512K', 9)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acctOperLogSize.setStatus('mandatory') acct_threshold = mib_scalar((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('none', 1), ('end', 2), ('half', 3), ('quarter', 4), ('eighth', 5))).clone('none')).setMaxAccess('readwrite') if mibBuilder.loadTexts: acctThreshold.setStatus('mandatory') acct_table = mib_table((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2)) if mibBuilder.loadTexts: acctTable.setStatus('mandatory') acct_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1)).setIndexNames((0, 'DECserver-Accounting-MIB', 'acctEntryNonce1'), (0, 'DECserver-Accounting-MIB', 'acctEntryNonce2')) if mibBuilder.loadTexts: acctEntry.setStatus('mandatory') acct_entry_nonce1 = mib_table_column((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: acctEntryNonce1.setStatus('mandatory') acct_entry_nonce2 = mib_table_column((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: acctEntryNonce2.setStatus('mandatory') acct_entry_time = mib_table_column((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 3), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: acctEntryTime.setStatus('mandatory') acct_entry_event = mib_scalar((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17))).clone(namedValues=named_values(('other', 1), ('logIn', 2), ('logOut', 3), ('sessionConnect', 4), ('sessionDisconnect', 5), ('kerberosPasswordFail', 6), ('privilegedPasswordFail', 7), ('maintenancePasswordFail', 8), ('loginPasswordFail', 9), ('remotePasswordFail', 10), ('communityFail', 11), ('privilegedPasswordModified', 12), ('maintenacePasswordModified', 13), ('loginPasswordModified', 14), ('remotePasswordModified', 15), ('privilegeLevelModified', 16), ('communityModified', 17)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acctEntryEvent.setStatus('mandatory') acct_entry_port = mib_table_column((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: acctEntryPort.setStatus('mandatory') acct_entry_user = mib_table_column((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 6), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: acctEntryUser.setStatus('mandatory') acct_entry_session_id = mib_table_column((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: acctEntrySessionId.setStatus('mandatory') acct_entry_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=named_values(('none', 1), ('lat', 2), ('telnet', 3), ('slip', 4), ('ping', 5), ('mop', 6), ('ppp', 7), ('tn3270', 8), ('autolink', 9), ('snmp-ip', 10), ('other', 11)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acctEntryProtocol.setStatus('mandatory') acct_entry_access = mib_table_column((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('notApplicable', 1), ('local', 2), ('remote', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acctEntryAccess.setStatus('mandatory') acct_entry_peer = mib_table_column((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 10), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: acctEntryPeer.setStatus('mandatory') acct_entry_reason = mib_table_column((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('notApplicable', 1), ('normal', 2), ('error', 3), ('other', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: acctEntryReason.setStatus('mandatory') acct_entry_sent_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: acctEntrySentBytes.setStatus('mandatory') acct_entry_received_bytes = mib_table_column((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 2, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: acctEntryReceivedBytes.setStatus('mandatory') acct_traps = mib_identifier((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 3)) acct_threshold_exceeded = notification_type((1, 3, 6, 1, 4, 1, 1, 36, 2, 18, 12, 3) + (0, 1)).setObjects(('SNMPv2-MIB', 'sysUpTime'), ('DECserver-Accounting-MIB', 'acctThreshold')) mibBuilder.exportSymbols('DECserver-Accounting-MIB', acctEntryNonce1=acctEntryNonce1, acctEntryAccess=acctEntryAccess, acctSystem=acctSystem, ema=ema, acctOperLogSize=acctOperLogSize, mib_extensions_1=mib_extensions_1, acctEntryNonce2=acctEntryNonce2, private=private, acctEntryReceivedBytes=acctEntryReceivedBytes, acctEntryEvent=acctEntryEvent, acctEntryUser=acctEntryUser, acctTable=acctTable, acctEntryPeer=acctEntryPeer, acctTraps=acctTraps, acctEntryReason=acctEntryReason, dec=dec, acctEntrySessionId=acctEntrySessionId, acctAdminLogSize=acctAdminLogSize, acctThresholdExceeded=acctThresholdExceeded, acctEntryPort=acctEntryPort, acctEntryProtocol=acctEntryProtocol, acctConsole=acctConsole, acctThreshold=acctThreshold, decServeraccounting=decServeraccounting, acctEntryTime=acctEntryTime, acctEntry=acctEntry, acctEntrySentBytes=acctEntrySentBytes)
def point_in_region(lower_left_corner, upper_right_corner, x, y): return ( x >= lower_left_corner.x and x <= upper_right_corner.x and y >= lower_left_corner.y and y <= upper_right_corner.y)
def point_in_region(lower_left_corner, upper_right_corner, x, y): return x >= lower_left_corner.x and x <= upper_right_corner.x and (y >= lower_left_corner.y) and (y <= upper_right_corner.y)
def duplicate_zeros(arr): if 0 not in arr: return arr else: array = [] for a in arr: if a == 0: array.extend([0, 0]) else: array.append(a) for i in range(len(arr)): arr[i] = array[i]
def duplicate_zeros(arr): if 0 not in arr: return arr else: array = [] for a in arr: if a == 0: array.extend([0, 0]) else: array.append(a) for i in range(len(arr)): arr[i] = array[i]
class MinStack(object): def __init__(self): self.s = [] self.min_s = [] def push(self, x): self.s.append(x) if self.min_s: if self.min_s[-1] > x: self.min_s.append(x) else: self.min_s.append(self.min_s[-1]) else: self.min_s.append(x) def pop(self): if self.s: self.s.pop() self.min_s.pop() def top(self): if self.s: return self.s[-1] def getMin(self): if self.min_s: return self.min_s[-1] if __name__ == '__main__': minStack = MinStack() minStack.push(2) minStack.push(1) minStack.push(4) print(minStack.top()) minStack.pop() print(minStack.getMin()) minStack.pop() print(minStack.getMin()) minStack.pop() minStack.push(7) print(minStack.top()) print(minStack.getMin()) minStack.push(4) print(minStack.top()) print(minStack.getMin()) minStack.pop() print(minStack.getMin())
class Minstack(object): def __init__(self): self.s = [] self.min_s = [] def push(self, x): self.s.append(x) if self.min_s: if self.min_s[-1] > x: self.min_s.append(x) else: self.min_s.append(self.min_s[-1]) else: self.min_s.append(x) def pop(self): if self.s: self.s.pop() self.min_s.pop() def top(self): if self.s: return self.s[-1] def get_min(self): if self.min_s: return self.min_s[-1] if __name__ == '__main__': min_stack = min_stack() minStack.push(2) minStack.push(1) minStack.push(4) print(minStack.top()) minStack.pop() print(minStack.getMin()) minStack.pop() print(minStack.getMin()) minStack.pop() minStack.push(7) print(minStack.top()) print(minStack.getMin()) minStack.push(4) print(minStack.top()) print(minStack.getMin()) minStack.pop() print(minStack.getMin())
# Guest & items allGuests = {'Alice': {'apples': 5, 'pretzels': 12}, 'Bob': {'ham sandwiches': 3, 'apples': 2}, 'Carol': {'cups': 3, 'apple pies': 1}} # function: get amount of a item(allGuests, item) def totalBrought(guests, item): # initiate a counter numBrought = 0 # traverse values of all guests for v in guests.values(): # accumulate the item numBrought += v.get(item, 0) return numBrought foodSet = set() for v in allGuests.values(): foodSet |= set(v) # print number of items (call function) print("Number of things being brought: \n") for food in foodSet: print("-{:20} {}".format(food, totalBrought(allGuests, food))) # print("-Apple {}".format(totalBrought(allGuests,'apples'))) # print("-Cups {}".format(totalBrought(allGuests,'cups'))) # print("-Pretzel {}".format(totalBrought(allGuests,'pretzels'))) # print("-Ham Sandwiches {}".format(totalBrought(allGuests,'ham sandwiches'))) # print("-Apple Pies {}".format(totalBrought(allGuests,'apple pies')))
all_guests = {'Alice': {'apples': 5, 'pretzels': 12}, 'Bob': {'ham sandwiches': 3, 'apples': 2}, 'Carol': {'cups': 3, 'apple pies': 1}} def total_brought(guests, item): num_brought = 0 for v in guests.values(): num_brought += v.get(item, 0) return numBrought food_set = set() for v in allGuests.values(): food_set |= set(v) print('Number of things being brought: \n') for food in foodSet: print('-{:20}\t\t\t{}'.format(food, total_brought(allGuests, food)))
# This problem was asked by Yahoo. # Write an algorithm that computes the reversal of a directed graph. # For example, if a graph consists of A -> B -> C, it should become A <- B <- C. #### graph1 = {} graph1['A'] = ['B', 'C', 'D'] graph1['B'] = ['C', 'D'] graph1['C'] = ['D'] #### def reversegraph(gr): ret = {} # iterate through all nodes for beg, v in gr.items(): # add reverse edge to the graph for end in v: ret[end] = ret.get(end, []) + [beg] return ret #### print(graph1) print(reversegraph(graph1))
graph1 = {} graph1['A'] = ['B', 'C', 'D'] graph1['B'] = ['C', 'D'] graph1['C'] = ['D'] def reversegraph(gr): ret = {} for (beg, v) in gr.items(): for end in v: ret[end] = ret.get(end, []) + [beg] return ret print(graph1) print(reversegraph(graph1))
class Stack: sizeof = 0 def __init__(self,list = None): if list == None: self.item =[] else : self.item = list def push(self,i): self.item.append(i) def size(self): return len(self.item) def isEmpty(self): if self.size()==0: return True else: return False def pop(self): return self.item.pop() def peek(self): tmp = self.item[self.size()-1] return tmp x = input("Enter Infix : ") xout = "" a = "*/" b = "+-" c = "()" d = "^" s = Stack() for i in x: if i in b: if not s.isEmpty(): if s.peek() in a: while not s.isEmpty(): xout+=s.pop() if s.isEmpty() or s.peek() is c[0]: break elif s.peek() is c[0]: pass else: xout+=s.pop() s.push(i) elif i in a: if not s.isEmpty(): if s.peek() in d: while not s.isEmpty(): xout+=s.pop() if s.isEmpty() or s.peek() is c[0]: break elif s.peek() in a: xout+=s.pop() s.push(i) elif i in d: s.push(i) elif i == c[0]: s.push(i) # print(s.item) elif i == c[1]: # print(s.item) while s.peek() is not c[0] and not s.isEmpty(): xout+=s.pop() # print(xout) if s.peek() == c[0]: s.pop() break else: xout+=i # print(xout) while not s.isEmpty(): xout+=s.pop() print("Postfix :",xout)
class Stack: sizeof = 0 def __init__(self, list=None): if list == None: self.item = [] else: self.item = list def push(self, i): self.item.append(i) def size(self): return len(self.item) def is_empty(self): if self.size() == 0: return True else: return False def pop(self): return self.item.pop() def peek(self): tmp = self.item[self.size() - 1] return tmp x = input('Enter Infix : ') xout = '' a = '*/' b = '+-' c = '()' d = '^' s = stack() for i in x: if i in b: if not s.isEmpty(): if s.peek() in a: while not s.isEmpty(): xout += s.pop() if s.isEmpty() or s.peek() is c[0]: break elif s.peek() is c[0]: pass else: xout += s.pop() s.push(i) elif i in a: if not s.isEmpty(): if s.peek() in d: while not s.isEmpty(): xout += s.pop() if s.isEmpty() or s.peek() is c[0]: break elif s.peek() in a: xout += s.pop() s.push(i) elif i in d: s.push(i) elif i == c[0]: s.push(i) elif i == c[1]: while s.peek() is not c[0] and (not s.isEmpty()): xout += s.pop() if s.peek() == c[0]: s.pop() break else: xout += i while not s.isEmpty(): xout += s.pop() print('Postfix :', xout)
if __name__ == '__main__': # This is a line printing Hello World # This is a second line comment ''' This is a line printing Hello World This is a second line comment ''' print("Hello World") # This is a comment
if __name__ == '__main__': '\n This is a line printing Hello World\n This is a second line comment\n ' print('Hello World')
def mutate_string(string, position, character): stringlist = list(string) stringlist[position] = character string = ''.join(stringlist) return string
def mutate_string(string, position, character): stringlist = list(string) stringlist[position] = character string = ''.join(stringlist) return string
flowers = input() amount_flowers = int(input()) budget = int(input()) final_price = 0 one_rose_price = 5 one_Dahlias_price = 3.80 one_Tulips_price = 2.80 one_Narcissus_price = 3 one_Gladiolus_price = 2.50 if flowers == "Roses": final_price = amount_flowers * one_rose_price if amount_flowers > 80: final_price = final_price - (final_price * 0.10) if flowers == "Dahlias": final_price = amount_flowers * one_Dahlias_price if amount_flowers > 90: final_price = final_price - (final_price * 0.15) if flowers == "Tulips": final_price = amount_flowers * one_Tulips_price if amount_flowers > 80: final_price = final_price - (final_price * 0.15) if flowers == "Narcissus": final_price = amount_flowers * one_Narcissus_price if amount_flowers < 120: final_price = final_price + (final_price * 0.15) if flowers == "Gladiolus": final_price = amount_flowers * one_Gladiolus_price if amount_flowers < 80: final_price = final_price + (final_price * 0.20) if budget >= final_price: print(f"Hey, you have a great garden with {amount_flowers} {flowers} and {budget - final_price:.2f} leva left.") else: print(f"Not enough money, you need {final_price - budget:.2f} leva more.")
flowers = input() amount_flowers = int(input()) budget = int(input()) final_price = 0 one_rose_price = 5 one__dahlias_price = 3.8 one__tulips_price = 2.8 one__narcissus_price = 3 one__gladiolus_price = 2.5 if flowers == 'Roses': final_price = amount_flowers * one_rose_price if amount_flowers > 80: final_price = final_price - final_price * 0.1 if flowers == 'Dahlias': final_price = amount_flowers * one_Dahlias_price if amount_flowers > 90: final_price = final_price - final_price * 0.15 if flowers == 'Tulips': final_price = amount_flowers * one_Tulips_price if amount_flowers > 80: final_price = final_price - final_price * 0.15 if flowers == 'Narcissus': final_price = amount_flowers * one_Narcissus_price if amount_flowers < 120: final_price = final_price + final_price * 0.15 if flowers == 'Gladiolus': final_price = amount_flowers * one_Gladiolus_price if amount_flowers < 80: final_price = final_price + final_price * 0.2 if budget >= final_price: print(f'Hey, you have a great garden with {amount_flowers} {flowers} and {budget - final_price:.2f} leva left.') else: print(f'Not enough money, you need {final_price - budget:.2f} leva more.')
def main(): dic = { 'wide': [ 'logs/pipelines/all_pcgrl/pcgrl_smb_wide_5.mscluster41.144549.out', 'logs/pipelines/all_pcgrl/pcgrl_smb_wide_4.mscluster40.144548.out', 'logs/pipelines/all_pcgrl/pcgrl_smb_wide_3.mscluster18.144536.out', 'logs/pipelines/all_pcgrl/pcgrl_smb_wide_2.mscluster39.144547.out', 'logs/pipelines/all_pcgrl/pcgrl_smb_wide_1.mscluster14.144391.out', ], 'turtle': [ 'logs/pipelines/all_pcgrl/pcgrl_smb_turtle_5.mscluster34.144546.out', 'logs/pipelines/all_pcgrl/pcgrl_smb_turtle_3.mscluster26.144544.out', 'logs/pipelines/all_pcgrl/pcgrl_smb_turtle_4.mscluster32.144545.out', 'logs/pipelines/all_pcgrl/pcgrl_smb_turtle_1.mscluster24.144542.out', 'logs/pipelines/all_pcgrl/pcgrl_smb_turtle_2.mscluster25.144543.out', ] } for key, li_of_files in dic.items(): steps = [] for l in li_of_files: with open(l, 'r') as f: lines = [l.strip() for l in f.readlines()] lines = [int(l.split(' ')[0]) for l in lines if ' timesteps' in l][-1] steps.append(lines) K = [f'{s:1.2e}' for s in steps] print(f"For {key:<10}, average number of timesteps = {sum(steps) / len(steps):1.3e} and steps = {K}") if __name__ == '__main__': main()
def main(): dic = {'wide': ['logs/pipelines/all_pcgrl/pcgrl_smb_wide_5.mscluster41.144549.out', 'logs/pipelines/all_pcgrl/pcgrl_smb_wide_4.mscluster40.144548.out', 'logs/pipelines/all_pcgrl/pcgrl_smb_wide_3.mscluster18.144536.out', 'logs/pipelines/all_pcgrl/pcgrl_smb_wide_2.mscluster39.144547.out', 'logs/pipelines/all_pcgrl/pcgrl_smb_wide_1.mscluster14.144391.out'], 'turtle': ['logs/pipelines/all_pcgrl/pcgrl_smb_turtle_5.mscluster34.144546.out', 'logs/pipelines/all_pcgrl/pcgrl_smb_turtle_3.mscluster26.144544.out', 'logs/pipelines/all_pcgrl/pcgrl_smb_turtle_4.mscluster32.144545.out', 'logs/pipelines/all_pcgrl/pcgrl_smb_turtle_1.mscluster24.144542.out', 'logs/pipelines/all_pcgrl/pcgrl_smb_turtle_2.mscluster25.144543.out']} for (key, li_of_files) in dic.items(): steps = [] for l in li_of_files: with open(l, 'r') as f: lines = [l.strip() for l in f.readlines()] lines = [int(l.split(' ')[0]) for l in lines if ' timesteps' in l][-1] steps.append(lines) k = [f'{s:1.2e}' for s in steps] print(f'For {key:<10}, average number of timesteps = {sum(steps) / len(steps):1.3e} and steps = {K}') if __name__ == '__main__': main()
a=[5,20,15,20,25,50,20] b=set(a) b.remove(20) print(b)
a = [5, 20, 15, 20, 25, 50, 20] b = set(a) b.remove(20) print(b)
FEATKEY_NR_IMAGES = "nr_images" FEATKEY_IMAGE_HEIGHT = "height" FEATKEY_IMAGE_WIDTH = "width" FEATKEY_ORIGINAL_HEIGHT = "original_height" FEATKEY_ORIGINAL_WIDTH = "original_width" FEATKEY_PATIENT_ID = "patient_id" FEATKEY_LATERALITY = "laterality" FEATKEY_VIEW = "view" FEATKEY_IMAGE = "pixel_arr" FEATKEY_IMAGE_ORIG = "pixel_arr_orig" FEATKEY_MANUFACTURER = "manufacturer" FEATKEY_SOP_INSTANCE_UID = "sop_instance_uid" FEATKEY_STUDY_INSTANCE_UID = "study_instance_uid" FEATKEY_ANNOTATION_STATUS = "annotation_status" FEATKEY_COORDINATES_SEGMENTATION_MASK = "coordinates_segmentation_mask" FEATKEY_COORDINATES_PECTORAL_MUSCLE_PARAMETERS = "coordinates_pectoral_muscle_parameters" FEATKEY_COORDINATES_SKINLINE = "coordinates_skinline" FEATKEY_COORDINATES_MAMMILLA_LOCATION = "coordinates_mammilla_location" FEATKEY_PATCH_ID = "patch_id" FEATKEY_PATCH_BOUNDING_BOX_CENTER_ROW = "patch_bounding_box_center_row" FEATKEY_PATCH_BOUNDING_BOX_CENTER_COLUMN = "patch_bounding_box_center_column" FEATKEY_PATCH_BOUNDING_BOX_WIDTH = "patch_bounding_box_width" FEATKEY_PATCH_BOUNDING_BOX_HEIGHT = "patch_bounding_box_height" # Label keys LABELKEY_GT_ROIS_WITH_FINDING_CODES = "gt_rois_with_finding_codes" LABELKEY_GT_ROIS_WITH_LABELS = "gt_rois_with_labels" LABELKEY_GT_ANNOTATION_CONFIDENCES = "gt_annotation_confidences" LABELKEY_GT_BIOPSY_PROVEN = "gt_biopsy_proven" LABELKEY_PATCH_CLASS = "patch_class" LABELKEY_FINDING_CODE = "gt_finding_code" LABELKEY_GT_BIRADS_SCORE = "gt_birads_score" # track here all region level label keys LABELKEYS_REGION_LEVEL = { LABELKEY_GT_ROIS_WITH_FINDING_CODES, LABELKEY_GT_ROIS_WITH_LABELS, LABELKEY_GT_ANNOTATION_CONFIDENCES, LABELKEY_GT_BIOPSY_PROVEN, LABELKEY_GT_BIRADS_SCORE, } LABELKEY_DENSITY = "density" LABELKEY_DENSITY_0_BASED = "density_0_based" LABELKEY_ANNOTATION_ID = "annotation_id" LABELKEY_ANNOTATOR_MAIL = "annotator_mail" LABELKEY_WAS_REFERRED = "was_referred" LABELKEY_WAS_REFERRED_IN_FOLLOWUP = "was_referred_in_followup" LABELKEY_BIOPSY_SCORE = "biopsy_score" LABELKEY_BIOPSY_SCORE_OF_FOLLOWUP = "biopsy_score_of_followup" LABELKEY_INTERVAL_TYPE = "interval_type" # Model output keys OUTKEY_RCNN_ROIS = "rcnn_rois" OUTKEY_RPN_ROIS = "rpn_rois" OUTKEY_RPN_ROIS_FG_PROBS = "rpn_rois_fg_probs" OUTKEY_GT_ROIS = "gt_rois" OUTKEY_RCNN_CLASS_LABELS = "rcnn_class_labels" OUTKEY_IMAGE_LEVEL_PROBS = "image_level_probs" OUTKEY_PROB_MAP = "image_prob_map" OUTKEY_RCNN_PROBS = "rcnn_probs" OUTKEY_IMAGE_LEVEL_LABEL = "image_level_label" OUTKEY_ANCHORS = "anchors"
featkey_nr_images = 'nr_images' featkey_image_height = 'height' featkey_image_width = 'width' featkey_original_height = 'original_height' featkey_original_width = 'original_width' featkey_patient_id = 'patient_id' featkey_laterality = 'laterality' featkey_view = 'view' featkey_image = 'pixel_arr' featkey_image_orig = 'pixel_arr_orig' featkey_manufacturer = 'manufacturer' featkey_sop_instance_uid = 'sop_instance_uid' featkey_study_instance_uid = 'study_instance_uid' featkey_annotation_status = 'annotation_status' featkey_coordinates_segmentation_mask = 'coordinates_segmentation_mask' featkey_coordinates_pectoral_muscle_parameters = 'coordinates_pectoral_muscle_parameters' featkey_coordinates_skinline = 'coordinates_skinline' featkey_coordinates_mammilla_location = 'coordinates_mammilla_location' featkey_patch_id = 'patch_id' featkey_patch_bounding_box_center_row = 'patch_bounding_box_center_row' featkey_patch_bounding_box_center_column = 'patch_bounding_box_center_column' featkey_patch_bounding_box_width = 'patch_bounding_box_width' featkey_patch_bounding_box_height = 'patch_bounding_box_height' labelkey_gt_rois_with_finding_codes = 'gt_rois_with_finding_codes' labelkey_gt_rois_with_labels = 'gt_rois_with_labels' labelkey_gt_annotation_confidences = 'gt_annotation_confidences' labelkey_gt_biopsy_proven = 'gt_biopsy_proven' labelkey_patch_class = 'patch_class' labelkey_finding_code = 'gt_finding_code' labelkey_gt_birads_score = 'gt_birads_score' labelkeys_region_level = {LABELKEY_GT_ROIS_WITH_FINDING_CODES, LABELKEY_GT_ROIS_WITH_LABELS, LABELKEY_GT_ANNOTATION_CONFIDENCES, LABELKEY_GT_BIOPSY_PROVEN, LABELKEY_GT_BIRADS_SCORE} labelkey_density = 'density' labelkey_density_0_based = 'density_0_based' labelkey_annotation_id = 'annotation_id' labelkey_annotator_mail = 'annotator_mail' labelkey_was_referred = 'was_referred' labelkey_was_referred_in_followup = 'was_referred_in_followup' labelkey_biopsy_score = 'biopsy_score' labelkey_biopsy_score_of_followup = 'biopsy_score_of_followup' labelkey_interval_type = 'interval_type' outkey_rcnn_rois = 'rcnn_rois' outkey_rpn_rois = 'rpn_rois' outkey_rpn_rois_fg_probs = 'rpn_rois_fg_probs' outkey_gt_rois = 'gt_rois' outkey_rcnn_class_labels = 'rcnn_class_labels' outkey_image_level_probs = 'image_level_probs' outkey_prob_map = 'image_prob_map' outkey_rcnn_probs = 'rcnn_probs' outkey_image_level_label = 'image_level_label' outkey_anchors = 'anchors'
# DDA Algorithm def draw_line(x0, y0, x1, y1): dy = y1 - y0 dx = x1 - x0 m = dy / dx current_y = y0 print(f'dy = {dy}') print(f'dx = {dx}') print(f'm = {m}') for index in range (x0, x1 + 1): print(f'x = {index}, y = {round(current_y)}') current_y = current_y + m draw_line(2, 1, 7, 3)
def draw_line(x0, y0, x1, y1): dy = y1 - y0 dx = x1 - x0 m = dy / dx current_y = y0 print(f'dy = {dy}') print(f'dx = {dx}') print(f'm = {m}') for index in range(x0, x1 + 1): print(f'x = {index}, y = {round(current_y)}') current_y = current_y + m draw_line(2, 1, 7, 3)
class Strategy: moneymanagement = None def __init__(self, moneymanagement): self.moneymanagement = moneymanagement def can_find_pattern(self, data): if self.moneymanagement.checkDrawdown() < - float(self.moneymanagement.algorithm.Portfolio.Cash) * 0.1: return False return True
class Strategy: moneymanagement = None def __init__(self, moneymanagement): self.moneymanagement = moneymanagement def can_find_pattern(self, data): if self.moneymanagement.checkDrawdown() < -float(self.moneymanagement.algorithm.Portfolio.Cash) * 0.1: return False return True
# Attribute types STRING = 1 NUMBER = 2 DATETIME = 3 # Analysis Types SENTIMENT_ANALYSIS = 1 DOCUMENT_CLUSTERING = 2 CONCEPT_EXTRACTION = 3 DOCUMENT_CLASSIFICATION = 4 # Analysis Status NOT_EXECUTED = 1 IN_PROGRESS = 2 EXECUTED = 3 # Creation Status DRAFT = 1 COMPLETED = 2 # Visibilities PUBLIC = 1 PRIVATE = 2 TEAM = 3
string = 1 number = 2 datetime = 3 sentiment_analysis = 1 document_clustering = 2 concept_extraction = 3 document_classification = 4 not_executed = 1 in_progress = 2 executed = 3 draft = 1 completed = 2 public = 1 private = 2 team = 3
#!/usr/bin/env python3 # coding:utf-8 f = open("yankeedoodle.csv") nums = [num.strip() for num in f.read().split(',')] f.close() res = [int(x[0][5] + x[1][5] + x[2][6]) for x in zip(nums[0::3], nums[1::3], nums[2::3])] print(''.join([chr(e) for e in res]))
f = open('yankeedoodle.csv') nums = [num.strip() for num in f.read().split(',')] f.close() res = [int(x[0][5] + x[1][5] + x[2][6]) for x in zip(nums[0::3], nums[1::3], nums[2::3])] print(''.join([chr(e) for e in res]))
hex_colors = { "COLOR_1": "#d9811e", "TEXT_BUTTON_LIGHT": "#000000", "BUTTON_1": "#dfdfdf", "BACKGROUND": "#dfdfdf", "LABEL_TEXT_COLOR_LIGHT": "black", "FRAME_1_DARK": "#2b2b42", "TEXT_BUTTON_DARK": "white", "BUTTON_DARK": "#292929", "BACKGROUND_DARK": "#292929", "LABEL_TEXT_COLOR_DARK": "white", } custom_size = { "init_width": "1280", "init_height": "720", "min_width": "800", "min_height": "600", }
hex_colors = {'COLOR_1': '#d9811e', 'TEXT_BUTTON_LIGHT': '#000000', 'BUTTON_1': '#dfdfdf', 'BACKGROUND': '#dfdfdf', 'LABEL_TEXT_COLOR_LIGHT': 'black', 'FRAME_1_DARK': '#2b2b42', 'TEXT_BUTTON_DARK': 'white', 'BUTTON_DARK': '#292929', 'BACKGROUND_DARK': '#292929', 'LABEL_TEXT_COLOR_DARK': 'white'} custom_size = {'init_width': '1280', 'init_height': '720', 'min_width': '800', 'min_height': '600'}
## Mel-filterbank mel_window_length = 25 # In milliseconds mel_window_step = 10 # In milliseconds mel_n_channels = 40 ## Audio sampling_rate = 16000 # Number of spectrogram frames in a partial utterance partials_n_frames = 160 # 1600 ms ## Voice Activation Detection vad_window_length = 30 # In milliseconds vad_moving_average_width = 8 # Maximum number of consecutive silent frames a segment can have. vad_max_silence_length = 6 ## Audio volume normalization audio_norm_target_dBFS = -30 ## Model parameters model_hidden_size = 256 model_embedding_size = 256 model_num_layers = 3
mel_window_length = 25 mel_window_step = 10 mel_n_channels = 40 sampling_rate = 16000 partials_n_frames = 160 vad_window_length = 30 vad_moving_average_width = 8 vad_max_silence_length = 6 audio_norm_target_d_bfs = -30 model_hidden_size = 256 model_embedding_size = 256 model_num_layers = 3
#python3 for t in range(int(input())): count = 0 s,w1,w2,w3 = map(int,input().split()) if((w1+w2+w3)<=s): count = 1 elif((w1+w2)<=s): if(w3 <= s): count = 2 else: count = 1 elif((w2+w3)<=s): if(w3 <= s): count = 2 else: count = 1 elif(w1 <= s and w2 <= s and w3 <= s): count = 3 elif(w1>s and w3 > s): count = 0 print(count) #score:100
for t in range(int(input())): count = 0 (s, w1, w2, w3) = map(int, input().split()) if w1 + w2 + w3 <= s: count = 1 elif w1 + w2 <= s: if w3 <= s: count = 2 else: count = 1 elif w2 + w3 <= s: if w3 <= s: count = 2 else: count = 1 elif w1 <= s and w2 <= s and (w3 <= s): count = 3 elif w1 > s and w3 > s: count = 0 print(count)
# ================================================= # # Trash Guy Animation # # (> ^_^)> # # Made by Zac ([email protected]) # # Version 4.1.0+20201210 # # Donate: # # 12Na1AmuGMCQYsxwM7ZLSr1sgfZacZFYxa # # ================================================= # # Copyright (C) 2020 Zac ([email protected]) # # Permission is hereby granted, free of charge, to # # any person obtaining a copy of this software and # # associated documentation files (the "Software"), # # to deal in the Software without restriction, # # including without limitation the rights to use, # # copy, modify, merge, publish, distribute, # # sublicense, and/or sell copies of the Software, # # and to permit persons to whom the Software is # # furnished to do so, subject to the following # # conditions: The above copyright notice and this # # permission notice shall be included in all copies # # or substantial portions of the Software. # # ================================================= # # # ================================================= # # If you rewrite this software in a different # # programming language or create a derivative # # work, please be kind and include this notice # # and the below credit along with the license: # # # # This work is based on the original TrashGuy # # animation (https://github.com/trash-guy/TrashGuy) # # written by Zac ([email protected]). # # # # ================================================= # # Look-up table of commonly used indices for instant conversion # Generated with generate_lut.py _LUT = ( (0, 7), (0, 7), (0, 7), (0, 7), (0, 7), (0, 7), (0, 7), (1, 9), (1, 9), (1, 9), (1, 9), (1, 9), (1, 9), (1, 9), (1, 9), (1, 9), (2, 11), (2, 11), (2, 11), (2, 11), (2, 11), (2, 11), (2, 11), (2, 11), (2, 11), (2, 11), (2, 11), (3, 13), (3, 13), (3, 13), (3, 13), (3, 13), (3, 13), (3, 13), (3, 13), (3, 13), (3, 13), (3, 13), (3, 13), (3, 13), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65))
_lut = ((0, 7), (0, 7), (0, 7), (0, 7), (0, 7), (0, 7), (0, 7), (1, 9), (1, 9), (1, 9), (1, 9), (1, 9), (1, 9), (1, 9), (1, 9), (1, 9), (2, 11), (2, 11), (2, 11), (2, 11), (2, 11), (2, 11), (2, 11), (2, 11), (2, 11), (2, 11), (2, 11), (3, 13), (3, 13), (3, 13), (3, 13), (3, 13), (3, 13), (3, 13), (3, 13), (3, 13), (3, 13), (3, 13), (3, 13), (3, 13), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (4, 15), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (5, 17), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (6, 19), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (7, 21), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (8, 23), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (9, 25), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (10, 27), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (11, 29), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (12, 31), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (13, 33), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (14, 35), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (15, 37), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (16, 39), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (17, 41), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (18, 43), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (19, 45), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (20, 47), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (21, 49), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (22, 51), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (23, 53), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (24, 55), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (25, 57), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (26, 59), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (27, 61), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (28, 63), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65), (29, 65))
with open('F_T_W copy/ada_fund.json') as f: data = json.load(f) print(data)
with open('F_T_W copy/ada_fund.json') as f: data = json.load(f) print(data)
class Dice(object): __slots__ = ['sides'] def __init__(self, sides): self.sides = sides class DiceStack(object): __slots__ = ['amount', 'dice'] def __init__(self, amount, dice): self.amount = amount self.dice = dice
class Dice(object): __slots__ = ['sides'] def __init__(self, sides): self.sides = sides class Dicestack(object): __slots__ = ['amount', 'dice'] def __init__(self, amount, dice): self.amount = amount self.dice = dice
_cmds_registry = {} def register(cmd:str, alias:str) -> bool: if alias in _cmds_registry: return False else: _cmds_registry[alias] = cmd return True def get_cmd(alias:str) -> str: if alias in _cmds_registry: return _cmds_registry[alias] else: return ''
_cmds_registry = {} def register(cmd: str, alias: str) -> bool: if alias in _cmds_registry: return False else: _cmds_registry[alias] = cmd return True def get_cmd(alias: str) -> str: if alias in _cmds_registry: return _cmds_registry[alias] else: return ''
def word_form(number): ones = ('', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine') tens = ('', '', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety') teens = ('ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen') levels = ('', 'thousand', 'million', 'billion', 'trillion', 'quadrillion', 'quintillion', 'sextillion', 'septillion', 'octillion', 'nonillion') word = '' number = str(number)[::-1] if len(number) % 3 == 1: number += '0' for x, digit in enumerate(number): if x % 3 == 0: word = levels[x // 3] + ', ' + word prevDigit = int(digit) elif x % 3 == 1: if digit is '1': num = teens[prevDigit] elif digit is '0': num = ones[prevDigit] else: num = tens[int(digit)] if prevDigit: num += '-' + ones[prevDigit] word = num + ' ' + word elif x % 3 == 2: if digit is not '0': if all(n is '0' for n in number[:x]): word = ones[int(digit)] + ' hundred' + word else: word = ones[int(digit)] + ' hundred and ' + word return word.strip(' , ') lengths = [len(word_form(i).replace(' ', '').replace('-', '')) for i in range(1, 1000 + 1)] print(sum(lengths))
def word_form(number): ones = ('', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine') tens = ('', '', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety') teens = ('ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen') levels = ('', 'thousand', 'million', 'billion', 'trillion', 'quadrillion', 'quintillion', 'sextillion', 'septillion', 'octillion', 'nonillion') word = '' number = str(number)[::-1] if len(number) % 3 == 1: number += '0' for (x, digit) in enumerate(number): if x % 3 == 0: word = levels[x // 3] + ', ' + word prev_digit = int(digit) elif x % 3 == 1: if digit is '1': num = teens[prevDigit] elif digit is '0': num = ones[prevDigit] else: num = tens[int(digit)] if prevDigit: num += '-' + ones[prevDigit] word = num + ' ' + word elif x % 3 == 2: if digit is not '0': if all((n is '0' for n in number[:x])): word = ones[int(digit)] + ' hundred' + word else: word = ones[int(digit)] + ' hundred and ' + word return word.strip(' , ') lengths = [len(word_form(i).replace(' ', '').replace('-', '')) for i in range(1, 1000 + 1)] print(sum(lengths))
__author__ = 'Ladeinde Oluwaseun' __copyright__ = 'Copyright 2018, Ladeinde Oluwaseun' __credits__ = ['Ladeinde Oluwaseun, amordigital'] __license__ = 'BSD' __version__ = '1.5.1' __maintainer__ = 'Ladeinde Oluwaseun' __email__ = '[email protected]' __status__ = 'Development'
__author__ = 'Ladeinde Oluwaseun' __copyright__ = 'Copyright 2018, Ladeinde Oluwaseun' __credits__ = ['Ladeinde Oluwaseun, amordigital'] __license__ = 'BSD' __version__ = '1.5.1' __maintainer__ = 'Ladeinde Oluwaseun' __email__ = '[email protected]' __status__ = 'Development'
a=10 b=5 print('Addition:', a+b) print('Substraction: ', a-b) print('Multiplication:', a*b) print('Division: ', a/b) print('Remainder: ', a%b) print('Exponential:', a ** b)
a = 10 b = 5 print('Addition:', a + b) print('Substraction: ', a - b) print('Multiplication:', a * b) print('Division: ', a / b) print('Remainder: ', a % b) print('Exponential:', a ** b)
CHUNK_SIZE = (1024**2) * 50 file_number = 1 with open('encoder-5-3000.pkl', 'rb') as f: chunk = f.read(CHUNK_SIZE) while chunk: with open('encoder-5-3000_part_' + str(file_number), 'wb') as chunk_file: chunk_file.write(chunk) file_number += 1 chunk = f.read(CHUNK_SIZE)
chunk_size = 1024 ** 2 * 50 file_number = 1 with open('encoder-5-3000.pkl', 'rb') as f: chunk = f.read(CHUNK_SIZE) while chunk: with open('encoder-5-3000_part_' + str(file_number), 'wb') as chunk_file: chunk_file.write(chunk) file_number += 1 chunk = f.read(CHUNK_SIZE)
def app(amb , start_response): arq=open('index.html','rb') data = arq.read() status = "200 OK" headers = [('Content-type',"text/html")] start_response(status,headers) return [data]
def app(amb, start_response): arq = open('index.html', 'rb') data = arq.read() status = '200 OK' headers = [('Content-type', 'text/html')] start_response(status, headers) return [data]
#!/usr/bin/env python3 SIZE = 100 with open('03-output.pbm', 'wb') as f: f.write(b'P4\n100 100\n') for i in range(SIZE): counter = 0 xs = b'' for j in range(SIZE): counter += 1 if (i + j) % 2 == 0: xs += b'1' else: xs += b'0' if counter == 8: print("_", xs, counter, 8 - ((SIZE * SIZE) % 8)) f.write(bytes([int(xs, 2)])) xs = b'' counter = 0 if counter != 0: xs += b'0' * (8 - counter) f.write(bytes([int(xs, 2)]))
size = 100 with open('03-output.pbm', 'wb') as f: f.write(b'P4\n100 100\n') for i in range(SIZE): counter = 0 xs = b'' for j in range(SIZE): counter += 1 if (i + j) % 2 == 0: xs += b'1' else: xs += b'0' if counter == 8: print('_', xs, counter, 8 - SIZE * SIZE % 8) f.write(bytes([int(xs, 2)])) xs = b'' counter = 0 if counter != 0: xs += b'0' * (8 - counter) f.write(bytes([int(xs, 2)]))
# # PySNMP MIB module RSTP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RSTP-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:50:24 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) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint") dot1dStp, dot1dStpPortEntry = mibBuilder.importSymbols("BRIDGE-MIB", "dot1dStp", "dot1dStpPortEntry") ObjectGroup, ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "ModuleCompliance", "NotificationGroup") Counter32, Gauge32, NotificationType, Counter64, ObjectIdentity, ModuleIdentity, Bits, TimeTicks, IpAddress, MibIdentifier, Integer32, mib_2, Unsigned32, iso, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "Gauge32", "NotificationType", "Counter64", "ObjectIdentity", "ModuleIdentity", "Bits", "TimeTicks", "IpAddress", "MibIdentifier", "Integer32", "mib-2", "Unsigned32", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn") DisplayString, TruthValue, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TruthValue", "TextualConvention") rstpMIB = ModuleIdentity((1, 3, 6, 1, 2, 1, 134)) rstpMIB.setRevisions(('2005-12-07 00:00',)) if mibBuilder.loadTexts: rstpMIB.setLastUpdated('200512070000Z') if mibBuilder.loadTexts: rstpMIB.setOrganization('IETF Bridge MIB Working Group') rstpNotifications = MibIdentifier((1, 3, 6, 1, 2, 1, 134, 0)) rstpObjects = MibIdentifier((1, 3, 6, 1, 2, 1, 134, 1)) rstpConformance = MibIdentifier((1, 3, 6, 1, 2, 1, 134, 2)) dot1dStpVersion = MibScalar((1, 3, 6, 1, 2, 1, 17, 2, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 2))).clone(namedValues=NamedValues(("stpCompatible", 0), ("rstp", 2))).clone('rstp')).setMaxAccess("readwrite") if mibBuilder.loadTexts: dot1dStpVersion.setStatus('current') dot1dStpTxHoldCount = MibScalar((1, 3, 6, 1, 2, 1, 17, 2, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10)).clone(3)).setMaxAccess("readwrite") if mibBuilder.loadTexts: dot1dStpTxHoldCount.setStatus('current') dot1dStpExtPortTable = MibTable((1, 3, 6, 1, 2, 1, 17, 2, 19), ) if mibBuilder.loadTexts: dot1dStpExtPortTable.setStatus('current') dot1dStpExtPortEntry = MibTableRow((1, 3, 6, 1, 2, 1, 17, 2, 19, 1), ) dot1dStpPortEntry.registerAugmentions(("RSTP-MIB", "dot1dStpExtPortEntry")) dot1dStpExtPortEntry.setIndexNames(*dot1dStpPortEntry.getIndexNames()) if mibBuilder.loadTexts: dot1dStpExtPortEntry.setStatus('current') dot1dStpPortProtocolMigration = MibTableColumn((1, 3, 6, 1, 2, 1, 17, 2, 19, 1, 1), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: dot1dStpPortProtocolMigration.setStatus('current') dot1dStpPortAdminEdgePort = MibTableColumn((1, 3, 6, 1, 2, 1, 17, 2, 19, 1, 2), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: dot1dStpPortAdminEdgePort.setStatus('current') dot1dStpPortOperEdgePort = MibTableColumn((1, 3, 6, 1, 2, 1, 17, 2, 19, 1, 3), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: dot1dStpPortOperEdgePort.setStatus('current') dot1dStpPortAdminPointToPoint = MibTableColumn((1, 3, 6, 1, 2, 1, 17, 2, 19, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("forceTrue", 0), ("forceFalse", 1), ("auto", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: dot1dStpPortAdminPointToPoint.setStatus('current') dot1dStpPortOperPointToPoint = MibTableColumn((1, 3, 6, 1, 2, 1, 17, 2, 19, 1, 5), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: dot1dStpPortOperPointToPoint.setStatus('current') dot1dStpPortAdminPathCost = MibTableColumn((1, 3, 6, 1, 2, 1, 17, 2, 19, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 200000000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: dot1dStpPortAdminPathCost.setStatus('current') rstpGroups = MibIdentifier((1, 3, 6, 1, 2, 1, 134, 2, 1)) rstpCompliances = MibIdentifier((1, 3, 6, 1, 2, 1, 134, 2, 2)) rstpBridgeGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 134, 2, 1, 1)).setObjects(("RSTP-MIB", "dot1dStpVersion"), ("RSTP-MIB", "dot1dStpTxHoldCount")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rstpBridgeGroup = rstpBridgeGroup.setStatus('current') rstpPortGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 134, 2, 1, 2)).setObjects(("RSTP-MIB", "dot1dStpPortProtocolMigration"), ("RSTP-MIB", "dot1dStpPortAdminEdgePort"), ("RSTP-MIB", "dot1dStpPortOperEdgePort"), ("RSTP-MIB", "dot1dStpPortAdminPointToPoint"), ("RSTP-MIB", "dot1dStpPortOperPointToPoint"), ("RSTP-MIB", "dot1dStpPortAdminPathCost")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rstpPortGroup = rstpPortGroup.setStatus('current') rstpCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 134, 2, 2, 1)).setObjects(("RSTP-MIB", "rstpBridgeGroup"), ("RSTP-MIB", "rstpPortGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rstpCompliance = rstpCompliance.setStatus('current') mibBuilder.exportSymbols("RSTP-MIB", dot1dStpTxHoldCount=dot1dStpTxHoldCount, dot1dStpExtPortEntry=dot1dStpExtPortEntry, rstpMIB=rstpMIB, dot1dStpPortAdminPathCost=dot1dStpPortAdminPathCost, rstpPortGroup=rstpPortGroup, dot1dStpPortAdminEdgePort=dot1dStpPortAdminEdgePort, dot1dStpPortProtocolMigration=dot1dStpPortProtocolMigration, dot1dStpPortOperPointToPoint=dot1dStpPortOperPointToPoint, rstpObjects=rstpObjects, dot1dStpVersion=dot1dStpVersion, dot1dStpPortOperEdgePort=dot1dStpPortOperEdgePort, rstpCompliances=rstpCompliances, dot1dStpExtPortTable=dot1dStpExtPortTable, dot1dStpPortAdminPointToPoint=dot1dStpPortAdminPointToPoint, rstpConformance=rstpConformance, rstpGroups=rstpGroups, rstpBridgeGroup=rstpBridgeGroup, rstpNotifications=rstpNotifications, PYSNMP_MODULE_ID=rstpMIB, rstpCompliance=rstpCompliance)
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, constraints_union, value_size_constraint, value_range_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueSizeConstraint', 'ValueRangeConstraint', 'SingleValueConstraint') (dot1d_stp, dot1d_stp_port_entry) = mibBuilder.importSymbols('BRIDGE-MIB', 'dot1dStp', 'dot1dStpPortEntry') (object_group, module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'ModuleCompliance', 'NotificationGroup') (counter32, gauge32, notification_type, counter64, object_identity, module_identity, bits, time_ticks, ip_address, mib_identifier, integer32, mib_2, unsigned32, iso, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter32', 'Gauge32', 'NotificationType', 'Counter64', 'ObjectIdentity', 'ModuleIdentity', 'Bits', 'TimeTicks', 'IpAddress', 'MibIdentifier', 'Integer32', 'mib-2', 'Unsigned32', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn') (display_string, truth_value, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TruthValue', 'TextualConvention') rstp_mib = module_identity((1, 3, 6, 1, 2, 1, 134)) rstpMIB.setRevisions(('2005-12-07 00:00',)) if mibBuilder.loadTexts: rstpMIB.setLastUpdated('200512070000Z') if mibBuilder.loadTexts: rstpMIB.setOrganization('IETF Bridge MIB Working Group') rstp_notifications = mib_identifier((1, 3, 6, 1, 2, 1, 134, 0)) rstp_objects = mib_identifier((1, 3, 6, 1, 2, 1, 134, 1)) rstp_conformance = mib_identifier((1, 3, 6, 1, 2, 1, 134, 2)) dot1d_stp_version = mib_scalar((1, 3, 6, 1, 2, 1, 17, 2, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 2))).clone(namedValues=named_values(('stpCompatible', 0), ('rstp', 2))).clone('rstp')).setMaxAccess('readwrite') if mibBuilder.loadTexts: dot1dStpVersion.setStatus('current') dot1d_stp_tx_hold_count = mib_scalar((1, 3, 6, 1, 2, 1, 17, 2, 17), integer32().subtype(subtypeSpec=value_range_constraint(1, 10)).clone(3)).setMaxAccess('readwrite') if mibBuilder.loadTexts: dot1dStpTxHoldCount.setStatus('current') dot1d_stp_ext_port_table = mib_table((1, 3, 6, 1, 2, 1, 17, 2, 19)) if mibBuilder.loadTexts: dot1dStpExtPortTable.setStatus('current') dot1d_stp_ext_port_entry = mib_table_row((1, 3, 6, 1, 2, 1, 17, 2, 19, 1)) dot1dStpPortEntry.registerAugmentions(('RSTP-MIB', 'dot1dStpExtPortEntry')) dot1dStpExtPortEntry.setIndexNames(*dot1dStpPortEntry.getIndexNames()) if mibBuilder.loadTexts: dot1dStpExtPortEntry.setStatus('current') dot1d_stp_port_protocol_migration = mib_table_column((1, 3, 6, 1, 2, 1, 17, 2, 19, 1, 1), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: dot1dStpPortProtocolMigration.setStatus('current') dot1d_stp_port_admin_edge_port = mib_table_column((1, 3, 6, 1, 2, 1, 17, 2, 19, 1, 2), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: dot1dStpPortAdminEdgePort.setStatus('current') dot1d_stp_port_oper_edge_port = mib_table_column((1, 3, 6, 1, 2, 1, 17, 2, 19, 1, 3), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: dot1dStpPortOperEdgePort.setStatus('current') dot1d_stp_port_admin_point_to_point = mib_table_column((1, 3, 6, 1, 2, 1, 17, 2, 19, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('forceTrue', 0), ('forceFalse', 1), ('auto', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: dot1dStpPortAdminPointToPoint.setStatus('current') dot1d_stp_port_oper_point_to_point = mib_table_column((1, 3, 6, 1, 2, 1, 17, 2, 19, 1, 5), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: dot1dStpPortOperPointToPoint.setStatus('current') dot1d_stp_port_admin_path_cost = mib_table_column((1, 3, 6, 1, 2, 1, 17, 2, 19, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 200000000))).setMaxAccess('readwrite') if mibBuilder.loadTexts: dot1dStpPortAdminPathCost.setStatus('current') rstp_groups = mib_identifier((1, 3, 6, 1, 2, 1, 134, 2, 1)) rstp_compliances = mib_identifier((1, 3, 6, 1, 2, 1, 134, 2, 2)) rstp_bridge_group = object_group((1, 3, 6, 1, 2, 1, 134, 2, 1, 1)).setObjects(('RSTP-MIB', 'dot1dStpVersion'), ('RSTP-MIB', 'dot1dStpTxHoldCount')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rstp_bridge_group = rstpBridgeGroup.setStatus('current') rstp_port_group = object_group((1, 3, 6, 1, 2, 1, 134, 2, 1, 2)).setObjects(('RSTP-MIB', 'dot1dStpPortProtocolMigration'), ('RSTP-MIB', 'dot1dStpPortAdminEdgePort'), ('RSTP-MIB', 'dot1dStpPortOperEdgePort'), ('RSTP-MIB', 'dot1dStpPortAdminPointToPoint'), ('RSTP-MIB', 'dot1dStpPortOperPointToPoint'), ('RSTP-MIB', 'dot1dStpPortAdminPathCost')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rstp_port_group = rstpPortGroup.setStatus('current') rstp_compliance = module_compliance((1, 3, 6, 1, 2, 1, 134, 2, 2, 1)).setObjects(('RSTP-MIB', 'rstpBridgeGroup'), ('RSTP-MIB', 'rstpPortGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rstp_compliance = rstpCompliance.setStatus('current') mibBuilder.exportSymbols('RSTP-MIB', dot1dStpTxHoldCount=dot1dStpTxHoldCount, dot1dStpExtPortEntry=dot1dStpExtPortEntry, rstpMIB=rstpMIB, dot1dStpPortAdminPathCost=dot1dStpPortAdminPathCost, rstpPortGroup=rstpPortGroup, dot1dStpPortAdminEdgePort=dot1dStpPortAdminEdgePort, dot1dStpPortProtocolMigration=dot1dStpPortProtocolMigration, dot1dStpPortOperPointToPoint=dot1dStpPortOperPointToPoint, rstpObjects=rstpObjects, dot1dStpVersion=dot1dStpVersion, dot1dStpPortOperEdgePort=dot1dStpPortOperEdgePort, rstpCompliances=rstpCompliances, dot1dStpExtPortTable=dot1dStpExtPortTable, dot1dStpPortAdminPointToPoint=dot1dStpPortAdminPointToPoint, rstpConformance=rstpConformance, rstpGroups=rstpGroups, rstpBridgeGroup=rstpBridgeGroup, rstpNotifications=rstpNotifications, PYSNMP_MODULE_ID=rstpMIB, rstpCompliance=rstpCompliance)
#..............example 1 combine................ # s = "ABC" # s2 = "123" # L = [x+y for x in s for y in s2] # print(L) #..............example 2 remove duplicates................ # L = [1, 3, 2, 1, 6, 4, 2, 98, 82] # L2 = [] # for x in L: # if x not in L2: # L2.append(x) # print(L2) #..............example 3 fibonacci................ #1 1 2 3 5 8 13 #2=1+1; 3=1+2; 5=2+3 ..... # method 1 # a=0 # b=1 # L=[] # while len(L) < 40: # a,b = b, a+b # L.append(a) # print(L) # method 2 L=[1,1] while len(L) < 40: L.append(L[-1]+L[-2]) print(L)
l = [1, 1] while len(L) < 40: L.append(L[-1] + L[-2]) print(L)
def main(request, response): headers = [] if "cors" in request.GET: headers.append(("Access-Control-Allow-Origin", "*")) headers.append(("Access-Control-Allow-Credentials", "true")) headers.append(("Access-Control-Allow-Methods", "GET, POST, PUT, FOO")) headers.append(("Access-Control-Allow-Headers", "x-test, x-foo")) headers.append(("Access-Control-Expose-Headers", "x-request-method, x-request-content-type, x-request-query, x-request-content-length")) filter_value = request.GET.first("filter_value", "") filter_name = request.GET.first("filter_name", "").lower() result = "" for name, value in request.headers.iteritems(): if filter_value: if value == filter_value: result += name.lower() + "," elif name.lower() == filter_name: result += name.lower() + ": " + value + "\n"; headers.append(("content-type", "text/plain")) return headers, result
def main(request, response): headers = [] if 'cors' in request.GET: headers.append(('Access-Control-Allow-Origin', '*')) headers.append(('Access-Control-Allow-Credentials', 'true')) headers.append(('Access-Control-Allow-Methods', 'GET, POST, PUT, FOO')) headers.append(('Access-Control-Allow-Headers', 'x-test, x-foo')) headers.append(('Access-Control-Expose-Headers', 'x-request-method, x-request-content-type, x-request-query, x-request-content-length')) filter_value = request.GET.first('filter_value', '') filter_name = request.GET.first('filter_name', '').lower() result = '' for (name, value) in request.headers.iteritems(): if filter_value: if value == filter_value: result += name.lower() + ',' elif name.lower() == filter_name: result += name.lower() + ': ' + value + '\n' headers.append(('content-type', 'text/plain')) return (headers, result)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_jar") load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@bazelrio//:deps_utils.bzl", "cc_library_headers", "cc_library_shared", "cc_library_sources", "cc_library_static") def setup_wpilib_2022_1_1_beta_1_dependencies(): maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_linuxathena", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-linuxathena.zip", sha256 = "c926798f365dcb52f8da4b3aa16d2b712a0b180e71990dab9013c53cb51ec8c9", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_linuxathenastatic", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-linuxathenastatic.zip", sha256 = "134d58c2d76ee9fc57f2e8c69b3f937175d98b9f33cd7b2f11504f2b16ca57a0", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_windowsx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-windowsx86-64.zip", sha256 = "634688e85581e4067213b8578b8f1368aada728e2f894f7ac0460e60390dc3a6", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_linuxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-linuxx86-64.zip", sha256 = "9cccf85bd6d0a576174d2bc352eda5f46fbba2878ff74a33711f99c21d0e3467", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_osxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-osxx86-64.zip", sha256 = "042f30b8ff66f862868df5557d38b1518f85641ad3b824b13e5804137da0955e", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_windowsx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-windowsx86-64static.zip", sha256 = "19076d7738bdcf3351286750abcd63cf3b9be3ae094975c1a44212d618ffdd93", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_linuxx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-linuxx86-64static.zip", sha256 = "c1a67b54dece57acefc92a888f85320b1623fa1d3e55b6b36721841c0a0c8926", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_osxx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-osxx86-64static.zip", sha256 = "88834ad637e9c7a3b92c1dca72a7a18b00f67e711ab4e51125bfff44996c5331", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_headers", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-headers.zip", sha256 = "ee96572633364a858348ecfd781a54a915ec44e61ff66c74d115dc5a25667788", build_file_content = cc_library_headers, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_sources", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-sources.zip", sha256 = "3811ded44c6350f51047b115a50c713fdeb81e68f47b6fb0c17131117e7d9f9b", build_file_content = cc_library_sources, ) maybe( http_archive, "__bazelrio_edu_wpi_first_hal_hal-cpp_linuxathena", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-linuxathena.zip", sha256 = "ccb9f76f81afde7100eee4940a19d5ccd5cba8a558570b9a1f1a051430a6d262", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_hal_hal-cpp_linuxathenastatic", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-linuxathenastatic.zip", sha256 = "9711645efa98f61a9634ce2bd68a1aae56bcfcd9944b8ada2bd7564480f5d66e", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_hal_hal-cpp_windowsx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-windowsx86-64.zip", sha256 = "2ac30bba83f507dfa4b63bb9605153a5f40b95d4f17ae91229c96fe9ea0cd4ac", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_hal_hal-cpp_linuxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-linuxx86-64.zip", sha256 = "da54ece30b3d429f1a6263b90a316e9ab4f891176412704be9825225e39afaf3", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_hal_hal-cpp_osxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-osxx86-64.zip", sha256 = "8299fbc2e2ac770deabf4c6cd37cfa1a8efef9fd700a3f2ca99d7e1c6a6ec40d", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_hal_hal-cpp_windowsx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-windowsx86-64static.zip", sha256 = "217867fabddf6331c0aa950431e3d2c6430f8afee5754736a96c904431abc557", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_hal_hal-cpp_linuxx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-linuxx86-64static.zip", sha256 = "c090c7a22f179b0987fec03f603656b1ec5ce1666ba4c70ef8473a9a7803a075", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_hal_hal-cpp_osxx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-osxx86-64static.zip", sha256 = "0386e15436bd22dffb4e18829c0bc58c19d7520512bc7c9af92b494ef33f41ce", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_hal_hal-cpp_headers", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-headers.zip", sha256 = "a4f8a16b4082577733d10ba420fcae5174ceaec7f42260fb60197fb317f89335", build_file_content = cc_library_headers, ) maybe( http_archive, "__bazelrio_edu_wpi_first_hal_hal-cpp_sources", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-sources.zip", sha256 = "8913794392a9a8a33577f454e0ad055f9985d9b54dc7857e06b85fc2944d5de7", build_file_content = cc_library_sources, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_linuxathena", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-linuxathena.zip", sha256 = "0959646557ae65cc3be8894ee8d39beb7c951ffd6be993ab58c709851069bdf3", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_linuxathenastatic", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-linuxathenastatic.zip", sha256 = "1fb70cd539e29463bb468a5fd4f8342fdbfd51fbe123abb3183eeb69ba18831b", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_windowsx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-windowsx86-64.zip", sha256 = "cc10bb439a75f6d97f89761ed27cc1df12dffd330d6fc052383a21d8a9575ffb", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_linuxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-linuxx86-64.zip", sha256 = "fcfc83f420f57549d1f8068edd1e1182f2c5bc7562caca6129326ba116621d5d", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_osxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-osxx86-64.zip", sha256 = "4dfff5233bb7b0b8ea3c4b9eefc31d0c17fd0962ffaf785ec87305bd6b55e5da", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_windowsx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-windowsx86-64static.zip", sha256 = "3c54a5440519e4001fdd3e3e4c7f4a5c9cc26c7a4d6910bc0a5b66e5fa4459be", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_linuxx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-linuxx86-64static.zip", sha256 = "099125e210b1a3ddcd1854bbfa236dbe6477dd1bd6ed7dcc1c95f12b0e212a61", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_osxx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-osxx86-64static.zip", sha256 = "fbf604a990af907944923157c20d33d3bc2050cf40a719abdd3c14344e69f4b2", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_headers", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-headers.zip", sha256 = "6efa9420ef875cd69a4d3d55ebfde2b9ed0ed2bd61db9811dcb2e274b0ae56d8", build_file_content = cc_library_headers, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_sources", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-sources.zip", sha256 = "ed55b6ea290b075a9a7f1c94852a50c1a5e28ce3e01d3cab713811eeca03803d", build_file_content = cc_library_sources, ) maybe( http_archive, "__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_linuxathena", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-linuxathena.zip", sha256 = "099448b290666ca9d594e28fb21c5b4d199b31669d61d8d26b7b837245f74dc3", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_linuxathenastatic", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-linuxathenastatic.zip", sha256 = "aad15ca5bd6976730465ba1896f07576529e8384a2a3740ab60345a430ff0bb3", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_windowsx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-windowsx86-64.zip", sha256 = "389018e731f998c8fe2ce42e80cf2eae60935a386d3c40af54f7cf9159e9a70e", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_linuxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-linuxx86-64.zip", sha256 = "98483d6dea79148389d25ce0ece2ea474d43a041d39aaaf3998bc51a2b109b53", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_osxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-osxx86-64.zip", sha256 = "07989a5109f6aab4fab038fb36b25511b965d0179bdcf7ba13b6d200d77592e4", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_windowsx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-windowsx86-64static.zip", sha256 = "c0acb88ac54d06cebba5374aa6ef10ba9f4f6019c1352718c5d8ce70232a55d6", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_linuxx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-linuxx86-64static.zip", sha256 = "5b3623a3f6d87f33d98cec7d6e6a7bb1983bf43f1056d9983fbb4c15d269821a", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_osxx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-osxx86-64static.zip", sha256 = "765bdd0196a487125b4076dd5eaabfaf2c4a0e37391a975592c3d141e7ae39e0", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_headers", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-headers.zip", sha256 = "403322df2c7637bc0c47e5437d4fea678962375989149f5ae6ecf81810b80d67", build_file_content = cc_library_headers, ) maybe( http_archive, "__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_sources", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-sources.zip", sha256 = "db0e677a833054cccb0df6eefcad8888970f2b9c65a7b0c6211ce1969c32acb2", build_file_content = cc_library_sources, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_linuxathena", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-linuxathena.zip", sha256 = "86090d1cde7a10662abb7e163f5920e743ca0210a72691f3edaaa7501bd7381a", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_linuxathenastatic", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-linuxathenastatic.zip", sha256 = "b4d6c1a57c398dd131baa5632e66257d139c22620b31637abfb9cb2eec641fa2", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_windowsx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-windowsx86-64.zip", sha256 = "064beaffc16feee23c01a868cfc6b548537badc5332a0cc753f5714dedb0f6d3", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_linuxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-linuxx86-64.zip", sha256 = "403826a614ed8a46720b52f89d8d337ce6cc89c55bddde29667af65b7f1d9d79", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_osxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-osxx86-64.zip", sha256 = "e89d7504bea9ae7007bc80b13d595451e2486f449dd3c1878783000dcc95fc80", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_windowsx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-windowsx86-64static.zip", sha256 = "48ebd0fe7e162ac5a624055768e07237278885657697e8533cad5bd8656b5373", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_linuxx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-linuxx86-64static.zip", sha256 = "6c224639a477f789cc4198022bf07014ccd28a7643025e8bcd8157d300d42753", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_osxx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-osxx86-64static.zip", sha256 = "3737e59c8c0d70b3926426f3fba0c3f7c9275d5c6dbaf68708631578de6ff8a1", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_headers", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-headers.zip", sha256 = "5dfd502ac49fc6f0fa33727b2078389ac3616ee995b9878b34d85e07d908ed0a", build_file_content = cc_library_headers, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_sources", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-sources.zip", sha256 = "edaf77f5ee765213fac1c39169c8cf7568cf6a0e1fe1841cea56385f10a4483a", build_file_content = cc_library_sources, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_linuxathena", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-linuxathena.zip", sha256 = "47885af110d9faca20b952fcb952563ba0aef3dd7aab9b9693712d63b96f46a3", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_linuxathenastatic", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-linuxathenastatic.zip", sha256 = "ed2ba5e2be2542de80ae974f29b47e9a788184425497e88b65ca6525d3ea0ce0", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_windowsx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-windowsx86-64.zip", sha256 = "1a2860600a2265578b5eb4ee04bf54286fd6a853a46821d299e40d2828fd5162", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_linuxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-linuxx86-64.zip", sha256 = "5f6e5dd516217cae42849a83b58a4072d4df0250aac0d5c704cba400cc7a2b7f", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_osxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-osxx86-64.zip", sha256 = "85c1840acbb9592776e788cf352c64f0ceaa2f17167290211940c0e6f6affe12", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_windowsx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-windowsx86-64static.zip", sha256 = "c53615899910ae011f21824ec0cbfb462d0ad8a8630ddef9576674bfa6238d32", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_linuxx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-linuxx86-64static.zip", sha256 = "414c15f0fcc21ef814a515af73319284193817784766e963bf548ea088c32912", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_osxx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-osxx86-64static.zip", sha256 = "598281e2232aa2adfa56a64359e2c26fde8ac211fac2e76ef8bb28ce7875759c", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_headers", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-headers.zip", sha256 = "0c5abbef3b75a0c628a25fd5c5f014d1fd13f4e6f9a142e3c44fdcc7ce3ee5a2", build_file_content = cc_library_headers, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_sources", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-sources.zip", sha256 = "e4c046e19b1aef915f501dcfc7944abd608412d080c064d788610f5a470d0a28", build_file_content = cc_library_sources, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cscore_cscore-cpp_linuxathena", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-linuxathena.zip", sha256 = "382221f7ba2942cf74e96a56a3a2d8d2a581ff1a187d4fdc26970520ffa36eaf", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cscore_cscore-cpp_linuxathenastatic", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-linuxathenastatic.zip", sha256 = "98889140f84057385ca8263405ade9b11a552ca3bacbbaa327f32515d16e0bec", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cscore_cscore-cpp_windowsx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-windowsx86-64.zip", sha256 = "d5bbb852db8ba3345495bbd1fe865f3d650a13349a1d0fb8c401de702bc1206f", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cscore_cscore-cpp_linuxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-linuxx86-64.zip", sha256 = "ed33579479ed14b317995507782a35a18c49569705d72f5118004093c6b9a7ae", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cscore_cscore-cpp_osxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-osxx86-64.zip", sha256 = "bb2fd292aeb59e3c05b495cdf3889885601fc1de5520597b779dd1bc90976db9", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cscore_cscore-cpp_windowsx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-windowsx86-64static.zip", sha256 = "be3c019597b8787c05d0c0c82096466a00d622e8bc8e1cb58569dfff28ab66d3", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cscore_cscore-cpp_linuxx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-linuxx86-64static.zip", sha256 = "dde2724d4c88fe659aea7b855ae4ab55105963c2a2f5db6ebca93f6f49b89a42", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cscore_cscore-cpp_osxx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-osxx86-64static.zip", sha256 = "47d3c6b7fae8808eda0c31a148890f43cbd7093b499d869bb48dece5ccb6c7f1", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cscore_cscore-cpp_headers", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-headers.zip", sha256 = "95d3cd2305e89dec7d82e6ece371d95b1786ac456ac6277f6a2746febeb73d1c", build_file_content = cc_library_headers, ) maybe( http_archive, "__bazelrio_edu_wpi_first_cscore_cscore-cpp_sources", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-sources.zip", sha256 = "ab6536f368e736c97edd79ed018a129549fa5cf9810b6bfd509a267fb17e594d", build_file_content = cc_library_sources, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_linuxathena", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-linuxathena.zip", sha256 = "475483064284e6922327b0d58bf3511ca4671f7b527d37a014217c995516d12c", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_linuxathenastatic", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-linuxathenastatic.zip", sha256 = "a70860defafb87cf2f09fe5a2495ae5d7332fe5de1a46c4832e06febfca3e3b1", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_windowsx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-windowsx86-64.zip", sha256 = "ed3a372a0ee57db77f9021f3494e52fdd36afeeb076211d37a4df438a299b3c9", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_linuxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-linuxx86-64.zip", sha256 = "4f60f242a3fc52aa409266ba9590c61bf6e4f52c88d2da863ef0d69fa0144de4", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_osxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-osxx86-64.zip", sha256 = "66ee7560050f7fd4465642da518d3e05088e5417b3d0fa4f715f14ec25b3b4f1", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_windowsx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-windowsx86-64static.zip", sha256 = "4257f7c892132c3253a3dc35afbf12323cd1fc715537278276e1a6db12b1c002", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_linuxx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-linuxx86-64static.zip", sha256 = "70276571e289259ebe07fbc68e1747f0623b86770bf847c6af3cdfc71b297478", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_osxx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-osxx86-64static.zip", sha256 = "60246184ac373a5d377008f80f9a49f1a1dd973cc7ca820b09af9dad80731d24", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_headers", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-headers.zip", sha256 = "9d5ab40d7dce760faaad3798c00844a1d2f1235695266edd5445934a8c3ecf7f", build_file_content = cc_library_headers, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_sources", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-sources.zip", sha256 = "cfb4874270dcefd3bffa021ecbc218ff4f21491665c8ce6dfe68aa3239c8f49d", build_file_content = cc_library_sources, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_linuxathena", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-linuxathena.zip", sha256 = "25f8e6c5eeaff7b8131d26b82fb6b7d790e1c69d794bd73397611f575decd9fe", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_linuxathenastatic", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-linuxathenastatic.zip", sha256 = "eab92c0b8828b775edfc8a56dc12cdfa9c847582ed9093022308fbec1f46b647", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_windowsx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-windowsx86-64.zip", sha256 = "623ebee022435a80c1d63ed6cc3f4f5086c156863714b924bc789881af5effaf", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_linuxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-linuxx86-64.zip", sha256 = "67a59105f1e279035197221c4512eb746a92cc830af3eb918ea2e8a48d0d557c", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_osxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-osxx86-64.zip", sha256 = "22e3d809e7509690c9147f9c43ef8ba4a1acc52ac7b020a46ac96b55fc534f78", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_windowsx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-windowsx86-64static.zip", sha256 = "fb3deee37a2e9e9157f3ae4fe9631cee54f776081be601e8da8f3dca9ad0e578", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_linuxx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-linuxx86-64static.zip", sha256 = "f7f3af6846e0ceaa334b9332802c6b02d6e3ecc471f163ec78e53d4a3f1a15e8", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_osxx86-64static", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-osxx86-64static.zip", sha256 = "d035191b46d152d1406337394138c989cd1ebcc11eb15ad407ac234ba64d5789", build_file_content = cc_library_static, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_headers", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-headers.zip", sha256 = "136f1a8bfc41e903cb63d20cc03754db505a1ebba6c0e1ab498e31632f28f154", build_file_content = cc_library_headers, ) maybe( http_archive, "__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_sources", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-sources.zip", sha256 = "13de71a91d7ad1a1c1ed8ae900ddba97f279174c3a82ab5c277cda6eccf2585f", build_file_content = cc_library_sources, ) maybe( http_archive, "__bazelrio_edu_wpi_first_halsim_halsim_ds_socket_windowsx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_ds_socket/2022.1.1-beta-1/halsim_ds_socket-2022.1.1-beta-1-windowsx86-64.zip", sha256 = "8b41bd26ca874ff3d6d7d4bf34ae54d6dfe763b0611d6a25d1cdf82db4d65b55", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_halsim_halsim_ds_socket_linuxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_ds_socket/2022.1.1-beta-1/halsim_ds_socket-2022.1.1-beta-1-linuxx86-64.zip", sha256 = "aa8015098b6e3dcb71edf8a3bfb2aab92f1e0360b4045538f15592ead24cf2e6", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_halsim_halsim_ds_socket_osxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_ds_socket/2022.1.1-beta-1/halsim_ds_socket-2022.1.1-beta-1-osxx86-64.zip", sha256 = "dc4a908e576ac0af2ea0ac4147da13ce541ef114b90183823057bab7506e8d8c", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_halsim_halsim_gui_windowsx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_gui/2022.1.1-beta-1/halsim_gui-2022.1.1-beta-1-windowsx86-64.zip", sha256 = "2eea12aeafe46a57589533eedd8693f8e15ec973c68001ec78b14c9744f56fd7", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_halsim_halsim_gui_linuxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_gui/2022.1.1-beta-1/halsim_gui-2022.1.1-beta-1-linuxx86-64.zip", sha256 = "da89913dd83ccaefb65ce3056cecb2ccd6a01cf1b3fbe8ceb868b8eeb2a93e43", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_halsim_halsim_gui_osxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_gui/2022.1.1-beta-1/halsim_gui-2022.1.1-beta-1-osxx86-64.zip", sha256 = "57c6614f08b60a1a1274b293cdf559166b7725b0079b5f3a81c828e65938b52b", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_halsim_halsim_ws_client_windowsx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_ws_client/2022.1.1-beta-1/halsim_ws_client-2022.1.1-beta-1-windowsx86-64.zip", sha256 = "38e14c93b68d118ea1d5ca963ca44d2564ce6a0182c345b6e46a17e033c34cd9", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_halsim_halsim_ws_client_linuxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_ws_client/2022.1.1-beta-1/halsim_ws_client-2022.1.1-beta-1-linuxx86-64.zip", sha256 = "574a865b137ee07259b0320b0b9bb4f173afd14e08c232a98fac67a2e2698c82", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_halsim_halsim_ws_client_osxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_ws_client/2022.1.1-beta-1/halsim_ws_client-2022.1.1-beta-1-osxx86-64.zip", sha256 = "95884c7e85aa2abfce610036a76f18dd29a91e12eef59c6f9dad08ac137aab4d", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_halsim_halsim_ws_server_windowsx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_ws_server/2022.1.1-beta-1/halsim_ws_server-2022.1.1-beta-1-windowsx86-64.zip", sha256 = "a32abc69d6672cdc6ea0c91369aea67db4d1658762d040a5e6fe8e095562e919", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_halsim_halsim_ws_server_linuxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_ws_server/2022.1.1-beta-1/halsim_ws_server-2022.1.1-beta-1-linuxx86-64.zip", sha256 = "04df8fb4270e877569e5fe5e180ab00f7f9b4b9e79007edfb1e7e4a8bc7eb48a", build_file_content = cc_library_shared, ) maybe( http_archive, "__bazelrio_edu_wpi_first_halsim_halsim_ws_server_osxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_ws_server/2022.1.1-beta-1/halsim_ws_server-2022.1.1-beta-1-osxx86-64.zip", sha256 = "838d001c5a43d6a1d8e1fd30501879d301d953e8ab9ca1727fcb3b0887ab6e58", build_file_content = cc_library_shared, ) maybe( jvm_maven_import_external, name = "__bazelrio_edu_wpi_first_shuffleboard_api", artifact = "edu.wpi.first.shuffleboard:api:2022.1.1-beta-1", artifact_sha256 = "9c6376870f388fec8888eb0e50c04b3047633c83837132279d665be261a84bc6", server_urls = ["https://frcmaven.wpi.edu/release"], ) maybe( jvm_maven_import_external, name = "__bazelrio_edu_wpi_first_wpilibj_wpilibj-java", artifact = "edu.wpi.first.wpilibj:wpilibj-java:2022.1.1-beta-1", artifact_sha256 = "ef4869b33ad1ec3c1c29b805bf6ac952495ef28f4affd0038f0e8435f4f7e76f", server_urls = ["https://frcmaven.wpi.edu/release"], ) maybe( jvm_maven_import_external, name = "__bazelrio_edu_wpi_first_hal_hal-java", artifact = "edu.wpi.first.hal:hal-java:2022.1.1-beta-1", artifact_sha256 = "dff7d3775ec7c9483a3680b40545b021f57840b71575ae373e28a7dba6f0b696", server_urls = ["https://frcmaven.wpi.edu/release"], ) maybe( jvm_maven_import_external, name = "__bazelrio_edu_wpi_first_wpiutil_wpiutil-java", artifact = "edu.wpi.first.wpiutil:wpiutil-java:2022.1.1-beta-1", artifact_sha256 = "84f951c38694c81d29470b69e76eb3812cc25f50733136ca13ce06a68edea96b", server_urls = ["https://frcmaven.wpi.edu/release"], ) maybe( jvm_maven_import_external, name = "__bazelrio_edu_wpi_first_ntcore_ntcore-java", artifact = "edu.wpi.first.ntcore:ntcore-java:2022.1.1-beta-1", artifact_sha256 = "c06b743e2e12690a0e5c7cf34ade839d46091f5ecad5617c544173baa5bacaa2", server_urls = ["https://frcmaven.wpi.edu/release"], ) maybe( jvm_maven_import_external, name = "__bazelrio_edu_wpi_first_wpimath_wpimath-java", artifact = "edu.wpi.first.wpimath:wpimath-java:2022.1.1-beta-1", artifact_sha256 = "5c5889793fb13bdf2e5381d08ddea6e0cc932d8b401c01d9cb8a03de71a91678", server_urls = ["https://frcmaven.wpi.edu/release"], ) maybe( jvm_maven_import_external, name = "__bazelrio_edu_wpi_first_cameraserver_cameraserver-java", artifact = "edu.wpi.first.cameraserver:cameraserver-java:2022.1.1-beta-1", artifact_sha256 = "31006372443254e750a5effb2e89288e928b6009a2a7675da9ccee874bd8246d", server_urls = ["https://frcmaven.wpi.edu/release"], ) maybe( jvm_maven_import_external, name = "__bazelrio_edu_wpi_first_cscore_cscore-java", artifact = "edu.wpi.first.cscore:cscore-java:2022.1.1-beta-1", artifact_sha256 = "23a0c922dbd6e3a5a7af528afa13d19419aa1d47b808a3ea3b101a1030ad0073", server_urls = ["https://frcmaven.wpi.edu/release"], ) maybe( jvm_maven_import_external, name = "__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-java", artifact = "edu.wpi.first.wpilibOldCommands:wpilibOldCommands-java:2022.1.1-beta-1", artifact_sha256 = "81dea5a894326acca1891473dbc1adec0b66ef94e45778799a566bfe9b7c7f6d", server_urls = ["https://frcmaven.wpi.edu/release"], ) maybe( jvm_maven_import_external, name = "__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-java", artifact = "edu.wpi.first.wpilibNewCommands:wpilibNewCommands-java:2022.1.1-beta-1", artifact_sha256 = "3842455781a71aa340468163e911b166573e966c7d5fbfd46e8091909b96e326", server_urls = ["https://frcmaven.wpi.edu/release"], ) maybe( http_jar, name = "__bazelrio_edu_wpi_first_tools_smartdashboard_linux64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/tools/SmartDashboard/2022.1.1-beta-1/SmartDashboard-2022.1.1-beta-1-linux64.jar", sha256 = "fb421832c106f6f9ebe1f33e196245f045da3d98492b3a68cabc93c16099e330", ) maybe( http_jar, name = "__bazelrio_edu_wpi_first_tools_smartdashboard_mac64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/tools/SmartDashboard/2022.1.1-beta-1/SmartDashboard-2022.1.1-beta-1-mac64.jar", sha256 = "55d6f7981c28e41a79f081918184ad3f238ae99364fc7761de66a122bd32ee47", ) maybe( http_jar, name = "__bazelrio_edu_wpi_first_tools_smartdashboard_win64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/tools/SmartDashboard/2022.1.1-beta-1/SmartDashboard-2022.1.1-beta-1-win64.jar", sha256 = "afc725e395bb97d71e12ee89aeac22bd3f5afec724e69f24dedd2e8fc8e6622b", ) maybe( http_jar, name = "__bazelrio_edu_wpi_first_tools_pathweaver_linux64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/tools/PathWeaver/2022.1.1-beta-1/PathWeaver-2022.1.1-beta-1-linux64.jar", sha256 = "e28f067e874772780ce6760b1376a78112cc021ec1eef906e55fe98881fe0d29", ) maybe( http_jar, name = "__bazelrio_edu_wpi_first_tools_pathweaver_mac64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/tools/PathWeaver/2022.1.1-beta-1/PathWeaver-2022.1.1-beta-1-mac64.jar", sha256 = "33dda4aee5c592ce56504875628553b0c1a69ef3fc6bb51ecff111a363866cda", ) maybe( http_jar, name = "__bazelrio_edu_wpi_first_tools_pathweaver_win64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/tools/PathWeaver/2022.1.1-beta-1/PathWeaver-2022.1.1-beta-1-win64.jar", sha256 = "6a5058800532570a027de9c70f686223880296974820b736a09889755f9fecc7", ) maybe( http_jar, name = "__bazelrio_edu_wpi_first_tools_robotbuilder", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/tools/RobotBuilder/2022.1.1-beta-1/RobotBuilder-2022.1.1-beta-1.jar", sha256 = "d431daca5c2c24ddd0a147826b13fb0dfdfc89f3862b9bbda60d0bdecd188e0a", ) maybe( http_jar, name = "__bazelrio_edu_wpi_first_shuffleboard_shuffleboard_linux64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/shuffleboard/shuffleboard/2022.1.1-beta-1/shuffleboard-2022.1.1-beta-1-linux64.jar", sha256 = "4c2862156bf207c87d5463b54a5745383086712903eb8c0b53b5fa268881b5ed", ) maybe( http_jar, name = "__bazelrio_edu_wpi_first_shuffleboard_shuffleboard_mac64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/shuffleboard/shuffleboard/2022.1.1-beta-1/shuffleboard-2022.1.1-beta-1-mac64.jar", sha256 = "a28e1b869c9d7baeb4c1775e485147c4fb586b0fbc61da79ecdea93af57b7408", ) maybe( http_jar, name = "__bazelrio_edu_wpi_first_shuffleboard_shuffleboard_win64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/shuffleboard/shuffleboard/2022.1.1-beta-1/shuffleboard-2022.1.1-beta-1-win64.jar", sha256 = "3271f09fc3f990964a402b47cdc1c08c1219fe01cb59d33fb9742b2e069fbf9c", ) maybe( http_archive, name = "__bazelrio_edu_wpi_first_tools_glass_windowsx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/tools/Glass/2022.1.1-beta-1/Glass-2022.1.1-beta-1-windowsx86-64.zip", sha256 = "61b5d458f06afb4db00e37182c26899f3cc0d94d7831cb0b6a071dca7bf136c8", build_file_content = "filegroup(name='all', srcs=glob(['**']), visibility=['//visibility:public'])", ) maybe( http_archive, name = "__bazelrio_edu_wpi_first_tools_glass_linuxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/tools/Glass/2022.1.1-beta-1/Glass-2022.1.1-beta-1-linuxx86-64.zip", sha256 = "2f0e3deacc8ee86906a2b40d37d11766397103aa8e211bfbcc8adf5803b848bd", build_file_content = "filegroup(name='all', srcs=glob(['**']), visibility=['//visibility:public'])", ) maybe( http_archive, name = "__bazelrio_edu_wpi_first_tools_glass_osxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/tools/Glass/2022.1.1-beta-1/Glass-2022.1.1-beta-1-osxx86-64.zip", sha256 = "798928072fb1210984cc4f891567d4595080a0d009c4704065ccb0b054830773", build_file_content = "filegroup(name='all', srcs=glob(['**']), visibility=['//visibility:public'])", ) maybe( http_archive, name = "__bazelrio_edu_wpi_first_tools_outlineviewer_windowsx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/tools/OutlineViewer/2022.1.1-beta-1/OutlineViewer-2022.1.1-beta-1-windowsx86-64.zip", sha256 = "b9c80208ce59344b2170f49c37bf69e90c29161921a302398643949614a7d7d7", build_file_content = "filegroup(name='all', srcs=glob(['**']), visibility=['//visibility:public'])", ) maybe( http_archive, name = "__bazelrio_edu_wpi_first_tools_outlineviewer_linuxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/tools/OutlineViewer/2022.1.1-beta-1/OutlineViewer-2022.1.1-beta-1-linuxx86-64.zip", sha256 = "99a7a29752d14caab11a0bd6fdb2e0aecf215ea0b5b52da9fa05336902e38c60", build_file_content = "filegroup(name='all', srcs=glob(['**']), visibility=['//visibility:public'])", ) maybe( http_archive, name = "__bazelrio_edu_wpi_first_tools_outlineviewer_osxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/tools/OutlineViewer/2022.1.1-beta-1/OutlineViewer-2022.1.1-beta-1-osxx86-64.zip", sha256 = "7d32f193cbbcb692ccfbba3edf582261dc40fed9cdfbde042f71933d84193161", build_file_content = "filegroup(name='all', srcs=glob(['**']), visibility=['//visibility:public'])", ) maybe( http_archive, name = "__bazelrio_edu_wpi_first_tools_sysid_windowsx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/tools/SysId/2022.1.1-beta-1/SysId-2022.1.1-beta-1-windowsx86-64.zip", sha256 = "4b417e19c18b38cc2d887db45ccdcc0511a1c9dc7b03146cb3d693e36abde912", build_file_content = "filegroup(name='all', srcs=glob(['**']), visibility=['//visibility:public'])", ) maybe( http_archive, name = "__bazelrio_edu_wpi_first_tools_sysid_linuxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/tools/SysId/2022.1.1-beta-1/SysId-2022.1.1-beta-1-linuxx86-64.zip", sha256 = "7d2eaebb9d465a58fa1684538508dd693431b7759462a6a445ab44655caadd8b", build_file_content = "filegroup(name='all', srcs=glob(['**']), visibility=['//visibility:public'])", ) maybe( http_archive, name = "__bazelrio_edu_wpi_first_tools_sysid_osxx86-64", url = "https://frcmaven.wpi.edu/release/edu/wpi/first/tools/SysId/2022.1.1-beta-1/SysId-2022.1.1-beta-1-osxx86-64.zip", sha256 = "001ed38d1aa29828a717cfb5a041e3d5ed899cc3bd4ba38bac965f19bc0e221b", build_file_content = "filegroup(name='all', srcs=glob(['**']), visibility=['//visibility:public'])", )
load('@bazel_tools//tools/build_defs/repo:http.bzl', 'http_archive', 'http_jar') load('@bazel_tools//tools/build_defs/repo:jvm.bzl', 'jvm_maven_import_external') load('@bazel_tools//tools/build_defs/repo:utils.bzl', 'maybe') load('@bazelrio//:deps_utils.bzl', 'cc_library_headers', 'cc_library_shared', 'cc_library_sources', 'cc_library_static') def setup_wpilib_2022_1_1_beta_1_dependencies(): maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_linuxathena', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-linuxathena.zip', sha256='c926798f365dcb52f8da4b3aa16d2b712a0b180e71990dab9013c53cb51ec8c9', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_linuxathenastatic', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-linuxathenastatic.zip', sha256='134d58c2d76ee9fc57f2e8c69b3f937175d98b9f33cd7b2f11504f2b16ca57a0', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_windowsx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-windowsx86-64.zip', sha256='634688e85581e4067213b8578b8f1368aada728e2f894f7ac0460e60390dc3a6', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_linuxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-linuxx86-64.zip', sha256='9cccf85bd6d0a576174d2bc352eda5f46fbba2878ff74a33711f99c21d0e3467', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_osxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-osxx86-64.zip', sha256='042f30b8ff66f862868df5557d38b1518f85641ad3b824b13e5804137da0955e', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_windowsx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-windowsx86-64static.zip', sha256='19076d7738bdcf3351286750abcd63cf3b9be3ae094975c1a44212d618ffdd93', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_linuxx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-linuxx86-64static.zip', sha256='c1a67b54dece57acefc92a888f85320b1623fa1d3e55b6b36721841c0a0c8926', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_osxx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-osxx86-64static.zip', sha256='88834ad637e9c7a3b92c1dca72a7a18b00f67e711ab4e51125bfff44996c5331', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_headers', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-headers.zip', sha256='ee96572633364a858348ecfd781a54a915ec44e61ff66c74d115dc5a25667788', build_file_content=cc_library_headers) maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibc_wpilibc-cpp_sources', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibc/wpilibc-cpp/2022.1.1-beta-1/wpilibc-cpp-2022.1.1-beta-1-sources.zip', sha256='3811ded44c6350f51047b115a50c713fdeb81e68f47b6fb0c17131117e7d9f9b', build_file_content=cc_library_sources) maybe(http_archive, '__bazelrio_edu_wpi_first_hal_hal-cpp_linuxathena', url='https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-linuxathena.zip', sha256='ccb9f76f81afde7100eee4940a19d5ccd5cba8a558570b9a1f1a051430a6d262', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_hal_hal-cpp_linuxathenastatic', url='https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-linuxathenastatic.zip', sha256='9711645efa98f61a9634ce2bd68a1aae56bcfcd9944b8ada2bd7564480f5d66e', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_hal_hal-cpp_windowsx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-windowsx86-64.zip', sha256='2ac30bba83f507dfa4b63bb9605153a5f40b95d4f17ae91229c96fe9ea0cd4ac', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_hal_hal-cpp_linuxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-linuxx86-64.zip', sha256='da54ece30b3d429f1a6263b90a316e9ab4f891176412704be9825225e39afaf3', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_hal_hal-cpp_osxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-osxx86-64.zip', sha256='8299fbc2e2ac770deabf4c6cd37cfa1a8efef9fd700a3f2ca99d7e1c6a6ec40d', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_hal_hal-cpp_windowsx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-windowsx86-64static.zip', sha256='217867fabddf6331c0aa950431e3d2c6430f8afee5754736a96c904431abc557', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_hal_hal-cpp_linuxx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-linuxx86-64static.zip', sha256='c090c7a22f179b0987fec03f603656b1ec5ce1666ba4c70ef8473a9a7803a075', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_hal_hal-cpp_osxx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-osxx86-64static.zip', sha256='0386e15436bd22dffb4e18829c0bc58c19d7520512bc7c9af92b494ef33f41ce', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_hal_hal-cpp_headers', url='https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-headers.zip', sha256='a4f8a16b4082577733d10ba420fcae5174ceaec7f42260fb60197fb317f89335', build_file_content=cc_library_headers) maybe(http_archive, '__bazelrio_edu_wpi_first_hal_hal-cpp_sources', url='https://frcmaven.wpi.edu/release/edu/wpi/first/hal/hal-cpp/2022.1.1-beta-1/hal-cpp-2022.1.1-beta-1-sources.zip', sha256='8913794392a9a8a33577f454e0ad055f9985d9b54dc7857e06b85fc2944d5de7', build_file_content=cc_library_sources) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_linuxathena', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-linuxathena.zip', sha256='0959646557ae65cc3be8894ee8d39beb7c951ffd6be993ab58c709851069bdf3', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_linuxathenastatic', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-linuxathenastatic.zip', sha256='1fb70cd539e29463bb468a5fd4f8342fdbfd51fbe123abb3183eeb69ba18831b', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_windowsx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-windowsx86-64.zip', sha256='cc10bb439a75f6d97f89761ed27cc1df12dffd330d6fc052383a21d8a9575ffb', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_linuxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-linuxx86-64.zip', sha256='fcfc83f420f57549d1f8068edd1e1182f2c5bc7562caca6129326ba116621d5d', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_osxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-osxx86-64.zip', sha256='4dfff5233bb7b0b8ea3c4b9eefc31d0c17fd0962ffaf785ec87305bd6b55e5da', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_windowsx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-windowsx86-64static.zip', sha256='3c54a5440519e4001fdd3e3e4c7f4a5c9cc26c7a4d6910bc0a5b66e5fa4459be', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_linuxx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-linuxx86-64static.zip', sha256='099125e210b1a3ddcd1854bbfa236dbe6477dd1bd6ed7dcc1c95f12b0e212a61', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_osxx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-osxx86-64static.zip', sha256='fbf604a990af907944923157c20d33d3bc2050cf40a719abdd3c14344e69f4b2', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_headers', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-headers.zip', sha256='6efa9420ef875cd69a4d3d55ebfde2b9ed0ed2bd61db9811dcb2e274b0ae56d8', build_file_content=cc_library_headers) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiutil_wpiutil-cpp_sources', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpiutil/wpiutil-cpp/2022.1.1-beta-1/wpiutil-cpp-2022.1.1-beta-1-sources.zip', sha256='ed55b6ea290b075a9a7f1c94852a50c1a5e28ce3e01d3cab713811eeca03803d', build_file_content=cc_library_sources) maybe(http_archive, '__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_linuxathena', url='https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-linuxathena.zip', sha256='099448b290666ca9d594e28fb21c5b4d199b31669d61d8d26b7b837245f74dc3', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_linuxathenastatic', url='https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-linuxathenastatic.zip', sha256='aad15ca5bd6976730465ba1896f07576529e8384a2a3740ab60345a430ff0bb3', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_windowsx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-windowsx86-64.zip', sha256='389018e731f998c8fe2ce42e80cf2eae60935a386d3c40af54f7cf9159e9a70e', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_linuxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-linuxx86-64.zip', sha256='98483d6dea79148389d25ce0ece2ea474d43a041d39aaaf3998bc51a2b109b53', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_osxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-osxx86-64.zip', sha256='07989a5109f6aab4fab038fb36b25511b965d0179bdcf7ba13b6d200d77592e4', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_windowsx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-windowsx86-64static.zip', sha256='c0acb88ac54d06cebba5374aa6ef10ba9f4f6019c1352718c5d8ce70232a55d6', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_linuxx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-linuxx86-64static.zip', sha256='5b3623a3f6d87f33d98cec7d6e6a7bb1983bf43f1056d9983fbb4c15d269821a', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_osxx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-osxx86-64static.zip', sha256='765bdd0196a487125b4076dd5eaabfaf2c4a0e37391a975592c3d141e7ae39e0', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_headers', url='https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-headers.zip', sha256='403322df2c7637bc0c47e5437d4fea678962375989149f5ae6ecf81810b80d67', build_file_content=cc_library_headers) maybe(http_archive, '__bazelrio_edu_wpi_first_ntcore_ntcore-cpp_sources', url='https://frcmaven.wpi.edu/release/edu/wpi/first/ntcore/ntcore-cpp/2022.1.1-beta-1/ntcore-cpp-2022.1.1-beta-1-sources.zip', sha256='db0e677a833054cccb0df6eefcad8888970f2b9c65a7b0c6211ce1969c32acb2', build_file_content=cc_library_sources) maybe(http_archive, '__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_linuxathena', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-linuxathena.zip', sha256='86090d1cde7a10662abb7e163f5920e743ca0210a72691f3edaaa7501bd7381a', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_linuxathenastatic', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-linuxathenastatic.zip', sha256='b4d6c1a57c398dd131baa5632e66257d139c22620b31637abfb9cb2eec641fa2', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_windowsx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-windowsx86-64.zip', sha256='064beaffc16feee23c01a868cfc6b548537badc5332a0cc753f5714dedb0f6d3', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_linuxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-linuxx86-64.zip', sha256='403826a614ed8a46720b52f89d8d337ce6cc89c55bddde29667af65b7f1d9d79', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_osxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-osxx86-64.zip', sha256='e89d7504bea9ae7007bc80b13d595451e2486f449dd3c1878783000dcc95fc80', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_windowsx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-windowsx86-64static.zip', sha256='48ebd0fe7e162ac5a624055768e07237278885657697e8533cad5bd8656b5373', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_linuxx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-linuxx86-64static.zip', sha256='6c224639a477f789cc4198022bf07014ccd28a7643025e8bcd8157d300d42753', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_osxx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-osxx86-64static.zip', sha256='3737e59c8c0d70b3926426f3fba0c3f7c9275d5c6dbaf68708631578de6ff8a1', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_headers', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-headers.zip', sha256='5dfd502ac49fc6f0fa33727b2078389ac3616ee995b9878b34d85e07d908ed0a', build_file_content=cc_library_headers) maybe(http_archive, '__bazelrio_edu_wpi_first_wpimath_wpimath-cpp_sources', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpimath/wpimath-cpp/2022.1.1-beta-1/wpimath-cpp-2022.1.1-beta-1-sources.zip', sha256='edaf77f5ee765213fac1c39169c8cf7568cf6a0e1fe1841cea56385f10a4483a', build_file_content=cc_library_sources) maybe(http_archive, '__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_linuxathena', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-linuxathena.zip', sha256='47885af110d9faca20b952fcb952563ba0aef3dd7aab9b9693712d63b96f46a3', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_linuxathenastatic', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-linuxathenastatic.zip', sha256='ed2ba5e2be2542de80ae974f29b47e9a788184425497e88b65ca6525d3ea0ce0', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_windowsx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-windowsx86-64.zip', sha256='1a2860600a2265578b5eb4ee04bf54286fd6a853a46821d299e40d2828fd5162', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_linuxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-linuxx86-64.zip', sha256='5f6e5dd516217cae42849a83b58a4072d4df0250aac0d5c704cba400cc7a2b7f', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_osxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-osxx86-64.zip', sha256='85c1840acbb9592776e788cf352c64f0ceaa2f17167290211940c0e6f6affe12', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_windowsx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-windowsx86-64static.zip', sha256='c53615899910ae011f21824ec0cbfb462d0ad8a8630ddef9576674bfa6238d32', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_linuxx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-linuxx86-64static.zip', sha256='414c15f0fcc21ef814a515af73319284193817784766e963bf548ea088c32912', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_osxx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-osxx86-64static.zip', sha256='598281e2232aa2adfa56a64359e2c26fde8ac211fac2e76ef8bb28ce7875759c', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_headers', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-headers.zip', sha256='0c5abbef3b75a0c628a25fd5c5f014d1fd13f4e6f9a142e3c44fdcc7ce3ee5a2', build_file_content=cc_library_headers) maybe(http_archive, '__bazelrio_edu_wpi_first_cameraserver_cameraserver-cpp_sources', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cameraserver/cameraserver-cpp/2022.1.1-beta-1/cameraserver-cpp-2022.1.1-beta-1-sources.zip', sha256='e4c046e19b1aef915f501dcfc7944abd608412d080c064d788610f5a470d0a28', build_file_content=cc_library_sources) maybe(http_archive, '__bazelrio_edu_wpi_first_cscore_cscore-cpp_linuxathena', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-linuxathena.zip', sha256='382221f7ba2942cf74e96a56a3a2d8d2a581ff1a187d4fdc26970520ffa36eaf', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_cscore_cscore-cpp_linuxathenastatic', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-linuxathenastatic.zip', sha256='98889140f84057385ca8263405ade9b11a552ca3bacbbaa327f32515d16e0bec', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_cscore_cscore-cpp_windowsx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-windowsx86-64.zip', sha256='d5bbb852db8ba3345495bbd1fe865f3d650a13349a1d0fb8c401de702bc1206f', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_cscore_cscore-cpp_linuxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-linuxx86-64.zip', sha256='ed33579479ed14b317995507782a35a18c49569705d72f5118004093c6b9a7ae', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_cscore_cscore-cpp_osxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-osxx86-64.zip', sha256='bb2fd292aeb59e3c05b495cdf3889885601fc1de5520597b779dd1bc90976db9', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_cscore_cscore-cpp_windowsx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-windowsx86-64static.zip', sha256='be3c019597b8787c05d0c0c82096466a00d622e8bc8e1cb58569dfff28ab66d3', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_cscore_cscore-cpp_linuxx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-linuxx86-64static.zip', sha256='dde2724d4c88fe659aea7b855ae4ab55105963c2a2f5db6ebca93f6f49b89a42', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_cscore_cscore-cpp_osxx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-osxx86-64static.zip', sha256='47d3c6b7fae8808eda0c31a148890f43cbd7093b499d869bb48dece5ccb6c7f1', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_cscore_cscore-cpp_headers', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-headers.zip', sha256='95d3cd2305e89dec7d82e6ece371d95b1786ac456ac6277f6a2746febeb73d1c', build_file_content=cc_library_headers) maybe(http_archive, '__bazelrio_edu_wpi_first_cscore_cscore-cpp_sources', url='https://frcmaven.wpi.edu/release/edu/wpi/first/cscore/cscore-cpp/2022.1.1-beta-1/cscore-cpp-2022.1.1-beta-1-sources.zip', sha256='ab6536f368e736c97edd79ed018a129549fa5cf9810b6bfd509a267fb17e594d', build_file_content=cc_library_sources) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_linuxathena', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-linuxathena.zip', sha256='475483064284e6922327b0d58bf3511ca4671f7b527d37a014217c995516d12c', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_linuxathenastatic', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-linuxathenastatic.zip', sha256='a70860defafb87cf2f09fe5a2495ae5d7332fe5de1a46c4832e06febfca3e3b1', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_windowsx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-windowsx86-64.zip', sha256='ed3a372a0ee57db77f9021f3494e52fdd36afeeb076211d37a4df438a299b3c9', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_linuxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-linuxx86-64.zip', sha256='4f60f242a3fc52aa409266ba9590c61bf6e4f52c88d2da863ef0d69fa0144de4', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_osxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-osxx86-64.zip', sha256='66ee7560050f7fd4465642da518d3e05088e5417b3d0fa4f715f14ec25b3b4f1', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_windowsx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-windowsx86-64static.zip', sha256='4257f7c892132c3253a3dc35afbf12323cd1fc715537278276e1a6db12b1c002', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_linuxx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-linuxx86-64static.zip', sha256='70276571e289259ebe07fbc68e1747f0623b86770bf847c6af3cdfc71b297478', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_osxx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-osxx86-64static.zip', sha256='60246184ac373a5d377008f80f9a49f1a1dd973cc7ca820b09af9dad80731d24', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_headers', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-headers.zip', sha256='9d5ab40d7dce760faaad3798c00844a1d2f1235695266edd5445934a8c3ecf7f', build_file_content=cc_library_headers) maybe(http_archive, '__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-cpp_sources', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibOldCommands/wpilibOldCommands-cpp/2022.1.1-beta-1/wpilibOldCommands-cpp-2022.1.1-beta-1-sources.zip', sha256='cfb4874270dcefd3bffa021ecbc218ff4f21491665c8ce6dfe68aa3239c8f49d', build_file_content=cc_library_sources) maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_linuxathena', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-linuxathena.zip', sha256='25f8e6c5eeaff7b8131d26b82fb6b7d790e1c69d794bd73397611f575decd9fe', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_linuxathenastatic', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-linuxathenastatic.zip', sha256='eab92c0b8828b775edfc8a56dc12cdfa9c847582ed9093022308fbec1f46b647', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_windowsx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-windowsx86-64.zip', sha256='623ebee022435a80c1d63ed6cc3f4f5086c156863714b924bc789881af5effaf', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_linuxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-linuxx86-64.zip', sha256='67a59105f1e279035197221c4512eb746a92cc830af3eb918ea2e8a48d0d557c', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_osxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-osxx86-64.zip', sha256='22e3d809e7509690c9147f9c43ef8ba4a1acc52ac7b020a46ac96b55fc534f78', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_windowsx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-windowsx86-64static.zip', sha256='fb3deee37a2e9e9157f3ae4fe9631cee54f776081be601e8da8f3dca9ad0e578', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_linuxx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-linuxx86-64static.zip', sha256='f7f3af6846e0ceaa334b9332802c6b02d6e3ecc471f163ec78e53d4a3f1a15e8', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_osxx86-64static', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-osxx86-64static.zip', sha256='d035191b46d152d1406337394138c989cd1ebcc11eb15ad407ac234ba64d5789', build_file_content=cc_library_static) maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_headers', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-headers.zip', sha256='136f1a8bfc41e903cb63d20cc03754db505a1ebba6c0e1ab498e31632f28f154', build_file_content=cc_library_headers) maybe(http_archive, '__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-cpp_sources', url='https://frcmaven.wpi.edu/release/edu/wpi/first/wpilibNewCommands/wpilibNewCommands-cpp/2022.1.1-beta-1/wpilibNewCommands-cpp-2022.1.1-beta-1-sources.zip', sha256='13de71a91d7ad1a1c1ed8ae900ddba97f279174c3a82ab5c277cda6eccf2585f', build_file_content=cc_library_sources) maybe(http_archive, '__bazelrio_edu_wpi_first_halsim_halsim_ds_socket_windowsx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_ds_socket/2022.1.1-beta-1/halsim_ds_socket-2022.1.1-beta-1-windowsx86-64.zip', sha256='8b41bd26ca874ff3d6d7d4bf34ae54d6dfe763b0611d6a25d1cdf82db4d65b55', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_halsim_halsim_ds_socket_linuxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_ds_socket/2022.1.1-beta-1/halsim_ds_socket-2022.1.1-beta-1-linuxx86-64.zip', sha256='aa8015098b6e3dcb71edf8a3bfb2aab92f1e0360b4045538f15592ead24cf2e6', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_halsim_halsim_ds_socket_osxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_ds_socket/2022.1.1-beta-1/halsim_ds_socket-2022.1.1-beta-1-osxx86-64.zip', sha256='dc4a908e576ac0af2ea0ac4147da13ce541ef114b90183823057bab7506e8d8c', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_halsim_halsim_gui_windowsx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_gui/2022.1.1-beta-1/halsim_gui-2022.1.1-beta-1-windowsx86-64.zip', sha256='2eea12aeafe46a57589533eedd8693f8e15ec973c68001ec78b14c9744f56fd7', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_halsim_halsim_gui_linuxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_gui/2022.1.1-beta-1/halsim_gui-2022.1.1-beta-1-linuxx86-64.zip', sha256='da89913dd83ccaefb65ce3056cecb2ccd6a01cf1b3fbe8ceb868b8eeb2a93e43', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_halsim_halsim_gui_osxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_gui/2022.1.1-beta-1/halsim_gui-2022.1.1-beta-1-osxx86-64.zip', sha256='57c6614f08b60a1a1274b293cdf559166b7725b0079b5f3a81c828e65938b52b', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_halsim_halsim_ws_client_windowsx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_ws_client/2022.1.1-beta-1/halsim_ws_client-2022.1.1-beta-1-windowsx86-64.zip', sha256='38e14c93b68d118ea1d5ca963ca44d2564ce6a0182c345b6e46a17e033c34cd9', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_halsim_halsim_ws_client_linuxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_ws_client/2022.1.1-beta-1/halsim_ws_client-2022.1.1-beta-1-linuxx86-64.zip', sha256='574a865b137ee07259b0320b0b9bb4f173afd14e08c232a98fac67a2e2698c82', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_halsim_halsim_ws_client_osxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_ws_client/2022.1.1-beta-1/halsim_ws_client-2022.1.1-beta-1-osxx86-64.zip', sha256='95884c7e85aa2abfce610036a76f18dd29a91e12eef59c6f9dad08ac137aab4d', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_halsim_halsim_ws_server_windowsx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_ws_server/2022.1.1-beta-1/halsim_ws_server-2022.1.1-beta-1-windowsx86-64.zip', sha256='a32abc69d6672cdc6ea0c91369aea67db4d1658762d040a5e6fe8e095562e919', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_halsim_halsim_ws_server_linuxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_ws_server/2022.1.1-beta-1/halsim_ws_server-2022.1.1-beta-1-linuxx86-64.zip', sha256='04df8fb4270e877569e5fe5e180ab00f7f9b4b9e79007edfb1e7e4a8bc7eb48a', build_file_content=cc_library_shared) maybe(http_archive, '__bazelrio_edu_wpi_first_halsim_halsim_ws_server_osxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/halsim/halsim_ws_server/2022.1.1-beta-1/halsim_ws_server-2022.1.1-beta-1-osxx86-64.zip', sha256='838d001c5a43d6a1d8e1fd30501879d301d953e8ab9ca1727fcb3b0887ab6e58', build_file_content=cc_library_shared) maybe(jvm_maven_import_external, name='__bazelrio_edu_wpi_first_shuffleboard_api', artifact='edu.wpi.first.shuffleboard:api:2022.1.1-beta-1', artifact_sha256='9c6376870f388fec8888eb0e50c04b3047633c83837132279d665be261a84bc6', server_urls=['https://frcmaven.wpi.edu/release']) maybe(jvm_maven_import_external, name='__bazelrio_edu_wpi_first_wpilibj_wpilibj-java', artifact='edu.wpi.first.wpilibj:wpilibj-java:2022.1.1-beta-1', artifact_sha256='ef4869b33ad1ec3c1c29b805bf6ac952495ef28f4affd0038f0e8435f4f7e76f', server_urls=['https://frcmaven.wpi.edu/release']) maybe(jvm_maven_import_external, name='__bazelrio_edu_wpi_first_hal_hal-java', artifact='edu.wpi.first.hal:hal-java:2022.1.1-beta-1', artifact_sha256='dff7d3775ec7c9483a3680b40545b021f57840b71575ae373e28a7dba6f0b696', server_urls=['https://frcmaven.wpi.edu/release']) maybe(jvm_maven_import_external, name='__bazelrio_edu_wpi_first_wpiutil_wpiutil-java', artifact='edu.wpi.first.wpiutil:wpiutil-java:2022.1.1-beta-1', artifact_sha256='84f951c38694c81d29470b69e76eb3812cc25f50733136ca13ce06a68edea96b', server_urls=['https://frcmaven.wpi.edu/release']) maybe(jvm_maven_import_external, name='__bazelrio_edu_wpi_first_ntcore_ntcore-java', artifact='edu.wpi.first.ntcore:ntcore-java:2022.1.1-beta-1', artifact_sha256='c06b743e2e12690a0e5c7cf34ade839d46091f5ecad5617c544173baa5bacaa2', server_urls=['https://frcmaven.wpi.edu/release']) maybe(jvm_maven_import_external, name='__bazelrio_edu_wpi_first_wpimath_wpimath-java', artifact='edu.wpi.first.wpimath:wpimath-java:2022.1.1-beta-1', artifact_sha256='5c5889793fb13bdf2e5381d08ddea6e0cc932d8b401c01d9cb8a03de71a91678', server_urls=['https://frcmaven.wpi.edu/release']) maybe(jvm_maven_import_external, name='__bazelrio_edu_wpi_first_cameraserver_cameraserver-java', artifact='edu.wpi.first.cameraserver:cameraserver-java:2022.1.1-beta-1', artifact_sha256='31006372443254e750a5effb2e89288e928b6009a2a7675da9ccee874bd8246d', server_urls=['https://frcmaven.wpi.edu/release']) maybe(jvm_maven_import_external, name='__bazelrio_edu_wpi_first_cscore_cscore-java', artifact='edu.wpi.first.cscore:cscore-java:2022.1.1-beta-1', artifact_sha256='23a0c922dbd6e3a5a7af528afa13d19419aa1d47b808a3ea3b101a1030ad0073', server_urls=['https://frcmaven.wpi.edu/release']) maybe(jvm_maven_import_external, name='__bazelrio_edu_wpi_first_wpiliboldcommands_wpiliboldcommands-java', artifact='edu.wpi.first.wpilibOldCommands:wpilibOldCommands-java:2022.1.1-beta-1', artifact_sha256='81dea5a894326acca1891473dbc1adec0b66ef94e45778799a566bfe9b7c7f6d', server_urls=['https://frcmaven.wpi.edu/release']) maybe(jvm_maven_import_external, name='__bazelrio_edu_wpi_first_wpilibnewcommands_wpilibnewcommands-java', artifact='edu.wpi.first.wpilibNewCommands:wpilibNewCommands-java:2022.1.1-beta-1', artifact_sha256='3842455781a71aa340468163e911b166573e966c7d5fbfd46e8091909b96e326', server_urls=['https://frcmaven.wpi.edu/release']) maybe(http_jar, name='__bazelrio_edu_wpi_first_tools_smartdashboard_linux64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/tools/SmartDashboard/2022.1.1-beta-1/SmartDashboard-2022.1.1-beta-1-linux64.jar', sha256='fb421832c106f6f9ebe1f33e196245f045da3d98492b3a68cabc93c16099e330') maybe(http_jar, name='__bazelrio_edu_wpi_first_tools_smartdashboard_mac64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/tools/SmartDashboard/2022.1.1-beta-1/SmartDashboard-2022.1.1-beta-1-mac64.jar', sha256='55d6f7981c28e41a79f081918184ad3f238ae99364fc7761de66a122bd32ee47') maybe(http_jar, name='__bazelrio_edu_wpi_first_tools_smartdashboard_win64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/tools/SmartDashboard/2022.1.1-beta-1/SmartDashboard-2022.1.1-beta-1-win64.jar', sha256='afc725e395bb97d71e12ee89aeac22bd3f5afec724e69f24dedd2e8fc8e6622b') maybe(http_jar, name='__bazelrio_edu_wpi_first_tools_pathweaver_linux64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/tools/PathWeaver/2022.1.1-beta-1/PathWeaver-2022.1.1-beta-1-linux64.jar', sha256='e28f067e874772780ce6760b1376a78112cc021ec1eef906e55fe98881fe0d29') maybe(http_jar, name='__bazelrio_edu_wpi_first_tools_pathweaver_mac64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/tools/PathWeaver/2022.1.1-beta-1/PathWeaver-2022.1.1-beta-1-mac64.jar', sha256='33dda4aee5c592ce56504875628553b0c1a69ef3fc6bb51ecff111a363866cda') maybe(http_jar, name='__bazelrio_edu_wpi_first_tools_pathweaver_win64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/tools/PathWeaver/2022.1.1-beta-1/PathWeaver-2022.1.1-beta-1-win64.jar', sha256='6a5058800532570a027de9c70f686223880296974820b736a09889755f9fecc7') maybe(http_jar, name='__bazelrio_edu_wpi_first_tools_robotbuilder', url='https://frcmaven.wpi.edu/release/edu/wpi/first/tools/RobotBuilder/2022.1.1-beta-1/RobotBuilder-2022.1.1-beta-1.jar', sha256='d431daca5c2c24ddd0a147826b13fb0dfdfc89f3862b9bbda60d0bdecd188e0a') maybe(http_jar, name='__bazelrio_edu_wpi_first_shuffleboard_shuffleboard_linux64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/shuffleboard/shuffleboard/2022.1.1-beta-1/shuffleboard-2022.1.1-beta-1-linux64.jar', sha256='4c2862156bf207c87d5463b54a5745383086712903eb8c0b53b5fa268881b5ed') maybe(http_jar, name='__bazelrio_edu_wpi_first_shuffleboard_shuffleboard_mac64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/shuffleboard/shuffleboard/2022.1.1-beta-1/shuffleboard-2022.1.1-beta-1-mac64.jar', sha256='a28e1b869c9d7baeb4c1775e485147c4fb586b0fbc61da79ecdea93af57b7408') maybe(http_jar, name='__bazelrio_edu_wpi_first_shuffleboard_shuffleboard_win64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/shuffleboard/shuffleboard/2022.1.1-beta-1/shuffleboard-2022.1.1-beta-1-win64.jar', sha256='3271f09fc3f990964a402b47cdc1c08c1219fe01cb59d33fb9742b2e069fbf9c') maybe(http_archive, name='__bazelrio_edu_wpi_first_tools_glass_windowsx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/tools/Glass/2022.1.1-beta-1/Glass-2022.1.1-beta-1-windowsx86-64.zip', sha256='61b5d458f06afb4db00e37182c26899f3cc0d94d7831cb0b6a071dca7bf136c8', build_file_content="filegroup(name='all', srcs=glob(['**']), visibility=['//visibility:public'])") maybe(http_archive, name='__bazelrio_edu_wpi_first_tools_glass_linuxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/tools/Glass/2022.1.1-beta-1/Glass-2022.1.1-beta-1-linuxx86-64.zip', sha256='2f0e3deacc8ee86906a2b40d37d11766397103aa8e211bfbcc8adf5803b848bd', build_file_content="filegroup(name='all', srcs=glob(['**']), visibility=['//visibility:public'])") maybe(http_archive, name='__bazelrio_edu_wpi_first_tools_glass_osxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/tools/Glass/2022.1.1-beta-1/Glass-2022.1.1-beta-1-osxx86-64.zip', sha256='798928072fb1210984cc4f891567d4595080a0d009c4704065ccb0b054830773', build_file_content="filegroup(name='all', srcs=glob(['**']), visibility=['//visibility:public'])") maybe(http_archive, name='__bazelrio_edu_wpi_first_tools_outlineviewer_windowsx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/tools/OutlineViewer/2022.1.1-beta-1/OutlineViewer-2022.1.1-beta-1-windowsx86-64.zip', sha256='b9c80208ce59344b2170f49c37bf69e90c29161921a302398643949614a7d7d7', build_file_content="filegroup(name='all', srcs=glob(['**']), visibility=['//visibility:public'])") maybe(http_archive, name='__bazelrio_edu_wpi_first_tools_outlineviewer_linuxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/tools/OutlineViewer/2022.1.1-beta-1/OutlineViewer-2022.1.1-beta-1-linuxx86-64.zip', sha256='99a7a29752d14caab11a0bd6fdb2e0aecf215ea0b5b52da9fa05336902e38c60', build_file_content="filegroup(name='all', srcs=glob(['**']), visibility=['//visibility:public'])") maybe(http_archive, name='__bazelrio_edu_wpi_first_tools_outlineviewer_osxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/tools/OutlineViewer/2022.1.1-beta-1/OutlineViewer-2022.1.1-beta-1-osxx86-64.zip', sha256='7d32f193cbbcb692ccfbba3edf582261dc40fed9cdfbde042f71933d84193161', build_file_content="filegroup(name='all', srcs=glob(['**']), visibility=['//visibility:public'])") maybe(http_archive, name='__bazelrio_edu_wpi_first_tools_sysid_windowsx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/tools/SysId/2022.1.1-beta-1/SysId-2022.1.1-beta-1-windowsx86-64.zip', sha256='4b417e19c18b38cc2d887db45ccdcc0511a1c9dc7b03146cb3d693e36abde912', build_file_content="filegroup(name='all', srcs=glob(['**']), visibility=['//visibility:public'])") maybe(http_archive, name='__bazelrio_edu_wpi_first_tools_sysid_linuxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/tools/SysId/2022.1.1-beta-1/SysId-2022.1.1-beta-1-linuxx86-64.zip', sha256='7d2eaebb9d465a58fa1684538508dd693431b7759462a6a445ab44655caadd8b', build_file_content="filegroup(name='all', srcs=glob(['**']), visibility=['//visibility:public'])") maybe(http_archive, name='__bazelrio_edu_wpi_first_tools_sysid_osxx86-64', url='https://frcmaven.wpi.edu/release/edu/wpi/first/tools/SysId/2022.1.1-beta-1/SysId-2022.1.1-beta-1-osxx86-64.zip', sha256='001ed38d1aa29828a717cfb5a041e3d5ed899cc3bd4ba38bac965f19bc0e221b', build_file_content="filegroup(name='all', srcs=glob(['**']), visibility=['//visibility:public'])")
class Display(object): @classmethod def getColumns(cls): raise NotImplementedError @classmethod def getRows(cls): raise NotImplementedError @classmethod def getRowText(cls, row): raise NotImplementedError def show(self): for i in range(int(self.getRows())): print(self.getRowText(i))
class Display(object): @classmethod def get_columns(cls): raise NotImplementedError @classmethod def get_rows(cls): raise NotImplementedError @classmethod def get_row_text(cls, row): raise NotImplementedError def show(self): for i in range(int(self.getRows())): print(self.getRowText(i))
def fact(a): if a<=1: return 1 return a*fact(a-1) a = int(input()) for i in range(a): n=int(input()) print(fact(n))
def fact(a): if a <= 1: return 1 return a * fact(a - 1) a = int(input()) for i in range(a): n = int(input()) print(fact(n))
''' package fitnesse.slim; import java.util.List; import fitnesse.util.ListUtility; ''' ''' Packs up a list into a serialized string using a special format. The list items must be strings, or lists. They will be recursively serialized. Format: [iiiiii:llllll:item...] All lists (including lists within lists) begin with [ and end with ]. After the [ is the 6 digit number of items in the list followed by a :. Then comes each item which is composed of a 6 digit length a : and then the value of the item followed by a :. ''' def serialize(data): return ListSerializer(data).serialize() class ListSerializer(object): def __init__(self, data): self.data = data self.result = '' ''' private StringBuffer result; private List<Object> list; public ListSerializer(List<Object> list) { this.list = list; result = new StringBuffer(); } public static String serialize(List<Object> list) { return new ListSerializer(list).serialize(); } ''' def serialize(self): self.result += '[' self.appendLength(len(self.data)) for o in self.data: s = self.marshalObjectToString(o) self.appendLength(len(s)) self.appendString(s) self.result += ']' return self.result ''' public String serialize() { result.append('['); appendLength(list.size()); for (Object o : list) { String s = marshalObjectToString(o); appendLength(s.length()); appendString(s); } result.append(']'); return result.toString(); } private String marshalObjectToString(Object o) { String s; if (o == null) s = "null"; else if (o instanceof String) s = (String) o; else if (o instanceof List) s = ListSerializer.serialize(ListUtility.uncheckedCast(Object.class, o)); else s = o.toString(); return s; } ''' def marshalObjectToString(self, o): s = '' if o == None: s = 'null' elif type(o) == str: s = o elif type(o) == list: s = serialize(o) return s ''' private void appendString(String s) { result.append(s).append(':'); } ''' def appendString(self, s): self.result += s + ':' ''' private void appendLength(int size) { result.append(String.format("%06d:", size)); } ''' def appendLength(self, size): self.result += "%06d:" % size ''' } '''
""" package fitnesse.slim; import java.util.List; import fitnesse.util.ListUtility; """ '\n Packs up a list into a serialized string using a special format. The list items must be strings, or lists.\n They will be recursively serialized.\n \n Format: [iiiiii:llllll:item...]\n All lists (including lists within lists) begin with [ and end with ]. After the [ is the 6 digit number of items\n in the list followed by a :. Then comes each item which is composed of a 6 digit length a : and then the value\n of the item followed by a :. \n' def serialize(data): return list_serializer(data).serialize() class Listserializer(object): def __init__(self, data): self.data = data self.result = '' '\n private StringBuffer result;\n private List<Object> list;\n\n public ListSerializer(List<Object> list) {\n this.list = list;\n result = new StringBuffer();\n }\n\n public static String serialize(List<Object> list) {\n return new ListSerializer(list).serialize();\n }\n' def serialize(self): self.result += '[' self.appendLength(len(self.data)) for o in self.data: s = self.marshalObjectToString(o) self.appendLength(len(s)) self.appendString(s) self.result += ']' return self.result '\n public String serialize() {\n result.append(\'[\');\n appendLength(list.size());\n\n for (Object o : list) {\n String s = marshalObjectToString(o);\n appendLength(s.length());\n appendString(s);\n }\n result.append(\']\');\n return result.toString();\n }\n\n private String marshalObjectToString(Object o) {\n String s;\n if (o == null)\n s = "null";\n else if (o instanceof String)\n s = (String) o;\n else if (o instanceof List)\n s = ListSerializer.serialize(ListUtility.uncheckedCast(Object.class, o));\n else\n s = o.toString();\n return s;\n }\n ' def marshal_object_to_string(self, o): s = '' if o == None: s = 'null' elif type(o) == str: s = o elif type(o) == list: s = serialize(o) return s "\n\n private void appendString(String s) {\n result.append(s).append(':');\n }\n " def append_string(self, s): self.result += s + ':' '\n\n private void appendLength(int size) {\n result.append(String.format("%06d:", size));\n }\n' def append_length(self, size): self.result += '%06d:' % size '\n}\n'
def selection_sort(array): N = len(array) for i in range(N): # Find the min element in the unsorted a[i .. N - 1] # Assume the min is the first element. minimum_element_index = i for j in range(i + 1, N): if (array[j] < array[minimum_element_index]): # Found a new minimum, remember its index. minimum_element_index = j if (minimum_element_index != i): # Move minimum element to the "front" or "left". array[i], array[minimum_element_index] = \ array[minimum_element_index], array[i] return array
def selection_sort(array): n = len(array) for i in range(N): minimum_element_index = i for j in range(i + 1, N): if array[j] < array[minimum_element_index]: minimum_element_index = j if minimum_element_index != i: (array[i], array[minimum_element_index]) = (array[minimum_element_index], array[i]) return array
width = 10 precision = 4 value = decimal.Decimal("12.34567") f"result: {value:{width}.{precision}}" rf"result: {value:{width}.{precision}}" foo(f'this SHOULD be a multi-line string because it is ' f'very long and does not fit on one line. And {value} is the value.') foo('this SHOULD be a multi-line string, but not reflowed because it is ' f'very long and and also unusual. And {value} is the value.') foo(fR"this should NOT be \t " rF'a multi-line string \n')
width = 10 precision = 4 value = decimal.Decimal('12.34567') f'result: {value:{width}.{precision}}' f'result: {value:{width}.{precision}}' foo(f'this SHOULD be a multi-line string because it is very long and does not fit on one line. And {value} is the value.') foo(f'this SHOULD be a multi-line string, but not reflowed because it is very long and and also unusual. And {value} is the value.') foo(f'this should NOT be \\t a multi-line string \\n')
# Event: LCCS Python Fundamental Skills Workshop # Date: May 2018 # Author: Joe English, PDST # eMail: [email protected] # Purpose: A program to demonstrate string concatenation noun = input("Enter a singular noun: ") print("The plural of "+noun+" is "+noun+"s")
noun = input('Enter a singular noun: ') print('The plural of ' + noun + ' is ' + noun + 's')
elements = { 0: { "element": 0, "description": "", "dynamic": False, "bitmap": False, "len": 0, "format": "", "start_position": 0, "end_position": 0 }, 1: { "element": 1, "description": "Bitmap Secondary", "dynamic": False, "bitmap": True, "len": 16, "format": "AN", "start_position": 0, "end_position": 16 }, 3: { "element": 3, "description": "Processing Code", "dynamic": False, "bitmap": False, "len": 6, "format": "N", "start_position": 16, "end_position": 22 }, 4: { "element": 4, "description": "Transaction Amount", "dynamic": False, "bitmap": False, "len": 12, "format": "N", "start_position": 22, "end_position": 34 }, 7: { "element": 7, "description": "Transmission Date and Time", "dynamic": False, "bitmap": False, "len": 10, "format": "N", "start_position": 34, "end_position": 44 }, 11: { "element": 11, "description": "Systems Trace Audit Number", "dynamic": False, "bitmap": False, "len": 6, "format": "N", "start_position": 44, "end_position": 50 }, 12: { "element": 12, "description": "Local Transaction Time", "dynamic": False, "bitmap": False, "len": 6, "format": "N", "start_position": 50, "end_position": 56 }, 13: { "element": 13, "description": "Local Transaction Date", "dynamic": False, "bitmap": False, "len": 4, "format": "N", "start_position": 56, "end_position": 60 }, 14: { "element": 14, "description": "Settlement Date", "dynamic": False, "bitmap": False, "len": 4, "format": "N", "start_position": 60, "end_position": 64 } }
elements = {0: {'element': 0, 'description': '', 'dynamic': False, 'bitmap': False, 'len': 0, 'format': '', 'start_position': 0, 'end_position': 0}, 1: {'element': 1, 'description': 'Bitmap Secondary', 'dynamic': False, 'bitmap': True, 'len': 16, 'format': 'AN', 'start_position': 0, 'end_position': 16}, 3: {'element': 3, 'description': 'Processing Code', 'dynamic': False, 'bitmap': False, 'len': 6, 'format': 'N', 'start_position': 16, 'end_position': 22}, 4: {'element': 4, 'description': 'Transaction Amount', 'dynamic': False, 'bitmap': False, 'len': 12, 'format': 'N', 'start_position': 22, 'end_position': 34}, 7: {'element': 7, 'description': 'Transmission Date and Time', 'dynamic': False, 'bitmap': False, 'len': 10, 'format': 'N', 'start_position': 34, 'end_position': 44}, 11: {'element': 11, 'description': 'Systems Trace Audit Number', 'dynamic': False, 'bitmap': False, 'len': 6, 'format': 'N', 'start_position': 44, 'end_position': 50}, 12: {'element': 12, 'description': 'Local Transaction Time', 'dynamic': False, 'bitmap': False, 'len': 6, 'format': 'N', 'start_position': 50, 'end_position': 56}, 13: {'element': 13, 'description': 'Local Transaction Date', 'dynamic': False, 'bitmap': False, 'len': 4, 'format': 'N', 'start_position': 56, 'end_position': 60}, 14: {'element': 14, 'description': 'Settlement Date', 'dynamic': False, 'bitmap': False, 'len': 4, 'format': 'N', 'start_position': 60, 'end_position': 64}}
def write_html(messages): file = open("messages.html","w") html = [] html.append('<html>\n<head>\n\t<meta http-equiv="Content-Type" content = "text/html" charset=UTF-8 >\n') html.append('\t<link rel="stylesheet" href="body.css">\n') html.append('\t<base href="../../"/>\n') html.append('\t<title>Beatriz Valladares</title>\n') html.append('</head>\n') html.append('\t<body class="_5vb_ _2yq _4yic">\n') html.append('\t<div class="clearfix _ikh"><div class="_4bl9"><div class="_li"><div id="bluebarRoot" class="_2t-8 _1s4v _2s1x _h2p _3b0a"><div aria-label="Facebook" class="_2t-a _26aw _5rmj _50ti _2s1y" role="banner"><div class="_2t-a _50tj"><div class="_2t-a _4pmj _2t-d"><div class="_218o"><div class="_2t-e"><div class="_4kny"><h1 class="_19ea" data-click="bluebar_logo"><a class="_19eb" data-gt="&#123;&quot;chrome_nav_item&quot;:&quot;logo_chrome&quot;&#125;" href="https://www.facebook.com/?ref=logo"><span class="_2md">Facebook</span></a></h1></div></div><div aria-label="Facebook" class="_2t-f" role="navigation"><div class="_cy6" id="bluebar_profile_and_home"><div class="_4kny"><div class="_1k67 _cy7" data-click="profile_icon"><a accesskey="2" data-gt="&#123;&quot;chrome_nav_item&quot;:&quot;timeline_chrome&quot;&#125;" class="_2s25 _606w" href="https://www.facebook.com/osniel.quintana" title="Perfil"><span class="_1qv9"><img class="_2qgu _7ql _1m6h img" src="https://scontent.ftpa1-1.fna.fbcdn.net/v/t1.0-1/p24x24/28577591_1570706753048642_5187107547097320467_n.jpg?_nc_cat=0&amp;_nc_ad=z-m&amp;_nc_cid=0&amp;oh=97807afcd09fe84405ca0235bff672b2&amp;oe=5C2336CD" alt="" id="profile_pic_header_100003279974709" /><span class="_1vp5">Osniel</span></span></a></div></div><div class="_4kny _2s24"><a class="_2s25 _cy7" href="index.html" title="Inicio">Inicio</a></div></div></div></div></div></div></div></div><div class="_3a_u"><div class="_3-8y _3-95 _3b0b"><div style="background-color: #3578E5" class="_3z-t"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAALVBMVEUAAAD///////////////////////////////////////////////////////+hSKubAAAADnRSTlMA7zDfcM8QYEC/gK+fj+TZazYAAABuSURBVAhbPc2xDQFhAAbQLyTKSxjgQvQKEeV12itELRIjiAVUNrCFUcQKf5yG5M2gwQLvJTlySZIprJNeDWWcPbDMFQy7NGy822cou8OJMEomhPNiUJNtd7PikbaAV/o/5y9nBvMkVfnu1T1J8gFhkEwPa1z8VAAAAABJRU5ErkJggg==" /></div><div class="_3b0c"><div class="_3b0d">Beatriz Valladares</div></div></div><div class="_4t5n" role="main">\n') for message in messages: html.append(write_message(message)) html.append('\t</div></div></div></div></div>\n') html.append('\t</body>\n') html.append('\n</html>') toWrite = u''.join(html).encode('latin-1').strip() file.write(toWrite) file.close() def write_message(message): sms = [] sms.append('\t<div class="pam _3-95 _2pi0 _2lej uiBoxWhite noborder">\n') sms.append('\t\t<div class="_3-96 _2pio _2lek _2lel">\n') sms.append('\t\t\t' + message['sender_name'] + '\n') sms.append('\t\t</div>\n') sms.append('\t\t<div class="_3-96 _2let"><div><div></div><div>\n') sms.append('\t\t\t' + message['content'] + '\n') sms.append('\t\t</div><div></div><div></div></div></div>\n') sms.append('\t\t<div class="_3-94 _2lem">\n') sms.append('\t\t\t' + message['timestamp_ms']) sms.append('\t\t</div></div>\n') return ''.join(sms)
def write_html(messages): file = open('messages.html', 'w') html = [] html.append('<html>\n<head>\n\t<meta http-equiv="Content-Type" content = "text/html" charset=UTF-8 >\n') html.append('\t<link rel="stylesheet" href="body.css">\n') html.append('\t<base href="../../"/>\n') html.append('\t<title>Beatriz Valladares</title>\n') html.append('</head>\n') html.append('\t<body class="_5vb_ _2yq _4yic">\n') html.append('\t<div class="clearfix _ikh"><div class="_4bl9"><div class="_li"><div id="bluebarRoot" class="_2t-8 _1s4v _2s1x _h2p _3b0a"><div aria-label="Facebook" class="_2t-a _26aw _5rmj _50ti _2s1y" role="banner"><div class="_2t-a _50tj"><div class="_2t-a _4pmj _2t-d"><div class="_218o"><div class="_2t-e"><div class="_4kny"><h1 class="_19ea" data-click="bluebar_logo"><a class="_19eb" data-gt="&#123;&quot;chrome_nav_item&quot;:&quot;logo_chrome&quot;&#125;" href="https://www.facebook.com/?ref=logo"><span class="_2md">Facebook</span></a></h1></div></div><div aria-label="Facebook" class="_2t-f" role="navigation"><div class="_cy6" id="bluebar_profile_and_home"><div class="_4kny"><div class="_1k67 _cy7" data-click="profile_icon"><a accesskey="2" data-gt="&#123;&quot;chrome_nav_item&quot;:&quot;timeline_chrome&quot;&#125;" class="_2s25 _606w" href="https://www.facebook.com/osniel.quintana" title="Perfil"><span class="_1qv9"><img class="_2qgu _7ql _1m6h img" src="https://scontent.ftpa1-1.fna.fbcdn.net/v/t1.0-1/p24x24/28577591_1570706753048642_5187107547097320467_n.jpg?_nc_cat=0&amp;_nc_ad=z-m&amp;_nc_cid=0&amp;oh=97807afcd09fe84405ca0235bff672b2&amp;oe=5C2336CD" alt="" id="profile_pic_header_100003279974709" /><span class="_1vp5">Osniel</span></span></a></div></div><div class="_4kny _2s24"><a class="_2s25 _cy7" href="index.html" title="Inicio">Inicio</a></div></div></div></div></div></div></div></div><div class="_3a_u"><div class="_3-8y _3-95 _3b0b"><div style="background-color: #3578E5" class="_3z-t"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAALVBMVEUAAAD///////////////////////////////////////////////////////+hSKubAAAADnRSTlMA7zDfcM8QYEC/gK+fj+TZazYAAABuSURBVAhbPc2xDQFhAAbQLyTKSxjgQvQKEeV12itELRIjiAVUNrCFUcQKf5yG5M2gwQLvJTlySZIprJNeDWWcPbDMFQy7NGy822cou8OJMEomhPNiUJNtd7PikbaAV/o/5y9nBvMkVfnu1T1J8gFhkEwPa1z8VAAAAABJRU5ErkJggg==" /></div><div class="_3b0c"><div class="_3b0d">Beatriz Valladares</div></div></div><div class="_4t5n" role="main">\n') for message in messages: html.append(write_message(message)) html.append('\t</div></div></div></div></div>\n') html.append('\t</body>\n') html.append('\n</html>') to_write = u''.join(html).encode('latin-1').strip() file.write(toWrite) file.close() def write_message(message): sms = [] sms.append('\t<div class="pam _3-95 _2pi0 _2lej uiBoxWhite noborder">\n') sms.append('\t\t<div class="_3-96 _2pio _2lek _2lel">\n') sms.append('\t\t\t' + message['sender_name'] + '\n') sms.append('\t\t</div>\n') sms.append('\t\t<div class="_3-96 _2let"><div><div></div><div>\n') sms.append('\t\t\t' + message['content'] + '\n') sms.append('\t\t</div><div></div><div></div></div></div>\n') sms.append('\t\t<div class="_3-94 _2lem">\n') sms.append('\t\t\t' + message['timestamp_ms']) sms.append('\t\t</div></div>\n') return ''.join(sms)
class ViradaCulturalSpider(CrawlSpider): name = "virada_cultural" start_urls = ["http://conteudo.icmc.usp.br/Portal/conteudo/484/243/alunos-especiais"] def parse(self, response): self.logger.info('A response from %s just arrived!', response.url)
class Viradaculturalspider(CrawlSpider): name = 'virada_cultural' start_urls = ['http://conteudo.icmc.usp.br/Portal/conteudo/484/243/alunos-especiais'] def parse(self, response): self.logger.info('A response from %s just arrived!', response.url)
red = (255,0,0) green = (0,255,0) blue = (0,0,255) darkBlue = (0,0,128) white = (255,255,255) black = (0,0,0) pink = (255,200,200)
red = (255, 0, 0) green = (0, 255, 0) blue = (0, 0, 255) dark_blue = (0, 0, 128) white = (255, 255, 255) black = (0, 0, 0) pink = (255, 200, 200)
def createWordList(filename): text_file= open(filename,"r") temp = text_file.read().split("\n") text_file.close() temp.pop() #remove the last new line return temp def canWeMakeIt(myWord, myLetters): listLetters=[] for letter in myLetters: listLetters.append (letter) for x in myWord: if x not in listLetters: return False else: return True def specificLength(s,l): result = [] if l == 1: for c in s: result.append(c) return result for c in s: words = specificLength(s.replace(c,'',1), l-1) for w in words: result.append(w+c) return result def makeCandidates(s): wordSet=set() for a in range(1,len(s)): word= specificLength(s,a) for x in word: wordSet.add(x) return wordSet def wordList(s): list1=makeCandidates(s) list2=createWordList("wordlist.txt") list3=[] for a in list1: if a in list2: list3.append(a) return list3 def getWordPoints(myWord): letterPoints = {'a':1, 'b':3, 'c':3, 'd':2, 'e':1, 'f':4,\ 'g':2, 'h':4, 'i':1, 'j':8, 'k':5, 'l':1,\ 'm':3, 'n':1, 'o':1, 'p':3, 'q':10, 'r':1,\ 's':1, 't':1, 'u':1, 'v':4, 'w':4, 'x':8,\ 'y':4, 'z':10} result=0 for letter in myWord: result=result+letterPoints[letter] return result def scrabbleWords(myLetters): list1=wordList(myLetters) lst=list() for word in list1: point=getWordPoints(word) lst.append((point,word)) lst.sort(reverse=True) result=[] for point,word in lst: result.append([point,word]) return result
def create_word_list(filename): text_file = open(filename, 'r') temp = text_file.read().split('\n') text_file.close() temp.pop() return temp def can_we_make_it(myWord, myLetters): list_letters = [] for letter in myLetters: listLetters.append(letter) for x in myWord: if x not in listLetters: return False else: return True def specific_length(s, l): result = [] if l == 1: for c in s: result.append(c) return result for c in s: words = specific_length(s.replace(c, '', 1), l - 1) for w in words: result.append(w + c) return result def make_candidates(s): word_set = set() for a in range(1, len(s)): word = specific_length(s, a) for x in word: wordSet.add(x) return wordSet def word_list(s): list1 = make_candidates(s) list2 = create_word_list('wordlist.txt') list3 = [] for a in list1: if a in list2: list3.append(a) return list3 def get_word_points(myWord): letter_points = {'a': 1, 'b': 3, 'c': 3, 'd': 2, 'e': 1, 'f': 4, 'g': 2, 'h': 4, 'i': 1, 'j': 8, 'k': 5, 'l': 1, 'm': 3, 'n': 1, 'o': 1, 'p': 3, 'q': 10, 'r': 1, 's': 1, 't': 1, 'u': 1, 'v': 4, 'w': 4, 'x': 8, 'y': 4, 'z': 10} result = 0 for letter in myWord: result = result + letterPoints[letter] return result def scrabble_words(myLetters): list1 = word_list(myLetters) lst = list() for word in list1: point = get_word_points(word) lst.append((point, word)) lst.sort(reverse=True) result = [] for (point, word) in lst: result.append([point, word]) return result
expected_output = { "BDI3147": { "interface": "BDI3147", "redirects_disable": False, "address_family": { "ipv4": { "version": { 1: { "groups": { 31: { "group_number": 31, "hsrp_router_state": "active", "statistics": { "num_state_changes": 17 }, "last_state_change": "12w6d", "primary_ipv4_address": { "address": "10.190.99.49" }, "virtual_mac_address": "0000.0c07.ac1f", "virtual_mac_address_mac_in_use": True, "local_virtual_mac_address": "0000.0c07.ac1f", "local_virtual_mac_address_conf": "v1 default", "timers": { "hello_msec_flag": False, "hello_sec": 3, "hold_msec_flag": False, "hold_sec": 10, "next_hello_sent": 1.856 }, "active_router": "local", "standby_priority": 90, "standby_expires_in": 11.504, "standby_router": "10.190.99.51", "standby_ip_address": "10.190.99.51", "priority": 110, "configured_priority": 110, "session_name": "hsrp-BD3147-31" }, 32: { "group_number": 32, "hsrp_router_state": "active", "statistics": { "num_state_changes": 17 }, "last_state_change": "12w6d", "primary_ipv4_address": { "address": "10.188.109.1" }, "virtual_mac_address": "0000.0c07.ac20", "virtual_mac_address_mac_in_use": True, "local_virtual_mac_address": "0000.0c07.ac20", "local_virtual_mac_address_conf": "v1 default", "timers": { "hello_msec_flag": False, "hello_sec": 3, "hold_msec_flag": False, "hold_sec": 10, "next_hello_sent": 2.496 }, "active_router": "local", "standby_priority": 90, "standby_expires_in": 10.576, "standby_router": "10.188.109.3", "standby_ip_address": "10.188.109.3", "priority": 110, "configured_priority": 110, "session_name": "hsrp-BD3147-32" } } } } } }, "use_bia": False } }
expected_output = {'BDI3147': {'interface': 'BDI3147', 'redirects_disable': False, 'address_family': {'ipv4': {'version': {1: {'groups': {31: {'group_number': 31, 'hsrp_router_state': 'active', 'statistics': {'num_state_changes': 17}, 'last_state_change': '12w6d', 'primary_ipv4_address': {'address': '10.190.99.49'}, 'virtual_mac_address': '0000.0c07.ac1f', 'virtual_mac_address_mac_in_use': True, 'local_virtual_mac_address': '0000.0c07.ac1f', 'local_virtual_mac_address_conf': 'v1 default', 'timers': {'hello_msec_flag': False, 'hello_sec': 3, 'hold_msec_flag': False, 'hold_sec': 10, 'next_hello_sent': 1.856}, 'active_router': 'local', 'standby_priority': 90, 'standby_expires_in': 11.504, 'standby_router': '10.190.99.51', 'standby_ip_address': '10.190.99.51', 'priority': 110, 'configured_priority': 110, 'session_name': 'hsrp-BD3147-31'}, 32: {'group_number': 32, 'hsrp_router_state': 'active', 'statistics': {'num_state_changes': 17}, 'last_state_change': '12w6d', 'primary_ipv4_address': {'address': '10.188.109.1'}, 'virtual_mac_address': '0000.0c07.ac20', 'virtual_mac_address_mac_in_use': True, 'local_virtual_mac_address': '0000.0c07.ac20', 'local_virtual_mac_address_conf': 'v1 default', 'timers': {'hello_msec_flag': False, 'hello_sec': 3, 'hold_msec_flag': False, 'hold_sec': 10, 'next_hello_sent': 2.496}, 'active_router': 'local', 'standby_priority': 90, 'standby_expires_in': 10.576, 'standby_router': '10.188.109.3', 'standby_ip_address': '10.188.109.3', 'priority': 110, 'configured_priority': 110, 'session_name': 'hsrp-BD3147-32'}}}}}}, 'use_bia': False}}
# User Configuration variable settings for pitimolo # Purpose - Motion Detection Security Cam # Created - 20-Jul-2015 pi-timolo ver 2.94 compatible or greater # Done by - Claude Pageau configTitle = "pi-timolo default config motion" configName = "pi-timolo-default-config" # These settings should both be False if this script is run as a background /etc/init.d daemon verbose = True # Sends detailed logging info to console. set to False if running script as daeman logDataToFile = True # logs diagnostic data to a disk file for review default=False debug = False # Puts in debug mode returns pixel average data for tuning # print a test image imageTestPrint = False # default=False Set to True to print one image and exit (useful for aligning camera) # Image Settings imageNamePrefix = 'cam1-' # Prefix for all image file names. Eg front- imageWidth = 1024 # Full Size Image Width in px default=1024 imageHeight = 768 # Full Size Image Height in px default=768 imageVFlip = False # Flip image Vertically default=False imageHFlip = False # Flip image Horizontally default=False imageRotation = 0 # Rotate image. Valid values: 0, 90, 180 & 270 imagePreview = False # Preview image on connected RPI Monitor default=False noNightShots = False # Don't Take images at Night default=False noDayShots = False # Don't Take images during day time default=False # Low Light Night Settings nightMaxShut = 5.5 # default=5.5 sec Highest cam shut exposure time. # IMPORTANT 6 sec works sometimes but occasionally locks RPI and HARD reboot required to clear nightMinShut = .001 # default=.002 sec Lowest camera shut exposure time for transition from day to night (or visa versa) nightMaxISO = 800 # default=800 Max cam ISO night setting nightMinISO = 100 # lowest ISO camera setting for transition from day to night (or visa versa) nightSleepSec = 10 # default=10 Sec - Time period to allow camera to calculate low light AWB twilightThreshold = 40 # default=40 Light level to trigger day/night transition at twilight # Date/Time Settings for Displaying info Directly on Images showDateOnImage = True # Set to False for No display of date/time on image default= True showTextFontSize = 18 # Size of image Font in pixel height showTextBottom = True # Location of image Text True=Bottom False=Top showTextWhite = True # Colour of image Text True=White False=Black showTextWhiteNight = True # Change night text to white. Might help if night needs white instead of black during day or visa versa # Motion Detect Settings motionOn = True # True = motion capture is turned on. False= No motion detection motionPrefix = "mo-" # Prefix Motion Detection images motionDir = "motion" # Storage Folder for Motion Detect Images threshold = 35 # How much a pixel has to change to be counted default=35 (1-200) sensitivity = 100 # Number of changed pixels to trigger motion default=100 motionAverage = 2 # Number of images to average for motion verification: 1=last image only or 100=Med 300=High Average Etc. useVideoPort = True # Use the video port to capture motion images - faster than the image port. Default=False motionVideoOn = False # If set to True then video clip is taken rather than image motionVideoTimer = 10 # Number of seconds of video clip to take if Motion Detected default=10 motionQuickTLOn = False # if set to True then take a quick time lapse sequence rather than a single image (overrides motionVideoOn) motionQuickTLTimer = 10 # Duration in seconds of quick time lapse sequence after initial motion detected default=10 motionQuickTLInterval = 0 # Time between each Quick time lapse image 0 is fast as possible motionForce = 60 * 60 # Force single motion image if no Motion Detected in specified seconds. default=60*60 motionNumOn = True # True=On (filenames by sequenced Number) otherwise date/time used for filenames motionNumStart = 1000 # Start motion number sequence motionNumMax = 500 # Max number of motion images desired. 0=Continuous default=0 motionNumRecycle = True # After numberMax reached restart at numberStart instead of exiting default=True motionMaxDots = 100 # Number of motion dots before starting new line createLockFile = False # default=False if True then sync.sh will call gdrive to sync files to your web google drive if .sync file exists # Lock File is used to indicate motion images are added so sync.sh can sync in background via sudo crontab -e # Time Lapse Settings timelapseOn = True # Turns timelapse True=On False=Off timelapseTimer = 60 # Seconds between timelapse images default=5*60 timelapseDir = "timelapse" # Storage Folder for Time Lapse Images timelapsePrefix = "tl-" # Prefix timelapse images with this prefix timelapseExit = 0 * 60 # Will Quit program after specified seconds 0=Continuous default=0 timelapseNumOn = False # True=On (filenames Sequenced by Number) otherwise date/time used for filename timelapseNumStart = 1000 # Start of timelapse number sequence timelapseNumMax = 2000 # Max number of timelapse images desired. 0=Continuous default=2000 timelapseNumRecycle = True # After numberMax reached restart at numberStart instead of exiting default=True # ---------------------------------------------- End of User Variables -----------------------------------------------------
config_title = 'pi-timolo default config motion' config_name = 'pi-timolo-default-config' verbose = True log_data_to_file = True debug = False image_test_print = False image_name_prefix = 'cam1-' image_width = 1024 image_height = 768 image_v_flip = False image_h_flip = False image_rotation = 0 image_preview = False no_night_shots = False no_day_shots = False night_max_shut = 5.5 night_min_shut = 0.001 night_max_iso = 800 night_min_iso = 100 night_sleep_sec = 10 twilight_threshold = 40 show_date_on_image = True show_text_font_size = 18 show_text_bottom = True show_text_white = True show_text_white_night = True motion_on = True motion_prefix = 'mo-' motion_dir = 'motion' threshold = 35 sensitivity = 100 motion_average = 2 use_video_port = True motion_video_on = False motion_video_timer = 10 motion_quick_tl_on = False motion_quick_tl_timer = 10 motion_quick_tl_interval = 0 motion_force = 60 * 60 motion_num_on = True motion_num_start = 1000 motion_num_max = 500 motion_num_recycle = True motion_max_dots = 100 create_lock_file = False timelapse_on = True timelapse_timer = 60 timelapse_dir = 'timelapse' timelapse_prefix = 'tl-' timelapse_exit = 0 * 60 timelapse_num_on = False timelapse_num_start = 1000 timelapse_num_max = 2000 timelapse_num_recycle = True
# This problem was asked by Facebook. # Given a binary tree, return all paths from the root to leaves. # For example, given the tree: # 1 # / \ # 2 3 # / \ # 4 5 # Return [[1, 2], [1, 3, 4], [1, 3, 5]]. def getPaths(tree, path): left = None if tree.left: left = getPaths(tree.left, path + [tree.value]) right = None if tree.right: right = getPaths(tree.right, path + [tree.value]) mergedList = [] if left: mergedList = mergedList + left if right: mergedList = mergedList + right if len(mergedList) > 0: return mergedList else: return [path + [tree.value]] class Node: def __init__(self, value): self.value = value self.left = None self.right = None two = Node(2) four = Node(4) five = Node(5) three = Node(3) three.left = four three.right = five one = Node(1) one.left = two one.right = three print(getPaths(one, []))
def get_paths(tree, path): left = None if tree.left: left = get_paths(tree.left, path + [tree.value]) right = None if tree.right: right = get_paths(tree.right, path + [tree.value]) merged_list = [] if left: merged_list = mergedList + left if right: merged_list = mergedList + right if len(mergedList) > 0: return mergedList else: return [path + [tree.value]] class Node: def __init__(self, value): self.value = value self.left = None self.right = None two = node(2) four = node(4) five = node(5) three = node(3) three.left = four three.right = five one = node(1) one.left = two one.right = three print(get_paths(one, []))
#!/usr/bin/env python # -*- coding: utf-8 -*- # File : __init__.py # Author : yang <[email protected]> # Date : 10.03.2019 # Last Modified Date: 11.03.2019 # Last Modified By : yang <[email protected]> __all__ = ['pkgProj'] # from . import *
__all__ = ['pkgProj']
# Sum square difference # Answer: 25164150 def sum_of_the_squares(min_value, max_value): total = 0 for i in range(min_value, max_value + 1): total += i ** 2 return total def square_of_the_sum(min_value, max_value): total = 0 for i in range(min_value, max_value + 1): total += i return total ** 2 def sum_square_difference(min_value, max_value): return square_of_the_sum(min_value, max_value) - sum_of_the_squares(min_value, max_value) if __name__ == "__main__": print("Please enter the min and max values separated by a space: ", end='') min_value, max_value = map(int, input().split()) print(sum_square_difference(min_value, max_value))
def sum_of_the_squares(min_value, max_value): total = 0 for i in range(min_value, max_value + 1): total += i ** 2 return total def square_of_the_sum(min_value, max_value): total = 0 for i in range(min_value, max_value + 1): total += i return total ** 2 def sum_square_difference(min_value, max_value): return square_of_the_sum(min_value, max_value) - sum_of_the_squares(min_value, max_value) if __name__ == '__main__': print('Please enter the min and max values separated by a space: ', end='') (min_value, max_value) = map(int, input().split()) print(sum_square_difference(min_value, max_value))
# import pytest def test_query_no_join(connection): query = connection.get_sql_query(metrics=["total_item_revenue"], dimensions=["channel"]) correct = ( "SELECT order_lines.sales_channel as order_lines_channel," "SUM(order_lines.revenue) as order_lines_total_item_revenue " "FROM analytics.order_line_items order_lines GROUP BY order_lines.sales_channel;" ) assert query == correct def test_alias_only_query(connection): metric = connection.get_metric(metric_name="total_item_revenue") query = metric.sql_query(query_type="SNOWFLAKE", alias_only=True) assert query == "SUM(order_lines_total_item_revenue)" def test_alias_only_query_number(connection): metric = connection.get_metric(metric_name="line_item_aov") query = metric.sql_query(query_type="SNOWFLAKE", alias_only=True) assert query == "SUM(order_lines_total_item_revenue) / COUNT(orders_number_of_orders)" def test_alias_only_query_symmetric_average_distinct(connection): metric = connection.get_metric(metric_name="average_order_revenue") query = metric.sql_query(query_type="SNOWFLAKE", alias_only=True) correct = ( "(COALESCE(CAST((SUM(DISTINCT (CAST(FLOOR(COALESCE(order_lines_average_order_revenue, 0) " "* (1000000 * 1.0)) AS DECIMAL(38,0))) + (TO_NUMBER(MD5(order_lines_order_id), " "'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') % 1.0e27)::NUMERIC(38, 0)) " "- SUM(DISTINCT (TO_NUMBER(MD5(order_lines_order_id), 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') " "% 1.0e27)::NUMERIC(38, 0))) AS DOUBLE PRECISION) / CAST((1000000*1.0) AS " "DOUBLE PRECISION), 0) / NULLIF(COUNT(DISTINCT CASE WHEN (order_lines_average_order_revenue) " "IS NOT NULL THEN order_lines_order_id ELSE NULL END), 0))" ) assert query == correct def test_query_no_join_average_distinct(connection): query = connection.get_sql_query(metrics=["average_order_revenue"], dimensions=["channel"]) correct = ( "SELECT order_lines.sales_channel as order_lines_channel,(COALESCE(CAST((SUM(DISTINCT " "(CAST(FLOOR(COALESCE(order_lines.order_total, 0) * (1000000 * 1.0)) AS DECIMAL(38,0))) " "+ (TO_NUMBER(MD5(order_lines.order_unique_id), 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') " "% 1.0e27)::NUMERIC(38, 0)) - SUM(DISTINCT (TO_NUMBER(MD5(order_lines.order_unique_id), " "'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') % 1.0e27)::NUMERIC(38, 0))) AS DOUBLE PRECISION) " "/ CAST((1000000*1.0) AS DOUBLE PRECISION), 0) / NULLIF(COUNT(DISTINCT CASE WHEN " "(order_lines.order_total) IS NOT NULL THEN order_lines.order_unique_id ELSE NULL END), 0)) " "as order_lines_average_order_revenue FROM analytics.order_line_items order_lines " "GROUP BY order_lines.sales_channel;" ) assert query == correct def test_query_single_join(connection): query = connection.get_sql_query(metrics=["total_item_revenue"], dimensions=["channel", "new_vs_repeat"]) correct = ( "SELECT order_lines.sales_channel as order_lines_channel," "orders.new_vs_repeat as orders_new_vs_repeat," "SUM(order_lines.revenue) as order_lines_total_item_revenue FROM " "analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON " "order_lines.order_unique_id=orders.id GROUP BY order_lines.sales_channel,orders.new_vs_repeat;" ) assert query == correct def test_query_single_dimension(connection): query = connection.get_sql_query(metrics=[], dimensions=["new_vs_repeat"]) correct = "SELECT orders.new_vs_repeat as orders_new_vs_repeat FROM " correct += "analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON " correct += "order_lines.order_unique_id=orders.id GROUP BY orders.new_vs_repeat;" assert query == correct def test_query_single_dimension_with_comment(connection): query = connection.get_sql_query(metrics=["total_item_revenue"], dimensions=["parent_channel"]) correct = ( "SELECT CASE\n--- parent channel\nWHEN order_lines.sales_channel ilike '%social%' then " "'Social'\nELSE 'Not Social'\nEND as order_lines_parent_channel," "SUM(order_lines.revenue) as order_lines_total_item_revenue " "FROM analytics.order_line_items order_lines GROUP BY CASE\n--- parent channel\nWHEN " "order_lines.sales_channel ilike '%social%' then 'Social'\nELSE 'Not Social'\nEND;" ) assert query == correct def test_query_single_dimension_with_multi_filter(connection): query = connection.get_sql_query(metrics=["total_item_costs"], dimensions=["channel"]) correct = ( "SELECT order_lines.sales_channel as order_lines_channel,SUM(case when order_lines.product_name " "= 'Portable Charger' and orders.revenue * 100 > 100 then order_lines.item_costs end) " "as order_lines_total_item_costs FROM analytics.order_line_items order_lines LEFT JOIN " "analytics.orders orders ON order_lines.order_unique_id=orders.id " "GROUP BY order_lines.sales_channel;" ) assert query == correct def test_query_single_dimension_sa_duration(connection): query = connection.get_sql_query(metrics=["average_days_between_orders"], dimensions=["product_name"]) correct = ( "SELECT order_lines.product_name as order_lines_product_name,(COALESCE(CAST((SUM(DISTINCT " "(CAST(FLOOR(COALESCE(DATEDIFF('DAY', orders.previous_order_date, orders.order_date), 0) " "* (1000000 * 1.0)) AS DECIMAL(38,0))) + (TO_NUMBER(MD5(orders.id), " "'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') % 1.0e27)::NUMERIC(38, 0)) " "- SUM(DISTINCT (TO_NUMBER(MD5(orders.id), 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') " "% 1.0e27)::NUMERIC(38, 0))) AS DOUBLE PRECISION) / CAST((1000000*1.0) AS DOUBLE PRECISION), 0) " "/ NULLIF(COUNT(DISTINCT CASE WHEN (DATEDIFF('DAY', orders.previous_order_date, " "orders.order_date)) IS NOT NULL THEN orders.id " "ELSE NULL END), 0)) as orders_average_days_between_orders " "FROM analytics.order_line_items order_lines LEFT JOIN analytics.orders orders " "ON order_lines.order_unique_id=orders.id GROUP BY order_lines.product_name;" ) assert query == correct def test_query_single_join_count(connection): query = connection.get_sql_query( metrics=["order_lines.count"], dimensions=["channel", "new_vs_repeat"], explore_name="order_lines_all", ) correct = ( "SELECT order_lines.sales_channel as order_lines_channel," "orders.new_vs_repeat as orders_new_vs_repeat," "COUNT(order_lines.order_line_id) as order_lines_count FROM " "analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON " "order_lines.order_unique_id=orders.id GROUP BY order_lines.sales_channel,orders.new_vs_repeat;" ) assert query == correct def test_query_single_join_metric_with_sub_field(connection): query = connection.get_sql_query( metrics=["line_item_aov"], dimensions=["channel"], ) correct = ( "SELECT order_lines.sales_channel as order_lines_channel,SUM(order_lines.revenue) " "/ NULLIF(COUNT(DISTINCT CASE WHEN (orders.id) IS NOT NULL " "THEN orders.id ELSE NULL END), 0) as order_lines_line_item_aov " "FROM analytics.order_line_items order_lines LEFT JOIN analytics.orders orders " "ON order_lines.order_unique_id=orders.id GROUP BY order_lines.sales_channel;" ) assert query == correct def test_query_single_join_with_forced_additional_join(connection): query = connection.get_sql_query( metrics=["avg_rainfall"], dimensions=["discount_promo_name"], query_type="BIGQUERY", ) correct = ( "SELECT discount_detail.promo_name as discount_detail_discount_promo_name,(COALESCE(CAST((" "SUM(DISTINCT (CAST(FLOOR(COALESCE(country_detail.rain, 0) * (1000000 * 1.0)) AS FLOAT64))" " + CAST(FARM_FINGERPRINT(CAST(country_detail.country AS STRING)) AS BIGNUMERIC)) - SUM(DISTINCT " "CAST(FARM_FINGERPRINT(CAST(country_detail.country AS STRING)) AS BIGNUMERIC))) AS FLOAT64) " "/ CAST((1000000*1.0) AS FLOAT64), 0) / NULLIF(COUNT(DISTINCT CASE WHEN " "(country_detail.rain) IS NOT NULL THEN country_detail.country ELSE NULL END), " "0)) as country_detail_avg_rainfall FROM analytics.order_line_items order_lines " "LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id " "LEFT JOIN analytics_live.discounts discounts ON orders.id=discounts.order_id " "LEFT JOIN analytics.discount_detail discount_detail " "ON discounts.discount_id=discount_detail.discount_id " "AND DATE_TRUNC(discounts.order_date, WEEK) is not null " "LEFT JOIN (SELECT * FROM ANALYTICS.COUNTRY_DETAIL) as country_detail " "ON discounts.country=country_detail.country GROUP BY discount_detail.promo_name;" ) assert query == correct def test_query_single_join_select_args(connection): query = connection.get_sql_query( metrics=["total_item_revenue"], dimensions=["channel", "new_vs_repeat"], select_raw_sql=[ "CAST(new_vs_repeat = 'Repeat' AS INT) as group_1", "CAST(date_created > '2021-04-02' AS INT) as period", ], ) correct = ( "SELECT order_lines.sales_channel as order_lines_channel," "orders.new_vs_repeat as orders_new_vs_repeat," "SUM(order_lines.revenue) as order_lines_total_item_revenue," "CAST(new_vs_repeat = 'Repeat' AS INT) as group_1," "CAST(date_created > '2021-04-02' AS INT) as period FROM " "analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON " "order_lines.order_unique_id=orders.id GROUP BY order_lines.sales_channel,orders.new_vs_repeat," ) correct += "CAST(new_vs_repeat = 'Repeat' AS INT),CAST(date_created > '2021-04-02' AS INT);" assert query == correct def test_query_single_join_with_case_raw_sql(connection): query = connection.get_sql_query( metrics=["total_item_revenue"], dimensions=["is_on_sale_sql", "new_vs_repeat"], ) correct = ( "SELECT CASE WHEN order_lines.product_name ilike '%sale%' then TRUE else FALSE end " "as order_lines_is_on_sale_sql,orders.new_vs_repeat as orders_new_vs_repeat," "SUM(order_lines.revenue) as order_lines_total_item_revenue FROM " "analytics.order_line_items order_lines LEFT JOIN analytics.orders orders " "ON order_lines.order_unique_id=orders.id GROUP BY CASE WHEN order_lines.product_name " "ilike '%sale%' then TRUE else FALSE end,orders.new_vs_repeat;" ) assert query == correct def test_query_single_join_with_case(connection): query = connection.get_sql_query( metrics=["total_item_revenue"], dimensions=["is_on_sale_case", "new_vs_repeat"], ) correct = "SELECT case when order_lines.product_name ilike '%sale%' then 'On sale' else 'Not on sale' end " # noqa correct += "as order_lines_is_on_sale_case,orders.new_vs_repeat as orders_new_vs_repeat," correct += "SUM(order_lines.revenue) as order_lines_total_item_revenue FROM " correct += "analytics.order_line_items order_lines LEFT JOIN analytics.orders orders " correct += "ON order_lines.order_unique_id=orders.id GROUP BY case when order_lines.product_name " correct += "ilike '%sale%' then 'On sale' else 'Not on sale' end,orders.new_vs_repeat;" assert query == correct def test_query_single_join_with_tier(connection): query = connection.get_sql_query( metrics=["total_item_revenue"], dimensions=["order_tier", "new_vs_repeat"], ) tier_case_query = "case when order_lines.revenue < 0 then 'Below 0' when order_lines.revenue >= 0 " tier_case_query += "and order_lines.revenue < 20 then '[0,20)' when order_lines.revenue >= 20 and " tier_case_query += "order_lines.revenue < 50 then '[20,50)' when order_lines.revenue >= 50 and " tier_case_query += "order_lines.revenue < 100 then '[50,100)' when order_lines.revenue >= 100 and " tier_case_query += "order_lines.revenue < 300 then '[100,300)' when order_lines.revenue >= 300 " tier_case_query += "then '[300,inf)' else 'Unknown' end" correct = ( f"SELECT {tier_case_query} as order_lines_order_tier,orders.new_vs_repeat as orders_new_vs_repeat," "SUM(order_lines.revenue) as order_lines_total_item_revenue FROM " "analytics.order_line_items order_lines LEFT JOIN analytics.orders orders " f"ON order_lines.order_unique_id=orders.id GROUP BY {tier_case_query},orders.new_vs_repeat;" ) assert query == correct def test_query_single_join_with_filter(connection): query = connection.get_sql_query( metrics=["number_of_email_purchased_items"], dimensions=["channel", "new_vs_repeat"], ) correct = ( "SELECT order_lines.sales_channel as order_lines_channel," "orders.new_vs_repeat as orders_new_vs_repeat," "COUNT(case when order_lines.sales_channel = 'Email' then order_lines.order_id end) " "as order_lines_number_of_email_purchased_items FROM analytics.order_line_items " "order_lines LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id" " GROUP BY order_lines.sales_channel,orders.new_vs_repeat;" ) assert query == correct def test_query_multiple_join(connection): query = connection.get_sql_query( metrics=["total_item_revenue"], dimensions=["region", "new_vs_repeat"], ) correct = ( "SELECT customers.region as customers_region,orders.new_vs_repeat as orders_new_vs_repeat," "SUM(order_lines.revenue) as order_lines_total_item_revenue FROM " "analytics.order_line_items order_lines " "LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id " "LEFT JOIN analytics.customers customers ON order_lines.customer_id=customers.customer_id " "GROUP BY customers.region,orders.new_vs_repeat;" ) assert query == correct def test_query_multiple_join_where_dict(connection): query = connection.get_sql_query( metrics=["total_item_revenue"], dimensions=["region", "new_vs_repeat"], where=[{"field": "region", "expression": "not_equal_to", "value": "West"}], ) correct = ( "SELECT customers.region as customers_region,orders.new_vs_repeat as orders_new_vs_repeat," "SUM(order_lines.revenue) as order_lines_total_item_revenue FROM " "analytics.order_line_items order_lines " "LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id " "LEFT JOIN analytics.customers customers ON order_lines.customer_id=customers.customer_id " "WHERE customers.region<>'West' " "GROUP BY customers.region,orders.new_vs_repeat;" ) assert query == correct def test_query_multiple_join_where_literal(connection): query = connection.get_sql_query( metrics=["total_item_revenue"], dimensions=["region", "new_vs_repeat"], where="first_order_week > '2021-07-12'", ) correct = ( "SELECT customers.region as customers_region,orders.new_vs_repeat as orders_new_vs_repeat," "SUM(order_lines.revenue) as order_lines_total_item_revenue FROM " "analytics.order_line_items order_lines " "LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id " "LEFT JOIN analytics.customers customers ON order_lines.customer_id=customers.customer_id " "WHERE DATE_TRUNC('WEEK', customers.first_order_date) > '2021-07-12' " "GROUP BY customers.region,orders.new_vs_repeat;" ) assert query == correct def test_query_multiple_join_having_dict(connection): query = connection.get_sql_query( metrics=["total_item_revenue"], dimensions=["region", "new_vs_repeat"], having=[{"field": "total_item_revenue", "expression": "greater_than", "value": -12}], ) correct = ( "SELECT customers.region as customers_region,orders.new_vs_repeat as orders_new_vs_repeat," "SUM(order_lines.revenue) as order_lines_total_item_revenue FROM " "analytics.order_line_items order_lines " "LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id " "LEFT JOIN analytics.customers customers ON order_lines.customer_id=customers.customer_id " "GROUP BY customers.region,orders.new_vs_repeat HAVING SUM(order_lines.revenue)>-12;" ) assert query == correct def test_query_multiple_join_having_literal(connection): query = connection.get_sql_query( metrics=["total_item_revenue"], dimensions=["region", "new_vs_repeat"], having="total_item_revenue > -12", ) correct = ( "SELECT customers.region as customers_region,orders.new_vs_repeat as orders_new_vs_repeat," "SUM(order_lines.revenue) as order_lines_total_item_revenue FROM " "analytics.order_line_items order_lines " "LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id " "LEFT JOIN analytics.customers customers ON order_lines.customer_id=customers.customer_id " "GROUP BY customers.region,orders.new_vs_repeat HAVING SUM(order_lines.revenue) > -12;" ) assert query == correct def test_query_multiple_join_order_by_literal(connection): query = connection.get_sql_query( metrics=["total_item_revenue"], dimensions=["region", "new_vs_repeat"], order_by="total_item_revenue", ) correct = ( "SELECT customers.region as customers_region,orders.new_vs_repeat as orders_new_vs_repeat," "SUM(order_lines.revenue) as order_lines_total_item_revenue FROM " "analytics.order_line_items order_lines " "LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id " "LEFT JOIN analytics.customers customers ON order_lines.customer_id=customers.customer_id " "GROUP BY customers.region,orders.new_vs_repeat ORDER BY total_item_revenue ASC;" ) assert query == correct def test_query_multiple_join_all(connection): query = connection.get_sql_query( metrics=["total_item_revenue"], dimensions=["region", "new_vs_repeat"], where=[{"field": "region", "expression": "not_equal_to", "value": "West"}], having=[{"field": "total_item_revenue", "expression": "greater_than", "value": -12}], order_by=[{"field": "total_item_revenue", "sort": "desc"}], ) correct = ( "SELECT customers.region as customers_region,orders.new_vs_repeat as orders_new_vs_repeat," "SUM(order_lines.revenue) as order_lines_total_item_revenue FROM " "analytics.order_line_items order_lines " "LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id " "LEFT JOIN analytics.customers customers ON order_lines.customer_id=customers.customer_id " "WHERE customers.region<>'West' " "GROUP BY customers.region,orders.new_vs_repeat HAVING SUM(order_lines.revenue)>-12 " "ORDER BY total_item_revenue DESC;" ) assert query == correct
def test_query_no_join(connection): query = connection.get_sql_query(metrics=['total_item_revenue'], dimensions=['channel']) correct = 'SELECT order_lines.sales_channel as order_lines_channel,SUM(order_lines.revenue) as order_lines_total_item_revenue FROM analytics.order_line_items order_lines GROUP BY order_lines.sales_channel;' assert query == correct def test_alias_only_query(connection): metric = connection.get_metric(metric_name='total_item_revenue') query = metric.sql_query(query_type='SNOWFLAKE', alias_only=True) assert query == 'SUM(order_lines_total_item_revenue)' def test_alias_only_query_number(connection): metric = connection.get_metric(metric_name='line_item_aov') query = metric.sql_query(query_type='SNOWFLAKE', alias_only=True) assert query == 'SUM(order_lines_total_item_revenue) / COUNT(orders_number_of_orders)' def test_alias_only_query_symmetric_average_distinct(connection): metric = connection.get_metric(metric_name='average_order_revenue') query = metric.sql_query(query_type='SNOWFLAKE', alias_only=True) correct = "(COALESCE(CAST((SUM(DISTINCT (CAST(FLOOR(COALESCE(order_lines_average_order_revenue, 0) * (1000000 * 1.0)) AS DECIMAL(38,0))) + (TO_NUMBER(MD5(order_lines_order_id), 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') % 1.0e27)::NUMERIC(38, 0)) - SUM(DISTINCT (TO_NUMBER(MD5(order_lines_order_id), 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') % 1.0e27)::NUMERIC(38, 0))) AS DOUBLE PRECISION) / CAST((1000000*1.0) AS DOUBLE PRECISION), 0) / NULLIF(COUNT(DISTINCT CASE WHEN (order_lines_average_order_revenue) IS NOT NULL THEN order_lines_order_id ELSE NULL END), 0))" assert query == correct def test_query_no_join_average_distinct(connection): query = connection.get_sql_query(metrics=['average_order_revenue'], dimensions=['channel']) correct = "SELECT order_lines.sales_channel as order_lines_channel,(COALESCE(CAST((SUM(DISTINCT (CAST(FLOOR(COALESCE(order_lines.order_total, 0) * (1000000 * 1.0)) AS DECIMAL(38,0))) + (TO_NUMBER(MD5(order_lines.order_unique_id), 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') % 1.0e27)::NUMERIC(38, 0)) - SUM(DISTINCT (TO_NUMBER(MD5(order_lines.order_unique_id), 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') % 1.0e27)::NUMERIC(38, 0))) AS DOUBLE PRECISION) / CAST((1000000*1.0) AS DOUBLE PRECISION), 0) / NULLIF(COUNT(DISTINCT CASE WHEN (order_lines.order_total) IS NOT NULL THEN order_lines.order_unique_id ELSE NULL END), 0)) as order_lines_average_order_revenue FROM analytics.order_line_items order_lines GROUP BY order_lines.sales_channel;" assert query == correct def test_query_single_join(connection): query = connection.get_sql_query(metrics=['total_item_revenue'], dimensions=['channel', 'new_vs_repeat']) correct = 'SELECT order_lines.sales_channel as order_lines_channel,orders.new_vs_repeat as orders_new_vs_repeat,SUM(order_lines.revenue) as order_lines_total_item_revenue FROM analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id GROUP BY order_lines.sales_channel,orders.new_vs_repeat;' assert query == correct def test_query_single_dimension(connection): query = connection.get_sql_query(metrics=[], dimensions=['new_vs_repeat']) correct = 'SELECT orders.new_vs_repeat as orders_new_vs_repeat FROM ' correct += 'analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON ' correct += 'order_lines.order_unique_id=orders.id GROUP BY orders.new_vs_repeat;' assert query == correct def test_query_single_dimension_with_comment(connection): query = connection.get_sql_query(metrics=['total_item_revenue'], dimensions=['parent_channel']) correct = "SELECT CASE\n--- parent channel\nWHEN order_lines.sales_channel ilike '%social%' then 'Social'\nELSE 'Not Social'\nEND as order_lines_parent_channel,SUM(order_lines.revenue) as order_lines_total_item_revenue FROM analytics.order_line_items order_lines GROUP BY CASE\n--- parent channel\nWHEN order_lines.sales_channel ilike '%social%' then 'Social'\nELSE 'Not Social'\nEND;" assert query == correct def test_query_single_dimension_with_multi_filter(connection): query = connection.get_sql_query(metrics=['total_item_costs'], dimensions=['channel']) correct = "SELECT order_lines.sales_channel as order_lines_channel,SUM(case when order_lines.product_name = 'Portable Charger' and orders.revenue * 100 > 100 then order_lines.item_costs end) as order_lines_total_item_costs FROM analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id GROUP BY order_lines.sales_channel;" assert query == correct def test_query_single_dimension_sa_duration(connection): query = connection.get_sql_query(metrics=['average_days_between_orders'], dimensions=['product_name']) correct = "SELECT order_lines.product_name as order_lines_product_name,(COALESCE(CAST((SUM(DISTINCT (CAST(FLOOR(COALESCE(DATEDIFF('DAY', orders.previous_order_date, orders.order_date), 0) * (1000000 * 1.0)) AS DECIMAL(38,0))) + (TO_NUMBER(MD5(orders.id), 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') % 1.0e27)::NUMERIC(38, 0)) - SUM(DISTINCT (TO_NUMBER(MD5(orders.id), 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') % 1.0e27)::NUMERIC(38, 0))) AS DOUBLE PRECISION) / CAST((1000000*1.0) AS DOUBLE PRECISION), 0) / NULLIF(COUNT(DISTINCT CASE WHEN (DATEDIFF('DAY', orders.previous_order_date, orders.order_date)) IS NOT NULL THEN orders.id ELSE NULL END), 0)) as orders_average_days_between_orders FROM analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id GROUP BY order_lines.product_name;" assert query == correct def test_query_single_join_count(connection): query = connection.get_sql_query(metrics=['order_lines.count'], dimensions=['channel', 'new_vs_repeat'], explore_name='order_lines_all') correct = 'SELECT order_lines.sales_channel as order_lines_channel,orders.new_vs_repeat as orders_new_vs_repeat,COUNT(order_lines.order_line_id) as order_lines_count FROM analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id GROUP BY order_lines.sales_channel,orders.new_vs_repeat;' assert query == correct def test_query_single_join_metric_with_sub_field(connection): query = connection.get_sql_query(metrics=['line_item_aov'], dimensions=['channel']) correct = 'SELECT order_lines.sales_channel as order_lines_channel,SUM(order_lines.revenue) / NULLIF(COUNT(DISTINCT CASE WHEN (orders.id) IS NOT NULL THEN orders.id ELSE NULL END), 0) as order_lines_line_item_aov FROM analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id GROUP BY order_lines.sales_channel;' assert query == correct def test_query_single_join_with_forced_additional_join(connection): query = connection.get_sql_query(metrics=['avg_rainfall'], dimensions=['discount_promo_name'], query_type='BIGQUERY') correct = 'SELECT discount_detail.promo_name as discount_detail_discount_promo_name,(COALESCE(CAST((SUM(DISTINCT (CAST(FLOOR(COALESCE(country_detail.rain, 0) * (1000000 * 1.0)) AS FLOAT64)) + CAST(FARM_FINGERPRINT(CAST(country_detail.country AS STRING)) AS BIGNUMERIC)) - SUM(DISTINCT CAST(FARM_FINGERPRINT(CAST(country_detail.country AS STRING)) AS BIGNUMERIC))) AS FLOAT64) / CAST((1000000*1.0) AS FLOAT64), 0) / NULLIF(COUNT(DISTINCT CASE WHEN (country_detail.rain) IS NOT NULL THEN country_detail.country ELSE NULL END), 0)) as country_detail_avg_rainfall FROM analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id LEFT JOIN analytics_live.discounts discounts ON orders.id=discounts.order_id LEFT JOIN analytics.discount_detail discount_detail ON discounts.discount_id=discount_detail.discount_id AND DATE_TRUNC(discounts.order_date, WEEK) is not null LEFT JOIN (SELECT * FROM ANALYTICS.COUNTRY_DETAIL) as country_detail ON discounts.country=country_detail.country GROUP BY discount_detail.promo_name;' assert query == correct def test_query_single_join_select_args(connection): query = connection.get_sql_query(metrics=['total_item_revenue'], dimensions=['channel', 'new_vs_repeat'], select_raw_sql=["CAST(new_vs_repeat = 'Repeat' AS INT) as group_1", "CAST(date_created > '2021-04-02' AS INT) as period"]) correct = "SELECT order_lines.sales_channel as order_lines_channel,orders.new_vs_repeat as orders_new_vs_repeat,SUM(order_lines.revenue) as order_lines_total_item_revenue,CAST(new_vs_repeat = 'Repeat' AS INT) as group_1,CAST(date_created > '2021-04-02' AS INT) as period FROM analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id GROUP BY order_lines.sales_channel,orders.new_vs_repeat," correct += "CAST(new_vs_repeat = 'Repeat' AS INT),CAST(date_created > '2021-04-02' AS INT);" assert query == correct def test_query_single_join_with_case_raw_sql(connection): query = connection.get_sql_query(metrics=['total_item_revenue'], dimensions=['is_on_sale_sql', 'new_vs_repeat']) correct = "SELECT CASE WHEN order_lines.product_name ilike '%sale%' then TRUE else FALSE end as order_lines_is_on_sale_sql,orders.new_vs_repeat as orders_new_vs_repeat,SUM(order_lines.revenue) as order_lines_total_item_revenue FROM analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id GROUP BY CASE WHEN order_lines.product_name ilike '%sale%' then TRUE else FALSE end,orders.new_vs_repeat;" assert query == correct def test_query_single_join_with_case(connection): query = connection.get_sql_query(metrics=['total_item_revenue'], dimensions=['is_on_sale_case', 'new_vs_repeat']) correct = "SELECT case when order_lines.product_name ilike '%sale%' then 'On sale' else 'Not on sale' end " correct += 'as order_lines_is_on_sale_case,orders.new_vs_repeat as orders_new_vs_repeat,' correct += 'SUM(order_lines.revenue) as order_lines_total_item_revenue FROM ' correct += 'analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ' correct += 'ON order_lines.order_unique_id=orders.id GROUP BY case when order_lines.product_name ' correct += "ilike '%sale%' then 'On sale' else 'Not on sale' end,orders.new_vs_repeat;" assert query == correct def test_query_single_join_with_tier(connection): query = connection.get_sql_query(metrics=['total_item_revenue'], dimensions=['order_tier', 'new_vs_repeat']) tier_case_query = "case when order_lines.revenue < 0 then 'Below 0' when order_lines.revenue >= 0 " tier_case_query += "and order_lines.revenue < 20 then '[0,20)' when order_lines.revenue >= 20 and " tier_case_query += "order_lines.revenue < 50 then '[20,50)' when order_lines.revenue >= 50 and " tier_case_query += "order_lines.revenue < 100 then '[50,100)' when order_lines.revenue >= 100 and " tier_case_query += "order_lines.revenue < 300 then '[100,300)' when order_lines.revenue >= 300 " tier_case_query += "then '[300,inf)' else 'Unknown' end" correct = f'SELECT {tier_case_query} as order_lines_order_tier,orders.new_vs_repeat as orders_new_vs_repeat,SUM(order_lines.revenue) as order_lines_total_item_revenue FROM analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id GROUP BY {tier_case_query},orders.new_vs_repeat;' assert query == correct def test_query_single_join_with_filter(connection): query = connection.get_sql_query(metrics=['number_of_email_purchased_items'], dimensions=['channel', 'new_vs_repeat']) correct = "SELECT order_lines.sales_channel as order_lines_channel,orders.new_vs_repeat as orders_new_vs_repeat,COUNT(case when order_lines.sales_channel = 'Email' then order_lines.order_id end) as order_lines_number_of_email_purchased_items FROM analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id GROUP BY order_lines.sales_channel,orders.new_vs_repeat;" assert query == correct def test_query_multiple_join(connection): query = connection.get_sql_query(metrics=['total_item_revenue'], dimensions=['region', 'new_vs_repeat']) correct = 'SELECT customers.region as customers_region,orders.new_vs_repeat as orders_new_vs_repeat,SUM(order_lines.revenue) as order_lines_total_item_revenue FROM analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id LEFT JOIN analytics.customers customers ON order_lines.customer_id=customers.customer_id GROUP BY customers.region,orders.new_vs_repeat;' assert query == correct def test_query_multiple_join_where_dict(connection): query = connection.get_sql_query(metrics=['total_item_revenue'], dimensions=['region', 'new_vs_repeat'], where=[{'field': 'region', 'expression': 'not_equal_to', 'value': 'West'}]) correct = "SELECT customers.region as customers_region,orders.new_vs_repeat as orders_new_vs_repeat,SUM(order_lines.revenue) as order_lines_total_item_revenue FROM analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id LEFT JOIN analytics.customers customers ON order_lines.customer_id=customers.customer_id WHERE customers.region<>'West' GROUP BY customers.region,orders.new_vs_repeat;" assert query == correct def test_query_multiple_join_where_literal(connection): query = connection.get_sql_query(metrics=['total_item_revenue'], dimensions=['region', 'new_vs_repeat'], where="first_order_week > '2021-07-12'") correct = "SELECT customers.region as customers_region,orders.new_vs_repeat as orders_new_vs_repeat,SUM(order_lines.revenue) as order_lines_total_item_revenue FROM analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id LEFT JOIN analytics.customers customers ON order_lines.customer_id=customers.customer_id WHERE DATE_TRUNC('WEEK', customers.first_order_date) > '2021-07-12' GROUP BY customers.region,orders.new_vs_repeat;" assert query == correct def test_query_multiple_join_having_dict(connection): query = connection.get_sql_query(metrics=['total_item_revenue'], dimensions=['region', 'new_vs_repeat'], having=[{'field': 'total_item_revenue', 'expression': 'greater_than', 'value': -12}]) correct = 'SELECT customers.region as customers_region,orders.new_vs_repeat as orders_new_vs_repeat,SUM(order_lines.revenue) as order_lines_total_item_revenue FROM analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id LEFT JOIN analytics.customers customers ON order_lines.customer_id=customers.customer_id GROUP BY customers.region,orders.new_vs_repeat HAVING SUM(order_lines.revenue)>-12;' assert query == correct def test_query_multiple_join_having_literal(connection): query = connection.get_sql_query(metrics=['total_item_revenue'], dimensions=['region', 'new_vs_repeat'], having='total_item_revenue > -12') correct = 'SELECT customers.region as customers_region,orders.new_vs_repeat as orders_new_vs_repeat,SUM(order_lines.revenue) as order_lines_total_item_revenue FROM analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id LEFT JOIN analytics.customers customers ON order_lines.customer_id=customers.customer_id GROUP BY customers.region,orders.new_vs_repeat HAVING SUM(order_lines.revenue) > -12;' assert query == correct def test_query_multiple_join_order_by_literal(connection): query = connection.get_sql_query(metrics=['total_item_revenue'], dimensions=['region', 'new_vs_repeat'], order_by='total_item_revenue') correct = 'SELECT customers.region as customers_region,orders.new_vs_repeat as orders_new_vs_repeat,SUM(order_lines.revenue) as order_lines_total_item_revenue FROM analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id LEFT JOIN analytics.customers customers ON order_lines.customer_id=customers.customer_id GROUP BY customers.region,orders.new_vs_repeat ORDER BY total_item_revenue ASC;' assert query == correct def test_query_multiple_join_all(connection): query = connection.get_sql_query(metrics=['total_item_revenue'], dimensions=['region', 'new_vs_repeat'], where=[{'field': 'region', 'expression': 'not_equal_to', 'value': 'West'}], having=[{'field': 'total_item_revenue', 'expression': 'greater_than', 'value': -12}], order_by=[{'field': 'total_item_revenue', 'sort': 'desc'}]) correct = "SELECT customers.region as customers_region,orders.new_vs_repeat as orders_new_vs_repeat,SUM(order_lines.revenue) as order_lines_total_item_revenue FROM analytics.order_line_items order_lines LEFT JOIN analytics.orders orders ON order_lines.order_unique_id=orders.id LEFT JOIN analytics.customers customers ON order_lines.customer_id=customers.customer_id WHERE customers.region<>'West' GROUP BY customers.region,orders.new_vs_repeat HAVING SUM(order_lines.revenue)>-12 ORDER BY total_item_revenue DESC;" assert query == correct
#%% def validate_velocity_derivative(): pass #%% trial = 's1x2i7x5' subject = 'AB01' joint = 'jointangles_shank_x' filename = '../local-storage/test/dataport_flattened_partial_{}.parquet'.format(subject) df = pd.read_parquet(filename) trial_df = df[df['trial'] == trial] model_foot_dot = model_loader('foot_dot_model.pickle') model_foot = model_loader('foot_model.pickle') states = ['phase', 'phase_dot', 'stride_length', 'ramp'] states_data = trial_df[states].values.T foot_angle_evaluated = model_foot.evaluate_numpy(states_data) foot_angle_dot_evaluated = model_foot_dot.evaluate_numpy(states_data) #Calculate the derivative of foot dot manually foot_anles_cutoff = trial_df[joint].values[:-1] foot_angles_future = trial_df[joint].values[1:] phase_rate = trial_df['phase_dot'].values[:-1] measured_foot_derivative = (foot_angles_future-foot_anles_cutoff)*(phase_rate)*150 calculated_foot_derivative = foot_angle_dot_evaluated @ model_foot_dot.subjects[subject]['optimal_xi'] measured_foot_angle = trial_df[joint] calculated_foot_angles = foot_angle_evaluated @ model_foot.subjects[subject]['optimal_xi'] points_per_stride = 150 start_stride = 40 num_strides = 3 + start_stride x = np.linspace(0,1+1/(num_strides-start_stride)*points_per_stride,(num_strides-start_stride)*points_per_stride) fig, axs = plt.subplots(2,1) axs[0].plot(x,measured_foot_derivative[start_stride*points_per_stride:num_strides*points_per_stride]) axs[0].plot(x,calculated_foot_derivative[start_stride*points_per_stride:num_strides*points_per_stride]) axs[0].legend(['measured','calculated']) axs[0].grid(True) axs[1].plot(x, measured_foot_angle[start_stride*points_per_stride:num_strides*points_per_stride]) axs[1].plot(x, calculated_foot_angles[start_stride*points_per_stride:num_strides*points_per_stride]) axs[1].legend([ 'measured foot angle', 'calculated foot angle']) axs[1].grid(True) plt.show()
def validate_velocity_derivative(): pass trial = 's1x2i7x5' subject = 'AB01' joint = 'jointangles_shank_x' filename = '../local-storage/test/dataport_flattened_partial_{}.parquet'.format(subject) df = pd.read_parquet(filename) trial_df = df[df['trial'] == trial] model_foot_dot = model_loader('foot_dot_model.pickle') model_foot = model_loader('foot_model.pickle') states = ['phase', 'phase_dot', 'stride_length', 'ramp'] states_data = trial_df[states].values.T foot_angle_evaluated = model_foot.evaluate_numpy(states_data) foot_angle_dot_evaluated = model_foot_dot.evaluate_numpy(states_data) foot_anles_cutoff = trial_df[joint].values[:-1] foot_angles_future = trial_df[joint].values[1:] phase_rate = trial_df['phase_dot'].values[:-1] measured_foot_derivative = (foot_angles_future - foot_anles_cutoff) * phase_rate * 150 calculated_foot_derivative = foot_angle_dot_evaluated @ model_foot_dot.subjects[subject]['optimal_xi'] measured_foot_angle = trial_df[joint] calculated_foot_angles = foot_angle_evaluated @ model_foot.subjects[subject]['optimal_xi'] points_per_stride = 150 start_stride = 40 num_strides = 3 + start_stride x = np.linspace(0, 1 + 1 / (num_strides - start_stride) * points_per_stride, (num_strides - start_stride) * points_per_stride) (fig, axs) = plt.subplots(2, 1) axs[0].plot(x, measured_foot_derivative[start_stride * points_per_stride:num_strides * points_per_stride]) axs[0].plot(x, calculated_foot_derivative[start_stride * points_per_stride:num_strides * points_per_stride]) axs[0].legend(['measured', 'calculated']) axs[0].grid(True) axs[1].plot(x, measured_foot_angle[start_stride * points_per_stride:num_strides * points_per_stride]) axs[1].plot(x, calculated_foot_angles[start_stride * points_per_stride:num_strides * points_per_stride]) axs[1].legend(['measured foot angle', 'calculated foot angle']) axs[1].grid(True) plt.show()
# Inheritance in coding is when one "child" class receives # all of the methods and attributes of another "parent" class class Test: def __init__(self): self.x = 0 # class Derived_Test inherits from class Test class Derived_Test(Test): def __init__(self): Test.__init__(self) # do Test's __init__ method # Test's __init__ gives Derived_Test the attribute 'x' self.y = 1 b = Derived_Test() # Derived_Test now has an attribute "x", even though # it originally didn't print(b.x, b.y)
class Test: def __init__(self): self.x = 0 class Derived_Test(Test): def __init__(self): Test.__init__(self) self.y = 1 b = derived__test() print(b.x, b.y)
DEFAULT_NUM_IMAGES = 40 LOWER_LIMIT = 0 UPPER_LIMIT = 100 class MissingConfigException(Exception): pass class ImageLimitException(Exception): pass def init(config): if (config is None): raise MissingConfigException() raise NotImplementedError def download(num_images): images_to_download = num_images if num_images is None: images_to_download = DEFAULT_NUM_IMAGES if images_to_download <= LOWER_LIMIT or images_to_download > UPPER_LIMIT: raise ImageLimitException() return images_to_download def upload(): raise NotImplementedError() def abandon(): raise NotImplementedError()
default_num_images = 40 lower_limit = 0 upper_limit = 100 class Missingconfigexception(Exception): pass class Imagelimitexception(Exception): pass def init(config): if config is None: raise missing_config_exception() raise NotImplementedError def download(num_images): images_to_download = num_images if num_images is None: images_to_download = DEFAULT_NUM_IMAGES if images_to_download <= LOWER_LIMIT or images_to_download > UPPER_LIMIT: raise image_limit_exception() return images_to_download def upload(): raise not_implemented_error() def abandon(): raise not_implemented_error()
#new file as required print ('ne1') print ('ne2') #C:\Users\kpmis\OneDrive\Documents\GitHub\wowmeter\new1.py
print('ne1') print('ne2')
def includeme(config): config.add_static_view('static', 'static', cache_max_age=0) config.add_route('home', '/') config.add_route('auth', '/auth') config.add_route('add-stock', '/add-stock') config.add_route('logout', '/logout') config.add_route('portfolio', '/portfolio') config.add_route('stock_detail', '/portfolio/{symbol}')
def includeme(config): config.add_static_view('static', 'static', cache_max_age=0) config.add_route('home', '/') config.add_route('auth', '/auth') config.add_route('add-stock', '/add-stock') config.add_route('logout', '/logout') config.add_route('portfolio', '/portfolio') config.add_route('stock_detail', '/portfolio/{symbol}')
#! python3 # -*- coding: utf-8 -*- class OdoleniumError(Exception): def __init__(self, msg): super().__init__(msg)
class Odoleniumerror(Exception): def __init__(self, msg): super().__init__(msg)
while True: print('-' * 50) num = int(input('Quer ver a tabuada de qual valor? ')) print('-'*50) if num < 0: break for i in range(1,11): print(f'{num} x {i} = {num*i}') print('Programa finalizado. \nObrigado e volte sempre!')
while True: print('-' * 50) num = int(input('Quer ver a tabuada de qual valor? ')) print('-' * 50) if num < 0: break for i in range(1, 11): print(f'{num} x {i} = {num * i}') print('Programa finalizado. \nObrigado e volte sempre!')
def get_code_langs(): return [[164, 'MPASM', True], [165, 'MXML', True], [166, 'MySQL', True], [167, 'Nagios', True], [160, 'MIX Assembler', True], [161, 'Modula 2', True], [162, 'Modula 3', True], [163, 'Motorola 68000 HiSoft Dev', True], [173, 'NullSoft Installer', True], [174, 'Oberon 2', True], [175, 'Objeck Programming Langua', True], [168, 'NetRexx', True], [169, 'newLISP', True], [170, 'Nginx', True], [171, 'Nimrod', True], [84, 'DCL', True], [85, 'DCPU-16', True], [86, 'DCS', True], [87, 'Delphi', True], [81, 'Cuesheet', True], [82, 'D', True], [83, 'Dart', True], [92, 'E', True], [93, 'Easytrieve', True], [94, 'ECMAScript', True], [95, 'Eiffel', True], [88, 'Delphi Prism (Oxygene)', True], [89, 'Diff', True], [90, 'DIV', True], [91, 'DOT', True], [68, 'CAD Lisp', True], [69, 'Ceylon', True], [70, 'CFDG', True], [71, 'ChaiScript', True], [64, 'C++ WinAPI', True], [65, 'C++ with Qt extensions', True], [66, 'C: Loadrunner', True], [67, 'CAD DCL', True], [76, 'CMake', True], [77, 'COBOL', True], [78, 'CoffeeScript', True], [79, 'ColdFusion', True], [72, 'Chapel', True], [73, 'Clojure', True], [74, 'Clone C', True], [75, 'Clone C++', True], [116, 'GwBasic', True], [117, 'Haskell', True], [118, 'Haxe', True], [119, 'HicEst', True], [112, 'Genie', True], [113, 'GetText', True], [114, 'Go', True], [115, 'Groovy', True], [124, 'IDL', True], [125, 'INI file', True], [126, 'Inno Script', True], [127, 'INTERCAL', True], [120, 'HQ9 Plus', True], [122, 'HTML 5', True], [123, 'Icon', True], [100, 'F#', True], [101, 'Falcon', True], [102, 'Filemaker', True], [103, 'FO Language', True], [96, 'Email', True], [97, 'EPC', True], [98, 'Erlang', True], [99, 'Euphoria', True], [108, 'GAMBAS', True], [109, 'Game Maker', True], [110, 'GDB', True], [111, 'Genero', True], [104, 'Formula One', True], [105, 'Fortran', True], [106, 'FreeBasic', True], [107, 'FreeSWITCH', True], [20, '6502 ACME Cross Assembler', True], [21, '6502 Kick Assembler', True], [22, '6502 TASM/64TASS', True], [23, 'ABAP', True], [16, 'Python', True], [17, 'Ruby', True], [18, 'Swift', True], [19, '4CS', True], [28, 'ALGOL 68', True], [29, 'Apache Log', True], [30, 'AppleScript', True], [31, 'APT Sources', True], [24, 'ActionScript', True], [25, 'ActionScript 3', True], [26, 'Ada', True], [27, 'AIMMS', True], [4, 'C#', True], [5, 'C++', True], [6, 'CSS', True], [7, 'HTML', True], [1, 'None', True], [2, 'Bash', True], [3, 'C', True], [12, 'Markdown', True], [13, 'Objective C', True], [14, 'Perl', True], [15, 'PHP', True], [8, 'Java', True], [9, 'JavaScript', True], [10, 'JSON', True], [11, 'Lua', True], [52, 'Blitz Basic', True], [53, 'Blitz3D', True], [54, 'BlitzMax', True], [55, 'BNF', True], [49, 'Basic4GL', True], [50, 'Batch', True], [51, 'BibTeX', True], [60, 'C for Macs', True], [61, 'C Intermediate Language', True], [56, 'BOO', True], [57, 'BrainFuck', True], [59, 'C WinAPI', True], [36, 'autoconf', True], [37, 'Autohotkey', True], [38, 'AutoIt', True], [39, 'Avisynth', True], [32, 'ARM', True], [33, 'ASM (NASM)', True], [34, 'ASP', True], [35, 'Asymptote', True], [47, 'BASCOM AVR', True], [40, 'Awk', True], [276, 'Z80 Assembler', True], [277, 'ZXBasic', True], [272, 'XML', True], [273, 'Xorg Config', True], [274, 'XPP', True], [275, 'YAML', True], [260, 'VBScript', True], [261, 'Vedit', True], [262, 'VeriLog', True], [263, 'VHDL', True], [256, 'UPC', True], [257, 'Urbi', True], [258, 'Vala', True], [259, 'VB.NET', True], [268, 'WhiteSpace', True], [269, 'WHOIS', True], [270, 'Winbatch', True], [271, 'XBasic', True], [264, 'VIM', True], [265, 'Visual Pro Log', True], [266, 'VisualBasic', True], [267, 'VisualFoxPro', True], [212, 'Puppet', True], [213, 'PureBasic', True], [214, 'PyCon', True], [208, 'Progress', True], [209, 'Prolog', True], [210, 'Properties', True], [211, 'ProvideX', True], [220, 'R', True], [221, 'Racket', True], [222, 'Rails', True], [223, 'RBScript', True], [216, 'Python for S60', True], [217, 'q/kdb+', True], [218, 'QBasic', True], [219, 'QML', True], [196, 'PHP Brief', True], [197, 'Pic 16', True], [198, 'Pike', True], [199, 'Pixel Bender', True], [192, 'Per', True], [194, 'Perl 6', True], [204, 'POV-Ray', True], [205, 'Power Shell', True], [206, 'PowerBuilder', True], [207, 'ProFTPd', True], [200, 'PL/I', True], [201, 'PL/SQL', True], [202, 'PostgreSQL', True], [203, 'PostScript', True], [244, 'StandardML', True], [245, 'StoneScript', True], [246, 'SuperCollider', True], [240, 'SPARK', True], [241, 'SPARQL', True], [242, 'SQF', True], [243, 'SQL', True], [252, 'thinBasic', True], [253, 'TypoScript', True], [254, 'Unicon', True], [255, 'UnrealScript', True], [248, 'SystemVerilog', True], [249, 'T-SQL', True], [250, 'TCL', True], [251, 'Tera Term', True], [228, 'RPM Spec', True], [230, 'Ruby Gnuplot', True], [231, 'Rust', True], [224, 'REBOL', True], [225, 'REG', True], [226, 'Rexx', True], [227, 'Robots', True], [236, 'SCL', True], [237, 'SdlBasic', True], [238, 'Smalltalk', True], [239, 'Smarty', True], [232, 'SAS', True], [233, 'Scala', True], [234, 'Scheme', True], [235, 'Scilab', True], [148, 'LOL Code', True], [149, 'Lotus Formulas', True], [150, 'Lotus Script', True], [151, 'LScript', True], [144, 'Lisp', True], [145, 'LLVM', True], [146, 'Loco Basic', True], [147, 'Logtalk', True], [156, 'MapBasic', True], [158, 'MatLab', True], [159, 'mIRC', True], [153, 'M68000 Assembler', True], [154, 'MagikSF', True], [155, 'Make', True], [132, 'Java 5', True], [134, 'JCL', True], [135, 'jQuery', True], [128, 'IO', True], [129, 'ISPF Panel Definition', True], [130, 'J', True], [140, 'Latex', True], [141, 'LDIF', True], [142, 'Liberty BASIC', True], [143, 'Linden Scripting', True], [137, 'Julia', True], [138, 'KiXtart', True], [139, 'Kotlin', True], [180, 'Open Object Rexx', True], [181, 'OpenBSD PACKET FILTER', True], [182, 'OpenGL Shading', True], [183, 'Openoffice BASIC', True], [177, 'OCalm Brief', True], [178, 'OCaml', True], [179, 'Octave', True], [188, 'PARI/GP', True], [189, 'Pascal', True], [190, 'Pawn', True], [191, 'PCRE', True], [184, 'Oracle 11', True], [185, 'Oracle 8', True], [186, 'Oz', True], [187, 'ParaSail', True]]
def get_code_langs(): return [[164, 'MPASM', True], [165, 'MXML', True], [166, 'MySQL', True], [167, 'Nagios', True], [160, 'MIX Assembler', True], [161, 'Modula 2', True], [162, 'Modula 3', True], [163, 'Motorola 68000 HiSoft Dev', True], [173, 'NullSoft Installer', True], [174, 'Oberon 2', True], [175, 'Objeck Programming Langua', True], [168, 'NetRexx', True], [169, 'newLISP', True], [170, 'Nginx', True], [171, 'Nimrod', True], [84, 'DCL', True], [85, 'DCPU-16', True], [86, 'DCS', True], [87, 'Delphi', True], [81, 'Cuesheet', True], [82, 'D', True], [83, 'Dart', True], [92, 'E', True], [93, 'Easytrieve', True], [94, 'ECMAScript', True], [95, 'Eiffel', True], [88, 'Delphi Prism (Oxygene)', True], [89, 'Diff', True], [90, 'DIV', True], [91, 'DOT', True], [68, 'CAD Lisp', True], [69, 'Ceylon', True], [70, 'CFDG', True], [71, 'ChaiScript', True], [64, 'C++ WinAPI', True], [65, 'C++ with Qt extensions', True], [66, 'C: Loadrunner', True], [67, 'CAD DCL', True], [76, 'CMake', True], [77, 'COBOL', True], [78, 'CoffeeScript', True], [79, 'ColdFusion', True], [72, 'Chapel', True], [73, 'Clojure', True], [74, 'Clone C', True], [75, 'Clone C++', True], [116, 'GwBasic', True], [117, 'Haskell', True], [118, 'Haxe', True], [119, 'HicEst', True], [112, 'Genie', True], [113, 'GetText', True], [114, 'Go', True], [115, 'Groovy', True], [124, 'IDL', True], [125, 'INI file', True], [126, 'Inno Script', True], [127, 'INTERCAL', True], [120, 'HQ9 Plus', True], [122, 'HTML 5', True], [123, 'Icon', True], [100, 'F#', True], [101, 'Falcon', True], [102, 'Filemaker', True], [103, 'FO Language', True], [96, 'Email', True], [97, 'EPC', True], [98, 'Erlang', True], [99, 'Euphoria', True], [108, 'GAMBAS', True], [109, 'Game Maker', True], [110, 'GDB', True], [111, 'Genero', True], [104, 'Formula One', True], [105, 'Fortran', True], [106, 'FreeBasic', True], [107, 'FreeSWITCH', True], [20, '6502 ACME Cross Assembler', True], [21, '6502 Kick Assembler', True], [22, '6502 TASM/64TASS', True], [23, 'ABAP', True], [16, 'Python', True], [17, 'Ruby', True], [18, 'Swift', True], [19, '4CS', True], [28, 'ALGOL 68', True], [29, 'Apache Log', True], [30, 'AppleScript', True], [31, 'APT Sources', True], [24, 'ActionScript', True], [25, 'ActionScript 3', True], [26, 'Ada', True], [27, 'AIMMS', True], [4, 'C#', True], [5, 'C++', True], [6, 'CSS', True], [7, 'HTML', True], [1, 'None', True], [2, 'Bash', True], [3, 'C', True], [12, 'Markdown', True], [13, 'Objective C', True], [14, 'Perl', True], [15, 'PHP', True], [8, 'Java', True], [9, 'JavaScript', True], [10, 'JSON', True], [11, 'Lua', True], [52, 'Blitz Basic', True], [53, 'Blitz3D', True], [54, 'BlitzMax', True], [55, 'BNF', True], [49, 'Basic4GL', True], [50, 'Batch', True], [51, 'BibTeX', True], [60, 'C for Macs', True], [61, 'C Intermediate Language', True], [56, 'BOO', True], [57, 'BrainFuck', True], [59, 'C WinAPI', True], [36, 'autoconf', True], [37, 'Autohotkey', True], [38, 'AutoIt', True], [39, 'Avisynth', True], [32, 'ARM', True], [33, 'ASM (NASM)', True], [34, 'ASP', True], [35, 'Asymptote', True], [47, 'BASCOM AVR', True], [40, 'Awk', True], [276, 'Z80 Assembler', True], [277, 'ZXBasic', True], [272, 'XML', True], [273, 'Xorg Config', True], [274, 'XPP', True], [275, 'YAML', True], [260, 'VBScript', True], [261, 'Vedit', True], [262, 'VeriLog', True], [263, 'VHDL', True], [256, 'UPC', True], [257, 'Urbi', True], [258, 'Vala', True], [259, 'VB.NET', True], [268, 'WhiteSpace', True], [269, 'WHOIS', True], [270, 'Winbatch', True], [271, 'XBasic', True], [264, 'VIM', True], [265, 'Visual Pro Log', True], [266, 'VisualBasic', True], [267, 'VisualFoxPro', True], [212, 'Puppet', True], [213, 'PureBasic', True], [214, 'PyCon', True], [208, 'Progress', True], [209, 'Prolog', True], [210, 'Properties', True], [211, 'ProvideX', True], [220, 'R', True], [221, 'Racket', True], [222, 'Rails', True], [223, 'RBScript', True], [216, 'Python for S60', True], [217, 'q/kdb+', True], [218, 'QBasic', True], [219, 'QML', True], [196, 'PHP Brief', True], [197, 'Pic 16', True], [198, 'Pike', True], [199, 'Pixel Bender', True], [192, 'Per', True], [194, 'Perl 6', True], [204, 'POV-Ray', True], [205, 'Power Shell', True], [206, 'PowerBuilder', True], [207, 'ProFTPd', True], [200, 'PL/I', True], [201, 'PL/SQL', True], [202, 'PostgreSQL', True], [203, 'PostScript', True], [244, 'StandardML', True], [245, 'StoneScript', True], [246, 'SuperCollider', True], [240, 'SPARK', True], [241, 'SPARQL', True], [242, 'SQF', True], [243, 'SQL', True], [252, 'thinBasic', True], [253, 'TypoScript', True], [254, 'Unicon', True], [255, 'UnrealScript', True], [248, 'SystemVerilog', True], [249, 'T-SQL', True], [250, 'TCL', True], [251, 'Tera Term', True], [228, 'RPM Spec', True], [230, 'Ruby Gnuplot', True], [231, 'Rust', True], [224, 'REBOL', True], [225, 'REG', True], [226, 'Rexx', True], [227, 'Robots', True], [236, 'SCL', True], [237, 'SdlBasic', True], [238, 'Smalltalk', True], [239, 'Smarty', True], [232, 'SAS', True], [233, 'Scala', True], [234, 'Scheme', True], [235, 'Scilab', True], [148, 'LOL Code', True], [149, 'Lotus Formulas', True], [150, 'Lotus Script', True], [151, 'LScript', True], [144, 'Lisp', True], [145, 'LLVM', True], [146, 'Loco Basic', True], [147, 'Logtalk', True], [156, 'MapBasic', True], [158, 'MatLab', True], [159, 'mIRC', True], [153, 'M68000 Assembler', True], [154, 'MagikSF', True], [155, 'Make', True], [132, 'Java 5', True], [134, 'JCL', True], [135, 'jQuery', True], [128, 'IO', True], [129, 'ISPF Panel Definition', True], [130, 'J', True], [140, 'Latex', True], [141, 'LDIF', True], [142, 'Liberty BASIC', True], [143, 'Linden Scripting', True], [137, 'Julia', True], [138, 'KiXtart', True], [139, 'Kotlin', True], [180, 'Open Object Rexx', True], [181, 'OpenBSD PACKET FILTER', True], [182, 'OpenGL Shading', True], [183, 'Openoffice BASIC', True], [177, 'OCalm Brief', True], [178, 'OCaml', True], [179, 'Octave', True], [188, 'PARI/GP', True], [189, 'Pascal', True], [190, 'Pawn', True], [191, 'PCRE', True], [184, 'Oracle 11', True], [185, 'Oracle 8', True], [186, 'Oz', True], [187, 'ParaSail', True]]
''' TODO: def get_wrapper def get_optimizer '''
""" TODO: def get_wrapper def get_optimizer """
_base_ = 'fcos_r50_caffe_fpn_gn-head_1x_coco.py' model = dict( pretrained='open-mmlab://detectron2/resnet50_caffe', backbone=dict( dcn=dict(type='DCNv2', deform_groups=1, fallback_on_stride=False), stage_with_dcn=(False, True, True, True)), bbox_head=dict( norm_on_bbox=True, centerness_on_reg=True, dcn_on_last_conv=True, center_sampling=True, conv_bias=True, loss_bbox=dict(type='GIoULoss', loss_weight=1.0)), # training and testing settings test_cfg=dict(nms=dict(type='nms', iou_threshold=0.6), max_per_img=300)) # dataset settings img_norm_cfg = dict( mean=[103.530, 116.280, 123.675], std=[1.0, 1.0, 1.0], to_rgb=False) train_pipeline = [ dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', with_bbox=True), dict(type='Resize', img_scale=(1333, 800), keep_ratio=True), dict(type='RandomFlip', flip_ratio=0.5), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']), ] test_pipeline = [ dict(type='LoadImageFromFile'), dict( type='MultiScaleFlipAug', img_scale=(1333, 800), flip=False, transforms=[ dict(type='Resize', keep_ratio=True), dict(type='RandomFlip'), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='ImageToTensor', keys=['img']), dict(type='Collect', keys=['img']), ]) ] # optimizer optimizer = dict(type='SGD', lr=0.005, momentum=0.9, weight_decay=0.0001) # optimizer_config = dict(grad_clip=None) optimizer_config = dict(_delete_=True, grad_clip=None) # learning policy lr_config = dict( policy='step', warmup='linear', warmup_iters=2000, warmup_ratio=0.001, step=[16, 19]) total_epochs = 22 dataset_type = 'CocoDataset' data = dict( samples_per_gpu=4, workers_per_gpu=4, train=dict( type=dataset_type, # ann_file="data/patch_visdrone/train/train.json", # img_prefix="data/patch_visdrone/train/images", # ann_file="data/crop_coco/train/train.json", # img_prefix="data/crop_coco/train/images", ann_file="data/visdrone_coco/train/train.json", img_prefix="data/visdrone_coco/train/images", pipeline=train_pipeline), val=dict( type=dataset_type, ann_file="data/visdrone_coco/val/val.json", img_prefix="data/visdrone_coco/val/images", pipeline=test_pipeline), test=dict( type=dataset_type, # img_prefix="data/visdrone_coco/test_dev/images", # ann_file="data/visdrone_coco/test_dev/test_dev.json", ann_file="data/visdrone_coco/val/val.json", img_prefix="data/visdrone_coco/val/images", pipeline=test_pipeline))
_base_ = 'fcos_r50_caffe_fpn_gn-head_1x_coco.py' model = dict(pretrained='open-mmlab://detectron2/resnet50_caffe', backbone=dict(dcn=dict(type='DCNv2', deform_groups=1, fallback_on_stride=False), stage_with_dcn=(False, True, True, True)), bbox_head=dict(norm_on_bbox=True, centerness_on_reg=True, dcn_on_last_conv=True, center_sampling=True, conv_bias=True, loss_bbox=dict(type='GIoULoss', loss_weight=1.0)), test_cfg=dict(nms=dict(type='nms', iou_threshold=0.6), max_per_img=300)) img_norm_cfg = dict(mean=[103.53, 116.28, 123.675], std=[1.0, 1.0, 1.0], to_rgb=False) train_pipeline = [dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', with_bbox=True), dict(type='Resize', img_scale=(1333, 800), keep_ratio=True), dict(type='RandomFlip', flip_ratio=0.5), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels'])] test_pipeline = [dict(type='LoadImageFromFile'), dict(type='MultiScaleFlipAug', img_scale=(1333, 800), flip=False, transforms=[dict(type='Resize', keep_ratio=True), dict(type='RandomFlip'), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='ImageToTensor', keys=['img']), dict(type='Collect', keys=['img'])])] optimizer = dict(type='SGD', lr=0.005, momentum=0.9, weight_decay=0.0001) optimizer_config = dict(_delete_=True, grad_clip=None) lr_config = dict(policy='step', warmup='linear', warmup_iters=2000, warmup_ratio=0.001, step=[16, 19]) total_epochs = 22 dataset_type = 'CocoDataset' data = dict(samples_per_gpu=4, workers_per_gpu=4, train=dict(type=dataset_type, ann_file='data/visdrone_coco/train/train.json', img_prefix='data/visdrone_coco/train/images', pipeline=train_pipeline), val=dict(type=dataset_type, ann_file='data/visdrone_coco/val/val.json', img_prefix='data/visdrone_coco/val/images', pipeline=test_pipeline), test=dict(type=dataset_type, ann_file='data/visdrone_coco/val/val.json', img_prefix='data/visdrone_coco/val/images', pipeline=test_pipeline))
#!/usr/bin/env python3 bank = [0, 2, 7, 0] bank = [0, 5, 10, 0, 11, 14, 13, 4, 11, 8, 8, 7, 1, 4, 12, 11] visited = {} steps = 0 l = len(bank) while tuple(bank) not in visited: visited[tuple(bank)] = steps m = max(bank) i = bank.index(m) bank[i] = 0 # Set the item to 0 quotient = m // l bank = [x + quotient for x in bank] # Evenly distribute quotient remainder = m % l arr = [1] * (remainder) + [0] * (l - remainder) arr = arr[-i-1:] + arr[:-i-1] bank = [x+y for x, y in zip(bank, arr)] steps += 1 print (steps, steps - visited[tuple(bank)]) # Step1, Step2
bank = [0, 2, 7, 0] bank = [0, 5, 10, 0, 11, 14, 13, 4, 11, 8, 8, 7, 1, 4, 12, 11] visited = {} steps = 0 l = len(bank) while tuple(bank) not in visited: visited[tuple(bank)] = steps m = max(bank) i = bank.index(m) bank[i] = 0 quotient = m // l bank = [x + quotient for x in bank] remainder = m % l arr = [1] * remainder + [0] * (l - remainder) arr = arr[-i - 1:] + arr[:-i - 1] bank = [x + y for (x, y) in zip(bank, arr)] steps += 1 print(steps, steps - visited[tuple(bank)])
def reorder_boxes(boxes): boxes.sort() ans = list() for i in range(len(boxes) - 1, -1, -2): if i - 1 >= 0: ans.append(boxes[i] + boxes[i - 1]) else: ans.append(boxes[i]) return ans print(reorder_boxes([1, 2, 3, 4, 5, 6, 7]))
def reorder_boxes(boxes): boxes.sort() ans = list() for i in range(len(boxes) - 1, -1, -2): if i - 1 >= 0: ans.append(boxes[i] + boxes[i - 1]) else: ans.append(boxes[i]) return ans print(reorder_boxes([1, 2, 3, 4, 5, 6, 7]))
def sleep(seconds: float): pass def sleep_ms(millis: int): pass def sleep_us(micros: int): pass
def sleep(seconds: float): pass def sleep_ms(millis: int): pass def sleep_us(micros: int): pass
for i in range(1, 11): for j in range(1, 11): a = i * j if a < 10: a = " " + str(a) elif a < 100: a = " " + str(a) else: a = str(a) print(a, end=" ") print()
for i in range(1, 11): for j in range(1, 11): a = i * j if a < 10: a = ' ' + str(a) elif a < 100: a = ' ' + str(a) else: a = str(a) print(a, end=' ') print()
class GaiaUtils: @staticmethod def convert_positive_int(param): param = int(param) if param < 1: raise ValueError return param
class Gaiautils: @staticmethod def convert_positive_int(param): param = int(param) if param < 1: raise ValueError return param
A_CONSTANT = 45 def a_sum_function(a: int, b: int) -> int: return a + b def a_mult_function(a: int, b: int) -> int: return a * b class ACarClass: def __init__(self, color: str, speed: int): self.color = color self.speed = speed def describe(self) -> str: return f'I am a {self.color} car, with a speed of {self.speed} km/h'
a_constant = 45 def a_sum_function(a: int, b: int) -> int: return a + b def a_mult_function(a: int, b: int) -> int: return a * b class Acarclass: def __init__(self, color: str, speed: int): self.color = color self.speed = speed def describe(self) -> str: return f'I am a {self.color} car, with a speed of {self.speed} km/h'
# Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def getIntersectionNode(self, headA, headB): ha, hb = headA, headB while ha != hb: ha = ha.next if ha else headB hb = hb.next if hb else headA return ha
class Solution(object): def get_intersection_node(self, headA, headB): (ha, hb) = (headA, headB) while ha != hb: ha = ha.next if ha else headB hb = hb.next if hb else headA return ha
AUTHOR = 'Sage Bionetworks' SITENAME = 'Sage Bionetworks Developer Handbook' SITEURL = '' PATH = 'content' TIMEZONE = 'America/Los_Angeles' DEFAULT_LANG = 'en' # Feed generation is usually not desired when developing # FEED_ALL_ATOM = None # CATEGORY_FEED_ATOM = None # TRANSLATION_FEED_ATOM = None # AUTHOR_FEED_ATOM = None # AUTHOR_FEED_RSS = None # Blogroll # LINKS = (('Pelican', 'https://getpelican.com/'), # ('Python.org', 'https://www.python.org/'), # ('Jinja2', 'https://palletsprojects.com/p/jinja/'), # ('You can modify those links in your config file', '#'),) # Social widget # SOCIAL = (('You can add links in your config file', '#'), # ('Another social link', '#'),) DEFAULT_PAGINATION = False #THEME = 'simple' # Uncomment following line if you want document-relative URLs when developing #RELATIVE_URLS = True
author = 'Sage Bionetworks' sitename = 'Sage Bionetworks Developer Handbook' siteurl = '' path = 'content' timezone = 'America/Los_Angeles' default_lang = 'en' default_pagination = False
''' Author: jianzhnie Date: 2022-01-24 11:36:20 LastEditTime: 2022-01-24 11:36:21 LastEditors: jianzhnie Description: '''
""" Author: jianzhnie Date: 2022-01-24 11:36:20 LastEditTime: 2022-01-24 11:36:21 LastEditors: jianzhnie Description: """
jogador = {} lista = [] total = 0 jogador['Nome'] = input('Nome do jogador: ') quantidade = int(input('Quantas partidas {} jogou ? '.format(jogador['Nome']))) for i in range(0, quantidade): gol_quantidade = int(input('Quantos gols na partida {} ? '.format(i + 1))) total += gol_quantidade lista.append(gol_quantidade) jogador['Gols'] = lista jogador['Total'] = total print('-=' * 30) print(jogador) print('-=' * 30) for k, v in jogador.items(): print('O campo {} tem valor {}'.format(k, v)) print('-=' * 30) print('O jogador {} jogor {} partidas'.format(jogador['Nome'], quantidade)) for i, valor in enumerate(jogador['Gols']): print(' => Na partida {} , fez {} gols'.format(i + 1, valor)) print('Foi um total de {} gols'.format(total))
jogador = {} lista = [] total = 0 jogador['Nome'] = input('Nome do jogador: ') quantidade = int(input('Quantas partidas {} jogou ? '.format(jogador['Nome']))) for i in range(0, quantidade): gol_quantidade = int(input('Quantos gols na partida {} ? '.format(i + 1))) total += gol_quantidade lista.append(gol_quantidade) jogador['Gols'] = lista jogador['Total'] = total print('-=' * 30) print(jogador) print('-=' * 30) for (k, v) in jogador.items(): print('O campo {} tem valor {}'.format(k, v)) print('-=' * 30) print('O jogador {} jogor {} partidas'.format(jogador['Nome'], quantidade)) for (i, valor) in enumerate(jogador['Gols']): print(' => Na partida {} , fez {} gols'.format(i + 1, valor)) print('Foi um total de {} gols'.format(total))
def my_sum(*args): # *args = 1, 2, 3 print(type(args)) print(args) return sum(args) def my_sum_2(args): # args = [1, 2, 3] return sum(args) print(my_sum(1, 2, 3)) # a # my_sum([1, 2, 3]) # b # my_sum_2(1, 2, 3) # c print(my_sum_2([1, 2, 3])) # d _, *args = 0, 1, 2, 3 args_2 = [1, 2, 3] print(args) print(args_2)
def my_sum(*args): print(type(args)) print(args) return sum(args) def my_sum_2(args): return sum(args) print(my_sum(1, 2, 3)) print(my_sum_2([1, 2, 3])) (_, *args) = (0, 1, 2, 3) args_2 = [1, 2, 3] print(args) print(args_2)
#!/usr/bin/python3 def Encrypt(K, P): cipher = [] for letter in P: cipher.append(chr((ord(letter) - 65 + K) % 26 + 65)) return "".join(cipher) def disp(K): for i in range(0, 25): print(chr(i + 65), end=" ") print() for i in range(0, 25): print(chr((i + K) % 26 + 65), end=" ") print() def main(): print("Ceaser Cipher Encryption Alg") key = int(input("Enter Key: ")) disp(key) plain_text = input("Enter Plain Text: ").upper() cipher_text = Encrypt(key, plain_text) print(cipher_text) if __name__ == "__main__": main()
def encrypt(K, P): cipher = [] for letter in P: cipher.append(chr((ord(letter) - 65 + K) % 26 + 65)) return ''.join(cipher) def disp(K): for i in range(0, 25): print(chr(i + 65), end=' ') print() for i in range(0, 25): print(chr((i + K) % 26 + 65), end=' ') print() def main(): print('Ceaser Cipher Encryption Alg') key = int(input('Enter Key: ')) disp(key) plain_text = input('Enter Plain Text: ').upper() cipher_text = encrypt(key, plain_text) print(cipher_text) if __name__ == '__main__': main()
sample = { "asset": { "ancestors": [ "projects/163454223397", "organizations/673763744309" ], "assetType": "compute.googleapis.com/Instance", "name": "//compute.googleapis.com/projects/sc-vice-test/zones/us-central1-a/instances/instance-1", "resource": { "data": { "allocationAffinity": { "consumeAllocationType": "ANY_ALLOCATION" }, "canIpForward": False, "confidentialInstanceConfig": { "enableConfidentialCompute": False }, "cpuPlatform": "Unknown CPU Platform", "creationTimestamp": "2021-04-22T13:51:49.576-07:00", "deletionProtection": False, "description": "", "disks": [ { "autoDelete": True, "boot": True, "deviceName": "instance-1", "diskSizeGb": "10", "guestOsFeatures": [ { "type": "UEFI_COMPATIBLE" }, { "type": "VIRTIO_SCSI_MULTIQUEUE" } ], "index": 0, "interface": "SCSI", "licenses": [ "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-10-buster" ], "mode": "READ_WRITE", "source": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a/disks/instance-1", "type": "PERSISTENT" } ], "displayDevice": { "enableDisplay": False }, "fingerprint": "kklxPt7MzL8=", "id": "4486036186437803787", "labelFingerprint": "42WmSpB8rSM=", "machineType": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a/machineTypes/e2-medium", "name": "instance-1", "networkInterfaces": [ { "accessConfigs": [ { "name": "External NAT", "natIP": "108.59.84.233", "networkTier": "PREMIUM", "type": "ONE_TO_ONE_NAT" } ], "fingerprint": "3XxnerGjaPY=", "name": "nic0", "network": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/global/networks/default", "networkIP": "10.128.0.2", "subnetwork": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/regions/us-central1/subnetworks/default" } ], "scheduling": { "automaticRestart": True, "onHostMaintenance": "MIGRATE", "preemptible": False }, "selfLink": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a/instances/instance-1", "serviceAccounts": [ { "email": "[email protected]", "scopes": [ "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/logging.write", "https://www.googleapis.com/auth/monitoring.write", "https://www.googleapis.com/auth/servicecontrol", "https://www.googleapis.com/auth/service.management.readonly", "https://www.googleapis.com/auth/trace.append" ] } ], "shieldedInstanceConfig": { "enableIntegrityMonitoring": True, "enableSecureBoot": False, "enableVtpm": True }, "shieldedInstanceIntegrityPolicy": { "updateAutoLearnPolicy": True }, "startRestricted": False, "status": "STAGING", "tags": { "fingerprint": "42WmSpB8rSM=" }, "zone": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a" }, "discoveryDocumentUri": "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest", "discoveryName": "Instance", "location": "us-central1-a", "parent": "//cloudresourcemanager.googleapis.com/projects/163454223397", "version": "v1" }, "updateTime": "2021-04-22T20:51:50.801629Z" }, "priorAsset": { "ancestors": [ "projects/163454223397", "organizations/673763744309" ], "assetType": "compute.googleapis.com/Instance", "name": "//compute.googleapis.com/projects/sc-vice-test/zones/us-central1-a/instances/instance-1", "resource": { "data": { "allocationAffinity": { "consumeAllocationType": "ANY_ALLOCATION" }, "canIpForward": False, "confidentialInstanceConfig": { "enableConfidentialCompute": False }, "cpuPlatform": "Unknown CPU Platform", "creationTimestamp": "2021-04-22T13:51:49.576-07:00", "deletionProtection": False, "description": "", "disks": [ { "autoDelete": True, "boot": True, "deviceName": "instance-1", "diskSizeGb": "10", "guestOsFeatures": [ { "type": "UEFI_COMPATIBLE" }, { "type": "VIRTIO_SCSI_MULTIQUEUE" } ], "index": 0, "interface": "SCSI", "licenses": [ "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-10-buster" ], "mode": "READ_WRITE", "source": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a/disks/instance-1", "type": "PERSISTENT" } ], "displayDevice": { "enableDisplay": False }, "fingerprint": "IbogiVywfFU=", "id": "4486036186437803787", "labelFingerprint": "42WmSpB8rSM=", "machineType": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a/machineTypes/e2-medium", "name": "instance-1", "networkInterfaces": [ { "accessConfigs": [ { "name": "External NAT", "networkTier": "PREMIUM", "type": "ONE_TO_ONE_NAT" } ], "fingerprint": "bQWv9c5Re9E=", "name": "nic0", "network": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/global/networks/default", "subnetwork": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/regions/us-central1/subnetworks/default" } ], "scheduling": { "automaticRestart": True, "onHostMaintenance": "MIGRATE", "preemptible": False }, "selfLink": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a/instances/instance-1", "serviceAccounts": [ { "email": "[email protected]", "scopes": [ "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/logging.write", "https://www.googleapis.com/auth/monitoring.write", "https://www.googleapis.com/auth/servicecontrol", "https://www.googleapis.com/auth/service.management.readonly", "https://www.googleapis.com/auth/trace.append" ] } ], "shieldedInstanceConfig": { "enableIntegrityMonitoring": True, "enableSecureBoot": False, "enableVtpm": True }, "shieldedInstanceIntegrityPolicy": { "updateAutoLearnPolicy": True }, "startRestricted": False, "status": "PROVISIONING", "tags": { "fingerprint": "42WmSpB8rSM=" }, "zone": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a" }, "discoveryDocumentUri": "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest", "discoveryName": "Instance", "location": "us-central1-a", "parent": "//cloudresourcemanager.googleapis.com/projects/163454223397", "version": "v1" }, "updateTime": "2021-04-22T20:51:49.759449Z" }, "priorAssetState": "PRESENT", "window": { "startTime": "2021-04-22T20:51:50.801629Z" } }
sample = {'asset': {'ancestors': ['projects/163454223397', 'organizations/673763744309'], 'assetType': 'compute.googleapis.com/Instance', 'name': '//compute.googleapis.com/projects/sc-vice-test/zones/us-central1-a/instances/instance-1', 'resource': {'data': {'allocationAffinity': {'consumeAllocationType': 'ANY_ALLOCATION'}, 'canIpForward': False, 'confidentialInstanceConfig': {'enableConfidentialCompute': False}, 'cpuPlatform': 'Unknown CPU Platform', 'creationTimestamp': '2021-04-22T13:51:49.576-07:00', 'deletionProtection': False, 'description': '', 'disks': [{'autoDelete': True, 'boot': True, 'deviceName': 'instance-1', 'diskSizeGb': '10', 'guestOsFeatures': [{'type': 'UEFI_COMPATIBLE'}, {'type': 'VIRTIO_SCSI_MULTIQUEUE'}], 'index': 0, 'interface': 'SCSI', 'licenses': ['https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-10-buster'], 'mode': 'READ_WRITE', 'source': 'https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a/disks/instance-1', 'type': 'PERSISTENT'}], 'displayDevice': {'enableDisplay': False}, 'fingerprint': 'kklxPt7MzL8=', 'id': '4486036186437803787', 'labelFingerprint': '42WmSpB8rSM=', 'machineType': 'https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a/machineTypes/e2-medium', 'name': 'instance-1', 'networkInterfaces': [{'accessConfigs': [{'name': 'External NAT', 'natIP': '108.59.84.233', 'networkTier': 'PREMIUM', 'type': 'ONE_TO_ONE_NAT'}], 'fingerprint': '3XxnerGjaPY=', 'name': 'nic0', 'network': 'https://www.googleapis.com/compute/v1/projects/sc-vice-test/global/networks/default', 'networkIP': '10.128.0.2', 'subnetwork': 'https://www.googleapis.com/compute/v1/projects/sc-vice-test/regions/us-central1/subnetworks/default'}], 'scheduling': {'automaticRestart': True, 'onHostMaintenance': 'MIGRATE', 'preemptible': False}, 'selfLink': 'https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a/instances/instance-1', 'serviceAccounts': [{'email': '[email protected]', 'scopes': ['https://www.googleapis.com/auth/devstorage.read_only', 'https://www.googleapis.com/auth/logging.write', 'https://www.googleapis.com/auth/monitoring.write', 'https://www.googleapis.com/auth/servicecontrol', 'https://www.googleapis.com/auth/service.management.readonly', 'https://www.googleapis.com/auth/trace.append']}], 'shieldedInstanceConfig': {'enableIntegrityMonitoring': True, 'enableSecureBoot': False, 'enableVtpm': True}, 'shieldedInstanceIntegrityPolicy': {'updateAutoLearnPolicy': True}, 'startRestricted': False, 'status': 'STAGING', 'tags': {'fingerprint': '42WmSpB8rSM='}, 'zone': 'https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a'}, 'discoveryDocumentUri': 'https://www.googleapis.com/discovery/v1/apis/compute/v1/rest', 'discoveryName': 'Instance', 'location': 'us-central1-a', 'parent': '//cloudresourcemanager.googleapis.com/projects/163454223397', 'version': 'v1'}, 'updateTime': '2021-04-22T20:51:50.801629Z'}, 'priorAsset': {'ancestors': ['projects/163454223397', 'organizations/673763744309'], 'assetType': 'compute.googleapis.com/Instance', 'name': '//compute.googleapis.com/projects/sc-vice-test/zones/us-central1-a/instances/instance-1', 'resource': {'data': {'allocationAffinity': {'consumeAllocationType': 'ANY_ALLOCATION'}, 'canIpForward': False, 'confidentialInstanceConfig': {'enableConfidentialCompute': False}, 'cpuPlatform': 'Unknown CPU Platform', 'creationTimestamp': '2021-04-22T13:51:49.576-07:00', 'deletionProtection': False, 'description': '', 'disks': [{'autoDelete': True, 'boot': True, 'deviceName': 'instance-1', 'diskSizeGb': '10', 'guestOsFeatures': [{'type': 'UEFI_COMPATIBLE'}, {'type': 'VIRTIO_SCSI_MULTIQUEUE'}], 'index': 0, 'interface': 'SCSI', 'licenses': ['https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-10-buster'], 'mode': 'READ_WRITE', 'source': 'https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a/disks/instance-1', 'type': 'PERSISTENT'}], 'displayDevice': {'enableDisplay': False}, 'fingerprint': 'IbogiVywfFU=', 'id': '4486036186437803787', 'labelFingerprint': '42WmSpB8rSM=', 'machineType': 'https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a/machineTypes/e2-medium', 'name': 'instance-1', 'networkInterfaces': [{'accessConfigs': [{'name': 'External NAT', 'networkTier': 'PREMIUM', 'type': 'ONE_TO_ONE_NAT'}], 'fingerprint': 'bQWv9c5Re9E=', 'name': 'nic0', 'network': 'https://www.googleapis.com/compute/v1/projects/sc-vice-test/global/networks/default', 'subnetwork': 'https://www.googleapis.com/compute/v1/projects/sc-vice-test/regions/us-central1/subnetworks/default'}], 'scheduling': {'automaticRestart': True, 'onHostMaintenance': 'MIGRATE', 'preemptible': False}, 'selfLink': 'https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a/instances/instance-1', 'serviceAccounts': [{'email': '[email protected]', 'scopes': ['https://www.googleapis.com/auth/devstorage.read_only', 'https://www.googleapis.com/auth/logging.write', 'https://www.googleapis.com/auth/monitoring.write', 'https://www.googleapis.com/auth/servicecontrol', 'https://www.googleapis.com/auth/service.management.readonly', 'https://www.googleapis.com/auth/trace.append']}], 'shieldedInstanceConfig': {'enableIntegrityMonitoring': True, 'enableSecureBoot': False, 'enableVtpm': True}, 'shieldedInstanceIntegrityPolicy': {'updateAutoLearnPolicy': True}, 'startRestricted': False, 'status': 'PROVISIONING', 'tags': {'fingerprint': '42WmSpB8rSM='}, 'zone': 'https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a'}, 'discoveryDocumentUri': 'https://www.googleapis.com/discovery/v1/apis/compute/v1/rest', 'discoveryName': 'Instance', 'location': 'us-central1-a', 'parent': '//cloudresourcemanager.googleapis.com/projects/163454223397', 'version': 'v1'}, 'updateTime': '2021-04-22T20:51:49.759449Z'}, 'priorAssetState': 'PRESENT', 'window': {'startTime': '2021-04-22T20:51:50.801629Z'}}