« first day (3837 days earlier)      last day (1102 days later) » 

12:18 AM
@roganjosh - I have a theme for my profile pics.
Even though my last pic was theme-compliant, I wasn't really happy with it. So I dredged up an old one ("old" on several levels).
 
12:56 AM
looks like an old movie poster to me :D, is it though?
ahh, Forbidden Planet (thanks google transalte)
 
Yes, all my profile pics are robots of some vintage, mostly from movies (Robby, Gort, Kronos) but some in reality (Robohon, Spot).
 
so the previous one was Robohon, I always assumed it was your own creation
 
I got to see an ASIMO demo on a visit to Tokyo once, at the National Museum of Emerging Science and Innovation - the hall was packed with onlookers. The more recent Boston Dynamics videos are amazing/frightening.
I had Spot as my icon on Slack, and was going to change it here, but it creeps me out.
 
you have given me a nice search tag to spend my Sunday on YouTube today
Robohon is kinda cute, spot just looks like something I have seen but idk what it is
 
1:18 AM
Spot is the new utility robot from Boston Dynamics. It is a basic platform with wide mobility (stairs, uneven terrain, etc.), that can take a number of add-ons and extensions (arms, grippers, sensor/actuators, cameras) for specific industrial or commercial applications. I just saw a video of one in blue that was in use in a police station.
 
anyone here familiar with sympy?
I want to map a function to the greek symbol psi
`psi = Function('\psi')`
but the above doesnt work
 
Not familiar with sympy, but I have used Unicode identifiers in this way in just plain old python. It may just be your "\psi" notation. If sympy accepts a LaTeX-type symbol, maybe you can just do psi = Function(r"\psi"). The 'r' tells Python to leave the backslash as-is, and not use it as an escape for the next character. Often used in regular expressions, but I could see it useful with LaTeX markup.
 
>>> import sympy as sym
>>> psi = sym.symbols('psi')
>>> psi
psi
>>> sym.pprint(psi)
ψ
@PaulMcG technically the r is necessary but it won't matter in practice because \p is not a valid string escape
>>> '\p'
'\\p'
the corresponding deprecation process was postponed/rolled back after 3.6
but it would matter for something like r'\nu'
 
@AndrasDeak thanks
 
the sympy docs page is kinda cool, didnt know it lets you do live example with a repl on the docs
but this "Python console for SymPy 1.5.1 (Python 2.7.12)"
 
1:26 AM
def ψ(n):
    return n*1000

print(ψ(5))
 
@AndrasDeak: I think I might be x-ying...and I've been told before that you know a thing or two about quantum mechanics, so maybe before going to far I should state I'm trying to get schrodingers equation into sympy... (I'm trying to sanity check my maths, like I was doing a few weeks ago last time we spoke)
@python_user you can't have everything it seams
 
they even have an older version of sympy on it, so I am guessing its just for those who want to know how sympy looks, advanced users pretty sure have their own env
 
@AndrewMicallef I didn't know I was infamous :P
 
Well someone in the mathematics room knows you
:P
 
must be heather
 
1:31 AM
(I would have to dig through the transcript to pin them down)
do you have a moment to talk about wavefunctions? (I recognise it is a bit off topic here though?)
 
It's very off-topic, and I'm about to go to bed. You're welcome to start a new room and we can discuss there when I'll have the time (probably tomorrow)
 
@AndrasDeak I appreciate it
 
OK, I see you've got it
 
 
1 hour later…
2:48 AM
reddit.com/r/learnpython/comments/ms46zz/… reddit never ceases to amaze me, OP tells they are proficient but has only recently learnt itertools the whole ML DL people just skip stdlib I guess
 
 
5 hours later…
8:03 AM
I often find myself constantly repackaging exceptions, and most often in retrospect. Not because the exceptions are "bad" but to at the top level better a better exception handling interface for the end user, apart from a generic string a more clear description: also on "how and why it probably happened", "and I think you should do xyz first".
 
8:31 AM
@PaulMcG they can be cute too
 
Are there any methods that are implicitly converted to staticmethods/classmethods other than __new__, __init_subclass__ and __class_getitem__?
 
 
4 hours later…
12:12 PM
Wow... such silence...
 
*breaks silence
Hello!
 
Heyoo
Good to see someone when your console is ridden with error messages. LOL
 
I've just watched A Star is Born. I was pleasantly surprised that it wasn't totally awful and cheesy as I expected :)
 
Movie right? Whassit about?
 
It's Lady Gaga becoming a pop star (though not as Lady Gaga). She's actually a pretty good actress
 
12:25 PM
Ooh ok ok.
 
 
2 hours later…
user13727121
2:40 PM
I'm wondering is there a way to use append multiple list of strings without using append() multiple times. Code: dpaste.com/3D3DTUV8Y
 
Kinda?
for sales_detail in transaction_details:
    for list_, value in zip((customers, sales, thread_sold), sales_detail):
        list_.append(value)
 
3:00 PM
I'm only just realizing how gross the hack of adding a __new__ method to a class really is. It's literally impossible to implement it correctly
You have to decide whether or not you should forward the arguments to super().__new__, and that logic is... well, the best you can do is make an educated guess
 
user13727121
@Aran-Fey Tryna understand this solution, works wonder. So these two variables list_, and value, the given number of the mentioned variables is set that way to match the number of values given in zip(), right?
 
user13727121
I tried to use customers, sales, thread_sold = map(list, zip(*transaction_details)) but because of the specific number of values I want, obviously it didn't work
 
if the problem is that your lists have 4 elements you could do customers, sales, thread_sold, *rest = ...
 
I don't really understand the question (The number of what matches the number of what?), but the zip essentially associates a list with each value in sales_detail. It yields (customers, 'Edith Mcbride'), (sales, '$1.21'), etc
If you want a one-liner, use customers, sales, thread_sold, _ = zip(*transaction_details)
Although that'll return tuples, not lists
 
recbg
 
3:17 PM
Hi!
 
user13727121
@Aran-Fey As in, list_ points to the tuples of values (customers, sales, thread_sold) and value points to values in sales_detail. I kept thinking there were 4 values inside the zip() function when there's only 2, sorry about that D:
 
Bye!
 
user13727121
The one-liner also works, but I dislike that extra variable even though it's there as a placeholder for the last value in transaction_details
 
3:47 PM
What are you trying to achieve? Are you thinking that's a lot of overhead?
 
 
2 hours later…
6:04 PM
Hi python guyz!

I am looking for a shortcut to move the cursor to the beginning of next line with VS Code. Is there such a shortcut? Please kindly ping me if you answer this question. THank you !
 
 
2 hours later…
7:55 PM
50 lines of comments and 100 lines of docstring later, my function that can add a __new__ method to a class is finally complete
 
I hope there's no __anew__
 
Fortunately python hasn't sunk so low... yet
I need to read up on why this "object.__new__ accepts arguments as long as your class doesn't implement its own __new__" behavior is even a thing
 
 
4 hours later…
11:33 PM
SO trying to follow up on their promise to tackle outdated content meta.stackoverflow.com/questions/406675/…
 

« first day (3837 days earlier)      last day (1102 days later) »