Questions tagged [Python] (11616)

0
answer

Python telegram bot || Can help with the bot, parser?

Hi I need help . I recently wrote a parser bot on Tg and I faced this problem ` When the script parses the newsfeed and sends them to the Tg of the boat , then sent only the text of the news , without reference to the the post where all is written in detail . Utah can fix the problem ? I just tried many times and nothing ca...
london.Quigley asked April 19th 20 at 12:49
2
answers

How to implement in python the transfer of "pointer" opencv image to the constructor of another class?

Hello. How to implement in Python such a scheme? p.s Now the transfer of the option (img) in the constructor of class A is not by reference, by value, and when you call the painter no image, because is not stored in the img link class A: def __init__(self, img): self.img = img def show(self): cv2.imshow(self.img) cv2.w...
kayli_Ku asked April 19th 20 at 12:47
1
answer

How to make a screenshot of this window the selected process?

Hi. Need to somehow get a screenshot of this window the selected process. Let's say we have a process called test that has a window. Need to do a screenshot of this window and retain it, in what ways can we achieve this?
Stephon_Funk17 asked April 19th 20 at 12:47
2
answers

How to get the image from the message Vk?

I want to implement a feature that people send photos in a PM, and I could get it (download it or the url etc) How it can be implemented via Long Poll vk_api?
wallace_Collins21 asked April 19th 20 at 12:46
1
answer

How the tree should be trained on this input data?

Remote exam in Machine learning, it is necessary to write an algorithm decision tree for the following dataset: x = [] for i in range(500): x.append([round(-2+50*random()), round(-2+50*random())]) x = np.array(x) y = round(random()+ x[1, :] + x[2, :] ) As using these data, I train a tree? Is it possible that Y is someth...
agustina_Larson asked April 19th 20 at 12:46
1
answer

Error Python: what's the problem?

Can't understand why it gives an error on the last line: class Address: def __init__(self, street, city, state, zipcode): self.street = street self.city = city self.state = state self.zipcode = zipcode def get_street(self, street): return self.street def get_city(self, city): return self.city def get_state(sel...
Helena.Huds asked April 19th 20 at 12:46
1
answer

How to move a string in python?

How to transfer a string inline_keyboard_markup def message_cb(bot, event): bot.send_text(chat_id=event.from_chat, text="Hello with buttons.", inline_keyboard_markup="{}".format(json.dumps([[ {"text": "Action 1", "callbackData": "call_back_id_1", "style": "attention"}, {"text": "Action 2", "callbackData": "call_back_id_2...
beverly51 asked April 19th 20 at 12:46
2
answers

How to make a bot in conversation VK replied to different messages?

How to make a bot replied to different messages on the same question? Example: - Who am I - Cat-astronaut - Who am I Dog on earth
Uriah35 asked April 19th 20 at 12:45
3
answers

Telethon is not working on pythonanywhere?

I want to make a request via telethon host on pythonanywhere. I have an error: Traceback (most recent call last): File "/home/me/text.py", line 13, in client.start() File "/home/me/.local/lib/python3.7/site-packages/telethon/client/auth.py", line 132, in start else self.loop.run_until_complete(coro) Traceback (most rec...
Gladyce.Stracke asked April 19th 20 at 12:45
1
answer

Parsing Yandex.Market, the problem with the change of page?

Hi! I need a large list of AsRock, the source decided to take Yandex.Market. Faced with a ban + a very strange thing, after 7 pages inclusive issued for 33 cards goods, although in the settings it is still "Show 48". When switching to 7 page and further does not change the Page parameter for the page, thus in a file .csv co...
ron_Kilba asked April 19th 20 at 12:44