python Questions

4

I'm using the very latest Ubuntu 21.04 for aarch64. In order to experiment with gRPC, I installed grpc stuff: python3 -m pip install grpc python3 -m pip install grpcio-tools I also tried: pip3 ins...
Thunderstruck asked 5/8, 2021 at 18:40

4

Solved

import asyncio from threading import Thread from datetime import datetime from aiogram import Bot, Dispatcher, executor, types API_TOKEN = '' bot = Bot(token=API_TOKEN) dp = Dispatcher(bot) chat...
Photoplay asked 27/12, 2019 at 14:46

2

I am having trouble accessing my USB camera using OpenCV with python. I get the following error message which I understand means no frame was captured? error: OpenCV(3.4.1) C:\Miniconda3\conda-bld\...
Scrutiny asked 17/7, 2020 at 17:29

3

I'm writing a Python program that is basically the Snipping Tool. I'd like to be able to run my program, select the area for my screenshot using my mouse to click and drag, and then have the progra...
Coralline asked 18/4, 2018 at 14:10

3

I want to create .exe file from .py. If I run .py file it works well and I have no problem with it. But when I run .exe file created by pyinstaller I can not input(type) anything in command line. ...
Masuria asked 23/10, 2019 at 13:9

4

Solved

I'm using PyTorch to implement a classification network for skeleton-based action recognition. The model consists of three convolutional layers and two fully connected layers. This base model gave ...
Borneo asked 12/8, 2019 at 8:26

4

From reading the pandas documentation, and a good question and answer (What does axis in pandas mean?), I had expected axis=0 to always mean with respect to columns. This works for me when I work w...
Sleeper asked 31/3, 2018 at 11:23

3

This is a follow up question on applying background color to a dataframe based on condition I am able to apply style based on the below: f = lambda v: 'background-color: %s' % 'green' if v=='col' e...
Tillio asked 7/6, 2021 at 9:21

4

Solved

QIIME requests this (here) regarding the fasta files it receives as input: The file is a FASTA file, with sequences in the single line format. That is, sequences are not broken up into multiple li...
Cheryllches asked 11/6, 2014 at 7:1

4

Solved

How do I obtain the number of rows of a ParquetDataset that is structured in the form of a folder containing multiple parquet files. I tried from pyarrow.parquet import ParquetDataset a = Parquet...
Swarey asked 1/4, 2020 at 0:39

3

Solved

I wanted to display an image from a NumPy array, but I got this error: Traceback (most recent call last): File "E:/wittos/python/SVM/witti svm/arraytoimage.py", line 14, in <module> imag...
Outstanding asked 29/12, 2018 at 12:18

5

I am new to Streamlit. I want to make a multiple-choice user input (checkboxes). But I want to select a maximum of 3 options out of 4 options. I have tried with the dropdown feature of multiselect....
Whelm asked 20/3, 2021 at 4:24

3

Solved

I have a set of PGP Self Decrypting Archive .exe files (https://knowledge.broadcom.com/external/article/153684/creating-a-self-decrypting-archive-with.html) (on a Windows system) and have the passw...
Nyeman asked 16/5, 2023 at 23:3

2

Solved

I develop telegram bot using python-telegram-bot. Despite the usage of MessageQueue (just as mentioned in the docs) I keep getting telegram.error.RetryAfter: Flood control exceeded. Retry in N seco...
Lollygag asked 19/7, 2018 at 12:48

2

Solved

I am looking for the best solution for communication between async tasks and methods/functions that run in a thread pool executor from concurrent.futures. In previous synchronous projects, I would ...
Headstall asked 8/1, 2020 at 16:38

3

Solved

I would like to df.drop_duplicates() based off a subset, but also ignore if a column has a specific value. For example... v1 v2 v3 ID 148 8751704.0 G dog 123 9082007.0 G dog 123 9082007.0 G...
Davao asked 30/3, 2020 at 9:56

2

I am developing a simple Telegram chat bot using python-telegram-bot library. My bot is currently using the ConversationHandler to keep track of the state of the conversation. I want to make the c...
Nondisjunction asked 21/3, 2020 at 1:19

1

I want to use multiprocessing module with sqlAlchemy in my custom class. Here is the code: from sqlalchemy import create_engine engine = create_engine(f'mysql+pymysql://a:b@localhost:3306/', serv...
Pennyweight asked 20/9, 2019 at 6:33

2

Solved

I have a data frame for example df = pd.DataFrame([(np.nan, .32), (.01, np.nan), (np.nan, np.nan), (.21, .18)], columns=['A', 'B']) A B 0 NaN 0.32 1 0.01 NaN 2 NaN NaN 3 0.21 0.18 And I want to ...
Studied asked 15/1, 2021 at 5:38

6

Solved

I am trying to use pythons selenium for Microsoft edge but I keep getting this error: WebDriverException: Message: unknown error: cannot find Microsoft Edge binary I downloaded the latest version...

7

Solved

How do I do this without string.count(), because it is listed as deprecated in Python v2.7.3 documentation? I am unable to find what I should use instead. EDIT: The question originally stated tha...
Dasilva asked 30/4, 2012 at 15:4

4

Solved

I am creating code that requires the program to time how long it runs for and then displays the time. It basically needs a timer that runs in the background and I can call upon it to display how lo...
Fictitious asked 20/6, 2013 at 10:22

4

im very new to sqlite, im using macbook m1, im try to use jupyter notebook to do sql here is my code %load_ext sql import csv, sqlite3 con = sqlite3.connect("socioeconomic.db") cur = co...
Balboa asked 1/4, 2023 at 21:7

3

Solved

I have been trying to use the scikit-learn library to solve this problem. Roughly: from sklearn.preprocessing import PolynomialFeatures from sklearn.linear_model import LinearRegression # Make or ...

2

Solved

I am trying to use the alive_progress alive_bar on PyCharm but it only appears in the console once the whole process has finished. Instead, I want it to display and progress as the for loop operate...
Cloud asked 3/3, 2022 at 2:35

© 2022 - 2024 — McMap. All rights reserved.