Requested runtime (python-3.8.2) is not available for this stack (heroku-20).
┌───────────────┐ ┌───────────────┐
│ │ MQTT │ │
│ esp8266 └─────────────────────► server │
│ ◄─────────────────────┐ │
└───────────────┘ └───────────────┘
~/.local/share/remmina
users_list
ты его нигде не используешь. Зачем тогда он в коде?for user in users:
id = user[0]
username = user[1]
user_id = user[2]
number = user[3]
subscription = user[4]
admi = user[5]
blocked = user[6]
ban = user[7]
как правильнее записать, чтобы вывести все с тегами html
users = [
('Vasya', '12345', 'vasya@mail.ru'),
('Petr', '7654', 'Petr@mail.ru'),
('Irina', '142340385', 'irina@mail.ru'),
('Solomon', '981234125', 'solomon@mail.ru'),
]
with_markup = ' '.join(map(lambda x: f'name: {x[0]}\nid: {x[1]}\nemail: {x[2]}', users))
print(with_markup)
http {
server {
listen 80;
client_max_body_size 4G;
server_name example.com;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_redirect off;
proxy_buffering off;
proxy_pass http://uvicorn;
}
location /static {
# path for static files
root /path/to/app/static;
}
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream uvicorn {
server 127.0.0.1:8000;
}
}
Как реализовать это в веб?
То есть нужно сделать так, чтобы когда один менеджер открыл карту, она стала недоступна для второго.
А когда закрыл - доступна.
locked BOOLEAN
locked_user_id BIGINT
locked_at TIMESTAMP
git clone https://github.com/alphacep/vosk-api
cd vosk-api/python/example
wget https://alphacephei.com/kaldi/models/vosk-model-small-en-us-0.15.zip
unzip vosk-model-small-en-us-0.15.zip
mv vosk-model-small-en-us-0.15 model
python3 ./test_simple.py test.wav
#!/usr/bin/env python3
from vosk import Model, KaldiRecognizer, SetLogLevel
import sys
import os
import wave
import subprocess
SetLogLevel(0)
if not os.path.exists("model"):
print ("Please download the model from https://alphacephei.com/vosk/models and unpack as 'model' in the current folder.")
exit (1)
sample_rate=16000
model = Model("model")
rec = KaldiRecognizer(model, sample_rate)
process = subprocess.Popen(['ffmpeg', '-loglevel', 'quiet', '-i',
sys.argv[1],
'-ar', str(sample_rate) , '-ac', '1', '-f', 's16le', '-'],
stdout=subprocess.PIPE)
while True:
data = process.stdout.read(4000)
if len(data) == 0:
break
if rec.AcceptWaveform(data):
print(rec.Result())
else:
print(rec.PartialResult())
print(rec.FinalResult())
import logging
logging.basicConfig(filename='example.log', encoding='utf-8', level=logging.DEBUG)
logging.debug('This message should go to the log file')
logging.info('So should this')
logging.warning('And this, too')
logging.error('And non-ASCII stuff, too, like Øresund and Malmö')
def get_names(num_items):
name_list = list()
for item in range(num_items):
name_list.append(input('Введите имя с заглавной буквы'))
return name_list
def get_quantity():
return int(input('Сколько имен надо ввести?'))
if __name__ == '__main__':
for name in get_names(get_quantity()):
if name.startswith('А'):
print('Имя', name, 'Начинается с буквы А')
document.querySelector("button").onclick = myClick;
function myClick(){
let a = document.querySelector(".input-test");
document.querySelector(".out").innerHTML = a.value;
a.value = "";
}
-map
Документацияffmpeg -i video.mkv -map 0:0 -map 0:3 video.mp4
relation "blog_userprofile" does not exist
message.from_user
{
"id":5786161XX,
"is_bot":false,
"first_name":"Andrew",
"username":"D.",
"last_name":"None",
"language_code":"en",
"can_join_groups":"None",
"can_read_all_group_messages":"None",
"supports_inline_queries":"None"
}
reply_to_message
@bot.message_handler(func=lambda message: True, content_types=['text'])
def command_default(m):
if m.reply_to_message:
pass
Add python 3.X to PATH
.