33 questions from the last 1 days
0
votes
0
answers
5
views
How to reverse-engineer an undocumented proprietary Raman spectroscopy binary file format (.jws)?
I’m working with several Raman spectroscopy data files that use a proprietary binary format with the extension .jws. The original software that could read these files is no longer available, and there ...
-5
votes
0
answers
39
views
Unexpected regex behavior [closed]
re.search(
r"(\d{1,4}[^\d:]{1,2}\d{1,4}[^\d:]{1,2}\d{1,4} | \w{3,10}.{,6}\d{4})",
'abc2024-07-08'
)
Why does this regex extract the second pattern, "abc2024", not "...
-5
votes
0
answers
40
views
How should I approach my CSV cleaning project for my OCBC bank statements? [closed]
I am new to programming, and I am trying to start a project on cleaning my CSV file into different formats that I want. How should I go about doing that, and what resources can I use to do it?
1
vote
2
answers
35
views
How can I update a text name on a label on Tkinter:
I want that when I upload a file, the label changes its name to file name to filename name.
#File class
class File:
def __init__(self):
self.filename = None
def getFile(self):
...
1
vote
0
answers
39
views
Why are rows returned as stale when fetching TimeSeries data with multiple sequential queries on the same RowSet?
I’m using GridDB Cloud with the Python client (griddb_python) and found a reproducible issue where executing multiple sequential queries on a TimeSeries container causes the second query to return ...
2
votes
1
answer
51
views
Why does a nearest join_asof() return exact matches despite allow_exact_matches=False?
I am looking for the nearest non exact match on the dates column:
import polars as pl
df = pl.from_repr("""
┌─────┬────────────┐
│ uid ┆ dates │
│ --- ┆ --- │
│ i64 ┆ date ...
-3
votes
0
answers
36
views
What are the best ways to enhance the Python code of a Scrapy spider? [closed]
I want to enhance the following Python code so that it can print the transcript completely, and without extra spaces.
def parse_item(self, response):
# Getting the article box that ...
Advice
0
votes
0
replies
13
views
How do I list all tags for a Docker image in a private registry using existing Docker CLI credentials
Similar to How can I list all tags for a Docker image on a remote registry? but I am asking specifically how to do it using existing Docker credentials (i.e. I already did docker login private.repo)
...
Best practices
1
vote
1
replies
23
views
How can I save a local file using tkinter with filedialog.askopenfilename
How can I treat a file when the client imports a local file as a variable and using it later?
def getFile():
return filedialog.askopenfilename()
from operation.encryption import getFile
...
-2
votes
0
answers
36
views
What is the recommended way to extend Python modules with custom functionality without modifying source code? [closed]
I maintain a large scientific Python application that uses several third-party modules like PyQtGraph (for plotting) and PyMeasure (for instrument control). I frequently need to add small custom ...
0
votes
0
answers
29
views
How can I classify sitemap URLs (WooCommerce / OpenCart / custom ) [closed]
I'm working on a crawler in Python that takes an e-commerce sitemap and
classifies each URL into a page type, for example:
home
product
product_category
product_tag
brand
post
static_page
...
Advice
0
votes
1
replies
41
views
Django: Separate session expiry times for "normal" website and admin area
It would be nice if there were an easy way to define separate session expiry time for the admin area of a django website. So, admin users could log themselves into the "normal" website (seen ...
1
vote
1
answer
34
views
OpenAI deep research API structured output
Using o3-deep-research, I need strictly structured JSON for a research report with fixed keys and nested values. The keys are set, value structures are set, but ideally the LLM would be able to choose ...
Advice
1
vote
3
replies
44
views
Python library recommendation for the implementation of a neural network modification algorithm
I want to implement in python some algorithms from a paper that allow for a pre-trained neural network to be modified (adding or removing neurons or layers) conserving (theoretically) the outputs of ...
-3
votes
0
answers
24
views
Why does VS Code sometimes say "trust this notebook" [duplicate]
I'm new to coding. I'm in VS Code, working with geopandas, leaflet, etc. I'm using the .explore() method to show interactive maps. Sometimes, after I run the .explore() method, the output tells me I ...
-3
votes
0
answers
36
views
How to store and match user-selected words with their different forms across texts? [closed]
I want to build a program where a user can input any text they want to study.
While reading, the user can select certain words. Each selected word should be stored in a dictionary or list.
Later, when ...
Advice
0
votes
6
replies
77
views
How to import an editable package?
I've installed a package from a cloned repository, in "editable" mode (pip install -e .). I can't import the package in a script in the virtual environment where the package in installed (...