def read_config_from_yaml(path_config):
'''
:param path_config: Path to the config file
:return:
'''
# Read the content of the yaml file
config_data = {}
with open(path_config, 'r') as file:
data = yaml.safe_load(file)
# Extract key-value pairs from the nested 'config' key
return data
function howMany(){
console.log(arguments); //
}
howMany(3,4,5,6,7,8,90,)
//prints
Arguments(7) [3, 4, 5, 6, 7, 8, 90, callee: (...), Symbol(Symbol.iterator): ƒ]
// shows an array and we can do something like
function howMany() {
let total = 0;
for (let value of arguments) {
total += value;
}
console.log(total);
return total;
}
howMany(3, 4, 5, 6, 7, 8, 90);
set srcFldr to (choose folder with prompt "Select the source folder:")
set destFldr to (choose folder with prompt "Select the destination folder:")
tell application "Finder"
--set fileList to files of srcFldr -- sorted by name in HFS Plus' fashion (?)
set fileList to sort (get files of srcFldr) by name -- sorted by name in Finder's fashion
set fileCnt to count fileList
set ff to {}
repeat with i from 2 to fileCnt by 2
set end of ff to item i of fileList
end repeat
move ff to destFldr -- you can move list at once
end tell
Comments