Questions tagged [python]
Python is a dynamically typed, multi-purpose programming language. It is designed to be quick to learn, understand, and use, and enforces a clean and uniform syntax. Note that Python 2 reached end-of-life on January 1st, 2020. For version-specific Python questions, add the version tag (e.g. [python-3.x] or [python-3.9]). When using a Python variant (e.g. Jython, PyPy) or library (e.g. Pandas, NumPy), please include it in the tags.
python
2,202,527
questions
0
votes
0
answers
6
views
How to use parmap in a class?
import parmap
import multiprocessing
# in a class
class Main():
def __init__(self):
super().__init__()
self.setupUi(self)
self.initUI()
def initUI(self):
self....
0
votes
0
answers
8
views
python classification using stratified labelling list
I have a stratified labels for categorizing games. Ideally I planned to use a final level to train my model and then fill back the earlier levels.
a brief example of the setup
genre subgenre ...
0
votes
0
answers
4
views
Numpythonic way to fill value based on range indices reference (label encoding from given range indices)
I have this tensor dimension:
(batch_size, class_id, range_indices) -> (4, 3, 2)
int64
[[[1250 1302]
[1324 1374]
[1458 1572]]
[[1911 1955]
[1979 2028]
[2120 2224]]
[[2546 2599]
[2624 ...
0
votes
0
answers
8
views
symbol not found in flat namespace '_bcp_batch' in python 3.12.4
I'm using pyenv to manage my python versions.
When i use python 3.12.4 or python3.9^, i get this error:
File "src/pymssql/_pymssql.pyx", line 1, in init pymssql._pymssql
ImportError: dlopen(...
0
votes
0
answers
8
views
How to fetch rows within a date range and pivot them
I've a dataset of the form :
Now for each combination of id1 and id2, so suppose id1 = 1 and id2 = 2, for each date value, i want to pick value from rows that lie within 1 week prior and 1 week post ...
0
votes
0
answers
4
views
compress yolov8 object detection model (.pt file)
I've tried compressing my .pt file using pruning, quantization, and various other methods, but these attempts have doubled the file size 20mb file becomes 40mb. If anyone has any ideas on how to ...
0
votes
0
answers
5
views
Conda Virtual Environment Display Issue in Terminal Prompt ~ZSH
I'm experiencing a display issue with my Conda virtual environment in the terminal . The environment name that is rendered strangely on the right side of each line is not correct i expect to show base ...
0
votes
0
answers
17
views
How can I add a keyword argument with a default value when setting up argparse in Python?
I have a function that sets what arguments can be passed to a command line when calling on a function, using argparse:
def parse_arguments(args):
parser = argparse.ArgumentParser(usage=...
0
votes
0
answers
3
views
COMET ERROR: Unable to verify Comet API key at this time
#@title Select YOLOv5 🚀 logger {run: 'auto'}
logger = 'Comet' #@param ['Comet', 'ClearML', 'TensorBoard']
if logger == 'Comet':
%pip install -q comet_ml
import comet_ml; comet_ml.init()
elif logger ==...
0
votes
0
answers
9
views
How to create linked service in Azure data factory for on premise Rest API
I have an on premise API which is only accessible within private network. I have to create a linked service of this API for a client. For testing purpose I created a simple flask API in python running ...
0
votes
0
answers
9
views
Intel MKL ERROR: Parameter 6 was incorrect on entry to SGELSY. RuntimeError: false INTERNAL ASSERT FAILED
Environment:
CPU: AMD r5 5600h
Memory: 16G
GPU: rtx3050
Python: 3.9.19
Pytorch: 2.2.2
Numpy: 1.24.3
Errors:
Intel MKL ERROR: Parameter 6 was incorrect on entry to SGELSY.
Intel MKL ERROR: Parameter 6 ...
0
votes
1
answer
18
views
Can't we import 'pyautogui' into google colaboratory?
I'm new to python and I have some issues importing a few modules on google colaboratory which include gui.
After giving the command :
!pip install pyautogui,
colab installs it without any error but ...
0
votes
0
answers
12
views
How to send authentication session id to django backend using fetch api?
saveBtn.addEventListener('click', function() {
const csrftoken = getCookie('csrftoken');
fetch('http://localhost:8000/card/{{ auction.slug }}/add/', {
method: 'GET',
...
1
vote
0
answers
8
views
Universal Kriging Accuracy with Strain Field
I am attempting to interpolate the normal strain results in the wall type structure (dimensions:800x500 mm) while having approximately 150 scattered known points in the whole element
Sensor Layout
I ...
0
votes
0
answers
16
views
Can't get file because logged in is not kept
I'm encountering the same situation which is described in this page How to requests.Session().get if website does not keep me logged in? with another website:
Trying to download an executable on this ...