Quantcast
Channel: Active questions tagged python - Stack Overflow
Browsing all 23160 articles
Browse latest View live
↧

Parse string with specific characters if they exist using regex

I have text containing assorted transactions that I'm trying to parse using regex.Text looks like this:JT Meta Platforms, Inc. - Class ACommon Stock (META) [ST]S (partial) 02/08/2024 03/05/2024 $1,001...

View Article


How to handle switching between windows (GUIs) in Python Tkinter?

Please help to resolve the issue in my Tkinter code… Actually, I want to switch between to widows (multiple times from window1 to window2 and backforht). I am using Python Tkinter gui library.Problem...

View Article


Using matplotlib pcolormesh, how can I stop the drawn tiles from one row to...

I have individual x arrays for each intensity (Z) array. Which means that the intensity rows will not be stacked on top of each other. I do not want the tiles to "tilt" so they are connected to the row...

View Article

How to hide Python class method outside the class (and I don't mean "double...

I'm trying to hide a class method if the class is used from outside. I have afunction A that does something and function B that uses A to do something else. E.g.:class Some_Class: def funcA(): do...

View Article

Mapping a numpy matrix to a matrix of character strings

I have digital matrix consisting of 0s and 1s. Example:p=[[1 0 0 1 0] [0 0 0 0 0] ... [1 1 1 1 1] [0 0 0 1 1]]The rows of this numpy matrix signify time separated measurements of 5 element bursts of...

View Article


'AdminSiteTests' object has no attribute 'user' Django unit tests

I can't seem to figure out why my unit test is failing for the followingTraceback (most recent call last): File "/app/core/tests/test_admin.py", line 26, in test_users_listed self.assertContains(res,...

View Article

python cannot import names from my own files

I have the following code from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_cors import CORS app = Flask(__name__) CORS(app) app.config["SQLALCHEMY_DATABASE_URI"] =...

View Article

Image may be NSFW.
Clik here to view.

Draw a Maze with PySide6

I have a binary file like this :0 S 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 1 1 1 0 1 1 1 1 1 0 0 1 0 1 0 0 0 1 1 1 1 1 1 1 1 1 0 1 0 1 1 0 0 1 0 1 1 1 0 1 0 1 1 1 0 0 1 1 1 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 1 1 1...

View Article


xlwt cannot parse formula xlwt.Formula("SUM(R[-110]C:R[-1]C)")

I am trying to add the above mentioned formula to my script and get a parsing error, if I remove the xlwt.formula bit and replace with an = then excel doesn't read the it as a formula and just prints...

View Article


I'm Having Difficulty Connecting to Birdeye.so Crypto API

I’ve been trying (unsuccessfully) on connecting to the birdeye.so API to my DNN (coded in Python). I have the standard plan and I've been using the updated APIs since their move away from public APIs...

View Article

How to run LLM from transformers library under Windows without GPU?

I have no GPU but I can run openbuddy-llama3-8b-v21.1-8k from ollama. It works with speed of ~1 t/s.But it doesn't work when I try the following code:from transformers import ( AutoModelForCausalLM,...

View Article

Image may be NSFW.
Clik here to view.

JSONDecodeError : Extra data: line 1 column 5 (char4) when using an API &...

When i use the SVD Stability.apiAPI there is an error shown to me which is like this in Django, the API i used is this https://platform.stability.ai/docs/api-reference#tag/Image-to-Videothis is my...

View Article

Can't run pyautogui on ubuntu

i want to use Pyautogui and Keyboard module at the same time (Using Python), but i can't do that. i have installed Keyboard module and Pyautogui module too, but when i try to run Pyautogui via root i...

View Article


Multithreading in Python not working correctly with Raspberry Pi

I'm using a Raspberry Pi 4B and a development kit which contains sensors and sends the data via BLE.The project consists of a Raspberry Pi working as an Edge device where it reads sensor data via BLE,...

View Article

Why does a requests.get(...) call hang

The following simple python script that uses requests.get to execute a GET request does not return on my computer:import...

View Article


Why is map function not effective?

I am not struck or anything, but I feel this weird. Below is the code snippet I have worked on:from hashClass import HashTablea = HashTable(11)input_value = list((54,26,93,17,77,31,44,55,20))map(lambda...

View Article

Unable to connect to Oracle db via thick mode through dbt

I am unable to connect to oracle database using dbt.It keeps using thin mode and throws DPY-3015 error however I want it to use thick mode. I am using windows machine.I have OCI libraries installed and...

View Article


This program doesn't print the price, it just ends without printin anything...

from selenium import webdriverfrom selenium.webdriver.common.by import Byfrom selenium.webdriver.support.ui import WebDriverWaitfrom selenium.webdriver.support import expected_conditions as ECdriver =...

View Article

Package installed from test.pypi.org is not the same folder structure as was...

I created a package and uploaded it to test.pypi.org: https://test.pypi.org/project/name-generator-nicomp/0.0.2/The logic reads a text file that I want to include in the package. In my initial design I...

View Article

fsolve solver not converging to desired solutions

I try to find points on the surface of an ellipsoid that are also within a conical frustum.The ellipsoid and frustum are centred at ce and cf, respectively.The ellipsoid has semi-axes lengths defined...

View Article
Browsing all 23160 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>