Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Hide CMD call window
Post: RE: Hide CMD call window

When i test your code no cmd window pop up. This correct and normal behavior,what are you using to schedule code every hour? If you run code from command line python arp_code.py,dos still cmd window p...
snippsat General Coding Help 8 222 Apr-15-2024, 08:31 PM
    Thread: Seeking advice on dask distributed
Post: RE: Seeking advice on dask distributed

(Apr-13-2024, 09:36 PM)sawtooth500 Wrote: I've never used dask before, but my understanding is that each function needs to be passed a dask dataframe. I could convert the pandas dataframe to a dask ...
snippsat General Coding Help 4 236 Apr-15-2024, 11:17 AM
    Thread: Stuck on installing PyQt5-tools
Post: RE: Stuck on installing PyQt5-tools

I tried with Python 3.12 and it did work. So may not ready for Python 3.12 yet,if try 3.11 it works. Also could use pyqt6-tools now. # Make environment with Python 3.11 G:\div_code λ py -3.11 -m venv ...
snippsat General Coding Help 1 217 Apr-11-2024, 03:40 PM
    Thread: please help
Post: RE: please help

Can also use Polars to speed things up. So for 1-GB file .csv Pandas use ca 13.5 seconds versus 350 milliseconds in Polars. In pandas your could be like this. Then if this is slow use Polars or and ...
snippsat General Coding Help 6 323 Apr-10-2024, 10:54 AM
    Thread: Advice needed on how to approach this problem...
Post: RE: Advice needed on how to approach this problem....

(Apr-04-2024, 02:37 AM)sawtooth500 Wrote: How can I code this more efficiently? There has to be a better way..You should post code of have done do,our least as sample of the stock dataset input and ...
snippsat General Coding Help 1 244 Apr-06-2024, 01:55 PM
    Thread: argparse io issue
Post: RE: argparse io issue

(Apr-02-2024, 10:24 AM)pyDream Wrote: So this part not only defines how the script would read a dictionary, but also how it will write to the console, correct? Just to be clear.No,the error happens ...
snippsat General Coding Help 8 594 Apr-02-2024, 12:01 PM
    Thread: argparse io issue
Post: RE: argparse io issue

(Apr-01-2024, 11:22 AM)pyDream Wrote: So I'm really curious on how you understood what the <frozen codecs>In newer version of Python the have frozen codecs.py into pyt...
snippsat General Coding Help 8 594 Apr-01-2024, 12:03 PM
    Thread: os.popen problem
Post: RE: os.popen problem

Use subprocess and advise run() function for all use cases it can handle. import subprocess result = subprocess.run(['ipconfig'], encoding='utf-8', capture_output=True) print(result.stdout)No force i...
snippsat General Coding Help 1 164 Mar-31-2024, 04:24 PM
    Thread: Cesar Cipher
Post: RE: Cesar Cipher

Some tips and as example print both with and without spaces. Also range(len(chain_to_code)) is not good here,just remember that range(len(sequence)) is almost always a bad way. So just iterate over ...
snippsat General Coding Help 5 424 Mar-31-2024, 11:59 AM
    Thread: PyYAML read list of int
Post: RE: PyYAML read list of int

If i run your code i don't get week: [[12, 13]]. import yaml with open("config.yaml", encoding='utf8') as f: cfg = yaml.load(f, Loader=yaml.FullLoader)Test. >>> cfg {'name': 'John Doe', ...
snippsat General Coding Help 2 279 Mar-30-2024, 10:34 AM
    Thread: argparse io issue
Post: RE: argparse io issue

(Mar-29-2024, 07:55 PM)pyDream Wrote: But I'm still curious how a novice like me could debug this issue on their own. Could I have used a debugger to step through the library function? Or what other...
snippsat General Coding Help 8 594 Mar-29-2024, 10:06 PM
    Thread: Not getting forum emails
Post: RE: Not getting forum emails

There is a problem with internal mail(Amazon SES) they requires newer than TLS 1.0 version,tried to fix it but no solution yet. Need to upgrade Forum and underlay stuff like OS(to old),so i may need t...
snippsat Board 2 191 Mar-27-2024, 06:51 PM
    Thread: argparse io issue
Post: RE: argparse io issue

The lsdreader dos not work later version of Python. It's made a long time ago and the Python 3 compatibility they added is not testet good enough on Windows. To make it work download Python 3.9(do not...
snippsat General Coding Help 8 594 Mar-27-2024, 06:04 PM
    Thread: Help needed with img scraping script
Post: RE: Help needed with img scraping script

You most your code,can not guess on website/your code look like.
snippsat Web Scraping & Web Development 1 222 Mar-26-2024, 08:45 PM
    Thread: Coding Improvement
Post: RE: Coding Improvement

(Mar-26-2024, 03:57 PM)MoreMoney Wrote: Thank you for your help, but i have question i just need 6 atm digit for my homework should i decrase the range for faster completion time, or they dont make ...
snippsat Homework 6 581 Mar-26-2024, 05:58 PM
    Thread: [Numpy] How to store different data type in one numpy array?
Post: RE: [Numpy] How to store different data type in on...

As deanhystad posted more info may be needed. paul18fr good effort,but would say that look wrong in most cases. The TypeArray dos not work(eg try with a wrong date) and repeat data unnecessary. (Mar...
snippsat Data Science 7 545 Mar-26-2024, 02:18 PM
    Thread: [Numpy] How to store different data type in one numpy array?
Post: RE: [Numpy] How to store different data type in on...

It's one array if add it like this. >>> n = np.array([('2024-03-22', 71.0, 'ceh'), ('2024-03-23', 63.0, 'abc')], dtype= [('date', 'datetime64[D]'), ('value', 'float64'), ('code', 'U3')]) >...
snippsat Data Science 7 545 Mar-25-2024, 11:11 AM
    Thread: Coding Improvement
Post: RE: Coding Improvement

(Mar-24-2024, 10:45 AM)MoreMoney Wrote: Thanks it's work but i'm open for improvement is it possible to increase the completion time even small amount? How to do it?There are many ways algorithms ca...
snippsat Homework 6 581 Mar-24-2024, 11:49 PM
    Thread: [Numpy] How to store different data type in one numpy array?
Post: RE: [Numpy] How to store different data type in on...

Example like this. >>> import numpy as np >>> >>> dtype = [('date', 'datetime64[D]'), ('value', 'float64'), ('code', 'U3')] >>> n = np.array([('2024-03-22', 71.0, '...
snippsat Data Science 7 545 Mar-24-2024, 11:25 AM
    Thread: OSError occurs in Linux.
Post: RE: OSError occurs in Linux.

(Mar-23-2024, 08:25 PM)anna17 Wrote: In Linux, OSError occurs. What bug occurs in Linux in the code below?Code will not work on Linux,like C:\subpro.exe is a Path that only work on Windows. Path in ...
snippsat General Coding Help 2 276 Mar-23-2024, 10:00 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020