content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
class ListNode(object): def __init__(self, x): self.val = x self.next = None def __repr__(self): node = self output = "" while node != None: output += str(node.val) output += " " node = node.next return output
class Listnode(object): def __init__(self, x): self.val = x self.next = None def __repr__(self): node = self output = '' while node != None: output += str(node.val) output += ' ' node = node.next return output
#Unicode characters and strings #1960s/1970s ---> we assumed one byte is one character and went it with # a byte and character were assumed to be the same thing #ASCII goes up to 127 print(ord('H')) print(ord('e')) print(ord('\n')) print(ord('G')) #UTF-16 - fixed length, two byes #UTF-32 - fixed length, four...
print(ord('H')) print(ord('e')) print(ord('\n')) print(ord('G'))
description = 'MIRA2 monochromator' group = 'lowlevel' includes = ['base', 'mslit2', 'sample', 'alias_mono'] tango_base = 'tango://miractrl.mira.frm2:10000/mira/' devices = dict( co_m2tt = device('nicos.devices.entangle.Sensor', visibility = (), tangodevice = tango_base + 'mono2/m2tt_enc', ...
description = 'MIRA2 monochromator' group = 'lowlevel' includes = ['base', 'mslit2', 'sample', 'alias_mono'] tango_base = 'tango://miractrl.mira.frm2:10000/mira/' devices = dict(co_m2tt=device('nicos.devices.entangle.Sensor', visibility=(), tangodevice=tango_base + 'mono2/m2tt_enc', unit='deg'), mo_m2tt=device('nicos.d...
# Divided OF two number while True: a = int(input("Enter The Dividend Number : ")) b = int(input("Enter The Divisor Number : ")) if a > b: quotient = int(a / b) print("Quotirnt Number Of :", quotient) else: Quotient = int(b / a) print("Quotirnt Number Of : 0.",...
while True: a = int(input('Enter The Dividend Number : ')) b = int(input('Enter The Divisor Number : ')) if a > b: quotient = int(a / b) print('Quotirnt Number Of :', quotient) else: quotient = int(b / a) print('Quotirnt Number Of : 0.', Quotient)
IMPAR = [] PAR = [] for i in range(15): X = int(input()) if X % 2 == 0: PAR.append(X) elif X % 2 != 0: IMPAR.append(X) if len(PAR) == 5: Y = 0 for j in PAR: print('par[{}] = {}'.format(Y,j)) Y += 1 PAR = [] if len(IMPAR) == 5: Y...
impar = [] par = [] for i in range(15): x = int(input()) if X % 2 == 0: PAR.append(X) elif X % 2 != 0: IMPAR.append(X) if len(PAR) == 5: y = 0 for j in PAR: print('par[{}] = {}'.format(Y, j)) y += 1 par = [] if len(IMPAR) == 5: ...
class UserRepositoryDependencyMarker: # pragma: no cover pass class ProductRepositoryDependencyMarker: # pragma: no cover pass
class Userrepositorydependencymarker: pass class Productrepositorydependencymarker: pass
#!/usr/bin/env python3 # -*- coding: utf-8 -*- class Option: def __init__(self, name, number, y): self.name=name self.number=number self.y=y
class Option: def __init__(self, name, number, y): self.name = name self.number = number self.y = y
''' N = int(input()) notas100 = N//100 notas50 = (N-(notas100*100))//50 notas20 = (N-(notas100*100+notas50*50))//20 notas10 = (N-(notas100*100+notas50*50+notas20*20))//10 notas5 = (N-(notas100*100+notas50*50+notas20*20+notas10*10))//5 notas2 = (N-(notas100*100+notas50*50+notas20*20+notas10*10+notas5*5))//2 notas1 = (N-...
""" N = int(input()) notas100 = N//100 notas50 = (N-(notas100*100))//50 notas20 = (N-(notas100*100+notas50*50))//20 notas10 = (N-(notas100*100+notas50*50+notas20*20))//10 notas5 = (N-(notas100*100+notas50*50+notas20*20+notas10*10))//5 notas2 = (N-(notas100*100+notas50*50+notas20*20+notas10*10+notas5*5))//2 notas1 = (N-...
# https://binarysearch.com/problems/Longest-Anagram-Subsequence class Solution: def solve(self, a, b): letters = set(list(a)).intersection(set(list(b))) length = 0 for i in letters: length += min(a.count(i),b.count(i)) return length
class Solution: def solve(self, a, b): letters = set(list(a)).intersection(set(list(b))) length = 0 for i in letters: length += min(a.count(i), b.count(i)) return length
t = int(input()) while t > 0: t -= 1 n,m,s = map(int, input().strip().split(' ')) k = (s+m-1)%n if(k==0): print (n) else: print (k)
t = int(input()) while t > 0: t -= 1 (n, m, s) = map(int, input().strip().split(' ')) k = (s + m - 1) % n if k == 0: print(n) else: print(k)
''' Description : Input In Function By .format Method Function Date : 14 Feb 2021 Function Author : Prasad Dangare Input : Int Output : Int ''' # defination of function, use of .format method def Addition(no1, no2): ans = no1 + no2 return ans def main(): ...
""" Description : Input In Function By .format Method Function Date : 14 Feb 2021 Function Author : Prasad Dangare Input : Int Output : Int """ def addition(no1, no2): ans = no1 + no2 return ans def main(): print('enter first number') value1 = int(input()) print(...
#cameraCoords syntax: [x1 (oben links),y1,x2 (unten rechts),y2,zoomLevel] def moveCamera(cameraCoords, move,worldSize): if cameraCoords[0]+move[0] <= 1 and move[0] < 0: cameraCoords[0] -= cameraCoords[0]%1 cameraCoords[2] -= cameraCoords[2]%1 while cameraCoords[0] > 1: ca...
def move_camera(cameraCoords, move, worldSize): if cameraCoords[0] + move[0] <= 1 and move[0] < 0: cameraCoords[0] -= cameraCoords[0] % 1 cameraCoords[2] -= cameraCoords[2] % 1 while cameraCoords[0] > 1: cameraCoords[0] -= 1 cameraCoords[2] -= 1 elif cameraCoords[...
a = input ("Digite algo") print(a.isalpha()) print(a.isalnum()) print(a.isascii()) print(a.isdecimal()) print(a.isdigit()) print(a.isidentifier()) print(a.islower())
a = input('Digite algo') print(a.isalpha()) print(a.isalnum()) print(a.isascii()) print(a.isdecimal()) print(a.isdigit()) print(a.isidentifier()) print(a.islower())
class Node: def __init__(self, val=0): self.value = val self.next = None class LinkList: c = 10 def __init__(self, *args): self.val = (*args,) self.head = self.__constructLinklist() #self.printLinklist(self.head) # self.pre = self.revserlinklist() #...
class Node: def __init__(self, val=0): self.value = val self.next = None class Linklist: c = 10 def __init__(self, *args): self.val = (*args,) self.head = self.__constructLinklist() def print_linklist(self, head): while head is not None: print(head...
''' __program__: Taking user input from the user __author__: Abhinav Anil __submittedTo__: dataSciTech __email__: dataascii@gmail.com __instagram__: @data.sci_ ''' #Taking the user name, PAN card number to validate the information for the user details. while(1): name = input("\n Enter your name : ") if name....
""" __program__: Taking user input from the user __author__: Abhinav Anil __submittedTo__: dataSciTech __email__: dataascii@gmail.com __instagram__: @data.sci_ """ while 1: name = input('\n Enter your name : ') if name.isalpha() == False: print('Invalid Name, Sorry you cannot proceed.') break ...
peoples = { 'first_name': 'le', 'last_name': 'xiaoyuan', 'age': 21, 'city': 'dawu' } print(peoples['first_name']) print(peoples['last_name']) print(peoples['age']) print(peoples['city']) for people in peoples.values(): print(people) lucky_number = { 'lexiaoyuan': 6, 'benjamin': 66, 'l...
peoples = {'first_name': 'le', 'last_name': 'xiaoyuan', 'age': 21, 'city': 'dawu'} print(peoples['first_name']) print(peoples['last_name']) print(peoples['age']) print(peoples['city']) for people in peoples.values(): print(people) lucky_number = {'lexiaoyuan': 6, 'benjamin': 66, 'lexiaoyuanbeta': 666, 'yege': 6666,...
# Problem! you teach children about how to calculate the area and perimeter of the square # and you will solve 20 questions about the way to find area and perimeter. to teach them. # but that will consume the time, so you want to write a program to reduce the time # when calculating all 20 quests. # Now try to solve it...
def calc(x): side_length = x print(f'area = {sideLength ** 2}') print(f'perimeter = {sideLength * 4}') calc(int(input())) calcs = lambda x: (x ** 2, x * 4) (c1, c2) = calcs(int(input())) print(f'area = {c1}\nperimeter = {c2}') def calc2(x): return (x ** 2, x * 4) (a, b) = calcs(int(input())) print(str(...
# *** these filters do NOT see ping messages, nor do routers see them *** # *** global imports are NOT accessible, do imports in __init__ and bind them to an attribute *** class Filters(Base): def __init__(self, logger): # init parent class super().__init__(logger) # some...
class Filters(Base): def __init__(self, logger): super().__init__(logger) self.random = __import__('random') self.base64 = __import__('base64') self._thread = __import__('_thread') self.time = __import__('time') self.started = 0 self.data_received = {} ...
number = input("Enter a series of number, using separator you like: ") separator = "" for char in number: if not char.isnumeric(): separator = separator + char print(separator) str = 0; sum = 0 for char in number: if char not in separator: str = str * 10 + int(char) if char == number[...
number = input('Enter a series of number, using separator you like: ') separator = '' for char in number: if not char.isnumeric(): separator = separator + char print(separator) str = 0 sum = 0 for char in number: if char not in separator: str = str * 10 + int(char) if char == number[len(...
{ "includes": [ "../common.gypi" ], "targets": [ { "target_name": "libgdal_ogr_pgdump_frmt", "type": "static_library", "sources": [ "../gdal/ogr/ogrsf_frmts/pgdump/ogrpgdumplayer.cpp", "../gdal/ogr/ogrsf_frmts/pgdump/ogrpgdumpdatasource.cpp", "../gdal/ogr/ogrsf_frmts/pgdump/ogrpgdumpdriver.c...
{'includes': ['../common.gypi'], 'targets': [{'target_name': 'libgdal_ogr_pgdump_frmt', 'type': 'static_library', 'sources': ['../gdal/ogr/ogrsf_frmts/pgdump/ogrpgdumplayer.cpp', '../gdal/ogr/ogrsf_frmts/pgdump/ogrpgdumpdatasource.cpp', '../gdal/ogr/ogrsf_frmts/pgdump/ogrpgdumpdriver.cpp'], 'include_dirs': ['../gdal/og...
class Human(object): def __init__(self, mark, io): self.mark = mark self.io = io def sanitize_user_input(self, user_input): try: sanitized_input = int(user_input) except TypeError: sanitized_input = 0 except ValueError: sanitized_inpu...
class Human(object): def __init__(self, mark, io): self.mark = mark self.io = io def sanitize_user_input(self, user_input): try: sanitized_input = int(user_input) except TypeError: sanitized_input = 0 except ValueError: sanitized_inpu...
def razbi_stevilo(n, st): s = [] st = str(st) while len(st) > n: stevilo = st[:n] s.append(stevilo) st = st[1:] return s #seznam 13 mestnih steil podanih v nizu def razbi_stevke(n): sez_stevk = [] for stevka in n: sez_stevk.append(int(stevka)) sez_stevk.sort...
def razbi_stevilo(n, st): s = [] st = str(st) while len(st) > n: stevilo = st[:n] s.append(stevilo) st = st[1:] return s def razbi_stevke(n): sez_stevk = [] for stevka in n: sez_stevk.append(int(stevka)) sez_stevk.sort() return sez_stevk def max_zmnozek(...
class Solution: def longestMountain(self, A: List[int]) -> int: ''' T: O(n) and S: O(1) ''' if len(A) < 3: return 0 maxLen = 0 for i in range(1, len(A)-1): left, right = i - 1, i + 1 if (A[left] < A[i]) and (A[i] > A[right]): ...
class Solution: def longest_mountain(self, A: List[int]) -> int: """ T: O(n) and S: O(1) """ if len(A) < 3: return 0 max_len = 0 for i in range(1, len(A) - 1): (left, right) = (i - 1, i + 1) if A[left] < A[i] and A[i] > A[right]: ...
# Loan repayment calculation service # This is the program calculating the loan repayment amount for clients. # # Input parameters: # principal(p) : Only integers equal or greater than one million are allowed # years(y) : Only integers equal or greater than one are allowed # annual interest rate(r) : Only floating poin...
print('Welcome to loan repayment calculation service') p = int(input('How much is the principal? (We only count over one million won.) ')) y = int(input('How many years is the repayment period? ')) r = float(input('What percent is the interest rate? ')) d = (1 + r / 100) ** y * p * (r / 100) // ((1 + r / 100) ** y - 1)...
a = int(input("Enter the first no : ")) b = int(input("Enter the second no : ")) c = a+b print("sum of",a,'+',b,'=',c) print("The first no is: %d and second number is: %d and the sum is: %d"%(a,b,c)) print("%d + %d = %d"%(a,b,c)) print("%-10d + %-10d = %-10d"%(a,b,c)) print("%-10f + %-10f = %-10f"%(a,b,c)) prin...
a = int(input('Enter the first no : ')) b = int(input('Enter the second no : ')) c = a + b print('sum of', a, '+', b, '=', c) print('The first no is: %d and second number is: %d and the sum is: %d' % (a, b, c)) print('%d + %d = %d' % (a, b, c)) print('%-10d + %-10d = %-10d' % (a, b, c)) print('%-10f + %-10f = %-10f' % ...
class Node(object): def __init__(self, data, next=None): self.data = data self.next = next def kth_to_last(k, linked_list): pointer1, pointer2 = linked_list, linked_list for _ in range(k): if not pointer1: return None pointer1 = pointer1.next while pointer1:...
class Node(object): def __init__(self, data, next=None): self.data = data self.next = next def kth_to_last(k, linked_list): (pointer1, pointer2) = (linked_list, linked_list) for _ in range(k): if not pointer1: return None pointer1 = pointer1.next while point...
print("-- Strings -- ") print() mystring = "hello" myfloat = 10.0 myint = 20 if mystring == "hello": print("String: %s" % mystring) if isinstance(myfloat, float) and myfloat == 10.0: print("Float: %f" % myfloat) if isinstance(myint, int) and myint == 20: print("Integer: %d" % myint) print() nome = 'Teste...
print('-- Strings -- ') print() mystring = 'hello' myfloat = 10.0 myint = 20 if mystring == 'hello': print('String: %s' % mystring) if isinstance(myfloat, float) and myfloat == 10.0: print('Float: %f' % myfloat) if isinstance(myint, int) and myint == 20: print('Integer: %d' % myint) print() nome = 'Teste' i...
def General(project): feature_vectors = get_featrures(projects) h_clusters = BIRCH(projects,feature_vectors) for level in h_clusters.levels: if level.depth == h_clusters.max_depth: for cluster in level.clusters: level.cluster.bell = bellwether(cluster.projects) el...
def general(project): feature_vectors = get_featrures(projects) h_clusters = birch(projects, feature_vectors) for level in h_clusters.levels: if level.depth == h_clusters.max_depth: for cluster in level.clusters: level.cluster.bell = bellwether(cluster.projects) e...
# import contact: click on chart to draw a contact that gets pinged by sonar colors = {'GRN':color(51, 255, 0), 'RED':color(193, 49, 36), 'BLK':color(10)} def setup(): size(480, 480) background(colors['BLK']) fill(colors['RED']) ellipse(240, 240, 430, 430) fill(10) ellipse(240, 240, 420, 420) ...
colors = {'GRN': color(51, 255, 0), 'RED': color(193, 49, 36), 'BLK': color(10)} def setup(): size(480, 480) background(colors['BLK']) fill(colors['RED']) ellipse(240, 240, 430, 430) fill(10) ellipse(240, 240, 420, 420) def draw(): stroke(colors['GRN']) if mousePressed: fill(co...
def debug_policy_plot(): qq_right = [] x_vec = np.arange(vagent.max_q[0]) for xx in x_vec: vagent.q[0] = xx vsensor.update(vscene,vagent) vobservation = local_observer(vsensor,vagent) #todo: generalize qq_right.append(RL.compute_q_eval(vobservation.reshape([1...
def debug_policy_plot(): qq_right = [] x_vec = np.arange(vagent.max_q[0]) for xx in x_vec: vagent.q[0] = xx vsensor.update(vscene, vagent) vobservation = local_observer(vsensor, vagent) qq_right.append(RL.compute_q_eval(vobservation.reshape([1, -1]))) qq_right = np.reshap...
class Solution: def stringShift(self, s: str, shift: List[List[int]]) -> str: sum = 0 for i in shift: if i[0] == 0: sum += i[1] else: sum -= i[1] sum = sum % len(s) return s[sum:]+s[:sum]
class Solution: def string_shift(self, s: str, shift: List[List[int]]) -> str: sum = 0 for i in shift: if i[0] == 0: sum += i[1] else: sum -= i[1] sum = sum % len(s) return s[sum:] + s[:sum]
# Based on MicroPython config option, comparison of str and bytes # or vice versa may issue a runtime warning. On CPython, if run as # "python3 -b", only comparison of str to bytes issues a warning, # not the other way around (while exactly comparison of bytes to # str would be the most common error, as in sock.recv(3)...
if '123' == b'123' or b'123' == '123': print('FAIL') raise SystemExit print('PASS')
class Solution: def toGoatLatin(self, S: str) -> str: words = S.split() res = [] for i, w in enumerate(words): if w[0].lower() not in "aeiou": w = w[1:] + w[0] w += "ma" + ("a" * (i + 1)) res.append(w) return ' '.join(res) if __n...
class Solution: def to_goat_latin(self, S: str) -> str: words = S.split() res = [] for (i, w) in enumerate(words): if w[0].lower() not in 'aeiou': w = w[1:] + w[0] w += 'ma' + 'a' * (i + 1) res.append(w) return ' '.join(res) if __n...
# the interface # class, or the interface # data type # interface data types # are inspired from # the typescript language # example # f = Interface(types) # f.create(data) class InterfaceObject(): def __init__(self, object_info): # the passed in values # to create a new object ...
class Interfaceobject: def __init__(self, object_info): self.values = object_info def get_item(self, property_): if property_ in self.values: return self.values[property_] else: raise key_error(f'Cannot find {property_}') def set_item(self, property_, value...
def rotflip(): yield "rot1" yield "rot2" yield "rot3" yield "rot4" yield "flip" yield "rot1" yield "rot2" yield "rot3" yield "rot4" raise ValueError("aaaaa") i = 0 #for i,a in enumerate(rotflip()): a_gen = rotflip() while True: a = a_gen.__next__() print(a) i += 1 ...
def rotflip(): yield 'rot1' yield 'rot2' yield 'rot3' yield 'rot4' yield 'flip' yield 'rot1' yield 'rot2' yield 'rot3' yield 'rot4' raise value_error('aaaaa') i = 0 a_gen = rotflip() while True: a = a_gen.__next__() print(a) i += 1 if i == 6: break
marks = {} for _ in range(int(input())): line = input().split() marks[line[0]] = sum(map(float, line[1:])) / 3 print('%.2f' % marks[input()])
marks = {} for _ in range(int(input())): line = input().split() marks[line[0]] = sum(map(float, line[1:])) / 3 print('%.2f' % marks[input()])
# A script to recursively find the greatest common divisor of two numbers def greatest_divisor(first, second): assert first == int(first) and second == int(second) and first != 0 and second != 0, 'Numbers provided must be nonzero integers' if first < 0: first = -first if second < 0: secon...
def greatest_divisor(first, second): assert first == int(first) and second == int(second) and (first != 0) and (second != 0), 'Numbers provided must be nonzero integers' if first < 0: first = -first if second < 0: second = -second if first >= second: return gcd_ordered(first, sec...
def main(): card_number = input("Enter credit card number: ") print_card_value(card_number) def print_card_value(card_number): if check_for_sum(card_number) == False: print("INVALID") elif check_for_amex(card_number) == True: print("AMEX") elif check_for_master(card_number) == T...
def main(): card_number = input('Enter credit card number: ') print_card_value(card_number) def print_card_value(card_number): if check_for_sum(card_number) == False: print('INVALID') elif check_for_amex(card_number) == True: print('AMEX') elif check_for_master(card_number) == True:...
best_bpsp = float("inf") n_feats = 64 scale = 3 resblocks = 3 K = 10 plot = "" log_likelihood = True collect_probs = False
best_bpsp = float('inf') n_feats = 64 scale = 3 resblocks = 3 k = 10 plot = '' log_likelihood = True collect_probs = False
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 ...
def count_arrangement(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...
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)
s = 'I want that Farm House to be in my name, comprende? Also, I want Chocolates.' d = {} for item in S: if item in D: D[item] = D[item] + 1 else: D[item] = 1 print(D)
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 __...
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...
# 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
waitFor.id == max_used_id and (not cur_node_is_processed) 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)
print('Event') 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)
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 ...
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}
class Settings: PROJECT_TITLE: str = "Book store" PROJECT_VERSION: str = "0.1.1" settings = Settings()
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', ]
__all__ = ['api_exception', 'update_webhook_400_response_exception', 'retrieve_webhook_400_response_exception', 'create_webhook_400_response_exception']
# 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...
def add(x, y): return float(x) + float(y) def subtract(x, y): return float(x) - float(y) def multiply(x, y): return float(x) * float(y) def divide(x, y): try: return float(x) / float(y) except ValueError: return 0 except ZeroDivisionError: return 0 finally: ...
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...
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, mod) ...
# -*- 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))
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))
{"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":...
{'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': 0, 'factor': 1}, 'boo...
def restart(): prompt = input("Type [y] to play again or any other key to quit. ") if prompt.lower() == "y": return True else: return False
def restart(): prompt = input('Type [y] to play again or any other key to quit. ') if prompt.lower() == 'y': return True else: return False
#!/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)
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"
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...
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 + other) def __sub__...
# /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...
api_return = True db_name_f = 'data.db' situacao_intelx = False situacao_have_i_pwned = False situacao_scylla = True id_f3 = 'EMAIL' id_f4 = 'PASS'
#Write a Python program to print without newline or space. print("The Lord is good.", end="") print("All the time")
print('The Lord is good.', end='') print('All the time')
#!/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"...
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 ...
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 else: raise ValueError def simplify(self): nu...
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): ...
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...
""" 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:17:12, 1234512889 02/02/2...
__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"
__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 Solution: def fizz_buzz(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('Buzz') ...
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)
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 label_access(name, False) def low(name): return label_access(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, ...
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, 'Rho': 556, 'Sigma': 592, 'Tau': 611, '...
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
def df_no_hdr(df): 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 ...
class Node: def __init__(self, data): self.__data = data self.__next = None def get_data(self): return self.__data def set_data(self, data): self.__data = data def get_next(self): return self.__next def set_next(self, next_node): self.__next = nex...
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, ...
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, ac auctor nunc imperdiet. Sed n...
# 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()
n = int(input('Enter the number ')) for i in range(1, n + 1): for j in range(1, i + 1): print(j, end='') print()
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 ...
increase: int = 1 decrease: int = -1 space = ' ' sign = '* ' def print_rhombus(n: int): def print_line(i: int, direction: int): if i == 0: return line = (n - i) * space + i * sign print(line.rstrip()) if i == n: direction = DECREASE print_line(i + di...
# _________________________________________________________________________ # # 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 ...
class Excelspreadsheet_Base(object): def can_read(self): return False def can_write(self): return False def can_calculate(self): return False
#!/usr/bin/env python3 _ = input() _v, *v = sorted(map(int, input().split())) for i in v: _v = (_v + i) / 2 print(_v)
_ = 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...
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, single_value_constraint, constraints_intersection, value_size_constraint, value_range_constraint) ...
# Raised when VT-100 can't be enabled class VT100Error( Exception ): def __init__( self ): super().__init__( "Couldn't enable VT-100 terminal emulation" )
class Vt100Error(Exception): def __init__(self): super().__init__("Couldn't enable VT-100 terminal emulation")
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) ...
test1 = 6 test2 = 11 test3 = 25 test4 = 330 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) if reminder == 0: ...
# 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: ...
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: for i in range(1, 7): roll_set.append(i) helper(n - 1, roll_set, result_set) ...
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...
sample_year = 1983 sample_year_short = 83 sample_month = 1 sample_day = 2 sample_hour = 15 sample_utc_hour = 20 sample_hour_12_h = 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.replace('YYYY', str(SAM...
# 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...
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(points)): three_points = [points[i], points[j], points[k]] ...
# -*- 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...
bot_name = 'p1_pipeline' spider_modules = ['p1_pipeline.spiders'] newspider_module = 'p1_pipeline.spiders' robotstxt_obey = True item_pipelines = {'p1_pipeline.pipelines.DropNoTagsPipeline': 300}
# 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...
""" 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 the respective side fr...
{ "targets" : [ { "target_name" : "leveled", "sources" : ["src/leveled.cc", "src/batch.cc"], "dependencies" : [ "deps/leveldb/binding.gyp:leveldb" ] } ] }
{'targets': [{'target_name': 'leveled', 'sources': ['src/leveled.cc', 'src/batch.cc'], 'dependencies': ['deps/leveldb/binding.gyp:leveldb']}]}
posts = [ { "id": 1, "title": "Pancake", "content": "Lorem Ipsum ..." } ] users = []
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...
class Solution: def largest_rectangle_area(self, heights: List[int]) -> int: max_area = 0 stack = [] for (i, h) in enumerate(heights): start = i while stack and stack[-1][1] > h: (index, height) = stack.pop() max_area = max(max_area, h...
## @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...
class Associatejoint: def __init__(self, module, node, corr, ratio): self.ModuleName = module self.Node = node self.Correlation = corr self.Ratio = ratio def to_string(self): return self.ModuleName + '::' + self.NodeToString(self.Node) + '::' + self.CorrelationToStr(sel...
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...
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_package_files(packag...
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 ...
class Solution: def judge_circle(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 an...
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")
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
class Minorexception(Exception): pass 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")
measured_values = [None] * N for i in range(N): qubit = conn.recvQubit() measured_values[i] = qubit.measure(inplace=True) 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! ...
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)))]) print('\n\n\n\n\nA program by Karthikeshwar\n\n') input('Press enter to exit')
names = ["Serena", "Andrew", "Bobbie", "Cason", "David", "Farzana", "Frank", "Hannah", "Ida", "Irene", "Jim", "Jose", "Keith", "Laura", "Lucy", "Meredith", "Nick", "Ad...
names = ['Serena', 'Andrew', 'Bobbie', 'Cason', 'David', 'Farzana', 'Frank', 'Hannah', 'Ida', 'Irene', 'Jim', 'Jose', 'Keith', 'Laura', 'Lucy', 'Meredith', 'Nick', 'Ada', 'Yeeling', 'Yan'] pre_nouns = ['an', 'a', 'the', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'much', 'every', 'any...
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...
params = {'model_name': 'NCP', 'cluster_generator': 'MFM', 'maxK': 12, 'poisson_lambda': 3 - 1, 'dirichlet_alpha': 1, 'crp_alpha': 0.7, 'n_timesteps': 32, 'n_channels': 7, 'resnet_blocks': [1, 1, 1, 1], 'resnet_planes': 32, 'Nmin': 200, 'Nmax': 500, 'h_dim': 256, 'g_dim': 512, 'H_dim': 128}
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/", }
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/'}
class Config: DATABASE_USER = '' DATABASE_PASSWORD = '' DATABASE_DB = '' DATABASE_HOST = '' DATABASE_PORT = 3306 LOG_FILE = ''
class Config: database_user = '' database_password = '' database_db = '' database_host = '' database_port = 3306 log_file = ''
# def __init__(self): super().__init__(abc) #
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]))
class Solution: def find_disappeared_numbers(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...
primes = [2] next = 3 def is_prime(n): for i in primes: if n % i == 0: return False return True while len(primes) < 10001: if is_prime(next): primes.append(next) next += 2 print(primes[10000])
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
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
x,y=map(int,input().split()) if(x < y): print('<') elif(x > y): print('>') elif(x==y): print('==')
(x, y) = map(int, input().split()) if x < y: print('<') elif x > y: print('>') elif x == y: print('==')