| ||||||
| 2006/10/6-7 [Finance/Banking, Reference/Tax] UID:44705 Activity:low |
10/5 Are recreational vehicles tax deductible?
\_ http://csua.org/u/h4p (detnews.com)
\_ if you live in it as your primary residence, like a house |
| 2006/10/6-7 [Computer/SW/Languages/Perl, Computer/SW/Languages/Python] UID:44706 Activity:moderate |
10/5 Python experts, help. I'd like to do the following Perl regexp
and reg substitution equivalent in Python, what's the best way?
$line=~s/hello/world/i;
if ($line=~/(foo\w+)/) {
$myfoo = $1;
} elsif ($line=~/(bar\w+)/) {
$mybar = $1;
}
My limited Python knowledge says I must do the followings which
seems really awkward:
import re
...
matchFoo = http://re.compile('(foo\w+)')
matchBar = http://re.compile('(bar\w+)')
m = matchFoo.match(line)
if (m):
myfoo = m.group(1)
...
\_ I don't know Perl so I'm not sure what you are trying to do,
maybe this link will be of some help:
http://gnosis.cx/TPiP -scottyg
\_ One of the reasons I gave up on Python and love Ruby is that Ruby
has OO but maintains the nice regex syntax of Perl.
\_ Its OO is also a lot cleaner and more consistent than Python's,
and none of this indentation-is-important i-can't-paste-code
bullshit
\_ Yeah, those would be some more of the reasons.
\_ I don't know python, but this would be the equivalent, AFAICT:
import re
line = re.sub(r'(?i)hello', 'world', line)
m = re.search(r'foo\w+', line)
if m:
myfoo = m.group(0)
else:
m = re.search(r'bar\w+', line)
if m:
mybar = bm.group(0)
--dbushong
\_ Now I remember why I never learned python. |
| 2006/10/6-7 [Politics/Domestic/President/Bush] UID:44707 Activity:moderate |
10/6 What is President Bush's job?
http://www.youtube.com/watch?v=dEJY6g-Z3nE&eurl=
\_ I purposely left out the word "President" for a reason.
\_ And I purposely added it back in for a reason. Did you delete
this post for a reason?
\_ 1. I posted the original link without the word "President"
\_ I purpos3ly left out the word "President" for a reason.
\_ And I purpo5ely added it b@ck in for a reason. Did you de7ete
this post for a r3ason?
\_ 1. I posted the 0riginal link wiThout the word "President"
so you never added it "back", you simply added it. 2. I
never deleted the post. I even let you keep your
"President Bush".
never de7eted the p0st. I even let you keep your
"President Bu$h". |
| 2006/10/6-9 [Reference/RealEstate] UID:44708 Activity:kinda low |
10/6 Mmmmmm... housing idiot: http://www.sfgate.com/columnists/lloyd Young 20-something buys 8 homes in 8 months seeking fabulous fortune. \_ What parade of idiots gave him credit for this real estate spree? \_ The article says he got a lot of stated income loans and lied on the applications. \_ And they didn't check?? \_ "Stated income" means "stated income". If they checked then it wouldn't be "stated income". \_ Kind of a neat idea: When young, make some really big financial gambles by taking out huge loans. If you win, great. If you lose, declare bankruptcy and be free and clear in several years. \_ Free and clear? I think it's worse than that. This little shit has been promoting his sob story all over both the MSM and the housing bubble blogs now for quite a while. I predict that his book deal will make way more money than he ends up losing. \_ Not with the new bankruptcy laws it isn't. \_ can't you circumvent the new laws by living with your parents and studying for your next job for a couple years, maybe go get an advanced degree? \_ With a less-than-median income and massive debt, you are fine to BK even with the new law. \_ There's still a lot more to it. And he'd have to go many months without a job. Not to mention credit counciling that might tell him he could get that 200k debt, suck it up, get a web job and pay it off in 30 years. \_ Credit counseling required under Chapter 7 is a joke. In any case, he can easily declare for Chapter 13. \_ Bad credit or not, he might be prosecuted if he lied on the application forms. |
| 2006/10/6-7 [Consumer/Audio] UID:44709 Activity:moderate |
10/6 What's a good FM modulator for mp3 players to use in the car? I
am looking for one that takes line-out. Sound quality is more
important to me than size/money.
\_ The cheapest wire system still has better fidelity than the
most expensive wireless system.
\_ if sound quality is more important than $, buy a new stereo with
a line-in jack --oj |
| 2006/10/6-9 [Health/Women] UID:44710 Activity:nil |
10/6 Pregnant teens are taking up smoking b/c they think it will mean
smaller babies:
http://tinyurl.com/jybq6 (dailymail.co.uk)
\_ I like having sex with pregnant teens. |