content
stringlengths
7
1.05M
''' Backward method to solve 1D reaction-diffusion equation: u_t = k * u_xx with Neumann boundary conditions at x=0: u_x(0,t) = 0 = sin(2*np.pi) at x=L: u_x(L,t) = 0 = sin(2*np.pi) with L = 1 and initial conditions: u(x,0) = (1.0/2.0)+ np.cos(2.0*np.pi*x) - (1.0/2.0)*np.cos(3*np.pi*x) u_x(x,t) = (-4.0*(...
test_input = """7,4,9,5,11,17,23,2,0,14,21,24,10,16,13,6,15,25,12,22,18,20,8,19,3,26,1 22 13 17 11 0 8 2 23 4 24 21 9 14 16 7 6 10 3 18 5 1 12 20 15 19 3 15 0 2 22 9 18 13 17 5 19 8 7 25 23 20 11 10 24 4 14 21 16 12 6 14 21 17 24 4 10 16 15 9 19 18 8 23 26 20 22 11 13 6 5 2 0 12 3 7 """ ...
#!/usr/bin/python3 ''' Program: This is a table of environment variable of deep learning python. Usage: import DL_conf.py // in your deep learning python program editor Jacob975 20180123 ################################# update log 20180123 version alpha 1: Hello!, just a test ''' # Comment of what ki...
n = int(input()) i = 2 while n != 1: if n%i == 0: n//=i;print(i) else: i+=1
def extractAdamantineDragonintheCrystalWorld(item): """ """ vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol or frag) or 'preview' in item['title'].lower(): return None if 'Crystal World' in item['tags']: return buildReleaseMessageWithType(item, 'Adamantine Dragon i...
class ManipulationDelta(object): """ Contains transformation data that is accumulated when manipulation events occur. ManipulationDelta(translation: Vector,rotation: float,scale: Vector,expansion: Vector) """ @staticmethod def __new__(self,translation,rotation,scale,expansion): """ __new__(cls: type...
""" Meta information for this project """ __project__ = 'Croesus' __version__ = '0.1.1' __author__ = 'Brian Lusina' __email__ = 'lusinabrian@gmail.com' __url__ = 'http://croesus.com' __copyright__ = 'Brian Lusina'
def best_par_in_df(search_df): ''' This function takes as input a pandas dataframe containing the inference results (saved in a file having 'search_history.csv' ending) and returns the highest-likelihood parameters set that was found during the search. Args: - search_df (pandas DataFrame object...
class Solution: def numFriendRequests(self, ages: List[int]) -> int: """Hash table. """ c = collections.Counter(ages) res = 0 for ka, va in c.items(): for kb, vb in c.items(): if kb > 0.5 * ka + 7 and kb <= ka: if ka == kb: ...
class Config(object): DEBUG = False TESTING = False SQLALCHEMY_TRACK_MODIFICATIONS = False class Production(Config): SQLALCHEMY_DATABASE_URI = '<Production DB URL>' class Development(Config): # psql postgresql://Nghi:nghi1996@localhost/postgres DEBUG = True SQLALCHEMY_DATABASE_URI = 'pos...
def rotateImage(a): size = len(a) b = [] for col in range(size): temp = [] for row in reversed(range(size)): temp.append(a[row][col]) b.append(temp) return b if __name__ == '__main__': a = [ [1,2,3], [4,5,6], [7,8,9], ] print(rota...
class Context: def time(self): raise NotImplemented def user(self): raise NotImplemented class DefaultContext(Context): def __init__(self, current_time, current_user_id): super(DefaultContext, self).__init__() self.current_time = current_time self.current_user_id...
# This program knows about the schedule for a conference that runs over the # course of a day, with sessions in different tracks in different rooms. Given # a room and a time, it can tell you which session starts at that time. # # Usage: # # $ python conference_schedule.py [room] [time] # # For instance: # # $ python ...
"grpc_py_library.bzl provides a py_library for grpc files." load("@rules_python//python:defs.bzl", "py_library") def grpc_py_library(**kwargs): py_library(**kwargs)
#Conceito Mec l=int(input()) p=int(input()) r= p / l if r <= 8: print("A") elif 9 <= r <= 12: print("B") elif 13 <= r <= 18: print("C") elif r > 18: print("D")
""" Metainf block field registrations. The META_FIELDS dictionary registers allowable fields in the markdown metainf block as well as the type and default value. The dictionary structure is defined as ``` META_FIELDS = { 'camel_cased_field_name': ('python_type', default_value) } ``` """ META_FIELDS = { 'titl...
## inotify_init1 flags. IN_CLOEXEC = 0o2000000 IN_NONBLOCK = 0o0004000 ## Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. IN_ACCESS = 0x00000001 IN_MODIFY = 0x00000002 IN_ATTRIB = 0x00000004 IN_CLOSE_WRITE = 0x00000008 IN_CLOSE_NOWRITE = 0x00000010 IN_OPEN = 0x0000...
def costodepasajes(): #definir variables y otros montoP=0 #datos de entrada cantidadX=int(input("ingrese la cantidad de estudiantes:")) #proceso if cantidadX>=100: montoP=cantidadX*20 elif cantidadX<100 and cantidadX>49: montoP=cantidadX*35 elif cantidadX<50 and cantidadX>19: montoP=cantidad...
mylist=[] #python now knows it is a 1D list mylist.append(5) #append is to add a thing to the end print(mylist) #will print only 5 mylist.append(6) print(mylist) #will print 5 AND 6 mylist[1]=7 #value 7 will overwrite the value in position 1 of mylist (which is 6) num=int(input("Enter number to append to the list")) ...
# HEAD # Classes - Polymorphism # DESCRIPTION # Describes how to create polymorphism using classes # RESOURCES # # Creating Parent class class Parent(): par_cent = "parent" def p_method(self): print("Parent Method invoked with par_cent", self.par_cent) return self.par_cent # Inheriting...
# Information connected to the email account email = "email@website.com" password = "password" server = "server.website.com" port = 25 # The folder with settings (rss-links.txt and time.txt) folder = "path to folder"
## Copyright 2021 InferStat Ltd # # 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 writin...
""" DESAFIO 075: Análise de Dados em uma Tupla Desenvolva um programa que leia quatro valores pelo teclado e guarde-os em uma tupla. No final, mostre: A) Quantas vezes apareceu o valor 9. B) Em que posição foi digitado o primeiro valor 3. C) Quais foram os números pares. """ n1 = int(input('Digite um número: ')) n2 =...
# parsetab.py # This file is automatically generated. Do not edit. # pylint: disable=W,C,R _tabversion = '3.10' _lr_method = 'LALR' _lr_signature = 'and closedBra closedParen coma comment div do doubleColon doubleEquals elif else end endline equals exit id if int integer less lessEquals minus more moreEquals mul not...
__author__ = 'cosmin' class Validator: def __init__(self): pass
catalogue = { 'iphone': { 'X': 800, 'XR': 900, '11': 1000, '12': 1200, }, 'ipad': { 'mini': 400, 'air': 500, 'pro': 800, }, 'mac': { 'macbook air': 999, 'macbook': 1299, ...
def recurse(n, s): """ Calculates n factorial recursively """ if n == 0: print(s) else: recurse(n-1, n+s) recurse(3, 0)
# 最后几分钟做的,没来得及提交,不知道几分 def st5(): n,m=int(input()) dongli={} for i in range(m): listb=list(map(int,input().split())) L=listb[1] R=listb[2] if listb[0]==1: for i in range(L,R+1): dongli[i]=dongli.get(i,[0,0,0]) dongli[i][0]+=listb[3]...
# # PySNMP MIB module LBHUB-BRIDGE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/LBHUB-BRIDGE-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:05:57 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar ...
a = int(input()) if(a>1000000): print(0) else: c = int(input()) if(c==a): print(0) else: ver = [] var = [] for i in range(a): b = float(input()) var.append(b) j=0 sumout = [] for element in var: k=j ...
# python3 # coding=<UTF-8> class EmptyPageException(Exception): """Raised when empty page encountered"""
def main(): total = float print("**********Think in te last five game that you buy**********") game1 = input("What's the game?: ") time1 = float(input(f"How many hours did you play {game1}?: ")) price1 = float(input(f"How many dollars did you spend in the {game1}?: ")) print("--------------...
class Solution: def minCostToMoveChips(self, position: List[int]) -> int: even_cnt = 0 odd_cnt = 0 for i in position: if i % 2 == 0: even_cnt += 1 else: odd_cnt += 1 return min(even_cnt, odd_cnt)
class Configuration(object): """ Base configuration, regardless of the environment. """ SECRET_KEY='\x96\x0f\\\x8b\x9f=t\x07(pE\xfdku\xee\t' class DevelopmentConfig(Configuration): """ Configuration for development environment only """ SQLALCHEMY_DATABASE_URI = 'sqlite:///database.db'
n = int(input()) positives = [] negatives = [] for i in range(n): current_number = int(input()) if current_number >= 0: positives.append(current_number) else: negatives.append(current_number) #============ Comprehension =============== #numbers = [int(input()) for _ in range(n)] #positive...
# # PySNMP MIB module JUNIPER-LSYSSP-NATSRCPOOL-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/JUNIPER-LSYSSP-NATSRCPOOL-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:00:04 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python ve...
print("hola mundo") x=4 y=2 print(x+y) #suma=x+y #print(suma) #suma
# -*- coding: latin-1 -*- generation = 8 def evolve(addressbook): """No longer needed."""
# # PySNMP MIB module REDLINE-AN50-PMP-V2-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/REDLINE-AN50-PMP-V2-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:46:50 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 ...
# -*- coding: utf-8 -*- # @Time: 2020/5/8 22:38 # @Author: GraceKoo # @File: interview_2.py # @Desc: https://leetcode-cn.com/problems/ti-huan-kong-ge-lcof/ class Solution: def replaceSpace(self, s: str) -> str: s_list = list() for s_value in s: if s_value == " ": s_list...
class Statement: transactions = [] def append_transaction(self, transaction): self.transactions.append(transaction) def print(self): for transaction in self.transactions: print(str(transaction))
lista = [] dados = [] oper = '' maior = menor = 0 nomeMaior = '' nomeMenor = '' while oper != 'sair': dados.append(str(input('Digite o seu nome: '))) dados.append(int(input('Digite o seu peso: '))) if len(lista) == 0: maior = menor = dados[1] else: if dados[1] > maior: maior...
"""Leetcode 3. Longest Substring Without Repeating Characters Medium URL: https://leetcode.com/problems/longest-substring-without-repeating-characters/ Given a string, find the length of the longest substring without repeating characters. Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer is "abc", wit...
""" Author: Stephen Thomas Date Created: 23 December 2017 Basic implementation of an undirected graph Github Link: https://github.com/Mewzyk/stephen_AI.git """ class Node: def __init__(self, key, neighbors = []): self.key = key self.neighbors = set(neighbors) class Graph: def __init__(self, gr...
class FeedException(Exception): def __init__(self, *args, **kwargs): self.message = kwargs.pop('message')
h, w = map(int, input().split()) s = [] for i in range(h): a = input() s.append([str(m) for m in list(str(a))]) #print(s) p = 0 for i in range(h): for j in range(w): if i > 0 and j > 0 and i < h - 1 and j < w - 1: if s[i][j] == "#" and s[i - 1][j] == s[i][j - 1] == s[i][j + 1] == s[i +...
# -*- coding: utf-8 -*- _name1 = [ 'Chikorita', 'Bayleef', 'Meganium', 'Cyndaquil', 'Quilava', 'Typhlosion', 'Totodile', 'Croconaw', 'Feraligatr', 'Sentret', 'Furret', 'Hoothoot', 'Noctowl', 'Ledyba', 'Ledian', 'Spinarak', 'Ariados', 'Crobat', 'Chinchou', 'Lanturn', 'Pichu', 'Cleffa', 'Igglybuff', ...
# Solution to part 2 of day 14 of AOC 2015, Reindeer Olympics # https://adventofcode.com/2015/day/14 f = open('input.txt') whole_text = f.read() f.close() race = 2503 deers = {} all_deers = {} for line in whole_text.split('\n'): # print(line) # Example, # Comet can fly 14 km/s for 10 seconds, but then m...
# Copyright (c) 2011-2014 Turbulenz Limited """HTTP exceptions Apps Provides API Level exceptions for webdevelopers (those exceptions get caught and passed back as error Callbacks to the client) """ class PostOnlyException(BaseException): def __init__(self, value): super(PostOnlyException, self).__init__...
class Solution: def isPalindrome(self, x): """ :type x: int :rtype: bool """ self.x=x if x<0: return False x=str(x) length=len(x) i=0 j=length-1 for i in range(length//2): if x[i]!=x[len...
n1 = float(input('Entre com um numero qualquer: ')) d = n1*2 t = n1*3 r = n1**0.5 print('O numero que você digitou foi {}\n Seu dobro é {}\n Seu triplo é {}\n Sua raiz {}'.format(n1,d,t,r))
"""Metric base class for new user-defined metrics.""" class MetricBase(object): """Metric template class.""" def __init__( self, *args, **kwds ): pass def process_token(self, token): """Handle processing for each token.""" pass def display(self): """Display the metric ...
word=input() n=int(input()) first_half=word[:n] second_half=word[n+1:] result=(first_half+second_half) print(result)
""" Copyright © Her Majesty the Queen in Right of Canada, as represented by the Minister of Statistics Canada, 2020 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/licens...
class Test: """ This is the class """ _prop = 1 @property def prop(self): """ This is the getter """ return self._prop @prop.setter def prop(self, val): """ This is the setter """ self._prop = val
# pyre-ignore-all-errors # TODO: Change `pyre-ignore-all-errors` to `pyre-strict` on line 1, so we get # to see all type errors in this file. # We mentioned in the talk that consuming values of union type often requires a # case split. But there are also cases where the case split is not necessary. # This example dem...
def calculateWeight(name, allSupporters): summation = 0 if (len(allSupporters[name]) > 1): for e in allSupporters[name][1]: summation += calculateWeight(e, allSupporters) return allSupporters[name][0]+summation def findAppropriateTree(name, allSupporters): allWeights = [] for i ...
# Task 1 - Highest occurrence def highest_occurrence(array): """ Time: O(n) Space: O(n) :param array: strings, int or floats, can be mixed :return: array containing element(s) with the highest occurrences without type coercion. Returns an empty array if given array is empty. """ # h...
# Performing operations on the DataFrame # DataFrame transformations # select() # filter() # groupby() # orderby() # dropDuplicates() # withColumnRenamed() # DataFrame actions # printSchema() # head() # show() # count() # columns # describe() # 1. Initial EDA # Print the first 10 observations people_df.show(10) # ...
# Headers copied directly from browser request static = { 'accept': 'application/json, text/plain, */*', 'accept-encoding': 'gzip, deflate, br', 'accept-language': 'en-GB,en-US;q=0.9,en;q=0.8', 'referer': 'https://www.nowgatewayx.com/login', 'sec-ch-ua': '"Chromium";v="94", "Google Chrome";v="94", "...
def return_func(): pass def func(): return return_func a = func() a()
n = int(input()) a = set(map(int, input().split())) m = int(input()) b = set(map(int, input().split())) d = list(a.union(b).difference(a.intersection(b))) d.sort() for i in d: print(i)
# # @lc app=leetcode.cn id=43 lang=python3 # # [43] multiply-strings # None # @lc code=end
class AdbNoStartError(Exception): pass class NoSuchProcessNameError(Exception): pass class CommandError(Exception): pass class ConfigError(Exception): pass class PlatformNoSupport(Warning): """ Base class for warnings about deprecated features. """ pass
v = (int(input('Digite um valor: ')), int(input('Digite um outro valor: ')), int(input('Digite um outro valor: ')), int(input('Digite um outro valor: '))) c = 0 print(f'O número 9 apareceu {v.count(9)} Vezes.') if 3 in v: print(f'O primeiro número 3 apareceu na {v.index(3)+1}ª posição') else: print(f'O número 3...
"""Performance analysis of different implementations of 2d finite difference wave propagation. """ __version__ = '0.0.1'
class PortfolioFilter: def __init__(self, column, options=None, portfolio_options=None, values=None, industry_codes=None, inverted=False, include_null=False, domain=None): self.key = column + '-0' self.column = column self.options = options if options is not None else [] ...
"""Constants needed by ISAPI filters and extensions.""" # ====================================================================== # Copyright 2002-2003 by Blackdog Software Pty Ltd. # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software and # its document...
# There's no logic or real code here... just data. You need to add some code to # the test! alice_name = "Alice" alice_age = 20 alice_is_drinking = True bob_name = "Bob" bob_age = 12 bob_is_drinking = False charles_name = "Charles" charles_age = 22 charles_is_drinking = True
def test_role_check(test_role): test_role = test_role.refresh() assert test_role.id assert test_role.slug == "test" def test_role_update(test_role): assert test_role.slug == "test" test_role.slug = "test1" test_role.save() assert test_role.refresh().slug == "test1"
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None # Solution 1 class Solution(object): def inorderTraversal(self, root): """ :type root: TreeNode :rtype: List[int] ...
# Couchbase metrics list couchbase_metrics = { 'cluster': { 'url': '/pools/default/', 'metrics': [ {'name':'storageTotals.ram.total','id':'storageTotals.ram.total','suffix':'bytes','labels':['name']}, {'name':'storageTotals.ram.used','id':'storageTotals.ram.used','suffix':'by...
# # 12. Integer to Roman # # Roman numerals are represented by seven different symbols: I, V, X, L, C, D, M # # Symbols Value # # I 1 # V 5 # X 10 # L 50 # C 100 # D 500 # M 1000 # # For example, two is written ...
# for i in [0, 1, 2, 3, 4, 5]: # print(i) # for j in range(10): # print(j) names = ["Harry", "Ron", "Hermione", "Ginny"] for character in names: print(character)
def _get_parent_index(child_index): if child_index == 0: return None return (child_index - 1) // 2 def _get_left_child_index(parent_index): return parent_index * 2 + 1 def _get_right_child_index(child_index): return child_index * 2 + 2 def _check_min_heap_invariant(min_heap): if min_he...
class Product(): def __init__(self, requirements: list): self.requirements = [] for r in requirements: self.requirements.append(r.type) class Requirement(): def __init__(self, _type: str, name): self.name = name self.type = _type
# -*- coding: utf-8 -*- ''' @author: nixiaopan @time: 2022/3/30 22:25 ''' class ResponsCode: """0 成功 1 失败 2 异常""" SUCCESS = 200 FAILED = 450 EXCEPTION = 550 class IdentityType: ANCHOR = 1 BUSINESSES = 2 class CooperationStatus: UNSENT_COOPERATION = 0 WAITING_FOR_ANCHOR_GET_SAMPLE =...
p = 196732205348849427366498732223276547339 secret = 4919 # Solved through brute force that secret = 4919, see sageSecret def calc_root(num, mod, n): #Create a modular ring with mod as the modulus f = GF(mod) # temp = num mod Modulus temp = f(num) #Calculate the nth root temp on this modular field ...
n = int(input()) a = list(map(int, input().split())) ss = sum(a) a.sort() if ss%2 == 1: for i in range(0, n): if a[i]%2 == 1: ss -= a[i] break print(ss)
n = input("Enter a binary number to convert to decimal: ") bit_exp = 0 decimals = [] for bit in n[::-1]: if int(bit) == 1: decimals.append(2**bit_exp) bit_exp += 1 decimal = sum(decimals) print(decimals) print(decimal) '''Varigarble -- 2020'''
# Author : clement.royer@epitech.eu # Descrption : Utils methods ## # Ask user a question and expect an answer ## # @private # @param {string} question # @return {string} answer ## def ask(question): answer = input(question) if (answer == None or len(answer) == 0): print("❌ Can't be empty.") ...
def main(data,n): initial = n dict = {} for i in range(n): dict[data[i]] = True # Check for initial value if data[i]==initial: s = '' while initial in dict: s += str(initial) + ' ' initial -= 1 print(s) else:...
# __init__.py # Version of the turtlefy package __version__ = "0.8.12"
#enter the celcius temperature to be converted Celcius_temperature = float(input("Enter celcius temperature: ")) #formula for converting celcius temperature to fahrenheit temperature Fahrenheit = (Celcius_temperature * (9/5)) + 32 #printing the fahrenheit temperature print(Fahrenheit)
n=int(input()) matrix=[0]*(n+1) dp=[[[0]*2 for j in range(n+1)] for i in range(n+1)] dp2=[[[0]*2 for j in range(n+1)] for i in range(n+1)] for i in range(1,n+1): matrix[i]=[0] matrix[i].extend([*map(int,input().split())]) ans=0 for i in range(1,n+1): for j in range(1,n+1): dp[i][j][1]=dp2[i][j][1]=...
def readint(): while True: try: num = int(input('Insert a integer:')) if type(num) == int: return num except: print('\033[1;31mERROR: Please, insert a valid integer.\033[m')
cidade = input("Digite o nome de uma cidade: ") cidade = cidade.strip() cidadeM = cidade.upper() resposta = cidade.split() resposta = cidadeM.find("SANTO") print("Analisando ...") if resposta == 0: print("A cidade de {} COMEÇA com a palavra SANTO.".format(cidadeM)) else: print("A cidade de {} não começa com a...
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
def tem_bomba_direita(board, position): if position + 1 >= len(board): return False if board[position+1] == "*": return True return False def tem_bomba_esquerda(board, position): if position - 1 < 0: return False if board[position-1] == "*": return True return F...
class Error(Exception): """Base class for exceptions in this module.""" pass class UnknownError(Error): def __init__(self, text=''): message = 'An internal error has occurred. Please try your query again at a later time.' if text == '': log_message = 'Unknown error occurred. P...
i01.integratedMovement.removeObject("pole") i01.integratedMovement.removeAi("kinect",i01.integratedMovement.Ai.AVOID_COLLISION) i01.rest() sleep(3) i01.integratedMovement.moveTo("rightArm",-300,500,400) mouth.speakBlocking("Hello, I am vinmoov") sleep(3) i01.rest() mouth.speakBlocking("I want to talk to you about a new...
# Authors: David Mutchler, Dave Fisher, and many others before them. print('Hello, World') print('hi there') print('one', 'two', 'through my shoe') print(3 + 9) print('3 + 9', 'versus', 3 + 9) # done: After we talk together about the above, add PRINT statements that print: # done: 1. A Hello message to a friend. ...
def removeDuplicates(nums): n = len(nums) mp = {} for i in range(0 , n): if nums[i] not in mp: mp[nums[i]] = nums[i] op = mp.keys() return op op = removeDuplicates([0,0,1,1,1,2,2,3,3,4]) print(op)
c.NotebookApp.open_browser = False c.NotebookApp.ip='0.0.0.0' #'*' c.NotebookApp.port = 8192 c.NotebookApp.password = u'sha1:45f7d7ac038c:c36b98f22eac5921c435095af65a9a00b0e1eeb9' c.Authenticator.admin_users = {'jupyter'} c.LocalAuthenticator.create_system_users = True
#Actividad 7 Ejercicios For numeros = [1, 2, 3, 4, 5, 6, 7, 8 , 9, 10] numeros2 = [1, 2, 3, 4, 5, 6, 7, 8 , 9, 10] cadena="BIENVENIDOS" indice=0 for letra in "UNIVERSIDAD ESTATAL DE SONORA": print(letra) else: print("FIN DEL BUCLE") for i in numeros: print(i) print("") for x in numeros: ...
sulfideToNitrileAddition = [ruleGMLString("""rule [ ruleID "Sulfide to Nitrile Addition" labelType "term" left [ edge [ source 2 target 3 label "#" ] edge [ source 4 target 5 label "-" ] ] context [ edge [ source 1 target 2 label "-" ] edge [ source 5 target 6 label "-" ] node [ id 1 label "*" ] n...
# Kalman filter | KalmanFilter(VAR, EST_VAR) STD_DEV = 0.075 VAR = 0.1 EST_VAR = STD_DEV ** 2 # PID P_ = 3.6 I_ = 0.02 D_ = 0.6 PID_MIN_VAL = -50 PID_MAX_VAL = 50
class Solution: def countGoodTriplets(self, arr: List[int], a: int, b: int, c: int) -> int: s1=0 x=len(arr) for i in range(x-2): for j in range(i+1,x-1): if abs(arr[i]-arr[j])<=a: for k in range(j+1,x): if abs(arr[j]-arr...
for i in range(int(input())): x = list(map(int, input().split())) x.sort() print(x[-2])
# # PySNMP MIB module VPMT-OPT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/VPMT-OPT-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:28:31 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,...