Category "pipe"

Python multiprocessing, parent process hangs at recv after child process raises exception before send

Python is definitely one of the worst languages for parallel processing. Just finna get the parent process to throw an error when the child process fails. Inste

How to make a pipe conditional within the same line

textfolding="ON" echo "some text blah balh test foo" if [[ "$textfolding" == "ON" ]]; then | fold -s -w "$fold_width" | sed -e "s|^|\t|g"; fi The above code w

redis-cli --pipe yields MOVED errors when bulk uploading to Elasticache with cluster-mode enabled

I am trying to use redis-cli --pipe to bulk upload some commands to my AWS Elasticache for redis cluster. The commands come from parsing a file via a custom awk

Extending Angular DatePipe errors in Angular 11, worked in Angular 10

Originally, I had a simple extension to the DatePipe to transform a date value from our standard (YYYYMMDD format) so that the DatePipe in Angular could then us

MacOS swift: having trouble in obtaining output data from Pipe()

I am trying to run command lines to take screenshots in my Xcode project and using Pipe() to log output data. When I build and run this project in Xcode, I can

Why use devnull with subprocess.check_output in python2?

I have inherited a complicated (to me) toolbox from a PhD student before me and it uses python2 instead of 3 since it's older. The main file is in python2 and u

BASH: Filter list of files by return value of another command

I have series of directories with (mostly) video files in them, say test1 1.mpg 2.avi 3.mpeg junk.sh test2 123.avi 432.avi 432.srt test3 asdf.m

How can I effectively use boost::process::async_pipe for both writing and reading?

I've already seen the boost::process tutorial... but there the example is a single write then a single read from the child process. I want to know if it is poss

Trying to extract data from repeated univariate logistic regressions on an imputed dataset

I have a variable list var_list which contains the names of variables to test in the univariate regression. I have an multiple imputed dataset which contains th

Native pipe with purrr::map_dfr()

I'd like to use the new native pipe,|>, with purrr::map_dfr(). (To make it reproducible, I'm passing the datasets as strings instead of paths, but that shou

PIPE Connection to jenkins timing out

Any help sooner would be greatly appreciated I am using PIPE to connect to Jenkins pipeline from BB and using the below code in my BB.yml - step: &functiona

What are the differences between R's new native pipe `|>` and the magrittr pipe `%>%`?

In R 4.1 a native pipe operator was introduced that is "more streamlined" than previous implementations. I already noticed one difference between the native |&g

multiprocessing.Queue fails intermittently. Bug in Python?

Python's multiprocessing.Queuefails intermittently, and I don't know why. Is this a bug in Python or my script? Minimal failing script import multiprocessing

Only one type of list may be specified?

So I have a bash script which is below, and whenever I try to execute it, it says only one type of list may be specified, any clue as to whats wrong with this c

python subprocess can’t print last line with PIPE

p =Popen('cmd.exe',shell=True,stdin=PIPE,stdout=PIPE,bufsize=0) def run(): global p while True: line = p.stdout.read(1) if not line: #

posix_spawn and non-standard pipe setup for ipc between parent and child process

The file actions of posix_spawn describe the setup code for the child process before it might run execve (which deletes stack etc). The intended use case is to

How to get information from a while loop after a pipe in bash

From this trivial example: $ x="ls output: " $ ls | while read line; do x="$x $line"; echo $x; done ls output: a ls output: a b ls output: a b c ls output: a b

How to display the currency symbol to the right in Angular

I have to display Euro currency like this : 583 €. But with this code: {{ price | currency:'EUR':true }} I get €583, is there any option in Angula

IPython - pipe multiple subprocesses and show result of final one to stdout

There are a lot of questions related to this one but none seems to work for my case: 1-https://stackoverflow.com/questions/9655841/python-subprocess-how-to-use-

How to detect and remove indentation of a piped text

I'm looking for a way to remove the indentation of a piped text. Below is a solution using cut -c 9- which assumes the indentation is 8 character wide. I'm loo