создавать класс, а потом его запускать
client = MyClient()
client.run('token')
сделать одиночный запрос, мне нужно в апишке получить id всех пользователей канала
Как пробросить папку из контейнера в локальну папку?
-v /root/test:/root/test удаляет файлы внутри контейнера
сервис, в которому можно скормить адрес, а он бы выдавал широту и долготу
# Пример для подсказок по адресам
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Token 8c5d6b2cc555ea8eeee27d71a95c6cf48a7d55b2" \
-d '{ "query": "москва хабар", "count": 10 }' \
https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/address
data.geo_lat Координаты: широта
data.geo_lon Координаты: долгота
Как в linux-mint установить python3?
После установки по этой схеме
слетел cinnamon
make install
вместо make altinstall
.~ apt policy python3.8
python3.8:
Candidate: 3.8.0-3~18.04
Version table:
3.8.0-3~18.04 500
500 http://mirrors.nic.funet.fi/ubuntu bionic-updates/universe amd64 Packages
~ apt policy python3.7
python3.7:
Candidate: 3.7.5-2~18.04
Version table:
3.7.5-2~18.04 500
500 http://mirrors.nic.funet.fi/ubuntu bionic-updates/universe amd64 Packages
3.7.3-2~18.04.1 500
500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages
3.7.0~b3-1 500
500 http://mirrors.nic.funet.fi/ubuntu bionic/universe amd64 Packages
sudo apt install python3.7
или
sudo apt install python3.8
Системно стоит 2.17.17
Не могу понять как именно это реализовать
Deep linking
Telegram bots have a deep linking mechanism, that allows for passing additional parameters to the bot on startup. It could be a command that launches the bot — or an auth token to connect the user's Telegram account to their account on some external service.
Each bot has a link that opens a conversation with it in Telegram — https://telegram.me/. You can add the parameters start or startgroup to this link, with values up to 64 characters long. For example:
https://telegram.me/triviabot?startgroup=test
import json
input_json = """
[
{
"title":"Мобильный Телефон Xiaomi Redmi Note 8 (6+128Gb) Global IND",
"cost":"13.000 сом",
"link":"www.gadget.kg/catalog/telefony/xiaomi/3337"
},
{
"title":"Смарт Часы женские Bakeey H8",
"cost":"1.800 сом",
"link":"www.gadget.kg/catalog/gadzhety/smart-chasy-braslet..."
},
{
"title":"Смарт-часы Samsung Galaxy Watch R800 46mm",
"cost":"15.000 сом",
"link":"www.gadget.kg/catalog/gadzhety/smart-chasy-braslet..."
},
{
"title":"Смарт-часы Samsung Galaxy Watch R810 42mm",
"cost":"14.700 сом",
"link":"www.gadget.kg/catalog/gadzhety/smart-chasy-braslet..."
}
]
"""
input_dict = json.loads(input_json)
search_term = 'samsung'
output_dict = [x for x in input_dict if search_term in x['title'].lower()]
output_json = json.dumps(output_dict, indent=4, sort_keys=True, ensure_ascii=False)
print(output_json)
[
{
"cost": "15.000 сом",
"link": "www.gadget.kg/catalog/gadzhety/smart-chasy-braslet...",
"title": "Смарт-часы Samsung Galaxy Watch R800 46mm"
},
{
"cost": "14.700 сом",
"link": "www.gadget.kg/catalog/gadzhety/smart-chasy-braslet...",
"title": "Смарт-часы Samsung Galaxy Watch R810 42mm"
}
]
ssacli ctrl slot=1 pd all show detail
Smart Array G6 controllers (rev 01)
lspci -k|grep -i -A2 raid
food_session = request.session.get('food', None)
if food_session:
pass
if request.session.get('food', None):
pass
https://api.qiwi.com/partner/bill/v1/bills/<тут_billId>
Есть две сети интернет от разных провайдеров подключённые кабелями через роутеры. Подскажите как заставить любую программу общаться с интернетом только через одну сеть, именно через Сеть №2
route add [HOST] MASK 255.255.255.255 [GATEWAYIP]
route add [NET] MASK [NETMASK] [GATEWAYIP]