« first day (3454 days earlier)      last day (1488 days later) » 
00:00 - 16:0016:00 - 00:00

wim
12:01 AM
oh man, this is the best rube goldberg I've seen yet
 
12:17 AM
So, I have to ask has anyone here interviewed at Think-Cell?
 
 
2 hours later…
2:38 AM
@wim, that is awesome!
 
 
2 hours later…
user11585758
4:33 AM
Hi guys ,
 
@wim the laptop pulls at my heartstrings. RIP :(
 
5:26 AM
@AaronHall you're on the SO pod, eh?
 
@toonarmycaptain uh oh
maybe
lurks casually
 
6:03 AM
cbg guys o/
dark theme doesn't apply to chatrooms?
 
It appears not to and it's confusing me when I switch to main. It looks too much like my editor. I can't decide whether I like the theme or not
 
cbg guys
Does anyone have experience with Azure pipeline setup that can be of help.
 
6:21 AM
@roganjosh They should have kept dark theme like Twitter.
 
What is Twitter? That thing that's occasionally in a BBC article? :P
 
xD
I am there because of Elon and his dark humor. ;-)
 
Yeah, yeah. :P
Thankfully, the BBC has dialed it back a little in recent times. One article that sticks in my head was when the cockpit window of a commercial jet broke and the pilot was almost sucked out. In the middle of the article, they just had "but some people have called for tougher measures" and there was a post from "LazyPigGirl" just rambling on on Twitter
Expert correspondent on aviation, I guess :)
 
Jez :D
 
Found it I really thought it was one of those feature box things linking directly to Twitter, but it's just a quote
 
wim
6:34 AM
this is crazy, out of 17 answers something like 15 got it totally wrong stackoverflow.com/q/1319338/674039
(but the accepted answer is ok, thank goodness)
 
6:50 AM
Well, I'm a bit lighter on rep after visiting that thread. I'm glad someone felt the need to pop up in 2019 with a Pythoff solution that includes [L3.append(num) for num in L1 if num not in L3].
 
user10984358
7:29 AM
so no one suggested this first_list.extend(set(second_list).difference(first_list)) because the asker wanted a new list?
 
Hi, I am scraping booking.com for my academic project. Scraping multiple pages using for loop and Selenium web driver. Code is working but some of the data is not appearing. I posted this question in the stack over flow
 
user10984358
or it just worked for that case and my logic is flawed?
 
It works when I scrape a single page.
 
user10984358
congrats roganjosh at being an RO :) cant wait to see you move things to ouroboros :p
 
@jack1285 Hi. Please note the room rules here. Your question on main is only 8 hours old. We ask that users wait at least 48 hours before asking here, if the question isn't already answered
 
7:32 AM
ok noted. I will wait
 
@TheNamesAlc Thanks :) It's gonna take me some time to learn the ropes
 
user10984358
I just realized the first answer did that :/ mine is smaller and less readable
 
Congrats Rogan! A small gift: meta.stackexchange.com/a/271269/206319 :)
 
user10984358
of all the tools there, I feel like timeout is "greater"
 
Yeah! Especially for religious SE sites.
 
user10984358
7:45 AM
yeah for this room it wont be of use, the only one time I have seen that here or on sopython meeting transcripts is when an RO did that during the room meeting
 
I don't think it really matters about the context; having been in a "global" timeout, they are frustrating
 
user10984358
so mods have the added benefits of an RO or they have to be an RO to get that? I understand to an extent mods get some features in rooms
 
they have all privileges of ROs
 
user10984358
so mod == mod + ro ?
 
more or less
They can freeze the room too
 
7:49 AM
why would jean comment something like this lol: stackoverflow.com/questions/60945583/…
 
user10984358
isnt timeout freeze?
 
No here freeze is, blocking any further activities; it's like a complete dead chatroom.
 
@roganjosh woah cool! grats yo. you'll make a fine RO.
 
@alkasm many thanks :)
@alkasm JFF dissing VSCode when I'm just getting into it? That's a paddlin' (also, I don't know why he's contributed only that)
 
Completely bizarre comment from a mod IMO
 
7:52 AM
@TheNamesAlc For example check this frozen room: chat.stackoverflow.com/rooms/info/53839/leaf-village-ninjas
 
way to like, throw all of Brett Cannon's work under the bus
 
wrote a filesystem driver in python that mounts the filesystems in the fs module to the OS's filesystem
 
I think he's saying that VScode's linter is wrong
 
user10984358
thats what i though too, didnt know it was called linter
 
Not like VSCode has a special linter...it has whatever linter you set it up with. Like any other IDE does.
 
user10984358
7:55 AM
@TheLittleNaruto This room is frozen; new messages cannot be added. naruto themed owners and room
 
Oh, the dark theme close vote menu is awful. The text is really hard to read
stackoverflow.com/q/60945583/4799172 needs more focus. There isn't any code in line 6 and the given answer doesn't help. It's also just a linter issue
 
I wish I liked the dark theme better...but I just don't. It's somehow too busy.
 
Actually, is it a linter issue? If it's a Python error then they're definitely missing an MCVE
 
there's no way thats a python error
oh i guess i read it wrong
assigning TO a function call?
like asdf() = "hi"
>>> int() = 5
  File "<stdin>", line 1
SyntaxError: can't assign to function call
 
8:06 AM
Welcome to my party :P I've just gone through that exact loop of thought :)
 
heh ive never even seen that
 
But that isn't the message that the OP actually gave, so even if they are paraphrasing (ugh), it still seems like a linter message to me
 
hi everyone, i'm quiet new to phython world. could you anyone suggest me good Head first approach books. Thanks.
like AI with Phython
 
Month-end cabbages!
Congrats @roganjosh & good luck with the modding :)
 
@shad0w_wa1k3r cbg and thanks :)
@Dinesh_Dini If you are just learning Python, I would suggest avoiding AI in the beginning. This is likely to make a lot of use of numpy and pandas, and will skip over a lot of the python basics
 
8:18 AM
@roganjosh thanks , mean to say ,need to strong in basics?
 
@Dinesh_Dini I don't know if there is a definition for "strong", but it is definitely worth learning Python before jumping into AI
 
@roganjosh Thanks bro.
 
8:41 AM
@roganjosh There's a party? Didn't think those were allowed these days... :)
 
@JonClements Hey, I only invited 1 person! That's within the rules. Also, a creepy party, actually.
 
a creepy party - now I'm intrigued :)
 
I'm not sure I need to elaborate on someone turning up to a host's party and being the only guest. Music playing and just a sad sponge cake with a single candle. The rest of the story writes itself, kinda like The Descent
 
8:59 AM
@roganjosh I wouldn't know... I never get invited to parties and no one turns up to mine anyway... meep meep :)
I just sit in the corner chewing on my squeaky toy so it sounds like I have company :)
 
Oh no, I left it an awkward amount of time while I went to make a brew :(
 
It's fine... I'm use to it... I'll just be in the corner ----> :p
 
Oh god, what have I done?! Meanwhile, you'll probably find Monty there through his own volition. I don't think he's used to people being around 24/7 to stop his antics
 
@alkasm I've seen disproportionally many false-positive errors from VSCode users lately. Suggesting to use a, erm, different IDE seems like a sensible solution to these ongoing problems.
 
@MisterMiyagi would like to see a quantitative metrics before suggesting to newbies who are facing a (likely) unrelated error to change their IDEs from one of the most popular ones in the world.
 
9:14 AM
@jack1285 Out of curiosity (since I've seen several requests of that kind), which kind of academic project requires scraping booking.com?
 
@alkasm Well, you do that. I'm fine with looking at my SO feed and wondering "where's all that crap coming from?".
NB: An IDE can be perfectly technically fine. If the users aren't capable of using it properly, it's not the ideal tool for them.
 
There's a difference between looking at your feed, and taking that action. Totally fine in general with hating on an IDE, lol.
I don't really think IDEs are helpful for newbies in general regardless.
 
Well, I do.
Provided they don't spam newbies with misleading errors, that is.
 
What makes you think VSCode is spamming misleading errors?
 
9:18 AM
@alkasm Microsoft? /me ducks and runs... :p
 
@alkasm The above linked question, for example.
NB: I didn't say that VSCode does that prior to your question.
 
I do not believe any of this is said in good faith. It's a linter error. From pylint. Which you can set up in any IDE.
 
I am missing the command on my linux where I can set

pip 20.0.2 from /home/rehman/.local/lib/python3.5/site-packages/pip (python 3.5)

to

pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)

_
can anyone help me in this ?
 
use python -m pip with the python version you wish to use
(better, use virtual environments)
 
@HabibRehman for a Ref. check
 
9:24 AM
yea i'll use virtual env from here, but the problem is my distro had some scripts on startup who uses python default 2.7 verion to operate and i somehow set the default pip and python to latest version
 
wow I've never seen that answer and yet somehow used almost the exact same wordage.
 
@αԋɱҽԃαмєяιcαη thanks for the ref, my problem is bit different though
my default python command is now set on 2.7
but pip is set to latest
 
yeah, system packages should be left alone
 
@alkasm the ref shows how can i specify the pip version right ? but default bash script doesnt know that in order to keep everything same for the scripts i need to set the path correctly
@Arne learned that, hard way
 
is the script run by your user or by the system?
 
9:27 AM
what default bash script? i'm not following. do you have a startup script that uses pip which you cannot edit or something?
 
@HabibRehman Are you looking for $PATH perhaps?
 
its the startup script by my system
 
user11585758
guys for 5 hours i was cloning repo but give error help me :(
 
@alk
 
@mathematics what error?
 
9:28 AM
@HabibRehman how did that still manage to ping me?
 
user11585758
Cloning into 'deep-learning-v2-pytorch'...
remote: Enumerating objects: 1078, done.
error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
 
@alkasm 3 letters are enough
 
neat
 
user11585758
I tried to search but nothing worked
 
@alkasm the script is run when the system starts, i can edit it but i dont want to go every place and edit the commands there for pip. it would be easier to change the path
 
9:29 AM
There was a feature request to enable two letters for people with only 2 letters in their name...
 
@mathematics where are you cloning from?
 
@AndrasDeak may i test if there's 2 different users with both names ?
 
@αԋɱҽԃαмєяιcαη no.
You'd ping both in chat.
 
@HabibRehman then you might need update-alternatives
 
i will not. i just want to test @ and
 
9:30 AM
@αԋɱҽԃαмєяιcαη yeah, don't.
 
i did, and it worked for python command @Arne
how do i do it for pip command
 
user11585758
@roganjosh I had forked repo and used git clone ....git but not worked both for ssl and https
 
i followed this by the way @Arne
https://linuxconfig.org/how-to-change-default-python-version-on-debian-9-stretch-linux
 
@mathematics Did you look at this?
That link ends with "Typically this is caused by a network setting, firewall, VPN client, or anti-virus that is terminating the connection before all data has been transferred." so it's really going to be open-ended and probably not something we can debug here
 
9:34 AM
uhm, sudo update-alternatives --install /usr/bin/pip pip /usr/lib/python2.7/dist-packages 1?
but I'm not sure, didnt use it in a while
maybe test it in a container first
could kind of mess up your system, as you saw
 
user11585758
checking link thank you @roganjosh , I will check my firewall. Thankyou for link :) .
 
@mathematics For future reference, I just Googled "git rpc failed" and it gave me the error you're seeing. Google is the best place to start with debugging
 
user11585758
I had just tried that before and tried some link it was not working
 
@Arne yea, i see before i tried export PATH=$PATH/dir and i couldn't even do sudo after that xD
but i did manage to fix it back
this command you just showed seemed to work
let me restart my system and then it'll be confirmed
 
and they were never heard from again
good luck =)
 
9:38 AM
update-alternatives: using /usr/lib/python2.7/dist-packages to provide /usr/bin/pip (pip) in auto mode
this is what it respond
i think, we need to set the precedence here
but wait at the end of the command you wrote 1, which means its set
update-alternatives: --install needs <link> <name> <path> <priority>
 
Only partly copying dangerous commands we don't understand. Best idea.
 
@Andras but how much harm can a cool smiley do? :(){ :|:& };: :p
 
Bah
 
user11585758
:) , Helps to collaborate more and say thanks with nice looking smile
 
All pros here, sense of humor flew over my head
 
9:46 AM
@HabibRehman does pip --version still work? i pasted the link that you provided in your first message, but I'm not sure if it actually points to a working pip binary
 
yea it still works but the path is wrong, its supposed to show the 2.7 v not 3.5
pip 20.0.2 from /home/rehman/.local/lib/python3.5/site-packages/pip (python 3.5)
i am just restarting it now
 
user11585758
It didnt solved guys :(
 
@mathematics This isn't a problem with python and I also suggested earlier that this is open-ended. There isn't any way for us to help you on this
 
user11585758
oh
 
10:01 AM
I can only go on what you gave, which is a generic error that appears to be from any number of network-related issues. I think you'll need to research that some more yourself because there's nothing we can recreate on our end
 
so even after restart, it doesn't work
@Arne
There is only one alternative in link group pip (providing /usr/bin/pip): /usr/lib/python2.7/dist-packages
Nothing to configure.
update-alternatives: warning: forcing reinstallation of alternative /usr/lib/python2.7/dist-packages because link group pip is broken
update-alternatives: warning: not replacing /usr/bin/pip with a link
 
10:18 AM
welp, that is as much help as I can provide without rebuilding your borked setup and debug it locally
 
alright, thanks alot for the help
 
10:53 AM
Good luck in solving your problem. And it's been said already, but for me personally as well the vast majority of annoying system/deployment issues in python disappeared once I started using virtual environments
 
are there a more Pythonatic way to get the same output of
print(list(string.digits + string.ascii_lowercase))
 
is docker good as well ?
 
11:07 AM
depends on what you're trying to do. I couldn't do my job without it.
 
@αԋɱҽԃαмєяιcαη What do you need this for?
 
iterable for grades
 
@αԋɱҽԃαмєяιcαη don't need list there
 
@αԋɱҽԃαмєяιcαη I mean, what's the sense behind printing a list of digits and lowercase letters? Surely that's not how it's going to be used, is it?
 
@MisterMiyagi i didn't get you yet ? are you asking what I'm going to do with that ?
 
11:11 AM
i was trying to run the virtual env, and i have to use this command to start it
python3 -m venv --without-pip your_venvv

if i run it with pip, then it says "returned non-zero exit status 1."
 
@αԋɱҽԃαмєяιcαη Yes. Do you actually need the print, the list, and the dynamic string building?
 
then the python3 version that is installed on your system doesn't have pip bundled within.
that might turn out to be a problem, so add pip before creating the virtualenv: sudo apt install python3-pip
 
@MisterMiyagi to be within list or not. that's will not case issue for me. something like abcd..0123.. is ok
 
@αԋɱҽԃαмєяιcαη Depending on what you need, I'd just go with grades = '0123456789abcdefghijklmnopqrstuvwxyz'
 
@MisterMiyagi I think using string is fine for this, much fewer room for mistakes, and readable
"oops, you missed q"
 
11:14 AM
@AndrasDeak that's what i meant. yea. just was asking if there's something shorter than what i used.
 
yes, string.digits + string.ascii_lowercase
probably a bit longer than the literal, though
 
11:25 AM
recbg
 
cbg
 
cbg
 
cbg
 
cbg
 
11:38 AM
arghghg... trying to log into google console and it defaults to one google account which doesn't have permission so have to choose the account that does, it then proceeds to log me in under the account that doesn't have permission anyway and then logs me out of that one... I'm confused...
 
cbg
 
For people interested in koalas , here is an quick little read. Thought it might be helpful.
 
@anky_91 are you using this now in your workflow?
 
@roganjosh not yet , one of my senior is testing it
but they are from a different team :)
came just to share this rbrb for now , gotta run for a meeting
 
11:51 AM
rbrb :)
 
@JonClements It's helpful to just have separate browser users with separate logins (works flawlessly with Chrome, although I'm not using it that much)
 
@shad0w_wa1k3r yeah... seems that shouldn't really be necessary but does make sense... will give that a go - thanks
 
I know a co-worker who is engaged in quite a few startups (& his own job), so he simply keeps a separate Google account for each work email he has & only accepts permissions on the specific company's emails. Found it fascinating. Unfortunately, it doesn't work with everything (looking at you stupid FB, Insta & other few), but at least it keeps such people sane :)
easier to store passwords, sync tabs, search history, etc. to separate google accounts
 
 
1 hour later…
1:04 PM
How can I change the default message of a builtin exception of a standard library function?
If a newline is passed to the function int(), printing its exception object will give: invalid literal for int() with base 10: '' How could this message be changed when catching the exception?
 
re-raise it with a new message?
 
I've tried that, but I'm not sure about the syntax so it didn't work. I'll search that. Thanks.
 
Can you clarify your problem? The error for passing a newline to int is ValueError: invalid literal for int() with base 10: '\n' for me.
 
1:19 PM
Ideally, it doesn't really matter whether the message of an exception looks nice or not, because the only people that should be seeing it are the dev team.
 
@Kevin Thanks, right.
 
One place that this kind of ValueError might show up is when you're taking input from the user and trying to treat it as an int. I have a post that talks a bit about how to print sensible error messages if the user enters nonsense, and what to do afterwards
 
@MisterMiyagi Just out of curiosity(as kevin said it's not important), I'm trying to change that very message you have seen. John said re-raising the exception is the way to do it. So here's what I do:
try:
  do()
except MyCustomException as mce:
  print(mce.info)
except ValueError as ve:
  raise MyCustomException from ve
Is that what Jon said? Because it doesn't work. Exception has occurred: MyCustomException ..... raise MyCustomException from ve;
 
you don't need the ;, other than that it's fine
 
1:24 PM
The raise MyCustomException on the last line won't cause the except MyCustomException as mce: block to execute, if that's what you're hoping for
 
erm, yeah. MyCustomException is still an exception.
it will kill your application if not handled elsewehere
 
@Kevin yes that's what I thought Jon said I should do
 
exception handlers are exclusive and don't have fall-through.
 
I think Jon is basically proposing:
try:
    do()
except ValueError:
    raise MyCustomIntParsingException("Can't parse an empty string :-(")
Of course, this will still crash your program. I assume that's the desired behavior
If you don't want the program to crash, then you don't need to raise anything at all. Just print() whatever message you want in the except block and carry on
 
@Kevin Thanks
 
1:30 PM
Do you need raise ... from None to suppress the original exception? Or does that only happen when you don't manually raise?
 
I don't think it distinguishes between manual raise and non-manual.
 
that's what I thought (it wouldn't be too much like python)
 
without the from ..., the current sys.exc_info() becomes the exception's __context__. Doesn't matter how that one was raised.
 
More info than you desired available for perusal at docs.python.org/3/reference/…
"A [mechanism similar to using from after raise] works implicitly if an exception is raised inside an exception handler or a finally clause: the previous exception is then attached as the new exception’s __context__ attribute"
I was about to say "... So there's not much point doing raise ... from inside an except block, since the outcome is the same", but I notice that the sentence between the two stack traces differs depending on whether the first exception is attached as __cause__ (as in during raise ... from), or as __context__ (as in the implicit attachment when raising inside an except)
 
There is also the point that from ... allows you to skip part of the exception stack
 
1:41 PM
They print "The above exception was the direct cause of the following exception:" and "During handling of the above exception, another exception occurred:" respectively
 
# hide an intermediate error
except ValueError as err:
    raise RuntimeError("Someone set us up the bomb!") from err.__cause__
 
True. Amendment to the thing I was about to say: "... So there's not much point doing raise ... from ... inside an except block if the thing you're raising from is the exception that was most recently raised, and whose block you are now in, since the outcome is the same"
 
Can be useful if you try a legacy fallback, but want to report the initial error from the standard handling.
 
@MisterMiyagi what's the difference between that and raise from None?
uncaught they look the same. Haven't looked at attrs yet...
 
if err.__cause__ evaluates to None, I would expect there to be no difference
 
1:54 PM
raise from None will suppress any former exceptions. raise from err.__cause__ will suppress only the previous exception.
Note that you need at least three levels of errors for raise from err.__cause__ to have an effect.
 
Ah, I see, thanks!
that's two longer than my usual exception depth
 
I've only ever needed it once, which was rebuilding contextlib.AsyncExitStack for fun.
Spoiler: it wasn't fun.
 
try:
    try:
        raise Exception("A")
    except Exception as e:
        raise Exception("B") from e
except Exception as e:
    raise Exception("C") from e.__cause__
Minimal example. The "B" exception does not appear in the output.
Note that, if you simply do raise Exception("B") with no from e, then you have to raise Exception C from e.__context__ instead of e.__cause__.
 
That's it. The ugly part is that you generally don't know whether __cause__ or __context__ is used.
 
Comedy option: raise Exception("C") from e.__cause__ or e.__context__
 
2:01 PM
Challenge Option: remove a single layer of __context__ without setting the __cause__.
 
what have I done
 
Perhaps something like raise e.__cause__ from None
 
almost
        ....
        raise Exception("B")
except Exception as e:
    try:
        raise Exception("C")
    except Exception as new:
        new.__context__ = e.__context__
        raise
 
2:34 PM
As a productivity experiment, I've blocked 95% of the sites I waste my time on. I estimate two hours until the following scenario occurs:
 
heh
I think mr frog is going to open the box
 
"Surely this would be a more effective experiment if you blocked 100% of time wasting sites?", asks the room. Let us discuss this matter in more detail behind the shed, I say, tearfully loading my hunting rifle.
 
tvtropes any one? Looks at @Kevin :p
 
Gone
 
morning cabbages, all
hey guys, this just happened on the work Slack. Who's being a yam in this message thread, Black (or I guess, Red) or Blue?
 
2:41 PM
Pour that tea
 
trying to ~figure out how I should intervene here~ calibrate my yam detector
 
"Windows 3.1 never had these issues!"? :p
 
Red's frustration is understandable but he's not directing it in a constructive way
Not that I think calling him out at this point would be an effective de-escalation strategy
 
how could Blue have handled this better?
 
Battle of the OS' is a strange game. The only winning move is not to play.
 
2:47 PM
so... "ignore a direct message"?
 
Blue could have replied with "you're entitled to your opinion" and refused to engage any further. Complete radio silence might also have been effective.
 
oooh! thanks
 
@inspectorG4dget That depends entirely on how the usual dynamic between these people is. If my office mate had written me this, we'd probably traded some insults and laughed. If our Linux super advocate fanboy had written me this, mic drop.
For the record, I fail to see how "install a third party program for this" is bad. It's basically what Linux is, and what many people want Windows to be.
 
Mm hmm, I can think of a friend or two where them saying "Product X is bad and there might be something wrong with you for using it" is an invitation for polite conversation
I could reply with "haha yeah, I must be cuckoo, but y'know even so I kind of like features X Y and Z..."
But that requires a foundation of mutual understanding that's hardly the default between internet randos
 
Red and Blue are at the same level, though Red has been in industry (and the company) longer. Blue has expressed interest in not wanting to start flame war, especially with Red because Red will just scroch the earth to "heat up a pot of soup"
oh Red and Blue are actually friends and are on the same team at g4dgetCo (so not internet randos)
Blue has been saying that Red tries to rope him into flamewars for no evident reason other than to express his opinions on things (OS X in this case), which usually translates to calling <thing> a tomato
 
2:56 PM
I might say that friendship is necessary but not sufficient to recognize when apparent personal barbs are a conversational quirk and not an actual attempt to rustle one's jimmies
 
@Kevin "rustle one's jimmies" <- love that expression. Never heard it before. I'm going to tell Blue to try to "offer a compassionate ear" as a default response, rather than to try to fix the problem
 
I occasionally get razzed for using Windows, and I put approximately zero effort into defending my choice, because it's not my job to advocate for it and I receive no reward for making anyone else see the light
(Never mind that I basically can't defend my choice because my principal justification is "I'm trapped by ten years worth of vendor lock-in". That is neither here nor there)
 
lol! well that's just the thing. My interpretation of the thread is that Red feels the need to impose his view on Blue. I don't think that's constructive at all
 
red does come off as forcing banter where it's not appreciated. If I was in your position I might try to find a nice way to tell them to improve their ability to read the room.
"haha, mac users are fanboys" <- know where to make that joke
 
I think a lot of techies naturally see themselves as advocates for their favorite tools. I consider myself the odd one out for not being quite so territorial.
It's a hard problem because the solution can't be "just change your personality to be more agreeable"
 
3:09 PM
duly noted, and thank you. But I do notice that nobody has bashed Blue. Red has taken quite a beating, but Blue has not. Is Blue getting away with playing a victim card here, or is there genuinely nothing that can be said about Blue?
 
Blue calling himself a disgrace etc etc seems pretty clearly like an unnecessary escalation to me
 
Seems like previous history to me, TBH.
Blue has been through that a lot already, and is running out of fruits to give.
 
Red has a history of sparking such conversations, yes. So Blue was "cutting to the chase"
 
3:13 PM
@shad0w_wa1k3r yup... that seems to work nicely... thanks
 
I understand that it's hard to reply tactfully to "you and people like you have a mental illness" but the ideal diplomat would probably have not put words in their interlocutor's mouth
 
I'd probably just low-key snark at such a person and otherwise avoid talking to
 
hmm... thanks guys. That helps
 
and for the cherry on top: anyone wanna take a guess at who these people might be?
 
3:16 PM
@MisterMiyagi bang
@MisterMiyagi tuple1 = [] # not actually a tuple
 
Everyone knows that [] is an array :-P
 
Today was the first time that I saw someone ask how to "speed up the addition of arrays without numpy", and the alternative contained array.array. I was impressed.
 
@Kevin looks like a checkbox to me :)
 
@AndrasDeak the question rates highly as a candidate for my "don't do this at home" collection
 
@wim Yes, I'm active on Astronomy.SE. (Although I have less than 10k there, it's a beta site, and I have enough rep to see deleted posts).
 
3:38 PM
Welp -- corporate just mandated that we not use the teleconferencing software we've been using, and we have to go back to the old one, which drops half of everyone's audio
 
@Kevin did they give a reasonable reason?
 
No, but I observe that the software recently made headlines for claiming to have end-to-end encryption, when in reality they don't
(I would normally provide a citation here, but I blocked the site)
 
ah...
 
To be fair to corporate, they're not forcing us to use the old terrible system. It just happens to be the only one available by process of elimination
 
Sam
Hello guys
 
3:43 PM
hello
 
Sam
What's a good approach to finding if a domain/ip (user can input both) is both external and working? (So this eliminates 192.168.x.x but can be other ip's, 127.0.0.1, localhost, ::1, etc. etc.)
So 216.58.208.110 will return True, 127.0.0.1 will return False
What I have right now is:
try:
    socket.inet_aton(args.ip)
except socket.error:
    print(args.ip + " is not a working IP address or domain name.")
    exit()
but that does this:
$ python ip2location.py google.com
google.com is not a working IP address or domain name.
$ python ip2location.py 8.8.8.8
Working
$ python ip2location.py ::1
::1 is not a working IP address or domain name.
 
"google.com" is not an IP so it seems to work (considering the name "ip2location")
 
do you mean actually working on the machine you are on, or in principle working on a machine that has the correct routing?
 
Sam
@AndrasDeak it also has to accept domain names
$ python ip2location.py 127.0.0.1
Working
This does work for some reason. Why does inet_aton accept this, but not ::1?
 
Wow... never seen someone manage to get formatting like this before...
 
3:48 PM
is ::1 ipv4?
 
for bare IP addresses, Python ships with the ipaddress module
@AndrasDeak IPv6
 
Sam
$ python ip2location.py localhost
localhost is not a working IP address or domain name.
It also doesn't look like it accepts aliases
 
> inet_aton() does not support IPv6, and inet_pton() should be used instead for IPv4/v6 dual stack support.
so that's why it doesn't work
 
Sam
I see. Thank you
 
Sam
3:50 PM
I am trying to write a IP geolocation script
 
@Sam too much
 
Sam
Broken?
 
Sam
its about 50 lines. . .
 
it was missing an initial i, but you fixed it
@Sam I'm glad we agree
please use a code paste service and link here
 
3:51 PM
note that ipaddress's IPAddress objects have is_private and is_global indicators.
 
Sam
Okay
So what you said,
it ships with python? So no pip-ing?
That would be a major +
 
@Sam In such a situation you should google "python ipaddress" and see what happens. Or you know, follow the link that Miyagi gave you.
 
Every module listed in the official docs almost always ships with python
 
I don't think Sam's concerns were of the "but what if it's listed among the stdlib on the website, but it's somehow missing like a weird case of tkinter?" kind
 
@AndrasDeak What's the tl;dr on array.array vs numpy (vs pandas)? What is it better at? (other than fewer dependencies, and would build smaller installable)
 
3:59 PM
Don't know, never used it.
 
00:00 - 16:0016:00 - 00:00

« first day (3454 days earlier)      last day (1488 days later) »