Копируем публчиный ключ на сервер:
ssh-copy-id server
Добавляем ключ в authorizedkeys, чтобы не вводить пароль:
import datetime | |
import os | |
import time | |
while True: | |
print(str(datetime.datetime.now()).split(' ')[1].split('.')[0]) | |
print(bin(int(str(datetime.datetime.now()).split(' ')[1].split('.')[0].split(':')[0])).split('b')[1].replace('1', '●').replace('0', '○'), end=':') | |
print(bin(int(str(datetime.datetime.now()).split(' ')[1].split('.')[0].split(':')[1])).split('b')[1].replace('1', '●').replace('0', '○'), end=':') | |
print(bin(int(str(datetime.datetime.now()).split(' ')[1].split('.')[0].split(':')[2])).split('b')[1].replace('1', '●').replace('0', '○')) |
import bs4 as bs | |
import requests | |
URL = 'http://www.cbr.ru/scripts/XML_daily.asp?date_req=' | |
def get_rate(code: str, date: str = '') -> float: | |
date = reversed(date.split('-')) | |
date = '/'.join(str(x) for x in date) |
import aiohttp | |
import asyncio | |
import requests | |
import time | |
async def aio(): | |
URL = 'https://cleanuri.com/api/v1/shorten' | |
links = ['https://artlin.codeberg.page/contacts.html'] * 10 |
#!/usr/bin/bash | |
ADMIN_USER=arthur | |
echo Bot Name | |
read name | |
useradd -s /bin/bash $name | |
mkdir /home/$name |
# import uvicorn | |
if __name__ == "__main__": | |
uvicorn.run("main:app", host="0.0.0.0", port=8000, log_level="info") |
import pprint | |
import requests | |
from bs4 import BeautifulSoup as bs | |
URL = 'https://freelance.habr.com/tasks' | |
categorie = '?categories=development_bots' | |
resp = requests.get(URL+categorie) |
[Unit] | |
Description=Rebind my keyboard via kbct | |
[Service] | |
Type=simple | |
ExecStart=sudo kbct remap --config /home/arthur/.config/kbct.yaml | |
Restart=always | |
[Install] | |
WantedBy=default.target |
#!/bin/sh | |
session_name='project' | |
path=~/work/project | |
pg=project_db | |
set -euC | |
cd $path | |
att() { |
import time | |
def random(): | |
getTime = time.time() | |
randInt = getTime % 1 | |
randInt = str(randInt) |