Categories
Mastering Development

Writing a text file into an array on Forth?

I have a text file, containing an array of numbers such as: 1 0 0 1 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 0 0 0 1 0 0 I have opened the text file with the following code: variable file-id : open_file ( — ) \ […]

Categories
Linux Mastering Development

dividing specific colunm numbers using shell script

I have a text file, like this # MarkerIndex # TiltAngle (degrees) # PositionX (px) # PositionY (px) # 0 -62.450 1526.64 1205.00 0 -60.460 1507.84 1205.36 8 15.890 1535.96 2281.44 8 17.890 1538.96 2281.40 8 19.890 1542.60 2282.08 8 21.900 1545.96 2282.32 8 23.900 1550.64 2282.40 8 25.900 1554.52 2281.68 8 28.000 1559.36 2281.88 […]

Categories
Linux Mastering Development

dividing specific colunm numbers using shell script

I have a text file, like this 8 15.890 1535.96 2281.44 8 17.890 1538.96 2281.40 8 19.890 1542.60 2282.08 8 21.900 1545.96 2282.32 8 23.900 1550.64 2282.40 8 25.900 1554.52 2281.68 8 28.000 1559.36 2281.88 8 30.090 1563.56 2281.32 8 32.190 1568.64 2280.80 8 34.280 1573.12 2280.56 I want to keep the first two column […]

Categories
Development

Pandas: How to include double-quote marks when using read_csv?

I have a text file, example1.txt, with a list of search terms, some of which include double quotes. E.g. Apple cider “Bananas foster” v.2 Cherry comp* “Pineapple” short- “Peach” pie However, pd.read_csv(‘example1.txt’, header=None, sep=’\n’, skipinitialspace=True, quoting=1), strips out the quote marks (which I’d like to be included): Apple cider Bananas foster v.2 Cherry comp* Pineapple […]

Categories
Development

Split data in R

Could anyone please help me to solve a problem, I have a text file, in text file I have below kind off data, and I want to split it to form a dataframe. Xxxx xxxx xxxx xxxx x [2 XXXX $123.45 10.1000 $10.20 First split has to be from [2 and there after SPACES. Note:- […]

Categories
Development

C reading text file and put content into structure

So, i have a text file, with content like this, seperated by space: int int int char int char int char,example: 1 10 1 A 2 B 3 C that means the delivery id is 1,the day of the month is 10, I have 1 A that worth 10$/piece, so thats 10$total, I have 2 […]