Re: How donwnload youtube videos?

2014-10-04 Thread Chris Angelico
On Sun, Oct 5, 2014 at 1:41 PM, Dymond Simon wrote: > Uhm, ı have to download youtube videos ı was tried urlretrive but doesn't > work ı have no idea that's why.So there is my question, "we cant donwload > youtube videos directly ? ". > Look up youtube-dl - it's written in Python. :) ChrisA --

How donwnload youtube videos?

2014-10-04 Thread Dymond Simon
Hi guys .. Uhm, ı have to download youtube videos ı was tried urlretrive but doesn't work ı have no idea that's why.So there is my question, "we cant donwload youtube videos directly ? ". -- https://mail.python.org/mailman/listinfo/python-list

Re: Issue in printing top 20 dictionary items by dictionary value

2014-10-04 Thread MRAB
On 2014-10-05 02:11, Denis McMahon wrote: On Sat, 04 Oct 2014 09:11:43 +, Shiva wrote: I have written a function that -reads a file -splits the words and stores it in a dictionary as word(key) and the total count of word in file (value). I want to print the words with top 20 occurrences in

Re: Issue in printing top 20 dictionary items by dictionary value

2014-10-04 Thread Denis McMahon
On Sat, 04 Oct 2014 09:11:43 +, Shiva wrote: > I have written a function that -reads a file -splits the words and > stores it in a dictionary as word(key) and the total count of word in > file (value). > > I want to print the words with top 20 occurrences in the file in reverse > order - but

Re: "High water" Memory fragmentation still a thing?

2014-10-04 Thread Antoine Pitrou
Christian Heimes python.org> writes: > > The article doesn't state if the writer is referring to virtual memory > or resident set size. Actually the article mentions the following recipe: resource.getrusage(resource.RUSAGE_SELF).ru_maxrss which means the author is probably looking at residen

Re: Issue in printing top 20 dictionary items by dictionary value

2014-10-04 Thread Larry Hudson
On 10/04/2014 10:36 AM, Shiva wrote: What I don't understand is: for w in eachword: textstorage[w]=textstorage.get(w, 0) + 1 How does textstorage.get(w,0)+1 give the count of the word?? Very long-winded explanation: (But to shorten it a bit, I'm going to use ts in place of t

Re: Looking for volunteers developing wsgi Webmailer Application!

2014-10-04 Thread Tamer Higazi
Because the world really needs this crap that is developed in php5, or big Personal Information Management Systems like Horde, what often nobody needs. Am 04.10.2014 um 19:52 schrieb Denis McMahon: > On Sat, 04 Oct 2014 17:52:18 +0200, Tamer Higazi wrote: > >> I am planing to develop on longe

Re: Issue in printing top 20 dictionary items by dictionary value

2014-10-04 Thread MRAB
On 2014-10-04 18:36, Shiva wrote: > It works : > orderedwords = sorted(textstorage.keys(), key=textstorage.get) > > The method textstorage.get will accept a word and return it's value > which in this instance is the count. > > What I don't understand is: > > for w in eachword: > text

Re: "High water" Memory fragmentation still a thing?

2014-10-04 Thread Dan Stromberg
On Fri, Oct 3, 2014 at 1:01 PM, Skip Montanaro wrote: > On Fri, Oct 3, 2014 at 1:36 PM, Croepha > wrote: > >> Long running Python jobs that consume a lot of memory while >> running may not return that memory to the operating system >> until the process actually terminates, even if everything is >

Re: Looking for volunteers developing wsgi Webmailer Application!

2014-10-04 Thread Denis McMahon
On Sat, 04 Oct 2014 17:52:18 +0200, Tamer Higazi wrote: > I am planing to develop on longer time a n open source Webmailer written > in Python (not 2.7.x) with: Because the world really needs another webmailer spamengine. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/ma

Re: "High water" Memory fragmentation still a thing?

2014-10-04 Thread Sturla Molden
Steven D'Aprano wrote: > [Aside: The thing that people fail to understand is that the GIL is not in > fact something which *prevents* multi-tasking, but it *enables* cooperative > multi-tasking: > > http://www.dabeaz.com/python/GIL.pdf > > although that's not to say that there aren't some horri

Re: Python Basics

2014-10-04 Thread Peter Pearson
On Sat, 04 Oct 2014 11:09:58 +1000, Steven D'Aprano wrote: > Chris Angelico wrote: > >> On Sat, Oct 4, 2014 at 8:54 AM, Seymore4Head >> wrote: > >>> for i in range(1,10): >>> print (str(i)*i) >> >> Seymour, please don't do this. When you "help" someone by just giving >> him the answer to a ho

Re: Issue in printing top 20 dictionary items by dictionary value

2014-10-04 Thread Shiva
It works : orderedwords = sorted(textstorage.keys(), key=textstorage.get) The method textstorage.get will accept a word and return it's value which in this instance is the count. What I don't understand is: for w in eachword: textstorage[w]=textstorage.get(w, 0) + 1 How does textsto

Re: A little more: decimal_portion

2014-10-04 Thread Seymore4Head
On Sun, 05 Oct 2014 01:46:03 +1000, Steven D'Aprano wrote: >Seymore4Head wrote: > >> A little more: decimal_portion >> >> Write a function that takes two number parameters and returns a float >> that is the decimal portion of the result of dividing the first >> parameter by the second. (For exa

Looking for volunteers developing wsgi Webmailer Application!

2014-10-04 Thread Tamer Higazi
Hi people! I am planing to develop on longer time a n open source Webmailer written in Python (not 2.7.x) with: bottle.py zca, zope.interface Mail sasl and/or dovecot python-slimta-piperelay a wsgi webmailer which could be easily added in uWSGI. I am looking for people, who'd like to contribut

Re: A little more: decimal_portion

2014-10-04 Thread Steven D'Aprano
Seymore4Head wrote: > A little more: decimal_portion > > Write a function that takes two number parameters and returns a float > that is the decimal portion of the result of dividing the first > parameter by the second. (For example, if the parameters are 5 and 2, > the result of 5/2 is 2.5, so

Re: A little more: decimal_portion

2014-10-04 Thread Seymore4Head
On Sun, 5 Oct 2014 01:24:40 +1000, Chris Angelico wrote: >On Sun, Oct 5, 2014 at 1:16 AM, Seymore4Head > wrote: >> I did. I included a screenshot of me doing just that. >> The formula seems to work in the shell, but does not work as a >> function, or I am missing something subtle again. > >Ah, I

Re: A little more: decimal_portion

2014-10-04 Thread Chris Angelico
On Sun, Oct 5, 2014 at 1:16 AM, Seymore4Head wrote: > I did. I included a screenshot of me doing just that. > The formula seems to work in the shell, but does not work as a > function, or I am missing something subtle again. Ah, I don't generally click screenshots. Have the function print out e

Re: A little more: decimal_portion

2014-10-04 Thread Seymore4Head
On Sun, 5 Oct 2014 01:07:39 +1000, Chris Angelico wrote: >On Sun, Oct 5, 2014 at 12:58 AM, Seymore4Head > wrote: >> A little more: decimal_portion >> >> Write a function that takes two number parameters and returns a float >> that is the decimal portion of the result of dividing the first >> par

Re: A little more: decimal_portion

2014-10-04 Thread Chris Angelico
On Sun, Oct 5, 2014 at 12:58 AM, Seymore4Head wrote: > A little more: decimal_portion > > Write a function that takes two number parameters and returns a float > that is the decimal portion of the result of dividing the first > parameter by the second. (For example, if the parameters are 5 and 2,

A little more: decimal_portion

2014-10-04 Thread Seymore4Head
A little more: decimal_portion Write a function that takes two number parameters and returns a float that is the decimal portion of the result of dividing the first parameter by the second. (For example, if the parameters are 5 and 2, the result of 5/2 is 2.5, so the return value would be 0.5) h

[RELEASED] Python 3.2.6rc1, Python 3.3.6rc1

2014-10-04 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm happy to announce the release of Python 3.2.6rc1 and 3.3.6rc1. Both are release candidates for security-fix releases, which are provide source-only on python.org. The list of security-related issues fixed

Re: pyqt darg and drop

2014-10-04 Thread Sachin Tiwari
On Saturday, October 4, 2014 3:35:33 PM UTC+5:30, Sachin Tiwari wrote: > Hi > > > > I want to drag and drop push multiple push buttons but its working for only > for last button. And I want to connect them by a wire. > > > > Please help. > > > > import sys > > from PyQt4 import

Re: Issue in printing top 20 dictionary items by dictionary value

2014-10-04 Thread Alexander Blinne
Am 04.10.2014 um 11:11 schrieb Shiva: > Hi All, > > I have written a function that > -reads a file > -splits the words and stores it in a dictionary as word(key) and the total > count of word in file (value). > > I want to print the words with top 20 occurrences in the file in reverse > order -

Re: Issue in printing top 20 dictionary items by dictionary value

2014-10-04 Thread Peter Otten
Shiva wrote: > Hi All, > > I have written a function that > -reads a file > -splits the words and stores it in a dictionary as word(key) and the total > count of word in file (value). > > I want to print the words with top 20 occurrences in the file in reverse > order - but can't figure it out.

pyqt darg and drop

2014-10-04 Thread Sachin Tiwari
Hi I want to drag and drop push multiple push buttons but its working for only for last button. And I want to connect them by a wire. Please help. import sys from PyQt4 import QtGui, QtCore class Button(QtGui.QPushButton): def mouseMoveEvent(self, e): if e.buttons() != Q

Re: Python Basics

2014-10-04 Thread alister
On Sat, 04 Oct 2014 11:09:58 +1000, Steven D'Aprano wrote: > Chris Angelico wrote: > >> On Sat, Oct 4, 2014 at 8:54 AM, Seymore4Head >> wrote: > >>> for i in range(1,10): >>> print (str(i)*i) >> >> Seymour, please don't do this. When you "help" someone by just giving >> him the answer to a

Issue in printing top 20 dictionary items by dictionary value

2014-10-04 Thread Shiva
Hi All, I have written a function that -reads a file -splits the words and stores it in a dictionary as word(key) and the total count of word in file (value). I want to print the words with top 20 occurrences in the file in reverse order - but can't figure it out. Here is my function: def prin

Re: "High water" Memory fragmentation still a thing?

2014-10-04 Thread Marko Rauhamaa
dieter : > Without memory compaction, long running processes tend to suffer from > "memory fragmentation": while sufficient free memory is available, it > is available only in small blocks, not large enough for some memory > requests Now this is a question for the computer scientists. The problem