{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "ceb26c81-d127-480a-8f84-72c37fda791c",
   "metadata": {},
   "source": [
    "###  Homework 5"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2a1d0cbe-c373-4fce-b0b6-8f59a60828d1",
   "metadata": {},
   "source": [
    "#### Python scripting\n",
    "\n",
    "Repead exercises 2A and 2B from the [midterm exam](https://linuxcourse.rutgers.edu/summer2026/html/midterm2026_qa.html) in directory Python,\n",
    "where you are running jupyter notebook.\n",
    "\n",
    "A) Develop a python script that looks for files ```*.h```, ```*.json```, and ```*.cmake``` in directory DEB and copies them into\n",
    "new directory HED. Use only modules ```shutil```, ```os```, and ```glob```.\n",
    "\n",
    "B) Modify the script in A by adding module ```configparser``` and reading the files from file ```look.ini```\n",
    "\n",
    "C) Modify the original script in A to use module ```json``` and read the files from file ```look.json```\n",
    "\n",
    "D) Create an executable python script based on the original one in A and use module ```argparse``` to read the files from the command line."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c52247d1-e481-45c6-ad9e-ef288f7bfafa",
   "metadata": {},
   "source": [
    "#### Code compilation and Makefile\n",
    "\n",
    "In new directory HW5, copy/paste the source code from ```Simple Linear Regression Example``` link below into \n",
    "file   ```reg.c```:\n",
    "\n",
    "\n",
    "[<TT> Simple Linear Regression example</TT>](https://www.gnu.org/software/gsl/doc/html/lls.html#simple-linear-regression-example)\n",
    "\n",
    "You also need to install package ```libgsl-dev``` on the VD.\n",
    "\n",
    "\n",
    "A) Compile source code into executable ```reg.x``` and run the executable.\n",
    "\n",
    "B) In the same directory, create a Makefile with targets:\n",
    " - ```reg.x```\n",
    " - target ```clean``` to remove the compilation products.\n",
    "\n",
    "\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
