content
stringlengths
7
1.05M
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # 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 ...
class TestMesosAgentFailure(object): def test_agent_restart(self, failure_tester): """ Restart Mesos agents after creating a job and verify that the job is restarted and succeeds. Use a non-default restart-policy so that lost tasks will be retried. """ job = failure_...
# # Copyright (c) 2020 Cord Technologies Limited # # 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 ag...
def fun(s): sum = 0 ff = len(s) for i in range(ff): sum += int(s[i]) return sum print(fun(str(input())))
AUTH_MODULE = 'auth.ldap' AUTHENTICATION_BACKENDS = [ 'django.contrib.auth.backends.ModelBackend', 'django_python3_ldap.auth.LDAPBackend' ] # LDAP Server Settings LDAP_BASE_DN = 'dc=demo1,dc=freeipa,dc=org' LDAP_SERVER_URI = 'ipa.demo1.freeipa.org' LDAP_MANAGER_DN = 'cn=Directory Manager' LDAP_MANAGER_SECRET = ...
#!/usr/bin/env python3 """ This program is the implementation of the famous fizzbuzz program. If the number is divisible by both 3 and 5, then the progrma prints 'FizzBuzz'. If the enumber is only divisible by 3, then the program prints 'Fizz' If the enumber is only divisible by 5, then the program prints 'Buzz' """ d...
class JSONRefParseError(Exception): """Base exception for failures when parsing.""" class DocumentParseError(JSONRefParseError): """Failed to parse a document.""" class ReferenceParseError(JSONRefParseError): """Failed to parse a reference."""
def number_increment(numbers): def increase(): increased = [x + 1 for x in numbers] return increased return increase() print(number_increment([1, 2, 3]))
def part_1() -> None: height_map: list[list[int]] = [] lowest_truths: list[list[bool]] = [] with open("../data/day9.txt") as dFile: for row in dFile.readlines(): if (row := row.strip()) != "": height_map.append([]) lowest_truths.append([]) ...
""" 58. 4Sum time limit exceeded """ class Solution: """ @param numbers: Give an array @param target: An integer @return: Find all unique quadruplets in the array which gives the sum of zero """ def fourSum(self, numbers, target): # write your code here numbers = sorted(numbers) ...
#!/usr/bin/env python3 # https://abc071.contest.atcoder.jp/tasks/arc081_a d = {} _ = input() for x in input().split(): x = int(x) d[x] = d.get(x, 0) + 1 p = [] for k, v in d.items(): if v >= 4: p.append(k) if v >= 2: p.append(k) if len(p) < 2: print(0) else: p.sort(reverse=True) print(p[0] * p[1...
class Solution: def solveNQueens(self, n: int) -> List[List[str]]: ans = [] def dfs(row,tmp,cols,sums,subs): if row==n: ans.append(tmp) return for j in range(n): if j not in cols and row+j not in sums and row-j not in subs: ...
# # PySNMP MIB module TELESYN-ATI-TC (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TELESYN-ATI-TC # Produced by pysmi-0.3.4 at Wed May 1 12:37:45 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2...
# Copyright 2019 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
default_app_config = "rest_live.apps.RestLiveConfig" DEFAULT_GROUP_BY_FIELD = "pk" def get_group_name(model_label) -> str: return f"RESOURCE-{model_label}" CREATED = "CREATED" UPDATED = "UPDATED" DELETED = "DELETED"
def _filter(fn, arr): idx = 0 length = len(arr) result = [] while idx < length: if fn(arr[idx]): result.append(arr[idx]) idx += 1 return result
class InvalidCredentialsError(Exception): pass class NotAuthorisedError(Exception): pass class InvalidRouteUUIDError(Exception): pass class RouteLinkNotFound(Exception): pass class InvalidURLError(Exception): pass class InvalidRouteTokenError(Exception): pass
fout = open('Street_Centrelines.csv','r') #It will open and perform read operation in file StreetCenterlines.csv # update file def tuple_func(): for i in fout: i = i.split(",") string = (i[2],i[4],i[6],i[7]) # A tuple of (STR_NAME,FULL_NAME,FROM_STR,TO_STR) print(tuple(string)) tuple_func...
verbose = False class Controller(): name = 'WS2801' color = [0, 255, 0] def change_color(self, color): print(self.name + ' - Change color to: ' + str(color)) def change_brightness(self, brightness): print(self.name + ' - Set brightmess to : ' + str(brightness)) def set_pixels(sel...
""" Python has built-in string validation methods for basic data. It can check if a string is composed of alphabetical characters, alphanumeric characters, digits, etc. str.isalnum() This method checks if all the characters of a string are alphanumeric (a-z, A-Z and 0-9). >>> print 'ab123'.isalnum() True >>> print 'a...
# # PySNMP MIB module Fore-TCM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Fore-TCM-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:17:35 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,...
# FINDING ARE OF TRIANGLE N = list(map(int, input().split(' ')[:2])) print(0.5*N[0]*N[1])
def missing_ranges(nums): LOW, HIGH = 0, 100 nums.append(HIGH) ranges = [] low = LOW for num in nums: if num == low + 1: ranges.append(str(num - 1)) elif num > low + 1: ranges.append("{}->{}".format(low, num - 1)) low = num + 1 return ranges if __...
while True: num = int(input()) if num == 0: break a = 0 b = 0 turn_a = True i = 0 while num != 0: bit = num & 1 num = num >> 1 if bit == 1: if turn_a: a ^= (1 << i) else: b ^= (1 << i) turn_a = not turn_a i += 1 print ("{} {}".format(a, ...
N, T = map(int, input().split()) c = [0 for i in range(N)] t = [0 for i in range(N)] for i in range(N): c[i], t[i] = map(int, input().split()) ans = float('inf') flag = False for i in range(N): if t[i] <= T: flag = True if ans > c[i]: ans = c[i] if flag: print(ans) else: print('TLE')
class ArrayError(Exception): pass class IndexOutOfBoundsError(ArrayError): pass class ValueNotFoundError(Exception): pass
lines = [] while True: s = input() if s: lines.append(s.upper()) else: break; # Bài Python 12, Code by Quantrimang.com for sentence in lines: print (sentence)
""" This files originate from the "New-Empty-Python-Project-Base" template: https://github.com/guillaume-chevalier/New-Empty-Python-Project-Base Created by Guillaume Chevalier: https://github.com/guillaume-chevalier License: CC0-1.0 (Public Domain) """
n=int(input()) p=[] k=0 l=list(map(int,input().split())) l=sorted(l) for i in range(len(l)): c=l.count(l[i]) if(c>1): if(l[i] not in p): p.append(l[i]) i=i+c-1 k=k+1 if(k==0): print("unique") else: for i in p: print(i,end=" ") ...
#!/usr/bin/env python3 PIECE_SIZE = 4096 LOCALHOST = '127.0.0.1' SERVER_PORT = 5000 CIPHER_MATRIX = [ [-3, -3, -4], [0, 1, 1], [4, 3, 4] ] INVERSE_CIPHER = [ [1, 0, 1], [4, 4, 3], [-4, -3, -3] ] CIPHER_ROW_LENGTH = 3 CIPHER_COL_LENGTH = 3 POLY_LENGTH = 4 CRC_POLYNOMIAL = '1011' # x^3 + x + ...
#!/usr/bin/env python3 # https://codeforces.com/problemset/problem/1159/A n = int(input()) ol = list(input()) ol.reverse() c = 0 pc = 0 for o in ol: if o=='+': if pc==0: c += 1 else: pc -= 1 if o=='-': pc += 1 print(c)
n1 = int (input('Primeiro numero: ')) n2 = int (input('Segundo numero: ')) soma = n1+n2 # print('A soma entre ', n1, 'e ', n2, 'é ', soma) print('A soma entre {} e {} é {}'.format(n1, n2, soma))
_base_ = [ './pipelines/semisl_pipeline.py' ] __train_pipeline = {{_base_.train_pipeline}} __train_pipeline_strong = {{_base_.train_pipeline_strong}} __test_pipeline = {{_base_.test_pipeline}} data = dict( samples_per_gpu=64, workers_per_gpu=4, num_classes=10, train=dict( type='ClsTVDatase...
i = 0 #defines the integer while (i<119): #i is less than 119 print(i) #prints current value of 1 i += 10 #adds 10 to i
# # PySNMP MIB module CISCO-DMN-DSG-VIDEO-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-DMN-DSG-VIDEO-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:55:19 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 ...
class DistanceMeasureBase(object): @staticmethod def distances(fixed_x, fixed_y, x_vec, y_vec): ''' :param fixed_x: float :param fixed_y: float :param x_vec: np.array[float] :param y_vec: np.array[float] :return: np.array[float] ''' raise NotImple...
''' You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/vertically (not diagonally). The grid is completely surrounded by water, and there is exactly one island (i.e., one or more connected land cells). The island doesn't ...
""" https://leetcode.com/problems/decode-ways/ A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given a non-empty string containing only digits, determine the total number of ways to decode it. Example 1: Input: "12" Output: 2 Explanation:...
# -*- coding: utf-8 -*- class SpellingDict(dict): """Simple dict from regex -> normalized form. Reads from file in resource folder. """ def __init__(self, path): f = open(path, 'r') for line in f: split = line.split('\t') self[split[0]] = split[1].strip("\n") ...
# -*- coding: utf-8 -*- """ Created on Sat May 29 18:48:59 2021 @author: Manuel This code implements the Fully Convolutional DenseNetproposed by Jegou et al. (2017) in the following publication https://arxiv.org/abs/1611.09326 using tf.Keras. The original implementation using Theano and Lasagne was made public on http...
## Calcular la complejidad del código de la función ## Autor: Luque Ccosi, Paul Alexander def ejercicio4(n): i = 0 # contador while(i < n): # o(n) j = 0 # contador while(j < n): # o(n) j = j+1 # incremento j i = i+1 ...
# -*- coding:utf-8 -*- # Author:hankcs # Date: 2018-05-25 17:25 # 《自然语言处理入门》2.4 字典树 # 配套书籍:http://nlp.hankcs.com/book.php # 讨论答疑:https://bbs.hankcs.com/ class Node(object): def __init__(self, value) -> None: self._children = {} self._value = value def _add_child(self, char, value, overwrite=Fa...
valid_codes = ( "01", "0101", "010110", "010111", "010119", "010120", "010121", "010129", "010130", "010190", "0102", "010210", "010221", "010229", "010231", "010239", "010290", "0103", "010310", "010391", "010392", "0104", "010...
# https://leetcode.com/problems/plus-one/ def plusOne(digits: list[int]) -> list[int]: carry = 1 for i in reversed(range(len(digits))): if carry == 0: break n = digits[i] + carry carry = n//10 n = n%10 digits[i] = ...
""" common module parameters """ class FilePrefix(): """ file prefixes for different types of information """ RUN = 'run' INFO = 'info' GEOM = 'geom' GRAD = 'grad' HESS = 'hess' CONF = 'conf' # these may need to change downt the road LJ = 'lj' BATH = 'bath' class Directo...
""" https://leetcode.com/problems/defanging-an-ip-address/ Given a valid (IPv4) IP address, return a defanged version of that IP address. A defanged IP address replaces every period "." with "[.]". Example 1: Input: address = "1.1.1.1" Output: "1[.]1[.]1[.]1" Example 2: Input: address = "255.100.50.0" Output: "25...
# The account info request request = {'form': {'usename': 'Esaú', 'password': 'password'}} # The database db = [] def new_acc(request): """ New Account Help ':=' is the walrus operator (to define a variable in one line (on conditions, loops, etc...) and to simplify code) 'password' is the value that will be ...
def evaluate(separatice,test): errors = 0 for key in test.keys(): if separatice.into_clauses(key) != test[key]: print(key) errors += 1 print('accuracy:',1 - errors/len(test)) test = {'какие места есть в корпусах, где можно купить еды?' : ['какие места есть в корпусах', 'где можно купи...
# Copyright 2018 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
'''3. Write a Python program to find the first repeated character in a given string.''' def first_repeated_char(str1): for index,c in enumerate(str1): if str1[:index+1].count(c) > 1: return c return "None" print(first_repeated_char("abcdabcd")) print(first_repeated_char("abcd")) #Reference: w3resource
""" LCM of More Than Three Numbers Create a function that takes an array of more than three numbers as an argument and returns the Least Common Multiple (LCM). Examples lcm_of_list([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) ➞ 2520 lcm_of_list([13, 6, 17, 18, 19, 20, 37]) ➞ 27965340 lcm_of_list([44, 64, 12, 17, 65]) ➞ 2333760 ...
# model settings model = dict( type='BYOL', base_momentum=0.99, backbone=dict( type='ResNet', depth=18, num_stages=4, out_indices=(3,), # no conv-1, x-1: stage-x norm_cfg=dict(type='SyncBN'), style='pytorch'), neck=dict( type='NonLinearNeck', ...
# This variable stores the next DeliveryExecutiveID integer next_deliveryexecutive_id = None # This variable indicates whether the next_deliveryexecutive_id has been initialized next_deliveryexecutive_id_read = 0 # @brief This class is used to handle the Delivery Executive data in ODS # @note There is not need to cre...
"""587. Two Sum - Unique pairs """ class Solution: """ @param nums: an array of integer @param target: An integer @return: An integer """ def twoSum6(self, nums, target): # write your code here ## Practice: nums.sort() dict = set() l = 0 r = len(n...
""" import collections from timeit import timeit Pessoa = collections.namedtuple('Pessoa', 'nome email') # criar uma class Pessoa, com atributos nome e email felicity = Pessoa('Felicity Jones', 'felicity@gmail.com') print(timeit('felicity.email', globals=globals())) """
try: num1= int(input(" Enter the first number: ")) num2= int(input(" Enter the second number: ")) total = num1 / num2 print("The division is ", total) except (ArithmeticError,ValueError) as msg1: print(f"The type of exception is {type(msg1)}") print(f"The exception class name is {msg1.__class__....
class FrameData(): def __init__(self): self.rows = [] self.average_row = None self.is_fork = False self.is_join = False self.veer_left = False self.veer_right = False self.is_straight = True self.frame_speed = 0 self.speedL = 0 self.s...
# # PySNMP MIB module ALCATEL-IND1-APP-FINGERPRINT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ALCATEL-IND1-APP-FINGERPRINT-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:16:56 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Pyt...
global errors errors = { }
# -*- coding: utf-8 -*- JS_VAR_NAME = 'Urls' JS_MINIFY = False JS_EXCLUDE_NAMESPACES = [] JS_SCRIPT_PREFIX = None JS_GLOBAL_OBJECT_NAME = 'this' JS_REVERSE_USE_BACKBONE = False
class IsPangram: def pangram(self, word): abc = list("abcdefghijklmnopqrstuvwxyz") w = list(word.lower()) temp = list() for x in w: if x in abc: temp += x temp = list(set(temp)) temp.sort() if temp == abc: return 'To...
n=int(input()) numbers=[]; filtered=[] for k in range(1,n+1): num=int(input()) numbers.append(num) command=input() if command=="even": for k in range(0,len(numbers)): if abs(numbers[k])%2==0 or numbers[k]==0: filtered.append(numbers[k]) elif command=="odd": for k in range(...
class RTMValidatorError(Exception): pass class RTMValidatorFileError(RTMValidatorError): """ Raise this for any errors related to the excel file itself. Examples: wrong file extension file missing missing worksheet """ pass
class BoundingBoxNormalizationHelper: def __init__(self, interval, range_): assert interval in ('[)', '[]') self.right_open = (interval == '[)') assert range_[1] > range_[0] self.scale = range_[1] - range_[0] self.offset = range_[0] def normalize(self, bbox, image_size):...
cmapdefs = { 'bold': 'bold.json', 'boldSans': 'bold-sans.json', 'boldItalic': 'bold-italic.json', # Note: The h character is missing 'boldItalicSans': 'bold-italic-sans.json', 'italic': 'italic.json', 'italicSans': 'italic-sans.json', 'subscript': 'subscripts.json', 'superscript': 'super...
# Copyright 2016 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 ...
class BaseError(Exception): def __init__(self, message, *args, **kwargs): self.message = message self.details = kwargs def __str__(self): return repr(self.message) class InstructionError(BaseError): def __init__(self, *args, **kwargs): super(InstructionError, self).__init_...
# while02.py # 무한반복 (while) i = 0 while True: print(i) i = i + 1 ''' # 무한반복 (for) import sys for j in range(sys.maxsize) : print(j) '''
'''6. Write a Python program to compute the summation of the absolute difference of all distinct pairs in an given array (non-decreasing order). Sample array: [1, 2, 3] Then all the distinct pairs will be: 1 2 1 3 2 3'''
n=int(input()) matrix=[] for k in range(0,n): row=input() row=row.split(" ") matrix.append([int(e) for e in row]) while True: command=input() if command!="END": if "Add" in command: command=command.split(" ") row=int(command[1]); col=int(command[2]); val=int(comman...
""" Set of exceptions related to domain errors """ class DomainError(Exception): """ Generic exception thrown by the domain on business logic errors """ pass
class APIError(Exception): pass class BadRequest(APIError): pass class QuotaError(APIError): pass class NotFoundError(APIError): pass class MethodNotAllowed(APIError): pass class ForbiddenError(APIError): pass class TooManyRequestsError(APIError): pass class InternalServerError...
class Event: def __init__(self, target, name, data): self.target = target self.name = name self.data = data
class DefaultableEntityEndpointsMixin(object): """ Defaultable entity endpoints. """ def set_default(self, id_): """ Sets a entity with given ID as default. Args: id_ (str): entity ID. Returns: dict: new entity. """ self.request...
img_rows, img_cols, img_chns = 128, 128, 3 latent_dim = 64 intermediate_dim = 256 epsilon_std = 1.0 epochs = 300 filters = 64 num_conv = 3 batch_size = 256
LOG_URL = 'http://www.almhuette-raith.at/apache-log/access.log' LOG_FILE_PATH = 'media' CHUNK_SIZE = 10240 # TODO details regex group LOG_COMPILE = r'(?P<ip_address>[\d\.]+)\s+(?P<other_1>\S+)\s+(?P<other_2>\S+)\s+' \ r'\[(?P<datetime>\S+)\s+.*\]\s+"(?P<method>\S+)\s+(?P<uri>\S+) HTTP.*"\s+' \ ...
#!/usr/bin/python3 def printinfo( arg1, *vartuple ): print("output: ") print(arg1) for var in vartuple: print(var) return # call printinfo method printinfo(10) printinfo(70, 60, 50)
""" Ex 03 - Create a program that reads two numbers and shows the sum between them """ # ---------- Header ---------- print('Sum two integers') print('-' * 30) # ---------- Input zone ---------- n1 = int(input('enter the first number: ')) n2 = int(input('Enter the second number: ')) # ---------- Output zone ---------...
class Solution(object): def maximalRectangle(self, matrix): """ :type matrix: List[List[str]] :rtype: int """ t=[0 for i in range(len(matrix[0])+2)] mxt=0 for i in range(len(matrix)): for j in range(len(matrix[i])): if mat...
def numbers_searching(*args): duplicates = set() missing_number = 0 nums = [int(x) for x in args] for num in range(min(nums), max(nums) + 1): if num not in nums: missing_number = num if nums.count(num) > 1: duplicates.add(num) return [missing_number, list(sort...
# -*- coding: utf-8 -*- """ VariableData module This module represents the DTO that holds the params the user passes in. We use this DTO to build the variable request """ # pylint: disable=too-few-public-methods class VariableData: """ Used for organizing the params the user passed in to execute the variable...
# Copyright (c) 2020 Continental Automotive GmbH """Functions and handles to analyse and enforce embeddings of visual semantic concepts in DNN latent spaces."""
def part1(ins): h = 0 v = 0 for a, b in ins: match a: case "forward": h += b case "down": v += b case "up": v -= b return h * v def part2(ins): h = 0 v = 0 aim = 0 for a, b in ins: match...
#!/usr/bin/env python """ simple_tsp/helpers.py """ def route2cost(route, dist): assert route[0] == 0 assert route[-1] == 0 return dist[(route[:-1], route[1:])].sum()
def decorate_lowercase(function): def lowerfy(): funcaa = function() string_lower = funcaa.lower() return string_lower return lowerfy def splitfy(function): def splitt(): s_value = function() str_list = s_value.split() return str_list return splitt @splitfy @decorate_lowercase def hello(): return "...
# WebDriver specification ID: dfn-error-response-data errors = { "element click intercepted": 400, "element not selectable": 400, "element not interactable": 400, "insecure certificate": 400, "invalid argument": 400, "invalid cookie domain": 400, "invalid coordinates": 400, "invalid elem...
""" Q062 Unique Paths Medium A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked 'Finish' in the diagram below). How many possible u...
# ITERACTION BY ITEM numbers = [0,1,2,3,4,5] for number in numbers: # For Loops, number is the index and numbers is the lenght of the loops print(number) # EXAMPLE for number in numbers: if number > 1 and number < 4: print(number)
class Solution: # Time complexity: O(n) where n the length of pushed is # Space complexity: O(n) def validateStackSequences(self, pushed, popped): j = 0 stack = [] for x in pushed: stack.append(x) while stack and j < len(popped) and stack[-1] == popped[j]: ...
def main() -> None: a, b = map(int, input().split()) print("Yes" if a <= b <= 6 * a else "No") main()
def PageUse(): msg.showinfo("사용방법", "띄워진 창 안에서\n노트를 작성하세요 ✍️") def PageLicens(): msg.showinfo("라이센스", "MIT License\n\nⓒ 2021 차한음 😎") def PageVersion(): msg.showinfo("버전", "현재 버전 v2.1.1 ✋") def MenuHelp(root): menu = Menu(root) help = Menu(menu, tearoff=0) help.add_command(label="사용방법", command=...
def load(h): return ({'abbr': 'ERS-1', 'code': 1, 'title': 'ERS 1'}, {'abbr': 'ERS-2', 'code': 2, 'title': 'ERS 2'}, {'abbr': 'METOP-B', 'code': 3, 'title': 'METOP-B'}, {'abbr': 'METOP-A', 'code': 4, 'title': 'METOP-A'}, {'abbr': 'CHAMP', 'code': 41, 'title': 'CHAMP'}...
# -*- coding: utf-8 -*- #import djcelery #djcelery.setup_loader() #加载djcelery # celery配置 #CELERY_BROKER_URL = 'redis://:lihuipeng@192.168.x.x:6379/3' #BROKER_URL = 'django://' #: Only add pickle to this list if your broker is secured #: from unwanted access (see userguide/security.html) CELERY_ACCEPT_CONTENT = ['js...
# All of these resources have been gathered from: # https://github.com/privacycloud/consent-manager-web-ext/ # Published under the MIT license def getrules(): rules = { 'google.com': '#epbar, #cnsh, #pushdown, #consent-bump, #taw ._pei, #cnsi ~ [jsaction*="dismiss"], g-dialog, g-bottom-sheet, .gb_bd...
messages = { '2021-03-18':"<b>@all</b>, Comment reviewers for next week are- Rahul and Rohan J." , '2021-03-26':"<b>@all</b>, Comment reviewers for next week are- Akkul and Rohan D.", '2021-04-01':"<b>@all</b>, Comment reviewers for next week are- Annapoorani and Shivahari.", '2021-0...
m1, d1 = map(int, input().split()) m2, d2 = map(int, input().split()) if m1 != m2: print(1) else: print(0)
""" Warmup-1 > diff21 Find this problem at: https://codingbat.com/prob/p197466 """ def diff21(n): if n > 21: return abs(2*(n-21)) return 21 - n
# automatically generated by the FlatBuffers compiler, do not modify # namespace: MNN class BinaryOpOperation(object): ADD = 0 SUB = 1 MUL = 2 DIV = 3 MAX_TEMP = 4 MIN_TEMP = 5 POW = 6 REALDIV = 7 MINIMUM = 8 MAXIMUM = 9 GREATER = 10 GREATER_EQUAL = 11 LESS = 12 ...
class Pessoa: def __init__(self,nome,idade,cpf,salario): self.nome = nome self.idade = idade self.cpf = cpf self.salario = salario def Aumento(self): return self.salario *0.05 class Gerente(Pessoa): def __init__(self,nome,idade,cpf,salario,senha): ...
"""Top-level package for Tinned Python.""" __author__ = """Tom Finill""" __email__ = 'tomfinill@gmail.com' __version__ = '0.1.0'