Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Multiprocessing: Threads work well. Processes don't work.
Post: RE: Multiprocessing: Threads work well. Processes ...

Code works. Here with added timing and max_workers=8(use 8 cores). Then it should be easier to see if it work,and run from command line not any editors when this out. import concurrent.futures import...
snippsat General Coding Help 6 390 Yesterday, 09:05 PM
    Thread: Advent of code 2023
Post: Advent of code 2023

This year Advent of Code 🎄 Get harder as days pass bye,click on [Events] there all since 2015. So the first days each years are more beginner friendly. Can also look at something like CheckiO 🎈 where...
snippsat News and Discussions 0 180 Dec-01-2023, 04:13 PM
    Thread: Scraping hex codes
Post: RE: Scraping hex codes

If they have same class name will get all find_all(class_='athenaProductVariations_colorSwatchInner') Right click on selcet tag Copy -> Copy selector . Then in BS can use select or select_one to ge...
snippsat Web Scraping & Web Development 1 145 Nov-30-2023, 07:31 PM
    Thread: Need help with a code.
Post: RE: Need help with a code.

Can try like this. I think there most be a better way than duplicate which make i kind of messy. import pandas as pd pd.set_option('display.expand_frame_repr', False) import re def expand_duplicates(...
snippsat General Coding Help 5 318 Nov-30-2023, 04:33 PM
    Thread: Need help with a code.
Post: RE: Need help with a code.

Try something like this. import pandas as pd pd.set_option('display.expand_frame_repr', False) def expand_duplicates(df): expanded_rows = [] for link in df['link'].unique(): link_df =...
snippsat General Coding Help 5 318 Nov-29-2023, 09:37 PM
    Thread: Need help with a code.
Post: RE: Need help with a code.

Post a sample of the .csv file.
snippsat General Coding Help 5 318 Nov-29-2023, 07:54 PM
    Thread: Trying to scrape data from HTML with no identifiers
Post: RE: Trying to scrape data from HTML with no identi...

The HTML do not show content of tag over,which have to parse to get Entry1 and Entry2. Iterates over the contents of the div element and checks if each content is a NavigableString which mean text nod...
snippsat Web Scraping & Web Development 2 275 Nov-29-2023, 04:27 PM
    Thread: how to avoid deprecation notice
Post: RE: how to avoid deprecation notice

import warnings warnings.filterwarnings("ignore", category=DeprecationWarning)If not work use pip install shutup import shutup shutup.please()I guess there is reason that still use Python 3.6,or shoul...
snippsat General Coding Help 5 348 Nov-27-2023, 09:24 PM
    Thread: pip stops waiting for python
Post: RE: pip stops waiting for python

Possible can python.exe be block bye a firewall. Usually when install first time will a GUI window will pop-up and ask if will allow python.exe. Type wf.msc and look at rules. If have own security sof...
snippsat General Coding Help 6 464 Nov-27-2023, 04:35 PM
    Thread: Rsa Cipher
Post: RE: Rsa Cipher

The method text_to_numeric_binary_blocks,this padding might not be correctly handled during decryption. The ljust method pads with zeros,which can alter the actual value of the data when converted bac...
snippsat General Coding Help 3 296 Nov-27-2023, 12:30 PM
    Thread: pip stops waiting for python
Post: RE: pip stops waiting for python

Do this,make a virtual environment and see if that work. I use cmder he, but commands are just the same in cmd. # Make C:\code λ python -m venv test_env # Cd in C:\code λ cd test_env\ # Activate C:...
snippsat General Coding Help 6 464 Nov-27-2023, 10:44 AM
    Thread: pip stops waiting for python
Post: RE: pip stops waiting for python

pip.exe is waiting for another process python.exe to finish. This can happen if python.exe is currently running or using a file that pip needs to access. Try to do this in cmd see if something change...
snippsat General Coding Help 6 464 Nov-26-2023, 07:10 PM
    Thread: Rsa Cipher
Post: RE: Rsa Cipher

(Nov-26-2023, 12:16 PM)Paragoon2 Wrote: I would like it to work for block_size=10, but the length must be lower_limit = 10 ** 11,upper_limit = 10 ** 12Why most you have that lower limit? If you want...
snippsat General Coding Help 3 296 Nov-26-2023, 03:48 PM
    Thread: Can't Find Python (or Something)
Post: RE: Can't Find Python (or Something)

(Nov-26-2023, 02:23 AM)pklind Wrote: I have verified with the command python3 --version that Python exists as it returns 'Python 3.12.0'Then all is ok. Python is not pre-installed on Mac automatical...
snippsat General Coding Help 2 269 Nov-26-2023, 11:11 AM
    Thread: TypeError: 'NoneType' object is not subscriptable
Post: RE: TypeError: 'NoneType' object is not subscripta...

This part ([\w .]) only matches a single character. It should be ([\w .]*) to match the full name part after the comma. import re def rearrange_name(name): result = re.search(r"^([\w .]*), ([\w ....
snippsat General Coding Help 4 347 Nov-24-2023, 05:41 PM
    Thread: KeyError while retrieving ESPN data
Post: RE: KeyError while retrieving ESPN data

issues if look ar code so was it made 5-6 month ago, the API may have changed and author has not update it. Look for other eg ESPN API, Using ESPN's new Fantasy API (v3).
snippsat General Coding Help 2 259 Nov-21-2023, 09:20 PM
    Thread: Unexpected output
Post: RE: Unexpected output

Use Code tags. When you have uploaded a file in Colab,then you do this to read it in Pandas. import pandas as pd df = pd.read_csv('data.csv') df
snippsat General Coding Help 2 225 Nov-21-2023, 12:57 PM
    Thread: problem in matching in regex
Post: RE: problem in matching in regex

The regex is not at all right for this task,as you use regex101 on right side it will explain what the regex is doing. import re test_str = "These books are good.\nThe weather is nice.\nwhere are you...
snippsat General Coding Help 1 204 Nov-21-2023, 09:31 AM
    Thread: time difference bettwenn logs
Post: RE: time difference bettwenn logs

(Nov-20-2023, 09:25 AM)enkliy Wrote: So any help would be great. I have tried with pandas but that not possible...You should show what you have tried,can do it Pandas but also there has parse the st...
snippsat General Coding Help 14 466 Nov-20-2023, 10:32 AM
    Thread: Basic Coding Question: Exit Program Command?
Post: RE: Basic Coding Question: Exit Program Command?

(Nov-19-2023, 04:05 PM)RockBlok Wrote: Could anyone provide feedback on the preferred way to terminate a program?It's a little vague question,i would say that preferred way is to think about a nice ...
snippsat General Coding Help 3 250 Nov-19-2023, 05:36 PM

User Panel Messages

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