create_template(temp_name, var_list) - this function generates a csv file that contains desired list of variables to be extracted from csv data files in folder "data". temp_name argument should be replaced by the template file name (e.g. "all.csv") when calling the function. var_list needs to be replaced by a list of strings containing the names of all variables we need (e.g. ["q1","q2","q4"]). Syntax below:
събота, 28 март 2020 г.
[SnakeData] {create_template( ), run_script( ), cd( )}
The functions in the article title are with relatively short syntax and that's why I decided to write a single article for all three of them instead of having one small article per function. So, let's begin!
Етикети:
bash,
cd(),
create_template(),
functions,
Python 3,
run_script(),
SnakeData
четвъртък, 12 март 2020 г.
A pinch of bash
The word "bash" may sound funnny in some languages (and especially in Bulgarian it is quite often used in the meaning of "exactly") but in the computer world it stands for "Bourne again shell". This is in fact the scripting language that contains all commands used in a Linux shell. Each command can be written separately in the console or multiple/a lot of commands can be collected in
one file which can be executed when needed, this is providing huuuuuuge potential for automating wide variety of tasks. As mentioned in this article I use bash scripting to automate my work in Python and now I will provide a simple example of how it works. Below is the full script I use at my FormBuilder project:
one file which can be executed when needed, this is providing huuuuuuge potential for automating wide variety of tasks. As mentioned in this article I use bash scripting to automate my work in Python and now I will provide a simple example of how it works. Below is the full script I use at my FormBuilder project:
Етикети:
Bourne again shell,
Cygwin,
process automation,
shell scripting,
terminal
Абонамент за:
Публикации (Atom)