Re: How to "wow" someone new to Python

2015-01-22 Thread Grant Edwards
On 2015-01-22, Steven D'Aprano  wrote:
> Mario Figueiredo wrote:
>
>> But speaking about impressing more experient programmers, I personally
>> don't think Python has a wow factor in any of its features and syntax. At
>> least in the way I understand the word "wow".
>
> Quote:
>
> I've seen Python criticized as "ugly" precisely because it doesn't 
> have a trick-based view of the world. In many ways, it's a dull
> language, borrowing solid old concepts from many other languages &
> styles: boring syntax, unsurprising semantics, few automatic 
> coercions, etc etc. But that's one of the things I like about it.
> - Tim Peters

Well, you know the ancient Chinese programmer's curse:

  "May you program in an interesting language".

-- 
Grant Edwards   grant.b.edwardsYow! Pardon me, but do you
  at   know what it means to be
  gmail.comTRULY ONE with your BOOTH!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-21 Thread Steven D'Aprano
Alan Bawden wrote:

> Alan Bawden  writes:
>> ...  Score one for untyped languages.
> 
> Drat.  I should have writted "dynamically typed languages".
> 
> The language has changed.  When I was a novice Lisp hacker, we were
> comfortable saying that Lisp was "untyped".  But nowadays we always say
> that Lisp is "dynamically typed".  I could write an essay about why...

I've always understood that strictly speaking, "untyped" refers to low-level 
languages like assembly or Forth, where everything is a machine word.

In Forth, for example, all commands operate on single words on the stack, 
except for "double" variants which operate on two words at a time. E.g. you 
might have FOO to operate on the word at the top of the stack and FOOD to 
operate on the top two words. (Actually, given Forth's reputation for 
cryptic single-character line noise, it would probably be '^ and ''^ or 
something :-) In any case, there's a single stack, and double quantities 
aren't a separate data type, they're just two words.

(Some versions of Forth are arguably typed, in that they have a separate 
stack for floating point.)

I sometimes also use "untyped" to refer to languages like Hypertalk where 
everything is a string.



-- 
Steve

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-21 Thread Steven D'Aprano
Mario Figueiredo wrote:

> But speaking about impressing more experient programmers, I personally
> don't think Python has a wow factor in any of its features and syntax. At
> least in the way I understand the word "wow".

Quote:

I've seen Python criticized as "ugly" precisely because it doesn't 
have a trick-based view of the world. In many ways, it's a dull
language, borrowing solid old concepts from many other languages &
styles: boring syntax, unsurprising semantics, few automatic 
coercions, etc etc. But that's one of the things I like about it.
- Tim Peters




-- 
Steve

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-21 Thread Irmen de Jong
On 21-1-2015 20:06, Chris Angelico wrote:
> On Thu, Jan 22, 2015 at 5:20 AM, Irmen de Jong  wrote:
>> On 21-1-2015 18:59, Steve Hayes wrote:
>>
>>> 3. When I started to look at it, I found that strings could be any length 
>>> and
>>> were not limited to swomething arbitrary, like 256 characters.
>>
>> Even more fun is that Python's primitive integer type (longs for older 
>> Python versions)
>> has no arbitrary limitation either.
>>
>> That amazed me at the time I discovered python :)
> 
> I hadn't worked with length-limited strings in basically forever
> (technically BASIC has a length limit, but I never ran into it; and I
> never did much with Pascal), but you're right, arbitrary-precision
> integers would have impressed me a lot more if I hadn't first known
> REXX. So... is there a way to show that off efficiently? Normally, any
> calculation that goes beyond 2**32 has already gone way beyond most
> humans' ability to hold the numbers in their heads.
> 
> ChrisA
> 

Something silly that I just thought about  (Python 3):


number = 2 * 3 * 5 * 103# okay.
number = number * 3120937 * 6977407 * 8431103# hmm...
number = number * 
70546381234168412430433268433712277793053956898109255590133639943
print("I know a huge number, it is:", number)
secret_message = number.to_bytes(37, "big")
print(secret_message)


Or perhaps: (after pip install pyprimes)

>>> number = 1402811054100763300785480817886711606823329164566977593890  # wow?
>>> import pyprimes.factors
>>> print(pyprimes.factors.factorise(number))
[2, 3, 5, 557, 1559, 3413, 6991, 27799, 41333, 52999, 104681, 247001, 992441, 
211,
1299689]
>>>



Irmen


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-21 Thread Paul Rubin
Alan Bawden  writes:
> The language has changed.  When I was a novice Lisp hacker, we were
> comfortable saying that Lisp was "untyped".  But nowadays we always say
> that Lisp is "dynamically typed".  I could write an essay about why...

I'd be interested in seeing that.  Lisp of course descends from Church's
untyped lambda calculus but I didn't realize Lisp terminology about its
(runtime) type system had changed historically.  PL theorists sometimes
like to refer to runtime types as "tags" rather than types.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-21 Thread Chris Angelico
On Thu, Jan 22, 2015 at 8:46 AM, Matthew Ruffalo  wrote:
> No, Java's String.length returns an int and Strings are limited to ~2 **
> 31 characters even in 64-bit Java.

Huh, annoying. In Python, the length of a string (in characters) is
stored in a Py_ssize_t (if I recall correctly), which is, I believe, a
pointer-sized integer. So it'd be 64-bit on a 64-bit build.

> I do seem to have encountered some strange behavior, though: creating
> very large strings with str.__mul__ seems to enter an allocation loop in
> Python 3.4. With a single-character string 's', I can create the
> following new strings quickly:
>
> s * 2 ** 33
> s * 2 ** 34
> s * 2 ** 35
> s * 2 ** 36
>
> but s * 2 ** 38 shows some odd memory usage. I'm watching the memory
> usage of a Python process steadily increase to 256GB, drop to a few MB,
> climb back to 256GB, drop to a few MB, and so on. It takes a half-dozen
> cycles of allocation and deallocation before the interactive interpreter
> gives me another prompt.

That sounds like you're blooping through your page file. The exact
behaviour will depend on how much physical memory you have, how your
page file is implemented (which depends on your OS), the phase of the
moon, and what you had for breakfast three weeks ago.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-21 Thread Mario Figueiredo
In article , alan@scooby-
doo.csail.mit.edu says...
> Even in a 64-bit Java, the _type_ returned by String.length() is
> 'int', and is thus at most (2**31 - 1).  This isn't a problem for
> strings, which never get that long in practice, but for some other
> Java datatypes (e.g., Buffer) it is a real problem.  Score one for
> untyped languages.

Still, assuming you have enough heap size, you can still create a 500 
million character string buffer. That's one of a heck large buffer. 
Nearly twice the online encyclopedia Britannica(1), and roughly 50 times 
the longest novel ever produced (2).

And considering you can always flush the buffer, I'm finding an hard 
time looking at unlimited string length in Python as wow factor. Even if 
we consider unicode strings. 


(1) 
http://en.wikipedia.org/wiki/Wikipedia:Size_comparisons#Comparison_of_en
cyclopedias

(2) http://en.wikipedia.org/wiki/List_of_longest_novels
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-21 Thread Alan Bawden
Alan Bawden  writes:
> ...  Score one for untyped languages.

Drat.  I should have writted "dynamically typed languages".

The language has changed.  When I was a novice Lisp hacker, we were
comfortable saying that Lisp was "untyped".  But nowadays we always say
that Lisp is "dynamically typed".  I could write an essay about why...

-- 
Alan Bawden
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-21 Thread Matthew Ruffalo
On 01/21/2015 04:26 PM, Chris Angelico wrote:
> On Thu, Jan 22, 2015 at 8:20 AM, Matthew Ruffalo  wrote:
>> Yes, length-unlimited strings are *extremely* useful in some
>> applications. I remember bitterly cursing Java's string length limit of
>> 2 ** 31 (maybe - 1) on multiple occasions. Python's strings seem to
>> behave like integers in that their size is limited only by available memory.
> Hmm, I don't know that you'll get much beyond 2**31 characters (even
> all-ASCII characters in PEP 393) on a 32-bit Python, simply because
> "available memory" is capped at 2**32 bytes minus other stuff. You'd
> need a 64-bit Python to do that, and I would guess a 64-bit Java would
> also raise the limit.
>
> ChrisA
No, Java's String.length returns an int and Strings are limited to ~2 **
31 characters even in 64-bit Java.

I do seem to have encountered some strange behavior, though: creating
very large strings with str.__mul__ seems to enter an allocation loop in
Python 3.4. With a single-character string 's', I can create the
following new strings quickly:

s * 2 ** 33
s * 2 ** 34
s * 2 ** 35
s * 2 ** 36

but s * 2 ** 38 shows some odd memory usage. I'm watching the memory
usage of a Python process steadily increase to 256GB, drop to a few MB,
climb back to 256GB, drop to a few MB, and so on. It takes a half-dozen
cycles of allocation and deallocation before the interactive interpreter
gives me another prompt.

MMR...

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-21 Thread Alan Bawden
Chris Angelico  writes:
> ..., and I would guess a 64-bit Java would
> also raise the limit.

Even in a 64-bit Java, the _type_ returned by String.length() is 'int',
and is thus at most (2**31 - 1).  This isn't a problem for strings,
which never get that long in practice, but for some other Java datatypes
(e.g., Buffer) it is a real problem.  Score one for untyped languages.

-- 
Alan Bawden
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-21 Thread Chris Angelico
On Thu, Jan 22, 2015 at 8:20 AM, Matthew Ruffalo  wrote:
> Yes, length-unlimited strings are *extremely* useful in some
> applications. I remember bitterly cursing Java's string length limit of
> 2 ** 31 (maybe - 1) on multiple occasions. Python's strings seem to
> behave like integers in that their size is limited only by available memory.

Hmm, I don't know that you'll get much beyond 2**31 characters (even
all-ASCII characters in PEP 393) on a 32-bit Python, simply because
"available memory" is capped at 2**32 bytes minus other stuff. You'd
need a 64-bit Python to do that, and I would guess a 64-bit Java would
also raise the limit.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-21 Thread Matthew Ruffalo
On 01/21/2015 02:06 PM, Chris Angelico wrote:
> On Thu, Jan 22, 2015 at 5:20 AM, Irmen de Jong  wrote:
>> On 21-1-2015 18:59, Steve Hayes wrote:
>>
>>> 3. When I started to look at it, I found that strings could be any length 
>>> and
>>> were not limited to swomething arbitrary, like 256 characters.
>> Even more fun is that Python's primitive integer type (longs for older 
>> Python versions)
>> has no arbitrary limitation either.
>>
>> That amazed me at the time I discovered python :)
> I hadn't worked with length-limited strings in basically forever
> (technically BASIC has a length limit, but I never ran into it; and I
> never did much with Pascal), but you're right, arbitrary-precision
> integers would have impressed me a lot more if I hadn't first known
> REXX. So... is there a way to show that off efficiently? Normally, any
> calculation that goes beyond 2**32 has already gone way beyond most
> humans' ability to hold the numbers in their heads.
>
> ChrisA
Yes, length-unlimited strings are *extremely* useful in some
applications. I remember bitterly cursing Java's string length limit of
2 ** 31 (maybe - 1) on multiple occasions. Python's strings seem to
behave like integers in that their size is limited only by available memory.

MMR...
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-21 Thread André Roberge
On Wednesday, 21 January 2015 15:06:33 UTC-4, Chris Angelico  wrote:
> On Thu, Jan 22, 2015 at 5:20 AM, Irmen de Jong  wrote:
> > On 21-1-2015 18:59, Steve Hayes wrote:
> >
> >> 3. When I started to look at it, I found that strings could be any length 
> >> and
> >> were not limited to swomething arbitrary, like 256 characters.
> >
> > Even more fun is that Python's primitive integer type (longs for older 
> > Python versions)
> > has no arbitrary limitation either.
> >
> > That amazed me at the time I discovered python :)
> 
> I hadn't worked with length-limited strings in basically forever
> (technically BASIC has a length limit, but I never ran into it; and I
> never did much with Pascal), but you're right, arbitrary-precision
> integers would have impressed me a lot more if I hadn't first known
> REXX. So... is there a way to show that off efficiently? 

How about:

 >>> def fac(n):
 ... ans = 1
 ... while n > 1:
 ... ans *= n
 ... n -= 1
 ... return ans
 ...
 >>> a = fac(100)
 >>> a
 
9332621544394415268169923885626670049071596826438162146859296389521753229915608941463976156518286253697920827223758251185210916864
 >>> b = fac(102)
 >>> b
 
961446671503512660926865558697259548455355905059659464369444714048531715130254590603314961882364451384985595980362059157503710042865532928
 >>> b//a
 10302
 >>> b//a == 102 * 101
 True

André


Normally, any
> calculation that goes beyond 2**32 has already gone way beyond most
> humans' ability to hold the numbers in their heads.
> 
> ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-21 Thread Mario Figueiredo

Chris,


Scenario: You're introducing someone to Python for the first time.
S/he may have some previous programming experience, or may be new to
the whole idea of giving a computer instructions. You have a couple of
minutes to show off how awesome Python is. What do you do?


Some ideas where given by others already. I especially liked the variable 
swap one liner by Emile van Sebille. That's a little simple gem that will 
impress any seasoned developer of other programming languages.


But speaking about impressing more experient programmers, I personally don't 
think Python has a wow factor in any of its features and syntax. At least 
in the way I understand the word "wow". Python shares its own brand of idiosyncracies 
with any other programming languages. Little gotchas and caveats that have 
you scratch your head and sometimes annoy you slightly. Python is it too 
cropped here and there with things worth criticizing.


Meanwhile some of its interesting language features, like Comprehensions 
and Generators, aren't really that impressive to a seasoned developer of 
functional programming languages or programming languages like C# with its 
highly powerful and expressive LINQ.


This means that, alone, Python won't really standout. But this is ok. No 
language does it on the merits of its syntax or feature set.


What does make Python standout in my opinion -- what gave me the wow -- is 
its interoperability. Here we have a general purpose scripting language with 
more hooks to other systems that any other programming language in existence. 
With just Python, I can build a modern GUI interface on any of the most popular 
operating systems, use it on PostgreSQL to build stored procedures and move 
most of my business rules to the database server and attach dynamic behavior 
to a system developed in some other programming language.



I apologize if my post was to long, but I lacked the time to make it shorter.


--
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-21 Thread Chris Angelico
On Thu, Jan 22, 2015 at 5:20 AM, Irmen de Jong  wrote:
> On 21-1-2015 18:59, Steve Hayes wrote:
>
>> 3. When I started to look at it, I found that strings could be any length and
>> were not limited to swomething arbitrary, like 256 characters.
>
> Even more fun is that Python's primitive integer type (longs for older Python 
> versions)
> has no arbitrary limitation either.
>
> That amazed me at the time I discovered python :)

I hadn't worked with length-limited strings in basically forever
(technically BASIC has a length limit, but I never ran into it; and I
never did much with Pascal), but you're right, arbitrary-precision
integers would have impressed me a lot more if I hadn't first known
REXX. So... is there a way to show that off efficiently? Normally, any
calculation that goes beyond 2**32 has already gone way beyond most
humans' ability to hold the numbers in their heads.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-21 Thread André Roberge
On Friday, 16 January 2015 11:04:20 UTC-4, Chris Angelico  wrote:
> Scenario: You're introducing someone to Python for the first time.
> S/he may have some previous programming experience, or may be new to
> the whole idea of giving a computer instructions. You have a couple of
> minutes to show off how awesome Python is. What do you do?
> 
> I was thinking along the lines of a simple demo in the REPL, showing
> off some of Python's coolest features. But then I got stuck on the
> specifics. What are Python's best coolnesses? What makes for a good
> demo?
> 
> Ideally, this should be something that can be demo'd quickly and
> easily, and it should be impressive without going into great details
> of "and see, this is how it works on the inside". So, how would you
> brag about this language?
> 
> ChrisA
If you are willing to install an older version of Python (because the program I 
am going to mention has not been updated in years ... but it *should* work with 
2.6), I'm going to suggest an odd one:  Crunchy!  (ok, I'm biased :-).

The home page is at https://code.google.com/p/crunchy/ where you can find a 
link to some screencasts (based on an even older version ...)   So, before you 
install anything, just have a quick look at the screencast to see if it's 
worthwhile.

A demo using Crunchy seems to  be even more impressive if the person knows some 
programming.

(Here is what was said about an even older version of Crunchy by people at the 
Omaha Python group: " Jeff gave a presentation on Crunchy ([WWW]
http://crunchy.sourceforge.net/) Talk about a gee whiz app."  
[https://mail.python.org/pipermail/omaha/2007-July/65.html])

In a nutshell, I would open the official Python tutorial in my browser, showing 
the official Python tutorial.   (boring)

Then, I would open the exact same page using a browser tab served by Crunchy: 
"magically" some text-input boxes would have been inserted allowing you to try 
out the code in the REPL provided by Crunchy.  Then I'd use Crunchy to launch 
an external app (perhaps a tkinter program), etc.

As I said at the beginning, Crunchy has not been updated in *years* ... more or 
less since the IPython and Sage notebooks came along...

André
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-21 Thread Irmen de Jong
On 21-1-2015 18:59, Steve Hayes wrote:

> 3. When I started to look at it, I found that strings could be any length and
> were not limited to swomething arbitrary, like 256 characters. 

Even more fun is that Python's primitive integer type (longs for older Python 
versions)
has no arbitrary limitation either.

That amazed me at the time I discovered python :)

Irmen

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-21 Thread Steve Hayes
On Sat, 17 Jan 2015 02:03:57 +1100, Chris Angelico  wrote:

>Scenario: You're introducing someone to Python for the first time.
>S/he may have some previous programming experience, or may be new to
>the whole idea of giving a computer instructions. You have a couple of
>minutes to show off how awesome Python is. What do you do?
>
>I was thinking along the lines of a simple demo in the REPL, showing
>off some of Python's coolest features. But then I got stuck on the
>specifics. What are Python's best coolnesses? What makes for a good
>demo?
>
>Ideally, this should be something that can be demo'd quickly and
>easily, and it should be impressive without going into great details
>of "and see, this is how it works on the inside". So, how would you
>brag about this language?

I can only say what made me sit up and take notice.

1. I found it already on my computer. 
2. It seemed to be used to run the Gramps genealogy program, which is quite
complex. I was impressed. 
3. When I started to look at it, I found that strings could be any length and
were not limited to swomething arbitrary, like 256 characters. 



-- 
Steve Hayes from Tshwane, South Africa
Web:  http://www.khanya.org.za/stevesig.htm
Blog: http://khanya.wordpress.com
E-mail - see web page, or parse: shayes at dunelm full stop org full stop uk
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-19 Thread Ned Batchelder

On 1/16/15 10:03 AM, Chris Angelico wrote:

Scenario: You're introducing someone to Python for the first time.
S/he may have some previous programming experience, or may be new to
the whole idea of giving a computer instructions. You have a couple of
minutes to show off how awesome Python is. What do you do?

I was thinking along the lines of a simple demo in the REPL, showing
off some of Python's coolest features. But then I got stuck on the
specifics. What are Python's best coolnesses? What makes for a good
demo?

Ideally, this should be something that can be demo'd quickly and
easily, and it should be impressive without going into great details
of "and see, this is how it works on the inside". So, how would you
brag about this language?

ChrisA



Peter Norvig's spell corrector is a compact example of a lot of Python 
power: http://norvig.com/spell-correct.html


I used it as a walk-through example for a presentation about Python at 
the DevDays conference: http://nedbatchelder.com/text/devdays.html


The second half of the presentation is a 25-line nano-templating engine 
which shows off some other good characteristics of the language.


--
Ned Batchelder, http://nedbatchelder.com

--
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-18 Thread alex23

On 17/01/2015 1:03 AM, Chris Angelico wrote:

Scenario: You're introducing someone to Python for the first time.
S/he may have some previous programming experience, or may be new to
the whole idea of giving a computer instructions. You have a couple of
minutes to show off how awesome Python is. What do you do?


When demoing to people with a reasonable amount of experience, I've 
found they're often impressed by showing them list comprehensions, then 
generators, then chained generators.


--
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-16 Thread Emile van Sebille

On 1/16/2015 9:44 AM, Chris Angelico wrote:

> exact line of code that would

show off Python's awesomeness.



a,b = b,a


Emile


--
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-16 Thread Tim Chase
On 2015-01-17 02:03, Chris Angelico wrote:
> Ideally, this should be something that can be demo'd quickly and
> easily, and it should be impressive without going into great details
> of "and see, this is how it works on the inside". So, how would you
> brag about this language?

First, I agree with Andrew Berg's suggestion about the breadth of the
stdlib.  This always irks me when I have to return to the C/C++
world where there's no standard library for things like networking
(and thus no stock libraries for IMAP, SMTP, HTTP, FTP, etc or
email-message handling), CSV processing, regular expressions,
zip/tar/zlib files, SHA1/MD5, command-line option processing,
threading, and no available-everywhere GUI.  In the Java world, it
feels like much of this is available, but that the glommed-on
standards have multiple ways to do them (the old way(s) and the
new/improved way).  In PHP, well...that's just PHP (difficult-to-grok
equality testing, inconsistent naming conventions and parameter
ordering, lack of namespacing, easy-to-screw-up string interpolation,
hacky OOP, etc).

My fast-introduction go-to items are dir() and help() within the REPL
interface.  Nothing speeds up my development like being able to
drop to a PDB prompt and inspect an object, ask what properties it
supports, dump them, get help on them, etc.

There's also the bigint stuff that means I don't have to worry about
over/underflow errors.

I'm sure there are more great ideas, but how you market might depend
on your audience's background in programming (what language did they
use and what pain-points did they experience).

-tkc


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-16 Thread Chris Angelico
On Sat, Jan 17, 2015 at 4:31 AM, Rustom Mody  wrote:
> Nice point!
> First class concrete data structures is a blessing especially for
> a C programmer.

Definitely! Worth noting.

There've been some nice concepts mentioned; concrete suggestions would
be good too. Some specific feature or exact line of code that would
show off Python's awesomeness.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-16 Thread Rustom Mody
On Friday, January 16, 2015 at 10:51:52 PM UTC+5:30, Mirage Web Studio wrote:
> On 01/16/2015 08:33 PM, Chris Angelico wrote:
> > Scenario: You're introducing someone to Python for the first time.
> > S/he may have some previous programming experience, or may be new to
> > the whole idea of giving a computer instructions. You have a couple of
> > minutes to show off how awesome Python is. What do you do?
> >
> > I was thinking along the lines of a simple demo in the REPL, showing
> > off some of Python's coolest features. But then I got stuck on the
> > specifics. What are Python's best coolnesses? What makes for a good
> > demo?
> >
> > Ideally, this should be something that can be demo'd quickly and
> > easily, and it should be impressive without going into great details
> > of "and see, this is how it works on the inside". So, how would you
> > brag about this language?
> >
> > ChrisA
> 
> hello,
> 
> I am a newbie to python, I have dwelled in c,qt none in java. php a lot,
> though I don't make money with any of those.
> 
> The best thing I find is python is very easy, the best part maybe
> because of my inexperience with other languages are the List and Dict
> data types that just solved problems I had in real life made solvable
> with python very easily. when I had to worry about memory and pointers
> to memory in those other languages, python just made me focus on the
> solution I want. 

Nice point!
First class concrete data structures is a blessing especially for
a C programmer.

Here is an old Guido workout of dicts
https://www.python.org/doc/essays/graphs/

Probably can be improved to use comprehensions
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-16 Thread Albert-Jan Roskam


On Fri, Jan 16, 2015 4:24 PM CET Andrew Berg wrote:

>On 2015.01.16 09:03, Chris Angelico wrote:
>> Scenario: You're introducing someone to Python for the first time.
>> S/he may have some previous programming experience, or may be new to
>> the whole idea of giving a computer instructions. You have a couple of
>> minutes to show off how awesome Python is. What do you do?
>> 
>> I was thinking along the lines of a simple demo in the REPL, showing
>> off some of Python's coolest features. But then I got stuck on the
>> specifics. What are Python's best coolnesses? What makes for a good
>> demo?
>> 
>> Ideally, this should be something that can be demo'd quickly and
>> easily, and it should be impressive without going into great details
>> of "and see, this is how it works on the inside". So, how would you
>> brag about this language?
>If the person is already familiar with programming, you could show off how
>Python doesn't do a best effort guess at what to do when you make a mistake
>(explicit is better than implicit). Many other languages will, for example,
>make an undefined variable into a variable defined as an empty string or allow
>silly things like 5 + "cheese", whereas Python will let you know that you made
>a mistake somewhere instead of letting garbage propagate. This behavior can be
>frustrating for newbies to Python, but with someone there to explain why it
>works that way, they can learn to appreciate it instead of giving up in anger
>after Python keeps throwing exceptions at them.
>
>If the person is not familiar with programming, show them how easy it is to get
>something useful written quickly, even with only the stdlib

Completely agree! Find out that person's itch and make a scratch.py that shows 
how problem-oriented the language is, with code that somewhat reads like 
regular English. REPL will also work, if you prepare it well enough. Ipython 
Notebook!


>Low-level details
>are handled so that you can focus on what you want the program to do, and there
>is a ton of stuff in the stdlib so that it's likely you don't need to go
>searching for a bunch of different libraries so that again, you can focus what
>you want the program to do. For this, chances are, that person has some things
>in mind already that are not difficult to get started with using Python. Also,
>using the REPL for this makes it an even better demo. You can probably have the
>basic functionality of whatever cool thing they want right there in the REPL.
>-- 
>https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-16 Thread Mirage Web Studio

On 01/16/2015 08:33 PM, Chris Angelico wrote:
> Scenario: You're introducing someone to Python for the first time.
> S/he may have some previous programming experience, or may be new to
> the whole idea of giving a computer instructions. You have a couple of
> minutes to show off how awesome Python is. What do you do?
>
> I was thinking along the lines of a simple demo in the REPL, showing
> off some of Python's coolest features. But then I got stuck on the
> specifics. What are Python's best coolnesses? What makes for a good
> demo?
>
> Ideally, this should be something that can be demo'd quickly and
> easily, and it should be impressive without going into great details
> of "and see, this is how it works on the inside". So, how would you
> brag about this language?
>
> ChrisA

hello,

I am a newbie to python, I have dwelled in c,qt none in java. php a lot,
though I don't make money with any of those.

The best thing I find is python is very easy, the best part maybe
because of my inexperience with other languages are the List and Dict
data types that just solved problems I had in real life made solvable
with python very easily. when I had to worry about memory and pointers
to memory in those other languages, python just made me focus on the
solution I want. also the way I can read python program just like they
are written in plain eglish :)

a personal problem I tried to solve is that how many characters  exist
in  a sequence statistically (with 2 or more characters in len)  in any
given file and then their count.  For a 100kb file I used practially all
programming knowledge in from the other languages but failed miserably
as the computation were taking more time with each bigger chunck of
file. I would have to do a lot of memery management with python using
those style like deleting list and dict before adding another. but when
I tried to solve the problem natively with python it just took a blink
of an eye for them to solve upto 50kb file. but for larger files
although instant it is just memory consuming since I was limit with 2 gb
I ddin't poke further.

this was my exp and I find programming fun in python like ironman
talking to jarvis

keep computing!!!

GCM
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-16 Thread Rustom Mody
On Friday, January 16, 2015 at 8:34:20 PM UTC+5:30, Chris Angelico wrote:
> Scenario: You're introducing someone to Python for the first time.
> S/he may have some previous programming experience, or may be new to
> the whole idea of giving a computer instructions. You have a couple of
> minutes to show off how awesome Python is. What do you do?

There is this story -- maybe apocryphal -- that the tendency to vote
democratic or republican runs so deep it can be detected from 
genetic markers.

Similar things apply to programming:
Some people are drawn to a mathematical style; some are not
Some people love cute little scripts; some are left cold
Some love graphics; some dislike
etc etc
All corollary to:
Some people can think like programmers; most cant
[Who does the last quote? Steve Jobs?]

So to start with, you need to 'fingerprint' (is that the word?)
your subject.

> 
> I was thinking along the lines of a simple demo in the REPL, showing
> off some of Python's coolest features. But then I got stuck on the
> specifics. What are Python's best coolnesses? What makes for a good
> demo?

The reason I find the REPL particularly cool for such demos
[I am surprised that Marko doesn't]
is that at least to some extent you can straddle some of the
divides above.

How about a little web-scrape with beautiful-soup?
Followed by maybe a "throw the results into a csv-file
and open in the local spreadsheet"?

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-16 Thread Marco Buttu

On 16/01/2015 16:03, Chris Angelico wrote:

Scenario: You're introducing someone to Python for the first time.
S/he may have some previous programming experience, or may be new to
the whole idea of giving a computer instructions. You have a couple of
minutes to show off how awesome Python is. What do you do?


The batteries included: some useful and simple examples with only core 
data type objects, built-in functions and standard library


--
Marco Buttu

INAF-Osservatorio Astronomico di Cagliari
Via della Scienza n. 5, 09047 Selargius (CA)
Phone: 070 711 80 217
Email: mbu...@oa-cagliari.inaf.it

--
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-16 Thread Marko Rauhamaa
Chris Angelico :

> Scenario: You're introducing someone to Python for the first time.
> S/he may have some previous programming experience, or may be new to
> the whole idea of giving a computer instructions. You have a couple of
> minutes to show off how awesome Python is. What do you do?

My experience is that if you have your "customer" try their hand on
programming and complete a simple challenge, they'll be extremely
impressed. "Did I manage that?"

On the other hand, if you want to demo your greatest achievements at the
screen, they will be left unmoved. "Even my favorite Zynga game looks
cooler than that."

> I was thinking along the lines of a simple demo in the REPL, showing
> off some of Python's coolest features. But then I got stuck on the
> specifics. What are Python's best coolnesses? What makes for a good
> demo?

I would advise steering clear of the REPL and go directly to writing a
program and executing it. Maybe the classic ASCII graphics presentation
of the sine wave:


#!/usr/bin/env python3

import time
import math

def main():
for angle in range(0, 10, 5):
print(int((1 + math.sin(math.radians(angle))) * 35) * "*")
time.sleep(0.1)

if __name__ == "__main__":
main()


> Ideally, this should be something that can be demo'd quickly and
> easily, and it should be impressive without going into great details
> of "and see, this is how it works on the inside". So, how would you
> brag about this language?

I'd recommend not skipping the traditional boilerplate (see my example).
Be professional from the start.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-16 Thread Andrew Berg
On 2015.01.16 09:03, Chris Angelico wrote:
> Scenario: You're introducing someone to Python for the first time.
> S/he may have some previous programming experience, or may be new to
> the whole idea of giving a computer instructions. You have a couple of
> minutes to show off how awesome Python is. What do you do?
> 
> I was thinking along the lines of a simple demo in the REPL, showing
> off some of Python's coolest features. But then I got stuck on the
> specifics. What are Python's best coolnesses? What makes for a good
> demo?
> 
> Ideally, this should be something that can be demo'd quickly and
> easily, and it should be impressive without going into great details
> of "and see, this is how it works on the inside". So, how would you
> brag about this language?
If the person is already familiar with programming, you could show off how
Python doesn't do a best effort guess at what to do when you make a mistake
(explicit is better than implicit). Many other languages will, for example,
make an undefined variable into a variable defined as an empty string or allow
silly things like 5 + "cheese", whereas Python will let you know that you made
a mistake somewhere instead of letting garbage propagate. This behavior can be
frustrating for newbies to Python, but with someone there to explain why it
works that way, they can learn to appreciate it instead of giving up in anger
after Python keeps throwing exceptions at them.

If the person is not familiar with programming, show them how easy it is to get
something useful written quickly, even with only the stdlib. Low-level details
are handled so that you can focus on what you want the program to do, and there
is a ton of stuff in the stdlib so that it's likely you don't need to go
searching for a bunch of different libraries so that again, you can focus what
you want the program to do. For this, chances are, that person has some things
in mind already that are not difficult to get started with using Python. Also,
using the REPL for this makes it an even better demo. You can probably have the
basic functionality of whatever cool thing they want right there in the REPL.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to "wow" someone new to Python

2015-01-16 Thread Skip Montanaro
If you want to show off the REPL, I'd got for iPython and show them some
simple matplotlib examples (plotting sin waves, maybe dig up a CSV file on
the net with some data your friend is familiar with, etc)

Skip


On Fri, Jan 16, 2015 at 9:03 AM, Chris Angelico  wrote:

> Scenario: You're introducing someone to Python for the first time.
> S/he may have some previous programming experience, or may be new to
> the whole idea of giving a computer instructions. You have a couple of
> minutes to show off how awesome Python is. What do you do?
>
> I was thinking along the lines of a simple demo in the REPL, showing
> off some of Python's coolest features. But then I got stuck on the
> specifics. What are Python's best coolnesses? What makes for a good
> demo?
>
> Ideally, this should be something that can be demo'd quickly and
> easily, and it should be impressive without going into great details
> of "and see, this is how it works on the inside". So, how would you
> brag about this language?
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


How to "wow" someone new to Python

2015-01-16 Thread Chris Angelico
Scenario: You're introducing someone to Python for the first time.
S/he may have some previous programming experience, or may be new to
the whole idea of giving a computer instructions. You have a couple of
minutes to show off how awesome Python is. What do you do?

I was thinking along the lines of a simple demo in the REPL, showing
off some of Python's coolest features. But then I got stuck on the
specifics. What are Python's best coolnesses? What makes for a good
demo?

Ideally, this should be something that can be demo'd quickly and
easily, and it should be impressive without going into great details
of "and see, this is how it works on the inside". So, how would you
brag about this language?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


wow !!

2010-06-13 Thread reader


Excuse me!!
Would you stop for a moment?!
O...man...Haven't you thought-one day- about yourself ?
Who has made it?
Have you seen a design which hasn't a designer ?!
Have you seen a wonderful,delicate work without a worker ?!
It's you and the whole universe!..
Who has made them all ?!!
You know who ?.. It's "ALLAH",prise be to him.
Just think for a moment.
How are you going to be after death ?!
Can you believe that this exact system of the universe and all of
these great creation will end in in nothing...just after death!
Have you thought, for a second, How to save your soul from Allah's
punishment?!
Haven't you thought about what is the right religion?!
Read ... and think deeply before you answer..
It is religion of Islam.
It is the religion that Mohammad-peace upon him- the last prophet, had
been sent by.
It is the religion that the right Bible- which is not distorted-has
preached.
Just have a look at The Bible of (Bernaba).
Don't be emstional.
Be rational and judge..
Just look..listen...compare..and then judge and say your word.
We advise you visiting :
http://www.islam-guide.com/
http://www.thetruereligion.org/
http://www.beconvinced.com/
http://english.islamway.com/
http://www.todayislam.com/
http://www.islamtoday.net/english/
http://www.islamunveiled.org/
http://www.al-sunnah.com/
http://www.islamic-knowledge.com/
-- 
http://mail.python.org/mailman/listinfo/python-list


wow patch downloads

2008-04-22 Thread hobgoodoreneyhb
wow patch downloads

http://cracks.12w.net


F
R
E
E


C
R
A
C
K
S
--
http://mail.python.org/mailman/listinfo/python-list


www.eBankGame.com Buy WoW gold RS gold WG k gold Lotro gold

2007-07-15 Thread www.ebankgame.com
www.eBankGame.com Buy WoW gold RS gold WG k gold Lotro gold

http://www.eBankGame.com (w w w .e BankGame . c o m ) As you might or
might not known that Taiwan earthquake has caused most of supplier are
experiencing the serve problem to process the gold.
However, eBankGame is always stay line with all the game players to
help you guys to enjoy the game at any time. We provide Gold Farmer
service for you to own the gold with little bit expense. Your expense
will be more valuable by take one action and gain multiple purposes.
The service is focus on gold farming for your character in the game
by
using professional human player to taking tasks and gain reputation in
the game in order to gain the gold for you (We do not apply any plug-
in or Bots on your character). Meanwhile your character will
beimproved 1-15 power leveling which depends on your original
level(this aspect is not available for Level 60). www.eBankGame.com (w
w w .e BankGame . c o m)


1.The Fastest Delivery Speed on all Servers in 1-8 hours since your
payment arrives.If the deliver is delayed over 8 hours, you will get
5% extra gold for the late.Or you can request a refund.


2.Special Discount Servers.Sometimes, there will be some servers,
with
special discounts, with extremely NICE PRice on some certain servers.


3.Perfect Service.24 hours service with various contact methods: MSN,
ICQ, Online Chat on Web homepage,Welcome to www.eBankGame.com
If any problem, please contact us asap!


Happy shopping!
Sincerely,


http://www.eBankGame.com


E-mail:[EMAIL PROTECTED]
MSN:[EMAIL PROTECTED]
ICQ:468873592


Choose your game
World of Warcraft EU
World of Warcraft US
Lord of The Rings Online EU
Lord of The Rings Online US
Lineage II
EverQuest2
Guild Wars
Final Fantacy XI
Runescape 2
RFO Online
Dungeons & Dragons Online
Eve Online
Star Wars Galaxies



go to http://www.eBankGame.com

-- 
http://mail.python.org/mailman/listinfo/python-list

www.eBankGame.com Buy WoW gold RS gold WG k gold

2007-05-21 Thread ebankgame.com
www.eBankGame.com Buy WoW gold RS gold WG k gold

www.eBankGame.com (w w w .e BankGame . c o m )
As you might or might not known that Taiwan earthquake has caused most
of supplier are experiencing the serve problem to process the gold.
However, eBankGame is always stay line with all the game players to
help you guys to enjoy the game at any time. We provide Gold Farmer
service for you to own the gold with little bit expense. Your expense
will be more valuable by take one action and gain multiple purposes.
The service is focus on gold farming for your character in the game by
using professional human player to taking tasks and gain reputation in
the game in order to gain the gold for you (We do not apply any plug-
in or Bots on your character). Meanwhile your character will be
improved 1-15 power leveling which depends on your original level
(this aspect is not available for Level 60). www.eBankGame.com (w w
w .e BankGame . c o m)


1.The Fastest Delivery Speed on all Servers in 1-8 hours since your
payment arrives.If the deliver is delayed over 8 hours, you will get
5% extra gold for the late.Or you can request a refund.


2.Special Discount Servers.Sometimes, there will be some servers,
with
special discounts, with extremely NICE PRice on some certain servers.


3.Perfect Service.24 hours service with various contact methods: MSN,
ICQ, Online Chat on Web homepage,Welcome to www.eBankGame.com
If any problem, please contact us asap!



Happy shopping!
Sincerely,

www.eBankGame.com

E-mail:[EMAIL PROTECTED]
MSN:[EMAIL PROTECTED]
ICQ:468873592

Choose your game
World of Warcraft EU
World of Warcraft US
Lord of The Rings EU
Lord of The Rings US
Lineage II
EverQuest2
Guild Wars
Final Fantacy XI
Runescape 2
RFO Online
Dungeons & Dragons Online
Eve Online
Star Wars Galaxies

go to  www.eBankGame.com

-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Wow, Python much faster than MatLab

2007-01-01 Thread Wensui Liu
Gerry,

I have the similar background as yours, many years using SAS/R. Right
now I am trying to pick up python.

>From your point, is there anything that can be done with python easily
but not with SAS/R?

thanks for your insight.

wensui

On 1/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> We're not so far apart.
>
> I've used SAS or 25 years, and R/S-PLUS for 10.
>
> I think you've said it better than I did, though: R requires more attention
> (which is often needed).
>
> I certainly didn't mean that R crashed - just an indictment of how much I
> thought I was holding in my head.
>
> Gerry
> --
> http://mail.python.org/mailman/listinfo/python-list
>


-- 
WenSui Liu
A lousy statistician who happens to know a little programming
(http://spaces.msn.com/statcompute/blog)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wow, Python much faster than MatLab

2007-01-01 Thread gblais
We're not so far apart.

I've used SAS or 25 years, and R/S-PLUS for 10.

I think you've said it better than I did, though: R requires more attention
(which is often needed).

I certainly didn't mean that R crashed - just an indictment of how much I
thought I was holding in my head.

Gerry
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wow, Python much faster than MatLab

2006-12-31 Thread sturlamolden

Klaas wrote:
> C/C++ do not allocate extra arrays.  What you posted _might_ bear a
> small resemblance to what numpy might produce (if using vectorized
> code, not explicit loop code).  This is entirely unrelated to the
> reasons why fortran can be faster than c.

Array libraries in C++ that use operator overloading produce
intermediate arrays for the same reason as NumPy. There is a C++
library that are sometimes able to avoid intermediates (Blitz++), but
it can only do so for small arrays for which bounds are known at
compile time.

Operator overloading is sometimes portrayed as required for scientific
computing (e.g. in Java vs. C# flame wars), but the cure can be worse
than the disease.

C does not have operator overloading and is an entirely different case.
You can of course avoid intermediates in C++ if you use C++ as C. You
can do that in Python as well.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wow, Python much faster than MatLab

2006-12-31 Thread Klaas

sturlamolden wrote:

> as well as looping over the data only once. This is one of the main
> reasons why Fortran is better than C++ for scientific computing. I.e.
> instead of
>
> for (i=0; i   array1[i] = (array1[i] + array2[i]) * (array3[i] + array4[i]);
>
> one actually gets something like three intermediates and four loops:
>
> tmp1 = malloc(n*sizeof(whatever));
> for (i=0; itmp1[i] = array1[i] + array2[i];
> tmp2 = malloc(n*sizeof(whatever));
> for (i=0; itmp2[i] = array3[i] + array4[i];
> tmp3 = malloc(n*sizeof(whatever));
> for (i=0; itmp3[i] = tmp1[i] + tmp2[i];
> free(tmp1);
> free(tmp2);
> for (i=0; i   array1[i]  = tmp3[i];
> free(tmp3);

C/C++ do not allocate extra arrays.  What you posted _might_ bear a
small resemblance to what numpy might produce (if using vectorized
code, not explicit loop code).  This is entirely unrelated to the
reasons why fortran can be faster than c.

-Mike

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wow, Python much faster than MatLab

2006-12-30 Thread Robert Kern
sturlamolden wrote:
> array3[:] = array1[:] + array2[:]

OT, but why are you slicing array1 and array2? All that does is create new array
objects pointing to the same data.

> Now for my question: operator overloading is (as shown) not the
> solution to efficient scientific computing. It creates serious bloat
> where it is undesired. Can NumPy's performance be improved by adding
> the array types to the Python language it self? Or are the dynamic
> nature of Python preventing this?

Pretty much. Making the array types builtin rather than from a third party
module doesn't really change anything. However, if type inferencing tools like
psyco are taught about numpy arrays like they are already taught about ints,
then one could do make it avoid temporaries.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wow, Python much faster than MatLab

2006-12-30 Thread sturlamolden

Wensui Liu wrote:

> doing. However, that is not the fault of excel/spss itself but of
> people who is using it.

Yes and no. I think SPSS makes it too tempting. Like children playing
with fire, they may not even know it's dangerous. You can do an GLM in
SPSS by just filling out a form - but how many social scientists or MDs
know anything about general linear models?

The command line interface of MySQL, SAS, Matlab and R makes an
excellent deterrent. All statistical tool can be misused. But the
difference is accidental and deliberate misuse. Anyone can naviagte a
GUI, but you need to know you want to do an ANOVA before you can think
of typing "anova" on the command line.

You mentioned use of Excel as database. That is another example,
although it has more to do with data security and integrity, and
sometimes protection of privacy. Many companies have banned the use of
Microsoft Access, as employees were building their own mock up
databases - thus migrating these Access databases to an even worse
solution (Excel). 

Sturla Molden

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wow, Python much faster than MatLab

2006-12-30 Thread sturlamolden

Stef Mientki wrote:

> MatLab: 14 msec
> Python:  2 msec

I have the same experience. NumPy is usually faster than Matlab. But it
very much depends on how the code is structured.

I wonder if it is possible to improve the performance of NumPy by
having its fundamental types in the language, instead of depending on
operator overloading. For example, in NumPy, a statement like

array3[:] = array1[:] + array2[:]

allocates an intermediate array that is not needed. This is because the
operator overloading cannot know if it's evaluating a part of a larger
statement like

array1[:] = (array1[:] + array2[:]) * (array3[:] + array4[:])

If arrays had been a part of the language, as it is in Matlab and
Fortran 95, the compiler could see this and avoid intermediate storage,
as well as looping over the data only once. This is one of the main
reasons why Fortran is better than C++ for scientific computing. I.e.
instead of

for (i=0; ihttp://mail.python.org/mailman/listinfo/python-list


Re: Wow, Python much faster than MatLab

2006-12-30 Thread Wensui Liu
Sturla,

I am working in the healthcare and seeing people loves to use excel /
spss as database or statistical tool without know what he/she is
doing. However, that is not the fault of excel/spss itself but of
people who is using it. Things, even include SAS/R, would look stupid,
when it has been misused.

In the hospitals, people don't pray God. They pray MD. :-)

On 30 Dec 2006 19:09:59 -0800, sturlamolden <[EMAIL PROTECTED]> wrote:
>
> Stef Mientki wrote:
>
> > I always thought that SPSS or SAS where thé standards.
> > Stef
>
> As far as SPSS is a standard, it is in the field of "religious use of
> statistical procedures I don't understand (as I'm a math retard), but
> hey p<0.05 is always significant (and any other value is proof of the
> opposite ... I think)."
>
> SPSS is often used by scientists that don't understand maths at all,
> often within the fields of social sciences, but regrettably also within
> biology and medicine. I know of few program that have done so much harm
> as SPSS. It's like handing an armed weapon to a child. Generally one
> should stay away from the things that one don't understand,
> particularly within medicine where a wrong result can have dramatic
> consequences. SPSS encourages the opposite. Copy and paste from Excel
> to SPSS is regrettably becoming the de-facto standard in applied
> statistics. The problem is not the quality of Excel or SPSS, but rather
> the (in)competence of those conducting the data analysis. This can and
> does regrettably lead to serious misinterpretation of the data, in
> either direction. When a paper is submitted, these errors are usually
> not caught in the peer review process, as peer review is, well, exactly
> what is says: *peer* review.
>
> Thus, SPSS makes it easy to shoot your self in the foot. In my
> experience students in social sciences and medicine are currently
> thought to do exact that, in universities and colleges all around the
> World. And it is particularly dangerous within medical sciences, as
> peoples' life and health may be affected by it. I pray God something is
> done to prohibit or limit the use of these statistical toys.
>
>
> Sturla Molden
> PhD
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>


-- 
WenSui Liu
A lousy statistician who happens to know a little programming
(http://spaces.msn.com/statcompute/blog)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wow, Python much faster than MatLab

2006-12-30 Thread sturlamolden

Stef Mientki wrote:

> I always thought that SPSS or SAS where thé standards.
> Stef

As far as SPSS is a standard, it is in the field of "religious use of
statistical procedures I don't understand (as I'm a math retard), but
hey p<0.05 is always significant (and any other value is proof of the
opposite ... I think)."

SPSS is often used by scientists that don't understand maths at all,
often within the fields of social sciences, but regrettably also within
biology and medicine. I know of few program that have done so much harm
as SPSS. It's like handing an armed weapon to a child. Generally one
should stay away from the things that one don't understand,
particularly within medicine where a wrong result can have dramatic
consequences. SPSS encourages the opposite. Copy and paste from Excel
to SPSS is regrettably becoming the de-facto standard in applied
statistics. The problem is not the quality of Excel or SPSS, but rather
the (in)competence of those conducting the data analysis. This can and
does regrettably lead to serious misinterpretation of the data, in
either direction. When a paper is submitted, these errors are usually
not caught in the peer review process, as peer review is, well, exactly
what is says: *peer* review.

Thus, SPSS makes it easy to shoot your self in the foot. In my
experience students in social sciences and medicine are currently
thought to do exact that, in universities and colleges all around the
World. And it is particularly dangerous within medical sciences, as
peoples' life and health may be affected by it. I pray God something is
done to prohibit or limit the use of these statistical toys.


Sturla Molden
PhD

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wow, Python much faster than MatLab

2006-12-30 Thread Ramon Diaz-Uriarte
On 12/31/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> R is the free version of the S language.  S-PLUS is a commercial version.
> Both are targeted at statisticians per se.  Their strengths are in
> exploratory data analysis (in my opinion).
>
> SAS has many statistical featues, and is phenomenally well-documented and
> supported.  One of its great strengths is the robustness of its data model
> -- very well suited to large sizes, repetitive inputs, industrial-strength
> data processing with a statistics slant.  Well over 200 SAS books,for
> example.
>
> I think of SAS and R as being like airliners and helicopters -- airlines get
> the job done, and well, as long as it's well-defined and nearly the same job
> all the time.  Helicopters can go anywhere, do anything, but a moment's
> inattention leads to a crash.
> --

inattention leading to a crash? I don't get it. I used SAS for about 3
or 4 years, and have used S-Plus and then R for 10 years (R for 8
years now). I've never noticed inattention leading to a crash. I've
noticed I cannot get away in R without a careful definition of what I
want (which is good), and the immediate interactivity of R is very
helpful with mistakes. And of course, programming in R is, well,
programming in a reasonable language. Programming in SAS is ... well,
programming in SAS (which is about as fun as programming in SPSS).

(Another email somehow suggested that the stability/instability
analogy of airplanes vs. helicopters does apply to SAS vs. R. Again, I
don't really get it. Sure, SAS is very stable. But so is R ---one
common complaint is getting seg faults because package whatever has
memory leaks, but that is not R's fault, but rather the package's
fault).

But then, this might start looking a lot like a flame war, which is
actually rather off-topic for this list.


Anyway, for a Python programmer, picking up R should be fairly easy.
And rpy is really a great way of getting R and Python to talk to each
other. We do this sort of thing quite a bit on our applications.

And yes, R is definitely available for both Linux and Windows (and
Mac), has excellent support from several editors in those platforms
(e.g., emacs + ess, tinn-R, etc), and seems to be becoming a de facto
standard at least in statistical research and is extremely popular in
bioinformatics and among statisticians who do bioinformatics (look at
bioconductor.org).


Ramon


-- 
Ramon Diaz-Uriarte
Statistical Computing Team
Structural Biology and Biocomputing Programme
Spanish National Cancer Centre (CNIO)
http://ligarto.org/rdiaz
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wow, Python much faster than MatLab

2006-12-30 Thread Stef Mientki
> I think of SAS and R as being like airliners and helicopters -- 
I like that comparison,...
.. Airplanes are inherent stable,
.. Helicopters are inherent not-stable ;-)

cheers,
Stef
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wow, Python much faster than MatLab

2006-12-30 Thread gblais
R is the free version of the S language.  S-PLUS is a commercial version. 
Both are targeted at statisticians per se.  Their strengths are in
exploratory data analysis (in my opinion).

SAS has many statistical featues, and is phenomenally well-documented and
supported.  One of its great strengths is the robustness of its data model
-- very well suited to large sizes, repetitive inputs, industrial-strength
data processing with a statistics slant.  Well over 200 SAS books,for
example.

I think of SAS and R as being like airliners and helicopters -- airlines get
the job done, and well, as long as it's well-defined and nearly the same job
all the time.  Helicopters can go anywhere, do anything, but a moment's
inattention leads to a crash.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wow, Python much faster than MatLab

2006-12-30 Thread John J. Lee
Stef Mientki <[EMAIL PROTECTED]> writes:

> Doran, Harold wrote:
> > R is the open-source implementation of the S language developed at Bell
> > laboratories. It is a statistical programming language that is becoming
> > the de facto standard among statisticians.
> Thanks for the information
> I always thought that SPSS or SAS where thé standards.
> Stef

The 'SS' in SPSS stands for Social Science, IIRC.  Looking at the lack
of mention of that on their website, though, and the prominent use of
the "E word" there, they have obviously grown out of (or want to grow
out of) their original niche.

Googling, SAS's market seems to be mostly in the business / financial
worlds.

No doubt R's community differs from those, though I don't know exactly
how.  From the long list of free software available for it, it sure
seems popular with some people:

http://www.stats.bris.ac.uk/R/


John
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Wow, Python much faster than MatLab

2006-12-30 Thread John J. Lee
Stef Mientki <[EMAIL PROTECTED]> writes:

> Mathias Panzenboeck wrote:
> > A other great thing: With rpy you have R bindings for python.
> 
> forgive my ignorance, what's R, rpy ?
> Or is only relevant for Linux users ?
[...]

R is a language / environment for statistical programming.  RPy is a
Python interface to let you use R from Python.  I think they both run
on both Windows and Linux.

http://www.r-project.org/

http://rpy.sourceforge.net/


John
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wow, Python much faster than MatLab

2006-12-30 Thread Stef Mientki
Doran, Harold wrote:
> R is the open-source implementation of the S language developed at Bell
> laboratories. It is a statistical programming language that is becoming
> the de facto standard among statisticians.
Thanks for the information
I always thought that SPSS or SAS where thé standards.
Stef
-- 
http://mail.python.org/mailman/listinfo/python-list


RE: Wow, Python much faster than MatLab

2006-12-30 Thread Doran, Harold
R is the open-source implementation of the S language developed at Bell
laboratories. It is a statistical programming language that is becoming
the de facto standard among statisticians. Rpy is what allows an
interface between python and the R language.

Harold 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Stef Mientki
> Sent: Saturday, December 30, 2006 9:24 AM
> To: python-list@python.org
> Subject: Re: Wow, Python much faster than MatLab
> 
> Mathias Panzenboeck wrote:
> > A other great thing: With rpy you have R bindings for python.
> 
> forgive my ignorance, what's R, rpy ?
> Or is only relevant for Linux users ?
> 
> cheers
> Stef
> 
> > So you have the power of R and the easy syntax and big 
> standard lib of 
> > python! :)
> --
> http://mail.python.org/mailman/listinfo/python-list
> 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wow, Python much faster than MatLab

2006-12-30 Thread Stef Mientki
Mathias Panzenboeck wrote:
> A other great thing: With rpy you have R bindings for python.

forgive my ignorance, what's R, rpy ?
Or is only relevant for Linux users ?

cheers
Stef

> So you have the power of R and the easy syntax and big standard lib of 
> python! :)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wow, Python much faster than MatLab

2006-12-30 Thread Mathias Panzenboeck
A other great thing: With rpy you have R bindings for python.
So you have the power of R and the easy syntax and big standard lib of python! 
:)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wow, Python much faster than MatLab

2006-12-30 Thread Stef Mientki
> 
> I'm not sure about SciPy,

Yes SciPy allows it too !
  but lists in standard Python allow this:
> 
 array = [1, 2, 3, 4]
 array[2:5]
> [3, 4]
> 
> That's generally a good thing.
> 

You're not perhaps by origin an analog engineer ;-)

cheers,
Stef Mientki
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wow, Python much faster than MatLab

2006-12-30 Thread Stef Mientki

>> MatLab: 14 msec
>> Python:  2 msec
> 
> For times this small, I wonder if timing comparisons are valid. I do
> NOT think SciPy is in general an order of magnitude faster than Matlab
> for the task typically performed with Matlab.
The algorithm is meant for real-time analysis,
where these kind of differences counts a lot.
I'm also a typical "surface programmer"
(don't need/want to know what's going inside),
just want to get my analysis done,
and the fact that Python has much more functions available,
means I've to write far less explicit or implicit for loops,
and thus I expect it to "look" faster for me always.
> 
>> After taking the first difficult steps into Python,
>> all kind of small problems as you already know,
>> it nows seems a piece of cake to convert from MatLab to Python.
>> (the final programs of MatLab and Python can almost only be
>> distinguished by the comment character ;-)
>>
>> Especially I like:
>> - more relaxed behavior of exceeded the upper limit of a (1-dimensional)
>>   array
> 
> Could you explain what this means? In general, I don't want a
> programming language to be "relaxed" about exceeding array bounds.
> 
Well, I've to admit, that wasn't a very tactic remark, "noise" is still
an unwanted issue in software.
But in the meanwhile I've reading further and I should replace that by
some other great things:
- the very efficient way, comment is turned into help information
- the (at first sight) very easy, but yet quit powerfull OOPs implemetation.

cheers,
Stef Mientki
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wow, Python much faster than MatLab

2006-12-30 Thread Steven D'Aprano
On Fri, 29 Dec 2006 19:35:22 -0800, Beliavsky wrote:

>> Especially I like:
>> - more relaxed behavior of exceeded the upper limit of a (1-dimensional)
>>   array
> 
> Could you explain what this means? In general, I don't want a
> programming language to be "relaxed" about exceeding array bounds.

I'm not sure about SciPy, but lists in standard Python allow this:

>>> array = [1, 2, 3, 4]
>>> array[2:5]
[3, 4]

That's generally a good thing.




-- 
Steven.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wow, Python much faster than MatLab

2006-12-29 Thread Beliavsky

Stef Mientki wrote:
> hi All,
>
> instead of questions,
> my first success story:
>
> I converted my first MatLab algorithm into Python (using SciPy),
> and it not only works perfectly,
> but also runs much faster:
>
> MatLab: 14 msec
> Python:  2 msec

For times this small, I wonder if timing comparisons are valid. I do
NOT think SciPy is in general an order of magnitude faster than Matlab
for the task typically performed with Matlab.

>
> After taking the first difficult steps into Python,
> all kind of small problems as you already know,
> it nows seems a piece of cake to convert from MatLab to Python.
> (the final programs of MatLab and Python can almost only be
> distinguished by the comment character ;-)
>
> Especially I like:
> - more relaxed behavior of exceeded the upper limit of a (1-dimensional)
>   array

Could you explain what this means? In general, I don't want a
programming language to be "relaxed" about exceeding array bounds.

-- 
http://mail.python.org/mailman/listinfo/python-list


Wow, Python much faster than MatLab

2006-12-29 Thread Stef Mientki
hi All,

instead of questions,
my first success story:

I converted my first MatLab algorithm into Python (using SciPy),
and it not only works perfectly,
but also runs much faster:

MatLab: 14 msec
Python:  2 msec

After taking the first difficult steps into Python,
all kind of small problems as you already know,
it nows seems a piece of cake to convert from MatLab to Python.
(the final programs of MatLab and Python can almost only be 
distinguished by the comment character ;-)

Especially I like:
- more relaxed behavior of exceeded the upper limit of a (1-dimensional) 
  array
- much more functions available, like a simple "mean"
- reducing datatype if it's allowed (booleans of 1 byte)

thanks for all your help,
probably need some more in the future,
cheers,
Stef Mientki
-- 
http://mail.python.org/mailman/listinfo/python-list


Unlimited Free Music Downloads WOW! 100% Legal

2006-05-29 Thread BlackPassion39


 
-- 
http://mail.python.org/mailman/listinfo/python-list

Unlimited Free Music Downloads WOW! 100% Legal

2005-10-09 Thread Free Music
Download Unlimited Free Music, Movies, Games, Software & Much More 100% Safe & Legal Click Here!




-- 
http://mail.python.org/mailman/listinfo/python-list

Wow!, This chick is HOT! LZl6:Tu

2005-02-13 Thread Hottime
  .
--

Want to get laid tonight??  Find local girls now

http://www.youandmeswing.com/index.php?ref_id=130


--






,iy^3aQvw
-- 
http://mail.python.org/mailman/listinfo/python-list


Wow!

2005-01-26 Thread Bernie


That is clever, gives a lot of insight into how the __dict__ == the
object.


This is somewhat like the solution I am using from the Cookbook, an
Empty object copy.   This is cleaner and very much more concise.
Thank you!

-- 
http://mail.python.org/mailman/listinfo/python-list