content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
#!/bin/python3 # https://www.hackerrank.com/challenges/py-check-subset/problem # Author : Sagar Malik (sagarmalik@gmail.com) n = int(input()) for _ in range(n): K = int(input()) first = set(input().split()) t = int(input()) second = set(input().split()) print(len(first-second) == 0)
n = int(input()) for _ in range(n): k = int(input()) first = set(input().split()) t = int(input()) second = set(input().split()) print(len(first - second) == 0)
class Pipelines(object): def __init__(self, client): self._client = client def get_pipeline(self, pipeline_id, **kwargs): url = 'pipelines/{}'.format(pipeline_id) return self._client._get(self._client.BASE_URL + url, **kwargs) def get_all_pipelines(self, **kwargs): url = 'p...
class Pipelines(object): def __init__(self, client): self._client = client def get_pipeline(self, pipeline_id, **kwargs): url = 'pipelines/{}'.format(pipeline_id) return self._client._get(self._client.BASE_URL + url, **kwargs) def get_all_pipelines(self, **kwargs): url = '...
def grow_plants(db, messenger, object): # # grow plant db.increment_property_of_component('plant', object['entity'], 'growth', object['growth_rate']) return [] def ripen_fruit(db, messenger, object): db.increment_property_of_component('plant', object['entity'], 'fruit_growth', object['fruit_growt...
def grow_plants(db, messenger, object): db.increment_property_of_component('plant', object['entity'], 'growth', object['growth_rate']) return [] def ripen_fruit(db, messenger, object): db.increment_property_of_component('plant', object['entity'], 'fruit_growth', object['fruit_growth_rate']) return []
for c in range(1,50): if c%2==0: print('.',end='') print(c,end=' ')
for c in range(1, 50): if c % 2 == 0: print('.', end='') print(c, end=' ')
__author__ = 'khomitsevich' ATTRIBUTES_COUNT: int = 14 class Metrics: """ Metrics data class. """ # TODO: Initialization process should be more clearer, better to pass dict with keys as class parameter titles def __init__(self, filepath:str, filename:str, args:list): self.__argument_count_val...
__author__ = 'khomitsevich' attributes_count: int = 14 class Metrics: """ Metrics data class. """ def __init__(self, filepath: str, filename: str, args: list): self.__argument_count_validation(filepath, filename, args) self.__non_empty_arguments_validation(filepath, filename, args) sel...
# input sell price a = input("Input Final Sale Price") # input P&P cost b = input("Input P&P Costs") # add a & b together to get total # fees = total * 0.128 + 0.3 //12.8% + 30p # total - fees = profit # output total # output fees # output profit # output description explaining forumla # output note explaining that fe...
a = input('Input Final Sale Price') b = input('Input P&P Costs')
class ValidationError(Exception): """ Base class """ pass class AppStoreValidationError(ValidationError): message = None def __init__( self, message: str ): self.message = message super().__init__(message) def __str__(self) -> str: return self.messag...
class Validationerror(Exception): """ Base class """ pass class Appstorevalidationerror(ValidationError): message = None def __init__(self, message: str): self.message = message super().__init__(message) def __str__(self) -> str: return self.message
class Solution: def isPalindrome(self, x: int) -> bool: if x < 0 or (not x % 10 and x): return False rev = 0 while x > rev: rev = rev * 10 + x % 10 x //= 10 return rev == x or rev//10 == x
class Solution: def is_palindrome(self, x: int) -> bool: if x < 0 or (not x % 10 and x): return False rev = 0 while x > rev: rev = rev * 10 + x % 10 x //= 10 return rev == x or rev // 10 == x
valorc = float(input('Qual o valor da Casa? R$ ')) salario = float(input('Qual o valor do salario? R$')) anos = int(input('Em quantos anos deseja pagar? ')) prest = valorc / (anos * 12) if prest > (salario * (30/100)): print('Fincanciamento Negado') else: print('Financiamento Autorizado')
valorc = float(input('Qual o valor da Casa? R$ ')) salario = float(input('Qual o valor do salario? R$')) anos = int(input('Em quantos anos deseja pagar? ')) prest = valorc / (anos * 12) if prest > salario * (30 / 100): print('Fincanciamento Negado') else: print('Financiamento Autorizado')
''' Unit tests module for PaPaS module ''' __all__ = []
""" Unit tests module for PaPaS module """ __all__ = []
N = int(input()) for i in range(N): n, k = map(int, input().split()) ranges = {n: 1} max_range = 0 while k > 0: max_range, count_range = max(ranges.items()) if k > count_range: k -= count_range del ranges[max_range] range_1, range_2 = (max_range ...
n = int(input()) for i in range(N): (n, k) = map(int, input().split()) ranges = {n: 1} max_range = 0 while k > 0: (max_range, count_range) = max(ranges.items()) if k > count_range: k -= count_range del ranges[max_range] (range_1, range_2) = ((max_range...
""" While thinking abou this problem, many might come up with a DP algorithm. But this problem is much easier than DP problem. First, scan the input string, and store the maximum occurance index of every leter. Then, scan the input string again, considering the maximum occurance of each letter.While scanning, if you e...
""" While thinking abou this problem, many might come up with a DP algorithm. But this problem is much easier than DP problem. First, scan the input string, and store the maximum occurance index of every leter. Then, scan the input string again, considering the maximum occurance of each letter.While scanning, if you e...
alpha_num_dict = { 'a':1, 'b':2, 'c':3 }
alpha_num_dict = {'a': 1, 'b': 2, 'c': 3}
# Creating an empty Tuple Tuple1 = (Hello) print("Initial empty Tuple: ") print(Tuple1) A=(1,2,3,4) B=('a','b','c') C=(5,6,7,8) #second tuple print(A,'length= ',len(A)) print(B,'length= ',len(B)) print(A<C) print(A+C) print(max(A)) print(min(B)) tuple('hey') 'good'*3
tuple1 = Hello print('Initial empty Tuple: ') print(Tuple1) a = (1, 2, 3, 4) b = ('a', 'b', 'c') c = (5, 6, 7, 8) print(A, 'length= ', len(A)) print(B, 'length= ', len(B)) print(A < C) print(A + C) print(max(A)) print(min(B)) tuple('hey') 'good' * 3
# # PySNMP MIB module DSA-MIB (http://pysnmp.sf.net) # ASN.1 source http://mibs.snmplabs.com:80/asn1/DSA-MIB # Produced by pysmi-0.0.7 at Sun Feb 14 00:11:07 2016 # On host bldfarm platform Linux version 4.1.13-100.fc21.x86_64 by user goose # Using Python version 3.5.0 (default, Jan 5 2016, 17:11:52) # ( Integer, Obj...
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, value_size_constraint, value_range_constraint, constraints_intersection, constraints_union) ...
# basic model configuration related and data and training (model specific configuration is declared with Notebook) args = { "batch_size":128, "lr":1e-3, "epochs":10, }
args = {'batch_size': 128, 'lr': 0.001, 'epochs': 10}
marks = [[1,2,3],[4,5,6],[7,8,9]] rotate = [[False for i in range(len(marks[0]))] for j in range(len(marks))] for row, items in enumerate(marks): for col, val in enumerate(items): rotate[col][row] = val for row in marks: print(row) for row in rotate: print(row)
marks = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] rotate = [[False for i in range(len(marks[0]))] for j in range(len(marks))] for (row, items) in enumerate(marks): for (col, val) in enumerate(items): rotate[col][row] = val for row in marks: print(row) for row in rotate: print(row)
# do a bunch of ternary operations on an NA object x = 1 / 0 assert type(x) is NA assert type(pow(x, 2)) is NA assert type(pow(2, x)) is NA assert type(x ** 2) is NA assert type(2 ** x) is NA
x = 1 / 0 assert type(x) is NA assert type(pow(x, 2)) is NA assert type(pow(2, x)) is NA assert type(x ** 2) is NA assert type(2 ** x) is NA
# first line: 10 @memory.cache def read_wav(): wav = dl.data.get_smashing_baby() return wavfile.read(wav)
@memory.cache def read_wav(): wav = dl.data.get_smashing_baby() return wavfile.read(wav)
#!/usr/bin/python3 # 3-print_reversed_list_integer.py def print_reversed_list_integer(my_list=[]): """Print all integers of a list in reverse order.""" if isinstance(my_list, list): my_list.reverse() for i in my_list: print("{:d}".format(i))
def print_reversed_list_integer(my_list=[]): """Print all integers of a list in reverse order.""" if isinstance(my_list, list): my_list.reverse() for i in my_list: print('{:d}'.format(i))
class Config: BASE_DIR = "/usr/local/lib/python3.9/site-packages" FACEBOOK_PACKAGE = "facebook_business" ADOBJECT_DIR = "adobjects" # https://github.com/facebook/facebook-python-business-sdk/tree/master/facebook_business/adobjects FULL_PATH = f"{BASE_DIR}/{FACEBOOK_PACKAGE}/{ADOBJECT_DIR}" ...
class Config: base_dir = '/usr/local/lib/python3.9/site-packages' facebook_package = 'facebook_business' adobject_dir = 'adobjects' full_path = f'{BASE_DIR}/{FACEBOOK_PACKAGE}/{ADOBJECT_DIR}' neo4_j_host = 'bolt://service-neo4j:7687' exclusion_list = ['__init__.py', 'abstractobject.py', 'abstrac...
__version__ = "2.0.1" __version_info__ = tuple(int(num) for num in __version__.split(".")) default_app_config = "dbfiles.apps.DBFilesConfig"
__version__ = '2.0.1' __version_info__ = tuple((int(num) for num in __version__.split('.'))) default_app_config = 'dbfiles.apps.DBFilesConfig'
fo = open("list.txt", "r") lines = fo.readlines() outf = open("out.txt", "w") for line in lines: l = line.replace("\n","") ls = l.split(",") pl = "first: " + ls[0] + " second: " + ls[1] + " third: " + ls[2] outf.write(pl) outf.close()
fo = open('list.txt', 'r') lines = fo.readlines() outf = open('out.txt', 'w') for line in lines: l = line.replace('\n', '') ls = l.split(',') pl = 'first: ' + ls[0] + ' second: ' + ls[1] + ' third: ' + ls[2] outf.write(pl) outf.close()
# coding: utf-8 # created by Martin Haese, Tel FRM 10763 # last modified 01.02.2018 # to call it # ssh -X refsans@refsansctrl01 oder 02 # cd /refsanscontrol/src/nicos-core # INSTRUMENT=nicos_mlz.refsans bin/nicos-monitor -S monitor_scatgeo description = 'REFSANS scattering geometry monitor' group = 'special' # Legen...
description = 'REFSANS scattering geometry monitor' group = 'special' _componentpositioncol = column(block(' x: component position in beam direction ', [block_row(field(name='goniometer', dev='goniometer_x', width=14, unit='mm'), field(name='sample center', dev='sample_x', width=14, unit='mm'), field(name='monitor pos...
#!/usr/bin/env python ''' --- Day 12: Passage Pathing --- With your submarine's subterranean subsystems subsisting suboptimally, the only way you're getting out of this cave anytime soon is by finding a path yourself. Not just a path - the only way to know if you've found the best path is to find all of them. Fortun...
""" --- Day 12: Passage Pathing --- With your submarine's subterranean subsystems subsisting suboptimally, the only way you're getting out of this cave anytime soon is by finding a path yourself. Not just a path - the only way to know if you've found the best path is to find all of them. Fortunately, the sensors are s...
intervals = [(2, 15), (36, 45), (9, 29), (16, 23), (4, 9)] def room_num(intervals): intervals_sorted = sorted(intervals, key=lambda x: x[0]) rooms = 1 room_open_time = [intervals_sorted[0][1]] for interval in intervals_sorted[1:]: if interval[0] < min(room_open_time): rooms += 1 ...
intervals = [(2, 15), (36, 45), (9, 29), (16, 23), (4, 9)] def room_num(intervals): intervals_sorted = sorted(intervals, key=lambda x: x[0]) rooms = 1 room_open_time = [intervals_sorted[0][1]] for interval in intervals_sorted[1:]: if interval[0] < min(room_open_time): rooms += 1 ...
""" Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the absolute difference between i and j is at most k. """ class Solution(): def contains_dups(self, nums, k): nhash = {} for i in range(len(nums)): ...
""" Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the absolute difference between i and j is at most k. """ class Solution: def contains_dups(self, nums, k): nhash = {} for i in range(len(nums)): ...
def web_page_wifi(): html = """<!DOCTYPE html><html lang="de"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <form action="/get"> <h1>Wifi configuration</h1> <br> <a href= "mail...
def web_page_wifi(): html = '<!DOCTYPE html><html lang="de">\n <head>\n <meta http-equiv="content-type" content="text/html; charset=UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1">\n </head>\n <body>\n <form action="/get">\n <h1>Wifi configuration</h1>\n <br>\n <a href= "mailt...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ----------------------------------------- @Author: isky @Email: 19110240019@fudan.edu.cn @Created: 2019/11/19 ------------------------------------------ @Modify: 2019/11/19 ------------------------------------------ @Description: """
""" ----------------------------------------- @Author: isky @Email: 19110240019@fudan.edu.cn @Created: 2019/11/19 ------------------------------------------ @Modify: 2019/11/19 ------------------------------------------ @Description: """
def merge(pic_1, pic_2): return { 'id': pic_1['id'] + pic_2['id'], 'tags': pic_1['tags'] | pic_2['tags'], } def get_score_table(pics): score_table = {} for i in range(len(pics)): for j in range(i + 1, len(pics)): r = len(pics[i]['tags'] & pics[j]['tags']) ...
def merge(pic_1, pic_2): return {'id': pic_1['id'] + pic_2['id'], 'tags': pic_1['tags'] | pic_2['tags']} def get_score_table(pics): score_table = {} for i in range(len(pics)): for j in range(i + 1, len(pics)): r = len(pics[i]['tags'] & pics[j]['tags']) p = len(pics[i]['tags'...
def for_E(): """We are creating user defined function for alphabetical pattern of capital E with "*" symbol""" row=7 col=5 for i in range(row): for j in range(col): if i==0 or i==3 or i==6 or j==0: print("*",end=" ") else: print(" ...
def for_e(): """We are creating user defined function for alphabetical pattern of capital E with "*" symbol""" row = 7 col = 5 for i in range(row): for j in range(col): if i == 0 or i == 3 or i == 6 or (j == 0): print('*', end=' ') else: pr...
def part1(inp): drawn_numbers = [int(x) for x in inp.pop(0).split(",")] boards = [] for i in range(len(inp) // 6): inp.pop(0) board = [[int(x) for x in inp.pop(0).split()] for j in range(5)] boards.append(board) for num in drawn_numbers: for board in boards: ...
def part1(inp): drawn_numbers = [int(x) for x in inp.pop(0).split(',')] boards = [] for i in range(len(inp) // 6): inp.pop(0) board = [[int(x) for x in inp.pop(0).split()] for j in range(5)] boards.append(board) for num in drawn_numbers: for board in boards: m...
""" Purpose: stackoverflow solution. Date created: 2021-03-04 Title: How to generate a lists of lists or nested from user input while outputting amount of times a word is stated? URL: https://stackoverflow.com/questions/66483811/how-to-generate-a-lists-of-lists-or-nested-from-user-input-while-outputting-amou/66484266...
""" Purpose: stackoverflow solution. Date created: 2021-03-04 Title: How to generate a lists of lists or nested from user input while outputting amount of times a word is stated? URL: https://stackoverflow.com/questions/66483811/how-to-generate-a-lists-of-lists-or-nested-from-user-input-while-outputting-amou/66484266#...
class Version(str): SEPARATOR = '.' def __new__(cls, version=""): obj = str.__new__(cls, version) obj._list = None return obj @property def list(self): if self._list is None: self._list = [] for item in self.split(Version.SEPARATOR): ...
class Version(str): separator = '.' def __new__(cls, version=''): obj = str.__new__(cls, version) obj._list = None return obj @property def list(self): if self._list is None: self._list = [] for item in self.split(Version.SEPARATOR): ...
class Solution: """ @param nums: an array of integers @param k: an integer @return: the number of unique k-diff pairs """ def findPairs(self, nums, k): ans = 0 num_set = set(nums) if k == 0: num_dict = dict([(num, 0) for num in num_set]) ...
class Solution: """ @param nums: an array of integers @param k: an integer @return: the number of unique k-diff pairs """ def find_pairs(self, nums, k): ans = 0 num_set = set(nums) if k == 0: num_dict = dict([(num, 0) for num in num_set]) for num ...
# MEDIUM # this is like Word Break => DFS + Memoization # define a lambda x,y: x {+,-,*} y # scan the string s: # break at operators "+-*" => left = s[:operator] right = s[operator+1:] # recurse each left, right: # try every possible operations of left and right # Time O(N!) Space O(N) class Solut...
class Solution: def diff_ways_to_compute(self, input: str) -> List[int]: self.memo = {} self.ops = {'+': lambda x, y: x + y, '-': lambda x, y: x - y, '*': lambda x, y: x * y} return self.dfs(input) def dfs(self, s): result = [] if s in self.memo: return self...
#!/usr/bin/env python3 # day007.py # By Sebastian Raaphorst, 2019. # We memoize the auxiliary internal function in calculate_decodings, because the recursion explodes into # already-solved sub-problems. # For the last test, without memoization, it takes class Memoize: def __init__(self, f): self.f = f ...
class Memoize: def __init__(self, f): self.f = f self.memo = {} def __call__(self, *args): if not args in self.memo: self.memo[args] = self.f(*args) return self.memo[args] def calculate_decodings(enc: str) -> int: """ Given an encoded string consisting of ...
""" -The zip functions takes some iterators and zips Them on Tuples. - Used to parallel iterations - Retun a zip object which is an iterators of zip. the zip function takes the len of the shortest zip ands used it as main path to zip to the other zip. """ countries = "Ecuador" capitals = "Quito" countries_cap...
""" -The zip functions takes some iterators and zips Them on Tuples. - Used to parallel iterations - Retun a zip object which is an iterators of zip. the zip function takes the len of the shortest zip ands used it as main path to zip to the other zip. """ countries = 'Ecuador' capitals = 'Quito' countries_capital...
git_response = { "login": "dimddev", "id": 57534, "node_id": "MdQ6VXnlc4U3NTM0NDA=", "avatar_url": "https://avatars1.githubusercontent.com/u/5753440?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dimddev", "html_url": "https://github.com/dimddev", "followers_url": "https:/...
git_response = {'login': 'dimddev', 'id': 57534, 'node_id': 'MdQ6VXnlc4U3NTM0NDA=', 'avatar_url': 'https://avatars1.githubusercontent.com/u/5753440?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/dimddev', 'html_url': 'https://github.com/dimddev', 'followers_url': 'https://api.github.com/users/dimddev/fol...
# # user-statistician: Github action for generating a user stats card # # Copyright (c) 2021 Vincent A Cicirello # https://www.cicirello.org/ # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal...
color_mapping = {'dark': {'bg': '#090c10', 'border': '#0d419d', 'icons': '#79c0ff', 'text': '#c9d1d9', 'title': '#f0f6fc'}, 'dark-dimmed': {'bg': '#1e2228', 'border': '#1b4b91', 'icons': '#6cb6ff', 'text': '#adbac7', 'title': '#cdd9e5'}, 'light': {'bg': '#f6f8fa', 'border': '#c8e1ff', 'icons': '#0366d6', 'text': '#2429...
class Node: def __init__(self, element, parent, left_child, right_child): self.element = element self.parent = parent self.left_child = left_child self.right_child = right_child def getElement(self): return self.element def getParent(self): return self.parent ...
class Node: def __init__(self, element, parent, left_child, right_child): self.element = element self.parent = parent self.left_child = left_child self.right_child = right_child def get_element(self): return self.element def get_parent(self): return self.pa...
# These default settings initally apply to all installations of the config_app. # # This file _is_ and should remain under version control. # DEBUG = False SQLALCHEMY_ECHO = False SECRET_KEY = b'default_SECRET_KEY' # # IMPORTANT: Do _not_ edit this file. # Instead, over-ride with settings in the instance/c...
debug = False sqlalchemy_echo = False secret_key = b'default_SECRET_KEY'
class Solution: def getHint(self, secret: str, guess: str) -> str: index = 0 secret = list(secret) guess = list(guess) A = 0 while index < len(secret): # count A if secret[index] == guess[index]: secret = secret[:index] + secret[index +...
class Solution: def get_hint(self, secret: str, guess: str) -> str: index = 0 secret = list(secret) guess = list(guess) a = 0 while index < len(secret): if secret[index] == guess[index]: secret = secret[:index] + secret[index + 1:] ...
COLOMBIA_PLACES_FILTERS = [ # Colombia {'country': 'CO', 'location': 'Bogota'}, {'country': 'CO', 'location': 'Medellin'}, # TODO: solve issue, meetup is not returning results for cali even though it actually exist a django group {'country': 'CO', 'location': 'Cali'}, {'country': 'CO', 'location...
colombia_places_filters = [{'country': 'CO', 'location': 'Bogota'}, {'country': 'CO', 'location': 'Medellin'}, {'country': 'CO', 'location': 'Cali'}, {'country': 'CO', 'location': 'Barranquilla'}, {'country': 'CO', 'location': 'Santa marta'}, {'country': 'CO', 'location': 'Pasto'}] latam_places_filters = [{'country': '...
# -*- coding: utf-8 -*- n = int(input()) t = [] for _ in range(n): t.append(int(input())) for i in range(n): if i > 0 and i < n - 1: print(sum(t[i - 1:i + 2])) elif i == 0: print(sum(t[:2])) else: print(sum(t[i - 1:]))
n = int(input()) t = [] for _ in range(n): t.append(int(input())) for i in range(n): if i > 0 and i < n - 1: print(sum(t[i - 1:i + 2])) elif i == 0: print(sum(t[:2])) else: print(sum(t[i - 1:]))
N = int(input()) lst = [list(map(int,input().split())) for i in range(N)] for i in range(N-2): for j in range(i+1,N-1): for k in range(j+1,N): x0,y0 = lst[i] x1,y1 = lst[j] x2,y2 = lst[k] x0 -= x2 x1 -= x2 y0 -= y2 y1 -= y2...
n = int(input()) lst = [list(map(int, input().split())) for i in range(N)] for i in range(N - 2): for j in range(i + 1, N - 1): for k in range(j + 1, N): (x0, y0) = lst[i] (x1, y1) = lst[j] (x2, y2) = lst[k] x0 -= x2 x1 -= x2 y0 -= y2 ...
class ConsoleLine: body = None current_character = None type = None
class Consoleline: body = None current_character = None type = None
class KeyExReturn: def __init__(self): self._status_code = None self._msg = None def __call__(self): return self._msg, self._status_code def status_code(self): return self._status_code def message(self): return self._msg class OK(KeyExReturn): def __init_...
class Keyexreturn: def __init__(self): self._status_code = None self._msg = None def __call__(self): return (self._msg, self._status_code) def status_code(self): return self._status_code def message(self): return self._msg class Ok(KeyExReturn): def __in...
# Radix sort in Python def counting_sort(array, place): size = len(array) output = [0] * size count = [0] * 10 for i in range(0, size): index = array[i] // place count[index % 10] += 1 for i in range(1, 10): count[i] += count[i - 1] i = size - 1 while i >= 0: ...
def counting_sort(array, place): size = len(array) output = [0] * size count = [0] * 10 for i in range(0, size): index = array[i] // place count[index % 10] += 1 for i in range(1, 10): count[i] += count[i - 1] i = size - 1 while i >= 0: index = array[i] // pla...
class Fields: #rearrange the field order at will #if renaming or adding additional fields modifying target.csv is required values = ['Timestamp', 'Transaction Id', 'Payment ID', 'Note', 'Receive/Send Address', 'Debit', 'Credit', 'Network Fee', 'Balance', 'Currency']
class Fields: values = ['Timestamp', 'Transaction Id', 'Payment ID', 'Note', 'Receive/Send Address', 'Debit', 'Credit', 'Network Fee', 'Balance', 'Currency']
TABLES = ["departments", "dept_manager", "dept_emp", "titles", "salaries"] QUERYLIST_CREATE_STRUCTURE = [ "DROP TABLE IF EXISTS dept_emp, dept_manager, titles, salaries, employees, departments;", """CREATE TABLE employees ( emp_no INT NOT NULL, birth_date DATE NOT NULL, ...
tables = ['departments', 'dept_manager', 'dept_emp', 'titles', 'salaries'] querylist_create_structure = ['DROP TABLE IF EXISTS dept_emp, dept_manager, titles, salaries, employees, departments;', "CREATE TABLE employees (\n emp_no INT NOT NULL,\n birth_date DATE NOT NULL,\n first_na...
""" Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty space is marked as 1 and 0 respectively in the grid. For example, There is one obstacle in the middle of a 3x3 grid as illustrated below. [ [0,0,0], [0,1,0], [0,...
""" Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty space is marked as 1 and 0 respectively in the grid. For example, There is one obstacle in the middle of a 3x3 grid as illustrated below. [ [0,0,0], [0,1,0], [0,...
''' URL: https://leetcode.com/problems/basic-calculator/ Time complexity: O(n) Space complexity: O(n) ''' class Solution: def _get_next_num(self, i, s): curr_num = "" while i < len(s) and s[i].isdigit(): curr_num += s[i] i += 1 return i-1, int(curr_num) def cal...
""" URL: https://leetcode.com/problems/basic-calculator/ Time complexity: O(n) Space complexity: O(n) """ class Solution: def _get_next_num(self, i, s): curr_num = '' while i < len(s) and s[i].isdigit(): curr_num += s[i] i += 1 return (i - 1, int(curr_num)) def...
FILENAME = "input.txt" class Expression: def __init__(self, expression_str: str): expression_list = expression_str.split() if len(expression_list) == 1: self.parse_expression(None, None, expression_list[0]) elif len(expression_list) == 2: self.parse_expression(Non...
filename = 'input.txt' class Expression: def __init__(self, expression_str: str): expression_list = expression_str.split() if len(expression_list) == 1: self.parse_expression(None, None, expression_list[0]) elif len(expression_list) == 2: self.parse_expression(None,...
# generated from genmsg/cmake/pkg-genmsg.context.in messages_str = "/workspace/src/ros_control/controller_manager_msgs/msg/ControllerState.msg;/workspace/src/ros_control/controller_manager_msgs/msg/ControllerStatistics.msg;/workspace/src/ros_control/controller_manager_msgs/msg/ControllersStatistics.msg;/workspace/src/...
messages_str = '/workspace/src/ros_control/controller_manager_msgs/msg/ControllerState.msg;/workspace/src/ros_control/controller_manager_msgs/msg/ControllerStatistics.msg;/workspace/src/ros_control/controller_manager_msgs/msg/ControllersStatistics.msg;/workspace/src/ros_control/controller_manager_msgs/msg/HardwareInter...
a=[] while True: b=input("Enter Number(Break Using String):") if b.isalpha(): break else: a.append(int(b)) continue c=a[0] for x in a: if c>x: c=x else: continue d=0 if c in a: d=a.index(c) print ("Index:",d) print ("Number:",c)
a = [] while True: b = input('Enter Number(Break Using String):') if b.isalpha(): break else: a.append(int(b)) continue c = a[0] for x in a: if c > x: c = x else: continue d = 0 if c in a: d = a.index(c) print('Index:', d) print('Number:', c)
''' PROBLEM: Length of Last Word Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word (last word means the last appearing word if we loop from left to right) in the string. If the last word does not exist, return 0. Note: A word is defined as a maxima...
""" PROBLEM: Length of Last Word Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word (last word means the last appearing word if we loop from left to right) in the string. If the last word does not exist, return 0. Note: A word is defined as a maxima...
# # PySNMP MIB module RBN-TC (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RBN-TC # Produced by pysmi-0.3.4 at Wed May 1 14:52:26 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, 09:23:15) ...
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, value_range_constraint, constraints_union, constraints_intersection, value_size_constraint) ...
def quicksort(ar:list): """ Sort a list with quicksort algorithm. The quicksort algorithm splits a list into two parts and recursively sorts those parts by making swaps based on the elements value in relation to the pivot value. It is an O(n log(n)) sort. Args: ar: list to so...
def quicksort(ar: list): """ Sort a list with quicksort algorithm. The quicksort algorithm splits a list into two parts and recursively sorts those parts by making swaps based on the elements value in relation to the pivot value. It is an O(n log(n)) sort. Args: ar: list to s...
imports="" loader=""" //handle := C.MemoryLoadLibrary(unsafe.Pointer(&full_payload[0]),(C.size_t)(len(full_payload))) handle := C.MemoryLoadLibraryEx(unsafe.Pointer(&full_payload[0]), (C.size_t)(len(full_payload)), (*[0]byte)(C.MemoryDefaultLoad...
imports = '' loader = '\n\t//handle := C.MemoryLoadLibrary(unsafe.Pointer(&full_payload[0]),(C.size_t)(len(full_payload)))\n\thandle := C.MemoryLoadLibraryEx(unsafe.Pointer(&full_payload[0]),\n (C.size_t)(len(full_payload)),\n (*[0]byte)(C.MemoryDefa...
# Copyright (C) 2019 SignalFx, Inc. All rights reserved. name = 'signalfx_serverless_gcf' version = '0.0.1' user_agent = 'signalfx_serverless/' + version packages = ['signalfx_gcf', 'signalfx_gcf.serverless']
name = 'signalfx_serverless_gcf' version = '0.0.1' user_agent = 'signalfx_serverless/' + version packages = ['signalfx_gcf', 'signalfx_gcf.serverless']
print("Hello! I am a script in python"); def Hi(firstName, lastName): print("Hello " + firstName + " " + lastName)
print('Hello! I am a script in python') def hi(firstName, lastName): print('Hello ' + firstName + ' ' + lastName)
class GN3: def __init__(self): self.name = 'GN3' def __str__(self): return self.name
class Gn3: def __init__(self): self.name = 'GN3' def __str__(self): return self.name
# Specialization: Google IT Automation with Python # Course 01: Crash Course with Python # Week 2 Module Part 1 Exercise 02 # Student: Shawn Solomon # Learning Platform: Coursera.org # Practice writing some expressions and conversions yourself. # In this scenario, we have a directory with 5 files in it. Each ...
total = 2048 + 4357 + 97658 + 125 + 8 files = 5 average = total / files print('The average size is: ' + str(average))
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of xy-cli. # https://github.com/exiahuang/xy-cli # Licensed under the Apache License 2.0: # http://www.opensource.org/licenses/Apache-2.0 # Copyright (c) 2020, exiahuang <exia.huang@outlook.com> __version__ = '0.8' # NOQA __desc__ = 'xy command tools...
__version__ = '0.8' __desc__ = 'xy command tools'
class Stack: def __init__(self) -> None: self.elements = [] def push(self, element): self.elements.append(element) def size(self): return len(self.elements) def pop(self): result = self.elements[self.size()-1] self.elements = self.elements[:self.size()-1] ...
class Stack: def __init__(self) -> None: self.elements = [] def push(self, element): self.elements.append(element) def size(self): return len(self.elements) def pop(self): result = self.elements[self.size() - 1] self.elements = self.elements[:self.size() - 1] ...
# Lets attempt to draw two points and have them move also pos_1 = 0 velo_1 = 1 pos_2 = 9 velo_2 = -1 line = 10*[' '] # The code is beginning to be clustered and hard to read for i in range(10): line[pos_1] = '*' line[pos_2] = '*' print("".join(line)) line[pos_1] = ' ' line[pos_2] = ' ' pos_...
pos_1 = 0 velo_1 = 1 pos_2 = 9 velo_2 = -1 line = 10 * [' '] for i in range(10): line[pos_1] = '*' line[pos_2] = '*' print(''.join(line)) line[pos_1] = ' ' line[pos_2] = ' ' pos_1 += velo_1 pos_2 += velo_2 print(pos_1, pos_2) print(''.join(line))
a = int(input("Enter a -: ")) b = int(input("Enter b -: ")) print("A, B se bada ya barabar h bhai") if a >= b else print( "B, A se bada h bhai")
a = int(input('Enter a -: ')) b = int(input('Enter b -: ')) print('A, B se bada ya barabar h bhai') if a >= b else print('B, A se bada h bhai')
# A postgres database url # postgresql://[user[:password]@][netloc][:port][/dbname] DATABASE_URL="" # Your discord bot token TOKEN=""
database_url = '' token = ''
class Server(object): def __init__(self, crt_name, deploy_full_chain=False, **kwargs): r"""Default server implementation describing interface of a server This is an abstract class, so each specialized method must be overridden in parent class. :param crt_name: name of certificate on server...
class Server(object): def __init__(self, crt_name, deploy_full_chain=False, **kwargs): """Default server implementation describing interface of a server This is an abstract class, so each specialized method must be overridden in parent class. :param crt_name: name of certificate on server ...
def gcd(a,b): return gcd(b,a%b) if b>0 else a a,b,c=map(int,input().split()) if a*b//gcd(a,b) <=c: print("yes") else: print("no")
def gcd(a, b): return gcd(b, a % b) if b > 0 else a (a, b, c) = map(int, input().split()) if a * b // gcd(a, b) <= c: print('yes') else: print('no')
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def search_paths(self, root, sum, path, paths): if not(root): return sum -= root.val if sum < 0:...
class Solution(object): def search_paths(self, root, sum, path, paths): if not root: return sum -= root.val if sum < 0: return path.append(root.val) if sum == 0: paths.append(path[:]) self.search_paths(root.left, sum, path, paths) ...
load("@io_bazel_rules_go//go:def.bzl", "go_context", "go_rule") load("@bazel_skylib//lib:shell.bzl", "shell") def _go_vendor(ctx): go = go_context(ctx) out = ctx.actions.declare_file(ctx.label.name + ".sh") substitutions = { "@@GO@@": shell.quote(go.go.path), "@@GAZELLE@@": shell.quote(ctx.e...
load('@io_bazel_rules_go//go:def.bzl', 'go_context', 'go_rule') load('@bazel_skylib//lib:shell.bzl', 'shell') def _go_vendor(ctx): go = go_context(ctx) out = ctx.actions.declare_file(ctx.label.name + '.sh') substitutions = {'@@GO@@': shell.quote(go.go.path), '@@GAZELLE@@': shell.quote(ctx.executable._gazel...
# ------------------------------ # 137. Single Number II # # Description: # Given a non-empty array of integers, every element appears three times except for one, which appears exactly once. Find that single one. # Note: # Your algorithm should have a linear runtime complexity. Could you implement it without using ext...
class Solution(object): def single_number(self, nums): """ :type nums: List[int] :rtype: int """ while nums: n = nums.pop(0) if n in nums: nums.remove(n) nums.remove(n) else: return n if __na...
class InputPin: """ The Rosetta graph input pin """ # TODO: Should be able to find connected output pin - so traversal up the graph is possible. def __init__(self, pin_name, mime_type_map, filter): """ c'tor :param pin_name: The name of the pin for diagnostics, etc. :...
class Inputpin: """ The Rosetta graph input pin """ def __init__(self, pin_name, mime_type_map, filter): """ c'tor :param pin_name: The name of the pin for diagnostics, etc. :param mime_type_map: Maps a mime type to a handler. * maps everything. :param filter: A ...
# # PySNMP MIB module CTRON-SFPS-COMMON-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CTRON-SFPS-COMMON-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:30:50 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (def...
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, value_range_constraint, constraints_union, single_value_constraint, constraints_intersection) ...
print("git UNT ") print("git lunes")
print('git UNT ') print('git lunes')
def metaLine2metaDict(metaLine): metaDict = {} fields = metaLine.split(';') for field in fields: fl = field.split('=') subfieldName = fl[0] fieldInfo = fl[1] metaDict[subfieldName] = fieldInfo return metaDict def getGeneInformationFromGFFline(line, field): result = False if not line.startswith('#'): l...
def meta_line2meta_dict(metaLine): meta_dict = {} fields = metaLine.split(';') for field in fields: fl = field.split('=') subfield_name = fl[0] field_info = fl[1] metaDict[subfieldName] = fieldInfo return metaDict def get_gene_information_from_gf_fline(line, field): ...
s=input('Enter Main String:') subs=input('Enter Substring to search:') if subs in s: print(subs, 'Is found in Main String') else: print(subs, 'is not found in Main String')
s = input('Enter Main String:') subs = input('Enter Substring to search:') if subs in s: print(subs, 'Is found in Main String') else: print(subs, 'is not found in Main String')
class Solution(object): def maxProduct(self, nums): """ :type nums: List[int] :rtype: int """ max_product = local_min = local_max = nums[0] for i in range(1, len(nums)): cur = nums[i] local_min, local_max = min(min(cur*local_min, cur*local_max)...
class Solution(object): def max_product(self, nums): """ :type nums: List[int] :rtype: int """ max_product = local_min = local_max = nums[0] for i in range(1, len(nums)): cur = nums[i] (local_min, local_max) = (min(min(cur * local_min, cur * l...
# automatically generated by the FlatBuffers compiler, do not modify # namespace: FBS class FByteDataType(object): UINT8 = 0 FLOAT16 = 1 FLOAT32 = 2 PNG = 3 JPEG = 4 Other = 5
class Fbytedatatype(object): uint8 = 0 float16 = 1 float32 = 2 png = 3 jpeg = 4 other = 5
FILE_PATH = './Day4/input.txt' def parseData(recordData): record = {} for data in recordData: fieldPairs = data.split(' ') for fieldPair in fieldPairs: field, value = fieldPair.split(':') record[field] = value if field not in ['byr', 'iyr', 'eyr', 'hgt', '...
file_path = './Day4/input.txt' def parse_data(recordData): record = {} for data in recordData: field_pairs = data.split(' ') for field_pair in fieldPairs: (field, value) = fieldPair.split(':') record[field] = value if field not in ['byr', 'iyr', 'eyr', 'hgt',...
""" TASK1: Finding the Square Root of an Integer Find the square root of the integer without using any Python library. You have to find the floor value of the square root. For example if the given number is 16, then the answer would be 4. If the given number is 27, the answer would be 5 because sqrt(5) = 5.196 whose fl...
""" TASK1: Finding the Square Root of an Integer Find the square root of the integer without using any Python library. You have to find the floor value of the square root. For example if the given number is 16, then the answer would be 4. If the given number is 27, the answer would be 5 because sqrt(5) = 5.196 whose fl...
print(60*'=') print(' CAIXA ELETRONICO ') print(60*'=') total = int(input('Que valor deseja sacar ? R$ ')) cedula = 50 totalced = 0 while True: if total >= cedula: total-=cedula totalced+=1 print(total) else: if totalced>0: print(f'Total de {tota...
print(60 * '=') print(' CAIXA ELETRONICO ') print(60 * '=') total = int(input('Que valor deseja sacar ? R$ ')) cedula = 50 totalced = 0 while True: if total >= cedula: total -= cedula totalced += 1 print(total) else: if totalced > 0: print(f'Total de {totalce...
class BaseRandomizer(): def __init__(self, projectName=None, seed=None, programMode=True) -> None: self.seed = seed if programMode: self.inputPath = f'projects/{projectName}/tmp/text/' else: self.inputPath = f'projects/{projectName}/text/'
class Baserandomizer: def __init__(self, projectName=None, seed=None, programMode=True) -> None: self.seed = seed if programMode: self.inputPath = f'projects/{projectName}/tmp/text/' else: self.inputPath = f'projects/{projectName}/text/'
""" This constant file was automatically generated by a quick script I wrote for the enum part and h2py for the constant part. It aims to help out remembering the enum values and constants, but probably as bugs... please refer to the actual documentation for the correct values (if something is not working) and feel fr...
""" This constant file was automatically generated by a quick script I wrote for the enum part and h2py for the constant part. It aims to help out remembering the enum values and constants, but probably as bugs... please refer to the actual documentation for the correct values (if something is not working) and feel fr...
def padlindromic_date1(date1): d,m,y = date1.split('/') return (d+y)[::-1] == y and (m+d) [::-1] == y def padlindromic_date2(date2): dd,mm,yyyy = date2.split('/') date11 = ''.join([dd,mm,yyyy]) date12 = ''.join([mm,dd,yyyy]) return date11 == date11[::-1] and date12 == date12[::-1] def ...
def padlindromic_date1(date1): (d, m, y) = date1.split('/') return (d + y)[::-1] == y and (m + d)[::-1] == y def padlindromic_date2(date2): (dd, mm, yyyy) = date2.split('/') date11 = ''.join([dd, mm, yyyy]) date12 = ''.join([mm, dd, yyyy]) return date11 == date11[::-1] and date12 == date12[::-1...
sum = 0 for i in range(1,1000): if i%3==0 or i%5==0: sum += i print(sum)
sum = 0 for i in range(1, 1000): if i % 3 == 0 or i % 5 == 0: sum += i print(sum)
class ORMBaseException(Exception): def __init__(self): self.message = "" super().__init__() def __str__(self): return self.message class FieldDoesNotExist(ORMBaseException): def __init__(self, field: str): self.message = f"This field '{field}' is not avaible"
class Ormbaseexception(Exception): def __init__(self): self.message = '' super().__init__() def __str__(self): return self.message class Fielddoesnotexist(ORMBaseException): def __init__(self, field: str): self.message = f"This field '{field}' is not avaible"
r""" Global variables to the migration simulations and plot analysis. """ END_TIME = 13.2 # total simulation time in Gyr # Width of each annulus in kpc # This needs modified *only* if running the plotting scripts. ZONE_WIDTH = 0.1 MAX_SF_RADIUS = 15.5 # Radius in kpc beyond which the SFR = 0 # Stellar mass of Milky...
""" Global variables to the migration simulations and plot analysis. """ end_time = 13.2 zone_width = 0.1 max_sf_radius = 15.5 m_star_mw = 51700000000.0 colormap = 'winter'
#Translation table for atomic numbers to element names and vice versa #Note that the NIST database provides data up to atomic number 92 (= Uranium) #Last column contains material densities ElementaryData = [ (0, "Void", "X", 0), (1, "Hydrogen", "H", 8.375E-05), (2, "Helium", ...
elementary_data = [(0, 'Void', 'X', 0), (1, 'Hydrogen', 'H', 8.375e-05), (2, 'Helium', 'He', 0.0001663), (3, 'Lithium', 'Li', 0.534), (4, 'Beryllium', 'Be', 1.848), (5, 'Boron', 'B', 2.37), (6, 'Carbon', 'C', 1.7), (7, 'Nitrogen', 'N', 0.001165), (8, 'Oxygen', 'O', 0.001332), (9, 'Fluorine', 'F', 0.00158), (10, 'Neon',...
# Copyright (c) 2013 Mirantis Inc. # # 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 to in writ...
class Parameter(object): """This bean is used for building config entries.""" def __init__(self, config): self.name = config['name'] self.description = config.get('description', 'No description') self.required = not config['is_optional'] self.default_value = config.get('default_...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'Phoenix1327' a = 'ABC' b = a a = 'XYZ' print(b) # a --> 'ABC' # b --> a --> 'ABC'(i.e. b --> 'ABC') # a --> 'XYZ' #exercise n = 123 f = 456.789 s1 = 'Hello, world' s2 = 'Hello, \'Adam\'' s3 = r'Hello, "Bart"' s4 = r'''Hello, Lisa!''' print (n) print (f) p...
__author__ = 'Phoenix1327' a = 'ABC' b = a a = 'XYZ' print(b) n = 123 f = 456.789 s1 = 'Hello, world' s2 = "Hello, 'Adam'" s3 = 'Hello, "Bart"' s4 = 'Hello,\nLisa!' print(n) print(f) print(s1) print(s2) print(s3) print(s4)
class URL(object): BASE_URL = 'https://uatapi.nimbbl.tech/api' ORDER_URL = "/orders" AUTHURL = "v2/generate-token"; ORDER_CREATE = "v2/create-order"; ORDER_GET = "v2/get-order"; ORDER_LIST = "orders/many?f=&pt=yes"; LIST_QUERYPARAM1 = "f"; LIST_QUERYPARAM2 = "pt"; NO = "no";...
class Url(object): base_url = 'https://uatapi.nimbbl.tech/api' order_url = '/orders' authurl = 'v2/generate-token' order_create = 'v2/create-order' order_get = 'v2/get-order' order_list = 'orders/many?f=&pt=yes' list_queryparam1 = 'f' list_queryparam2 = 'pt' no = 'no' empty = '' ...
#!/usr/bin/python # encoding: utf-8 def search(key, *args, kwargs): pass if __name__ == "__main__": pass
def search(key, *args, kwargs): pass if __name__ == '__main__': pass
"""A utility module for ASP (Active Server Pages on MS Internet Info Server. Contains: iif -- A utility function to avoid using "if" statements in ASP <% tags """ def iif(cond, t, f): if cond: return t else: return f
"""A utility module for ASP (Active Server Pages on MS Internet Info Server. Contains: iif -- A utility function to avoid using "if" statements in ASP <% tags """ def iif(cond, t, f): if cond: return t else: return f
# -*- coding: utf-8 -*- # @Author: rish # @Date: 2020-08-02 23:03:40 # @Last Modified by: rish # @Last Modified time: 2020-08-04 01:20:05 def info(): print( 'er_extractor module - functionality for data collection of exchange\ rates based on provided arguments and persistence of data collected\ into the da...
def info(): print('er_extractor module - functionality for data collection of exchange\t\trates based on provided arguments and persistence of data collected\t\tinto the database.')
class Node(object): def __init__(self, value = None, leftChild = None, rightChild = None): self.value = value self.leftChild = leftChild self.rightChild = rightChild
class Node(object): def __init__(self, value=None, leftChild=None, rightChild=None): self.value = value self.leftChild = leftChild self.rightChild = rightChild
class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def lowestCommonAncestor(self, root, p, q): if root is None or root == p or root == q: return root l = self.lowestCommonAncestor(root.left, p, q) ...
class Treenode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def lowest_common_ancestor(self, root, p, q): if root is None or root == p or root == q: return root l = self.lowestCommonAncestor(root.left, p, q) ...
#!/usr/bin/env python3 """ A crude solver for [Move Here Move There] (https://www.newgrounds.com/portal/view/718498). """ board = { (0, 0): "X", (3, 0): "X", (4, 0): [(-3, 3)], (6, 0): "X", (0, 1): "X", (4, 2): "X", (0, 4): [(4, 0)], (3, 4): [(3, -3)], (4, 4): [(1, 0), (-1, 1)], ...
""" A crude solver for [Move Here Move There] (https://www.newgrounds.com/portal/view/718498). """ board = {(0, 0): 'X', (3, 0): 'X', (4, 0): [(-3, 3)], (6, 0): 'X', (0, 1): 'X', (4, 2): 'X', (0, 4): [(4, 0)], (3, 4): [(3, -3)], (4, 4): [(1, 0), (-1, 1)], (1, 5): 'X', (3, 5): [(-1, -1)], (5, 5): 'X'} pieces = [[(-1, -1...