Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Calculate the Euler Number with more decimal places
Post: RE: Calculate the Euler Number with more decimal p...

Thanks for your replies! I use Ubuntu 20.04 I only tried to install gmpy2 using pip. I'm not very clear about installing from source, I never do that, but I suppose I will have to try!
Pedroski55 General Coding Help 7 386 Oct-22-2021, 12:17 AM
    Thread: Calculate the Euler Number with more decimal places
Post: RE: Calculate the Euler Number with more decimal p...

Boohoo, can't install the module using pip! Can I get gmpy2 from another source? Output in bash: Quote:In file included from src/gmpy2.c:426: src/gmpy.h:106:12: fatal error: gmp.h: No such file...
Pedroski55 General Coding Help 7 386 Oct-20-2021, 10:53 PM
    Thread: Calculate the Euler Number with more decimal places
Post: RE: Calculate the Euler Number with more decimal p...

Thanks! That's great!
Pedroski55 General Coding Help 7 386 Oct-19-2021, 11:16 PM
    Thread: Calculate the Euler Number with more decimal places
Post: Calculate the Euler Number with more decimal place...

I was reading about the Euler Number, e. I read it has been calculated to a trillion decimal places. I would be happy with 100 decimal places. I have 15 decimal places. How could I get more decim...
Pedroski55 General Coding Help 7 386 Oct-18-2021, 11:09 PM
    Thread: pysql connection to cloud server database times out
Post: RE: pysql connection to cloud server database time...

Like bowlofred said, this is not really a Python problem, but without this, pymysql will not work from a remote machine. Just in case anyone else has this problem, a solution: This way is probably n...
Pedroski55 General Coding Help 9 316 Oct-11-2021, 10:34 PM
    Thread: pysql connection to cloud server database times out
Post: RE: pysql connection to cloud server database time...

Connecting to the cloud server via ssh, I ran: sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf I changed the line bind-address to 0.0.0.0 (I also tried *) Quote:[email protected]:~$ nc -v -w 2 123....
Pedroski55 General Coding Help 9 316 Oct-11-2021, 09:27 AM
    Thread: pysql connection to cloud server database times out
Post: RE: pysql connection to cloud server database time...

This is what I get from nc Quote:[email protected]:~$ nc -v -w 2 123.456.789.123 3306 nc: connect to 123.456.789.123 port 3306 (tcp) failed: Connection refused [email protected]:~$ There must be ...
Pedroski55 General Coding Help 9 316 Oct-11-2021, 05:20 AM
    Thread: pysql connection to cloud server database times out
Post: RE: pysql connection to cloud server database time...

Didn't know that! I just saw somewhere that the default port was 1443. Can't find that again right now! Anyway, I used this query in mysql on the server to check the port: Quote:mysql> show varia...
Pedroski55 General Coding Help 9 316 Oct-11-2021, 04:17 AM
    Thread: pysql connection to cloud server database times out
Post: RE: pysql connection to cloud server database time...

The default port for the mysql server is 1443, according to the pymysql docs. I opened 1443 in ufw on the server, but I just get a timeout. Today I will ask the company register the domain name with...
Pedroski55 General Coding Help 9 316 Oct-10-2021, 11:30 PM
    Thread: pysql connection to cloud server database times out
Post: pysql connection to cloud server database times ou...

I have only ever used shared web hosting for my little webpages. That makes things easy for people like me who are not so computer-fit. Now I have rented a cloud server, using Ubuntu 20.04 Server. I...
Pedroski55 General Coding Help 9 316 Oct-10-2021, 02:36 AM
    Thread: Need help with my Python code (Multiplication)
Post: RE: Need help with my Python code (Multiplication)

Good practice making a calculator! What if you want more than 2 numbers? A while loop is useful. Also, you need to deal with the operand. I did this when I began to learn some python. (Still haven'...
Pedroski55 General Coding Help 2 284 Oct-04-2021, 12:09 PM
    Thread: Need to install an old version of matplotlib
Post: RE: Need to install an old version of matplotlib

I would just like to see how to interact with this "kittenbot" If I do Quote:pip install matplotlib==2.2.2 will the newer version be removed?? Or can I have 2 versions??
Pedroski55 General Coding Help 3 200 Oct-02-2021, 05:59 AM
    Thread: How to do next line output from CSV column?
Post: RE: How to do next line output from CSV column?

Not sure I understand the request, but this will get you column 4 as a comma separated string, if that is what you want. You could write string to a csv file. You can probably do this more elegantly u...
Pedroski55 General Coding Help 2 428 Oct-02-2021, 01:00 AM
    Thread: Need to install an old version of matplotlib
Post: Need to install an old version of matplotlib

A friend gave me something called a kittenbot. Apparently, this thing can be programmed using Python. I have never tried this kind of thing, thought it might be interesting. I read I need mu-edito...
Pedroski55 General Coding Help 3 200 Oct-01-2021, 11:29 PM
    Thread: I am trying to reverse a string using loop
Post: RE: I am trying to reverse a string using loop

Hi, you know all these simple things we amateurs want to try, someone has already done them. Have a look here.
Pedroski55 General Coding Help 4 321 Sep-28-2021, 10:46 PM
    Thread: question about input, while loop, then print
Post: RE: question about input, while loop, then print

Better to get the names from a text file or list than enter them 1 by 1 path = '/home/pedro/Desktop/' myfile = '100names.txt' # each name on a new line names_data = open(path + myfile, 'r') data = na...
Pedroski55 General Coding Help 5 385 Sep-28-2021, 08:58 AM
    Thread: Combining arrays into dict
Post: RE: Combining arrays into dict

Just my take on this: #leds status as input in_ledS = 17 #pin 11 in_ledXL = 18 #pin 12 in_ledXXL = 22 #pin 15 in_ledS1 = 23 #pin 16 in_ledS2 = 4 #pin 7 # maybe the values of the...
Pedroski55 General Coding Help 7 324 Sep-26-2021, 11:44 PM
    Thread: Please Help
Post: RE: Please Help

Why don't you try things in the Idle Shell? Idle comes with Python. Even on Windoze. Or PyCharm? Not that I am an expert, but I have only ever used Idle for testing things. Works great! Write or ...
Pedroski55 General Coding Help 11 2,972 Sep-26-2021, 11:02 PM
    Thread: First time with mysql
Post: RE: First time with mysql

Of course you must first have a MySQL database and in that database a table. My table names look like: allstudentsAnswers20BE host is the ip of the remote or local server: host='123.456.789.123' us...
Pedroski55 General Coding Help 5 271 Sep-25-2021, 07:45 AM
    Thread: Learned Python Basics, what now?
Post: RE: Learned Python Basics, what now?

Personally, speaking only as an amateur, I like Python because I can apply it to things I have to do and do them faster. Like download a load of results from my webpage database and save them to Exce...
Pedroski55 General Coding Help 20 896 Sep-25-2021, 07:16 AM

User Panel Messages

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