pairs = [([0, -2], -1), ([4, 7, 10, 11, 12, 17], 9), ([4, 7, 10, 11, 12, 17], 8)]
def nearest_value(values, one: int) -> int:
result = sorted(values, key=newabs)
return result[0]
for pair in pairs:
invalues, inone = pair
def newabs(_x, _one = inone):
return abs(_x - _one), _x
print(nearest_value(invalues, inone))
import time
pausesec = 60
while True:
вызов модуля прокси с параметрами и выводом в тхт.
time.sleep(pausesec)
git push origin :master
надо именно с двоеточием?To https://github.com/phaggi/Abay.git
! [remote rejected] master (refusing to delete the current branch: refs/heads/master)
error: failed to push some refs to 'https://github.com/phaggi/Abay.git'
error: src refspec master does not match any.
git checkout -b master
выдает ошибку fatal: A branch named 'master' already exists.
MacBook-Pro-full:Abay phaggi$ git push origin :master
Username for 'https://github.com': phaggi
Password for 'https://phaggi@github.com':
To https://github.com/phaggi/Abay.git
! [remote rejected] master (refusing to delete the current branch: refs/heads/master)
error: failed to push some refs to 'https://github.com/phaggi/Abay.git'