content
stringlengths
7
1.05M
""" coding: utf-8 Created on 13/11/2020 @author: github.com/edrmonteiro From: Hackerrank challenges Language: Python Title: Count Triplets You are given an array and you need to find number of tripets of indices such that the elements at those indices are in geometric progression for a given common ratio and . Fo...
def get_list(file_name: str): with open(file_name) as f: array = [x for x in f.read()[1:-1].split('","')] return(array) def is_triangle(triangle: int): """any tn in triangle sequence is t = ½n(n+1): Solving with quadratic formula reveals n is only an integer if (1+8t) ** 0.5 is an integer and o...
class ProfileError(Exception): def __init__(self, code: str): self.code = code class ProfileNotFoundError(ProfileError): def __init__(self, code: str): super().__init__(code) def __str__(self): return f"Profile {self.code} not found" class ProfileAlreadyExistsError(ProfileError)...
class GotoAckPacket: def __init__(self): self.type = "GOTOACK" self.time = 0 def write(self, writer): writer.writeInt32(self.time) def read(self, reader): self.time = reader.readInt32()
# # PySNMP MIB module EXTREME-OSPF-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/EXTREME-BASE-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:53:03 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar ...
# -*- coding: utf-8 -*- """ Created on Mon May 29 17:31:17 2017 @author: Prosimio """
class IndigoDevice: def __init__(self, id, name): self.id = id self.name = name self.states = {} self.states_meta = {} self.pluginProps = {} self.image = None self.brightness = 0 def updateStateOnServer(self, key, value, uiValue=None, decimalPlaces=0): ...
# Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def reorderList(self, head): """ :type head: ListNode :rtype: void Do not return anything, modify head in-place instead. ...
# callbacks.py # Authors: Jacob Schreiber <jmschreiber91@gmail.com> class Callback(object): """An object that adds functionality during training. A callback is a function or group of functions that can be executed during the training process for any of pomegranate's models that have iterative training procedures....
word_filter_set = ['육변기', '워마드', '응디', '니기미', '맘충', '씹창', '거렁뱅이', '갈보', '미친놈', '빠구리', '김치년', '개씨발', '메갈', '메갈리아', '섹스', '시발새끼', '보전꺠', '씨방새', '니미씨발', '씹', 'ㅆㅂ', '불알', '쎅스', '핑두', '보지년', '오피누', '놈딱', '잠지', '섻스', '간나새끼', '개돼지', '씹쌔끼', '꼬추걸레', '조팔', '한남', '짭새', '걸레년', '개좆', '미친년', '옘병', '닭대가리', '느그앰', '4카시', '후빨', '개년', ...
# Nama : Eraraya Morenzo Muten # NIM : 16520002 # Tanggal : 26 Maret 2021 # Program EmpatInteger # Input: 4 integer: A, B, C, D # Output: Sifat integer dari A, B, C, D (positif/negatif/nol) # Jika semua integer positif, tampilkan: # nilai maksimum, minimum, dan mean olympic # KAMUS # variabel...
username = 'ENTER YOUR E-MAIL ID HERE' password = 'ENTER YOUR PASSWORD HERE' entry_nodeIp = 'http://py4e-data.dr-chuck.net/json?' gmaps_api_key = 42 user_agents_list = ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36", "Mozilla/5.0 (Windows NT ...
# uninhm # https://atcoder.jp/contests/abc183/tasks/abc183_a # implementation print(max(0, int(input())))
d1 = {42: 100} d2 = {'abc': 'fob'} d3 = {1e1000: d1} s = set([frozenset([2,3,4])]) class C(object): abc = 42 def f(self): pass cinst = C() class C2(object): abc = 42 def __init__(self): self.oar = 100 self.self = self def __repr__(self): return 'myrepr' ...
url = "https://reeborg.ca/reeborg.html?lang=en&mode=python&menu=worlds%2Fmenus%2Freeborg_intro_en.json&name=Hurdle%202&url=worlds%2Ftutorial_en%2Fhurdle2.json" def turn_right(): turn_left() turn_left() turn_left() def hurdle(): move() turn_left() move() turn_right() move() turn_rig...
class Test: def __init__(self, text): self.text = text def text(self): return self.text
# Instruments SST_INSTRUMENT = 'SST' POEMAS_INSTRUMENT = 'POEMAS' # File types TRK_TYPE = 'TRK' RBD_TYPE = 'RBD' # Instrument Types AVAILABLE_SST_TYPES = { RBD_TYPE: ["bi", "rs", "rf"] } AVAILABLE_POEMAS_TYPES = { TRK_TYPE: ["TRK"] } INSTRUMENT_TO_TYPE_MAP = { SST_INSTRUMENT: AVAILABLE_SST_TYPES, POEM...
num1 = int(input('Digite o primeiro valor: ')) num2 = int(input('Digite o segundo valor: ')) if num1 > num2: print('{}{}{} é o maior.'.format('\033[1;36m', num1, '\033[m')) elif num1 == num2: print('Os {}dois valores{} são iguais'.format('\033[4;33m', '\033[m')) elif num2 > num1: print('{}{}{} é o maior.'.f...
# -*- coding: utf-8 -*- """ Created on Sun Apr 19 23:51:39 2020 @author: abcdk """ word = "Guten Morgen" extract = word[2:5:1] print(extract.upper()) word2 = "Racetrack" extract2 = word2[1:4:1] print(extract2.capitalize())
def get_sunday(): return 'Sunday' def get_monday(): return 'Monday' def get_tuesday(): return 'Tuesday' def get_default(): return 'Unknown' day = 4 switcher = { 0 : get_sunday, 1 : get_monday, 2 : get_tuesday } day_name = switcher.get(day,get_default)() print(day_name)
# Número para mês # Crie um programa que pergunta o número do mês e imprime o nome do mês. month = int(input("month? ")) - 1 months = ["janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"] print(months[month])
CONFIG_FILENAMES = [ '.vintrc.yaml', '.vintrc.yml', '.vintrc', ]
# 打印变量的值 a = 101 print(a) # 打印变量的唯一id print(id(a)) # 判断变量是否相等 == is a = 100 b = 100 print(a is b) a = 10000 b = 10000 print(a is b) # 打印变量的类型 print(type(a))
# -------------- This file adds actual expected results to submission file -----------------# f=open('submission.csv','r') g=open('testHistory.csv','r') # ts.csv generated before h=open('res.csv','w+') lines=f.readlines() i=0 for line in g.readlines(): k=line.split(',') toWrite=k[5] h.write...
""" Version. Doing it this way provides for access in setup.py and via __version__ """ __version__ = "0.1.4"
IRIS_BYPASS=False AWS_REGION = "us-west-1" IRIS_SNS_TOPIC = "iris-topic" IRIS_SQS_APP_QUEUE = "iris-test-queue" IRIS_POLL_INTERVAL = 20
''' Created on 2016年2月9日 @author: Darren ''' ''' Palindromic Squares Rob Kolstad Palindromes are numbers that read the same forwards as backwards. The number 12321 is a typical palindrome. Given a number base B (2 <= B <= 20 base 10), print all the integers N (1 <= N <= 300 base 10) such that the square of N is palin...
# This dictionary is to define metrics that we should extract data from and then # their exposed name as predicted metric metrics = { 'actual_metric_name1': 'actual_metric_name1_predict', 'actual_metric_name2': 'actual_metric_name2_predict' } # prom_url = 'http://localhost/' expose_port = 8000 # interval in ...
""" Data types used on Android and whatsapp """ class TextPlain: def __str__(self): return "text/plain" class AnyImage: def __str__(self): return "image/*" class AndroidVndContact: def __str__(self): return "vnd.android.cursor.dir/contact"
def print_hello(): print("hello!") def print_goodbye(): print("goodbye!")
n = int(input()) primary = [] secondary = [] matrix = [] for _ in range(n): matrix.append([int(x) for x in input().split()]) for r in range(n): primary.append(matrix[r][r]) secondary.append(matrix[r][n - 1 -r]) sum_p = (sum([x for x in primary])) sum_s = (sum([x for x in secondary])) print(abs(sum_p-sum...
# replace with the label of class for which you are interested in building the lexicon; # this should be the same as the label in your input files positive_class_label = "on-topic" # replace the label for the examples that do not belong to the topic of interest # this should be the same as the label in your input file...
"""JPL Planetary and Lunar Ephemeris DE422 for the jplephem package. This is the most recent long-period ephemeris published by the Jet Propulsion Laboratory. While requiring more than half a gigabyte of space, it achieves quite high accuracy. :Name: DE422 (September 2009) :Years: -3000 through 3000 :Planets: Yes :S...
def loadfile(name): values = [] f = open(name, "r") for x in f: values.append(x) return values def day2(): depth = 0 position = 0 depth2 = 0 for i in range(0, len(values)): value = values[i].split() if value[0] == "forward": position += int(value[1]) ...
"""Kata: Move Zeroes - Move all zeroes in list to end. #1 Best Practices Solution by riyakayal def move_zeros(arr): l = [i for i in arr if isinstance(i, bool) or i!=0] return l+[0]*(len(arr)-len(l)) """ def move_zeroes(array): all_zeroes = list(filter((lambda x: x == 0 and type(x) is not bool), array)) ...
class PrefixStorage(object): """Storage for store information about prefixes. >>> s = PrefixStorage() First we save information for some prefixes: >>> s["123"] = "123 domain" >>> s["12"] = "12 domain" Then we can retrieve prefix information by full key (longest prefix always win): >...
# THIS FILE IS GENERATED FROM NUMPY SETUP.PY short_version = '1.10.4' version = '1.10.4' full_version = '1.10.4' git_revision = 'e46c2d78a27f25e66624a818276be57ef9458e60' release = True if not release: version = full_version
def extractWwwAsianhobbyistCom(item): ''' Parser for 'www.asianhobbyist.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None if "Anime" in item['tags']: return None if "Articles" in item['tags']: return...
class Solution: def twoSum(self, numbers, target): """ :type numbers: List[int] :type target: int :rtype: List[int] """ l = 0 r = len(numbers) - 1 while l < r: sum = numbers[l] + numbers[r] if sum < target: l +=...
# Define a Subtraction Function def sub(num1, num2): return num1 - num2
baseurl='\t\t\t<input name="marriageLine" type="radio" id="marriageLine%s" value="%s" /><label for="marriageLine%s"><img src="images/marriageLine/%s.jpg" height=195 width=150></label>' for i in range(1, 18): url = baseurl % (i,i,i,i) print(url+"\n")
class Duck: def swim(self): print("Duck is swimming!") def layEggs(self): print("Duck is laying eggs!") class Fish: def swim(self): print("Fish is swimming!") def layEggs(self): print("Fish is laying eggs!") class Diver: def swim(self): ...
def findTagInChildren(children, key, value=None): """ Find in children a tag element with specified attribute key. If value is set to None, the value is returned. If value is specified, name et attrs of child are returned. In case no element or value is found, None is returned - children: list of ...
class main: a = '' def func(self): s = '' b = '\n\n\ntareq\n\n\n' for i in b: if i != '\n': s += i print(s) ii = main() ii.func()
def lambda_handler(event, context): message = event['Records'][0]['Sns']['Message'] print("handle message: " + message) webhook_url = 'https://hookb.in/RZYdoJVodkcREEj72WqV' http = urllib3.PoolManager() r = http.request( 'POST', webhook_url, body=message.encode('utf-8'), ...
# -*- coding: utf-8 -*- """ Created on Tue Aug 4 17:50:06 2020 @author: Carlos Mateo Jurado Díaz """ def CLEARLAYOUT(layout): for i in reversed(range(layout.count())): layoutItem = layout.itemAt(i) if layoutItem.widget() is not None: widgetToRemove = layoutItem.widget() ...
#!/usr/bin/env python """ CREATED AT: 2021/11/5 Des: https://leetcode.com/problems/arranging-coins/ GITHUB: https://github.com/Jiezhi/myleetcode Difficulty: Easy Tag: See: """ class Solution: def arrangeCoins(self, n: int) -> int: """ Runtime: 924 ms, faster than 35.91% Memory Usage:...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Feb 11 16:00:00 2020 @author: natnem """ def CountingSort(A): k = max(A) + 1 C = [0]*(k) #Auxillary array to keep track of the key appearances B = [0]*(len(A)) #To hold the output for i in A: C[i] = C[i] + 1 #0 i if key(Ind...
class Descritor: def __init__(self, obj, set=None, get=None, delete=None): self.obj = obj self.set = set self.get = get self.delete = delete def __set__(self, obj, val): print('Estou setando algo') self.obj = val def __get__(self, obj, tipo=None): pr...
# -*- coding: utf-8 -*- A = int(input()) B = int(input()) PROD = (A*B) print("PROD =", PROD)
class Persona: cedula = 0 nombre = '' telefono = 0 voto = 0 def __init__(self, cd, nm, tl, vt): self.cedula = cd self.nombre = nm self.telefono = tl self.voto = vt def getCedula(self): return self.cedula def getNombre(self): return self.nomb...
def stingy(total_lambs): stingyList = [1, 1] x, total = 2, 2 while x <= total_lambs: value = stingyList[x-1] + stingyList[x-2] stingyList.append(value) total += int(stingyList[x]) if total > total_lambs: break x+= 1 return len(stingyList) def generou...
""" Desenvolva um programa que leia seis numeros inteiros e mostre a soma apenas daques que forem pares. Se o valor digitado for impar, desconsidere-o. """ soma = 0 for n in range (0, 6): numero = int(input('Digite um numero: ')) if numero %2 == 0: soma = soma + numero print(soma) print('FIM')
# In the 20×20 grid below, four numbers along a diagonal line have been marked in red. # # ``` # 08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 # 49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 # 81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65 # 52 70 95 23 04 60 11 42 69 24 68 56 0...
# In​ February, a major airline had 77.8​% of their flights arrive on time. Assume that the event that a given flight arrives on time is independent of the event that another flight arrives on time. # A writer plans to take four separate flights for her publisher next month. Assuming the airline has the same​ on-time ...
class Account: def __init__(self): self.__blocked: bool = False self.__bound: int = 1000000 self.__balance: int = 0 self.__max_credit: int = -1000 def deposit(self, _sum: int) -> bool: if self.__blocked : return False if _sum < 0 or _sum > self.__bou...
def process_sql_file(file_name): file, string = open(file_name, "r"), '' # for line in file, remove comments, space out '(' and ')', add line to output string: for line in file: line = line.rstrip() line = line.split('//')[0] line = line.split('--')[0] line = line.replace('(...
#Escreva um programa que leia três strings. Imprima o resultado da substituição na primeira, dos #caracteres da segunda pelos da terceira. string1 = input('Digite a primeira string: ') string2 = input('Digite a segunda string: ') string3 = input('Digite a terceira string: ') if len(string2) == len(string3): result...
# Membership, identity, and logical operations x=[1,2,3] y=[1,2,3] print(x==y) #test equivalance print(x is y) #test object identity x=y # assignment print(x is y)
''' Created on Nov 20, 2014 This is a dummy to solve dependencies from error.py @author: Tim Gerhard ''' # The webfrontend does not dump errors. If this function is called anywhere, this simply doesn't matter. def dumpError(error): return
la_liga_goals = 43 champions_league_goals = 10 copa_del_rey_goals = 5 total_goals = la_liga_goals + champions_league_goals + copa_del_rey_goals
# Write a program that reads a temperature value and the letter C for Celsius or F for # Fahrenheit. Print whether water is liquid, solid, or gaseous at the given temperature # at sea level. type = str(input("Enter the temperature type, C for celsius or F for fahrenheit: ")) temperature = float(input("Enter the temper...
def pop(heap): popped = heap[0] heap[0] = heap[-1] heap.pop() lq = len(heap) node = 0 while node < lq: minimum = heap[node] nxt_node = node l_node = node*2+1 r_node = node*2+2 if l_node < lq and heap[l_node] < minimum: minimum = heap[l_node] ...
def mike(): print("hola") mike() mike() mike() mike() mike()
# Python3 program to count triplets with # sum smaller than a given value # Function to count triplets with sum smaller # than a given value def countTriplets(arr, n, sum): # Sort input array arr.sort() # Initialize result ans = 0 # Every iteration of loop counts triplet with # first element...
""" 简单正则表达式的匹配 """ __author__ = 'Qiu Zongyan' #### 简化正则表达式匹配函数 ## 模式语言: ## 字符 c 与其自身匹配 ## ^ 与字符串开头匹配(匹配前缀) ## $ 与字符串结束匹配(匹配后缀) ## . 与任何字符匹配 ## * 和其前一字符一起,与该字符的0次或任意次出现匹配 ## 限制:字符串中不能出现上述元字符(不支持换意序列) def match(re, text): rlen, tlen = len(re), len(text) def match_here(re, i, text, j): ...
class UnknownResponseType(Exception): pass class UnknownDatetime(Exception): pass
t=int(input()) for i in range(t): s=int(input()) m=s%12 if m==1: print(s+11,'WS') elif m==2: print(s+9,'MS') elif m==3: print(s+7,'AS') elif m==4: print(s+5,'AS') elif m==5: print(s+3,'MS') elif m==6: print(s+1,'WS') elif m==7: ...
__author__ = 'Mikhail' def add_line(line_one, line_two): """ >>> line_one = [1, 2, 3] >>> line_two = [1, 2, 3] >>> add_line(line_one, line_two) >>> line_one [2, 4, 6] >>> line_two [1, 2, 3] >>> add_line(line_two, line_one) >>> line_one [2, 4, 6] >>> line_two [3, 6, ...
# # @lc app=leetcode id=25 lang=python3 # # [25] Reverse Nodes in k-Group # # https://leetcode.com/problems/reverse-nodes-in-k-group/description/ # # algorithms # Hard (46.35%) # Likes: 4377 # Dislikes: 423 # Total Accepted: 383.3K # Total Submissions: 813.3K # Testcase Example: '[1,2,3,4,5]\n2' # # Given a link...
def mergeSortedArrays(L, R): sorted_array = [] i = j = 0 while i < len(L) and j < len(R): if L[i] < R[j]: sorted_array.append(L[i]) i += 1 else: sorted_array.append(R[j]) j += 1 # When we run out of elements in either L or M, #...
"abcd".startswith("ab") #returns True "abcd".endswith("zn") #returns False "bb" in "abab" #returns False "ab" in "abab" #returns True loc = "abab".find("bb") #returns -1 loc = "abab".find("ab") #returns 0 loc = "abab".find("ab",loc+1) #returns 2
# -*- encoding: utf-8 -*- """ Copyright (c) Minu Kim - minu.kim@kaist.ac.kr Templates from AppSeed.us This file is hidden for privacy issues. """
SOLVERS = ( { 'type': 'local', 'name': 'leo3', 'pretty-name': 'Leo III', 'version': '1.4', 'command': 'leo3 %s -t %d', }, { 'type': 'local', 'name': 'cvc4', 'command': 'cvc4 --output-lang tptp --produce-models --tlimit=%md %s', }, ...
"""Choices for Rider APP""" status_choices = ( ('in_shop', 'In Shop'), ('enroute_destination', 'Enroute destination'), ('delivered', 'Delivered') ) IN_SHOP = 'in_shop'
""" For ease of use, please lay out your grid in Euclidean-plane format and NOT in numpy-type format. For example, if an object needs to be placed in the 3rd row and 7th column of the gridworld numpy matrix, enter its location in your layout dict as [7,3]. The codebase will take care of the matrix-indexing for you....
SEED_URLS = [ "https://www.microsoft.com/en-ca/p/immortals-fenyx-rising/c07kjzrh0l7s?activetab=pivot:overviewtab", "https://www.microsoft.com/en-ca/p/grand-theft-auto-v-premium-edition/C496CLVXMJP8?wa=wsignin1.0&lc=4105&activetab=pivot:overviewtab", "https://www.microsoft.com/en-ca/p/far-cry-5/br7x7mvbbqkm?...
# salva no copiateste.txt o mesmo conteudo do teste.txt with open('teste.txt', 'r') as arquivolido: with open('copiateste.txt', 'w') as arquivocriado: for linha in arquivolido: arquivocriado.write(linha)
class Event: def __init__(self, event_type, time, direction, intersection): self.event_type = event_type self.time = time self.direction = direction self.intersection = intersection
""" Please write a program to compress and decompress the string "hello world!hello world!hello world!hello world!". import zlib s = 'hello world!hello world!hello world!hello world!' # In Python 3 zlib.compress() accepts only DataType <bytes> y = bytes(s, 'utf-8') x = zlib.compress(y) print(x) print(zlib.decompress(...
#write import statement for reverse string function ''' 10 points Write a main function to .... Loop as long as user types y. Prompt user for a string (assume user will always give you good data). Pass the string to the reverse string function and display the reversed string '''
day = str(input()) if (day == "Monday") or (day == "Tuesday") or (day == "Friday"): print("12") elif (day == "Wednesday") or (day == "Thursday"): print("14") else: print("16")
''' Joãozinho tem que ajudar seu pai. Um relatório específico com alguns números está saindo com caracteres indesejáveis no meio. A ideia é apenas somar os 3 valores que aparecem em cada linha sempre na mesma posição, ignorando as letras e apresentar esta soma. Não existem espaços em branco na linha. Entrada A primeir...
def two_fer(name=""): if not name.strip(): return "One for you, one for me." else: return "One for {}, one for me.".format(name)
""" The probe's x,y position starts at 0,0. Then, it will follow some trajectory by moving in steps. On each step, these changes occur in the following order: The probe's x position increases by its x velocity. The probe's y position increases by its y velocity. Due to drag, the probe's x...
""" Write a Python program to check if two given strings are isomorphic to each other or not. """ def isIsomorphic(str1, str2): dict_str1 = {} dict_str2 = {} for i, value in enumerate(str1): dict_str1[value] = dict_str1.get(value, []) + [i] for j, value in enumerate(str2): dict_str2[va...
class Args: def __init__(self, config, checkpoint): self.cfg = config self.checkpoint = checkpoint self.sp = True self.detector = "yolo" self.inputpath = "./" self.inputlist = "" self.inputimg = "" self.outputpath = "examples/res/" self.save_im...
PANDA_MODELS = dict( gt_joints='dream-panda-gt_joints--495831', predict_joints='dream-panda-predict_joints--173472', ) KUKA_MODELS = dict( gt_joints='dream-kuka-gt_joints--192228', predict_joints='dream-kuka-predict_joints--990681', ) BAXTER_MODELS = dict( gt_joints='dream-baxter-gt_joints--510055...
n = int(input()) narr = list(map(int,input().split())) ev,od = 0,0 for i in range(n): if narr[i]%2==0: ev+=narr[i] else: od+=narr[i] print(od-ev)
def linear_search(array, n): """ - Definition - In computer science, linear search or sequential search is a method for finding a target value within a list. It sequentially checks each element of the list for the target value until a match is found or until all the elements have been searched. Line...
def _resource_from_cache_prefix(resource, cache): """ Combine the resource name with the cache prefix (if any) """ if getattr(cache, 'key_prefix', None): name = '{} {}'.format(resource, cache.key_prefix) else: name = resource # enforce lowercase to make the output nicer to read ...
#!usr/bin/env python3 # -*- coding:utf-8 -*- ''' Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found in the array, return [-1, -1]. For example, Given [5, 7, 7, 8, 8, 10] and ...
# Here we assume that cs_array has the dimensions (n_bins, n_chans, n_seg) # Where n_chans is the number of channels of interest ## cs_array has been filtered before this step cs_avg = np.mean(cs_array, axis=-1) ## Take the IFFT of the cross spectrum to get the CCF ccf_avg = fftpack.ifft(cs_avg, axis=0).real ccf_arra...
# Copyright (c) 2017 Dustin Toff # Licensed under Apache License v2.0 load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_repository") def new_github_repository(name = None, user = None, project = None, commit = None, tag ...
""" sqmpy ~~~~~ A job management web application that makes it easier for scientists to submit and monitor jobs to remote to remote resources. `sqm' stands for Simple Queue Manager. """ __author__ = 'Mehdi Sadeghi' __version__ = '0.4'
int_list = list(map(int, input().split())) movement = int(input()) for i in range(movement): int_list.append(int_list[0]) int_list.remove(int_list[0]) print(int_list)
total = 0 count = 0 average = 0 smallest = None largest = None print('before largest:', largest) while True: inp = input('>') if inp == "done": break try: if float(inp): total += float(inp) count += 1 new_value = float(inp) if largest is None o...
# # PySNMP MIB module Nortel-MsCarrier-MscPassport-AlarmMIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Nortel-MsCarrier-MscPassport-AlarmMIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:19:28 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 #...
def insertion_sort(a): for i in range (1,len(a)): c=a[i] k=i-1 while (k>=0) and (c<=a[k]) : a[k+1] = a[k] k=k-1 a[k+1] = c n=int(input("Enter No. Of Elements in List :-s ")) a=[i for i in range (n)] print ("Enter the Elements one after the other :...
""" assign a database version to the getpaid installation for future upgrades. """ def evolve( portal ): # the upgrade framework will take care of upgrading for us pass