content stringlengths 7 1.05M |
|---|
best_bpsp = float("inf")
n_feats = 64
scale = 3
resblocks = 3
K = 10
plot = ""
log_likelihood = True
collect_probs = False
|
def test():
# Test
assert("for index, area in enumerate(areas)" in __solution__ or "for index, area in enumerate( areas)" in __solution__ or "for index, area in enumerate(areas )" in __solution__ or "for index, area in enumerate( areas )" in __solution__
), "اجابة خاطئة: هناك خطأ في صناعة اللوب"
... |
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def reorderList(self, head):
"""
:type head: ListNode
:rtype: void Do not return anything, modify head in-place instead.
1->2->3->4
... |
def countArrangement(n: int) -> int:
options = [[] * n for _ in range(n)]
for i in range(1, n + 1):
for j in range(1, i):
if i % j == 0:
options[i-1].append(j)
for j in range(i, n+1, i):
options[i-1].append(j)
options.sort(key=len)
taken ... |
S = 'I want that Farm House to be in my name, comprende? Also, I want Chocolates.'
D = {}
#SS = S.split()
for item in S:
if item in D:
D[item] = D[item] + 1
else:
D[item] = 1
print(D)
|
class TestSessOverallResults:
def __init__(self):
self._recall = -1.
self._precision = -1.
self._f_measure = -1.
def __str__(self):
rez = '\nRecall : ' + str(self.recall)
rez += '\nPrecision : ' + str(self.precision)
rez += '\nF-measure : ' + str... |
def dfs(node,parent):
for child in graph[node]:
if child!=parent:
dfs(child,node)
taken,nottaken=1,0
for neigh in graph[node]:
if neigh!=parent:
taken+=dp[neigh][0]
nottaken+=dp[neigh][1]
dp[node][1]=min(taken,nottaken)
dp[node][0]=nottaken
if __... |
TASK_URL = "http://empty-website.ctf.sicamp.ru:8080"
TITLE = "Пустой сайт?"
STATEMENT_TEMPLATE = f'''
Действительно ли на [этом]({TASK_URL}/{{0}}) сайте нет ничего полезного?
'''
def generate(context):
participant = context['participant']
token = tokens[participant.id % len(tokens)]
return TaskSta... |
# Application condition
waitFor.id == max_used_id and not cur_node_is_processed
# Reaction
wait_for_touch_sensor_code = "while (!ecrobot_get_touch_sensor(NXT_PORT_S" + waitFor.Port + ")) {}\n"
code.append([wait_for_touch_sensor_code])
id_to_pos_in_code[waitFor.id] = len(code) - 1
cur_node_is_processed = True
|
print('Event')
#-------------Lorem
for i in [5,4,5]:
print(i) |
# 4-6. Odd Numbers: Use the third argument of the range() function to make a list
# of the odd numbers from 1 to 20. Use a for loop to print each number.
for i in range(1,21):
if i%2!=0:
print(i) |
class ResponseObject():
def __init__(self, status=500, msg="Unknown Error", data=None):
self.status = status
self.msg = msg
if data:
self.data = data
else:
self.data = {}
self.response = { "status" : self.status, "msg" : self.msg, "data" : self.data ... |
MOEST = {
"professionOrOccupation": [{
"id": "https://d-nb.info/gnd/4040841-3",
"label": "Musiker"
}, {
"id": "https://d-nb.info/gnd/4012434-4",
"label": "Dirigent"
}],
"gender": [{
"id": "https://d-nb.info/standards/vocab/gnd/gender#male",
"label": "Männl... |
class Settings:
PROJECT_TITLE: str = "Book store"
PROJECT_VERSION: str = "0.1.1"
settings = Settings()
|
__all__ = [
'api_exception',
'update_webhook_400_response_exception',
'retrieve_webhook_400_response_exception',
'create_webhook_400_response_exception',
] |
"""
An example of a procedural style FizzBuzz program.
For coding interviews, this is okay, but in general,
I do NOT recommend this approach to coding as it is
nearly impossible to test its correctness.
"""
for x in range(1, 101):
if x % 15 is 0:
print("FizzBuzz")
elif x % 3 is 0:
print("Fizz")
el... |
# simple calculator
# This function adds two numbers
def add(x, y):
return float(x) + float(y)
# This function subtracts two numbers
def subtract(x, y):
return float(x) - float(y)
# This function multiplies two numbers
def multiply(x, y):
return float(x) * float(y)
# This function divides two numbers
de... |
class Stop:
"""
Represents each one of the physical stops in a GTFS dataset (from https://developers.google.com/transit/gtfs/reference/)
Fields
______
* **id** `(stop_id)` **Required** - The stop_id field contains an ID that uniquely identifies a stop, station, or station entrance. Multiple routes... |
DEFAULT_MOD = 10 ** 9 + 7
def mod_permutation(n, k, mod=DEFAULT_MOD):
if k >= mod:
return 0
ret = 1
for i in range(n, n - k, -1):
ret = (ret * i) % mod
return ret
def mod_factorial(n, mod=DEFAULT_MOD):
if n >= mod:
return 0
else:
return mod_permutation(n, n, m... |
# -*- coding: utf-8 -*-
n = int(input("Enter one number: "))
if n < 0:
print("please enter a positive ")
else:
while n != 1:
print(int(n))
if n % 2 != 0:
n = 3 * n + 1
else:
n /= 2
print("result ", int(n))
|
"""
Modified from https://github.com/facebookresearch/fvcore
"""
__all__ = ["Registry"]
class Registry:
"""A registry providing name -> object mapping, to support
custom modules.
To create a registry (e.g. a backbone registry):
.. code-block:: python
BACKBONE_REGISTRY = Registry('BACKBONE')... |
"""The protocol_*.py files in this package are based on PySerial's file
test/handlers/protocol_test.py, modified for different behaviors. The call
serial.serial_for_url("XYZ://") looks for a class Serial in a file named protocol_XYZ.py in this
package (i.e. directory).
This package init file will be loaded as part of... |
def create_authority_hints(default_hints, trust_chains):
"""
:param default_hints: The authority hints provided to the entity at startup
:param trust_chains: A list of TrustChain instances
:return: An authority_hints dictionary
"""
intermediates = {trust_chain.iss_path[1] for trust_chain in tr... |
def get_special_people(affiliation):
# print(affiliation)
'''
人を抽出
{
name:名前,
count:登場回数
}
'''
people_list=[]
for value in affiliation.values():#辞書型なのでvalues必要
if(value['form']=="Person"):
# print(value['lemma'])
people_list.append(value['l... |
{"query": {"function_score": {"query": {
"bool": {"should": [{"multi_match": {"query": "python", "fields": ["nickname^2", "username^4"]}}],
"filter": {"range": {"follower_count": {"gte": "50000", "lte": "100000"}}}}},
"field_value_factor": {"field": "follower_count", "modifier": "log1p", "missing":... |
"""Crie um algoritmo que multiplique dois valores aleatórios entre 1 e 50. Você deverá usar
condicionais e funções nesse processo."""
def multiplicacao(valor_1,valor_2):
multiplica = valor_1*valor_2
print(f"\nA multiplicação dos dois valores é: {multiplica}!""\n")
valor1 = int(input("Digite um valor de 1 ... |
def restart():
prompt = input("Type [y] to play again or any other key to quit. ")
if prompt.lower() == "y":
return True
else:
return False
|
"Faça um script que informe se uma pessoa está pronta para dirigir um carro."
"Uma pessoa só pode dirigir se for maior de idade e se tiver carteira de motorista."
"Dica: carteira pode ser variável lógica."
# IDADE
idade = int(input("Digite sua idade: "))
if idade >=18:
print("Você tem a idade mínima para dirigir... |
# Exercício 081 - Extraindo Dados de uma Lista
valores = []
while True:
valores.append(int(input('Digite um número: ')))
if input('Quer continuar? [S/N] ') not in 'sS': break
print(f'Você digitou {len(valores)} elementos.')
print(f'Os valores em ordem decrescente são {sorted(valores, reverse=True)}')
print(f'... |
#!/usr/bin/env python3
try:
checksum = 0
while True:
numbers = [int(n) for n in input().split()]
checksum += max(numbers) - min(numbers)
except EOFError:
print(checksum)
|
TOKEN = "1807234388:AAHbvU9Crr6BURnLMwT8m4hrneGgxGvbm8A"
pochta_api_login = "YadBdduZvCLDvZ"
pochta_api_password = "oAD8k3MpRHq5" |
def escape(text):
return text.replace('\\', '\\\\').replace('"', '\\"')
opposites = {
'north': 'south',
'east': 'west',
'south': 'north',
'west': 'east'
}
class Rel:
def __init__(self, offset=0):
self.offset = offset
def __add__(self, other):
return Rel(self.offset + othe... |
# /General
# api: Allows return the results in json.
# db_name_f: Name of data base file.
api_return = True
db_name_f = 'data.db'
# /APIs
# Enables or disables the API.
situacaoIntelx = False
situacaoHaveIPwned = False
situacaoScylla = True
# /Notification E-mail account
# id_f3: E-mail.
# id_f4: Password.
id_f3 = 'E... |
#Write a Python program to print without newline or space.
print("The Lord is good.", end="")
print("All the time")
|
class Solution(object):
def twoSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
length = len(nums)
hashmap = {}
for i in range(length):
if target - nums[i] in hashmap:
return [hash... |
#!/usr/bin/env python
"""Tools to updates list of data."""
def update_month_index(entries, updated_entry):
"""Update the Monthly index of blog posts.
Take a dictionaries and adjust its values
by inserting at the right place.
"""
new_uri = list(updated_entry)[0]
try:
entries[new_uri]['... |
#!/usr/bin/env python3
# https://www.hackerrank.com/challenges/py-if-else
if __name__ == '__main__':
n = int(input())
r = n % 2
if r == 0:
if n > 20 or (n >= 2 and n <= 5):
print ("Not Weird")
elif n >= 6 and n <= 20:
print ("Weird")
else:
print ("Weird"... |
### Written by Jason-Silla ###
### https://github.com/Jason-Silla/JohnAI ###
class Fraction:
numerator = 1
denominatior = 1
def __init__(self, *info):
if len(info) == 2:
self.numerator = numerator
self.denominator = denominator
elif len(info) == 0:
pass
... |
def resolve():
n, m, l = map(int, input().split())
a = [list(map(int, input().split())) for i in range(n)]
b = [list(map(int, input().split())) for i in range(m)]
c = []
for i in range(n):
tmp = []
for j in range(l):
x = 0
for k in range(m):
... |
# -*- coding: utf-8 -*-
'''
Sort and save unique values to a new file. Ignore rows that do not have a value.
Sample values in a file might look like this
02/02/2018 23:15:12, 1234567889
02/02/2018 23:15:13, 1234568889
02/02/2018 23:15:18, 1234568889
02/02/2018 23:15:19,
02/02/2018 23:15:25, 1234545889
02/02/2018 23:1... |
__author__ = 'Tony Beltramelli - www.tonybeltramelli.com'
CONTEXT_LENGTH = 64
IMAGE_SIZE = 256
BATCH_SIZE = 64
EPOCHS = 10
STEPS_PER_EPOCH = 72000
IMG_DATA_TYPE = ".jpg"
|
class Solution:
def fizzBuzz(self, n: int) -> List[str]:
l = list()
for x in range(1, n + 1):
if x % 3 == 0 and x % 5 == 0:
l.append('FizzBuzz')
elif x % 3 == 0:
l.append('Fizz')
elif x % 5 == 0:
l.append('B... |
class Label:
def __init__(self, name):
self.name = name
class LabelAccess:
def __init__(self, name, lower_byte):
self.name = name
self.lower_byte = lower_byte
def high(name):
return LabelAccess(name, False)
def low(name):
return LabelAccess(name, True) |
widths = {'Alpha': 722,
'Beta': 667,
'Chi': 722,
'Delta': 612,
'Epsilon': 611,
'Eta': 722,
'Euro': 750,
'Gamma': 603,
'Ifraktur': 686,
'Iota': 333,
'Kappa': 722,
'Lambda': 686,
'Mu': 889,
'Nu': 722,
'Omega': 768,
'Omicron': 722,
'Phi': 763,
'Pi': 768,
'Psi': 795,
'Rfraktur': 795,
... |
def dfNoHdr(df):
# INPUT: df with a header
# OUTPUT: dfNH without a header
dict={}
for column in df.columns:
dict[column] = df.columns.get_loc(column)
df.rename(columns = dict, inplace = True)
return df |
# Write a python function which accepts a linked list of whole numbers,
# moves the last element of the linked list to front and returns the linked list.
# Sample Input Expected Output
# 9->3->56->6->2->7->4 4->9->3->56->6->2->7
#DSA-Prac-1
class Node:
def __init__(self, data):
self.__data = data
... |
NEW_AIRTABLE_REQUEST_JSON = {
"Skillsets": "C / C++,Web (Frontend Development),Mobile (iOS),Java,DevOps",
"Slack User": "ic4rusX",
"Details": " Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin blandit porttitor nulla eu consectetur."
" Maecenas consectetur erat at odio iaculis, ... |
# -*- coding: utf-8 -*-
#
# Copyright 2014-2021 BigML
#
# 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 ... |
# 1
# 12
# 123
# 1234
# 12345
n = int (input("Enter the number "))
for i in range(1,n+1):
for j in range(1,i+1):
print(j,end="")
print() |
class School:
# Konstruktor z domyślnym argumentem - uwaga na domyślną listę!
def __init__(self, name, students=None):
self.name = name
if students is None:
students = []
self.students = students
class Student:
def __init__(self, first_name, last_name):
self... |
INCREASE: int = 1 # global namespace
DECREASE: int = -1
space = ' '
sign = '* '
def print_rhombus(n: int): # global namespace
# fn-in-fn: closure
def print_line(i: int, direction: int): # local namespace visible in print_rhombus
if i == 0: # i is part of the local namespace of print_line
... |
# _________________________________________________________________________
#
# PyUtilib: A Python utility library.
# Copyright (c) 2008 Sandia Corporation.
# This software is distributed under the BSD License.
# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
# the U.S. Government retains ... |
# Copyright 2019 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... |
def method1(n: int) -> int:
if n <= 2:
return []
else:
sieve = [True] * (n + 1)
for x in range(3, int(n ** 0.5) + 1, 2):
for y in range(3, (n // x) + 1, 2):
sieve[(x * y)] = False
return [2] + [i for i in range(3, n, 2) if sieve[i]]
if __name__ == "__mai... |
"""This file contains all defined containers and heat sources as variables.
All variables are strings, so there are no docstrings available.
In case you are wondering, this is the text in the module docstring of /tools/equipments.py .
"""
# containers
pewter_cauldron = 'pewter_cauldron'
copper_cauldron = 'copper_cau... |
#!/usr/bin/env python3
_ = input()
_v, *v = sorted(map(int, input().split()))
for i in v:
_v = (_v + i) / 2
print(_v) |
#
# PySNMP MIB module TRIPPLITE-PRODUCTS (http://pysnmp.sf.net)
# ASN.1 source file://./TRIPPLITE-PRODUCTS.MIB
# Produced by pysmi-0.2.2 at Wed Apr 11 14:12:10 2018
# On host Tim platform Linux version 4.15.15-1-ARCH by user syp
# Using Python version 2.7.13 (default, Oct 26 2017, 17:04:19)
#
Integer, ObjectIdentifier... |
# Raised when VT-100 can't be enabled
class VT100Error( Exception ):
def __init__( self ):
super().__init__( "Couldn't enable VT-100 terminal emulation" )
|
class Solution:
"""
@param pid: the process id
@param ppid: the parent process id
@param kill: a PID you want to kill
@return: a list of PIDs of processes that will be killed in the end
"""
def killProcess(self, pid, ppid, kill):
groupByPPID = {}
index = 0
while inde... |
#Questão: Pares, Ímpares, Positivos e Negativos
a = []
for i in range(5):
n = int(input())
a.append(int(n))
l = 0
m = 0
o = 0
p = 0
for j in range(5):
if a[j] % 2 == 0:
l += 1
if a[j] % 2 == 1:
m += 1
if a[j] > 0:
o += 1
if a[j] < 0:
p += 1
print(l, "valor(es) pa... |
'''
На вход программе подается два натуральных числа a и b (a< b). Напишите программу,
которая находит натуральное число из отрезка [a;b] с максимальной суммой делителей.
Формат входных данных
На вход программе подаются два числа, каждое на отдельной строке.
Формат выходных данных
Программа должна вывести два числа ... |
"""
spiel.data
Module for organizing input data to the SPieL system
"""
class ParseError(ValueError):
""" Raised by bad values for a new instance """
class Instance:
"""
Represents a single end-to-end training instance
"""
def __init__(self, shape, segments, labels):
"""
Initial... |
test1 = 6 # True
test2 = 11 # False
test3 = 25 # True
test4 = 330 # 165 33
dividers = [2, 3, 5]
def is_ugly(n):
result = n
i = 0
while result > 1:
i += 1
print(i)
divided = False
for divisor in (5, 3, 2):
quotent, reminder = divmod(result, divisor)
... |
# here the assumption is the user will give "n"
# the function has to print all dice rolls possible for "n" dices
def collect_all_dice_rolls(n):
result_set = []
helper(n, [], result_set)
return result_set
def helper(n, roll_set, result_set):
if n == 0:
result_set.append(list(roll_set))
else:
... |
"""
This sub-package holds the Scripts system. Scripts are database
entities that can store data both in connection to Objects and Accounts
or globally. They may also have a timer-component to execute various
timed effects.
"""
|
SAMPLE_YEAR = 1983
SAMPLE_YEAR_SHORT = 83
SAMPLE_MONTH = 1
SAMPLE_DAY = 2
SAMPLE_HOUR = 15
SAMPLE_UTC_HOUR = 20
SAMPLE_HOUR_12H = 3
SAMPLE_MINUTE = 4
SAMPLE_SECOND = 5
SAMPLE_PERIOD = 'PM'
SAMPLE_OFFSET = '-00'
SAMPLE_LONG_TZ = 'UTC'
def create_sample(template: str) -> str:
return (
template
.repl... |
# https://leetcode.com/problems/largest-triangle-area/submissions/
# Time:26.45% Memory:100%
class Solution(object):
def largest_triangle_area(self, points):
max_area = 0
for i in range(len(points) - 2):
for j in range(i+1, len(points) - 1):
for k in range(j+1, len(point... |
# Faça um Programa que leia três números e mostre o maior e o menor deles.
num1 = int(input('Informe um numero: '))
num2 = int(input('Informe outro numero: '))
num3 = int(input('Informe mais um numero: '))
if num1 == num2 and num1 == num3:
print('Os numeros sao iguais')
else:
if num1 > num2 and num1 > num3:
... |
# -*- coding: utf-8 -*-
BOT_NAME = 'p1_pipeline'
SPIDER_MODULES = ['p1_pipeline.spiders']
NEWSPIDER_MODULE = 'p1_pipeline.spiders'
ROBOTSTXT_OBEY = True
# Configure item pipelines
# See http://scrapy.readthedocs.org/en/latest/topics/item-pipeline.html
ITEM_PIPELINES = {
'p1_pipeline.pipelines.DropNoTagsPipelin... |
# blanyal, hiimbex :)
'''
The goal of binary ssearch is to divide the search space in half every iteration
Binary search also assumes you have a sorted list of integers and goes through every
time and determines if the item you are searching for is greater than or less than your
mid point and jumps to... |
class NoBranchSelected(Exception):
def __init__(self, message: str = ''):
self.message: str = message
def __str__(self):
return """
No git Branch Selected
{0!s}
""".format(self.message)
|
# gemato: Utility functions
# vim:fileencoding=utf-8
# (c) 2017-2020 Michał Górny
# Licensed under the terms of 2-clause BSD license
class MultiprocessingPoolWrapper:
"""
A portability wrapper for multiprocessing.Pool that supports
context manager API (and any future hacks we might need).
Note: the m... |
{
"targets" : [
{
"target_name" : "leveled",
"sources" : ["src/leveled.cc", "src/batch.cc"],
"dependencies" : [
"deps/leveldb/binding.gyp:leveldb"
]
}
]
}
|
x = 20
# xが10以上30以下の場合に「xは10以上30以下です」と出力してください
if x >= 10 and x <= 30:
print ("xは10以上30以下です")
y = 60
# yが10未満または30より大きい場合に「yは10未満または30より大きいです」と出力してください
if y < 10 or y > 30:
print ("yは10未満または30より大きいです")
z = 55
# zが77ではない場合に「zは77ではありません」と出力してください
if not z == 77:
print ("zは77ではありません") |
class Solution:
def makesquare(self, matchsticks: List[int]) -> bool:
"""
[1,1,2,2,2] total = 8, k = 4, subset = 2
subproblems:
Can I make 4 subsets with equal sum out of the given numbers?
Find all subsets, starting from 0 .... |
posts = [
{
"id": 1,
"title": "Pancake",
"content": "Lorem Ipsum ..."
}
]
users = [] |
class Solution:
def largestRectangleArea(self, heights: List[int]) -> int:
max_area = 0
stack = [] #(index, height)
for i, h in enumerate(heights):
start = i
while stack and stack[-1][1] > h:
index, height = stack.pop()
max_are... |
#!/usr/bin/python3
# Generators
def genFibonacci():
"""
Fibonacci generator
"""
yield 0
yield 1
cnt = 2
a = 0
b = 1
c = a + b
while cnt < 10:
c = a + b
yield c
a = b
b = c
cnt += 1
def genPrimes():
n = 1000
primes = [True]*(n+1... |
## @package AssociateJoint Association joint that used by gait recorder
## The class that has all the information about associations
class AssociateJoint:
## Constructor
# @param self Object pointer
# @param module Module name string
# @param node Node index
# @param corr Bool, correaltion: True for positive; Fal... |
"""1278. Palindrome Partitioning III
https://leetcode.com/problems/palindrome-partitioning-iii/
You are given a string s containing lowercase letters and an integer k.
You need to :
First, change some characters of s to other lowercase English letters.
Then divide s into k non-empty disjoint substrings such that each... |
class Solution:
def generateMatrix(self, n):
"""
:type n: int
:rtype: List[List[int]]
"""
matrix = [[0 for _ in range(n)] for _ in range(n)]
lvl, c = 0, 1
while lvl <= n//2:
if c <= n*n:
for i in range(lvl, n-lvl):
... |
def modify_input_for_multiple_files(hotel, image):
dict = {}
dict['hotel'] = hotel
dict['image'] = image
return dict
def modify_input_for_multiple_room_files(room, image):
dict = {}
dict['room'] = room
dict['image'] = image
return dict
def modify_input_for_multiple_pack... |
class Solution:
def judgeCircle(self, moves: str) -> bool:
x = y = 0
for m in moves:
if m == 'R':
x += 1
elif m == 'L':
x -= 1
elif m == 'U':
y -= 1
else:
y += 1
return x == 0 and ... |
for _ in range(int(input())):
n = int(input())
l = list(map(int, input().split(" ")))
is_true = False
for i in range(1, n):
if l[i] >= l[i-1]:
is_true = True
break
if is_true:
print("YES")
else:
print("NO")
|
# stops the current iteration in a loop
class MinorException(Exception):
pass
# stops the bot
class CriticalException(Exception):
pass |
measured_values = [None] * N
for i in range(N):
# Intercept qubits from Alice
qubit = conn.recvQubit()
# Measure all qubits in standard basis
measured_values[i] = qubit.measure(inplace=True)
# Forward qubits to Bob
conn.sendQubit(qubit, "Bob")
|
# Here list comprehension is used
# all() is used to make sure that the list
# goes through all the values of x and y
n = input()
print([x for x in range(2, int(n))
if all(x % y != 0 for y in range(2, int(x**0.5)+1))])
# These lines make sure the program doesn't close
# before you even see the output!
... |
class IFrameworkInputElement(IInputElement):
""" Declares a namescope contract for framework elements. """
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
Name=property(lambda self... |
#Jogadores de futebol exercicio 093/1 - Guanabara
inf = dict()
gols = list()
soma = 0
inf['nome'] = str (input ('Nome: '))
n = int (input (f'Quantas partidas {inf["nome"].upper()} jogou ? '))
print ()
for c in range (1,n + 1):
gols.append(int(input(f'Quantos gols na {c}º partida ? ')))
inf['marcou'] = gols
... |
names = ["Serena",
"Andrew",
"Bobbie",
"Cason",
"David",
"Farzana",
"Frank",
"Hannah",
"Ida",
"Irene",
"Jim",
"Jose",
"Keith",
"Laura",
"Lucy",
"Meredith",
"Nick",
"Ad... |
params = {
'model_name': 'NCP', # model name
'cluster_generator': "MFM", # or CRP
'maxK': 12, # max number of clusters to generate
# MFM
"poisson_lambda": 3 - 1, # K ~ Pk(k) = Poisson(lambda) + 1
"dirichlet_alpha": 1, # prior for cluster proportions
# CRP
'crp_alpha': .7, # dis... |
VCF_CONFIG = {
"load_modules": ["samtools/1.4.1", "bcftools/1.4.1"],
"ref_genome": "/external/malaria_SciRep2018/ref_genomes/Plasmodium_falciparum_3D7.fasta",
"data_directory": "/external/malaria_SciRep2018/R7.3_fastq",
"save_directory": "/processed/variant_call_v1/",
} |
# coding:utf-8
"""
Name : config.py
Author : blu
Time : 2022/3/7 16:19
Desc :
"""
Debug = False
filter_host = "http://192.168.9.166:5000"
class DatabaseConfig:
mongo_host = 'XXXX'
mongo_user = 'XXXX'
mongo_pwd = 'XXXXX'
mongo_database = 'XXXX'
|
"""Import Variants and some misconceptions
# module1.py
import math
is marth in sys.
""" |
class Config:
DATABASE_USER = ''
DATABASE_PASSWORD = ''
DATABASE_DB = ''
DATABASE_HOST = ''
DATABASE_PORT = 3306
LOG_FILE = '' |
#
def __init__(self):
super().__init__(abc)
#
|
class Solution:
def findDisappearedNumbers(self, nums: [int]) -> [int]:
return list(set(range(1, len(nums) + 1)) - set(nums))
s = Solution()
print(s.findDisappearedNumbers([1, 1])) |
# By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
# What is the 10 001st prime number?
primes = [2]
next = 3
def isPrime(n):
for i in primes:
if n % i == 0:
return False
return True
while (len(primes) < 10001):
if isPrime(next):
primes.append(next)
nex... |
def test_address_on_home_page(app):
address_from_home_page = app.contact.get_contact_list()[0]
address_from_edit_page = app.contact.get_contact_info_from_edit_page(0)
assert address_from_home_page.address == address_from_edit_page.address
|
class Dataset(object):
"""An abstract class representing a Dataset.
All other datasets should subclass it. All subclasses should override
``__len__``, that provides the size of the dataset, and ``__getitem__``,
supporting integer indexing in range from 0 to len(self) exclusive.
"""
def __geti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.