« first day (3297 days earlier)      last day (1654 days later) » 

9:48 AM
cbg
 
cbg
@smci good job with stackoverflow.com/questions/5653533/…, I should probably add it to the canon
 
 
3 hours later…
12:40 PM
@JohnnyApplesauce Something like if any(type(x) == significant_type for x in my_list): should do it. It will short-circuit, stopping as soon as a value of the given type is found, but it is indeed an O(N) solution.
 
@AndrasDeak OK, I have sopython.com/canon/135/…
 
1:17 PM
Hi everyone. I'm asking my question here because it's an opinion based question: why Python is the number 1 language for artificial intelligence whereas it is really slow? I read this answer ai.stackexchange.com/a/3503 who explains why Python is used in a first place but don't talk about the execution speed who is crucial in AI.
 
Hi @Pierre . The part in python ML libraries that performs the heavy math where performance is needed is not written in python, it is usually C or Fortran. Does that answer your question?
The very next answer in the post you linked also mentions this.
 
1:47 PM
Yes, it does.
 
2:09 PM
That and also the fact that all major Python ML libraries support GPU acceleration.
 
2:25 PM
How can I get the number of elements which are the same in two lists in order? For example in a list I have ["hello", "man", "guys"] and in another list I have ["hello", "man", "girl", "guys"]. I'd like to get just ["hello", "man"]
 
oh man i need help and have no idea what's going on: stackoverflow.com/questions/58566567/…
i have been struggling with this for like anhour
it seems super strange
yesterday i spent most of my work day on it
like is there some kind of difference in how things are runwhen theyre inside of a class?
 
@antonioag take a look at set and its intersection operation
 
3:36 PM
set intersection would include "guys" in the result. I think they want something like [a for a, b in zip(list1, list2) if a == b]
 
4:28 PM
The "It looks like your post is mostly code; please add some more details." error message seriously needs to be rephrased to something like "it looks like your post is mostly code; please remove a lot of it"
 
5:21 PM
Hi I found this code online but not sure what I can do with it pastebin.com/agCTahvZ When i run I get this pastebin.com/jVFn3EBG When I change to some of address from print 19XageRJxAT5SeGdwL2i67PuwerFgp2Gv1 I get this 14411518807584767919XageRJxAT5SeGdwL2i67PuwerFgp2Gv This is not a private key. Can you help me to figure out what is this program
 
 
1 hour later…
6:43 PM
stackoverflow.com/questions/58573471/… dupe (somehow I managed to say "terminal" every time I meant "console" in my first comment - I've over-trained myself to use linuxy-terms even when it doesn't make sense :/)
 
closed, and cbg
 
Thanks. cbg cs95, I've noticed you around a few times recently, good to see you :) How've you been?
 
Still in one piece, thanks :) I've been lurking mostly, but I haven't been out of the loop... it's disappointing to see site crumbling due to a handful of bad business decisions, but that's life I suppose
 
For sure. Oh well, still a bit more of an enclave to be found in chat against all that
 
I've been coding in Angular and TS for the last 3 months, so I feel like my python's become rustier now
I keep my mind fresh by re-reading my old answers that get upvotes every now and then. Helps
 
6:55 PM
Should give you a pretty well-rounded skillset though to be working more on front-end stuff
 
yes.. I've started courting Typescript and rekindled an old flame with java, so hopefully that makes my resume more attractive :p
you can see the fruits of my labor at shopping.google.com
 
Sweet. How many people are involved in your team for something like that? I don't really know the structure at Google
I'm guessing there is a dedicated team for the shopping results page, and then the rest is handled by a more general integration team?
 
There's a lot of moving pieces to google shopping, to give you an idea of scale we have 2 buildings dedicated to shopping in Mountain View and 1 building in Pittsburgh. My team has 11 people and we mostly work on the client side and relevant integration.
Besides the actual product pipeline there are modelling teams, UX, etc. I originally wanted to get into the modelling team but I liked the manager of my current team more when I was interviewing for the positions
You know what they say, you don't quit your job, only your managers... I think a successful career starts with having good managers :P
I also work with a much smaller team of 4 devs to maintain shoppinglist.google.com, we're integrating with assistant (and home) to provide a seamless experience for people to keep track of, and order their groceries. /plug
 
Oh for sure, they're also more likely to give you better exposure
 
Oh yes, I do like that your impact feels more meaningful, people can tangibly interact with what you built
 
7:10 PM
So what of pandas now? You just tucking that away for something further down the line?
 
no not at all. imo data crunching and analysis is an important skill to have, I aim to keep in touch with the occasional answer :)
I'm sure it'll come in handy at some point. Even if for nothing more than points on Stack Overflow (lol)
 
Ah, but I mean in terms of application. You're not fussed that you developed it to such a level then just moved on (professionally) or do you have an ultimate goal for tying this tech stack all together in the coming years?
 
what is the difference between something being run within a method of a class, and within the class—but outside of that method?
i think the problem i've been having gets down to whatever that difference is
so for example if i say
 
@AmagicalFishy please see our code formatting guide for chat and practice in the sandbox if necessary
your code needs indentation badly, so I'll just move it from here and you can repost it with proper indentation when you've got the hang of it
 
7:26 PM
@roganjosh I wish I had a master plan and could say "oh yeah, it's all coming together 😏" buuuuut...
 
:P. In the meantime, it's not a bad path to be taking so I'd keep going :P
 
man, I don't even put that much planning into my next meal
yeah, that's fair :)
 
any ideas? :l i'm struggling hard here.
 
7:43 PM
@AmagicalFishy did you read the messages I directed at you directly...?
 
i did!
 
<sits on a link and example waiting to join the discussion to check my own understanding, but can't until @AmagicalFishy responds to the request>
 
@AmagicalFishy I'd have expected you to practice in the sandbox and then repost your code, now well-indented, so others can answer
without the code your remaining messages are quite unclear
 
oops
(i'm hearing more dings than i see messages; am i missing something?)
 
either you're being pinged in another room, or in another chat client, or something's bugged
 
7:48 PM
32 mins ago, by AmagicalFishy
so for example if i say
And then see the message directly below
 
ugh
what is working in the sandbox is not working here :l
how about this
class some_class:
    some_method()
vs.
class some_class:
    def class_method(self):
        some_method()

t = some_class()
t.class_method()
there :D
 
@AmagicalFishy You get pinged every time a directed comment at you is edited. Like. This.
 
hah! that's it, someone must be editing their message.
 
@AmagicalFishy thanks
 
7:54 PM
fyi, formatting your code and explaining your problem clearly helps you more than it helps us ;-)
 
(And yeah, I edited because "reported" is a confusing typo for "reposted")
 
the difference is basically the same as the difference between
some_function()
and
def func():
    some_function()

func()
 
i do have this more detailed question @cs95 stackoverflow.com/questions/58566567/… --- but the more i deal w/ it, the closer i get to knowing where my problem is
is there a difference that should... matter to a function independent of some_function() @Aran-Fey ?
say some_function() was totally independent of func()—is there anything that would change?
 
no
 
hrm. i didn't think so either :(
i can run some_function() from within the init method of the class it's in (in PDB!!!) and it works fine, it runs via pytest inside and outside of the class, but once i run it inside of a class method, something different happens
 
7:59 PM
Oh well, I ended up learning something different based on Static Methods and Class Methods (which isn't relevant here). I'd misremembered the first line being a class function. In any case, TIL from this. I don't think I've seen methods altering class-level variables in the wild but maybe I'm blind
 
Are you using responses in your tests or is that somehow leaking out from twilio?
requests.exceptions.ConnectionError: Connection refused by Responses: POST https://api.twilio.com/2010-04-01/Accounts/My_SID/Messages.json doesn't match Responses Mock <- evidently someone is mocking requests with the responses library
 
it's something leaking out from twilio, yeah
(i'm not using responses at all)
 
sounds like you should send them a bug report, then
 
that'd be a poop. i think i will, though.
i just figured out where the problem is!!
 
oh my cod!
 
8:11 PM
i have an idea as to why it could lead to this weird class-thing, but i'm not certain
moto (a package to mock Amazon services) screws up requests somehow
so twilio comes back with an error if amazon's SQS is currently being mocked, and everything goes well if it's not
i think this works-outside-of-class-method thing happens because the class requires amazon SQS stuff, and, in my tests, SQS is mocked
maybe PyTest doesn't actually start the mock-SQS until something in the class needs it
github.com/spulec/moto/issues/794 (haven't read through it yet, but it looks relevant)
 
8:30 PM
do you guys have a strategy for like... browsing open questions and things like this?
i feel like i use stackexchange a bunch, but don't contribute much (outside of asking questions). i'd like to answer questions too, but i often have no idea how to start w/ the questions i do see
which leads me to assume that i'm looking for questions incorrectly
 
remember to occasionally click stuff you know you can't answer and learn from the answers other people post
other than that... just spent time on the new questions feed. There's plenty of low-hanging fruit there
 
i'll do those, yeah. especially the learn-from-questions-you-can't-answer part
 
That's probably the main part for me. Less so in recent years, but it used to expose me to a lot of libraries I wouldn't know existed and what could be done
 
wim
9:08 PM
@AndrasDeak bug fixed bugs.python.org/issue38557
 
9:21 PM
\o/
 

« first day (3297 days earlier)      last day (1654 days later) »