« first day (1747 days earlier)      last day (3213 days later) » 

2:07 AM
@JRichard you appear active at the moment :)
 
2:17 AM
heya @JGreenwell
 
cbg
chuckle, latest comment "this works for me" response from OP "Do you mean it works?!".....sssooo tempted to be sardonic
anyway, how's it going @JonClements
 
Fine thanks - how about yourself?
 
busy but good :)
wife decided she likes the "new" Star Trek (ones with Chris Pine) today and that the original series is interesting
 
Umm... "interesting" is open to interpretation :)
 
she's only seen 3 episodes but is watching more - and technically she declared Star Trek a "Geek Soap Opera"
 
2:27 AM
A not entirely inaccurate summary :)
 
 
1 hour later…
3:57 AM
I think it was known as a "Space Opera"
 
Midnight's struck and my virtue's yet gone. The ends do not justify the means.
 
We help people on this site, that's what we do. Spread the Python joy. Pass it on.
 
Unjust attributions spawn unjust perceptions.
 
 
1 hour later…
5:39 AM
Hello. This site is for the first time.
 
6:29 AM
cabbage
 
6:57 AM
Hey up
 
7:15 AM
morning all
 
I'm struggling through this ML stuff now
I'm basically treating it as a programming problem to battle through, because I don't really understand the context of what I'm doing :)
 
@RobertGrant :P
what ml are you doin?
 
It's a course on distributed ML using apache spark
I was up late trying to do it while tired last night. Now I'm tired and trying to do more of it
 
I'd still try vowpal wabbit for specific tasks :D
 
Thankfully, once this coursework's done, I...have to catch up on the next classes and do the next coursework. By Friday.
 
7:41 AM
I believe in you Bobby
 
7:54 AM
Cabbage!
 
@JonClements I was "here" but inactive :) Unless you mean more generally in which case SO action = avoidance of something else I don't want to do...
And morning all
 
I need that in the star list
 
Cabbage :-)
 
8:26 AM
YES! Next bit of code worked.
 
 
1 hour later…
9:33 AM
Does re.sub("a|b|c|d","","abds") takes the same time as doing` re.sud("a","","abds")` and all other items
I have around 700 subs to do
 
you can time it, but I suspect they should be more or less of the same speed
 
Oh So in the first method it checks for a then b then c then d
I thought it would do it one go
 
yup
you will get some improvement with [abcd] instead for regex, but if whole words are involved, that doesn't work
 
@VigneshKalai are you literally just removing certain chars?
 
@JonClements No I am removing words from a html page
No it is a whole word :(
 
9:53 AM
cbg
urgent help..!
[User: rajasimone66, User: rajasimon, User: rajasimon0]
how to get the user ?
 
That isn't valid Python code.
 
Oh.. but python-instagram returns this only ...
 
@RajaSimon It’s the other way around, link text goes into the square brackets: [link text](full url)
 
@poke thanks .. I changed .. And when i'm doing user = api.user_search('rajasimon')
 
@RajaSimon What that likely is is a text representation of a list of user objects. See the source for the user type.
So you can access the individual user objects simply by iterating over the list.
 
10:09 AM
@poke thanks ... how do i get rid of User' object has no attribute 'strip'
 
Don't call strip on that object
 
so ok then unicode matters ..
 
No it's nothing to do with unicode. It's a User object, not a string.
 
hello, one and all
 
user559633
@JRichardSnape Hello, one and J Richard Snape
 
10:16 AM
@RajaSimon user.username is the string you’re looking for.
 
user559633
@devst3r Hi there. This is vastly off topic.
 
well, i tried everywhere.
 
user559633
@devst3r Not sure I follow your logic on how that makes this on-topic or appropriate for this room.
 
@devst3r go take some photos
 
cool, thanks.
 
10:25 AM
@poke Exactly thanks man.. You saved my time .. Guddos ......................
 
11:14 AM
hey guys, quick question - I need to make a simple call to a restful api end point. What is the best lib to use? I'm using urllib and urllib2. Are they recommended? I'm a python newbie.
I will need to POST to an end point but will also need to get the status code of the response.
 
Sure, you can use the standard modules for simple HTTP stuff. But you'll make life easier for yourself if you use the popular requests module.
 
that's a great starting point
You would have thought they'd have fixed urllib to work better
 
@tmutton Well, they did develop urllib2... sometimes you've got to know when it's time to walk away. :)
But on a more serious note, it can be painful to improve stuff when there's a whole bunch of software out there that depends on the existing horrible module, since you need to maintain backwards compatibility, but you don't want to "infect" your new module's code with the problems of the old module. One way is to make a new module, which is how urllib2 was born, but they didn't go far enough. Fortunately, requests has come to the rescue.
 
11:30 AM
Yeah it does make sense
Also you sometimes want the hideous low-level features that your nice sugary wrapper may not provide
 
@PM2Ring I see what you mean. It's legacy code so updating it would cause issues for people that are already using it.
 
Exactly. And if you maintain the old behaviour for the legacy code while adding new improved behaviour then the module is likely to become bloated and ugly.
 
12:01 PM
in Prototypal inheritance, what does it mean to replace the implementation of a class?
 
Technically, in prototypal OOP context, there is no class…
 
that sounds oddly philosophical, but yeah, function or what have you.
 
Well, if you replace the implementation of a function, then it’s replaced.
 
oh I'm just having trouble looking through this error to see what caused it... should it just be Mongo.Collection = somethingElse if it's overriden?
 
@PM2Ring yeah, and start to look like the old module because there was a reason it looked like that :)
 
12:10 PM
No idea corvid
 
@RobertGrant :)
 
brief lunch time cbg
 
you're eating cabbage for lunch?
The suicide squad comics are really good... wish I knew about this series earlier, the movie is gonna be awesome
 
12:23 PM
Cool :) I'm looking forward to it
 
They took out all the lame parts of comic books, the heroes!
 
12:47 PM
Morning cbg
 
I was impressed with the Suicide Squad trailer.
 
Suicide Squad looks awesome.
 
Wow. I just got an accept + upvote in less than a minute after posting. I think that's my fastest yet. :) stackoverflow.com/a/31700898/4014959
 
Everyone was hating on Jared Leto, I always thought he'd be good, and now after the trailer everyone is changing tune.
 
Will Smith with his trademark title catchphrase.
 
12:54 PM
Harley Quinn is one of the best comic book characters, the actress who plays her seems good too
 
I really don't see the appeal. I mean yea, Batman was just a villain delivery device, but from the trailer they don't seem particularly quirky or villainous.
 
I'm still waiting for the ultimate matchup movie: Batman vs Manbat: The Moneywringer
 
The thing with joker is following heath
 
Since it's all villains, they're unpredictable. The comic books actually make it really interesting because things happen that you wouldn't expect to happen in a regular story arch
 
Whoever took that role was going to be judged against heath so you have to be different
And heaths joker was different. He was more calculating whereas leto's is going to be more insane
 
1:02 PM
A bit like Bane
 
I don't think heaths joker would have fitted in with the SS.
 
Well if Leto had copied Ledger's Joker then the uproar would have been worse. There was no way Leto was ever going to win unless he just hammered it.
 
I remember hearing Ledger got the role for joker and thought it wouldn't work
 
Well yeah loads of people had a go at Ledger as they didn't think he'd work.
 
They said the same about pretty much every character before. Michael Keaton got slated before.
 
1:13 PM
Every joker before was not that great though. I guess Mark Hamil, but that role went super under the radar. I didn't even realize it was him until years after.
 
B:TAS Joker is the canonical Joker, in my eyes.
 
Nicholson just acted like Nicholson and Romero just acted like Romero
 
Canonical portrayals all in one photo:
 
B:TAS Joker, 60's Penguin, 60's Riddler, 90's Catwoman.
 
Michael Keaton was a good batman completely for the reason that he doesn't seem like the part for batman
 
1:17 PM
@corvid yeah I agree - Bruce Wayne shouldn't seem like Batman at all
 
Deadpool is gonna be great too, he's entertaining
 
Deadpool looks amazing.
 
Canonical Deadpool is the legion of anonymous cosplayers at any convention
 
The scene where Batman takes Vicki Vale on an awkward date pretty much sums up why I loved Keaton.
 
cabbage
 
1:21 PM
Why are so many great movies coming out? I love the future
 
I saw Honey I Shrunk the Superhero Antman last week with my sister. Was pretty good.
 
I'm not too bothered about that one, even if Paul Rudd is a legend.
 
The Marvel Movies like exist in this weird universe of really evil corporations and lack of consequence to property damage that I find really entertaining.
 
We have a lawyer that comes to the Python meetups (for synergistic reasons). I've threatened to teach him Python, but he's ambivalent, and says he doesn't care about how things work. Should I put any effort into it?
 
yeah, because if they were actually testing on sheep, PETA would be all over that. Then they would be the villains of that film
@AaronHall Nope. If someone starts apathetic, they'll probably never advance beyond amateur
 
1:26 PM
@corvid There's a couple of scenes where my sister and I were laughing and couldn't hear anyone else laughing in the audience. That was one of the scenes.
 
Well I would think he would have picked up at least a few things by osmosis.
 
I don't want to get into spoiler territory but in general that movie was best when it was being funny/ridiculous.
 
Well yeah, they do some stupid things to emphasize that "hey guys, look, this villain is evil" in Marvel movies. Like The Winter Soldier how the rich dude just kinda shoots his maid in his house, which is just over-emphasis on it
 
I'm pretty sure you have to be a little bit special to be a programmer, and every member of the "everyone should learn to code" movement is in denial about that.
 
Yeah the baddie in GotG was definitely the worst thing in it, as he had no personality
@Kevin 100% agree
 
1:29 PM
Thirded.
 
I do think everyone should learn to code, but they should do it in school. I tried to teach a friend to program and couldn't overcome the apathy.
 
It's a fashionable thing to say, so people who look that deep say it
 
I don't think everyone should learn to code, even at school.
 
I don't mind if everyone tries to learn to code, to determine whether they're a muggle or not.
But there's no point in forcing it if the spark isn't there.
 
Heh, we used to refer to non-physicists as muggles, and mathematicians as squibs.
 
1:31 PM
No, GotG villain was great! He was like the straight man in a comedy routine. What's the point of being irreverent if the backdrop is equally ridiculous.
 
In my experience, people who were meant to do something tend to find ways to apply it in every day life. In High school, I used programming to hack into all the schools computers, download video games, and block all administrative tools to block access to computers. Got suspended, but totally worth it
Teacher was pissed when she couldn't block the screens on any of the computers for when she was talking
 
Did anyone learn to use computers for noble purposes? Most of my educational exercises have been motivated by petty larceny.
 
It was mostly laziness for me. If I had a homework assignment of twenty problems, all of the form "find the roots of the polynomial AX^2 + BX + C", you can bet I automated that.
 
Doom ain't gonna install itself on my PC.
 
@QuestionC yeah doesn't have to be funny, but he was just a bit ridiculous with the ponderous phrases. His fight with Drax before he gets his hands on the stone was quite good, but he devolved into "big move" fight scenes and dull standard badguy lines
 
1:33 PM
In college we had online assignments for chemistry, but they mostly always took the form of a specific string with values supplanted, so I automated that
 
I'VE DECIDED TO STOP YOU NONLETHALLY, JUST BEFORE I DESTROY THIS PLANET
@QuestionC not noble; I just couldn't figure out how they worked :)
 
I feel vaguely inadequate for never having a bad boy phase. I know precisely zero things about gaining unauthorized access to computer systems.
 
@Kevin same. I think I once saw the teacher's admin password for our system, but never really did anything with it
 
It's never too late. I tried cracking my neighbors wifi last month because I didn't want to get my own and it was interesting.
 
How did it go?
 
1:38 PM
I forgot the PIN number for my library card and I'm considering brute forcing all eight digit combinations on their web site.
 
Good idea
 
Could not crack. I ended up paying my cell phone provider an extra $20 for some extra data instead.
Although there is a WEP network I could probably do...
 
Are you UK based?
 
@Kevin I just guessed the password. Much easier than the technical know-how of how to do it.
 
Password=password
You would be amazed how many systems still use this
 
1:40 PM
@Kevin just hope you don't hit a honeypot library login that reports you to the library authorities
 
user559633
 
Meanwhile, at a small library: "Sir, we're under attack by hackers" "Well what are you waiting for? Call the FBI!"
 
user559633
@RobertGrant Yes, I would expect that the Library Information Technology department has the funding for this. You know, the department of the library that, in its name alone, is why libraries are becoming fewer.
 
@PM2Ring Congratulations. I find steganography quite intriguing.
 
"We can't let the Chinese get these holdings records!"
 
1:43 PM
Considering whats-his-name got prosecuted for changing the id number in a url by one just to see what would happen, I'm having second thoughts about proceeding with my plan.
 
BURN THE MICROF..feesh? Fishes? Feeshes? BURN THEM!
 
user559633
@Kevin weev?
 
@Kevin yeah true - some IT For Dummies judge could get you
 
Yes, that sounds like a name I have heard in relation to computers and law.
 
@tristan I like that guy's wikipedia summary, "Black hat hacker, White nationalist, and Internet troll"
 
1:45 PM
Philosophy Q. If I gain access to my own library account using unauthorized means, is it really unauthorized?
 
@JRichardSnape Thanks, Richard. I was a little bit reticent to post that code, since steganography can be used for all sorts of devious things... but I figured that there's already plenty of stegano code available online. :)
 
A: depends on whether the judge is in a good mood.
 
user559633
@Kevin The final state is not unauthorized, only the intermediate steps.
 
@Kevin philosophically, no. Legally, probably
 
user559633
You would have to open your case with "consider a finite state machine"
 
1:46 PM
@PM2Ring yeah - it can get pretty sophisticated. As you say, could be used for nefarious ands, but I wouldn't be using SO available Python if I was going to do so.
 
I wrote some more subtle stegano code a few years ago that stores one bit of data in a pair of image bits, using ideas related to Manchester coding, although I wasn't actually aware of Manchester coding at the time - I kinda re-discovered it for myself. That version's pretty damn hard to detect, but it's much slower to encode & decode.
 
Propagating information about how to hide information is good because Chinese dissidents etc etc
 
@tristan I would enjoy trying that - particularly in a British high court where I could append "m'lud"
 
You could pronounce it m-lud, as in p-diddy
 
user559633
@JRichardSnape "m'ludy"
 
1:49 PM
Cbg.
 
user559633
cbg @MorganThrapp
 
tips fedora which is comically oversized to accommodate powdered wig
 
I remember "doing" Manchester coding at uni, vaguely. Neat idea @PM2.
 
callbacks in javascript are such a pain to manage sometimes... why can't they just fully switch to every async callback returning a promise?
 
@Kevin Yeah. The good guys need crypto & stegano. But the bad guys can do evil stuff with it. But I guess that dilemma has been with us since the invention of the pointy stick.
 
1:50 PM
@corvid I know some of those words.
 
user559633
@Kevin the defendants don't wear the wigs. Good god, you would be absolutely up shitte creeke in a British courteroome.
 
@corvid by "they", do you mean "every developer who ever made an async js library"? :)
 
I can't see the word steganography without thinking of studying dinosaurs, though
 
user559633
@corvid because callbacks are an approach and javascript is an implementation of a set of behaviors?
 
Is that "defendants traditionally don't wear wigs", or "defendants are forbidden from wearing wigs"?
 
1:51 PM
@JRichardSnape Wouldn't that be stegonography?
 
user559633
@Kevin Definitely some set of that sentence.
 
@tristan What do you mean? In ES6 there is a native promise object and you can just use the resolve() and reject() with it
 
probably @morgan, probably :)
 
user559633
@corvid then what's your actual question?
 
user559633
Why doesn't every callback written to date use promises from the 2015 ECMAScript standard instead?
 
1:52 PM
stego-steganography: The practice of hiding a message in a picture of a stegosaurus.
3
 
why new libraries are still working with callbacks so much of the time, when it always leads to callback hell after enough time
also, .catch() is super helpful
 
callback hell? I've never heard that term before.
 
user559633
@corvid Ah. New libraries. Well, lots of reasons. In my cases, I don't really care about javascript and if someone really cares, he/she can refactor.
 
But the NSA knows that pictures of stegosauruses are more likely to contain secret codes, so you have to encrypt the picture in a different picture using steganostegosteganography.
 
@JRichardSnape So my code looks at the LSB in each byte of image data looking for pairs of '01' or '10' bits. A '0' data bit becomes a '01' in the image and a '1' data bit becomes a '10'. So the original entropy of the image is unchanged. But doing it like that doesn't give you a lot of carrying capacity in a typical image.
 
1:54 PM
*not actually defendants
 
@QuestionC like, when you do multiple asynchronous processes in sequence, it starts to look super ugly to do if (err) { } else { } for each one
 
@PM2Ring I think that's always the trade off from what little I've seen (carrying capacity vs detectability)
 
Yep. One way to reduce detectability is to mix a little bit of white noise into the source image & blur it a little so there's plenty of entropy in those LSBs before you feed it to the stegano encoder. And that has the benefit of increasing the image's carrying capacity when used with my Manchester encoding method.
 
files that away in dusty corner of his brain with a door marked "ideas to play with"
 
Cabbage
Submitting part #s for components is mildly terrifying, as I can't commit/checkout if I make a mistake
 
2:11 PM
Why's that?
 
Lol. Also at your flagrant self-promotion
I've a good mind to criticise you and get lots of stars, young man
(+1)
 
Do you have any "Needs MCVE"?
Sorry sir, fresh out.
How about a "Too Broad"?
Nooo, I'm afraid not.
A nice "Looking for recommendation"?
Let me check the back.
Sorry, sir, fresh out.
 
@RobertGrant Not sure. I just think if one of those components doesn't work/isn't good enough then it holds up the entire development process. And it's one's fault.
Second reason: I don't think I've buggered up with a components list yet, so I'm due a mistake at some point...
 
Time to write a frontend that validates stuff!
 
user559633
2:21 PM
@RobertGrant aren't you supposed to be doing your ML work?
 
Not me, him :)
'im oop thar
 
user559633
DO YOU SMELL TOAST
 
I'm crashing through the ML work like a scrunched up bit of paper tossed gently against a concrete wall
 
@Ffisegydd I am impressed by that question. And even more by the OP comment openly stating "I didn't know about Monty Python".
 
2:29 PM
I... actually really like that Monty Python question. I'm surprised there isn't a dupe.
 
Blimey, recruiter for West London job very keen
 
I have no pity for users that say " I am aware that this question is off-topic, however..."
 
I can't tell if it's secure to connect via DDP for login...
 
I couldn't find anywhere else online to ask questions about the maintenance and care of vintage Toyota AE86s, so that must make it OK to ask on Stack Overflow, right?
4
 
"Now let's train a logistic regression model using the hashed features. Run a grid search to find suitable hyperparameters for the hashed features, evaluating via log loss on the validation data."
falls over
 
2:37 PM
"Ok... Where is the button that does that?"
 
Haha actually I looked at the code provided and it basically is like that, thank goodness
 
Given that I have a graph with the nodes sorted topologically, how can I iterate back through it, yielding all possible paths between the first and last node?
 
Blimey, I don't even know what a topologically sorted graph is
 
Depth first search seems most straightforward, provided there's no cycles.
In the field of computer science, a topological sort (sometimes abbreviated toposort) or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge uv from vertex u to vertex v, u comes before v in the ordering. For instance, the vertices of the graph may represent tasks to be performed, and the edges may represent constraints that one task must be performed before another; in this application, a topological ordering is just a valid sequence for the tasks. A topological ordering is possible if and only if the graph has no directed cycles, that...
 
@Kevin Sure, here is the answer
 
2:45 PM
It's acyclic. So I'd need to do a depth first search, starting from my start node and calculate all possible paths? Is there a way to use dynamic programming here?
 
user559633
def search(graph, start)
    visited = set()
    stack = [start]
    while stack:
        _ = stack.pop()
        if _ not in visited:
            visited.add(_)
            stack.extend(graph[_] - visted)
 
user559633
considering that you have a {'location': ['vertexA', 'vertexB'...}
 
I'm now slicing through this ML coursework like a cold knife through the sun
 
user559633
@RobertGrant S..sensually?
 
2:51 PM
Woo! Accept 14 months after my answer.
 
user559633
@Ffisegydd Those are the best
 
I got an unaccept after a year yesterday.
And a "user removed" the day before that.
 
Karma. I'm a good person, you're a bad person...the system works...
 
user559633
@Ffisegydd Back on the internet for 3 days and you've already resumed antisocial behavior
 
\o/
 
2:58 PM
OK, it was actually using a gamecube as a motion controller.
Still, go watch SGDQ.
 
@chad Sure, if you want.
def get_all_paths(start, end):
    if start == end:
        yield [end]
    for neighbor in start.neighbors:
        for rest in get_all_paths(neighbor, end):
            yield [start] + rest
Mixing in memoization is left as an exercise to the reader
 

« first day (1747 days earlier)      last day (3213 days later) »