« first day (4083 days earlier)      last day (1088 days later) » 

00:17
Hey folks, does anyone have any documentation/references on how to build microservices with flask and what the best way for each microservice to talk to each other would be?
 
5 hours later…
04:54
As with all good things, "it depends" is the answer
personally, I think microservices are overused. But if you're just super into them and think they'd solve your problems, I'd consider just making HTTP requests of your other services
05:33
@RandomPerson I'm suspicious of a textbook that messes up something as fundamental as np.arange()
05:48
Hi All, Does anyone have experience in Mautic ?
I have a doubt to ask in DWC and device_id issue
06:14
@richardec yeah..
@richardec Can you please elaborate?
richardec, I chatted with davidism in this room.
@PM2Ring wow.. I missed that. Thanks. BTW, it is not my text book. It is a question bank.
It's a question bank... with counterfeit questions. ;)
haha.. yeah!
06:30
@PM2Ring thank you, I was stuck for almost a day, this shows where it went wrong
@JonClements my actual "i" is around 10k values, but I am not really keen on speed here atm, just wanted to get it working before the week started :D, I will try your solution
@Jake Debugging using print is primitive, but it's easy to understand. And it works! Although you have to be careful not to print too much stuff. :)
06:49
oh my god. this one makes no sense.
there's no roll no. 6
how is it possible?
you need to throw this source away.
or proceed at your own peril.
@ParitoshSingh unfortunately, this book is one of my few sources.. so I have less options.
then i guess assume theres a typo in every question
@ParitoshSingh haha, I guess I have to proceed at my own peril
Paritosh, if we change the output from 6 to 4, then option A is correct I guess
I've got the perfect soundtrack for your study session: youtube.com/watch?v=vUBiRXXwqdI
06:55
ha
07:09
this is next level bad!
there's no rollno column in the df
this is correct I guess:
I'm still trying to find the difference between (A) and (B)...
df1 = df[df['Roll no.']==4]
print(df1)
@MisterMiyagi (A) is correct, (B) isn't!
Of course! Silly me.
Well, at least at makes you think about these things. Might actually be educational.
@RandomPerson Actually none of the options are correct 🤦🏽‍♂️
print(df.max()) is the correct command
print(df.max) won't give the desired output..
07:38
aah! how is option A correct?
It is option D right?
@MisterMiyagi haha; true.
I'm seeing a trend here... is option A always the "correct" one?
nah.. in some questions, other options too are correct
07:53
"correct"...
08:04
😅
 
2 hours later…
09:42
how is the answer D? the code will return error right?
this is the error:
Traceback (most recent call last):

  File "C:\Users\username\anaconda3\lib\site-packages\pandas\core\indexes\base.py", line 3361, in get_loc
    return self._engine.get_loc(casted_key)

  File "pandas\_libs\index.pyx", line 76, in pandas._libs.index.IndexEngine.get_loc

  File "pandas\_libs\index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc

  File "pandas\_libs\hashtable_class_helper.pxi", line 5198, in pandas._libs.hashtable.PyObjectHashTable.get_item

  File "pandas\_libs\hashtable_class_helper.pxi", line 5206, in pandas._libs.hashtable.PyObjectHashTable.get_item
I think we have already established that these exercises are Grütze, as one would say in my native tongue.
Wondering whether the book actually exists to conjure nasal demons...
Grits?
aah! It should be iat
10:21
@MisterMiyagi I've only seen the front page yet but goodresearch.dev/index.html
"This handbook is for grad students, postdocs and PIs" that explains a lot.
I figured you might know people who need it :P
10:38
That was Plan A and I've given up on it. Now I'm trying Plan B: Convince them the machine wants to suck out their Science Force and they should never, ever write code.
an acceptable compromise
 
2 hours later…
12:17
Working with Salesforce is painful... sighs
12:42
@JonClements I know. My condolences.
Thanks :)
also today's advent of code was awful.
cbg everyone
@MattDMo cbg
Puppy! How is life treating you?
13:02
@MattDMo can't complain - how's yourself - don't think I've seen you about in a while?
@JonClements Work has been really busy for the last 3-4 months, but is finally starting to ease up a bit. I got "promoted" - a lot more responsibility for the same pay and title - and had to learn a lot and figure out ways to clean up old messes very quickly, but hopefully it'll be worth it come review time. I don't think I screwed up anything too badly, and hopefully had some sort of positive effect. The clients seem to like me, so that's something, I guess :)
lol... paws crossed for you :)
Thanks :) Since I generally work in the field, one thing I definitely won't miss is my boss calling me 8-10 times/day (really, sometimes more) demanding status updates. He's one of those people that when his attention is on something, nothing else matters except that one thing. Kinda crazy, but a good guy to have in your corner when the fecal material hits the air circulator.
13:19
That's an interesting variation of "the brown stuff hits the fan" :p
13:42
question: the term "void functions"... do python functions that return None fall in this bucket? if no, what does void functions actually mean?
Strictly speaking, a void function is a function with no return value, which is something python doesn't have. But it's possible that someone uses "void function" as "function whose purpose it is to do something, rather than return something", and python absolutely does have those
cool, was wondering about it from a purely technical standpoint.
so theres functions that are capable of literally not returning anything, not even a placeholder like None, in other langs.
Yeah. So foo = some_void_function() would be a syntax error
...or semantics error
14:01
cool, ty
It's pretty easy to not return anything from a function in assembly. You just, don't push anything onto the stack before jumping back to the calling address
And lots of languages compile to assembly*, so there's not much stopping them from taking advantage of this
(*or machine code or what have you)
@ParitoshSingh if I recall correctly - Pascal (for instance) has the keywords procedure and function to differentiate between the two
Ah, Visual Basic has similar keywords.
14:17
PEP 928: Adding procedures to python using the notfun keyword
> A Sub procedure is a series of Visual Basic statements enclosed by the Sub and End Sub statements. The Sub procedure performs a task and then returns control to the calling code, but it does not return a value to the calling code.
Hmm, this survey wants to know how much experience I have with data analysis. What's a dignified way of saying "technically none, but I sit with the data analysis kids in the digital cafeteria that is rooms/6/python, so I've probably picked up a thing or two"
"There is a noticeable upwards trend in my data analysis proficiency"
"I'm like a janitor at the Manhattan Project"
I may not understand what the demon core is, but I know I'm not supposed to remove the screwdriver wedged into it
4
I'm trying to download an m3u file (or rather, the files listed in the m3u file), but according to wikipedia there have been numerous security issues in apps that handled m3u files poorly. And I can't seem to find any details about what exactly the vulnerabilities were.
I think it had something to do with reading an unknown amount of text into a pre-created buffer, in which case I shouldn't need to be particularly careful because I'm not using a programming language from the stone age, but I'm not entirely sure if my understanding is correct
14:40
cve.report/CVE-2000-0624 and cve.circl.lu/cve/CVE-2012-0677 look like buffer overflows to me. videolan.org/security/sa0804.html looks like a privilege-escalation type thing, where a website can ask your browser's VLC plugin to write information to arbitrary places in your file system
It's really good to see mention of a CVE that is not about log4j! 🎉
The VLC issue seems to be related to some feature of m3u that I'm not familiar with, and boy oh boy does that thing have a lot of features for what's essentially a glorified playlist
But anyway, I should be good as long as I only read from the paths in the m3u file and not write to them
At least I hope so. Anyway, thanks for helping me research this
14:55
I'm having some issues .... I cannot open a spyder project on my compter. When i instead try to convert the folder to a project instead it says that the folder is already a spyder project. Has someone else encountered this before ?
I'm not entirely sure what spyder is
15:24
a horrendous ide
That is my approximate understanding yes
15:47
@Kevin have pinged you a quick email
I have recieved the email. Technology is truly wondrous.
carrier pigeons are more fun though :p
what a bromance <3
16:15
Now in minute 30 of carefully composing an email that boils down to "yeah"...
@JonClements I don't see a need to choose
 
2 hours later…
18:42
Hey all!
I am now trying to solve questions from other source
I am having doubt with this one:
In the answer key, it is mentioned that option a is correct
but, isn't both option a and b correct?
@RandomPerson Is there really a need to keep posting your textbook questions here? It's starting to dominate the posts and you seem to be able to answer all the old ones yourself
>>> s="title: “incorrect title”"
>>> s
'title: \xe2\x80\x9cincorrect title\xe2\x80\x9d'
@roganjosh Fine. I will leave the room.
I strongly suggest that you actually look into your assertions in that case. But please don't see Room 6 as an infinite resource for every learning question you have. You're welcome to ask here when you get stuck, but you can't just lean 100% on us
how can i replace these special quotes with normal ones.
my tokenization breaks due to the special quotes
  for m in re.findall(r'\w+:\s*(?:\w+(?:\s+\w+)*(?=\s|$)|"[^"]+")', msg):
    key, val = re.split(r':\s*', m)
    d[key] = val.strip('"')
18:55
Regular old str.replace ought to do it
19:07
>>> s.decode('utf8')
u'title: \u201cincorrect title\u201d'
Ok?
i create dictionary with title as key and value being on the right hand side ref:stackoverflow.com/a/70179013/1977867 , but that tokenization fails due to spl characters
You don't need to explain your problem in any further detail, I already solved it. Use str.replace.
yes but are there more such special quotes, for current problem s.replace("\xe2\x80\x9c","").replace("\xe2\x80\x9d","") will work, but im more worried about more such special quotes which visusally looked same as normal quotes
19:27
Reminds me of a project I did the other week:
Nov 19 at 16:02, by Kevin
My long program is done. It finds all Unicode characters that have identical appearances when printed in 12 point arial. https://pastebin.com/raw/k5iqTfUA
And the message following that shows pastebin.com/raw/a6bk8tfF, which is more human-readable. You can see that the only character 100% identical to the quote mark is chr(698), aka MODIFIER LETTER DOUBLE PRIME
BTW you should not use bytes.replace in Python 3 or str.replace in Python 2 in order to replace sequences of bytes that correspond to a unicode character. If you happen to have one unicode character that ends with \xe2, followed by a unicode character that starts with \x80\x9c, it will replace all of those, leaving two mangled halves of unicode characters in your string
On the other hand, str.replace in Python 3 and unicode.replace in Python 2 are smart enough to avoid mangling halves of characters
so even this is not correct s.replace("\xe2\x80\x9c","").replace("\xe2\x80\x9d","")
unicode_string.replace(u'“', u'"')
19:44
I'm actually not sure if there are any code points that end with \xe2 or begin with \x80\x9c, whether it be in utf8 or any of the other utfs, or more exotic encodings. So the problem may ultimately be something you never actually encounter.
Why write correct code when hacky code does trick?
But you seem keen to make your code as robust as possible, since you are trying to anticipate unusual quote characters that may or may not exist. So you may as well also anticipate unusual encodings that may or may not exist.
@Aran-Fey your idea works for me in the code.. but yes im not if sure if some more spl quotes will exist
for now im happy with the hack :p
Well, my script iterates through all of unicode, and it only found one kind of special quote. I don't think you're going to run into many more besides that one.
And from a practical standpoint, it's probably fine just to account for the special quotes that you do know about, and only add more when a user complains that their file isn't parsing properly
 
1 hour later…
20:54
Anyone here have experience debugging Phusion Passenger?
I have a server that's 504'ing and I don't know why
"It is designed to integrate into the Apache HTTP Server or the nginx web server, but also has a mode for running standalone without an external web server." ... I'm out. That sounds way too complex; I had enough with nginx on its own!
lol, nginx is up and running but Phusion is also out
@Kevin what kind of work are you interested in, and what kind of pay are you after? Have you dabbled in data science at all?
FWIW chat.stackoverflow.com/transcript/6?m=53647578#53647578 @duhaime. Even if he says "no", the answer is very much "yes" whether or not he'll acknowledge it :P
Most of my exposure to data science has been against my will
There's a great gig at Yale University that needs a strong Python + JS developer if you'd be interested. Tons of autonomy and dialogue with some tremendously gifted people. The comp would probably be ~100K though
21:06
But, ultimately, it depends on what people want to do. I've just been going through CVs of Physics grads that look super-impressive and wondering whether they know what the profession actually materialises as (at least in industry)
You mean you think they'd be bored?
I joke, but one of these days I've got to roll up my sleeves and learn some proper data science. Scrolling randomly through DataFrame's method glossary won't cut it
@duhaime Potentially interesting. Is there a job description online?
@Kevin I can already benchmark you against the market, and you have no worries there at all
Thanks to the 90/10 principle, just by virtue of me knowing that DataFrames exist, I already outperform 90% of people that you could pull in off the street
We tend to try not recruit by that method
21:11
much easier to draw them in with the scent of freshly baked cookies, then lock the door behind them
If it helps with your confidence, I just got promoted to Lead Data Scientist last week out of (IIRC) 77. Pretty sure your math knowledge is broader than mine, plus your understanding of Python internals
stackoverflow.com/questions/70428113/quadratic-equations what type of flag do i flag these types of questions as?
The biggest pain is handling customers because we have to hassle for months for data, then it's all broken, then they don't know what they want but I have to present to their board etc. etc. If there's a role going in Academia, that might be a decent slot for you
At least, not one to dismiss just because you've not used pandas much
I'm not too worried about my technical abilities. It's more my "soft skills" that I find lacking
That's why academia might be a bit easier for you because you wouldn't be on the front line of paying customers
21:19
Right
user17242583
@12944qwerty the SOCVR room is a much better place for that type of question.
@12944qwerty too broad
Sorry, "needs more focus". I still think back in the old categories
Ok that's what I put... just wanted to make sure
21:42
It looks like the job advert isn't online yet. I could put you in touch with the fellow who will be leading the search if you're interested @Kevin. It's pretty much a dream job if that level of comp isn't a deal breaker for you
It would be in Connecticut though
The compensation is reasonable, it's relocating that gives me pause
I suppose it wouln't hurt just to hear more about the job. If you could put me in touch, I'd be thankful :-)
user17242583
I just moved away from CT a few months ago :)
@Kevin apparently some people are under the impression that soft skills are easier than hard skills
Which I find an absolutely ridiculous notion
I always assumed it was because they dealt with meatware and not well-defined things like software that clearly has a "correct" and "incorrect" definition
Tricked by the name "hard skills", no doubt
"surely this is the harder of the two"
21:57
/me nods sagely in agreement

« first day (4083 days earlier)      last day (1088 days later) »