@# 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 21 22 23 24 25 26 27



Comments:

<0> There are many hacks we do in the name of "don't wase my time with this silly python stuff"
<0> Actually the doc strings are not
<0> we just use the pydoc module to generate our documentation
<1> Ok, so a human writes the docstring where the docstring belongs in the Python code?
<0> yup
<1> but you then generate HTML doc from the python code?
<0> yup
<2> dougn, and why talking about foo or a makes no longer sense?
<1> dougn: The magic_decor procedure is like a "p*** through" it p***es through all of the decorators and then sets the final decorator to the the correct doc string and such. I'm just not seeing the problem.
<0> I have a function: def myfunc(arg1, arg2, variance, default=None): """if default is non-None then this function does XYZ"""
<0> de decorator turns the help into "myfunc(*a, **k)" with that doc string
<0> how is that going to help a person coding to that api?
<1> ohh, I see.
<2> dougn, tell all developers to write the doc strings in terms of *a, **k :)
<0> reasing the code it makes sence, reading the help its gibberish.. this type of problem was "wasting" 12 man hours a week.. (don't ask how many man hours were wasted comming up woth that number or how many were wasted comming up with a solution..
<0> s/reasing/reading



<1> one sec doughn
<2> dougn, or use a parser to add automatically to the doc strings "if default (k['defaullt']) is not None and myothervar (a[2])
<1> dougn
<0> ?
<0> its a fun problem ^_^ you dont want to hear about the other things we did to make python behave like C++...
<3> b=(
<3> for num in range(1,count):
<3> print '%s%s' % (url,all_songs[num])
<3> songs[num] = '%s%s' % (url,all_songs[num]))
<3> i know its almost like this in bash
<0> using inspect to figure out the arg spec and generate the text to compile is a total hack, but its works.. I just hate it so much that I want another solution
<3> for what i want to do
<3> echo $(for blah blah blah)
<3> is there a way to do that same thing in python
<4> is there a way to use cl***es in modules?
<0> admrl: um.. whats the question?
<0> atealtha: ? what do you mean? module.Cl***()?
<3> i dont remember what its called i know how to do it in bash
<3> i want to do save the outputs of a few programs to a variable
<3> what i get out of a for statement
<2> dougn, I don't wanna hear why do you want Python to behave like C++ :)
<3> to a variable
<0> admrl: if you want to capture output from other processes, look at the subprocess module
<4> dougn: I looked at the tutorial, it mentions "import modname" but only shows functions being in the file. Is there a way to have cl***es with it?
<0> yup
<0> import modname
<2> atealtha, just like that
<0> object = modname.cl***()
<0> err... obj = modname.Cl***()
<1> dougn: http://deadbeefbabe.org/paste/3121 any closer?
<0> (object and cl*** are reserved... sorta)
<4> maybe I'm trying it wrong, because that isn't working for me
<2> in modname.py write cl*** Foo(object): p***
<5> is it possible to use a function in a script that's defined lower down in the file?
<4> Yango: what about a module that is a collection of files in a folder instead of a single .py file? The same thing?
<1> It doesn't do anything special with the __name__ but I'm sure that could be hacked on too.
<2> gzl, why would you want that?
<0> macr0: nope ^_^, it still have "another_func(*a, **k)" in the help text look at help(another_func) to see the issue
<6> gzl: it's fine if the function is defined lower down in the file, as long as the piece of code that defines it has run before you try to use it
<2> atealtha, you can create modules as dirs, with many .py files in it, say /home/myapp/mymodule/<many.py's> import mymodule mymodule.file1
<0> try out the code in http://www.dougma.com/pycon2006/dec1.py
<5> Yango: I'd like the primary function to be at the top, but I also need to define some helper functions lower down.
<1> Ohh, well that's your problem :)
<0> ^_^
<1> I was just dealing with the decorator cascading issue.
<5> joedj: ok. I have a bunch of stuff defined and then at the bottom I have if __name__ == '__main__': (run the first function)
<0> like I said, its a real pain, and no NORMAL people would have an issue with it
<6> gzl: that's fine
<2> atealtha, you only have to add an empty file called __init__.py in that dir (which executes initialization of the module code (executed when you do import mymodule, so it may not be empty))
<1> dougn: Yeah, all you gotta do is have that special decorator to fudge things around.
<5> joedj: ok.
<4> Yango: yes, when modulespath/modfile.py has cl*** modcl***, I do import modulespath but can't do modulespath.modfile() (__all__ in __init__.py is set)
<1> dougn: A bit of work, but no real rocket science
<0> macr0: the problem I am having (until your initial example) was copying a function and maintaining the arg spec and replacing the code
<2> atealtha, you have, in modfile.py the function modfile?
<2> atealtha, then it's modulespath.modfile.modfile()
<4> Yango: I'm trying to use cl***es, not functions
<1> dougn: Ahh. Well it's good to see people get paid to do stuff like that. nice gig.
<2> atealtha, well, do you have a cl*** called modfile in modfile.py?
<1> I'm a project manager, <cackle>
<0> atealtha: so you have package/__init__.py and package/module.py and there is a package/module.py~cl*** BAR:



<0> but package/__init__.py 's __all__ does not have the BAR cl***?
<0> from package.module import BAR
<0> obj - BAR()
<0> obj = BAR()
<0> macr0: well its part of the "cruft" work.. Mainly I work on speech recognition software in c++
<4> dougn: __all__ is suppose to be cl*** names, and python searches all .py files for them?
<0> nope
<4> I've always put the filenames without the .py
<1> Is your stuff as good as AT&T natural voice? That's the best one I've heard so far
<0> __all__ is just a list of strings for what should be imported when doing a "from module import *"
<0> that is total rap
<0> *crap
<4> ?
<1> hehheh, yeah but it sounds kinda cool :)
<0> thier TTS is #2 behind us, their speech recognition is #50 behind stuff undergrads work on
<1> Does yours do proper intonation and pause?
<0> thier TTs is good (text to speech)
<0> yup
<1> "Hello, Dave"
<0> They use our model builder
<1> is that the benchmark?
<7> dougn: you work commercially, or in university research?
<4> Yango: so I guess that is the solution, have silimar names
<0> but they **** at foreign languages
<0> commercially
<7> ah k
<1> And you can have your own copy too for one-million dollars!
<1> I'd just like to have a good one to read online books to me with.
<0> Nuance, formerly Scansoft, formerly L&H, formerly kertzweil AI, formerly Dragon
<7> ah, Dragon Naturally Speakign
<0> yup
<0> Version 9 beta in 4 weeks >.<
<7> haha
<1> Do you guys support Linux?
<0> um.. officially? ^_^
<1> lol, does your software run on linux
<0> we have no desktop software for lunix
<0> *linux
<0> *sigh, bad night for typing
<1> well, server-side of course :)
<0> All our research is done on linux with python
<1> yeah, and then you only sell windows versions. Figures.
<1> :(
<0> we have a ton of products on linux both research and desktop for the transcription/medical/legal market but nothing for home/buisness use
<0> their is no market
<1> not yet ;)
<0> its a rather sore point...
<0> We keep TRYING to do a mac version... that is also a sore point
<1> so you have medical transcription software that uses your speach recog and you sell it to hospitals?
<1> or physician-support service providers?
<0> hospitals, transcription services, and we also have a inhouse transcription service
<0> if you watch any tv with closed captioning, that is based on DNS (the desktop software)...
<0> that is done by having people "respeak" the audio in th 5 sec delay for live stuff, and well before hand for the recorded
<0> they HATE prez bush
<1> Hmm, our company is working on hosted home-healthcare management & patient records
<1> so it reads closed-captions to people? isn't that kind'of silly?
<0> no, people speak to the system and turn it into text to be displayed
<1> oh, STT
<0> yup
<0> I work on the STT side
<1> I really have no idea about "state of the art" in that field. Does the software still require a lot of training?
<0> I do some small TTS stuff mainly on the model building...
<0> is 2 seconds alot of training?
<1> what would that 2 seconds consist of? a grunt?
<0> That is a DNS9 feature. the current DNS8 requires 5min
<0> just start speaking your first sentence, there will be a 2 second delay in processing the first utterance
<1> Heh, I can see the instruction manual now. "Please eat a lot of cheese, take your laptop to the toliet and hit RECORD"
<1> ahh, ok. So there's a 2 second built-in processing delay
<1> Is that realtime?
<0> just for training the first time
<1> oh, ok.
<0> depending on the system, we run at .10x realtime on a P4 3.06Ghz
<0> and 1.0x on a p2 600


Name:

Comments:

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






Return to #python
or
Go to some related logs:

#physics
HOWTO: enable multiuniverse
fedora 5 automount dvd
#perl
#suse
ubuntu toshiba m45 modem
swapElementText
#debian
#javascript
kubuntu qtparted segmentation fault



Home  |  disclaimer  |  contact  |  submit quotes