Re: Recent Spam problem

2017-08-06 Thread Gerd Niemetz
Am Dienstag, 25. Juli 2017 07:13:51 UTC+2 schrieb Rustom Mody: > Of late there has been an explosion of spam > Thought it was only a google-groups (USENET?) issue and would be barred from > the mailing list. > > But then find its there in the mailing list archives as well > Typical example: > ht

Re: program that search string in text file and do something

2017-08-06 Thread Rick Johnson
Grant Edwards wrote: > Peter Otten <__pete...@web.de> wrote: > > > What we won't do is write a program for you ready to > > present to your teacher. > > Or if we do, it will be subtly sabotaged in a manner that > will make it obvious to an experienced Python programmer > that you didn't write it.

Re: ValueError: operands could not be broadcast together with shapes

2017-08-06 Thread Peter Otten
Ho Yeung Lee wrote: > def mse(imageA, imageB): > err = np.sum((imageA.astype("float") - imageB.astype("float")) ** 2) > err /= float(imageA.shape[0] * imageA.shape[1]) > return err > > original = cv2.imread("C:\\Users\\hello\\Documents\\words\\" + xx) > later = cv2.imread("C:\\Users\\

ValueError: operands could not be broadcast together with shapes

2017-08-06 Thread Ho Yeung Lee
def mse(imageA, imageB): err = np.sum((imageA.astype("float") - imageB.astype("float")) ** 2) err /= float(imageA.shape[0] * imageA.shape[1]) return err original = cv2.imread("C:\\Users\\hello\\Documents\\words\\" + xx) later = cv2.imread("C:\\Users\\hello\\Documents\\words\\"+ yy) mse

Re: unpacking elements in python - any tips u want to share ?

2017-08-06 Thread Stephan Houben
Hi Ganesh, Op 2017-07-27, Ganesh Pal schreef : > I have a list with say 7 elements say if I need to unpack first 3 > elements in the list and pass it an argument to the new fuction, here is > my elementary code One way to do exactly what you request here is: new_function(*my_list[:3]) Expla