« first day (3463 days earlier)      last day (1490 days later) » 
02:00 - 18:0018:00 - 23:00

user11006952
6:19 PM
Anyone here know a good resource off the top of their head about what constitutes "sensitive data" that should NOT be in the source code (credentials are obvious ones...but I wonder if there's anything else)
 
6:41 PM
cbg
 
Thanks
 
@IljaEverilä cbg :)
 
Cbg
 
6:44 PM
hi just a quick question which might be off topic: is there a way to start a chat with a specific user on stackoverflowchat ?
 
i think if you click their profile, there may be a link for 'rooms with' or something that
 
Click on their name, there should be a menu option "start a new room with this user"
 
Most users will find that ping annoying and probably not join though, unless you already know them / have a conversation going.
 
You might need a minimum amount of rep
 
:(
thanks guys
 
I'd say start by checking if you can connect to twitter (API) at all. That seems like a generic connectivity issue. Maybe you're being rate limited somehow for some reason?
 
github.com/tweepy/tweepy/issues/756 <-- some dicsussion on the project about that error.
 
you can be selectively rate-limited by services.. for instance, I can watch videos all day on youtube using a browser... but my program can't connect since my IP got flagged for too many requests. the browser and my app use different configuratinos.
 
7:08 PM
@Todd sorry, not sure if you've been around before, and I appreciate that you're helping. It's not usually this bad here.
I should really make some lunch and hop on that sopython Minecraft server.
 
thanks @davidism
 
Should go scoop some cat poop.
Came here to avoid that, but on the other hand...
 
catbox roca
 
@Todd Ok, I see what you mean. I'll investigate that. Thanks for your help
 
Off to scooping ->
 
one user is in the sandbox, and the other in the cabox
 
This line: self.rect.centery = self.screen_rect.centery causes me the following error: 'Ship' object has no attribute 'screen_rect'... would you like to see the full code in a gist?
I know that I need to define screen_rect... don't know how to do it.
 
@davidism good ol' days :p
 
well hello people
PUP!!!!!
@JonClements o/
 
7:35 PM
aye aye cap'n - how you doing?
 
@idjaw \o
 
not too bad. Surviving. Eating. Working. Gaming. Children running wild.
yourself?
 
user11006952
@YoelZajac This might help? docs.python.org/3/tutorial/…
 
SSDD as always... very disappointed someone's eating all the nice biscuits though @idjaw :p
 
you have competition
the kids....they're savage.
 
7:36 PM
Joking aside - good to see you and glad you're well
 
thanks. you too!
 
weird times hey?
 
totally. It's still quite surreal but yet so astonishing
 
Is there any function or library to directly find any 1 pixel containing specific color?
I know I can create loops manually but they are very slow
looping through each pixel blah blah blah..
 
we dont even know what library/module you're using
 
7:40 PM
@BlackThunder numpy can do that if you're going to use it for all your code
 
@BlackThunder well, you'd be lopping through an array?
 
Umm... numpy? never used it
Is there any answer showing how to use it with images
 
@pax yes it might help.. but it's too general I think... I can read it anyway, I've nothing to lose.... But I need some help with my specific snippet anyway...
 
Using numpy for this one step is probably not worth it
 
@roganjosh Yeah but I am using pil so its slow
 
7:41 PM
what package are you using
 
@BlackThunder pil can convert images to numpy arrays
 
PIL
So is it faster then?
Currently it takes about 1-2 sec to test all the pixels
I need like 100ms - 500 ms
 
the way you determine if it's faster is by writing and profiling
 
Once you have an array of shape (n, m, 3) you can do (arr == [r, g, b]).all(-1).nonzero() to get pairs of indices that match. But 1. You have to profile, 2. Any method will break with exact checks for float-valued channels
 
one way or another, whatever you use is going to have to loop over pixels to figure out their colors, so "loop is too slow" isn't really helpful
 
7:44 PM
Going back and forth between numpy might eat your profits
 
I'd try converting the image to a byte string and calling find on that until you get an index that's divisible by 3
 
@BlackThunder I assume that you have links to good API documentation for the library. I just browsed effbot.org/imagingbook/image.htm and see there's an im.getpixel(x,y) method. Is that what you're using?
 
@Todd that doesn't find the pixel with the colour
 
Thats why I am using loops to loop through the pixels and match their colors
 
im = Image.open('image.gif')
rgb_im = im.convert('RGB')
r, g, b = rgb_im.getpixel((1, 1))
 
8:23 PM
(I'm aware that I don't know what I'm talking about =) he wants to scan the pixels looking for ones that are a specific color)
 
8:33 PM
It's been a while since I've been back here. I noticed tags in the top right. Am I crazy or is that a newish feature?
 
nope, we just added one recently though
 
yeah that's what caught my eye.
 
Getting pixels one at a time is horrendous. There is a call to get all the pixels at once as a list, I don't remember what it is, but then you can iterate over that list to find your pixel (it will be a 3-tuple, IIRC)
getdata
Iterating over the resulting sequence will be much faster than nested loops with getpixel.
row, col = divmod(image.getdata().find(DESIRED_COLOR_TUPLE), image_width) maybe?
 
9:16 PM
Have any of you messed around with errbot: errbot.readthedocs.io/en/latest
Someone shared it with me, and if you are in need of a chatbot (main use case for me is slack) it's pretty complete in terms of making it painless to get things going.
 
wim
9:46 PM
would you flag this as "not an answer" ? stackoverflow.com/a/60931465/674039
 
No, that can easily be deleted as a comment
 
wim
code block with no text, and actually irrelevant to the question
 
can be construed as an answer I think
 
wim
(not sure how it gained 12 upvotes)
 
"I believe this number is what you can increment your value with", except that only works for 1
@wim it's good enough for most people asking that question, probably...
it's hard to make sure that it's the wrong answer unless your numbers are large, right?
And frankly most people just try to make a crappy fix for if val == float_value: have_bug()
 
wim
9:50 PM
not sure. It was impression that the answerer thinks that floats are uniformly distributed.
 
@wim yes, I was trying to say the same thing. So it's a wrong answer, but an answer.
 
wim
hmmm. how do we get rid of highly upvoted wrong answers? not flagging, not downvoting ...
 
you ask this question every month :P
 
wim
LOL
I flagged the first one and it got declined
I am legitimately asking because I'm on the fence about whether to flag the second one
pretty sure I've seen mods delete code-only answers
 
The second one will definitely be declined
@wim on occasion yes, but NAA goes into review queues first and even mods disagree amongst themselves
@wim the low quality posts review was "invalidated", but I don't see any action taken...it may have just aged away? Not sure how the LQP queue works exactly.
 
wim
9:54 PM
oh I didn't know you could see the page for a review like that
 
yeah, it's accessible through the timeline (for which you don't have to hack the URL anymore) for review items that are done
I don't think it should've aged away in a day, so I guess a mod declined it manually.
 
wim
what mod in their right mind would choose to keep that garbage on site
pip has ssl error- you have slow internet connection maybe. huh?
 
@wim One that doesn't pay much attention? Note that "declined NAA flag" doesn't mean "it deserves to stay here because it's valuable". It means "it's an answer; if it's crap delete it yourself."
@wim always remember: mods and review queues shouldn't need domain knowledge. If you need domain knowledge to realize it's not an answer: it's an answer.
 
wim
it sucks that stackoverflow.com/q/6063755/674039 ended up as a canonical dupe target
the use-case they have in mind for nextafter is terrible , and half the answers are addressing the use-case, in a way that's gonna be completely useless for searchers who are just looking for np.nextafter or math.nextafter
 
honestly most of these posts should be closed as a dupe of "is floating point math broken?"
 
wim
10:11 PM
there are plenty of legit use-cases for nextafter
 
they are probably outside my use cases
 
wim
10:48 PM
@AndrasDeak Hmm. I see your point. Though it may be the proverbial letter of the law vs the spirit of the law in that case
I actually prefer when mods will use a bit of their common sense and pragmatism rather than attempting to consistently adhere to every rule and guideline
 
Yeah, definitely. Ideally any kind of crap would be deleted.
 
wim
JFF is a good example, gets it wrong some of the time but getting it right 90% of the time, so it's enough that the net effect is positive.
 
02:00 - 18:0018:00 - 23:00

« first day (3463 days earlier)      last day (1490 days later) »