Skip to content

Instantly share code, notes, and snippets.

View andriiburka's full-sized avatar
☑️
Nope

Andrii Burka andriiburka

☑️
Nope
View GitHub Profile
@andriiburka
andriiburka / mfi.sh
Created January 12, 2023 09:57 — forked from TechnologistAU/mfi.sh
mFi Installation Script for Raspberry Pi
#!/bin/bash
################################################################################
#
# This script automates the installation of the mFi controller software on the
# Raspberry Pi.
#
# http://www.technologist.site/ubnt
#
################################################################################
//Homework 2 - "Pet shop tasks"
protocol FeedProtocol {
func feeding()
}
protocol JailProtocol {
func needsCage()
}
def presents_for_all_nearby(cmd):
global presents, good_kids_left
possible_moves = ['up', 'down', 'left', 'right']
if cmd == 'up':
possible_moves.remove('down')
elif cmd == 'down':
possible_moves.remove('up')
elif cmd == 'left':
possible_moves.remove('right')
from _collections import deque
import math
inp_raw = input().split()
operator = ["*", "+", "-", "/"]
evaluate_list = deque()
result = 0
for el in inp_raw:
result = 0
from _collections import deque
my_list = input().split()
print(my_list)
operator = ["*", "+", "-", "/"]
evaluate_list = deque()
result = 0
for el in my_list:
if el not in operator:
from _collections import deque
inp_raw = input().split()
operator = ["*", "+", "-", "/"]
evaluate_list = deque()
result = 0
for el in inp_raw:
result = 0
if el not in operator:
current_digit = int(el)
from collections import deque
from operator import add, sub, mul, truediv
from math import floor
expression = deque(input().split())
math_ops = {"+": add, "-": sub, "*": mul, "/": truediv}
tmp, output = deque([]), []
while expression:
x = expression.popleft()
@andriiburka
andriiburka / 02. Easter Bunny.py
Created June 16, 2020 11:40
02. Easter Bunny - 87/100
n = int(input())
matrix = [input().split() for _ in range(n)]
start_position = tuple((r, c) for r in range(n) for c in range(n) if matrix[r][c] == 'B')
row, col = start_position[0][0], start_position[0][1]
possible_directions = {
'up': [[], []],
'down': [[], []],
'left': [[], []],
'right': [[], []]}
# int output 75/100
reversed_li = "".join(list(input().split('|')[::-1])).replace(' ', '')
print(*[int(i) for i in reversed_li])
# Преработено с помоща на Дилиана Джо
user_input = reversed(input().split("|"))
matrix = [li.split() for li in user_input]
print(" ".join(num for li in matrix for num in li))
rows, cols = list(map(int, input().split()))
matrix = [input().split() for i in range(rows)]
indices = []
for li in range(len(matrix)):
for i, char in enumerate(matrix[li]):
if len(matrix[li]) == cols:
if i == cols-1:
continue
elif matrix[li][i] == matrix[li][i+1]: