Python Forum
Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 19,582
» Latest member: Ismaelbourb
» Forum threads: 38,634
» Forum posts: 175,032

Full Statistics

Online Users
There are currently 363 online users.
» 1 Member(s) | 358 Guest(s)
Google, Baidu, Yandex, snippsat

Latest Threads
TimsothyNon
Forum: General Coding Help
Last Post: Ismaelbourb
1 hour ago
» Replies: 0
» Views: 8
How do select this table ...
Forum: Web Scraping & Web Development
Last Post: snippsat
1 hour ago
» Replies: 9
» Views: 343
Problème d'exécutable
Forum: General Coding Help
Last Post: Zauf
3 hours ago
» Replies: 0
» Views: 40
PRANK YOUR FRIENDS WITH T...
Forum: Code sharing
Last Post: shailesen
9 hours ago
» Replies: 3
» Views: 3,968
[split] Simple webbot for...
Forum: Code Review
Last Post: Plyth
Today, 04:55 AM
» Replies: 3
» Views: 106
Dynamic Module Import Err...
Forum: General Coding Help
Last Post: Pedroski55
Today, 12:07 AM
» Replies: 3
» Views: 161
What Are the Most Overloo...
Forum: News and Discussions
Last Post: Plyth
Yesterday, 03:37 AM
» Replies: 2
» Views: 131
Setting AST node lineno c...
Forum: General Coding Help
Last Post: deanhystad
Jun-18-2025, 09:15 PM
» Replies: 4
» Views: 249
Wish to write a code for ...
Forum: General Coding Help
Last Post: Hasan2025
Jun-18-2025, 06:40 AM
» Replies: 4
» Views: 999
I have a question
Forum: General Coding Help
Last Post: Pedroski55
Jun-18-2025, 04:47 AM
» Replies: 1
» Views: 115

 
  which namespace?
Posted by: Skaperen - May-27-2024, 04:03 AM - Forum: General Coding Help - Replies (4)

when i import function foo() from a module with 2 functions, foo() and bar():

from mymodule import foo
and foo() needs to c..... More

Print this item

  [closed] check whether an integer is 32 or 64 bits
Posted by: paul18fr - May-26-2024, 09:16 PM - Forum: General Coding Help - Replies (4)

Hi,

A basic question: how to check if the variable t1 is wheter a 32 bits integer or 64 one? Natively I've been thinking its a 32 bits but I've not..... More

Print this item

  Rotate with just one line
Posted by: MasterIphone - May-26-2024, 03:30 PM - Forum: GUI - Replies (5)

I'm not completely new to Python, but I'm faced with a difficult problem for me.
Previously I wrote parsers and file converters.
Now I need to work ..... More

Print this item

Shocked Script get's really weird error
Posted by: DaJohn - May-25-2024, 06:47 PM - Forum: General Coding Help - Replies (7)

Hello,
I am trying to write a Python script to ask the user for a recipe. The script should look up the ingredients needed for the recipe via OpenAI..... More

Print this item

  end boss aiming at player
Posted by: flash77 - May-25-2024, 06:06 PM - Forum: Game Development - Replies (7)

Hi,

I managed in my game that the end boss is aiming at the actual player's position with his gun.

I have a question about my class "EndBossGun(..... More


Attached Files

Thumbnail(s)
   
Print this item

  I am getting this TypeError: 'TreasureMap' object is not subscriptable.
Posted by: makilakos - May-25-2024, 09:36 AM - Forum: General Coding Help - Replies (2)

Thank you in advance
I am getting this TypeError: 'TreasureMap' object is not subscriptable.

This is my code
[python]i = 0
k = 0

class Treas..... More

Print this item

  is this really a syntax error?
Posted by: Skaperen - May-24-2024, 10:46 PM - Forum: General Coding Help - Replies (4)

if i run this from a file it works as expected. if i type the same code into interactive python, i get a syntax error. which is the mistake? is thi..... More

Print this item

  reading pdfs
Posted by: DPaul - May-24-2024, 05:21 PM - Forum: Bar - Replies (2)

I often get handed pdfs generated with an app like excel, or word.
If there are gridlines , separating rows and columns, these pdfs can be "OCR"red..... More

Print this item

  web scraping IMDb database
Posted by: guidoguidi - May-24-2024, 04:42 PM - Forum: Data Science - Replies (2)

I am trying to extract information from an IMDb webpage. In particular the names and the description of the 50 actors.
This is my code and the error t..... More

Print this item

  How to capture the result set from a stored procedure?
Posted by: dee - May-24-2024, 04:07 PM - Forum: General Coding Help - Replies (5)

Hello,
When I ran the following code, it got the message "No results. Previous SQL was not a query." How do I get the dataset returned from the stor..... More

Print this item

  how can I organise my code : best practice?
Posted by: pythonbum - May-24-2024, 03:17 PM - Forum: General Coding Help - No Replies

Hello
I have a long script I want to simplfy
Right now, i have main.py file which call lots of functions.
all my functions are defined in a [b]helper...... More

Print this item

  speed up getting embedding from bert model for large set of text
Posted by: veda - May-24-2024, 10:05 AM - Forum: General Coding Help - Replies (7)

Hi python experts,

I tried to get embedding from pre-trained language model with the function listed below. However, it took forever to execute if ..... More

Print this item

  what to return for an empty list
Posted by: Skaperen - May-24-2024, 03:37 AM - Forum: General Coding Help - Replies (2)

i have a function to test if multiple items all meet a certain condition. another function is to test if multiple items all fail to mee..... More

Print this item

  Unbalance Dataset - prediction model
Posted by: AlainProvist - May-24-2024, 12:06 AM - Forum: Data Science - No Replies

Hey everyone.

I am working on personal project that can change the face of the restaurant industry.

Let’s make it simple. Dataset of 63k rows, 7..... More


Attached Files

Thumbnail(s)
   
Print this item

  Look over this code
Posted by: dknobby7 - May-23-2024, 11:27 PM - Forum: General Coding Help - Replies (1)

Hey guys would anyone be able to look over this for a buddy of mine and see why this is not working. I’m not familiar with really any python.

From ..... More

Print this item

Question SOLVED: Using TTP to extract an unknow number of words from a line
Posted by: Calab - May-23-2024, 05:24 PM - Forum: Data Science - Replies (5)

I'm using Python v 3.10.11 and ttp v 0.9.5. I am trying to build a TTP template that can extract an unknown number of words from a line into a group...... More

Print this item

  remove duplicates from dicts with list values
Posted by: wardancer84 - May-23-2024, 02:46 PM - Forum: General Coding Help - Replies (27)

Hi,

i need to remove duplicates from dicts with list values, this weird structure comes from defaultdict btw...

example:

[python]

dict1 = ..... More

Print this item

  Help with cursor in terminal
Posted by: river251 - May-23-2024, 07:09 AM - Forum: General Coding Help - Replies (2)

I haven't been able to find a forum where this clearly belongs so I hope I will be redirected if this is a wrong place.

I'm trying to learn python...... More

Print this item

Information Is it possible to multi line a Basic Function Construct line statement? If so how?
Posted by: BrandonKastning - May-23-2024, 12:52 AM - Forum: General Coding Help - Replies (7)

Hey everyone!

Just learned how to properly pass variables while dropping globals as my Primary method of utilizing them.

My Monitor(s) are ancie..... More

Print this item

  matplotlib chart text font misery with 5x8 dot matrix
Posted by: Knabbler - May-22-2024, 11:57 PM - Forum: Data Science - Replies (6)

I can't get matplotlib to create my plots the way it needs to. This problem of font representation doesn't exist in Pillow.
After 40 hours of searchi..... More


Attached Files

.bmp   example-result.bmp (Size: 46.94 KB / Downloads: 2)
.bmp   regular-canvas.bmp (Size: 46.94 KB / Downloads: 2)
Print this item

  Invalid Date Format fo Cached Files
Posted by: jland47 - May-22-2024, 05:21 PM - Forum: General Coding Help - Replies (1)

In this python code I am attempting to extract files from a FTP folder and then search through them for an invoice#. I have the command window open w..... More


Attached Files

Thumbnail(s)
   
Print this item

  Do you know any cool services for learning?
Posted by: Cook3Aaron - May-22-2024, 06:16 AM - Forum: Bar - Replies (3)

Do you know any cool services for learning? It would be really cool to simplify my learning

Print this item

  Print the next 3 lines
Posted by: knob - May-22-2024, 05:01 AM - Forum: General Coding Help - Replies (3)

Once i enter in this loop, how could i print not only the current line, but the next 3 lines after the current line ?

[code]for line in work01:
..... More

Print this item

  maxsplit question
Posted by: tester_V - May-22-2024, 01:40 AM - Forum: General Coding Help - Replies (2)

Greetings!
I'm confused about the maxsplit.
Here is an example.
[python]
s = 'BKM0001-01-XLPM034NMS'
print(f"*** {s} ***")
dd = s.split('-',2)[..... More

Print this item

  argparser not showing all options
Posted by: bigal - May-22-2024, 12:58 AM - Forum: General Coding Help - Replies (1)

I have a python project with several command line (argparser) options which have been working. I went to modify the --scan arg to accept a integer and..... More

Print this item

  Adding image to program on programiz.com
Posted by: ebn852_pan - May-21-2024, 08:30 PM - Forum: Homework - Replies (1)

[code]
class Person:
name = " "
stat = " "

person1 = Person()
person1.name = "Ross Kagawa"

def battingaverage():
z = float(..... More

Print this item

  I can't for the life of me get this basic If statement code to work
Posted by: CandleType1a - May-21-2024, 01:28 PM - Forum: General Coding Help - Replies (8)

Hiya,

I just started learning Python yesterday, and in one of the videos I was watching, the person showed a very basic piece of code involving two..... More


Attached Files

Thumbnail(s)
   
Print this item

  Working with group of lines
Posted by: knob - May-21-2024, 03:29 AM - Forum: General Coding Help - Replies (1)

I have a file with hundred of lines. They are grouped similar to the example below.

What would be the best approach to move or copy the line that ..... More

Print this item

  How to run this triple integration in python
Posted by: Safinazsalem - May-20-2024, 09:43 AM - Forum: Homework - Replies (1)

When I run the following triple integral in python, it gives me an error:

[python] IntegrationWarning: The occurrence of roundoff error is detected..... More

Print this item

  Need to fix ValueError: Asking to pad but the tokenizer does not have a padding token
Posted by: alexanderDennisEnviro500 - May-20-2024, 08:07 AM - Forum: Data Science - No Replies

I want to fine tune a QnA HF model with the JSON file containing questions and answers, but I get aforementioned error.

Full code:
[python]
# htt..... More

Print this item

  AWS Boto3 - objects function
Posted by: PythonDialer - May-19-2024, 11:50 AM - Forum: General Coding Help - No Replies

Hi ,

I am using this code to display each key or file of AWS S3 bucket.

It is doing the job that I want. However, When I look at AWS Boto3 pack..... More

Print this item

  Can you explain the strings in Python
Posted by: ebn852_pan - May-19-2024, 02:02 AM - Forum: General Coding Help - Replies (3)

x = 2
x = str(x)
print("Years on the force is "  + x)
Years on the force is 2 #Casting. 2 is not string but a int. Python sees thi..... More

Print this item

  My first python game : Tic-Tac-Toe
Posted by: ForsakenDusk - May-19-2024, 01:39 AM - Forum: Game Development - Replies (7)

Hello everyone,

Here is my first python game : Tic-Tac-Toe.

I would like hints about code optimization.

[python]
#grid creation
grid = []
..... More

Print this item

  How returns behave in a function with multiple returns?
Posted by: khasbay - May-19-2024, 12:01 AM - Forum: General Coding Help - Replies (1)

The code below returns 8. Why does not it return 2 instead? I do not understand how return behaves in the code below. what is the rule? Thanks for ..... More

Print this item

  [split] collections.Counter()
Posted by: ebn852_pan - May-18-2024, 09:23 PM - Forum: Bar - Replies (2)

I get the idea. First I'd like to know how I can use or download JetBrains IDE? It keeps redirecting me to another online youtrack.jetbrains.com/sit..... More

Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  TimsothyNon 1 hour ago Ismaelbourb Ismaelbourb General Codin...
  How do select this table ... 1 hour ago MarkMan snippsat Web Scraping ...
  Problème d'exécutable 3 hours ago Zauf Zauf General Codin...
  PRANK YOUR FRIENDS WITH T... 9 hours ago Spyros_dev shailesen Code sharing
  [split] Simple webbot for... Today, 04:55 AB073 Plyth Code Review
  Dynamic Module Import Err... Today, 00:07 DaddyMAN Pedroski55 General Codin...
  What Are the Most Overloo... Yesterday, 03:37 shreyapatel Plyth News and Disc...
  Setting AST node lineno c... 06-18, 21:15 voidtrance deanhystad General Codin...
  Wish to write a code for ... 06-18, 06:40 Hasan2025 Hasan2025 General Codin...
  I have a question 06-18, 04:47 Clictithe Pedroski55 General Codin...
  How to produce a CPU load... 06-18, 02:19 Calab Plyth General Codin...
Most views
  The best Prog... 572270
  Tutorial Requ... 484757
  Web Scraping ... 436809
  Newbie with P... 379631
  Thread remain... 351217
Most reputation
buran 581
snippsat 507
Larz60+ 452
Gribouillis 362
deanhystad 327
Most replies
  New Users Int... 450
  [book] Variou... 188
  CKEditor / Ri... 100
  moving from t... 95
  Free keys and... 91
Top posters
Larz60+ 12067
buran 8173
snippsat 7338
deanhystad 6838
metulburr 5151
Top referrers
Googlepro 24
python 6
metulburr 6
NonEntity 5
as1221 3
Newest members
Ismaelbourb Today
Zauf Today
rupacodingclave Today
Langlais Today
ethan897 Today

User Panel Messages

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