Re: Hello World

2014-12-21 Thread Chris Angelico
On Mon, Dec 22, 2014 at 6:46 PM, Steve Hayes wrote: > But a hacker who can write that kind of stuff can probably bypass any > safeguards built into the OS. This isn't magic. You can't just do more of it to get past the firewalls, like in sci fi. It's much MUCH easier to attack the humans than the

Re: Hello World

2014-12-21 Thread Steve Hayes
On Mon, 22 Dec 2014 17:33:10 +1100, Chris Angelico wrote: >On Mon, Dec 22, 2014 at 5:21 PM, Steve Hayes wrote: >> Yes, my initial reaction was "that's awesome". >> >> And my second thought was that it was scary. >> >> I ran it. It worked, and printed "Hello world". I was awed. >> >> But what if

Re: Hello World

2014-12-21 Thread Chris Angelico
On Mon, Dec 22, 2014 at 5:21 PM, Steve Hayes wrote: > Yes, my initial reaction was "that's awesome". > > And my second thought was that it was scary. > > I ran it. It worked, and printed "Hello world". I was awed. > > But what if I had run it and it reformatted my hard disk? > > How would I have k

Re: Hello World

2014-12-21 Thread Steve Hayes
On Mon, 22 Dec 2014 09:51:02 +1100, Steven D'Aprano wrote: >Tony the Tiger wrote: > >> On Sat, 20 Dec 2014 23:57:08 +1100, Steven D'Aprano wrote: >> >>> I am in total awe. >> >> I'm not. It has no real value. Write your code like that and you'll soon >> be looking for a new job. > >Awww, did da

Re: very weird pandas behavior

2014-12-21 Thread oldknackers
On Saturday, December 20, 2014 3:46:40 PM UTC, ryguy7272 wrote: > I downloaded pandas and put it in my python directory, then, at the C-prompt, > I ran this: > "pip install pandas" > > It looks like everything downloaded and installed fine. Great. > > Now, in Python Shell, I enter this: > impor

Re: List Comprehensions

2014-12-21 Thread Chris Angelico
On Mon, Dec 22, 2014 at 4:42 PM, Ganesh Pal wrote: > (a) I was trying to reduce the below piece of code using List comprehension > ? Any suggestion please let me know > > > for opt in options: > opt['result'] = Queue.Queue() > tmp_thread = pause.Thread(opt) > th

List Comprehensions

2014-12-21 Thread Ganesh Pal
Hi , (a) I was trying to reduce the below piece of code using List comprehension ? Any suggestion please let me know for opt in options: opt['result'] = Queue.Queue() tmp_thread = pause.Thread(opt) threads.append(tmp_thread) tmp_thread.start() (b)

Re: very weird pandas behavior

2014-12-21 Thread Steven D'Aprano
On Sun, 21 Dec 2014 18:25:38 -0800, ryguy7272 wrote: > I just ran these two commands in the c-prompt: > pip install --upgrade numpy > pip install --upgrade pandas What is the purpose of the --upgrade switch? Just run `pip install numpy`, and COPY and PASTE the entire output of pip into your re

Re: code python

2014-12-21 Thread Rustom Mody
On Saturday, December 20, 2014 7:30:20 AM UTC+5:30, Khetam Yassen wrote: > Hello all > I Have problem about , How i can compute accuracy to unigram,bigram and > trigram > and how i can change the size to iteration separate from 1 to 10 in each > stage from iteration train take 90% and training 10

Re: Why my ; continuator idea is better for debugging too.

2014-12-21 Thread Chris Angelico
On Mon, Dec 22, 2014 at 2:53 PM, Steven D'Aprano wrote: > On Mon, 22 Dec 2014 04:28:33 +0100, Skybuck Flying wrote: > >> I don't like inconsistencies, it's frikking annoying.). > > I don't like cross-posting trolls, they're frikking annoying. My first thought was that it had been sent to the wron

Re: Why my ; continuator idea is better for debugging too.

2014-12-21 Thread Steven D'Aprano
On Mon, 22 Dec 2014 04:28:33 +0100, Skybuck Flying wrote: > I don't like inconsistencies, it's frikking annoying.). I don't like cross-posting trolls, they're frikking annoying. > Bye, Oh, if only that were true. -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Why my ; continuator idea is better for debugging too.

2014-12-21 Thread Skybuck Flying
Hello, In the past I wrote about pascal's ; mistake. ; should be used as a continuator. I just made a programming mistake which solidifies/merits my idea: The programming mistake was this: vBattlefieldLosingWarrior := // modified warrior and brain vSimulatorWinningWarrior := vBattlefieldBatt

Re: Hello World

2014-12-21 Thread Mark Lawrence
On 22/12/2014 00:20, mm0fmf wrote: On 22/12/2014 00:10, Chris Angelico wrote: Level 0: Why implement your own crypto?!? Because people who don't understand the concepts behind cryptography don't understand that the crypto algorithm can be open whilst the results of applying the algorithm are s

Re: very weird pandas behavior

2014-12-21 Thread Rustom Mody
On Monday, December 22, 2014 7:55:50 AM UTC+5:30, ryguy7272 wrote: > Sorry, but that's what drives me nuts. I install a few packages, and the > messages that I get says the package is installed...then it says it's NOT > installed...I don't know what to think... Its nice to bang the head agains

Re: very weird pandas behavior

2014-12-21 Thread Mark Lawrence
On 22/12/2014 02:07, ryguy7272 wrote: On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote: I downloaded pandas and put it in my python directory, then, at the C-prompt, I ran this: "pip install pandas" It looks like everything downloaded and installed fine. Great. Now, in Pytho

Re: very weird pandas behavior

2014-12-21 Thread Chris Angelico
On Mon, Dec 22, 2014 at 1:25 PM, ryguy7272 wrote: > > I just ran these two commands in the c-prompt: > pip install --upgrade numpy > pip install --upgrade pandas > > It seemed like everything was being downloaded and installed. Seems ok. > Then I go back to the Python Shell and ran 'import nump

Re: Hello World

2014-12-21 Thread Rustom Mody
On Monday, December 22, 2014 4:21:13 AM UTC+5:30, Steven D'Aprano wrote: > > Awww, did da widdle puddy tat get up on the wrong side of the bed this > morning? :-) > > > Obviously you don't write obfuscated code like this for production use, > except in such cases where you deliberately want to w

Re: Hello World

2014-12-21 Thread Cameron Simpson
On 21Dec2014 01:31, Terry Reedy wrote: On 12/21/2014 12:31 AM, Chris Angelico wrote: On Sun, Dec 21, 2014 at 4:14 PM, CM wrote: I ran it in IDLE with Python 2.7.8 and got: Traceback (most recent call last): File "C:/Python27/helloworld.py", line 39, in lambda _, __, ___, , _,

Re: very weird pandas behavior

2014-12-21 Thread ryguy7272
On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote: > I downloaded pandas and put it in my python directory, then, at the C-prompt, > I ran this: > "pip install pandas" > > It looks like everything downloaded and installed fine. Great. > > Now, in Python Shell, I enter this: > im

Re: very weird pandas behavior

2014-12-21 Thread ryguy7272
On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote: > I downloaded pandas and put it in my python directory, then, at the C-prompt, > I ran this: > "pip install pandas" > > It looks like everything downloaded and installed fine. Great. > > Now, in Python Shell, I enter this: > im

Re: very weird pandas behavior

2014-12-21 Thread ryguy7272
On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote: > I downloaded pandas and put it in my python directory, then, at the C-prompt, > I ran this: > "pip install pandas" > > It looks like everything downloaded and installed fine. Great. > > Now, in Python Shell, I enter this: > im

Re: very weird pandas behavior

2014-12-21 Thread Dave Angel
On 12/21/2014 08:01 PM, ryguy7272 wrote: On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote: I downloaded pandas and put it in my python directory, then, at the C-prompt, I ran this: "pip install pandas" It looks like everything downloaded and installed fine. Great. Now, in Py

Re: very weird pandas behavior

2014-12-21 Thread oldknackers
On Saturday, December 20, 2014 3:46:40 PM UTC, ryguy7272 wrote: > I downloaded pandas and put it in my python directory, then, at the C-prompt, > I ran this: > "pip install pandas" > > It looks like everything downloaded and installed fine. Great. > > Now, in Python Shell, I enter this: > impor

Re: very weird pandas behavior

2014-12-21 Thread Chris Angelico
On Mon, Dec 22, 2014 at 12:01 PM, ryguy7272 wrote: > Part of the problem is, I don't know why in 2014 we're entering commands in > the C-prompt to run a Windows program. I thought all of that stuff was over > in the very early 1990s. Also, I can't understand why Python can't download > this f

Re: very weird pandas behavior

2014-12-21 Thread ryguy7272
On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote: > I downloaded pandas and put it in my python directory, then, at the C-prompt, > I ran this: > "pip install pandas" > > It looks like everything downloaded and installed fine. Great. > > Now, in Python Shell, I enter this: > im

Re: Hello World

2014-12-21 Thread Tim Chase
On 2014-12-22 00:20, mm0fmf wrote: > On 22/12/2014 00:10, Chris Angelico wrote: > > Level 0: Why implement your own crypto?!? > > Because people who don't understand the concepts behind > cryptography don't understand that the crypto algorithm can be open > whilst the results of applying the algor

Re: Hello World

2014-12-21 Thread Chris Angelico
On Mon, Dec 22, 2014 at 11:12 AM, Roy Smith wrote: > In article , > Chris Angelico wrote: > >> On Mon, Dec 22, 2014 at 10:50 AM, Roy Smith wrote: >> > Heh. I once worked on a C++ project that included its own crypo code >> > (i.e. custom implementations of things like AES and SHA-1). The pers

Re: Hello World

2014-12-21 Thread mm0fmf
On 22/12/2014 00:10, Chris Angelico wrote: Level 0: Why implement your own crypto?!? Because people who don't understand the concepts behind cryptography don't understand that the crypto algorithm can be open whilst the results of applying the algorithm are secure. There again I always use

Re: Hello World

2014-12-21 Thread Roy Smith
In article , Chris Angelico wrote: > On Mon, Dec 22, 2014 at 10:50 AM, Roy Smith wrote: > > Heh. I once worked on a C++ project that included its own crypo code > > (i.e. custom implementations of things like AES and SHA-1). The person > > who wrote some particular bit of the code had decided

Re: Hello World

2014-12-21 Thread Chris Angelico
On Mon, Dec 22, 2014 at 10:50 AM, Roy Smith wrote: > Heh. I once worked on a C++ project that included its own crypo code > (i.e. custom implementations of things like AES and SHA-1). The person > who wrote some particular bit of the code had decided that deliberately > obfuscating the function

Re: Hello World

2014-12-21 Thread Roy Smith
In article <54974ed7$0$12986$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: > Obviously you don't write obfuscated code like this for production use, > except in such cases where you deliberately want to write obfuscated code > for production use. Heh. I once worked on a C++ proje

Re: Hello World

2014-12-21 Thread Steven D'Aprano
Tony the Tiger wrote: > On Sat, 20 Dec 2014 23:57:08 +1100, Steven D'Aprano wrote: > >> I am in total awe. > > I'm not. It has no real value. Write your code like that and you'll soon > be looking for a new job. Awww, did da widdle puddy tat get up on the wrong side of the bed this morning? :-)

Re: Simple background sound effect playback

2014-12-21 Thread Jacob Kruger
Will have a look at it as well, but, also already tested generating a console/command line app using the pygame code to play an .ogg file, panning it left and right, and the compilation worked alright, and am now still busy reloading primary machine, so haven't taken it too much further, but let

Re: Simple background sound effect playback

2014-12-21 Thread Akira Li
"Jacob Kruger" writes: > Would prefer to use something free, that could work somewhat > cross-platform, but, my primary target is for windows OS, and would > primarily just want to be able to easily trigger playback of either > .wav or .mp3 background sound effects, but, yes, would also be nice t

problems with Methods in Python 3.4.2

2014-12-21 Thread Marcus Lütolf
Hello Dears, I solved the problem: There are two underscore key strokes required. Marcus. Hello Dears, 1)I am trying to do this: >>> dir(_builtins_) I am getting this: Traceback (most recent call last): File "", line 1, in dir(_builtins_) NameError: name '_builtins_' is not defi

Re: Hello World

2014-12-21 Thread Marko Rauhamaa
Tony the Tiger : > On Sat, 20 Dec 2014 23:57:08 +1100, Steven D'Aprano wrote: > >> I am in total awe. > > I'm not. It has no real value. It is, of course, a joke, and there are whole tongue-in-cheek languages like Brainfuck. However, some similar exercises carry deep meaning. Take, for example, i

Re: very weird pandas behavior

2014-12-21 Thread Dave Angel
On 12/21/2014 07:44 AM, ryguy7272 wrote: On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote: I downloaded pandas and put it in my python directory, then, at the C-prompt, I ran this: "pip install pandas" Thanks Steven. I just tried what you recommended, and got this. import

Re: very weird pandas behavior

2014-12-21 Thread ryguy7272
On Saturday, December 20, 2014 10:46:40 AM UTC-5, ryguy7272 wrote: > I downloaded pandas and put it in my python directory, then, at the C-prompt, > I ran this: > "pip install pandas" > > It looks like everything downloaded and installed fine. Great. > > Now, in Python Shell, I enter this: > im

Re: how to generate a wsdl file for a web service in python

2014-12-21 Thread Burak Arslan
On 12/19/14 12:45, brice DORA wrote: > i have already my python file which contains all methods of my web service. > so do you give a example or tell me how i can do it... No, all you need is there in that example. You need to decorate your functions using Spyne's @rpc, denote input/output type

Re: Hello World

2014-12-21 Thread Marko Rauhamaa
CM : > On Sunday, December 21, 2014 2:44:50 AM UTC-5, CM wrote: >> Hello, world! >> 13 > > Actually, there is no comma after Hello. Do you have a patch? Marko -- https://mail.python.org/mailman/listinfo/python-list