python-3.x Questions

4

Solved

I am doing Python development in Raspberry Pi. I have installed VS Code in my laptop and have installed the ssh extension. Using this I can easily connect to Raspberry Pi. While I am connected I ca...
Antitank asked 16/8, 2022 at 17:33

3

I´m using Mac OS el capitán and I am trying to follow the quick start tutorial for OpenNMT pytorch version. In the training step I get the following warning message: OpenNMT-py/onmt/modules/Global...
Thickhead asked 27/2, 2018 at 10:45

3

Is it possible to exclude the contents of footers and headers of a page from a pdf file during extracting the text from it. As these contents are least important and almost redundant. Note: For ex...
Gismo asked 27/8, 2018 at 12:53

3

I have conda 4.8.1 running on windows 10 enterprise edition and it is showing me following error whenever I try to install notebook. InvalidArchiveError("Error with archive D:\\Miniconda3\\pkgs\\n...
Compress asked 9/1, 2020 at 4:35

2

Solved

I want to name the test dynamically during run-time when i run them with the @pytest.mark.parametrize("value",values_list) fixture. for example: values_list=['apple','tomatoes','potatoes'] @pytes...
Dmitri asked 20/4, 2020 at 8:10

4

Here's my code: import pytesseract import cv2 from PIL import Image pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files (x86)\Tesseract-OCR\tesseract.exe" def main(): original = cv2.imr...
Sunken asked 4/1, 2019 at 22:38

2

I am trying to add depedency from git to poetry using SSH ( I am not interested in HTTPS version). The but I get an error whether I use poetry add... poetry add git+ssh://[email protected]:myo...
Apocalyptic asked 30/1, 2022 at 11:26

2

I am trying to implement bag of word model from kaggle site with a twitter sentiments data which has around 1M raw. I already clean it but in last part when I applied my features vectors and sentim...
Lustring asked 26/4, 2017 at 17:9

8

I get the following error: Traceback (most recent call last): File "C:/Users/aaaa/Desktop/ttttttt.py", line 5, in <module> import reload File "C:\Users\aaa\AppData\Local\Programs\Python\P...
Lammergeier asked 21/7, 2017 at 3:16

2

I am using this Function def closest_colour(requested_colour): min_colours = {} for key, name in webcolors.css3_hex_to_names.items(): r_c, g_c, b_c = webcolors.hex_to_rgb(key) rd = (r_c - reque...
Gallia asked 3/2, 2022 at 7:8

2

Solved

Suppose I have the following (in Python 3 and SQLAlchemy): class Book(Base): id = Column(Integer, primary_key=True) chapters = relationship("Chapter", backref="book") class Chapter(Base): id =...
Patrimony asked 14/8, 2015 at 18:46

4

Solved

When using Regex in Python, it's easy to use brackets to represent a range of characters a-z, but this doesn't seem to be working for other languages, like Arabic: import re pattern = '[ي-ا]' p = ...
Incipient asked 29/12, 2014 at 9:1

4

Solved

As the self guide says, I've installed it with (conda environment) conda install -c conda-forge spacy python -m spacy download en_core_web_trf I have spacy-transformers already installed. But when...
Undry asked 1/10, 2021 at 13:32

6

With my code, I want to get the last two digits of an integer. But when I make x a positive number, it will take the first x digits, if it is a negative number, it will remove the first x digits. ...
Lilian asked 15/1, 2017 at 18:37

2

Solved

import robloxapi async def grouprank(userId, rankName): # omitted rank-name to role id mapping rankId = dic[rankName] client = robloxapi.Client(cookie=NOT_STUPID_ENOUGH_TO_DISCLOSE) grp = awai...
Edo asked 21/5, 2023 at 2:52

2

Solved

I'm writing some software in Python3 intended to take a backup of a directory structure on a Windows client, and send it to a Linux server. The problem I'm having is how to deal with Windows and L...
Niklaus asked 1/1, 2019 at 18:3

6

Solved

I already checked python version on my environment (sublime text) and it is 3.11.0, the latest, I checked pillow version which is 10.0.0, the latest, and my code looks similar to other examples onl...
Frediafredie asked 4/9, 2023 at 13:27

3

Solved

Today I installed the new Python 3.12 on my Ubuntu 22.04 from the ppa repository ppa:deadsnakes/ppa. Everything works, but when I try to install some library with the command python3.12 -m pi...
Underskirt asked 5/10, 2023 at 16:10

23

I'm trying to use pdf2image and it seems I need something called poppler : (sum_env) C:\Users\antoi\Documents\Programming\projects\summarizer>python ocr.py -i fr13_idf.pdf Traceback (most recent...
Manutius asked 26/11, 2018 at 12:25

3

I installed coverage gutter extension for visual studio code but is not showing the line coverage, when I press Coverage Gutter display coverage or press the "watch" option in the footer it says "C...

3

Solved

I have the following pydantic model which contains a result typed as Union[int,float] as listed below. from typing import Union from pydantic import BaseModel class Calculation(BaseModel): arg1...
Hebrews asked 17/12, 2021 at 22:45

4

Solved

I have to turn in an assignment, and I'm extremely concerned that, since the single TA has many projects to run, it will be called using python, which will call python 2.7, when the program is writ...
Permanence asked 2/4, 2014 at 22:38

4

Solved

How to extract the decimal number part from a float (float64) in a dataframe? (a very common scenario but I can 't find a solution in StackOverFlow) Note: be careful with the 196.09, I need 09, not...
Tamathatamaulipas asked 1/8, 2018 at 16:39

6

Solved

The problem: Implement a Python function called stripComments(code) where code is a parameter that takes a string containing the Python code. The function stripComments() returns the code with all ...
Auspicious asked 9/2, 2015 at 1:35

8

Solved

I am using Ubuntu on VirtualBox. How do I add pyinstaller to the PATH? The issue is when I say pyinstaller file.py it says pyinstaller command not found It says it installed correctly, and ac...
Sexcentenary asked 16/12, 2018 at 1:21

© 2022 - 2024 — McMap. All rights reserved.