@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20



Comments:

<0> I think I'm going to have to go start a flame in some crappy room to try and clear my head
<1> haha that's bad habit
<2> programming should be zen
<1> actually cometo think of it, i make non-sensible comments when my brain goes numb
<3> get a weed and pack of beer and go out
<2> rokj is right
<1> lol
<1> oops
<2> get out and go cycling. :)
<3> ok, and take weed and beer with you :)
<0> I was thinking it would be more amusing to go to the christian room and proclaim that I am the son of satan and eat dead babies while on rampages of meth-amphetamine
<2> never get out without it :)
<2> I can't join #christian
<3> stop at some nice spot and enjoy; then some nice lady will come on bike and join you ... :)
<0> hehe
<2> aren't we poets ?



<4> yes, python is a poetry language
<2> indeed
<4> altho the perl monks have in a way a longer tradition and establishment at that
<4> and also there are weird linguist tricksters
<4> but still py is also one such lang :)
<0> I could work on a track but I know I would end up spending the whole night on it
<3> well for me python attracked me, since everything just worked like it should and i did not spend a week of searching forums, reading books just to get start programming
<3> everything i need i find on http://docs.python.org/tut/tut.html
<3> for now
<0> I downloaded a bunch of ebooks on python
<0> google O'Reilly complete .torrent
<0> its worth seeing
<3> of course daddy google is nice sometimes also
<0> :-D
<5> rokj: eventually you'll want to look at http://docs.python.org/lib
<6> perceptualchaos: you mean you bought those books, right? or at least read them on safari
<3> polpak: yea, i forgot about that
<2> I started here: http://www.ibiblio.org/obp/thinkCSpy/
<0> Leeds: um yeah
<0> thats what I meant
<6> seriously - safari is an excellent service
<0> I've never used it...
<0> I buy all my physics textbooks
<0> but for programming you often need a bunch of books
<0> and I'm a poor student
<7> Hello. I have written a cgi script in python. How do I see its output? Do I have to put it in a directory named cgi-bin and name my script mypythonscript.cgi
<7> ?
<2> Is there any special given name for python __bla__ functions ?
<8> _Indy_: You need to put it so that the web server can handle it as a CGI script.
<9> hollo all
<7> I must name it something.py or something.cgi ?
<8> KoRnouille: No. Some reads them as "dunder" (double under).
<8> _Indy_: That depends on the configuration of your web server.
<7> ok
<7> thx
<3> one day, when i'll be famous and rich; i'll buy all books ive read and all software ive abused
<2> rokj: sure...
<3> but im beautiful enough
<8> I guess I will never do that. I won't remember many of books and movies I read and saw.
<3> of course if i'll be famous and rich ... :)
<10> is in python something like switch(var){} like in C?
<6> nope
<8> jefis: No.
<10> so how check 'var' if it can be several different meanings :)
<8> if var == 1: # do 1
<8> elif var == 2: # do 2
<8> elif var == 3: # do 3
<8> else: # give up
<10> ok, thanks
<11> or, more commonly, use a dict or a cl*** as a dispatcher.
<11> d = {1: handle_1, 2: handle_2, 3: handle_3}; d[var]()
<10> in array, it starts from 0 or from 1?
<8> jefis: From 0, as all sensible programming languages do.
<11> cl*** D: def handle_1(self): ..; def handle_2(self): ...; def dispatch(self, var): return getattr(self, "handle_%s" % (var,))()
<10> by the way, i just noticed that "print 'blablabla'" also adds "\n" how to print without it \n ?
<12> sanxiyn, how is that sensible?
<12> ?sys.stdout.write jefis
<6> jefis: print 'blahblah',
<13> That's such a horrible hack.
<8> TFK: http://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html
<8> Esdger Dijkstra, Why numbering should start at zero.



<12> o_O
<8> TFK: His argument has points, but I guess in the end it's a matter of taste.
<8> I like Dijkstra because he thinks (thought) about these things. Like goto considered harmful. :)
<12> I've always thought that arrays start with 0 because of how they work with pointer arithmetic in C :-/
<8> TFK: The main argument is: it should be half-open and half-closed interval, to get the number of elements in the interval just by substraction.
<14> Hello. I have placed a cgi script written in Python, in the cgi-bin folder of Apache2. Now, how can I access it with a web browser, in order to see the results of the script?
<8> TFK: And then, 0<=x<10 looks better than -1<x<=9.
<12> What's -1 doing in there?
<8> TFK: lower bound?
<12> Of what?
<3> :)
<8> TFK: Two interval is equivalent (in natural numbers).
<12> I thought that 0 is not always considered a natural number?
<3> Aggron: you need to setup web server
<8> TFK: Well, I was just summarizing EWD's argument as I understood it.
<14> rokj: I have installe Apavhe 2
<14> * apache
<15> what if x turns out to be a float?
<8> Itkovian: We don't use float as array index.
<15> no we don't
<10> why code like this
<10> if ((tmp.name != "") && (tmp.surname != "")):
<10> doesn't want to work?
<8> jefis: In Python?
<3> Aggron: that is not enough; http://www.pythonweb.org/ , http://www.modpython.org/
<10> yes
<11> Aggron: this is an Apache question, not a Python one.
<8> jefis: There's no && in Python.
<11> but please dont' use modpython.
<8> jefis: Use "and".
<1> ironfroggy: are u still there? looks like it's useless data structure.. i'm still not 100% sure, but.. well going to bed...
<10> oh
<10> thanks :)
<11> Aggron: there's nothing special about Python here. it's just a CGI script. you need to ask Apache how to get to it.
<11> jefis: and the parentheses are unnecessary.
<10> sorry, didn't understand
<8> jefis: Idiomatically, that is written, "if tmp.name and tmp.surname:" in Python.
<10> oh, i don't know, i more like it
<8> Or "if tmp.name != '' and tmp.surname != ''" (see, parentheses are unnecessary)
<10> by the way, in cl***es, i used like in c there are private,public is it in python?
<8> jefis: No.
<13> if "" not in [tmp.name, tmp.surname]: # :D
<8> Some considers it a weakness. I don't.
<8> Brend: You bad.
<11> jefis: C doesn't have private and public, just C++
<11> jefis: and they are easily circumvented, '#define private public'
<8> That too. Oh how C++ conquered the world.
<10> you are right ;)
<13> sanxiyn, but it's slightly shorter! :)
<3> Yhg1s: why should not he use mod_python?
<11> rokj: it isn't going to solve his problem, and it will land him many more. mod_python is great when you want to extend apache with Python, but for just executing some CGI, it's m***ive overkill.
<11> the benefits of embedding Python inside Apache are minimal, in practice.
<11> (for most users)
<3> Yhg1s: i agree
<11> and considering his original problem (not knowing how to fetch a CGI script), I reckoned he wasn't in the market for mod_python :)
<8> I couldn't figure out how to get mod_python working, before reading Django documentation.
<3> did anyone see some benchmark tests between php, mod_python ... ?
<8> (I recommend reading it if you need to. I used it to speed up some large number of Trac instances.)
<3> or know that they exists ... and have maybe some URLs to it
<3> cos im really considering slowly moving to python for web development
<15> Yhg1s: hmm ... if I ***ign <bound method ksvm_tanh.ksvm_fitness of <scipy_ksvm2.ksvm_tanh instance at 0x29969e0>> to a variable x, then x(a) should suffice if ksvm_fitness takes (self, gene) as its arguments, right?
<11> Itkovian: yes.
<15> hmm. then I'm doing something else wrong
<16> what error are you getting?
<15> TypeError: ksvm_fitness() takes exactly 2 arguments (1 given)
<17> bind it to instance or cl***?
<17> oh wait, I understand what you're doing
<15> pasted at http://deadbeefbabe.org/paste/676
<15> it was bound to an instance
<15> afaik
<18> I'm having toubles with sqlite over adodb-py not creating automatically a database file in a directory where i have write access. relevant code and traceback is here : http://pastebin.com/753131
<11> Itkovian: and which line is it?
<15> near the bottom - ksvm_genome.performance = self.ksvm_object.ksvm_fitness


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #python
or
Go to some related logs:

mplayer /dev/fd0 etch
#php
#python
nx /dev/dsp busy
FC5 xinit.d restart
#css
suse setup RAID yasthow to
quotes jabberwalkie python
#web
#debian



Home  |  disclaimer  |  contact  |  submit quotes