« first day (2790 days earlier)      last day (2148 days later) » 
01:00 - 18:0018:00 - 00:00

1:44 AM
Guys, does anyone know about socket.gethostbyname() module under socket library?
 
2:41 AM
Can't say I do, but the docs are a good place to start: docs.python.org/3/library/socket.html#socket.gethostbyname
 
2:55 AM
hello
 
hi
 
3:11 AM
0/
 
3:23 AM
@chrisz IYes, I checked that documentation. But there's something more I want to know on it
 
3:34 AM
You're gonna have to be more specific
 
@chrisz Okay, So I am doing socket.gethostbyname() on ~100 devices to fetch the IP address. But there are some devices where I the ping wont work or the devices itself is not in the network. For such cases i am trying to buil an exception
as in
try:
ip = socket.gethostbyname(name)
except:
socket.errno:
pass
So how what do i exactly need to write in pass, so that even if the device itself is not there in the network anymore, it wont break out of the program and print something like not valid
Guys, anyone who has any idea about this please help!
 
3:52 AM
c->b->g
 
c<-b<-g
 
@chrisz didn't get you?
 
(-⁏
 
c<->b<->g
Doubly linked
 
🎤💧
 
3:55 AM
This room supports emojis now?
 
since when? I don't think it does.
@chrisz are you on a mac?
 
On my phone
 
well then, emoji away
 
On a semi-related note, swift actually allows emojis as variables names now
 
hah! some folks joked a few days ago about an emoji showing up as a digit of pi at some point... and I'm still laughing at it.
Using this room's search capabilities is not a skill I wish to acquire
 
4:10 AM
gnome sweet gnome
 
That's too far! To bed I go, rbrb!
 
rbrb
 
lol
 
4:52 AM
cbg folks
 
5:15 AM
Is there any diff like tool/library usable in python for images. Basically, I'd like to input two images, and get the difference between them. Maybe one or more cropped image. or any other possible way.
 
5:36 AM
@RegisteredUser you could use numpy to just subtract 2 images iff they're of the same size.
if cropped it becomes much harder, you'd need to find the greatest correlation
0
Q: Find image inside another in SimpleCV

lukasrmsI'm using Python and SimpleCV (but is ok to use OpenCV too) and i have an image: Futhermore, i have some small images, like this, which were cropped from the original image: Assuming that the first image contains the second, I would like to get the second's image coordinates in regard of fi...

as you can see in the linked examples, it isn't foolproof so you'd want to actually check twice :D
 
hello
 
5:54 AM
@AnttiHaapala thanks!
 
@RegisteredUser google...
 
> Google: you're welcome!
 
@RegisteredUser in any case, after you find the image you can use anything, opencv, numpy etc, to do the actual difference part
me today^
 
cbg
 
6:27 AM
Judging by the title of the post Antti linked that looks like template matching, whereas @RegisteredUser's question sounds like wanting to compare two images that should be the same, i.e. scaling the images to the same size and then computing some kind of difference measure
 
stackoverflow.com/questions/43113255/… typo question closed as dup of a question with even more typos...
 
weird caching, I didn't see your delvote until I added mine
 
Jan
Someone knows why scipy.sparse.csc_matrix.sum(axis=1) change its type from <class 'scipy.sparse.csc.csc_matrix'> to <class 'numpy.matrixlib.defmatrix.matrix'>?
 
are sparse matrices inherently 2d?
 
Jan
Yes
like <bound method csc_matrix.count_nonzero of <100x12000 sparse matrix
 
6:33 AM
I think the point is that sparse vectors are weird
but you're right, I can't find hints of this in the docs
we could look at the implementation if there are comments, or issues on github, but I have to go in minutes
 
Jan
ok
thanks!
 
I just realised which language I always forget to list when discussing the languages I know.. xD
 
wb
 
7:20 AM
@AndrasDeak crop? crop inherently means that they're not the same.
 
cbg
 
weeeow @IljaEverilä you answered a pandas question!!
 
7:36 AM
@coldspeed Was just about to delete or edit it. There are edges where it fails.
 
well, multiple typos.
 
7:55 AM
that meta sidebar is so premature and bad
 
8:32 AM
delv-pls? (what does it stand for?)
 
@Cosmo develop please
 
As in, edit?
 
"delete vote, please"
 
Ah.
 
8:53 AM
@AnttiHaapala unless the same face is cropped out of two larger images
 
TIL I need 2 more rep on CodeReview to be able to downvote stuff
so... close...
 
RIP
 
@Aran-Fey suggested edits
 
good idea
I wonder if it registers as serial voting once you hit the necessary rep for the downvotes to become "public"
 
@Aran-Fey Added a quote as requested.
 
9:01 AM
That message is smoke and mirrors. Votes made when you aren't priveleged to do so are ignored.
Consider it homeopathic voting
 
@IljaEverilä I can't upvote twice :(
I honestly didn't know you needed a try statement there. I feel bad for upvoting the question now that I've read the docs.
 
The question was clear and did show some research, so I guess your upvote was not wasted.
 
@AndrasDeak Are you sure? That's not ok. That's some major deception right there
 
Yup
24
Q: Once I reach 15 reputation, will my old votes be taken into account?

Teleporting GoatUsers below 15 reputation can't effectively vote. It says: Votes cast by those with less than 15 reputation are recorded, but do not change the publicly displayed post score Does it mean that they will take effect after I reach 15 reputation or because they were cast before, they're recorde...

> [...] your votes are stored as 'feedback' but it is not entirely clear (at first sight) what's done with it. It turns out that this feedback is visible in the moderator tools available to 10k users, and in the Stack Exchange Data Explorer.
 
Nice. I don't even know how to access those moderator tools that would let me see those votes.
 
9:12 AM
the most inconsequential privilege
 
both answers say it's 10k
 
on other sites perhaps
or I'm lost too ;)
 
Conclusion: Nobody's ever gonna see those votes
 
Whoa. So much stuff I've never seen before O.o
 
9:21 AM
stackoverflow.com/questions/50683786/… wow someone made fine score with that java UB
 
9:33 AM
@AnttiHaapala I even linked the priv :P
Fishslap for you I guess
 
Both the asker and the answerer got about 600 rep from that question (3 days of hitting the rep cap)
 
lol, it shows asked yesterday for some reason.
 
Brb posting it to hackernews ;)
 
9:48 AM
Why?! No issues with my local time, plus on-hover date is 2018-06-04 ...
(My current time is 1:49pm 2018-06-06)
 
Cap on 4th, 5th, 6th
 
Relative dates are as per some US time?
 
No, they just round down
 
nope, still clueless. What do you mean by round down?
 
It was <48 hours so "yesterday"==="1 day ago", but spread over 3 calendar days with respect to rep cap
 
9:53 AM
ah, ty
forgot the programming side of it... makes sense that way.
 
It can still be confusing though
 
Cabbage
I am so happy that we can hide the nav now…
 
Cabbage. We can?!
 
Yeah, they added a setting for it
I feel like Stack Overflow just got so much more worth to spend time on again.
 
Welp, full site completely broken on mobile...
 
9:58 AM
I was really discouraged with the teams launch
oh lol
 
Oh no, just "flexible" (responsive?) with available space
Stil looks weird; all content stuffed in a column
Oh heck there's a "disable responsiveness" link
OK, I'm sold.
 
:D
 
Hi, I just dropped by quick to see if someone could answer this quickly. Would it be correct to interpretunique_together as being able to only have 1 primary (True, bool) per user in a table where user is not unique?
unique_together from Django*
I want to be able to have multiple False bools, but only 1 True
 
10:15 AM
@shad0w_wa1k3r frankly, the leetspeak does take like 10 pro years from your nick :D
 
It's ok, I'll let my work show more than my name then :-p
 
thanks :D (less visible fool now)
 
10:51 AM
Ok IDK what Github is doing but the symptoms would suggest that they've migrated the service to run on Windows in Azure... I get read errors from repos and Slack hooks take 13 minutes to post...
 
11:19 AM
@AnttiHaapala something's happened already? D:
 
"cost cuts" for Github, "users / usage growth" for Azure
(if it's already happening)
 
@Cosmo sorry I forgot to close my </sarcasm> tag
 
11:35 AM
Cabbage
I just saw this, and left a few comments, but I think we really need to formulate a solid policy for stuff like this
https://meta.stackoverflow.com/questions/369085/legitimate-reopening-for-a-closed-as-duplicate-question
 
I think that's something that needs to be decided on a case-by-case basis, depending on how big the differences between py2 and py3 are
 
Is it just me or is it unclear that JFF didn't post here?
 
Yeah, that's very unclear
 
I'll leave a comment
 
\o cbg, town hall today so I won't be lurking as much
 
11:48 AM
cbg
 
@AndrasDeak Yeah. He was going to post here, but Paul's answer derailed his plans.
 
Thanks, that's how I read it
 
@Aran-Fey Ok, but that's a bit subjective. Some people get totally baffled by percent formatting, even though it's still supported. And we often get questions involving iterators like zip and map that used to return a list. Sure, the fix is easy, but the error messages are generally confusing if you don't know the cause.
OTOH, if it's just a matter of really simple "cosmetic" differences that we can expect the OP to be aware of, like print and xrange, or even more advanced stuff if it's an advanced question, then sure, new answers can be added to old ones, unless that would force them to unfairly compete with too many high score dinosaurs with deprecated syntax.
 
12:06 PM
I'm not sure how you'd fix the problem of subjectivity with rules/policies
 
cbg
 
@piRSquared o/
 
\o @AndyK
 
@piRSquared howdy?
 
ok, the question mark is confusing me (-:
 
12:24 PM
@piRSquared hé hé.
 
1:00 PM
This SE Astronomy question got necroed yesterday by a classic woo-woo conspiracy theory answer that claimed Shoemaker-Levy 9 was actually a test of antimatter bombs. It got deleted after a couple of hours, as expected, but now I wish I'd kept a copy for the amusement value. Oh well.
 
One of the best things EVER to happen on the News https://t.co/1v1HbIM61X
Good video ^
Hey, it's @lepture!
 
1:17 PM
yeah. It's me.
I just found this room on your profile.
 
Hey Good evening..
Hi, i need some help in data manipulation in Dataframe.
I have some values in my df such as 0.6,0.5, 0.2, 0.8 etc, i want to convert all such values to 1.
Its a large dataframe
 
@Vamsi o/
 
@lepture I've been having crazy ideas about wtforms like "let's rewrite the whole thing to not distinguish between unbound and bound fields".
 
any easy method to do so?
 
1:25 PM
@Marine1 got to run = je dois y aller
 
@davidism oh. I do want to make it not a "form", but more than form
@davidism which means it can be used in API requests easily. It should also be HTML5 friendly.
 
@AnttiHaapala it'd just be unsettling if changes had been made already; I didn't neccessarily mean bad changes xD
 
I'm not sure if we share a similar idea. Nowadays, we have APIs requests more than webpage requests. It would be great if we can make wtforms more API friendly.
 
I think being friendlier to JSON is on the 3.0 milestone, but at the same time I don't want to get too complex and try to reimplement Marshmallow.
One of the other 3.0 ideas I like is having different rendering backends, so you could render a form as HTML or a GUI library, for example.
 
@davidism this sounds interesting
 
1:41 PM
I'm chatting about Flask with Armin and Trey on June 16! Join and ask questions here: crowdcast.io/e/flask2
8
 
Huh. typing {SOdomain}/questions/{pick-a-number} into the address bar, if it's the id of a deleted question, reveals some meta data about the question, and seems to retain the url containing some question text as a permalink (in that the text is added onto the url on load). That was unexpected.
 
Well, the questions are only hidden, not physically deleted
If you have 10k+, you can read the question, and if you consider it worth it, you could even vote to undelete it.
 
Indeed.
Ahhh I see
is any data truly erased by automatic public process on the SE network, then?
 
2:01 PM
truly only if sensitive data is redacted from a post
that is very very rare and needs manual intervention from staff I think
 
@Cosmo I'm pretty sure that deleted comments are truly erased, but that's not automatic.
 
As in, never done by vote?
 
@PM2Ring no
I think mods can even undelete comments
 
@AndrasDeak Ah I see. is the edit history on comments kept, then?
Oh I see it's kept for messages here. Duely Noted..
 
@davidism IIRC my feeling the things in wtforms were too coupled.
 
@Cosmo comment edit history maybe not, I haven't heard about that
 
morning cabbage
 
@AndrasDeak I think I've already read mods comments hinting that they can see a comment's history, but I can very not link about this.
 
2:32 PM
Hi, I've been learning about binary numbers, bits and their integer representations recently. I understand the general concept of something like 00 = 0, 10 = 3 and 11111111 = 255. Now as a general rule I think that these integer combinations be unique so for small numbers up to 255 but beyond that does each integer represented in binary have a unique binary combination? Such that if I was to have any number then can I be certain that only 1 combination of binary numbers would result in that?
 
10_2 == 2
 
As a general rule, are all base 10 numbers unique combinations of digits?
 
@cd123 numbers have only one representation in each of the numerical bases, yes
if I read correctly
 
Can you imagine the chaos if that weren't true?
 
2:36 PM
@FélixGagnon-Grenier Ok so for clarity if I had a random number like 7654 then that would only have one possible binary combination to represent that? If that's true then that's what I was looking for.
 
yes
 
Ok thank you.
 
1110111100110
 
for extended clarity, the number 7654 is the same wether it's in binary or hexadecimal. There is only one 7654 number. Its representation changes according to the basis, but it is always the same number. There is only one way in decimal to express 7654, and there is only one way in each numerical systems that I know of to represent any single number.
 
FWIW "would only have one possible binary combination to represent that" is unambiguous
 
2:43 PM
@cd123 in computers there are a finite number of values that can be stored in one int, etc. Additionally there are multiple schemes for encoding negatives. But at the purely mathematical level, all numbers in any base must be unique.
 
it's less "must be", more "they are"
 
@AndrasDeak fair. The caveat with that is modulo arithmatic spaces though. (tl;dr;: Yes, always, unless you intentially impose a rule that says otherwise)
 
Of course, just like in decimal, you can add leading zeroes without affecting the value. So decimal 5 in binary can be written as 101 or 0101 or 00101, etc.
 
Yes. It has nothing to do with the base
 
integers are fundamentally unary and any other number base is just an arbitrary grouping of the stones
 
2:47 PM
Should I bring up 1.0 == 0.99999... or will that just confuse things? ;)
 
@PM2Ring hehehe
 
@PM2Ring please in binary...
1 = 0.1111111111111111111111...b
 
you mean 1b =...
 
@AnttiHaapala I didn't want to make it even more confusing.
 
is 0.5555555... strictly 0.6 or is this where rounding gets funny?
 
2:50 PM
@Cosmo no, never. It can be strictly 1 though. In base 6.
 
@Cosmo 0.5555... decimal is 5/9
 
Ah ofc
 
So if we want to write 1/5 in binary, we use 1/5 = 3/15, which in binary is 0.0011 0011 0011...
 
3:04 PM
ok
 
wim
3:46 PM
@AndrasDeak I wonder if mods know a comment was self-deleted or deleted by another mod
 
I think they do
 
wim
that would seem important context to know whether to undelete or not
 
I knew I've seen that recently
 
4:26 PM
@Kevin this gif made me think of you
I guess "reminded me of you" would have sounded way less creepy in English, but too late
 
cbg.
 
cbg
 
raise ValidationError(
                    _('Draft entries may not have a publication date.')
                )
This is from the django docs. What is the underscore for?
 
is there a REPL session for context?
 
Scroll down to the green box that starts "How to raise field-specific validation errors if those fields don’t appear in a ModelForm..."
 
4:39 PM
from django.utils.translation import gettext_lazy as _
talk about lazy
 
wim
this _ is not really a django thing, but a stdlib thing docs.python.org/3/library/gettext.html#localizing-your-module
 
ahh...I figured it was a name. Didn't look at the imports
 
@wim that's weird
 
wim
what's weird
 
using _ like that
 
wim
4:42 PM
why?
 
You know weird when you see it :P
 
wim
it's just another Python convention that has been around for yonks
 
yeah, but I've never had to do anything with localization, so weird to me
 
wim
as with self, you can use some other name if you want, it's just a convention
 
@wim so its a naming convention used for translation-related functions/modules?
 
wim
4:42 PM
@Code-Apprentice yes.
 
In my original example, I could see it was being used like a function name. I didn't know you could use _ as a name, though.
I guess it makes sense since you can do _my_var.
 
you can and the REPL automatically stores the last non-None-valued expression not assigned to anything in _
also throwaway variables are often called _
 
wim
you've never seen something like [next(it) for _ in range(10)] ?
this is also an assigment to _
 
or *_,last = gen
 
4:57 PM
@wim yah, I've seen that before. I've used it to "ignore" a value that I don't care about
I never thought of it as an assignment to a variable name, though. TIL
 
5:25 PM
@MartijnPieters pizzapirssi.fi check the pizza number 1 :D
 
wim
I don't know if there is more generic term for this kind of assignment
it's not simply a name binding, because you can use it with setitem too:
>>> d = {}
>>> k = 0
>>> for d[k] in 'abc':
...     k += 1
...
>>> print(d)
{0: 'a', 1: 'b', 2: 'c'}
 
@wim How's it different to d[k] = thing assignment?
 
I can't find the transcript right now, but we discussed this in depth last year I think.
I use a variation of it as a bonus interview question.
 
I realise it's just an example, but I bet dict(enumerate(thing)) is faster.
@davidism Like for d[k] in d: ? ;)
 
5:41 PM
@AnttiHaapala Wow! I'll have 2 to go!
 
sure? with ananas? :D
 
1. Salmiakkipizza WAT
why is that on the list and why is it #1...
oh, you specifically linked that one exactly
I only read half your message and was distracted by the fact thar pizzapirssi contains IRSSI and contains pi*r*s*s*i which reminded me of the pizza volume joke
 
@AndrasDeak I'm a broad-minded person, but that's just wrong. :D
 
Maybe it's a cultural thing; how about a vegemite pizza?
 
@AndrasDeak pirssi is slang for taxicab
 
5:49 PM
:)
should be takkssi
 
Can anyone help me with regex?
 
you could make a Finnish version of "1, 2, Polizei": "1, 2, pizza takkssi"
 
@AndrasDeak there are never double consonants before other consonants; never ss after stop consonants.
 
@AndrasDeak I've never heard of it, but I guess it's possible. Vegemite and cheese works, especially with melted cheese.
 
@AnttiHaapala picky people :) I'll try to keep that in mind
 
5:51 PM
@user3508766 Probably, but we won't know until you ask
 
I still have no clue about Hungarian ortography
except that sz is a thing :D
 
I have the data below. Im trying to capture numbers only with GB I came up with this regex r".*?([0-9]+\.[0-9]+\ .B).*?[0-9]+\.[0-9]+\ .?B.*" but it captures all the numbers with B
 
so why didn't you write GB there?
 
it doesnt do the trick
let me paste the data
 
Why not just \d+\.\d+ GB?
 
5:54 PM
Operator              #Hosts   Avg Time   Max Time    #Rows  Est. #Rows   Peak Mem  Est. Peak Mem  Detail
------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------
13:EXCHANGE                1    0.000ns    0.000ns        0          10          0              0  UNPARTITIONED
12:AGGREGATE               1  346.879us  346.879us        0          10   34.12 KB      128.00 MB  FINALIZE
basically i want to capture 67.65 GB
 
wim
users with username matching .^ will be happy to help you with
(and if you got the joke, you probably don't need help with regex)
 
@wim With m modifier or without?
 
i got the joke
any char with start of a line
 
01:00 - 18:0018:00 - 00:00

« first day (2790 days earlier)      last day (2148 days later) »