Posts

Showing posts from February 3, 2019

How to find the largest entry in a matrix using loops

Image
0 start with: import numpy as np A = np.asarray([[2, 0, -6, 0] [-4, 5, -4, 7] [1, 3, 7, 2] [0, 8, 1, 6]]) determine the total number of negative entries in the matrix, the largest of them (magnitude) and it's location. Print the above information (for example the display should show that there are 3 negative entries, with the largest negative value equal to -6, located at (1,3).) Use loops , not min and max functions. python-3.x share | improve this question asked Nov 20 '18 at 0:31 kjfaksdjf kjfaksdjf 6 1

Sendmail very slow - /etc/hosts configuration

Image
11 3 It takes ~15 seconds to send single e-mail using sendmail. /var/log/mail.log: Jul 31 09:52:42 piotr-probook sendmail[2912]: My unqualified host name (piotr-probook) unknown; sleeping for retry /etc/hostname: piotr-probook /etc/hosts: 127.0.0.1 piotr-probook localdev localhost 192.168.1.1 router /etc/mail/sendmail.cf: # hosts file (normally /etc/hosts) O HostsFile=/etc/hosts Obviously I can ping piotr-probook host and HTTP server popups in browser when i type url http://piotr-probook What am I doing wrong? How to fix the problem? sendmail share | improve this question edited Jul 31 '13 at 9:53