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,470
» Latest member: ishaD
» Forum threads: 38,578
» Forum posts: 174,808

Full Statistics

Online Users
There are currently 718 online users.
» 0 Member(s) | 710 Guest(s)
Bing, Google, Yandex, Facebook, Baidu

Latest Threads
class Blockage not projec...
Forum: General Coding Help
Last Post: deanhystad
May-15-2025, 04:32 PM
» Replies: 1
» Views: 192
Import vs from x import
Forum: General Coding Help
Last Post: snippsat
May-15-2025, 04:09 PM
» Replies: 1
» Views: 144
Trouble with Average Calc...
Forum: General Coding Help
Last Post: Pate
May-15-2025, 07:38 AM
» Replies: 4
» Views: 1,327
tracking version during r...
Forum: News and Discussions
Last Post: Skaperen
May-15-2025, 12:25 AM
» Replies: 0
» Views: 112
Return a string or byte o...
Forum: General Coding Help
Last Post: snippsat
May-14-2025, 05:21 PM
» Replies: 5
» Views: 392
problems with netcdf if I...
Forum: General Coding Help
Last Post: Blaubart
May-14-2025, 04:02 PM
» Replies: 16
» Views: 1,196
Retired and Learning Pyth...
Forum: Code sharing
Last Post: BarbaraGonzalez
May-14-2025, 09:04 AM
» Replies: 1
» Views: 367
Pip help
Forum: General Coding Help
Last Post: Larz60+
May-14-2025, 05:57 AM
» Replies: 4
» Views: 436
Paste text with caret alr...
Forum: General Coding Help
Last Post: armorerratic
May-14-2025, 01:12 AM
» Replies: 2
» Views: 994
Library Management System
Forum: Homework
Last Post: deanhystad
May-13-2025, 01:56 AM
» Replies: 1
» Views: 244

 
  Calculate AGE in years
Posted by: Kessie1971 - Apr-24-2023, 07:31 AM - Forum: Homework - Replies (17)

Hello

I want to try to calculate the age in years but in de output i get 1 day instead of 1 year

[python]from datetime import datetime, date
..... More

Print this item

  Chinook Database in Python (Albun Top 10)
Posted by: Kessie1971 - Apr-23-2023, 11:28 AM - Forum: Homework - Replies (10)

How do I make a python program that prints an album top 10 of the albums that have been listened to most often from the Chinook database. The output o..... More


Attached Files

Thumbnail(s)
   
Print this item

  Making a Class Person ?
Posted by: Kessie1971 - Apr-23-2023, 11:14 AM - Forum: Homework - Replies (3)

How do I create a Person class is a generic class, which only stores some basic attributes. These attributes are: name, sex and date of birth (as a da..... More

Print this item

  create a function format_date ?
Posted by: Kessie1971 - Apr-23-2023, 11:10 AM - Forum: Homework - Replies (7)

how do I create a function format_date() which takes a date string as an argument and returns a datetime object.

Example
Print (format_date(“24-1..... More

Print this item

  [SOLVED] [Windows] Fails reading strings with accents
Posted by: Winfried - Apr-23-2023, 10:22 AM - Forum: General Coding Help - Replies (1)

Hello,

On Windows, I'm trying to read a file that has accents. An hexdump shows that it's encoded in Latin1/ISO-8859-1, not UTF-8.

For some reas..... More

Print this item

  create a default path with idle to a specific directory
Posted by: greybill - Apr-23-2023, 04:32 AM - Forum: General Coding Help - No Replies

Currently when I save a python program I have to go through a path to the directory I want. How can I create a default preference for a path that wil..... More

Print this item

  Dictionary Problem
Posted by: Chief816 - Apr-23-2023, 01:31 AM - Forum: Homework - Replies (4)

I'm trying to write a program that keeps a running total of a "customer's" total as they input items off a menu, which in this case happens to be my d..... More

Print this item

  Print names in x-axis of a time-series values
Posted by: hobbyist - Apr-22-2023, 03:01 PM - Forum: General Coding Help - Replies (4)

Hello, I have a .csv that has 2 columns. The first column contains timestamps and the second column CO2 measurements. What I want to do is to plot the..... More

Print this item

  Beginner, problem with CS50 vanity plates problem
Posted by: Chief816 - Apr-22-2023, 05:04 AM - Forum: Homework - Replies (3)

I am brand new to coding in general, and have recently started taking up python courses. For one assignment, the task is to create a program which det..... More

Print this item

  Help on Monte Carlo Simulation of temperature relaxation of He-Ar mixture
Posted by: jorvz - Apr-21-2023, 04:57 PM - Forum: Data Science - Replies (1)

Hey, so i`ve been working on this code for a while for my research but it just doesn't seem to work well, i think it is misscalculating in some step, ..... More

Print this item

  Non repetitive mouse click
Posted by: Sartre - Apr-21-2023, 04:12 PM - Forum: General Coding Help - Replies (5)

I am writing a game bot as part of my learning process. The code I am writing requires a single mouse click to be performed at the start of the code b..... More

Print this item

Question UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in position 562: ord
Posted by: ctrldan - Apr-21-2023, 03:58 PM - Forum: General Coding Help - Replies (23)

I admit that I'm not an expert of python, I'm working in a python version 2.6.6 (for compatibility with command like unicode). I explain why I use thi..... More

Print this item

  Socks 5 Proxy Server For UDP ASSOCIATE
Posted by: ankit - Apr-21-2023, 12:18 PM - Forum: Networking - Replies (2)

I want Help in Developing Socks5 Based Proxy Server For TCP and UDP Support.
I am able to build it for TCP but facing issue for UDP....

Print this item

  How do I get a slug from a url?
Posted by: Stas43 - Apr-21-2023, 10:56 AM - Forum: Web Scraping & Web Development - Replies (3)

How do I get a slug from a url?
Example:... com/page1/
In my case - page1 is a slug and I want to get it in a template for different operations

Print this item

  Why Pip is not listed in the official Global Python Module index?
Posted by: quazirfan - Apr-21-2023, 06:13 AM - Forum: General Coding Help - Replies (2)

Pip comes built in with Python. That's why I was surprised to see pip not listed in the global module index[1] on official Python documentation.

Why ..... More

Print this item

  Using a String var as URL in Requests.get( )
Posted by: DBB - Apr-20-2023, 11:50 PM - Forum: General Coding Help - Replies (3)

New to python so forgive me...

I have an external .csv file containing several lines, each one of which is a fully formed URL, having user n..... More

Print this item

  quiz game - problem with loading statements from file
Posted by: lapiduch - Apr-20-2023, 01:20 PM - Forum: Homework - Replies (2)

Hello, I'm trying to create a simple myth/fact quiz using tkinter. The game should be for two players - the player who presses the key first (the red ..... More


Attached Files

.txt   fakt_mytus.txt (Size: 340 bytes / Downloads: 192)
.py   1_kolo_anj.py (Size: 2.69 KB / Downloads: 237)
Print this item

  Interfacing from Python to GUI
Posted by: HMartins - Apr-20-2023, 10:26 AM - Forum: General Coding Help - Replies (7)

Hi.

I have written some Python code and is works OK. I now need to, say, interface it better with the user, myself Wink

I got QT Designer a..... More

Print this item

  Working with Machine Learning accelerators
Posted by: hobbyist - Apr-19-2023, 08:38 PM - Forum: Bar - Replies (1)

Can I run Ubuntu on this: https://tinker-board.asus.com/product/ti...dge-r.html and execute python scripts? Like Machine Learning code? Has anyone ..... More

Print this item

  ValueError - Formatting issue when values enter thousands
Posted by: phillyfa - Apr-19-2023, 08:37 PM - Forum: General Coding Help - Replies (4)

I am using the following code to retrieve costs from an Azure subscription. The 'Cost (USD)' data is returning a ValueError when the cost is in the t..... More

Print this item

  code problems
Posted by: bbm007 - Apr-19-2023, 08:27 PM - Forum: General Coding Help - Replies (5)

I have been having problems making a quadratic calculator I'm almost there but the formula at the end is an error and I can't seem to fix it help woul..... More

Print this item

  Nan values after merging 2 dataframes
Posted by: EmBeck87 - Apr-19-2023, 02:01 PM - Forum: General Coding Help - Replies (1)

Hello, I have two pandas dataframes that merged correctly using the "left on = " ", right on =" " method, but after the merge, some of my values in on..... More

Print this item

  I keep getting the same error over and over again.
Posted by: SuchUmami - Apr-19-2023, 12:00 PM - Forum: General Coding Help - Replies (11)

Hello. I am trying to write a trading algorithm for kraken's crypto exchange. I keep getting an error where it says "result"; here is an example:

I..... More

Print this item

  How to set up uwsgi and nginx?
Posted by: Stas43 - Apr-19-2023, 11:10 AM - Forum: Web Scraping & Web Development - Replies (2)

(sorry for the Google translator)

os Ubuntu 20.04 lts server x64

What is done:
mkdir django & cd django
. env/bin/activate
test project djang..... More

Print this item

  Converting timestamp like 2023-04-18T20:00:10.000Z to 20230418200010
Posted by: bigcat - Apr-19-2023, 08:16 AM - Forum: General Coding Help - Replies (2)

Hi,

how to convert a timestamp like 2023-04-18T20:00:10.000Z to 20230418200010 ?

Thanks in advance,
Regards,
Den.

Print this item

  ctypes
Posted by: juliolop - Apr-18-2023, 08:31 PM - Forum: General Coding Help - Replies (7)

how can I declare using ctypes where my DLL file is located.?

this line gives me an error
OSError: [WinError 193] %1 is not a valid Win32 applicat..... More

Print this item

  Adding MIDI Channels to each Input
Posted by: zach1234 - Apr-18-2023, 06:38 PM - Forum: General Coding Help - Replies (6)

Hi Guys, apologies as i am a complete beginner.

I downloaded this python script to map my midi controller to Ableton Live. I am having a problem w..... More


Attached Files

.zip   MixTrack_Quad.zip (Size: 39.29 KB / Downloads: 311)
Print this item

  Print confusion matrix
Posted by: MrSonoa - Apr-18-2023, 03:53 PM - Forum: General Coding Help - Replies (1)

hi, I have tried my best to output the confusion matrix. but it didn't work either. I don't know what coding can produce the output for the confusion ..... More


Attached Files

Thumbnail(s)
   
Print this item

  Unexpected output from df.loc when indexing by label
Posted by: idratherbecoding - Apr-18-2023, 01:57 AM - Forum: General Coding Help - Replies (6)

I am back again with another pandas question. I am getting some unexpected output from df.loc. As part of a larger project, I broke my problem out int..... More

Print this item

  Turtle Detection
Posted by: ChinaPlaneFlyer - Apr-17-2023, 02:22 PM - Forum: General Coding Help - Replies (1)

Hi! I'm a new member here on the forum. I was trying to make a turtle tag game and I was trying to find if the first turtle, p1, is touching the secon..... More

Print this item

  Trouble with threading and reading variable from a different script
Posted by: Lembas - Apr-17-2023, 01:59 PM - Forum: General Coding Help - Replies (14)

Hi.
As a learning exercise I decided to write a simple pixel bot for a game. It consists of 3 modules that I would like to run at the same time:
Walk..... More

Print this item

  which is faster?
Posted by: Skaperen - Apr-17-2023, 12:11 AM - Forum: News and Discussions - Replies (5)

which is faster when arg1 is None?

code 1:

def fun1(arg1,arg2):
    if arg1 is None:
        return None
    . . .
code..... More

Print this item

  '' FTP '' File upload with a specified string and rename
Posted by: midomarc - Apr-17-2023, 12:05 AM - Forum: General Coding Help - Replies (1)

Transfer a file in Local folder to a folder in FTP server and rename

I need to upload a file start with a specified string (0001) to an FTP..... More

Print this item

  ESPNow on Andriod Python
Posted by: xytsrm - Apr-16-2023, 07:08 PM - Forum: Networking - Replies (2)

Is anyone aware of an Android Python package created to interact with the ESPNow peer-to-peer networking protocol used on Espressif devices?

Thanks..... More

Print this item

Sad Help solving an exercise?
Posted by: darioco - Apr-16-2023, 06:49 PM - Forum: Homework - Replies (3)

hey all,
I'm struggling in solving an exercise of my python introduction course. I leave the problem in the attachments. I'm really at the beginning ..... More


Attached Files

Thumbnail(s)
   
Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  class Blockage not projec... 05-15, 16:32 Azdaghost deanhystad General Codin...
  Import vs from x import 05-15, 16:09 Calab snippsat General Codin...
  Trouble with Average Calc... 05-15, 07:38 autodecay Pate General Codin...
  tracking version during r... 05-15, 00:25 Skaperen Skaperen News and Disc...
  Return a string or byte o... 05-14, 17:21 Calab snippsat General Codin...
  problems with netcdf if I... 05-14, 16:02 Blaubart Blaubart General Codin...
  Retired and Learning Pyth... 05-14, 09:04 breacsealgaire BarbaraGonzalez Code sharing
  Pip help 05-14, 05:57 meditek Larz60+ General Codin...
  Paste text with caret alr... 05-14, 01:12 Wehaveall armorerratic General Codin...
  Library Management System 05-13, 01:56 annajoy deanhystad Homework
  smbus.SMBus i2c code whic... 05-12, 15:51 NewbyTyro NewbyTyro General Codin...
Most views
  The best Prog... 564573
  Tutorial Requ... 453271
  Web Scraping ... 429550
  Newbie with P... 364857
  Thread remain... 337288
Most reputation
buran 580
snippsat 506
Larz60+ 452
Gribouillis 362
deanhystad 327
Most replies
  New Users Int... 449
  [book] Variou... 188
  CKEditor / Ri... 100
  moving from t... 95
  Free keys and... 91
Top posters
Larz60+ 12050
buran 8169
snippsat 7326
deanhystad 6827
metulburr 5151
Top referrers
Googlepro 22
python 6
metulburr 6
NonEntity 5
buran 3
Newest members
ishaD Today
fitobar43 Today
AymanNassar Yesterday
Shailesh 05-15
jackdennis272 05-15

User Panel Messages

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