« first day (1871 days earlier)      last day (3301 days later) » 
00:00 - 17:0017:00 - 00:00

user559633
00:49
figured out the thing i referenced above -- worker was looking at a different redis key and rq was just creating its queues silently as needed
user559633
hooray for magic
01:17
i have so much food, but alas, I must leave it to go on a business trip :(
That's nothing to be sad about. It's a challenge!
01:52
please rules
02:20
ok
 
5 hours later…
06:56
Morninb CBG all
Again broke 5 hour streak :P
07:12
@thefourtheye I don't think just adding return will solve his problem ?
@VigneshKalai True. But the program has quite a few problems. That is why I thought it would be better if they understood the dup first. I can reopen if you like.
@thefourtheye I don't want to reopen it. I just wanted you to know so before someone else comments on it :)
And it wrong in many ways .
Hmmm I'll better reopen it.
 
1 hour later…
08:19
Hey up all
08:36
Cbg :)
08:49
Are there any tools out there that can tell me if a line is causing a memory allocation?
09:10
Morning all
09:43
Cabbage!
cabbage
10:04
@holdenweb bugrit :)
10:40
morning friends
Bit early eh corvid?
Business trip :\
cabbage
This message brought to you by a brand new modem - my old one died in a severe thunderstorm yesterday. The modem wasn't turned on, but it was plugged into the power board and the ADSL line.
RIP :(
I'm altering a Wordpress plugin... I'm sooooo going to need a shower in a little bit
10:59
@JonClements shudders
11:14
@Jerry It was a bit annoying because I'd just spent the last couple of days reading manuals and playing with settings to get that modem working properly with a wifi router. And that wifi router now seems to be flaky, too. Fortunately, both items were 2nd hand, but it's still annoying.
The new modem came with a baby ethernet cable, a USB cable, a couple of phone cables, and an ADSL splitter / filter. The user manual's in Chinese English, but mostly comprehensible. It cost a little under $15. I could easily pay more for that around here just on the power pack or splitter / filter. So I can't complain about the price. :)
11:28
@JonClements could you change the users DP stackoverflow.com/questions/33997387/cursor-fetchall-in-python
Or any other mod
Adult content in DP
@VigneshKalai you should probably flag some of the user's content rather than specifically pinging a mod in here.
I don't know how to flag his DP
You don't, you just flag any content they have.
So you are saying to flag OP's answer or question
Yes.
Flag the question with "The author of this content has a display picture which contains adult content." or some such.
11:31
Can't remove the ping comment it has been more then 2 minutes can you removeit
Well it's too late now, but for future reference. Plus I can't see any adult content in that DP so I assume it's already been taken care of.
Okay will do that :)
Hey all, anyone know mechanize library well?
@Ffisegydd thanks - @VigneshKalai if you feel any intervention required by a moderator is required - then chat isn't the way to do it
or urllib2?
11:43
@VigneshKalai find something to flag use the "other" reason etc... it can be looked in to.
@TimWilliams if you have a question, just ask. If someone can help then they will do.
Sorry for the inconvenience caused. Didn't know that before.
Im working on a facebook script...the script does not use access tokens. due to its features using access tokens is not possible. I am trying to make a script to request a url from facebook. I think iv managed to make a script that logs in but having trouble printing html data
@TimWilliams that's a good start, but for someone to be able to help you you'll need to provide specific details of what problem you're facing.
I am trying to make a script to do a search query on facebook and return results in html
11:54
Okay cool, what's your problem then?
My code is not working. Do you want to take a look?
@TimWilliams no, but don't you think you should provide the code for whoever may want to help? It's taken what? 10 minutes? Just to get to the point of code?
Incidentally if your code is longer than 12 or so lines, please link it in a dpaste or pastebin.
@TimWilliams and what's your actual error/problem? (This is getting to the point of pulling teeth by the way, why am I having to ask you these questions when you're the one that wants help?)
the script does not print out html source? surely thats clear enough or do u want more
I want a script to login do a query and print html source thats it
12:04
@TimWilliams that isn't clear at all. You've literally said nothing about your actual issue, so 1) yes I do want more, and 2) please don't be snarky when you're trying to receive free help from strangers. I've now had to waste 20 minutes trying to help you.
Incidentally, this isn't a free "write me the code" room, we expect you to do the work and to come to us when you have a specific error, not to just turn up, waste time, and say "I want it to do this, make it so"
All i was wondering was why there was no html code output i dont get how you dont understand that
Because you read response twice.
@TimWilliams because you never actually explained your issue. You came in with bland unhelpful statements and assumed that people could read your mind.
Iv been trying to explain the issue that whole time i dont know how you could not understand that
Well, the issue is resolved now, right?
12:11
@Tim go back and actually read over the conversation we just had, really read it and look at it from my point of view (who has no idea what you want). You didn't explain a thing. You came in with unhelpful high-level issues ("I want to do X") and it took me 20 minutes just to get some code out of you.
sadly no
Remove the first response.read(), it's needless
thanks it works now
@TimWilliams it's taken 30 minutes to get to this point. If you'd have come in and said "Hi guys I'm having an issue. Trying to get some HTML from a website. Here is my code. <link>. My issue is that it's not printing out the HTML" then it would probably have taken 30 seconds. Are you not seeing my point at all?
Yeah i see that point
12:17
FWIW, saying "[I'm] having trouble printing html data" doesn't explain what trouble you're having. That phrase covers a lot of territory, eg, the data that gets printed isn't formatted how you want it to be. That your code doesn't print anything at all is certainly not the only interpretation. And that's why Fizzy got a bit frustrated.
Thats understandable
Anyway, I think we're all on the same page now, and vaultah's solved your problem. So it's all good. I hope. :)
13:06
morning
Morning, mri3.
Why does one create an XSD, when all the properties are strings and nullable?
cbg
I am calling a method and getting an error that it takes at most 1 argument and 2 is given
I'm using kivy
it states specifically this line ' self._childrens.pop(widget, None)'
when i debugged i found this " ((<WeakProxy to <__main__.HubTestsScreenManager object at 0x7fa07a623db8>>,), {})" is what is being sent into it
i am using 'self.remove_widget(self.hubt_sm)' which is an ObjectProperty for a screen manager in kivy
to call it
Can anyone help explain why i am receiving this error?
13:29
Is self._childrens a normal Python list or array object?
yes. Defined : self._childrens = []
Ok. The list.pop() method takes at most one arg: the index of the item you wish to pop.
plane has wifi, the future is glorious
If you don't specify an index the last item in the list is popped.
So you can (probably) do:
But the arror i am getting is that i am sending in 2 args
13:35
if widget in self._childrens:
    self._childrens.remove(widget)
It bothers me that googling "python tabs" doesn't bring up the docs page that explains the counterintuitive way that tabs work in Python
The existing top results are all of the "you shouldn't use tabs because PEP 8 says so" variety, which is not useful.
I am not sure if i want to edit the code. That code is from the Kivy library.
Is formatting that important? You can easily just parse every tab to 4 spaces
Yes I can configure my text editor to insert 4 spaces when I hit the tab key, but I have no control over the horde of users that mix tabs and spaces
I want to link to the docs and say "this is how tabs are interpreted, do you really want to deal with this mess?"
adding site: docs.python.org to the query turns up this document which contains the information I want, but it's in crusty pre-2.7 land
I've removed widgets before using this (remove_widget) but for some reason when i try to remove the ScreenManager i get this error
Is there a way to stop sending in 2 arguments?
user559633
13:46
@corvid double-edged sword, i sat next to a guy on a flight that was using the wifi for his 5 hour phone call
@mri3 Huh? I guess, that could be a bug. As I said before, the list.pop() method only accepts an index as an arg. Of course, other objects can have .pop() methods, too, (eg set objects), which is why I asked what the type of self._childrens is. But it would be weird (and annoying) for such methods to accept args that aren't indices, IMHO.
Bear in mind that I know next to nothing about Kivy, so I can only offer help that's relevant to general Python stuff.
Found it, finally. python.org needs to work on its SEO.
user559633
Set tab to indent three spaces. Basically, set tabbers to stun.
Indent one space, gotta save those bytes
I find it weird that the method remove_widget accepts 2 arguments (self, widget) and the self._childrens.pop(widget, None) accepts exactly what i am sending in " ((<WeakProxy to <__main__.HubTestsScreenManager object at 0x7fa07a623db8>>,), {})"
13:50
url.strip()+' - CatchAllError' - either needs MCVE or is a tab-based typo
@Kevin The old docs are good because they show how scary mixing tabs & spaces can be. :) Of course, Python 3 makes it a lot simpler, since you just can't mix tabs and spaces.
user559633
@Kevin That's crazy, but it is polite to the compiler. I think of it as "I scratch your back..." and maybe there will be a point in which I'll multiprocessing incorrectly and the compiler will whisper "...i got you bro"
@tristan Sometimes I wonder how obnoxious people can be on a plane. Like, what will the flight attendants do? Ask him to leave?
FWIW, I went through a period of using 2 spaces per indentation level. When I look at that code these days it looks horribly cramped, and I usually re-indent it to 4 spaces (using an awk script :) ). I have my editor configured to insert 4 spaces on Tab and it dedents one level with shift-Tab (if the cursor's in the indentation area).
I like to think the air marshal would tase a sufficiently annoying passenger
And hopefully flight attendant training includes how to perform a satisfactory arm bar. Although it might be hard in tight quarters.
13:57
I often do one space indentation in the REPL. But I rarely do stuff in the REPL that extends over more than a few lines.
Yeah, same
user559633
@corvid By the end of the flight, I had started pretending his was talking to me -- making direct eye contact and responding
Morning cabbage.
I think this one needs to be closed: stackoverflow.com/questions/33998701/… but I can't decide whether it's a) unclear; b) unreproducible; c) OP is in a different universe.
Greetings, Morgan. I can't believe it's December already.
voting as off topic (needs mcve / error message)
14:08
How's the future?
"Also it should produce a file with that name in the workspace or somehwere." Maybe by "open" he means "programatically run Notepad and open the document so I can view it"
No, that doesn't seem right.
It's just a combination of not being able to speak English well with not being able to speak Python well.
@Kevin Good call.
@QuestionC Sure, but I also get the feeling he doesn't understand what the current directory is.
@Programmer Warm and rather muggy.
I'm now interpreting "I'm getting errors" as "it's not producing errors, but it isn't doing what I expect either". My money is currently on "the file is being saved but not to where OP thinks the current working directory is"
14:13
That's quite the change from 16F. I'll take it.
OTOH, if the input file isn't in the cwd he should be getting an IOError: [Errno 2] No such file or directory
With a side bet on "the code OP showed us isn't the same as the code he's running"
@Programmer It's 1:15 AM here and the temperature's finally dropped to 20°C. Tomorrow it's expected to reach 35°C.
'tee hee, I said "input.txt" but really it's "C:/users/steve/programs/myproject11302015.dat"'
At least he did post code when requested. Although he first posted it in a comment. And then in an answer. But I got him to delete that answer.
But if you want to see a real nest of confusion check out stackoverflow.com/questions/33999338/…
14:20
I mean, his code does save to out-file, not out-file.txt. If he's expecting a notepad icon to appear in the folder, he's not gonna find it.
When faced with these edge cases, I assume the asker is my mom learning programming or Jesus in disguise.
That explains why there's only one set of footprints after you walk up the call stack.
4
:giggles:
I think it may destroy the magic to say this, but I have no idea why people liked my "too late, it's in production" message. This follows a similar pattern I experience IRL where people react to my statement of fact with uproarious laughter.
Maybe they're so used to diplomatic BSing that they find the harsh but pragmatic response refreshing.
Maybe my deadpan delivery is so perfect that the content doesn't matter, only the inflection.
Much like how the killer joke can hospitalize you after you read only two words of it
14:32
It was just the context. I think the combination of pragmatism and the reveal that it was production code just hit the essence of programming for a living.
I don't get why it's funny out of context, but you had just finished describing an arcane bug involving file buffers and memory limitations, and hackery workarounds, caused by forgetting that renaming files is called 'moving'. It was just relatable.
Yeah I think it's stronger in context. I just find it hard to believe that 17 minus X people bothered to go back and read the transcript.
(where X is the number of people that were actually present for the conversation)
The rest of the stars just came because I'm a hip trendsetter.
Maybe it hit critical mass, and started sucking in other stars.
Possibly after a certain point, a starred message feeds on its own attention. "this message has Y stars, but why is it funny? I'll read the transcript to learn more... Oh, that is funny with the context, I will star it"
There's an alternate universe where it got one fewer star by active readers, and failed to snowball from there
The fact that we visibly laughed in chat had more to do with it I think.
I think I done messed up me dependencies :|
14:43
I didn't read the transcript, so I've no idea what the context is, but I still starred it.
Also, hello :-)
"16 people starred this, so it must be star-worthy. I will star it"
It's not irrational if you have a high opinion of your peers' opinions.
I just thought it made a good motto :-)
I could see it on a decorative throw pillow.
I think I need to contact cafepress...
Hi, Zero. Long time no see.
Hey :-)
I just ssh'd into production and executed a query of the form UPDATE some_table SET some_foreign_key = some_id WHERE id = some_other_id; to fix a problem. I hate doing stuff like that ... makes me feel like I'm reaching into the gears of a running piece of heavy machinery without gloves on.
14:52
in 100 years I expect that act would be considered a cyber-OSHA standards violation
Joining a list of strings efficiently over multiple lines with a maximum linesize is an interesting question, if the second commenter's interpretation is correct.
Very bin-packing-y, if rearranging strings is allowed.
I was just about to say it's bin packing. Which is NP-hard.
@Kevin That's kind of how spergy people handle social situations, and this is a room full of programmers.
haha. "Just do what everyone else is doing" is a fine algorithm ;-)
@ZeroPiraeus That's kind of SQL for you. You could have copy-pasted the line to make it more "automated".
It occurs to me that there may be people here who'd like this T-shirt: cottonbureau.com/products/…
15:03
Interesting choice on kerning for those Ts.
The fact that scarily powerful changes can be implemented as simple one-liners that are visibly safe by reading the code is a merit of the SQL 'language' IMO.
has no relationship with designer, site etc. This is a public service announcement. Void where prohibited
@Kevin It's just the shirt crying because it's stuck with web development.
The wordplay is fine and I like simple designs but I'm wary of even jokingly associating with hipsters
Yeah, that was what decided me against in the end.
15:04
Bought a ticket to PyCon USA 2016. I've never been before.
Not that I have a strong dislike for the group personally. I just don't want to be seen interacting with the Unclean.
Some San Diego people are planning to take the train to Portland for it. Working titles are "Snakes on a Train" or "Python on Rails".
@davidism, cool. Let us know how it goes, so I can decide whether to attend PyCon USA 2017.
My only worry is that my attention span is terrible.
PyCon2017: Working with idiots - a talk on StackOverflow by davidism
It's really expensive isn't it?
15:07
"You really didn't need to ask that question: how to read the docs" by davidism
Like $600+?
It was $300, goes up by $50 at some point.
That doesn't count travel and hotel though.
Would you rephrase your question in the form of a question?: A talk on technical communication
For $600 it better unleash the hidden potential hidden within me, a la Dragonball
re-cbg
15:12
I guess it's not that much money, but being mad cheap has kept me out of trouble pretty well in the past, it seems dangerous to get outside that circle.
If programming were carpentry, the typical "plz fix my codez" question would be like "I'm trying to build a picture frame, what do I do next?" with a photo or 3 bits of wood that don't satisfy the triangle inequality, and a hammer with a nail through the handle.
haha
never to mention the "I balanced the elephant on the furnace, how do I get the rollerskates on him now?" kind
The site needs some way to direct people to tutorials, but SO just doesn't work for that.
Particlarly, self-answers don't work.
I think the site can bend pretty far, you just have to convince the newbies to get into the mindset of "one question at a time, pretty please"
and much better duplicate detection
15:20
I'm considering telling this guy to use a dictionary whose keys are integers and whose values are lists of strings, but I only want to if I can write a one-liner to turn his current data into that format.
I could do d = {k: [v for v,i in seq if i == k] for _,k in seq} but that's O(N^2)
Tutorials need a structured and orderly presentation. Especially when you're just starting out, linear order is important to create a solid foundation and build on it. That's not practical to do on SO.
And until you have that solid foundation little self-contained snippets only have limited value because you don't know how to build such snippets into a structured picture of the language elements and how to use them. So people who try to learn by accumulating snippets tend to develop into cargo-culters.
@Kevin So do it with a defaultdict in an O(n) for loop. Why does it have to be a one-liner?
Yea, it seems possible with a two-liner, but one-liner is hard.
Rhubarb time
because the OP specified "elegant" which is secret code for "short"
Oh well, I posted the defaultdict approach anyway.
Is there a way in markdown to link to an element of a list? I'm writing a todo list for one of my projects and I want to add a note to see a different related item.
15:29
If his list is 10 elements, an O(N) search is pretty elegant.
Depends on how often you need to search it :P
Yeah, my first approach is O(N*X) where X is the number of searches you're doing, and the second is O(N+X).
the former wins when X = 1 :-)
Maybe OP is an elder one and algorithms that won't complete in the lifetime of this universe are acceptable.
@MorganThrapp I'm pretty sure you can link to headers, but I don't know about list items
@MorganThrapp Look at the generated HTML source and see if the bullets have anchor tags.
15:38
Yeah it's all about the anchors.
Yeah, I think I figured it out.
I'm just putting <a name="fees"/> before the line and then linking to that.
Interesting.
Why markdown? Is this something you're sharing with a team?
Nah, I just wanted to learn markdown.
It's complete overkill for my personal 6 item todo list.
There is a tool called "WikidPad" that is really helpful for stuff like this. It's basically markdown notepad.
15:43
Oh, I'm doing it in PyCharm which supports markdown. This way I already have it open when I'm working on the project.
@Morgan PS, I resigned that game because my phone broke.
@QuestionC Oh no. :( What happened?
Phone + Gravity. My Aunt ended up sitting at the train station for an hour on Thanksgiving waiting for me because I could not reach her.
Oooof, that sucks.
DSM
DSM
Still-painful morning cabbage for all!
15:52
cabbage @DSM
Pfft, did they disable it
Anybody know the number format used in Converting hex string representation to float in python? Trying to puzzle out the "p-1" at the end.
Does hex use p instead of e for scientific notation?
@Kevin yar.
Looks like it, if Ignacio's answer is correct
In mathematics and computing, hexadecimal (also base 16, or hex) is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F (or alternatively a, b, c, d, e, f) to represent values ten to fifteen. Hexadecimal numerals are widely used by computer systems designers and programmers. Several different notations are used to represent hexadecimal constants in computing languages; the prefix "0x" is widespread due to its use in Unix and C (and related operating systems and languages...
Great, TIL.
> the letter P (or p, for "power") represents times two raised to the power of,
Hmm, I'd have expected "times sixteen to the power of".
15:57
fromhex documentation spells it out nicely too.
DSM
DSM
At this rate, I expect all new SO questions will be about tensorflow by February.
@Kevin Exponent as 2^e makes more sense to me. It's just the un-binaried form of the float representation.
I'm of two minds about which base makes more sense.
Are you of two minds, or sixteen?
DSM
DSM
Yeah, is it "use the power you're using as the base", or "use the smallest number you can that allows you to describe all valid shifts"?
16:01
Yeah exactly :-)
It's surprising (but good) the notation exists at all.
This is a fun question. It starts out swinging with "I've been working on a large Ruby on Rails application for several years".
16:29
>>> def foo():
...  import json
...  print(id(json))
...
>>> foo()
140265736206600
>>> foo()
140265736206600
hmm
shouldn't the imported module be dumped after the function call completes?
json is only imported once, id(json) is id(sys.modules['json'])
A Quick Question.
@vaultah but... why? isn't it meant to be local to that function? why does the garbage collector not sweep it out after every call?
Currently I've a Chart.js inside my template in Django.
But says this ->
Invalid block tag:
since the JS is using a Django Template Reserved Word
legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].strokeColor%>\"></span><%if(datasets[i].‌​label){%><%=datasets[i].label%><%}%></li><%}%></ul>"
How Can I escape that? its inside the js
@AwalGarg the module object is kept in sys.modules
(sorry for the pings)
16:31
@vaultah oh, is this a CPython implementation detail or is this documented?
Can someone help me?
this HTML is inside my template in Django .html
but is making problems with this <%=
@eddwinpaz if someone can help you, they will do, you don't need to ask repeatedly.
I tried to find it in the docs, but couldn't find it :( Basically I want to reload a previously imported module. Does Python support that?
@AwalGarg you can reload a module with reload
@AwalGarg You can use importlib.reload.
16:34
o.O
it won't work how you expect though, better to just restart the program if you change something
DSM
DSM
Odds on this id question turning out to be an XY problem?
> If a module imports objects from another module using from ... import ..., calling reload() for the other module does not redefine the objects imported from it
(basically, it can only refresh the module reference, but not imported names)
@davidism @poke hmm, it is not exactly what I want. Although if I layout my imports carefully enough, I think that could work.
16:37
@AwalGarg it's not clear what you want, since you haven't said what you really want
May I ask why you are trying to do this in the first place?
@eddwinpaz that's not a django template syntax, not sure why you think that's the problem
please use dpaste.com to post an mcve of the code that's not working
@davidism @poke I am kind of "writing my own tooling". Basically, I am working with the GTK API. A set of actions taken when user executes an action are stored in the module. All of those are more or less pure functions. I want to be able to change that file and have the actions reflect without restarting the app, and redoing actions to reach the state I want to work at.
if you don't use from module import name and only use import module, reload will probably work as intended
yeah, looks like I need to do some refactoring to have that work
thanks peeps
DSM
DSM
I just used two small burlap pouches from some South American coffee-bean candy our CEO gave me half a year ago to patch a hole in my favourite chair.
#macgyver
It's what the South Americans would have wanted, I'm sure.
here is my stack trace
00:00 - 17:0017:00 - 00:00

« first day (1871 days earlier)      last day (3301 days later) »