И у Вас, и у отправителя средств должен быть расширенный статус VK Pay. Чтобы получить его, нужно указать данные паспорта и ещё одного документа на выбор — ИНН или СНИЛС. Это требование 115-ФЗ для всех банков и электронных кошельков. Все сведения передаются напрямую в ЕСИА (Единую систему идентификации и аутентификации) и защищены законом 152-ФЗ «О персональных данных».
создавать класс, а потом его запускать
client = MyClient()
client.run('token')
сделать одиночный запрос, мне нужно в апишке получить id всех пользователей канала
Как в 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"
}
]
products = {
'00000234': {'value1': 0, 'value2': 23},
'567333': {'value1': 5, 'value2': 23},
'23234243': {'value1': 25, 'value2': 23},
}
products = {product_id: values for product_id, values in products.items() if values['value1']}
print(products)
# {'567333': {'value1': 5, 'value2': 23}, '23234243': {'value1': 25, 'value2': 23}}
import yaml
config = yaml.safe_load(open("path/to/config.yml"))
# config.json
{
"mysql":{
"host":"localhost",
"user":"root",
"passwd":"my secret password",
"db":"write-math"
},
"other":{
"preprocessing_queue":[
"preprocessing.scale_and_center",
"preprocessing.dot_reduction",
"preprocessing.connect_lines"
],
"use_anonymous":true
}
}
import json
with open('config.json') as json_data_file:
data = json.load(json_data_file)
print(data)
process = subprocess.Popen(['ping', '-c 4', 'python.org'],
stdout=subprocess.PIPE,
universal_newlines=True)
while True:
output = process.stdout.readline()
print(output.strip())
# Do something else
return_code = process.poll()
if return_code is not None:
print('RETURN CODE', return_code)
# Process has finished, read rest of the output
for output in process.stdout.readlines():
print(output.strip())
break
Чтоб при введении первых букв предлагались варианты городов (как на сайте)
from google_images_search import GoogleImagesSearch
# if you don't enter api key and cx, the package will try to search
# them from environment variables GCS_DEVELOPER_KEY and GCS_CX
gis = GoogleImagesSearch('your_dev_api_key', 'your_project_cx')
# example: GoogleImagesSearch('ABcDeFGhiJKLmnopqweRty5asdfghGfdSaS4abC', '012345678987654321012:abcde_fghij')
#define search params:
_search_params = {
'q': '...',
'num': 1-50,
'safe': 'high|medium|off',
'fileType': 'jpg|gif|png',
'imgType': 'clipart|face|lineart|news|photo',
'imgSize': 'huge|icon|large|medium|small|xlarge|xxlarge',
'imgDominantColor': 'black|blue|brown|gray|green|pink|purple|teal|white|yellow'
}
# this will only search for images:
gis.search(search_params=_search_params)
# this will search and download:
gis.search(search_params=_search_params, path_to_dir='/path/')
# this will search, download and resize:
gis.search(search_params=_search_params, path_to_dir='/path/', width=500, height=500)
# search first, then download and resize afterwards
gis.search(search_params=_search_params)
for image in gis.results():
image.download('/path/')
image.resize(500, 500)
SSL module is not available
The problem is that Anaconda Python ships with its own SSL libraries and does not use the system SSL libraries when compiling the Python ssl module. The mod_ssl module in Apache is using the system libraries.
<--------->
The only solution is to use the system Python version and not Anaconda Python
Unless you have a specific requirement, is better to use the system Python version and not Anaconda Python.