« first day (2272 days earlier)      last day (2901 days later) » 

00:26
mmm bread
oat bread, smoked beef, aged gouda, pickles <3
mature gouda on bread is abuse though :P
00:49
Just pushed a giant Flask-WTF patch to align it with WTForms 2: github.com/lepture/flask-wtf/pull/271.
Decided to play a little dangerous with not deprecating some things. I'd rather just get 1.0 out in the correct form rather than worry about jumping through too many crazy hoops each step of the way.
Any opinions on CSRFProtect vs CsrfProtect (and CSRFError)? I know the former is PEP8, but it's been the other way forever. I did rename and deprecate Form to FlaskForm, so it wouldn't be the only thing being renamed.
01:45
I remember that the first time I used Flask-WTF, I thought that CsrfProtect (the name) looked weird
after all, CSRF is an abbreviation
What are you cabbages up to?
I'm catching up on the transcript. On my new phone.
Well la-de-da!
 
2 hours later…
03:38
Does this look like a troll question to anyone else?
> You can use the code for python 2.9 or less
Zed has won
We're getting more Python 2 releases
@TigerhawkT3 Clueless. Probably not a troll.
 
3 hours later…
06:29
haha, beautiful soup has a file named dammit.py
 
1 hour later…
07:32
cbg
cbg o/
There is a fruit called fag.
how to send some json on tornado
08:18
Hi can any one tell to How to read data from json and store the data in sqlite Data base
open json file and read it with json.load?
thats fine
but I want to store it in sqlite db
with proper row and column
Cabbage
you need an insert statement for that
08:36
but how to write that
how to create a table for that so that I can insert that
I think you first need to learn the basics or you make a good question on stackoverflow. "How to read data from json and store the data in sqlite DB?" is not a good question. I gave you the answer to that question, but the question tends to result in much more questions. Tbh those questions (like "How to create a table") is an easy google type-in.
08:51
ok how to create a table with json with ? is it fine
morning cbg
I didnot fined any thing useful for me
Cabbage!
Cbg
Hmm, Was the reopening here valid? stackoverflow.com/posts/41241918/revisions.
09:26
@BhargavRao re-closed.
Wiktor now has a python hammer too.
He also has a regex hammer
Yep, that from a long time. But py was awarded yesterday
@WiktorStribiżew That question gives far enough ideas on how to approach this specific subproblem. In fact, OP already suggested one solution themselves that works fine in this case (making a possible answer to this question: “Don’t use regexes, that’s just slower”). – In general, it’s fine to expect people to use related questions to solve their specific problem instead of having separate questions and answers for every single special case. — poke 19 secs ago
Feel free to chime in in case this goes on…
Sure, Thanks for that.
09:40
Happy New Year folks (if you're into that sort of thing)
> in that case, we'll have to close many more questions than we do now
Yes, I agree.
@IntrepidBrit Happy New Cabbage to you too!
@poke I'll ask him to edit the post and clarify. Let's leave the review queue to decide.
What do you mean?
Once he edits the post, the post will go to the reopen review queue. So let them decide. (I'm still on the point that it is a duplicate)
Ah, I see
Added another comment…
So.. that auto-upvote comment when closing a question functionality is very broken.
You know when a comment suggesting a duplicate is auto-upvoted when you close vote?
Apparently that also happens when the comment in question says “I don’t think this is a duplicate of [link]”.
09:49
Yep. That system is broken.
morning guys.
hire an engineer ;)
And tell that engineer to use the site's API
no, scrap the data XD
Man, I hate it when people scrap data - it's just so wasteful. Why not recycle it?
Anonymous
10:04
@BhargavRao Have mods been given any update on the info disclosure?
HTML rocks!
how can the spider know that new data has been uploaded on the site?
must it constantly be refreshing the page?
The spiders knows nothing
for example: Airbnb updates their site constantly every minute. how to check it
i just want the new data. dont want the spider to recrawl old data.
Depending on the site - use their API.
10:07
@Ming Please do not cross-post questions in multiple chat rooms, especially when neither of those chat rooms is actually related to your question.
too late
Anonymous
in PHP, 6 mins ago, by PeeHaa
lol it's even cross posting :P
muhahahaha
1.5 hours of accumulated auto-ban
@ToloPalmer no, it's not "muhahahaha", it's "*sigh*"
10:08
there you go
learning it
@JayIsTooCommon On what?
@JayIsTooCommon should've pinged Tim instead of bluefeet (the latter gets an autoping)
Anonymous
oic, good point
10:14
this doesn't sound like something that concerns elected mods
@JayIsTooCommon Nope, it's employee only.
Anonymous
@BhargavRao alright, thanks anyway
2
Q: Vote to close a question automatically upvotes comment that disagrees

pokeSo the following happened: A question was closed as a duplicate of question X Someone disagreed and reopened the question, adding a comment explaining why themselves. In that comment, they linked to the duplicate target X. I disagreed with the arguments and re-closed the question as a duplicate...

^ btw.
10:42
@poke well, that was bound to happen
virtually anything with a dupe link in it affects the autocomment system
nowhere?
rank 11
> This embedded content is from a site that does not comply with the Do Not Track (DNT) setting now enabled on your browser.
@AndrasDeak Check the graph
11:07
ah
(you left a comment on an answer on the same question, but this comment was left afterwards)
@AndrasDeak meh.
Why would one possibly put interrupting ads in between a 10-hour song video?!?!?!
@MartijnPieters I don't think it's serious, I just wanted you to know in case you wanted to react:) I've seen you respond to mild criticisms, so I thought there's nothing to lose.
11:26
@AndrasDeak most issues are with people being too attached to their flag handling ratios, really.
Because there is a human involved in 'awarding' a helpful flag count, there is opportunity to try and discuss your way to a higher rate.
yeah, I've seen that, and don't really get it
I mean, it's a bit frustrating if your flag is declined, but if it's disputed, there's no harm
and even if it's declined, it's just a flag:P
11:48
JUST A FLAG?! ARE YOU CRAZY!?
;P
the lack of heating at the university today might be to blame
I'm most definitely not a troll from the Discworld, as it would seem
and I was like "meh, I'll leave my sweater at home, I'm sitting next to the radiator anyway"
rhubarb
12:12
Rhubarb Andras
12:40
in django, how can I access a field in a serializer that is marked read_only?
when receiving a request, I only see the "writable" fields in update and create
but I want that field as well so I can rename the key and save it
I basically want it to be read_only in responses but still be able to read it in requests
13:05
was in Javascript room it was hell boring
happiness is in python room
i love you all
How do you suggest to use it? Could you help? — FXAMN 2 mins ago
This comment is confusing me so much, it’s making me furious.
@PM2Ring But how do you suggest to use it? Could you help?
– I’m going to make this my standard troll response from this day forward.
:)
too broad / unclear / gimme teh codez stackoverflow.com/questions/41464245/…
hello
13:19
why my page is not working correctly
if i go to other chat room typing is right
We can read your messages, if that's what you mean.
but when i type a text here it got stuck everytime
So, you can't help, but you are saying it's wrong? Why are u here? — FXAMN 1 min ago
HOLY WHAT
Dec 28 '16 at 19:57, by Kevin
@MooingRawr When an OP says "why did you even bother commenting", 99% of the time they're just lashing out.
Hiya - I'm trying to write a ML AI for an online game but I don't know where to start
I posted a question a week or so ago but it was closed for being too broad: stackoverflow.com/questions/41324757/…
So I thought I would try out here
13:26
Cool question (although not suited to SO)
(Sorry, I can't help)
I found this video while researching possible solutions but I'm not too sure if it would suit the problem: youtube.com/watch?v=qv6UVOQ0F44
And I don't know how to implement it in python
@Kevin flagged and it’s gone :P
I’m lost for words…
"99%" may be generous. Don't know if I've ever read a constructive message with that kind of accusatory tone. But maybe that's begging the question.
Cbg o/
13:42
cbg..
is anyone using gcloud command for deploying your cloud app?
Hey guys
I have a quick question.
@neet_jn spit it out..
If I have an instantiated object, and I want to override a function that calls itself:

Would I create a copy and use MethodType to instance the new function within the parent object that utilizes the copy?
The instantiated object being the property of another object.
I originally wanted to make a subclass that extends the parent class of the instantiated object
But it would not be instantiated correctly.
So my next move was just to override these functions of the instantiated object in the constructor.
14:04
Hi, @JRichardSnape I think you'll enjoy this poignant violin work by Èlia Bastida from the Sant Andreu school, backed up by tasty clarinet & sax playing from some other Sant Andreu kids, with vocals by trombone player Rita Payés. Although it was composed by Jobim it's certainly not bossanova - it's more reminiscent of J. S. Bach, IMHO. Por toda a minha vida
@neet_jn You can easily replace a method of an instance, just like you can overwrite (or add) any other attribute. You could do it in the __init__ method, but you can also do it externally, if you like, after the new instance has been returned from the constructor.
@neet_jn You may also find this answer of interest.
@PM2Ring Thank you for your time.
No worries.
cbg \o
question: if you have to argue a certain programming paradigm being "better" than another one in a certain use case, with someone who is staunchly against it, what's the best way to approach it?
14:20
depending on the paradigm... i guess. Every paradigm has it's own pros and cons
And it depends on the person. Some people prefer theoretical arguments, others prefer actual example code so you've got something tangible to argue about and that can be bench-tested.
in general, if the person is more logical style thinking, pointing out the pros and cons and giving facts as example is a great way of winning them over
well, the basic idea is that you want to show something at the "root" level of the interface. One concept to accomplish this is called a "Portal", which is a node where you can inject that element. Another option is just putting the items at the top level and showing/hiding them
if they are a more money, time and just cares about the job done and not how it's done, then you might wanna bring money into it. play with their feelings. This will cost X because it will take Y long but this will be this and that, so I feel it's best we do this reducing the cost and time, These people don't care about how difficult it may be. - To exapnd on PM
14:48
Hmm it's harder than I thought to create animated gifs when I need to be able to query the color of any coordinate on the screen, including non-integer coordinates.
make all the coordinates into ints ;3 then it would be easy ;3
Normally I'd just, like, draw shape primitives, but the equivalent to that here would be to keep a list of polygons and do point-in-polygon testing on each queried coordinate to see which region it falls into. This is impractical at the resolution I'm trying to work on.
@MooingRawr I'm going to try that in a second but I suspect it's going to come out jaggy after I've applied various rotations and such
decimals are just shy small ints. sometimes you just have to strip away the dots and treat everything as big ints.
not sure if that's actually the case i think my joke got lost somewhere in my idea...
Wouldn't you have to store an immutable tri-uple for every x/y coordinate then query by x/y coordinate? Or is the problem the speed of it?
For point-in-polygon, the problem is speed. For round-to-integer-coords, the problem is fidelity.
Although for the latter it might be beyond the ability of humans to distinguish a difference. Further experimentation is necessary.
14:58
is memory a problem? If not, is there some kind of hashmap like structure you could use? Would be like an O(1). If not, there's k/d trees, not sure how useful it is for 2 dimensions
@Kevin I probably need to know more details to make useful suggestions, but you may be able to get away with simple bilinear interpolation to get colour values from your float co-ords. Are you doing the drawing in PIL?
(luckily I did image manipulation in college as my "concentration" kind of)
Ooh, a bilinear filter would almost certainly help. That'll be in the 1.1 release.
Or just draw in a larger bitmap & then blur it a little & scale it down to produce the final image. That'll handle your jaggies & colour interpolation.
Here's a bilinear thingy Andras & I did a few months back stackoverflow.com/a/39515362/4014959
ugh. Morning post-taking-care-of-sick-children-all-night-long cabbage
15:05
Flu-y or spewy? Either way, happy sleep-deprivation cabbage.
No vomiting, just hacking, coughing, and unable-to-breathe-through-their-nose-ing
Not fun. I hope they get better soon. (I've suffered with sinus problems all my life, so I know how distressing it can be, especially when you're a little kid).
Ok, I know how to do this, but I don't know how to do this without creating a rat's nest of poor encapsulation and bloated namespaces
@WayneWerner cbg super dad
hope you can take a power nap at work or maybe at lunch time
TGFWR (Working Remote)
@Kevin Do what?
15:19
Is there a machine learning specific chat?
Isn't there a search function on the main thing?
Couldn't find one there
Then the answer is "Nope"
Fair enough
unless they're really bad at real learning ;)
15:21
Do you know of any ml forums?
@AndrasDeak cbgbrb
Perfect, cheers
> If you have a question about...

social issues in a world where artificial intelligence is common,
conceptual aspects of AI, or
human factors in AI development

...and it is not about...

the implementation of machine learning, or
asking for a development tool or career path recommendation
oops
> Questions about machine learning implementation should be asked at Data Science, and questions about the mathematics of machine learning should be asked at Cross Validated.
@Jacob ^
Ok, I'll have a look there
15:25
as always, look at /help/on-topic and search for similar questions to see if they're well-received
Ok, thanks
DSM
DSM
Good morning cabbage for all!
\o good cbg to you too dsm
morning cabbage snakes
Morning cabbage!
Is it possible to do a dictionary comprehension with a custom dictionary subclass?
I assume not, right?
15:36
\o hiya morgan
DSM
DSM
Not in the way you're hoping for, I don't think. Obviously you can pass a normal dict or a genexp to your custom class.
\o hiya joe
Right, duh. I forgot I could just pass it to the subclass.
Thanks!
I had to write a subclass of a dictionary so that I could alter the value returned from the dict if you accessed a key multiple times. If I never have to parse another flat file in my life, I would be okay with that. This code makes me depressed.
sweet. This year's agile theme for our sprint names are marvel characters
DSM
DSM
We should switch jobs. I actually really enjoy writing parsing code.. I think it comes from trying to write text adventures in elementary school, when I didn't yet understand the idea of splitting tokens so my programs were of the IF ROOM = 3 AND CMD = "GET BOOK" variety.. once I learned there were smarter ways to do it I was so happy. :-)
15:47
cbg
cbg
Because I'm fried, if I want get on a custom dict to use my custom __getitem__, is this a good way to implement it?
def get(self, k, d=None):
    try:
        return self[k]
    except KeyError:
        return d
DSM
DSM
@idjaw: WHY IS YOUR HAT SO AWESOME
@DSM I am the waffle king. I demand all the maple syrup.
I have exactly 0 hats. :P
15:49
You get the waffle for getting 11 hats
@MorganThrapp Hi Morgan! Long time no see. I think using the old-style dict constructor with a gen exp that yields (key, value) tuples would be more efficient than passing a dict comp to your subclass's constructor.
Hey, PM! Yeah, I've been crazy busy at work. I'm the lead dev on our C# services now, so I've been spending much less time in Python. Oh, cool. I'll use that, thanks!
@MorganThrapp doesn't... oh that's get not __getitem__
i think everyone should write a text based adventure game... so much fun and so easy
I've got 16 hats on SO... but I rarely wear hats. Especially not in this weather. :)
15:51
thought it was going to be recursive
@MorganThrapp congratz on the promotion ;3
3
Thanks. :)
@MorganThrapp But yeah, that looks right to me.
DSM
DSM
@MorganThrapp: does get not call the __getitem__ override naturally?
(I just wasted a few minutes trying to find a picture of Lucky Star's Konata shaking her fist in rage to express my jealousy of @idjaw's hat but failed. Still, time well spent. So I guess not a waste at all!)
@DSM Not as far as I can tell.
15:53
@DSM If it makes you feel any better, I'm jealous of your spork.
Apparently I have 16 hats. Some of the hats I think I've collected 16 of ;)
DSM
DSM
I have now officially decided I'm going to have waffles for supper.
@DSM extra points adding fried chicken
Chicken on waffles?!
Maybe Trump is building a wall on the wrong border...
listen here
hold on
16:01
holds head to monitor
see that?
that is effin' delicious
I see that.
DSM
DSM
@MorganThrapp: huh, you seem to be right. I'm a little disappointed. (not that you're right, just in the behaviour :-)
Where's the bacon?
there
if it is not served with real maple syrup, what you are supposed to do is grab the entire plate, and throw it at the kitchen.
16:02
I'm getting "Image not found". Clearly the UK censorship board is working overtime - quite rightly so
North America wins another one.
huzzah
@MorganThrapp, what do u think about this?
customDict([(k, v) for k bla bla bla])
@DSM Yeah, I don't understand why it doesn't use __getitem__. That cost me about half an hour.
If you use a generator you would have a very similar performace with your dict class
@ToloPalmer Why bother with the list? Just pass the genexp directly.
No point in iterating over it twice.
16:08
just an example though
@DSM dict.get is pretty ancient. So I guess it existed before the dunder methods. FWIW, here's the source github.com/python/cpython/blob/master/Objects/…
DSM
DSM
Violation of single responsibility IMHO.
@idjaw so hungry ;(
@DSM Yeah. But if you want to see something really scary, read this comment: github.com/python/cpython/blob/master/Objects/…
16:11
Groovy
Not happy with the fisheye effect here. I took some shortcuts with the viewing frustum and as a result it has to be axis-aligned and it distorts the bottom of the image too much.
I might give it a try in POV-Ray in the next day or so.
I better go now - I'm supposed to be waking up in 4 hours. :) Rhubarb.
The good news is that the frustum calculations are well-encapsulated so slotting in a better algorithm doesn't require changes anywhere else in the code. The bad news is that I can't remember how to do the math the right way.
I feel like I am adding way too many polyfills :\
DSM
DSM
16:14
Rhubarb for PM!
@Kevin whats up with the blinking line at the back... from left to right? other than that' it's so trippy
I don't know. Probably some artifact of the limited precision of floating points trying to calculate the state of the plane as the distance approaches infinity
I thought about implementing some kind of fade-out effect so it gradually washes out to gray as you approach the horizon, but I'm not sure what kind of formula I should use.
brexit mess :D
wim
wim
@alecxe you around?
Basically, I need a function that maps [0, infinity] to [0,1], preferably with some parameter I can twiddle to control the rate of ascent
16:22
@wim, finally I found you after the holiday, did you work out your mem solution to that AoC 2015 day 17 part 1 ? I got the answer after you left, but never saw u again
After-holiday-cabbage
\o hiya granger
@Kevin well, can you be more specific :D
@MooingRawr o/
16:23
@Kevin inverse logit?
DSM
DSM
tanh?
aka logistic function?
If anyone's using Flask-WTF (or just interested), could you take a look at github.com/lepture/flask-wtf/pull/271 to see if I'm about to do anything too silly?
scaled
tanh too
It's a really big patch, deprecates some things, breaks others.
16:24
logistic function is scaled tanh :D
This is the part of the process I don't like... Choosing between multiple valid approaches, the only deciding criteria being "what has the best feel?"
It doesn't help that it takes three minutes to render the image as-is
Rendering animation seems like the kind of thing that can be parallelized. I guess it could be tricky depending on how you're calculating each frame.
wim
wim
the recursive impl and the DP impl are both about the same size (in terms of code) but the DP is a lot faster / more efficient
was kinda tricky to get it right though, took me a long time
@wim this solution works for my data input for part 1 but im not sure if it's complete since i didnt have more than one data access pastebin.com/DSNdRYKP
i didnt do part 2 since didnt felt like it and what not
@davidism Yeah all the frames use independent calculations. On top of that, 90% of the work of rendering one frame is independent per-pixel calculations.
If only Python had actual threading ;_;
"What about multiprocessing?", you say. I don't think I can put Pil(low) Image objects into a shared queue.
I could save them to disk and pass around filenames instead, but... My code's already messy enough.
16:35
cbg
wim
wim
@MooingRawr no, your solution is incorrect
ahh that's what I feared.... I thought it would be too easy
IT works for my data but I thought i got lucky but couldnt get my hands on other people's data lol
wim
wim
hmm, actually I might have spoken too soon
I'm trying to find a failure case for what I thought was the problem, but don't seem to be able to
Aww yeah, no issues left in Flask-WTF 0.14 milestone, time to make a release! github.com/lepture/flask-wtf/milestone/1?closed=1
Then just have to figure out I18N support and it's time for 1.0.
@wim o.o well let me know if it fails or not. xD
I could look into it some more but atm I'm trying to figure out a nice way to solve a Project Euler solution
16:47
rbrb
@davidism cool :-)
Ooh, nothing quite like seeing each of your ten processes all fail and smash together ten stack traces.
PPPPProcess Process-2:
PTProcess Process-1:
rocess Process-10:
Process Process-5:
PTrocess Process-8:
raceback (most recent call last):
rocess Process-7:
TPTrocess Process-9:
rocess Process-4:
Traceback (most recent call last):
T Traceback (most recent call last):
It goes on like this.
I used 0.12, so I'll have to take a look
cbg all
I've made a lot of changes since 0.12, just make sure to read the changelog.
16:54
@MattDMo \o cbg
from multiprocessing import Process

if __name__ == "__main__":
    def f():
        pass
    p = Process(target=f)
    p.start()
    p.join()

#AttributeError: 'module' object has no attribute 'f'
target has to be visible at the global scope...?
Not good news for my giant pile of closures.
That code works for me
^ I second that on 3.5.2
Are you in a weird environment where the conditional doesn't pass?
i.e. __name__ is something other than "__main__"
16:56
It spawns a process for me
thirded... on 3.6 and 2.7.10
Kevin has gone crazy, nice. that or his computer has been taken over by an evil smart person who just wants to mess with kevin slightly
AttributeError: 'module' object has no attribute 'f' in 2.7.11, AttributeError: Can't get attribute 'f' on <module '__mp_main__' from 'c:\\Users\\Kevin\\Desktop\\test.py'> in 3.5.1.
3.5.1..... i wonder if there was a bug there
well, there's (probably) your problem
get a real operating system :troll:
16:57
Works for me on Windaz & nix
Well, never mind. Works fine for someone else on Windows. Kevin, are you using Windows ME again?
He might actually be working with MS Bob
DSM
DSM
Works for me on nix. That makes five or six?
speaking of ME, I recently found a sealed copy with a manual in my basement...

« first day (2272 days earlier)      last day (2901 days later) »