content stringlengths 7 1.05M |
|---|
def get_metrics(history):
plot_metrics = [
k for k in history.keys()
if k not in ['epoch', 'batches'] and not k.startswith('val_')
]
return plot_metrics
def get_metric_vs_epoch(history, metric, batches=True):
data = []
val_metric = f'val_{metric}'
for key in [metric, val_metric... |
DEFAULT_JOB_CLASS = 'choreo.multirq.job.Job'
DEFAULT_QUEUE_CLASS = 'choreo.multirq.Queue'
DEFAULT_WORKER_CLASS = 'choreo.retry.RetryWorker'
DEFAULT_CONNECTION_CLASS = 'redis.StrictRedis'
DEFAULT_WORKER_TTL = 420
DEFAULT_RESULT_TTL = 500
|
#Aligam GiSAXS sample
#
def align_gisaxs_height_subh( rang = 0.3, point = 31 ,der=False ):
det_exposure_time(0.5)
sample_id(user_name='test', sample_name='test')
yield from bp.rel_scan([pil1M,pil1mroi1,pil1mroi2], piezo.y, -rang, rang, point)
ps(der=der)
... |
# TODO: Give better variable names
# TODO: Make v3 and v4 optional arguments
def find(v1, v2, v3, v4):
return v1.index(v2, v3, v4)
|
# AUTHOR: prm1999
# Python3 Concept: Rotate the word in the list.
# GITHUB: https://github.com/prm1999
# Function
def rotate(arr, n):
n = len(arr)
i = 1
x = arr[n - 1]
for i in range(n - 1, 0, -1):
arr[i] = arr[i - 1]
arr[0] = x
return arr
#main
A = [1, 2, 3, 4, 5]
a=rotate(A,5)
... |
#
# PySNMP MIB module TERAWAVE-terasystem-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TERAWAVE-terasystem-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:16:09 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 ... |
#!/usr/bin/python
# -*- coding:utf-8 -*-
#Filename: soreted_iter.py
colors = [ 'red', 'green', 'blue', 'yellow' ]
for color in sorted(colors):
print (color)
# >>> blue
# green
# red
# yellow
for color in sorted(colors, reverse=True):
print (color)
# >>> yellow
# red
# green
# blue
... |
#Ejercicio 2
palabra=input ("Escribe una palabra y vamos a analizar si es polindroma o no: ")
p=len(palabra)
capicua=""
while p>0:
p=p-1
capicua=capicua+palabra[p] #Concateno las letras una por una y las guardo
if palabra ==capicua:
print("La palabra escogida es polindroma")
if palabra!= capicua:
... |
print("Hello World")
# The basics
name = "joey"
age = 27
print(name + str(age))
testList = [0,1,2]
testList.append(3)
testList.append(4)
for member in testList:
print(member)
for index,member in enumerate(testList):
print("Index: " + str(index) + " item: " + str(member))
# List Combining
list1 = [1,3,5,7... |
days = int(input())
type_of_room = input()
feedback = input()
price = 0
nights = days - 1
if type_of_room == 'room for one person':
price = 18
cost = nights * price
elif type_of_room == 'apartment':
price = 25
cost = nights * price
if days < 10:
cost = cost - (cost * 30 /100)
elif 10 <... |
#!/usr/bin/env python3
# Vrátí vstupní položku item, pokud tato může být prvkem množiny v Pythonu, v opačném případě frozenset(item)
#""" Pomocí kontroly datových typů se program větví na 2 části return item a retun frozenset(item) """
def can_be_a_set_member_or_frozenset(item):
""" Pomocí kontroly datových typů se... |
class A(object):
def go(self):
print("go A go!")
def stop(self):
print("stop A stop!")
def pause(self):
raise Exception("Not Implemented")
class B(A):
def go(self):
super(B, self).go()
print("go B go!")
class C(A):
def go(self):
super(C, self).go()
... |
#
# @lc app=leetcode id=902 lang=python3
#
# [902] Numbers At Most N Given Digit Set
#
# @lc code=start
class Solution:
def atMostNGivenDigitSet(self, D: List[str], N: int) -> int:
s = str(N)
n = len(s)
ans = sum(len(D) ** i for i in range(1, n))
for i, c in enumerate(s):
... |
fields = ["one", "two", "three", "four", "five", "six"]
together = ":".join(fields)
print(together) # one:two:three:four:five:six
together = ':'.join(fields)
print(together) # one:two and three:four:five:six
mixed = ' -=<> '.join(fields)
print(mixed) # one -=<> two and three -=<> four -=<> five -=<> six
another = '... |
# vim: set fileencoding=<utf-8> :
'''Counting k-mers'''
__version__ = '0.1.0'
|
# Registry Class
# CMD
# Refer this in Detectron2
class Registry:
def __init__(self, name):
self._name = name
self._obj_map = {}
def _do_register(self, name, obj):
assert (name not in self._obj_map), "The object named: {} was already registered in {} registry! ".format(name, self.... |
class Solution(object):
def reverseString(self, s):
"""
:type s: str
:rtype: str
"""
res = []
for i in range(len(s)-1,-1,-1):
res.append(s[i])
return ''.join(res)
|
# Use the file name mbox-short.txt as the file name
file_name = input("Enter file name: ")
fh = open(file_name)
count = 0
total = 0
for line in fh:
if not line.startswith("X-DSPAM-Confidence:"):
continue
pos = line.find('0')
total += float(line[pos:pos + 6])
count += 1
average = total... |
print("hello")
o= input ("input operation ")
x= int(input ("x = "))
y= int(input ("y = "))
if o == "+":
print (x+y)
elif o == "-":
print (x-y)
elif o == "*" :
print (x*y)
elif o == "/" :
if y==0 :
print ("it's a simple calc, don't be too smart")
else :
print (x/y)
elif o == "//" :... |
'''
0052. N-Queens II
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.
Given an integer n, return the number of distinct solutions to the n-queens puzzle.
Example:
Input: 4
Output: 2
Explanation: There are two distinct solutions to the 4-queens puz... |
wsgi_app = "tabby.wsgi:application"
workers = 4
preload_app = True
sendfile = True
max_requests = 1000
max_requests_jitter = 100
|
class ScramException(Exception):
pass
class BadChallengeException(ScramException):
pass
class ExtraChallengeException(ScramException):
pass
class ServerScramError(ScramException):
pass
class BadSuccessException(ScramException):
pass
class NotAuthorizedException(ScramException):
pass
|
sayilar = {"Bir": 1, "İki": 2, "Üç": 3, "Dört": 4, "Beş": 5}
sayilar["Altı"] = 6
sayilar[43] = "fds"
print(len(sayilar))
print()
for v in sayilar.values():
print(v)
|
# pylint: disable=missing-function-docstring, missing-module-docstring/
a = [i*j for i in range(1,3) for j in range(1,4) for k in range(i,j)]
n = 5
a = [i*j for i in range(1,n) for j in range(1,4) for k in range(i,j)]
|
"""
Syntax of while Loop
while test_condition:
body of while
"""
#Print first 5 natural numbers using while loop
count = 1
while count <= 5:
print(count)
count += 1
|
def get_lucky_numbers(self):
return self.execute("select lucky_number, count(lucky_number) as occurences, sum(case when outcome < 1 then 1 else 0 end) as negative_outcomes, sum(case when outcome > 1 then 1 else 0 end) as successful_outcomes from wager_history where lucky_number <> 0 group by lucky_number")
def ... |
# This is not a real module, it's simply an introductory text.
"""
The Blender Game Engine Python API Reference
============================================
See U{release notes<http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.49/Game_Engine>} for updates, changes and new functionality in the Game Engine Pyt... |
# Apr 21
class Solution(object):
def minMeetingRooms(self, intervals):
"""
:type intervals: List[List[int]]
:rtype: int
"""
result = 0
heap = []
count = 0
for start, end in intervals:
heapq.heappush(heap, [start, 1])
... |
class PlayerCharacter:
def __init__(self, name, age):
self.name = name
self.age = age
def run(self):
print("run")
return "done"
player1 = PlayerCharacter("Cindy", 50)
player2 = PlayerCharacter("Tom", 20)
print(player1.name)
print(player1.age)
print(player2.name)
print(... |
def Reverse(a):
return ' '.join(map(str, a.split()[::-1])) if not a.isspace() else a
if __name__ == '__main__':
print(Reverse(" "))
|
DATA_DIR = "data/captcha_images_v2"
BATCH_SIZE = 8
IMAGE_WIDTH = 300
IMAGE_HEIGHT = 75
NUM_WORKERS = 8
EPOCHS = 200
DEVICE = "cuda"
|
with open('dataset_3363_3.txt') as inf, open('MostPopularWord.txt','w') as ouf:
maxc = 0
s = inf.read().lower().strip().split()
s.sort()
for word in s:
counter = s.count(word)
if counter > maxc:
maxc = counter
result_word = word
ouf.write(result_word +' ' + st... |
def mpii_get_sequence_info(subject_id, sequence):
switcher = {
"1 1": [6416,25],
"1 2": [12430,50],
"2 1": [6502,25],
"2 2": [6081,25],
"3 1": [12488,50],
"3 2": [12283,50],
"4 1": [6171,25],
"4 2": [6675,25],
"5 1": [12820,50],
"5 2... |
# by Kami Bigdely
# Extract Class
class FoodInfo:
def __init__(self, name, prep_time, is_veggie, food_type, cuisine, ingredients, recipe):
self.name = name
self.prep_time = prep_time
self.is_veggie = is_veggie
self.food_type = food_type
self.cuisine = cuisine
se... |
class Solution:
def isHappy(self, n: int) -> bool:
seen = {}
while True:
if n in seen:
break
counter = 0
for i in range(len(str(n))):
counter += int(str(n)[i]) ** 2
seen[n] = 1
n = counter
counte... |
def christmas_tree(n, h):
tree = ['*', '*', '***']
start = '*****'
for i in range(n):
tree.append(start)
for j in range(1, h):
tree.append('*' * (len(tree[-1]) + 2))
start += '**'
foot = '*' * h if h % 2 == 1 else '*' * h + '*'
tree += [foot for i in range(n)]
... |
def turn_on_lights(lights, begin, end):
for x in range(begin[0], end[0]+1):
for y in range(begin[1], end[1]+1):
lights[x][y] = True
def turn_off_lights(lights, begin, end):
for x in range(begin[0], end[0]+1):
for y in range(begin[1], end[1]+1):
lights[x][y] = False
def ... |
#!/usr/bin/env python
''' WIP
def main():
script_main('you-get', any_download, any_download_playlist)
if __name__ == "__main__":
main()
'''
|
'''
@Date: 2019-09-10 20:36:03
@Author: ywyz
@LastModifiedBy: ywyz
@Github: https://github.com/ywyz
@LastEditors: ywyz
@LastEditTime: 2019-09-10 20:41:39
'''
for number in range(1, 7):
spacenumber = 6 - number
while spacenumber >= 0:
print(" ", end=" ")
spacenumber -= 1
n = number
while ... |
numeros = []
for n in range(1,101):
numeros.append(n)
print(numeros) |
#!/usr/bin/env python
def organism(con):
con.executescript(
'''
CREATE TABLE Organisms
(
abbr TEXT PRIMARY KEY,
name TEXT
);
''')
def species(con):
con.executescript(
'''
CREATE TABLE Genes
(
gid TEXT PRIMARY KEY,
name TEXT
);
CREATE TABLE GeneEntrezGeneIds
(
gid TE... |
"""
Module Docstring
Docstrings: http://www.python.org/dev/peps/pep-0257/
"""
__author__ = 'Yannic Schneider (v@vendetta.ch)'
__copyright__ = 'Copyright (c) 20xx Yannic Schneider'
__license__ = 'WTFPL'
__vcs_id__ = '$Id$'
__version__ = '0.1' #Versioning: http://www.python.org/dev/peps/pep-0386/
#
## Code goes here.
#... |
class DoubleExpression:
def __init__(self, value):
self.value = value
def accept(self, visitor):
visitor.visit(self)
|
# Time: O(m + n)
# Space: O(1)
class ListNode(object):
def __init__(self, x):
self.val = x
self.next = None
class Solution(object):
# @param two ListNodes
# @return the intersected ListNode
def getIntersectionNode(self, headA, headB):
curA, curB = headA, headB
while cu... |
#############################################
## hassioNode commandWord map
#############################################
print('Load hassioNode masterBedroom commandWord map')
wordMap = {
"Media": {
"Louder": [
{"id": 0, "type": "call_service", "domain": "media_player", "service": "volum... |
"""Utility functions for the testing module.
Dribia 2021/08/04, irene <irene@dribia.com>
"""
|
def add(x, y):
return x + y
def subtract(x, y):
return x - y
def inc(x):
return x + 1
def test_add():
assert add(1, 2) == 3
def test_subtract():
assert subtract(2, 1) == 1
def test_inc():
assert inc(1) == 2
|
class lrd:
def __init__(self, waiting_time, start_lr, min_lr, factor):
self.waiting_time = waiting_time
self.start_lr = start_lr
self.min_lr = min_lr
self.factor = factor
self.min_value = 10000000000000000000
self.waited = 0
self.actual_lr = self.start_lr
... |
class Solution(object):
def reverse(self, x):
"""
:type x: int
:rtype: int
"""
MAX_INT = (1 << 31) - 1
MIN_INT = -MAX_INT - 1
if x == MIN_INT: return 0
res = 0
p = x if x >= 0 else -x
while p != 0:
digit = p % 10
... |
#!/usr/bin/env python3
def check_palindrome(num):
num = str(num)
for i in range(0, int((len(num) + 1) / 2)):
if num[i] != num[-i]:
return False
return True
def simple_palindrome(num):
num = str(num)
return num == num[::-1]
biggest = 0
for i in range(100, 999)... |
"""
Reverse encoding functions.
Reverse encoding is the simplest of encoding methods. It just reverses order of
text characters.
"""
def encode(text: str) -> str:
"""
Reverse order of given text characters.
:param text: Text to reverse.
:return: Reversed text.
"""
reversed_text = "".join(cha... |
"""
Semantic adversarial Examples
"""
__all__ = ['semantic', 'Semantic']
def semantic(x, center:bool=True, max_val:float=1.):
"""
Semantic adversarial examples.
https://arxiv.org/abs/1703.06857
Note: data must either be centered (so that the negative image can be
made by simple negation) or must be in t... |
class Solution(object):
def isLongPressedName(self, name, typed):
"""
:type name: str
:type typed: str
:rtype: bool
"""
if name == typed:
return True
for c in name:
try:
index = typed.index(c)
ty... |
def consume_rec(xs, fn, n=0):
if n <= 0:
fn(xs)
else:
for x in xs:
consume_rec(x, fn, n=n - 1)
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# author: "Kairu"
# contact:
# date: "2017/11/17"
class PySubError(Exception):
"""基本错误类型"""
pass
class SubFormatError(PySubError):
"""字幕格式错误"""
pass
class AssFilePathError(PySubError):
"""文件路径错误"""
pass
class AssParseError(P... |
# Load the double pendulum from Universal Robot Description Format
#tree = RigidBodyTree(FindResource("double_pendulum/double_pendulum.urdf"), FloatingBaseType.kFixed)
#tree = RigidBodyTree(FindResource("../../notebooks/three_link.urdf"), FloatingBaseType.kFixed)
#tree = RigidBodyTree(FindResource("../../drake/examples... |
#071)Simular caixa eletronico, celulas 50,20,10,1 R$.EX: 100 e duas celulas de 50
#FORMA SEM O WHILE
saque = float(input('Qual valor você quer sacar? R$ '))
if saque == 0 or saque < 0:
print('Digite um valor acima de ZERO, por favor!')
cinquenta = saque//50
vinte = (saque%50)//20
dez = ((saque%50)%20)//10
um = ((saq... |
"""
Given two binary strings a and b, return their sum as a binary string.
Example 1:
Input: a = "11", b = "1"
Output: "100"
Example 2:
Input: a = "1010", b = "1011"
Output: "10101"
Constraints:
1 <= a.length, b.length <= 104
a and b consist only of '0' or '1' characters.
Each string does not contain leading ... |
def info_file_parser(filename, verbose=False):
results = {}
infile = open(filename,'r')
for iline, line in enumerate(infile):
if line[0]=='#': continue
lines = line.split()
if len(lines)<2 : continue
if lines[0][0]=='#': continue
infotype = lines[0]
infotype... |
class AlreadyExists(Exception):
pass
class NoRights(Exception):
pass
class EntryNotFound(Exception):
pass
class LoginFailed(Exception):
pass
# input validation
""" Input validation """
class InvalidInput(Exception):
pass
|
class Country():
def __init__(self, name='Unspecified', population=None, size_kmsq=None): #keyword argument.
self.name = name
self.population = population
self.size_kmsq = size_kmsq
def __str__(self):
return self.name
if __name__ == '__main__':
usa = Country(name='United ... |
def test_owner_register_success():
assert True
def test_owner_register_failure():
assert True
def test_worker_register_success():
assert True
def test_worker_register_failure():
assert True
def test_login_success():
assert True
def test_login_failure():
assert True
|
class MoveTurn(object):
def __init__(self):
self.end = False
self.again = False
self.move = None
if __name__ == "__main__":
Print('This class has been checked and works as expected.') |
#
# Created on Fri Apr 10 2020
#
# Title: Leetcode - Min Stack
#
# Author: Vatsal Mistry
# Web: mistryvatsal.github.io
#
class MinStack:
def __init__(self):
# Creating 2 stacks, stack : original data; currMinimum : to hold current minimum upon each push
self.stack = list()
self.currMinimum ... |
def insertionSort(aList):
first = 0
last = len(aList)-1
for CurrentPointer in range(first+1, last+1):
CurrentValue = aList[CurrentPointer]
Pointer = CurrentPointer - 1
while aList[Pointer] > CurrentValue and Pointer >= 0:
aList[Pointer+1] = aList[Pointer]
... |
# 8.10) Implement a function to fill a matrix with a new color given a point and the matrix
def paint_fill(matrix, y, x, new_color):
# print(x, y)
len_x = len(matrix[0]) - 1
len_y = len(matrix[0][0]) - 1
if y < 0 or y > len_y or x < 0 or x > len_x:
return
if matrix[y][x] == new_color:
... |
class Solution(object):
def sortedSquares(self, nums):
"""
:type A: List[int]
:rtype: List[int]
"""
squares = [0 for i in range(len(nums))]
# index iterator for squares array
i = len(squares) - 1
left = 0
right = len(nums) - 1
... |
"""
206. Reverse Linked List
Given the head of a singly linked list, reverse the list, and return the reversed list.
Example 1:
Input: head = [1,2,3,4,5]
Output: [5,4,3,2,1]
Example 2:
Input: head = [1,2]
Output: [2,1]
Example 3:
Input: head = []
Output: []
Constraints:
The number of nodes in the list is the r... |
fname = 'mydata.txt'
with open(fname, 'r') as md:
for line in md:
print(line)
# continue on with other code
fname = 'mydata2.txt'
with open(fname, 'w') as wr:
for i in range (20):
wr.write(str(i) + '\n')
|
class DeviceSwitch(object):
def __init__(self, device_data):
self.__device_data = device_data
def switch(self, key, value):
switcher = {
"identifier": self.__identifier,
"language": self.__language,
"timezone": self.__timezone,
"game_version": sel... |
class PID(object):
def __init__(self, kp, ki, kd):
self.kp = kp
self.ki = ki
self.kd = kd
self.error_int = 0
self.error_prev = None
def control(self, error):
self.error_int += error
if self.error_prev is None:
self.error_prev = error
e... |
class FindSumPairs:
def __init__(self, nums1: List[int], nums2: List[int]):
self.nums1 = nums1
self.nums2 = nums2
self.count2 = Counter(nums2)
def add(self, index: int, val: int) -> None:
self.count2[self.nums2[index]] -= 1
self.nums2[index] += val
self.count2[self.nums2[index]] += 1
def... |
def main(request, response):
name = request.GET.first("name")
source_origin = request.headers.get("origin", None);
response.headers.set("Set-Cookie", name + "=value")
response.headers.set("Access-Control-Allow-Origin", source_origin)
response.headers.set("Access-Control-Allow-Credentials", "true")
|
__all__ = ("InputDataError",)
class InputDataError(ValueError):
pass
|
# 04. Forum Topics
line = input()
forum_dict = {}
# def unique(sequence):
# seen = set()
# return [x for x in sequence if not(x in seen or seen.add(x))]
while not line == "filter":
words = line.split(" -> ")
topic = words[0]
hashtags = words[1].split(", ")
if topic not in forum_dict.keys():
... |
# Типы переменных
# Марка
name = 'ford'
print(name, type(name)) # class string
# Age
age = 3
print(age, type(age)) # class int
# Обьем двигателя
engine_volume = 1.6
print(engine_volume, type(engine_volume)) # class float
# Есть ли люк
see_sky = False
print(see_sky, type(see_sky)) # class bool
|
number1=10
number2=20
number4=40
number3=30
print('hello world')
print('镜湖')
|
n=int(input())%2
if n==0:
print("White")
else:
print("Black") |
{
'targets' : [
{
'target_name' : 'hdfs3_bindings',
'sources' : [
'src/addon.cc',
'src/HDFileSystem.cc',
'src/HDFile.cc'
],
'xcode_settings': {
'OTHER_CFLAGS': ['-Wno-unused-parameter', '-Wno-unus... |
"""
Ler um conjunto de números reais, armazenando-o em vetor e calcular o quadrado dos componentes deste vetor,
armazenando o resultado em outro vetor. Os conjuntos têm 10 elementos cada. Imprima todos os elementos.
"""
vetor = set(range(1, 11))
vetor1 = set({})
for numero in vetor:
numero = numero ** 2
vetor... |
expected_output = {
"max_num_of_service_instances": 32768,
"service_instance": {
2051: {
"pkts_out": 0,
"pkts_in": 0,
"interface": "GigabitEthernet0/0/5",
"bytes_in": 0,
"bytes_out": 0,
},
2052: {
"pkts_out": 0,
... |
def lazy_property(fn):
""" Convert function into a property where the function is
only called the first time the property is accessed """
varName = "__{0}".format(fn.__name__)
def lazyLoad(self):
if not hasattr(self, varName):
setattr(self, varName, fn(self))
re... |
STD_GAS_PRICE = int(3e9) # 3gwei
def autofund_account(web3, address, value):
""" Automatically fund an account """
assert isinstance(value, int)
net_id = int(web3.net.version)
balance = web3.eth.getBalance(address)
if net_id > 100:
# If this is the test network, make sure our deployment... |
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... |
# Generated by h2py from /usr/include/sys/socket.h
NC_TPI_CLTS = 1
NC_TPI_COTS = 2
NC_TPI_COTS_ORD = 3
NC_TPI_RAW = 4
SOCK_STREAM = NC_TPI_COTS
SOCK_DGRAM = NC_TPI_CLTS
SOCK_RAW = NC_TPI_RAW
SOCK_RDM = 5
SOCK_SEQPACKET = 6
SO_DEBUG = 0x0001
SO_ACCEPTCONN = 0x0002
SO_REUSEADDR = 0x0004
SO_KEEPALIVE = 0x0008
SO_DONTROUTE... |
"""
Write an algorithm to determine if a number n is happy.
A happy number is a number defined by the following process:
- Starting with any positive integer, replace the number by the sum of the squares of its digits.
- Repeat the process until the number equals 1 (where it will stay), or it loops endlessly in a cycl... |
# Desenvolva um algoritmo em Python que receba a matricula, nome, e 3 notas de um aluno e que calcule e exiba a matricula, nome, média e conceito do mesmo, conforme definido abaixo:
# Conceito A - Média maior ou igual a 7
# Conceito B - Média Menor do que 7 e maior ou igual a 5
# Conceito C - Média Menor do qu... |
def reverseNumber(number):
result = ''
while number:
result += str(number % 10)
number = number // 10
return result
def reverseNumberForSlice(number):
return str(number[::-1])
if __name__ == '__main__':
input_num = input("数値を入力してください。>>> ")
# 数値チェックをいれる
if input_num.isdigit... |
pkgname = "xev"
pkgver = "1.2.4"
pkgrel = 0
build_style = "gnu_configure"
hostmakedepends = ["pkgconf"]
makedepends = ["libxrandr-devel"]
pkgdesc = "Display X events"
maintainer = "q66 <q66@chimera-linux.org>"
license = "MIT"
url = "https://xorg.freedesktop.org"
source = f"$(XORG_SITE)/app/{pkgname}-{pkgver}.tar.bz2"
s... |
"""
These settings are only needed if you are planning to push to S3, GitHub or data.world.
If you only are only saving to local files, then these are not needed.
"""
S3_BUCKETS = {
# 'bucket': name of the bucket
# 'key': syntax: a_folder/another_folder
#
# For the 'scrub' bucket, one sub-folder named ... |
class SectionModel(Query):
def __init__(self, db):
self.db = db
self.table_name = "section"
super(SectionModel, self).__init__() |
funcs = [
"abs", "all", "any", "ascii", "bin", "callable", "chr", "compile",
"delattr", "dir", "divmod", "eval", "exec", "exit", "format", "getattr",
"globals", "hasattr", "hash", "help", "hex", "id", "input", "isinstance",
"issubclass", "iter", "len", "locals", "max", "min", "next", "oct",
"open", ... |
#
# PySNMP MIB module CISCO-STP-EXTENSIONS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-STP-EXTENSIONS-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:56:28 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.... |
class ParseException(Exception):
pass
class RollbackException(Exception):
pass
|
lista=[]
datos=int(input("Ingrese numero de datos: "))
for i in range(0,datos):
alt=float(input("Ingrese las alturas: "))
lista.append(alt)
print("La altura maxima es: ", max(lista)) |
#
# Building script for ipcamera application
#
{
'includes': ['build/common.gypi'],
'targets' : [
{
'target_name': 'camerartc',
'type': 'executable',
'include_dirs': [
'../third_party/webrtc/modules/interface',
],
'dependencies': [
'libjing... |
# -*- coding: utf-8 -*-
def test_del_first_group(app):
app.session.login(username = "admin", password = "secret")
app.group.delete_first_group()
app.session.logout() |
class DataNotFound(RuntimeError):
pass
class DataError(RuntimeError):
pass
class InvalidAge(RuntimeError):
pass
class InvalidMeasurement(RuntimeError):
pass |
# check modulo matches python definition
# this tests compiler constant folding
print(123 % 7)
print(-123 % 7)
print(123 % -7)
print(-123 % -7)
a = 321
b = 19
print(a % b)
print(a % -b)
print(-a % b)
print(-a % -b)
a = 987654321987987987987987987987
b = 19
print(a % b)
print(a % -b)
print(-a % b)
print(-a % -b)
|
# Топ-3 + Выигрышные номера последнего тиража
def test_top_3_winning_numbers_last_draw(app):
app.ResultAndPrizes.open_page_results_and_prizes()
app.ResultAndPrizes.click_game_top_3()
app.ResultAndPrizes.button_get_report_winners()
assert "ВЫИГРЫШНЫЕ НОМЕРА" in app.ResultAndPrizes.parser_report_text_w... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.