« first day (880 days earlier)      last day (4293 days later) » 
07:00 - 19:0019:00 - 00:00

07:45
It got stale.
7
Q: Solicitation Flag, Queue, and Rep Reverter

Inbar RoseI have an idea for a new multi-part feature. A flag that one would raise on questions which appear to be soliciting work from the community. Questions flagged as such would enter a new review queue. This new review queue would be available to users after reaching a certain amount of rep. In thi...

No new activity since yesterday. I guess that means that "it's dead Jim"
08:06
morning
morning - not here for long though
08:33
what you guys think of this one
11
Q: Prevent specific sites from being overrepresented in the hot questions list

Mad ScientistSome sites appear far more often in the hot questions list than other sites. I don't have any hard data on that, as that kind of data is just not publicly available, but I'm pretty sure my subjective impression on that is reasonably accurate. Those sites don't appear more often because they are ...

 
2 hours later…
10:16
hi
@rxdazn heya
I need some help with import
I have a function that returns django models class and would like to import them in my app/models/__init__.py
just like one would do (in app/models/__init__.py) from a import test1, I would like to do something like from b import dynamic_model('mynewmodel')
is this even possible?
here is my function that dynamically creates models gist.github.com/rxdazn/f63edbff7bb99134ad5c
Umm - okay - why?
i made a management command by copying syncdb sources so python manage.py createshadow would create tables in an alternative db from these models (I made a list of tuples in settings.py that contains models to be cloned). It works. Boss prefers to import models in myapp/models/__init__.py.
10:36
Okay - I have a couple of vague ideas - but no idea if they're suitable for use in Django - sorry
Hello
Hi None
Hi Jon
Umm, that appears to work
@rxdazn might be better as a proper Q on SO
ha
I'll ask it then
10:46
Sorry - haven't woken up properly yet - and flicking between bits and bobs
read that as "bits and boobs" :/
I prefer your version, but sadly :)
11:22
hello
hi
"Importing a dynamically generated model class in __init__.py"
do you think this title will do?
Umm - should be okay - your code mentions "shadowing" - so maybe that in the title as well
Martijn Pieters bussy answering that he didn't even show here
@qwerty he shows up now and then ;)
Kind of like the channel's "White Lighter" - if you've ever watched the TV series "Charmed" - I think you'll get that ;)
12:03
0
Q: Importing a dynamically generated model class in `__init__.py`

rxdaznI have a function that returns django models class and would like to import them in my app/models/__init__.py. My function is a slight modification of this dynamic model exemple (Django Wiki). It clones a model and returns a <class 'django.db.models.base.ModelBase'>, a slightly modified ...

I feel very stupid right now
It happens - at least you got a solution ;)
12:29
Ooo - anyone else notice the more explicit close and delete options now
No, please do explain.
well - it now shows instead of close (1) -> close (1/5) - same for delete
presumably it does the same for edit - let's try and find one
Ummm, nope edits stay the same
It never use to do that before - just use to have the current number of votes - not given an indication of the amount required..
Heya @Thoys welcome
Jon, tell me, when a post is deleted, what happens to the rep/awards/whatever gained from the question?
And can anything be deleted?
I mean, can any one with enough rep decide he wants to delete something which will then add another point to the delete ?
12:47
at 10k you can vote to delete a closed question after 24 hours
at 20k you can do the same immediately, plus can vote to delete negatively voted answers
sorry at 10k it's 48 hours - not 24 hours
plus the number of required delete votes increases depending on the number of answers and upvotes
As to the rep. - I'm not 100% sure - but there's a lock time, where they still count
So umm - there's 3,606 users that have 10k+ and 1,055 that are 25k + - that's out of 1.8 million, and you only get n many delete votes a day anyway
(not quite sure why it ranks 25k+, 20k+ would be more useful, but we can guess somewhere in the middle? 2,000 ~1900 20k+ users)?
So then, if we go for active users, that are 10k+, that hang around looking at python, maybe we get a 100 that could cast deletes, or 40/50 that could cast immediate deletes?
which - I think strengthens your meta post - or at the very least - doesn't make it any weaker
13:04
Would you be willing to make an answer to my meta post and include these statistical ponderings as well as what we discussed earlier about having a similar feature in the 'protect' which also creates a notice on the post to warn users from answering it?
Sure - I'll draft something - lemme finish my lunch first
no problem mate :)
13:44
umm, is 340gb of music excessive
heya @BenjaminGruenbaum - when'd you sneak in
it goes up fast if you're getting .flac stuff
I have over 2TB of music.
But I used to work as a DJ... so I guess that doesn't count.
340GB might be only one song if you include the full genome of each performer, and HD video of the important events in their lives. That's the only way to reproduce the true sound, really.
13:47
did you even get to listen to all of it?
Probably not
Formats that just try to record the frequency of sound audible to humans are just too lossy by comparison.
It is all on external drives.
Actually I have much more if you count all the CD's and Vinyls.
Just having to do a restore from an external drive to an array
and starting to run out of space on the array
But 2TB of digitization music. On my active PC I only have about 200gb.
And I listen to most of it.
13:48
i'm not listening too all of my music since i'm on what.cd as i download faster than i listen..
btw.
-4
Q: A Python assignment

Irina II was given an assignment in Python and it's due in 2 days. The client knows that I do not have any Python programming background but still would like to get that done. Can you please help me? Thanks in advance. (1) Task Description: • In the Python language, write a program that takes a confi...

Perfect example.
@mgilson :)
@InbarRose, I especially dislike it when they copy-paste the assignment in without even looking at the preview to make sure it didn't mangle their formatting. Markup does not parse your bullet points the way you expect, Irina I!
Makes me think they're posting blindfolded.
Inbar, any new progress on your meta question?
@InbarRose question now deleted ;)
It's also possible that they see the mangled preview, they say, "meh, these chumps will answer my ugly question regardless", and post it anyway.
13:53
deleted by Ashwini Chaudhary, eumiro, Jon Clements
So umm... maybe there is enough (people around) at good (or peak) times to get rid of these questions - asking to deletion 10 mins
As long as I'm complaining, you ever see a post that ends like, "regards, -~LoneWolf420~-", but their user name is "user4815162342"? They're in such a hurry they don't even choose a user name before posting.
Yup - always makes me laugh
I was wondering about using my real name, but thought screw it - my writing style is distinctive and I've been on public forums with my name 10 years before that - so what kind of thing
LoneWolf420 : d
@JonClements Only if you have so much, that you have music you don't like/don't listen to.
@Poik other people like it for parties - I have disney tracks I don't listen to, but take my phone down to a kids party or something - it's useful
go round a few mates for a blatant let's feel dead in the morning party - that's another set of music entirely
13:58
Good exception. Then no.
Perhaps, only if there's music you don't use is a better qualifier.
talking of music, I saw Amon Tobin yesterday, it was great
@Poik True - then more likely - music I forget I have is probably more appropriate
I have to admit though, when we host parties, and I forget to set up play lists properly, or let the player go on random, we end up with the scooby doo theme tune ;)
True music fans have, for every song they possess, the original version, the remastered version, the recorded-at-a-concert version, and the Weird Al parody version.
Guilty - plus the CD remastered, LP if it exists, and DVD recording of concert if possible
omg - I'm a sad git
And true true music fans have all possible combinations of those. You haven't heard "Eye of the tiger" until you've heard the remastered Weird Al parody concert version.
14:11
this could explain a lot in life...
It at least explains why your hard drive is filling up so fast.
Well, there's still 10tb left
But I like spare space
That's only 10% of a Library Of Congress. You need more!
Or less data!? :)
I can't imagine how life must have been before computers. How did people store their 1,000,000 most favorite albums?
I suppose you could fit that much in a warehouse, but you can't go jogging with a warehouse strapped to your armband.
14:17
Well - I had a walkman
but then you just use to tape stuff for that day
not plug an mp3 player/usb stick into the car for instance
My car has a docking station for a player, or just shuff a usb stick into it
or a dvd filled with mp3s or whatever
same result on the screen of tracks/albums/play options
certainly beats one car that I thought was really cool (15 years old mind you) that had a 6 disc CD multi changer in the back
I'm behind the curve. I was pleased when my car's radio came with a non-analog tuner.
Wow - you realise TV's do have remote controls now - yes?
:)
heya @Jaydles - welcome
@JonClements, thanks!
So - what do we warrant the joining of the VP of Community Management ?
I remember when TVs had buttons on the front of them. If you lost the remote, you could still change channels! Those were the days.
14:23
@JonClements, I need a good wine to pair with Salmon. Is this not the right place for that?
Not particulary - but lots of chat non-programming related happens - as so it should :)
ACTUALLY, my friend and colleague @Bethany wanted to share that we'll be at PyCon, so I was just escorting her here - thought this room might be interested, but wasn't sure it'd be safe to come alone. : )
I'd personally go for a sauvigon blanc
We've discussed PyCon before. The consensus being, it's super cool, but we're mostly too far away geographically to attend.
hi @Bethany - if I've done it correctly - you should have write access
When exactly is PyCon this year?
I am so going to attend the next one when it's in the UK
woah it is expensive for non-students
@Jaydles will you be hosting something or attending a sprint... or ?
@Bethany is being very shy - hello
14:46
@JonClements, poor @Bethany doesn't have enough rep to chat yet. BUT, she said to share that we're not doing anything exciting enough to try to get you on a plane. Just hosting a booth in the expo hall, but wanted to give a heads up that they'd love to say hi and offer tee shirts to the faithful (like you guys)!
I must have missed something.
@Jaydles I did add @bethany to the explicit write list of the channel :)
hey, wassup
do we actually have girls in our room? oO
Looks like at least 2.
Nothing exceptional about that. Any of our usual users could be women, for all you know ;-)
14:49
@Jaydles well - that's cool - we're trying to build our own little Python world and pass on our experiences in that sense - so yeah - go for promoting SE/SO and good luck - it's a very valuable resource
But do not drool over yourself mate. :P
@kevin unlikely
:D
I choose to believe that exactly 50% of all Internet users are women. Anonymity is easily achieved outside of realspace.
@Kevin Well. I must say that though chivalrous and gallant and whatever other word you want to use, you are most definitely wrong. Actual studies have been conducted, and it is proven that there are significantly more male internet users than female.
Yeah, I know. Hence my phrasing, "choose to believe". I prefer the pleasant fabrication over the unpleasant reality.
15:10
Got stuff to do - brb
Neither gender nor sex of an individual has any importance to Python nor this chatroom anyway.
Sigh, I hesitated posting a solution to this question, and someone else posted the exact code I came up with. Those eleven upvotes could have been mine!
Next time I'll submit an answer and then check it for correctness :-)
Aaand Martijn finishes editing a post in the time it takes me to read the post. O_O
15:28
if it's any consolation - he's not perfect - and I know he knows he's not - stackoverflow.com/questions/15407216/…
oh there we go - that copy and paste is better
15:47
Someone has been paying attention in chat. :-)
@Kevin: That extra argument to sum() coming in handy? :-P
Yes, @MartijnPieters, my time in the Python room is paying dividends :-)
BTW, I think I saw a typo in your profile. It says you're the "Plone Metrtics Person of the Year". Looks like an extra t in Metrics.
Ack, I got out-upvoted, just because my solution is "horribly inefficient". So picky!
Thanks, there was indeed a typo there.
brb
I do love how I get to discover new things in Python every time an interesting question comes by.
Even if the OP's usecase is somewhat hard to justify, figuring out how to do what the OP wanted was cool: Overriding the default type() metaclass before Python runs
I was amazed that you could even do that at all in Python 3.x.
16:06
:)
@MartijnPieters you seen this? meta.stackoverflow.com/questions/171685/…
yup, I had read that already. :-)
and float('inf') is a apparently a new one ;)
I know about infinity, just never had a need to create float('inf') in python. :-)
but it is a better option than sys.maxsize / sys.maxint.
Yup - and the opposite is -inf - which works as a placeholder as well
Foot's better
able to walk around on it properly - but not for too much time, and can't do a job on it
heck - maybe I'm a slow wolverine or something :)
I thought you broke bones?
16:19
woah float('inf')
I'm 2 weeks ahead of schedule
What's the reason for float('inf')?
infinity?
who needs infinity?
I've so far only used float(inf) for artificial intelligence routines like Alpha-Beta.
16:20
Because when working with floats, you sometimes need to express infinity, negative infinity and NaN?
Ah, okay. Guess I haven't come across a need for that. Is it a comparison thing?
Good example, @Poik.
sys.maxsize < float('inf')
@MartijnPieters I would love to know what your opinions are
Obligatory xkcd for AI discussion. He should have used float("inf") for that code.
16:22
need biscuits - bbias
I'm pretty sure it has other algorithmic purposes. But it's mostly for algorithms, not 'standard' programming (even though algorithms is all I (want to) do, personally).
@Kevin I don't know. I for one welcome our new robotic overlords.
Ah, alright. Guess I need to do more algorithming.
@InbarRose: I am leaning towards BoltClock there; I don't think we need to complicate things. I also agree with Lance, penalizing answerers is not the way to go.
@JonClements: I recently did learn that older python versions did not have standard values for positive, negative infinity and NaN.
@JonClements: Trying to get those values on Windows in Python 2.5 and before (IIRC) was... challenging.
when calling a function which wants three arguments with only two, it will write to console that func() takes exactly 3 arguments (2 given). Can I somehow store this mesage to a variable? I am embedding a python into C++ wxwidget app and I want to see the error message, but I can't turn on the console, so I am thinking about a way to display the error msg
hmm, redirect stdout to a file-like object, perhaps?
16:29
ow, clever :| lol
I am already printing tuples into file... this didn't cross my mind, lol
You can create your own exception hook for uncaught exceptions .
9
A: Is there a way to react to an Exception raising to the top of the program without try/except in Python?

Martijn PietersYes, by registering a sys.excepthook() function: import sys def myexcepthook(type, value, tb): dump(type, value, tb) sys.excepthook = myexcepthook This replaces the default hook, which prints out the traceback to stderr. It is called whenever an uncaught exception is raised, and the inte...

Calling a function with too few arguments is just another exception.
Either catch that and log it (the logging module already can handle exception logging properly) or install an exception hook to log that information for you.
wow, thanks
I need to share my answers here more often; that's another 'Nice Answer', 'Enlightened' combo bagged. :-)
I need more of those on SO; they are so easy to get on Meta that I almost have more Enlightened badges there than on Stack Overflow now.
it is interesting to watch one 90k+ user answer a question from other 90k+ user.
16:46
Sometimes, 90k+ users have questions too. :-)
It happens to 200k+ users too: stackoverflow.com/questions/6256847/…
That's Jon Skeet discovering a bug in the C# compiler, with Eric Lippert, C# guru from Microsoft confirming it is a bug.
Sounds like a Jon Skeet fact. "If your code doesn't run correctly and you blame the compiler, you're probably wrong. Unless you're Jon Skeet"
Highest voted comment on Eric's post: When Jon Skeet has a question, the C# team apologizes.
clash of titans
unimaginable by me
Hrm.
I answered the OPs question.
16:57
Me, reading the first two paragraphs of Eric's answer: "Mmhmm, mmhmm. I know some of these words."
Yet he clearly doesn't understand it, because he posted a bounty on his question.
17
A: How can I get "dofollow" link in my Stack Overflow Profile?

Martijn PietersYou need to earn 2000 points for the rel="nofollow" restriction for your website link to be lifted. Note that links in your "About me" section will always have the rel="nofollow" restriction applied except for the link in your Website field. It has to be an exact match though, if one has a trail...

shrugs
Free rep! Everyone is upvoting my answer instead of adding another one, which is good.
hmm, yep. That's an unusual bounty.
Maybe if you put a dofollow link in your own profile, with screenshots showing the process? That may satisfy him. Although it may not be worth the effort for 50 points.
goodnight moon
17:12
Not worth the effort.
Note that 'dofollow' is not a term; it's been invented by the OP.
It's a link without the nofollow restriction he is after.
refuses to call it dofollow..
I regret using backticks for it, then. Those are reserved for real things only.
Umm... do you reckon one day, in Python - we'll be saying, "when Martijn Pieters has a question, the PSF apologise"? :)
or just - "do you think we should remind Martijn his children might need feeding more than once a month"? :P
Now, now. You can have 90k+ rep and still remember to feed your kids. Although it might not be easy at first unless you're Dutch.
"Python isn't dynamic. It's just afraid to anger Martijn Pieters with errors."
17:18
You just need to leave your leftovers on the desk next to the computer ... The kids'll find 'em.
I somehow now have a horrific image of Cartman in the South Park World of Warcraft parody
just coming up to when I should start cooking dinner - fantastic
lamb stew tonight - better get it ready - bbl
My kids are lucky.
They have a mum who's actually on the ball when it comes to feeding and clothing and such things.
LOL
"will we see Daddy again!? No kids - but if you have a programming problem - post it on SO and he'll answer it" :)
LOL
My son is just like me.
"Improper formatting, kids. Try again. Flagged and closed."
17:26
@SeanO'Hollaren lmao
Rather sits in the dark than get up to switch on the light when he's in the coding zone..
"MUMMY! DADDY JUST DELETED MY POST!"
anyway - I'm going to be in trouble if I don't sort out dinner
or at least make the pretense I'm doing so
bbl
I start sounding like a broken record: meta.stackoverflow.com/questions/171503/…
I wonder why he's so keen to know the answer, when he's 1,800 rep away from being able to do anything with it.
that's a painful conversation to follow
17:41
anyway, I am out for today, see you guys tomorrow, though we will have house-warming party. (don't know the exact phrase, I googled it, haha^^) The point is that our working group is moving.
ahhh have fun
17:55
@JonClements: I already cleared out a large number of comments on that post.
Hello?
Cool i can type now, just wanted to say thanks for all the help, you guys are awesome
Glad SO was able to solve your problems!
18:41
Hello
I was just going to ask
I recall that I was previously able to provide a function with an argument stating it was a thread by going
def NOTHING (threading.Thread):
But for some reason, when I try that now, it highlights the ' . ' as an invalid syntax
I think you recalled that wrong..
maybe you are thinking of inheritance, like class Nothing(threading.Thread):
oh
You can make a subclass.
Probably
Ah
18:44
class Nothing(threading.Thread):
okay, thanks. I remember now
hey, if I'm defining something as a thread
Does that sort of omit
The need for a while statement inside
Probably not..
I doubt it. :-)
@mgilson: You won that one.
@mgilson: because my answer was 25 characters short and I couldn't submit it. :-P
@mgilson: I suspect the 4121 end point could be inclusive
I've had that happen on ocassion...
in which case you need to slice to 4122..
tutorialsprint.com says I can start a thread by typing: classasthread.start()
18:51
well, it said i<4121
Not i<=4121
but I was debating that ...
But I am told i need one argument for start.
or that it takes one position argument
Actually .\
did you instantiate a thread object? If you do Thread.start(), it won't work. You want something like, t = Thread(); t.start()
I probably did that
I had: class nothing(threading.Thread)
And then I defined something in the class
With a function
Well, Threads take zero arguments (or 1 if you count self as an argument)
And then, I tried to start
threads take zero arguments?
Then why is it telling me..
18:55
did you define start within your nothing class? If so, did it look like def start(self): ?
@mgilson: It also says 3200<i, by that logic the 3200 is exclusive too.
No
I didn't define start
Could you please copy-paste the error message here?
07:00 - 19:0019:00 - 00:00

« first day (880 days earlier)      last day (4293 days later) »