Can everyone (Microsoft, LibreOffice, Euro-Office, Apple) just come together and use one standard format?
I appreciate that everyone is turning around and saying, "but our format is better! Use our format!" but it just seems a bit pointless.
I just want to read and edit a document, for goodness sake...part of the reason I try and avoid the documents that people share is because it's too much of a headache. I don't care if you use Windows, Mac or Linux, but if I can't read the damned thing because of your preference I'm going to reply saying, "I can't open that and I'm not buying a new computer to read a 2 page document."
I noticed this was already happening within my organization; my teams location will change between remote and on-site without me having to do anything. Is it possible this is live already for select customers?
While LibreOffice is not pleased to see a new competitor, they are absolutely correct in stating that Euro-Office using a MS file standard as a default is not being truly "European." Using a MS standard just means Euro-Office is just a "bastardized MS Office Suite." (Wasn't a major purpose of Euro-Office was to get away from being captive and enslaved to MS's Office Suite??)
Question
tarifa
dear Fellow Coder on Neowin
im using bash to pipe the gathered data through an Rscript like so:
cat random.csv | Rscript test.R arg >| delete.csvMy aim is to use the R package readr to both read stdin and write stdout. what is aimed: I found the answer to stdin here.
test.R #!/usr/bin/Rscript suppressMessages(library(readr)) args <- commandArgs(trailingOnly = TRUE) df.in <- read_csv(file("stdin")) write_csv(df.in, path = stdout())My investigations gave back the foolowing:
There is a format_csv function for that in readr. Use this instead of write_csv:
cat(format_csv(df.in))we also can use write.table:
write.table(x, file = "foo.csv", sep = ",", col.names = NA, qmethod = "double")i found the following interesting help page: https://stat.ethz.ch/R-manual/R-devel/library/utils/html/write.table.html
import requests from bs4 import BeautifulSoup import pandas as pd def Main(urls): with requests.Session() as req: allin = [] for url in urls: r = req.get(url) soup = BeautifulSoup(r.content, 'html.parser') target = soup.find( "dl", class_="c-description-list c-description-list--striped") names = [item.text for item in target.findAll("dt")] names.append("url") data = [item.get_text(strip=True) for item in target.findAll("dd")] data.append(url) allin.append(data) df = pd.DataFrame(allin, columns=names) df.to_csv("data.csv", index=False, encoding="utf-8") urls = ['https://www2.daad.de/deutschland/studienangebote/international-programmes/en/detail/4722/', 'https://www2.daad.de/deutschland/studienangebote/international-programmes/en/detail/6318/'] Main(urls)the question is. i want to write the results of the parser script to stdout . - i do not want to write it into the data-file.
Link to comment
https://www.neowin.net/forum/topic/1393718-write-stdout-using-write_csv%C2%A0/Share on other sites
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now