« first day (3501 days earlier)      last day (1444 days later) » 

5:21 AM
@AndrasDeak ty
@aadibajpai try converting them to string before replacement?
 
 
2 hours later…
7:43 AM
@JoshuaVarghese yeah that's what I'm doing rn but that doesn't use any native bs4 function
 
 
1 hour later…
8:49 AM
@aadibajpai is it necessary to use bs4 functions?
@toonarmycaptain do you mean by using spliters for a single HDMI port? Use display extend option
@AaronJohnSabu malayali aano :D ?
 
9:10 AM
@JoshuaVarghese yeah :D
 
9:36 AM
What's the python equivalent of "nullable"? Noneable?
 
that's exactly my question,
> in that vein I have a question, is it better to do small stuff with regex than figuring out the relevant BeautifulSoup attributes and functions? It certainly is simpler to me but I'm not sure https://chat.stackoverflow.com/transcript/message/49395334#49395334
 
9:50 AM
@Aran-Fey Optional
 
Hmm, I don't think "optional" gets the point across as well as "nullable" does. Compare "OptionalWeakref" to "NullableWeakref"
 
That would be Optional[weakref], not OptionalWeakref
 
it's not a type annotation, it's the name of my class
 
now I'm curious. You have a Python class that can be null?
 
9:56 AM
Well, no, not as such. It's a class that behaves similar to a weakref.weakref, except it doesn't crash if you try to initialize it with None
>>> NullableWeakref(None)()
None
 
Does it accept other non-weakref builtins, like str, as well?
or was that list? the restrictions on weakref always get me by surprise... :/
 
no, only None
 
no idea then. But you're right that it's separate from being optional.
If you can support the other builtins, just call it "TheRealWeakref™".
 
guess I'll stick with nullable
 
 
1 hour later…
11:11 AM
@Aran-Fey did you mean weakref.ref?
Heh, I tried creating weak refs...to an int. Then a list. Then a tuple. Then a dict...
> Several built-in types such as list and dict do not directly support weak references but can add support through subclassing [...]

CPython implementation detail: Other built-in types such as tuple and int do not support weak references even when subclassed.
is this not terrible?
 
oh, yeah, that's what I meant
it is kind of terrible, but that terribleness is offset by the fact that hardly anybody uses weakrefs anyway
 
Is the reason for that ^ is that builtins don't want to have the room to keep track of weakrefs?
 
probably, yeah
 
Ah, yes
>>> class Slotty:
...     __slots__ = ['potato']
...
...     def __init__(self, potat=42):
...         self.potato = potat
...

>>> weakref.ref(Slotty())
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-221-0a4b3d024ccc> in <module>
----> 1 weakref.ref(Slotty())

TypeError: cannot create weak reference to 'Slotty' object
 
You can probably explicitly create the __weakref__ slot though, if you really need an int/tuple that supports it
 
11:20 AM
good point
TypeError: nonempty __slots__ not supported for subtype of 'int'
that's a new one
probably explains the CPython note
I guess if you could make it work with __slots__ then you could make it work even easier with __dict__
 
I bet the people who've seen that error message can be counted on one hand
...well, could be until you posted it here
 
Oh no what have I done?!
 
You ruined everything smh
 
 
1 hour later…
12:32 PM
 
ugh
 
1:07 PM
@JoshuaVarghese Yes. I'm looking at getting a splitter. I was hoping someone could point me in the right direction. A lot of them don't seem to promise extension as opposed to duplication, for less than $60USD.
 
I can't seem to find a duplicate for: stackoverflow.com/questions/61852242/…. Surely this(or something close) has been asked before.
I'm pretty bad at finding duplicates though...
 
RTFM dupes are hard
 
1:24 PM
Someone needs to comment "Fun fact: The fun fact above is incorrect"
 
1:47 PM
@Aran-Fey conceptually it's not a terrible way to think of the data model though...
 
true
 
The underlying data structure is in the CPython source code.
In any case a comment like that will only confuse newbies
 
2:16 PM
@toonarmycaptain um.. Im from India , so i cant tell you what might be available in your country, but i've done that
but thats not a good idea i guess
maybe only 1 port is available for you in your streaming device?
did you try any splitters?
 
 
2 hours later…
4:10 PM
Anyone on?
I need a help in regex
 
nope
 
Are you writing an answer again?
 
nope xd
i was trying an solution to remove duplicates
like this is the solution
re.sub(r'(.)(.*)\1', r'\1', 'aaaaabbbbbb[[[[[c')
that works fine
 
4:12 PM
but when it comes to re.sub(r'(.)(.*)\1+', r'\1', 'aaaaabbbbbb[[[[[cccaaa'), every thing turns upside down :(
lol i already added an answer
i dont understand what happens when "a" comes two times with repetition
the output for:
re.sub(r'(.)(.*)\1+', r'\1', 'aaaaabbbbbb[[[[[cccaaa')
is:
'a'
 
(.)(.*)\1+ is really weird. Why is that second group there?
your pattern means "1 character then any number of any character and finally one or more of the first character"
 
um...is it wrong having the .* in a group?
 
If you remove the second group you basically get a more general version of the accepted answer. It's not "simpler", it does someting else.
@JoshuaVarghese no
 
oh so the .* is causing the problem!
 
If the input is "aba", do you want the output to be "ab" or "ba"?
 
4:25 PM
aba
 
I thought you want to remove duplicates?
 
@Aran-Fey see the answer I linked, "remove consecutive duplicates"
question's ambiguous of course
 
yep! consecutive ones
 
Oh, I see. Then just drop the .*, yeah
 
4:30 PM
The question asks for "of particular characters", so the character class in the accepted answer is correct and generalizable. Your (.) will remove duplicates of anything.
 
except newlines!
I swear 90% of regexes are subtly incorrect because of that
And the remaining 10% are wrong because they use $ instead of \Z
 
true
 
okay
also, can lambda be recursive? (lmao not to answer a question)
 
@JoshuaVarghese try and see?
It typically shouldn't, because named lambdas are generally considered an anti-pattern
 
how do i? like ma = lambda x: ma(blah) ?
 
4:36 PM
Try and see?
try implementing a factorial with it
 
lemme try xd , gimme an hour or so
 
Take your time, I have more than an hour's work to do anyway
you should first implement it with a full function, then transplant it into a lambda
 
school or high school?
 
@JoshuaVarghese yup
 
okay :D
 
4:38 PM
university, actually
 
lol thats entirely different from schools
yee
fact = lambda x : x*fact(x-1) if x>1 else x
thats it?
 
@Aran-Fey done.
 
đź‘Ť
 
@JoshuaVarghese yes. it's a common pattern for recursive default dicts.
 
default dicts? wdym?
 
4:47 PM
@JoshuaVarghese My laptop only has one out, and I'd like to use two external monitors instead of one, that's all. I don't have any splitters...yet.
 
@JoshuaVarghese you tell me. Does it compute fact(999) correctly?
 
see this answer for a recursive defaultdict using lambda
 
@AndrasDeak idk if the answer is correct! i can't compute it manually :(
 
should i use math.fact() to check if its correct????
 
5:08 PM
@wim that is an awfully unspecific question
 
@JoshuaVarghese Note that zero factorial is 1, not zero.
 
Hey, can anyone tell me if there is a change in working of threads in Python 3.6 and 3.8? I have some examples that are running with IDLE but not on command line.
 
can you be a tad more specific? what do you mean by "not working"?
 
When I double click a file containing threads, it just pops up and gets closed, same on command line.
I am using windows 10 and python 3.8.0
 
Please open it in a way that actually shows errors. A script closing can have many reasons.
 
5:19 PM
I tried to catch errors using try blocks but no errors were raises!!
 
@PM2Ring i tried but cant just solve fact(0) :(
 
@Abhijeet.py So did your code do what you expect in Python 3.6, both in IDLE and on the commend-line?
 
Yes
 
@JoshuaVarghese fact = lambda x : x*fact(x-1) if x>1 else 1
 
@MisterMiyagi Have you got any reason
 
5:24 PM
It will return 1 for negative x too, but hopefully that's not an issue.
 
wim
lambdas are supposed to be anonymous, why are you trying to do recursion with a lambda instead of a def
 
50 mins ago, by Andras Deak
It typically shouldn't, because named lambdas are generally considered an anti-pattern
 
@PM2Ring I have surfed through the net a lot and find something like threading.excepthook() which is new.
 
@Abhijeet.py run it from the command line and show us the output
 
5:27 PM
@Abhijeet.py yes, lots, but I see not point to list them all if you can just check the reason for your code.
What does your code do? Why do you suspect threads to be the issue?
 
Here is one of the simple codes.
Its a bit distorted.
 
i was asking whether recursion was possible with lambda when andras asked me to do a factorial with lambda :D
 
@Abhijeet.py Additions to a standard module should not break existing code. A few things had to get broken in the transition from Python 2 to 3, but that was unavoidable. And sometimes features get deprecated, but the interpreter warns you well in advance.
 
@Abhijeet.py please have a look at the code formatting guide. Feel free to practice in the sandbox for a bit.
note that you can use traceback.print_exc to print a proper traceback from a catch-all exception handler (except:) without having the exception abort your program.
 
:49399574 What Mr Miyagi said. That code is very difficult to read without proper indentation, but it has a few bad or strange things, like defining a function inside a try:.
 
5:38 PM
except: # any error
    import traceback
    traceback.print_exc()
    input("I'm just blocking until input to avoid the window closing with all the nice traceback information being lost, which would be kinda bad, dontcha agree?")
 
Just give me one example - say executing a for loop from a thread other than main to print 10 integers on screen. I will try it and find problems with me.
 
the example you've posted worked flawlessy.
 
!!
Sorry, but I am not lying. I am using windows 10 and python 3.8.0
 
I'm not saying you are lying, I'm saying the example worked flawlessly for me.
Does your example work without threading for you?
def func():
    for i in range(10):
        print(i)
        time.sleep(0.1)
func()
 
Yes, Sir!!
Very well.
 
5:51 PM
How about this?
import concurrent.futures
import time

def func():
    for i in range(10):
        print(i)
        time.sleep(0.1)

with concurrent.futures.ThreadPoolExecutor() as tpe:
    tpe.submit(func)
 
When I ran my code on IDLE, the result was something like this -
1
>>> 2
3
4
.
 
please don't run it in IDLE, run it the same way you ran your failing script
 
Ok!
 
for filename in os.listdir(r"C:\Users\DELL\PycharmProjects\RajaClassTest\venv\Include\Train"):
im_1 = Image.open(r"C:\Users\DELL\PycharmProjects\RajaClassTest\venv\Include\Train\""+filename+".pgm")
ar = array(im_1)

im trying to store mulitple images in my array but i get errors when i run the code
 
5:59 PM
*door bell jingles*
[Abhijeet enters Room6 auto repair shop]
Abhijeet: "Hi, my car won't start. Can you take a look?"
Room6: "Sure thing. Does the check engine light come on when you try to start the car?"
Abhijeet: "Here's a blurry photo of my car"
[Alan Turing appears and chucks the photo in the bin]
Room6: "That's too blurry, sorry. How about that check engine light?"
Abhijeet: "Hmm, can you guys lend me a car? I wanna see if that one starts"
[MisterMiyagi takes Abhijeet on a tour of the shop's parking lot while the other employees exchange silent glances]
7
 
@MisterMiyagi The recent is running properly
 
@Aran-Fey I'm sure it's the rear view mirror.
 
lol
the story is marvelous lol
 
I tried this too
clasa Theatre:
def __init__(self, str):
    self.str = str
def movieshow(self):
 
@Abhijeet.py That's a syntax error. Show us code you really tried.
 
6:09 PM
    for i in range(1,6):
How can I send image here?
 
@KhwajaHussamQuasmi Sorry, you do need to follow Andras's advice and learn some basic Python first. Otherwise, we cannot help you here.
 
Ok, this will be my final example -
from threading import *
from time import *
class Theatre:
 
@PM2Ring im following his advice and reading the documentations but i have to complete this assignment please do help
 
def __init__(self, str):
def movieshow(self):
for i in range(1,6):
 
@Abhijeet.py Why do you want to send an image. We want to see your code, preferably a MCVE, in text form. Images of text are mostly useless, because we can't paste them into our editors & run them.
 
6:13 PM
    print(self.str, ":", i)
    sleep(0.1)
 
@Abhijeet.py okay - please stop
 
obj1 = Theatre('Cut ticket')
obj2 = Theatre('Show chair')
 
look at how you can post code here please
 
t1 = Thread(target = obj1.movieshow)
t2 = Thread(target = obj.movieshow)
t1.start()
input() #waiting for the user to press some key
That's my complete example
I promise to leave after that.
 
from PIL import Image
from numpy import array
import os

for filename in os.listdir(r"C:\Users\DELL\PycharmProjects\RajaClassTest\venv\Include\Train"):
ar = array.array(Image.open(r"C:\Users\DELL\PycharmProjects\RajaClassTest\venv\Include\Train\""+filename))

print(ar)

can anyone tell me the error in this code im trying to make a 3d numpy array of 5 images
 
6:17 PM
lol
 
Ok! I apologize that I disturbed you all not knowing how to post codes. Actually, I am new to StackOverflow and this chat, so I was unable to express myself. But, no more, bye...
 
@KhwajaHussamQuasmi You are trying to create a face recognition system in Python, right? But you don't know Numpy or core Python, so basic stuff like building a 3D Numpy array from 5 2D arrays is a stumbling block. You will encounter other blocks. You can't expect the people here to spoon-feed you the solutions to all of the problems you run into.
But if you want to post code at least learn how to post it so it's properly formatted. sopython.com/wiki/…
 
@PM2Ring okay ill properly format and post again. im trying my best here but im in a pickle and short on time so thats why im look for help
from PIL import Image
from numpy import array
import os

for filename in os.listdir(r"C:\Users\DELL\PycharmProjects\RajaClassTest\venv\Include\Train"):
ar = array.array(Image.open(r"C:\Users\DELL\PycharmProjects\RajaClassTest\venv\Include\Train\""+filename))

print(ar)

can anyone tell me the error in this code im trying to make a 3d numpy array of 5 images
 
@Abhijeet.py It can be tricky to do code formatting in chat. We get that, and that's why that Guide was created. And why you were asked to practice in the sandbox. But we really need to see actual code that demonstrates your problem, copied directly from your machine.
 
@Abhijeet.py Please just have a look at the code formatting guide. It also links to the sandbox where you can play around with formatting a bit until you get the hang of it.
 
6:31 PM
@KhwajaHussamQuasmi you need to tell us what the error is. Python will be doing that for you if there's an error. If it doesn't do what you want then you need to explain why it isn't what you want
 
@KhwajaHussamQuasmi You are looping over each filename, opening the file as an Image. The Image gets converted to a Numpy array. So far, so good. But on the next loop you replace that array with the array constructed for the next image, and the previous array is lost.
 
I don't think the program ever gets that far tbh
 
@PM2Ring thanks bro that helps alot . i think i might be able to fix it
 
Is it just me or has "bro" usage exploded in the last month?
 
@KhwajaHussamQuasmi BTW, saying that you're short on time is a bad strategy on Stack Exchange, and is likely to elicit a strong negative reaction. If you do it in a question, it's almost guaranteed that you'll get downvotes.
 
6:47 PM
@roganjosh can't say I've noticed anything of the sort
 
@Aran-Fey Maybe. That array.array syntax looks dubious. But with the more usual import numpy as np then ar = np.array(image) should work (where image is a PIL Image).
 
@Aran-Fey I've seen it quite a lot on the main feed, in addition to comments to me. But you avoid such a place :)
 
@roganjosh I don't think usage of "bro" has increased recently, but it does get used a fair bit by the younger members in the Physics chat. I generally try to ignore it. ;)
 
oh, you meant specifically on SO, I see
 
"If you don't know me, don't 'bro' me."
And people who do know me would never 'bro' me. :)
 
6:52 PM
See, I feel exactly the same, but I just say "mate" instinctively at times. I guess that would rub people up the wrong way at times
 
"Mate" is less likely to cause an unintended bad reaction than the rhyming slang version, though.
 
Rhyming slang is down south in ... that... city :P
 
@PM2Ring now im getting this error when i changed to "as np" i made changings in the code ImportError: cannot import name 'np' from 'numpy'
 
@KhwajaHussamQuasmi import numpy as np. I'm not sure it could give that error, even if you'd done something really unusual
 
@roganjosh We also use it a bit here in Oz, although I expect many kids these days aren't very familiar with it.
 
6:58 PM
@roganjosh this is what happened. im using pycharm
 
@PM2Ring interesting. Does it match up with Cockney slang or are yours separate?
@KhwajaHussamQuasmi please show the traceback as a link to a pastebin/dpaste/gist/otherwise. I don't understand how you'd get that error if you just use an alias on import
 
the error messages matches from numpy import np
 
@roganjosh umm how do i do that? anyway thats not the main issue would array.array cause a problem?
 
@KhwajaHussamQuasmi You pick a site of your fancy that allows you to post code (I listed a few), post the code there, and give us the link back
But, as MisterMiyagi has stated, that error probably comes from you doing from numpy import np instead of import numpy as np.
 
@roganjosh Yes, it's derived from Cockney, so it matches pretty closely.
 
7:23 PM
@KhwajaHussamQuasmi You may find this helpful: stackoverflow.com/a/39195332/4014959 In particular, you can do something like images = np.array([np.array(Image.open(fname)) for fname in filelist]). The code you need is a bit more complicated because you don't have a nice simple filelist
 
@PM2Ring thank you :)
 
@KhwajaHussamQuasmi that isn't the point. a) we have room rules that suggest that you should post larger code blocks off-side (which a traceback is likely to be) and b) you've been directed to formatting guides twice. If you don't feel like making your code presentable, I personally don't feel like answering it
 
@roganjosh Which city is that...asking for a Geordie friend...
 
@toonarmycaptain That city. y'know. The one that shall not be named :P
 
@roganjosh Uhuh :p
 
7:29 PM
Actually, I think recent events have stopped London being synonymous with the UK, which is a nice upside against the whole backdrop
 
@roganjosh my bad i didn't get the formatting guide right after being guided the first time which led to being guided again and i ain't forcing you to answer if you feel like helping someone way below your skillset i'd be very grateful for that or you can choose not to reply
 
@roganjosh I'm familiar with some southern rhying slang, but for me, rhyming slang tends to mean geordie slang, which from what I can tell, is more in usage than cockney, but my sample size is fairly limited.
 
@KhwajaHussamQuasmi Firstly, please don't self-depricate because we all have plenty to learn here. However, I do have some duty as a Room Owner to make sure we try and keep some quality standards in the room to be useful for all people participating. It was you that asked me a (since deleted) question about why this is important and I was just explaining a perspective on why it's important. You won't be penalised for making mistakes with formatting if it's a one-off
 
@JonClements We need to rename that canon page pandas ValueError: The truth value of an array with more than one element is ambiguous. To make it more findable and less unclear what it's about. (There are hundreds of different ways to tickle that error, not all are listed.) Who can do that?
 
@toonarmycaptain If Geordie rhyming slang is a thing, I think it's dissolved into the ether and been attributed to the southerners. I don't think I'd know any of it as distinctly Geordie :S
 
7:42 PM
@roganjosh i didn't know you felt the need to reply to deleted questions. i deleted it because i felt i was being rude when asking that question
 
@KhwajaHussamQuasmi and I felt that the fact you deleted it meant that you would just keep an annoyance bottled up, but we could just resolve it :) Shall we draw a line under this?
 
Would you understand it in the first place? :p
FWIW, you're probably right, with a huge degree of cross pollination. But I don't recall hearing southerners actually use it, in contrast to family from up there.
 
@roganjosh no annoyance here :). sure lets draw the line but hope you still guide me even if i still don't get the formatting right ;)
 
@KhwajaHussamQuasmi :) and sure, I'll help if I can!
 
Cleanup/close-voting time: 294 pandas Q&A on drop_duplicates duplicated. I skimmed through them when looking for some target to cite in Keep duplicates rows in multiple dataframes
 
7:52 PM
@roganjosh thank you bro. i'm really grateful
 
@KhwajaHussamQuasmi What I said here still applies. You are welcome to ask for help here, but we expect you to have a basic foundation of Python knowledge.
 
@toonarmycaptain I think I would understand it, but we don't use it in Manchester. We might say "Ruby Murray" for a curry but it'd be in the context of a joke
 
@smci Does that mean that you couldn't find an adequate dupe target among those 294? And that's why you wrote a new answer?
 
@PM2Ring i understand i'll do my best to improve my knowledge
 
8:08 PM
@roganjosh wym bro
 
@AndrasDeak bro, I've since been vindicated
 
did it hurt?
 
Just a pinch
 
@KhwajaHussamQuasmi Thanks.
 
8:36 PM
@PM2Ring It means I couldn't find a quality dupe when skimming those 294 Q&A. Note that this OP wanted to keep both the uniques and duplicates in different dataframes, which is not a question I'd seen asked. As to the 294 Q&A, some are low-quality, some are data-or context-specific or package-specific (e.g. geopandas), some add additional requirements e.g. consecutive duplicates, or duplicates with datetimes, or across multiple dfs, or actions involving the other cols in rows containing dups.
...so the points is some handful of that 294 Q&A is valuable, others aren't, and I looked at it for ~15 mins and I couldn't see any simple cleanups or close-as-dupes. Also, none of that is covered by the SO canon. What do you make of all those?
^^ oh and as always with pandas, some may well involve version-specific behavior/ limitations/ bugs with the last 10 years of pandas, since they're dated between 2013-2020. And of course the tagging and some of question statements may require brushing up a little.
Whoever VtC on that is wrong, the statement is ok, I already edited it. Allow that the OP doesn't know the term 'keep duplicates' or 'separate uniques from duplicates'. How else would we expect them to phrase it? (leave a comment there if have better suggestion)
 
Why have you taken your stand on this particular question?
 
@roganjosh I don't understand what you mean. What 'stand'? Why it matters? Why it doesn't readily appear to be a dupe? Why it shouldn't be closed as unclear? But I just wrote enough explanation above to address all of that, please read through it first.
 
Is this really the best of the bunch? You've answered it to be canon and now say that the VTC was wrong (it's not me btw). Is this really the best specimen?
 
@roganjosh No I was very careful never to say it was canon. Please reread more carefully what I wrote. I said I can't reaily find a dupe after skimming the others (which is why they need cleanup). Whether it is or isn't a dupe and whether it should or shouldn't be canon, are things that could only be decided after the cleanup I mentioned. Which is a bit of work and might not happen. At minimum however, we need some canonical on the various flavors of pandas duplicates, we currently don't.
If you misunderstood, I only said "Cleanup/close-voting time on the 294 Q&A". I never said they were all duplicate, or needed to be closed. I didn't suggest a target. I did say they're a bit of a mess and require rereading. Just deciding which alone are historical version-specific pandas issues that are fixed/no longer relevant would be a minitask in itself.
 
8:53 PM
I do read your messages carefully. However, it would be totally viable for me to just VTC that question and your answer will sit in its capacity for that particular question
You're now saying that the VTC was "wrong" (your words)
So I'm happy to try help establish a dupe for this. I just don't know what you're suggesting
 
@roganjosh It's not reasonable to VtC as unclear, which is what someone did already after I posted it here; I had already reviewed the wording and edited it, and also see what I said above about expected wording. It might be reasonable to VTC as a dupe, if anyone were to be able to find a decent-quality dupe (I can't and noone else has, and I doubt anyone else can, until the cleanup I mentioned were to happen)....
...Until then, VtC as unclear is not constructive. Either identify a good-quality dupe, if one exists, or leave it alone.
 
@smci ok, that makes sense. Are we gonna agree that your answer, placed on this particlar question isn't going to be the target?
I feel we should pick the generic target and answer any holes to answers on that
 
@roganjosh What?! You're misreading the intent of everything I wrote. I never said my answer to that particular question should be a target, and I never said it shouldn't, either - I said it's impossible to begin to decide that until some of the 294 are cleaned up/closed. That's why my post specifically started with 'Cleanup...' I'm not able to easily do the cleanup after quickly looking through those 294. That's all.
 
So what are you proposing for those 294 questions?
 
9:11 PM
@roganjosh I've just documented in detail what I'm proposing. The subset of us that have opinions on which are good targets and which are dupes among those 294, can collaboratively cleanup. Like for starters, what are the top-5 good distinct questions among them? (and are those 5 still fresh and relevant as of pandas 1.0.x)
(@cs95 is still on hiatus from python I take it)
Here also is cs95's pandas canonicals, some of which are about pandas duplicated
 
"If you misunderstood, I only said "Cleanup/close-voting time on the 294 Q&A". I never said they were all duplicate, or needed to be closed. I didn't suggest a target. I did say they're a bit of a mess and require rereading."
That is not an action other than re-reading.
 
@roganjosh "Cleanup time on the 294 Q&A" most certainly is an action. Identify which are dupes is an action. Identify the targets for those dupes is an action. Collectively deciding which deserve to be in the canon would be an action. Identifying the top-5 good ones would be an action. (Picking which from cs95's list might deserve to be added is an action) etc.
 
@smci I don't think cs95 will be adding many canonicals these days as they're tied up with Google work :/
 
@roganjosh Ok I didn't know that update
 
@smci but, I will look through the list tomorrow and see if I can find a common base because I agree that it looks disparate
 
9:22 PM
@roganjosh Ok that would be great.
 
@smci I just know they're busy. Maybe they'll have a burst of energy for SO :P
 
9:36 PM
Does Python have a library for manipulating filenames and paths? Kind of like what furl does for URLs, but for files.
 
@NickAlexeev I don't know furl, but are you aware of pathlib?
 
@AndrasDeak No, I wasn't aware of it.
 
Then that might be part of the solution :) Paths definitely. Not so sure about filenames.
 
9:54 PM
is there anyway to count no. of 2d arrays in a 3d array? i searched but couldn't come up with anything
 
@KhwajaHussamQuasmi that question might mean anything. I'll give you the simplest interpretation: arr.shape[0].
 
@AndrasDeak thanks bro :)
 
10:29 PM
@AndrasDeak I wonder if os.path can also do the job...
 
Probably, but I'm told pathlib does most things better. There was something that was missing...maybe glob? But I never use either.
 
I really wish there was a Path.with_stem method
 
Path could be even more useful if stem and suffix were writable properties.
 
well, paths being immutable has its advantages
 
Sets?
 
10:44 PM
yeah, being hashable
 
@Aran-Fey I get the benefits of immutable paths. I get the benefits of mutable [and also usually short-lived] builder classes too.
 
What are the benefits of builder classes?
 
@AndrasDeak Surely arr.shape[2] rather than [0]. Also, @Khwaja see what does numpy ndarray shape do? [edited]
 
@smci no, the whole scipy stack uses the first axis as a "batch" axis, in keeping with row-major memory layout
 
@AndrasDeak With numpy, I've seen graphics users and scientific users use different conventions on 3D and 4D arrays.
 
10:54 PM
I've also seen a lot of bad code
 
wim
11:24 PM
@AndrasDeak glob is there bro. os.walk is missing
 
thanks bro
 
wim
the serial dv script is forever a mystery. first group of 5 did not get reversed at all. second group of 5 it reversed 4 of them. third group, of 3 this time, it reversed all of them.
 

« first day (3501 days earlier)      last day (1444 days later) »