On Sat, Jan 18, 2014 at 6:44 PM, wrote:
>> Quick smoke test. How big are your requests/responses? You mention
>>
>> REST, which implies they're going to be based on HTTP. I would expect
>>
>> you would have some idea of the rough size. Multiply that by 50,000,
>>
>> and see whether your connectio
Piet van Oostrum wrote:
> Hi,
>
> I am looking for an elegant way to write the following code as a list
> comprehension:
>
> labels = []
> for then, name in mylist:
> _, mn, dy, _, _, _, wd, _, _ = localtime(then)
> labels.append(somefunc(mn, day, wd, name))
>
> So mylist is a list of t
On Fri, 1/17/14, Terry Reedy wrote:
Subject: Re: doctests compatibility for python 2 & python 3
To: python-list@python.org
Date: Friday, January 17, 2014, 10:10 PM
On 1/17/2014 7:14 AM, Robin Becker
wrote:
> I tried this approach with a few m
John Ladasky wrote:
> On Friday, January 17, 2014 6:16:28 PM UTC-8, duncan smith wrote:
>
>> >>> a = np.arange(10)
>> >>> c = np.where((2 < a) & (a < 7))
>> >>> c
>> (array([3, 4, 5, 6]),)
>
> Nice! Thanks!
>
> Now, why does the multiple comparison fail, if you happen to know?
2 < a < 7
i
Chris Angelico wrote:
On Fri, Jan 17, 2014 at 8:10 PM, Mark Lawrence wrote:
Every time I see it I picture Inspector
Clouseau, "A BOM!!!" :)
Special delivery, a berm! Were you expecting one?
A berm? Is that anything like a shrubbery?
--
Greg
--
https://mail.python.org/mailman/listinfo/pyth
Rustom Mody writes:
> On Saturday, January 18, 2014 4:49:55 AM UTC+5:30, Piet van Oostrum wrote:
[...]
>
>> Python misses a 'where' or 'let'-like construction as in Haskell.
>
> +1
> Yes Ive often been bitten by the lack of a 'comprehension-let'
If it used only in a comprehension as in my exampl
On Sat, Jan 18, 2014 at 8:41 PM, Gregory Ewing
wrote:
> Chris Angelico wrote:
>>
>> On Fri, Jan 17, 2014 at 8:10 PM, Mark Lawrence
>> wrote:
>>
>> Every time I see it I picture Inspector
>>>
>>> Clouseau, "A BOM!!!" :)
>>
>>
>> Special delivery, a berm! Were you expecting one?
>
>
> A berm? Is th
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 2014-01-17, 23:19 GMT, you wrote:
> But defining the auxfunc takes away the elegance of a list
> comprehension.
Au contraire! Remember, that brevity is the sister of talent.
I would definitively vote for
labels = [make_label(then, name) f
> (You're using Google Groups, which means your replies are
>
> double-spaced and your new text is extremely long lines. Please fix
>
> this, either by the fairly manual job of fixing every post you make,
>
> or the simple method of switching to a better client. Thanks.)
>
>
>
> My point was
hi,
can you please suggest me some method for study so that i can scrap a
site having JavaScript behind it
i have tried selenium, ghost, pyQt4, but it is slow and as a am working with
thread it sinks my ram memory very fast.
--
https://mail.python.org/mailman/listinfo/python-list
Piet van Oostrum writes:
[...]
> I could define a auxiliary function like:
>
> def auxfunc(then, name):
> _, mn, dy, _, _, _, wd, _, _ = localtime(then)
> return somefunc(mn, day, wd, name)
>
> and then use
> [auxfunc(then, name) for then, name in mylist]
[...]
> labels = [somefunc(mn,
On Wednesday, January 15, 2014 8:37:25 PM UTC+2, phi...@gmail.com wrote:
> My problem is as follows:
>
> 2) The network layer of the game server runs a separate process as well,
> and my intention was to use gevent or tornado (http://nichol.as/asynchronous-
>servers-in-python).
> 3) The game
Den lördagen den 18:e januari 2014 kl. 13:13:47 UTC+1 skrev Asaf Las:
> On Wednesday, January 15, 2014 8:37:25 PM UTC+2, phi...@gmail.com wrote:
>
> > My problem is as follows:
>
> >
>
> > 2) The network layer of the game server runs a separate process as well,
>
> > and my intention was
On 18/01/2014 12:40, phi...@gmail.com wrote:
[snip the stuff I can't help with]
Here's the link you need to sort the problem with double spacing from
google groups https://wiki.python.org/moin/GoogleGroupsPython
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you
On Friday, January 17, 2014 6:03:45 PM UTC-5, Terry Reedy wrote:
> On 1/17/2014 5:16 PM, beliav...@aol.com wrote:
> > Python 2 and 3 are incompatible in ways that do not apply to Fortran
>
> > standards pre- and post- F77.
>
>
>
> As stated above, I disagree with respect to pre-F77 and F77
Op vrijdag 17 januari 2014 22:40:42 UTC+1 schreef Terry Reedy:
> On 1/17/2014 8:20 AM, Jean Dupont wrote:
>
> > Dear all,
>
> > I made a simple gui with tkinter. I can imagine there are things which I
>
> > did which are "not optimal". So what I ask is to comment on my code
>
> > preferable wit
On 18 January 2014 14:52, Jean Dupont wrote:
>
> Thanks Peter and Terry Jan for the useful suggestions. One thing which I find
> a bit weird: when asking for Python-help concerning raspberry pi code or
> problems, a lot of people don't seem to be interested in helping out, that's
> of course th
On Saturday, January 18, 2014 2:06:29 PM UTC+5:30, Peter Otten wrote:
> Options I can think of:
> You could do it in two steps...
> time_name_pairs = ((localtime(then), name) for then, name in mylist)
> labels = [somefunc(t.tm_mon, t.tm_mday, t.tm_wday, name)
> for t, name in time_na
Rustom Mody writes:
> On Saturday, January 18, 2014 2:06:29 PM UTC+5:30, Peter Otten wrote:
>
> > What would a list-comp with `let` or `where` look like? Would it
> > win the beauty contest against the loop?
>
> For me this is neat
>
> [somefunc(mn,day,wd,name) for (then, name) in mylist let
>
On 18/01/2014 15:12, Oscar Benjamin wrote:
On 18 January 2014 14:52, Jean Dupont wrote:
Thanks Peter and Terry Jan for the useful suggestions. One thing which I find a
bit weird: when asking for Python-help concerning raspberry pi code or
problems, a lot of people don't seem to be interested
Alain Ketterlin writes:
> Piet van Oostrum writes:
> [...]
>> Python misses a 'where' or 'let'-like construction as in Haskell.
>
> "let x = v in e" really is (lambda x:e)(v)
>
You are right, but it is a lot less readable IMHO.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE
Hello, I am a newbie. Can somebody help me write the code for following program?
Write a program that takes student grades and prints out the GPA. The
information is input, one student per line in the format:...
The number of students is not known in advance. You should prompt the user for
On Sat, 18 Jan 2014 03:54:17 -0800, Jaiprakash Singh wrote:
> can you please suggest me some method for study so that i can
> scrap a site having JavaScript behind it
Please expand upon the requirement, are you trying to:
a) replace server side javascript with server side python, or
b) replace
On Sun, Jan 19, 2014 at 5:00 AM, indar kumar wrote:
> Hello, I am a newbie. Can somebody help me write the code for following
> program?
>
>
> Write a program that takes student grades and prints out the GPA. The
> information is input, one student per line in the format:
> ...
> The number
On Sat, Jan 18, 2014 at 10:54 PM, Jaiprakash Singh
wrote:
> hi,
>
> can you please suggest me some method for study so that i can scrap a
> site having JavaScript behind it
>
>
> i have tried selenium, ghost, pyQt4, but it is slow and as a am working
> with thread it sinks my ram memory
In article ,
indar kumar wrote:
> Hello, I am a newbie. Can somebody help me write the code for following
> program?
>
>
> Write a program that takes student grades and prints out the GPA. The
> information is input, one student per line in the format:
> ...
> The number of students is n
Pardon me for being cynical, but in the entire history of the universe,
has anybody ever used input()/raw_input() for anything other than a
homework problem?
--
https://mail.python.org/mailman/listinfo/python-list
On 18/01/2014 18:30, Roy Smith wrote:
Pardon me for being cynical, but in the entire history of the universe,
has anybody ever used input()/raw_input() for anything other than a
homework problem?
Not me personally. I guess raw_input must have been used somewhere at
some time for something, o
On Saturday, January 18, 2014 11:00:47 AM UTC-7, indar kumar wrote:
> Hello, I am a newbie. Can somebody help me write the code for following
> program?
>
>
>
>
>
> Write a program that takes student grades and prints out the GPA. The
> information is input, one student per line in the forma
On 01/18/2014 10:30 AM, Roy Smith wrote:
Pardon me for being cynical, but in the entire history of the universe,
has anybody ever used input()/raw_input() for anything other than a
homework problem?
Yes - routinely.
Emile
--
https://mail.python.org/mailman/listinfo/python-list
Roy Smith wrote:
> Pardon me for being cynical, but in the entire history of the universe,
> has anybody ever used input()/raw_input() for anything other than a
> homework problem?
I use it for pointless throwaway tools, sometimes via the cmd module,
sometimes directly.
I like that you can add
In article <60955b74-7bc8-4c72-94e1-849015985...@googlegroups.com>,
indar kumar wrote:
> On Saturday, January 18, 2014 11:00:47 AM UTC-7, indar kumar wrote:
> > Hello, I am a newbie. Can somebody help me write the code for following
> > program?
> >
> >
> >
> >
> >
> > Write a program that
The Raspberry Pi is exactly what got me started with Python. I'm at
medium-sized science museum and used the Pi, Python, & tkinter to introduce
kids to programming & Linux this past summer.
Jean, feel free to contact me off-line for my experience with all three.
Brian Grawburg
Wilson, NC
---
Stefan,
Thank-you for the reply. I hadn't considered cpython, unfortunately the
extension is too large a project to port at the moment. I ended up
replacing the PyBuffer_New() segment with malloc() and passing back an
object from PyByteArray_FromStringAndSize(). It seems to work.
mrh.
On 20
I have some code that I need help vectorizing.
I want to convert the following to vector form, how can I? I want to get rid of
the inner loop - apparently, it's possible to do so.
X is an NxD matrix. y is a 1xD vector.
def foo(X, y, mylambda, N, D, epsilon):
...
for j in xrange(D):
On 18 January 2014 20:51, Kevin K wrote:
> def foo(X, y, mylambda, N, D, epsilon):
> ...
> for j in xrange(D):
> aj = 0
> cj = 0
> for i in xrange(N):
> aj += 2 * (X[i,j] ** 2)
> cj += 2 * (X[i,j] * (y[i] - w.transpose()*X
I didn't paste the whole function, note the ... before and after. I do use the
values.
I want to get rid of one of the loops so that the computation becomes O(D).
Assume vectors a and c should get populated during the compute, each being 1xD.
Thanks
On Saturday, January 18, 2014 12:51:25 PM U
serto...@gmail.com wrote:
>
>First, I don't like that all parenthesis, I like to differentiate
>which type of delimiter is, this is not so bad if using spaces but
>anyways it's a little more difficult. Second, In regard, to using
>something like myWindow=Window rather than Window "myWindow", at
Peter Otten <__pete...@web.de> wrote:
>John Ladasky wrote:
>
>> On Friday, January 17, 2014 6:16:28 PM UTC-8, duncan smith wrote:
>>
>>> >>> a = np.arange(10)
>>> >>> c = np.where((2 < a) & (a < 7))
>>> >>> c
>>> (array([3, 4, 5, 6]),)
>>
>> Nice! Thanks!
>>
>> Now, why does the multiple co
On 1/18/2014 1:30 PM, Roy Smith wrote:
Pardon me for being cynical, but in the entire history of the universe,
has anybody ever used input()/raw_input() for anything other than a
homework problem?
Homework problems (and 'toy' programs, such as hangman), whether in a
programming class or elsewh
On Sun, 19 Jan 2014 05:13:57 +1100, Chris Angelico wrote:
> On Sat, Jan 18, 2014 at 10:54 PM, Jaiprakash Singh
> wrote:
>> hi,
>>
>> can you please suggest me some method for study so that i can
>> scrap a site having JavaScript behind it
>>
>>
>> i have tried selenium, ghost, pyQt4,
Kevin K wrote:
> I have some code that I need help vectorizing.
> I want to convert the following to vector form, how can I? I want to get
> rid of the inner loop - apparently, it's possible to do so. X is an NxD
> matrix. y is a 1xD vector.
>
> def foo(X, y, mylambda, N, D, epsilon):
> ...
>
Hi,
I want to show a code for review but afraid of plagiarism issues. Kindly,
suggest how can I post it for review here without masking it visible for public
--
https://mail.python.org/mailman/listinfo/python-list
In article ,
indar kumar wrote:
> Hi,
>
> I want to show a code for review but afraid of plagiarism issues. Kindly,
> suggest how can I post it for review here without masking it visible for
> public
You can't. This is a public forum. One of the reasons people are
willing to answer basic
On Sun, Jan 19, 2014 at 8:40 AM, Denis McMahon wrote:
> On Sun, 19 Jan 2014 05:13:57 +1100, Chris Angelico wrote:
>
>> On Sat, Jan 18, 2014 at 10:54 PM, Jaiprakash Singh
>> wrote:
>>> hi,
>>>
>>> can you please suggest me some method for study so that i can
>>> scrap a site having Java
@Roy Smith
Can you help me privately because its an assignment and have to submit
plagiarism free
--
https://mail.python.org/mailman/listinfo/python-list
During the final test of a bit of embedded python, I wanted to see if
I had any hanging references. To my suprise, I ended up with a rather
large amount, after running combinerefs.py. And even with the
simplest[1] possible use of embedding, I end up with 13475 still-living
references.
If this i
In article ,
indar kumar wrote:
> @Roy Smith
>
> Can you help me privately
Sorry, no.
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, Jan 19, 2014 at 9:32 AM, indar kumar wrote:
> @Roy Smith
>
> Can you help me privately because its an assignment and have to submit
> plagiarism free
Are you sure the requirement precludes you posting your code? More
likely, the rule is that you may not copy someone else's. When it's
pos
indar kumar writes:
> I want to show a code for review but afraid of plagiarism issues.
Why? What solid basis do you have to fear someone plagiarising code that
you want reviewed?
There is already a vast amount of code licensed freely for anyone to use
and derive from. What would make yours esp
indar kumar writes:
> Can you help me privately because its an assignment and have to submit
> plagiarism free
Then the point of the assignment is defeated by seeking help here.
Hopefully your instructors also read this forum and are now aware you
are seeking to subvert the anti-plagiarism rule
On 1/18/2014 3:50 AM, Peter Otten wrote:
Unlike `&` `and` cannot be overridden (*),
(*) I assume overriding would collide with short-cutting of boolean
expressions.
Yes. 'and' could be called a 'control-flow operator', but in Python it
is not a functional operator.
A functional binary op
Hi,
I'd agree with the advice that it's not the best idea: readability sucks
here, but consider the following:
import time
def somefunc(a,b,c,d): # dummy function
return "{} - {} - {} : {}".format(a,b,c,d)
l = [(time.time(),"name {}".format(n)) for n in range(100)] # dummy data
# the li
I have to save students information in a database that is keeping continuously
track of the information. Format is as follows:
Information:
Note: if this name already exists there in database, just update the
information of that(name) e.g course,grade and date. Otherwise, add it.
What I thi
On Sun, Jan 19, 2014 at 8:33 AM, Terry Reedy wrote:
> On 1/18/2014 1:30 PM, Roy Smith wrote:
>>
>> Pardon me for being cynical, but in the entire history of the universe,
>> has anybody ever used input()/raw_input() for anything other than a
>> homework problem?
>
>
> Homework problems (and 'toy'
On Sunday, January 19, 2014 12:00:20 AM UTC+5:30, Roy Smith wrote:
> Pardon me for being cynical, but in the entire history of the universe,
> has anybody ever used input()/raw_input() for anything other than a
> homework problem?
Similar 'cynicism' regarding print would be salutary for producin
On Sun, Jan 19, 2014 at 3:15 PM, Rustom Mody wrote:
> On Sunday, January 19, 2014 12:00:20 AM UTC+5:30, Roy Smith wrote:
>> Pardon me for being cynical, but in the entire history of the universe,
>> has anybody ever used input()/raw_input() for anything other than a
>> homework problem?
>
> Simila
On Sunday, January 19, 2014 9:51:36 AM UTC+5:30, Chris Angelico wrote:
> On Sun, Jan 19, 2014 at 3:15 PM, Rustom Mody wrote:
> > On Sunday, January 19, 2014 12:00:20 AM UTC+5:30, Roy Smith wrote:
> >> Pardon me for being cynical, but in the entire history of the universe,
> >> has anybody ever use
On Sun, Jan 19, 2014 at 3:43 PM, Rustom Mody wrote:
> Because these two pieces of code
>
def foo(x): print x+1
>
def bar(x): return x+1
>
> look identical (to a beginner at least)
>
foo(3)
> 4
bar(3)
> 4
As do these pieces of code:
>>> def quux(x): return str(x+1)
>>> de
I'm trying to work through Skienna's algorithms handbook, and note that the
author often uses graphical representations of the diagrams to help understand
(and even debug) the algorithms. I'd like to reproduce this in python.
How would you go about this? pyQt, pygame and pyglet immediately come
On Sat, 18 Jan 2014 13:30:20 -0500, Roy Smith wrote:
> Pardon me for being cynical, but in the entire history of the universe,
> has anybody ever used input()/raw_input() for anything other than a
> homework problem?
Yes. They are excellent for interactive command line tools.
--
Steven
--
htt
On Sat, 18 Jan 2014 14:32:21 -0800, indar kumar wrote:
> @Roy Smith
>
> Can you help me privately because its an assignment and have to submit
> plagiarism free
Then don't plagiarise.
Plagiarism means YOU copy other people. You shouldn't get in trouble
because other people copy you.
Talk to
On Sat, Jan 18, 2014 at 10:31 PM, Steven D'Aprano
wrote:
> Plagiarism means YOU copy other people. You shouldn't get in trouble
> because other people copy you.
Normally, both the person copying and the person who gave away their
work to be copied are punished. It simplifies figuring out who to
p
On Friday, 18 January 2013 16:47:52 UTC+2, Rik wrote:
> Hi, I've developed a website for beginners to Python. I'd appreciate any
> comments or criticism. It's still under development, and should be finished
> in the next few months. Oh, and it's free to use.
>
>
>
> www.usingpython.com
code
64 matches
Mail list logo