All of bismuth's Comments + Replies

Ah ok. For the record I was referring to tetraphobia.

I have some doubts about DeepCent calling their model A4.

2[comment deleted]
5Mo Putera
In my corner of the world, anyone who hears "A4" thinks of this:
4Yitz
Oh no, it should have been A1! It’s just a really dumb joke about A1 sauce lol

Looks like there are two different problems here:

  • How to use process substitution in Python
  • How to write pipelines in a more compact way like in the shell

For the first one, I would rewrite your shell code as follows:

from subprocess import Popen, PIPE
dl1 = Popen(["aws", "s3", "cp", path1, "-"], stdout=PIPE)
gunzip1 = Popen(["gunzip"], stdin=dl1.stdout, stdout=PIPE)
gunzip1_fd = gunzip1.stdout.fileno()
dl2 = Popen(["aws", "s3", "cp", path2, "-"], stdout=PIPE)
gunzip2 = Popen(["gunzip"], stdin=dl2.stdout, stdout=PIPE)
gunzip2_fd = gunzip2.stdout.fileno()
cmd =
... (read more)