« first day (1736 days earlier)      last day (3228 days later) » 

1:33 AM
4
Q: What kind of cabbage is on my photo?

qm69I bought it very cheap during the closing of the grocery market. The seller said that it was some kind of lettuce, but it tastes like upper leaves of cabbage.

 
2:07 AM
It's clearly lettuce. :D
 
I figured if anyone would know, it'd be y'all.
 
2:24 AM
Welcome Bas
So what's new, Wayne?
 
cbg, all
 
2:42 AM
Hello Steve
What's going great?
 
3:22 AM
@AaronHall Hi Aaron. Got a call from work, so sorry for the delay. And now it's bedtime. But good to see you + rbrb.
 
good night!
 
3:42 AM
Good night Martijn, hope you're doing well. Cheers! I'm heading to bed!
 
 
3 hours later…
7:11 AM
Hey up all
 
7:36 AM
Hey up
 
7:46 AM
Hey up
 
8:05 AM
Good... Goooood... My Yorkshirisms are spreading! Soon Salad will be eradicated permanently!
 
8:26 AM
Hi all
 
9:02 AM
Do we have a good dupe target for this: working of \n in python ? I've linked it to "Difference between __str__ and __repr__ in Python" and I guess the two links in Output string without quotes in the Canon collection are relevant, but I'm wondering if there's something more specific.
 
9:17 AM
I have a question about adding nodes to a NetworkX graph
I didn't understand how the pattern got changed and is not even random
 
@HimanshuMishra: Please do NOT link to your own fresh questions!
 
Oh Okay
 
See the section "Posting Question/Answer Links" in the Rules
rbrb - dinner time
 
Bit early boyo?
 
@JonClements yeah, I know disputed doesn't mean anything towards a flag ban, but there was absolutely no way that they should have been disputed, so I gave up.
Went to a beer tasting at 3pm right after work, got home, sleep.
So I got 8 hours of sleep, just offset. :)
 
re-cbg
I don't have much hope that this OP will clarify his question or post an MCVE, but I reckon we should give him 10 minutes or so. stackoverflow.com/q/31489121/4014959
 
10:44 AM
@MartijnPieters as far as I can tell, no. Of the questions tagged , most are either also tagged , or have "Jinja 2" in the title or body. The rest were all asked years after Jinja 1 was discontinued (2008).
 
@davidism Then I'll just merge em.
Which one do you prefer?
 
I was going to propose a synonym, but "You need 5 points in the Jinja tag" :(
I think should be kept, should be the synonym
 
Then you better edit the tag description.
I can't actually create a synonym..
because the jinja2 tag has so many more posts attached.
 
I'm editing the wiki, was going to edit some tags so I have 5 points then propose the synonym.
Is there really a "too many questions" reason for rejecting a synonym?
 
Yet another chink in the mods armour. We need to work out how to exploit this...
 
10:57 AM
Aaaarrrrgggghhhh. If I thought you meant that I would be surprised
I should perhaps also explain that it's currently 3:57 PST, and I woke up at around 6:57 BST. 31 hours and some thousands of miles later I can still find nothing better to do that witter in the SO Python room. Rhubarb, all (bugrit)
Millennium hand and shrimp (since @JonClements isn't here to write it)
 
11:11 AM
@MartijnPieters wiki edited, waiting for approval
 
@davidism there is.
> Can't create synonym; the 'jinja2' tag appears more than 1.25 times the 'jinja' tag
 
So you have some "merge" tool that gets around this, or are you just referring to manually editing a bunch of the tags?
Should have put something like "Jinja 1 was last updated in 2008. If you have a question about it, use this tag and mention the version in the question."
Hmm, now that I look at it more, all the documentation refers to "jinja2", so that's probably the tag that should be kept. I think I'm making this way too complicated. :-/
 
Hello
 
I've a small doubt regarding caching in Django
Is never_cache decorator used for disabling browser cache only?
Or does it also disable redis cache backend?
 
11:28 AM
No idea sorry :( Incidentally, I think the word you want is "a small question" as opposed to "a small doubt" (just a quick fyi)
 
No issues..
BTW, I feel sorry to say, but I don't know why that choice of word make any difference here..
 
It's just the correct word. I wasn't shouting at you or anything :) just letting you know in case you were interested.
 
No, I didn't mean you were shouting.. Just was wondering..
Anyways thanks :)
 
Hmm
 
11:37 AM
"Doubt" implies skepticism. But you have no basis for being skeptical about never_cache. You're asking a question about its behavior without prior knowlege that would lead you to believe one thing over another.
 
Indian here
And that link marks 'doubt' with Indian English.
 
Read the other answers. And the comments below that answer.
 
11:49 AM
@RohitJain to answer your question, it looks like Django makes the browser cache mirror the server cache, so it does both
 
That would really be dis-heartening for me.
I want to disable browser cache completely.
But enable redis cache..
When I add never_cache decorator to my view
Django only creates following two keys in redis:
views.decorators.cache.cache_headerand django.contrib.sessions.cached_db`
But if I remove that decorator, it also adds a views.decorators.cache.cache_page key in addition to above 2
 
cbg all
 
cbg
 
12:14 PM
Saturday == Podcast catchup day...
 
12:38 PM
Cbg all
 
Sounds like fun, listening to podcasts all day!
 
Not all day - there's other things to do - but yeah... only real day I get off :p
 
Anyone else have anything great going on?
 
I'm guessing since it's a Saturday and people are only lurking - then yes :p
 
12:56 PM
Well I arranged for others to manage the Python meetup this weekend, so we could go to the beach with friends, but it's thundering and dark outside... so it looks like the day could be a bust...
 
user559633
Heh, I just woke up. I think I'll be working on some talk material today (about at the point to start coding so I can get to the 'how-to' example and profiling stuff).
 
user559633
@AaronHall Sounds like a day for a bar crawl.
 
house work to do... bbiab
 
is there any SO chat bot written in python present on github?
 
user559633
1:11 PM
@AaronHall I..hmm
 
@AaronHall guy with my name..
 
user559633
I'll never understand why some repos get so popular in github.
 
I could tell you why...
 
user559633
Amusement + easy to grok is one way?
 
There's these social posting sites, like HackerNews and Reddit, where stuff like this gets on top.
 
user559633
1:15 PM
@AaronHall Oh, yeah, that makes sense.
 
2:22 PM
cbg @JRichard
 
Cbg @jon
What's happening? I'm considering popping down to the beach, might just be warm enough for a swim
 
Aye tis a fine day.
 
Bah... it's too warm ;(
Where's an ice age when you want one hey... pesky unreliable things
@Ffisegydd why no updates to sopython.com/wiki/Fizzy%27s_Insanity - I was "enjoying" that :p
 
2:49 PM
@JonClements Come visit sunny Australia. It's been bloody freezing lately. But still (mostly) sunny. :)
 
A land mass where you can only really actually live around the edges with more creatures that can kill you than I can count... sounds like a great idea :p
 
I've written some code for this question, but I don't know if I should post it. The OP has responded to some requests, but the question is still rather unclear, and he's made no attempt to post any code.
I (mostly) wrote the code for my own education - I normally use GTK2+ for GUI work but I decided a week or so ago that I ought to learn a bit of Tkinter so I could answer Tkinter questions.
 
Keep thinking I should visit my brother in Melbourne
 
My mother and her sister lived in Melbourne for 15 years
 
However, for now, the Sea in Suffolk will have to suffice
 
2:55 PM
@JonClements I live in a rural district & I rarely encounter deadly creatures.
 
I've been invited to go see an ex-colleague in Oz... only problem is - I really don't like flying
 
I'm not fond of flying either.
I lived in Melbourne for 6 months, a few decades ago. It gets too cold for my liking.
 
@PM2Ring yeah.. but at least in the UK if you see a spider in the bathroom, you can be relatively sure that if you just pick it up and throw it out the window, you're not in danger of it biting you and hoping the ambulance arrives in time
Think my mum travelled a bit around Oz... think she left home in her 20s to go there (so that'd be umm... early 1960s or something)
 
You can do that here, too, with most of them. The main spider to be cautious of that might be found indoors here is the redback, a rather small black widow spider, and it's quite easy to identify. And it's not aggressive unless cornered. You're not likely to find redbacks in a house that's cleaned regularly, but you may get them in sheds, woodpiles, etc.
 
as long as they're identifiable - that's okay :)
I'd just not rather be in an environment where I've had a few beers or just woken up, and happen to pick up the wrong spider :)
 
3:05 PM
OTOH, there is the Australian funnel-web spider. They are scary, but you'll never find them inside.
 
Oh, and what's that massive bird with those nasty looking hooks on its feet?
One went missing from a Zoo a few months back here
 
@JonClements Cassowary. You have to go into the deep bush up north to meet those guys. But yeah, they're territorial and they can be very aggressive, especially around nesting season - the males protect the nest.
 
Note to self: if visiting Oz - don't do "deep bush up north" :p
 
@JonClements An unlikely scenario, unless you like sleeping in cluttered old sheds. :) Redbacks are quite small & tend to run away when they encounter humans. You have to be pretty unlucky to accidentally grab one.
 
well... I'm not the luckiest puppy in the world... so I assume the worst and aim for the best :p
 
3:17 PM
Several years ago, during a phase of not keeping my flat very tidy, I did find a redback inside. I picked it up with a stick and dropped it into a Daddy Long-Legs web. The redback was not happy. But the Daddy Long-Legs was - it captured & immobilised the redback in seconds.
@JonClements Another fun critter that lives in that part of the world is the crocodile. The fresh-water ones aren't too bad. You wouldn't go swimming in their territory, but you're safe enough in a small boat. OTOH, the salt-water crocs are mental. :)
 
You obviously don't work for the Australian Tourist Board :p
 
Still, we get the occasional tourist (both Aussie & international) swimming in areas where salties live, despite prominent warning signs.
@JonClements As I said before - it's fairly unusual to encounter the scary critters - you have to go looking for them.
 
I'm pretty damn sure I wouldn't be tempted to go swimming (however wonderful the waters were) if it had crocs in it - nice/nasty ones
 
OTOH, there are lots of un-scary critters. I get 6 different species of parrot visiting my birdbath. And there are kangaroos that live in the nearest big town - it's not unusual to see a few on the footy field.
@JonClements Few sane people are. :)
 
3:38 PM
wb @JRichard
 
Tried swimming, blowing a gale, kids not impressed, back indoors
 
3:55 PM
That'll learn ya.
 
Yeah... learn to control the weather dammit! :p
 
Probably not, I'm a relentless optimist where british beach behaviour it's concerned :)
 
You mean the UK has beaches worth going to where you're not dive bombed by seagulls?
Or frequented by people in their 90's that still think they might look okay in a bikini?
 
cabbage
 
4:11 PM
Hey up
 
cbg @vaultah
I have some HTML content that I want to pass to the template to render. However, it escapes the tags to use HTML entities (<), - not like that's ever happened, hey @davidism :p
 
:-|
 
wb Steve
 
4:43 PM
rhubarb
 
5:05 PM
Wow - talk about inventive tags :p
 
:)
 
@vaultah can't you just settle on some avatar? :p
 
I like this one, guess I'll keep it until they fix that bug...
yesterday, by poke
Can we all celebrate the day vaultah willingly changed the avatar to some fixed image?
:D
 
5:26 PM
:)
lucky I'm professional else it'd be so tempting to just go into your user profile and give you an image :p
 
I want to add element in a list that shows as: [ ((0, 1), (1, 2)), ((3,4), (5, 6)) ]
below code shows list as [(0, 1), (1, 2), (3, 4), (5, 6)]
>>> lst = []
>>> lst += ((0, 1), (1, 2))
>>> lst
[(0, 1), (1, 2)]
>>> lst += ((3,4), (5, 6))
 
lst += [((3,4), (5, 6))]
 
but thats a list member
I want to add a member ((3,4), (5, 6))
oh ok
@vaultah so [((3,4), (5, 6))] is list, but gets added as expected. I did not get it
you mean lst += [(9,10)] will add (9, 10)
 
5:44 PM
lst += thing is the same as lst.extend(thing). It's not equal to lst.append(thing)
 
5:54 PM
@overexchange "When dealing with lists like you are, though, the += operator is a shorthand for someListObject.extend(iterableObject)", this does not differ from what I said
 
6:04 PM
lst.append(thing) == lst.extend([thing]) == lst += [thing]
 
6:16 PM
dupe, pick any
Actually never mind, I got too attached to the question and to the OP. I'm stepping back
 
6:54 PM
There's a thunderstorm about 4 miles away from my house. It's loud!
 
I love storms :p
re-cbg all btw
 
I was out at the beach to fim the sunrise, instead I got some awesome lightning videos.
 
awesome - love lightning :)
 
7:14 PM
hello do you think python is very important .I would like what can do with python, thanks in advance
 
:[
 
Hello, do you think a computer is very important? What can a computer do?
 
7:34 PM
@davidism what's a computer - sounds like it might be cool or something
 
there is big difference between languages, what advantages of python
 
Advantage: it's not those other languages. Your question's pretty much unanswerable though, did you have something specific in mind?
 
8:01 PM
FAr too braod, huh.!!!..so share what you can some link ,a book anything....no need to be a dick. — Sijo P George 31 mins ago
by someone who's "exceptionally good at maths"
 
But... I love being a dick D:
 
> This game in my mind (i even named it last year..) [...]
 
bah - nuked the Q
 
stackoverflow.com/q/31493469/400617 unclear what the problem is, what they're describing isn't necessary
 
8:17 PM
what does it mean when my IDE tells me a function call can be replaced with a set literal? I'm doing return filter(None, list(set([self.funcOne(), self.funcTwo()])))
 
I think you can do {self.funcOne(), self.funcTwo()}
 
but that returns a dict...no?
 
{a, b, c} is a set literal @AutomaticStatic
 
ok, so then return filter(None, list({self.get_home_ownership_from_form_A(), self.get_home_ownership_from_form_J()}))?
sorry set literals are new to me
I generally use the list(set([])) thing to remove duplicates in a list
 
Value of what type do you want to return?
 
8:21 PM
@davidism I want to return a list, not a set
 
filter(None, {func1(), func2()})
 
ah ok
thank you
 
Hi guys, I want to understand a statement I encountered in a code. minW = min(width[x:(y+1)]) . I could see that its functional programming inside width list, but that is it doing, can anyone explain? I was thinking that its trying to find minimum between a range.
 
width is the number of dimensions in an array I think
 
@mad_programmer slicings, min
 
8:26 PM
@au
@AutomaticStatic yes, its a list of integers, but what is the expanded form of that lambda operation?
 
@vaultah yeah, but what the heck is 'width'?
 
@mad_programmer There's no "lambda operation" or "functional programming" in the code you posted. All it's doing is taking a slice of the list from x to y and getting the min value from that sublist.
 
@AutomaticStatic a sequence, does it matter?
 
@vaultah stop typing what I'm going to type first! :)
 
haha
 
8:30 PM
@AutomaticStatic that is a list sequence.
 
@vaultah sorry I thought this was actual code...
 
youtube.com/watch?v=-6vLp07ZePY - So love David Mitchell :p
 
@jon the fort is not going to fly away. No one needs to hold it down.
 
@vaultah so, is it trying to compare x by incrementing y+1?
 
2 mins ago, by davidism
@mad_programmer There's no "lambda operation" or "functional programming" in the code you posted. All it's doing is taking a slice of the list from x to y and getting the min value from that sublist.
 
8:32 PM
ok, got it now. thanks
 
In a system with a bunch of CPU-bound stuff going on where you might multithread certain things, do you usually put all available threads in the pool for executing a given task or do you ever leave some unused? Sorry if that question doesn't make sense. New to threading.
 
You can do whatever you need to. If you just need a pool, just use a pool. If you need some one off threads, use those too.
Note that if it's cpu bound, you may be better off using multiprocessing, asyncio, gevent, or eventlet.
 
Ah, got a warm and fuzzy comment "Your code not only works but is about 10 times more efficient than mine. Thank you". Nice to be appreciated.
 
@davidism I thought eventlets were I/O bound...we use them for exactly that reason in our celery stack, from what I understand
 
cpu != io
 
8:43 PM
guys, I have a list say l = [10, 15, 17, 18, 20] and I want to know if a sum of any two of the numbers in the list could produce 30, how could I achieve it?
 
@davidism exactly my point. We use eventlets for single threaded async stuff
 
you just said you were doing cpu bound tasks though
 
and you said "if it's CPU bound, you may be better off using...eventlet"
 
anyway, as far as I know you can basically use any of the solutions for anything, except for cpu bound tasks with threading
 
OK
It's hard to keep it all straight at first
thanks
 
8:45 PM
I don't know how to make this clearer: cpu != io, eventlet is good for cpu, therefore use eventlet/gevent/asyncio/multiprocessing
 
well I guess I'll have to do some reading into why evenlets are used for single threaded I/O bound stuff if they're good for CPU
 
yes, it looks like you should do a lot more reading
 
easy there, tiger. You were a noob once, too.
 
nope, I sprang fully formed into perfection
 
Anyone happen to know where ipython3 gets its info about a function's signature?
 
8:49 PM
inspect.Signature probably
 
....interesting. I have a decorator where, if the decorator is used, inspect.signature and ipython
give two different results for the signature
 
Which one is correct?
 
inspect.signature
 
rhubarb time for me, take care all
 
8:52 PM
In [2]: @testing.theShowMustGoOn
...: def f(a,b): return a,b
In [3]: f?
Type: function
String Form:<function f at 0x7f5422b3a378>
File: /home/shulinye/.dotfiles/scripts/pythonutils/<ipython-input-2-ae60e95e813c>
Definition: f(*args, **kwargs)
Docstring: Wrapped with theShowMustGoOn
In [6]: print(inspect.signature(f))
(a, b)
Incidentally, help(f) is correct
 
are you using functools.wraps?
 
Incidentally, that's a great song.
 
Yeah
 

« first day (1736 days earlier)      last day (3228 days later) »