Skip to content

Commit 9123693

Browse files
committed
more text and references
1 parent 683935a commit 9123693

File tree

17 files changed

+962
-100
lines changed

17 files changed

+962
-100
lines changed

bibliography/bibliography.bib

Lines changed: 475 additions & 2 deletions
Large diffs are not rendered by default.

notation/acronyms.sty

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
%%% The acronyms.
33
%%%
44
%
5+
\newacronym{AI}{AI}{Artificial Intelligence}%
6+
\newacronym{DS}{DS}{Data Science}%
57
\newacronym[description={Integrated Development Environment, see \gls{ide}}]{IDE}{IDE}{Integrated Development Environment}%
8+
\newacronym{ML}{ML}{Machine Learning}%
9+
\newacronym[description={Operating System, the system that runs your computer, see, e.g., \linux\ and \windows}]{OS}{OS}{Operating System}%
610
\newacronym[description={Version Control Systems, see \gls{vcs}}]{VCS}{VCS}{Version Control Systems}%
711
%

notation/software.sty

Lines changed: 98 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,137 @@
22
%% Access to Source Codes
33
%%
44
%
5-
\protected\gdef\softwareStyle#1{\textrm{#1}}%
6-
%
7-
\newglossaryentry{python}{%
8-
name={\softwareStyle{Python}},
9-
sort={Python},
10-
description={The \href{https://python.org/}{\softwareStyle{Python}} programming language, i.e., what you will learn about in this book.}
11-
}%
12-
\protected\gdef\python{\gls{python}}%
13-
%
14-
\xdef\pythonVersion{3.10}%
15-
\protected\gdef\pythonWithVersion{\softwareStyle{\python~\pythonVersion}}%
5+
\protected\gdef\softwareStyle#1{\scalebox{0.95}[1]{\texttt{#1}}}%
166
%
177
%
188
\newglossaryentry{linux}{%
199
name={\softwareStyle{Linux}},
2010
sort={Linux},
2111
description={%
22-
is an open source operating system, i.e., a free alternative for \windows. %
12+
is the leading open source operating system, i.e., a free alternative for \windows~\cite{T1999TLE}. %
2313
Its variant \ubuntu\ is particularly easy to use and install. %
24-
We recommend using it for this course, for software development, and for research.%
14+
We recommend using it for this course, for software development, and for research. %
15+
Learn more at \url{https://www.linux.org/}.%
2516
}%
2617
}%
27-
\protected\gdef\linux{\gls{linux}}%
18+
\protected\gdef\linux{\pgls{linux}}%
19+
%
20+
%
21+
\newglossaryentry{matplotlib}{%
22+
name={\softwareStyle{Matplotlib}},
23+
sort={Matplotlib},
24+
description={%
25+
is a \python\ package for plotting diagrams and charts~\cite{H2007MA2GE}. %
26+
Learn more at at \url{https://matplotlib.org}.%
27+
}%
28+
}%
29+
\protected\gdef\matplotlib{\pgls{matplotlib}}%
30+
%
31+
%
32+
\newglossaryentry{moptipy}{%
33+
name={\softwareStyle{moptipy}},
34+
sort={moptipy},
35+
description={%
36+
is the \emph{Metaheuristic Optimization in \python} library~\cite{WW2023RSDEWASSAA}. %
37+
Learn more at \url{https://thomasweise.github.io/moptipy}.%
38+
}%
39+
}%
40+
\protected\gdef\moptipy{\pgls{moptipy}}%
41+
%
42+
\newglossaryentry{numpy}{%
43+
name={\softwareStyle{NumPy}},
44+
sort={NumPy},
45+
description={%
46+
is a fundamental package for scientific computing with \python, which offers efficient array datastructures~\cite{HMvdWGVCWTBSKPHvKBHFdRWPGMSRWAGO2020APWN}. %
47+
Learn more at \url{https://numpy.org/}.%
48+
}%
49+
}%
50+
\protected\gdef\numpy{\pgls{numpy}}%
51+
%
52+
%
53+
\newglossaryentry{pandas}{%
54+
name={\softwareStyle{Pandas}},
55+
sort={Pandas},
56+
description={%
57+
is a \python\ data analysis and manipulation library~\cite{B2012DPWP}. %
58+
Learn more at \url{https://pandas.pydata.org}.%
59+
}%
60+
}%
61+
\protected\gdef\pandas{\pgls{pandas}}%
2862
%
2963
%
3064
\newglossaryentry{pycharm}{%
3165
name={\softwareStyle{PyCharm}},
3266
sort={PyCharm},
3367
description={%
34-
is the convenient \python\ \gls{ide} that we recommend for this course.%
68+
is the convenient \python\ \pgls{ide} that we recommend for this course~\cite{VHN2023HOADWP}. %
69+
Learn more at \url{https://www.jetbrains.com/pycharm}.%
70+
}%
71+
}%
72+
\protected\gdef\pycharm{\pgls{pycharm}}%
73+
%
74+
%
75+
\newglossaryentry{python}{%
76+
name={\softwareStyle{Python}},
77+
sort={Python},
78+
description={The \softwareStyle{Python} programming language~\cite{H2023ABGTP3P,LH2015DSAAWP}, i.e., what you will learn about in this book. %
79+
Learn more at \url{https://python.org}.}
3580
}%
81+
\protected\gdef\python{\pgls{python}}%
82+
%
83+
\xdef\pythonVersion{3.10}%
84+
\protected\gdef\pythonWithVersion{\softwareStyle{\python~\pythonVersion}}%
85+
%
86+
%
87+
\newglossaryentry{scikitlearn}{%
88+
name={\softwareStyle{Scikit-learn}},
89+
sort={Scikit-learn},
90+
description={is a \python\ library offering various machine learning tools~\cite{PVGMTGBPWDVPCBPD2011SMLIP}. %
91+
Learn more at \url{https://scikit-learn.org}.}
92+
}%
93+
\protected\gdef\scikitlearn{\pgls{scikitlearn}}%
94+
%
95+
%
96+
\newglossaryentry{scipy}{%
97+
name={\softwareStyle{SciPy}},
98+
sort={SciPy},
99+
description={is a \python\ library for scientific computing~\cite{VGOHRCBPWBvdWBWMMNJKLCPFMVLPCHQHARPvMS2020SFAFSCIP}. %
100+
Learn more at \url{https://scipy.org}.}
101+
}%
102+
\protected\gdef\scipy{\pgls{scipy}}%
103+
%
104+
%
105+
\newglossaryentry{tensorflow}{%
106+
name={\softwareStyle{TensorFlow}},
107+
sort={TensorFlow},
108+
description={is a \python\ library for implementing machine learning, especially suitable for training of neural networks~\cite{ABCCDDDGIIKLMMMSTVWWYZ2016TASFLSML}. %
109+
Learn more at \url{https://www.tensorflow.org}.}
36110
}%
37-
\protected\gdef\pycharm{\gls{pycharm}}%
111+
\protected\gdef\tensorflow{\pgls{tensorflow}}%
38112
%
39113
%
40114
\newglossaryentry{ubuntu}{%
41115
name={\softwareStyle{Ubuntu}},
42116
sort={Ubuntu},
43117
description={%
44-
is a variant of the open source operating system \linux. %
118+
is a variant of the open source operating system \linux~\cite{CN2020ULB}. %
45119
We recommend that you use this operating system to follow this class, for software development, and for research. %
120+
Learn more at \url{https://ubuntu.com}. %
46121
If you are in China, you can download it from \expandafter\url{\ubuntuDownloadUrl}.%
47122
}%
48123
}%
49-
\protected\gdef\ubuntu{\gls{ubuntu}}%
50-
\xdef\ubuntuDownloadUrl{https://mirrors.ustc.edu.cn/ubuntu-releases/}%
124+
\protected\gdef\ubuntu{\pgls{ubuntu}}%
125+
\xdef\ubuntuDownloadUrl{https://mirrors.ustc.edu.cn/ubuntu-releases}%
51126
%
52127
%
53128
\newglossaryentry{windows}{%
54129
name={\softwareStyle{Windows}},
55130
sort={Windows},
56131
description={%
57-
\href{https://www.microsoft.com/windows/}{\softwareStyle{Microsoft Windows}} is a commerical proprietary operating system. %
58-
It is widely spread, but we recommend using a \linux\ variant such as \ubuntu\ for software development and for our course.%
132+
Microsoft~\softwareStyle{Windows} is a commerical proprietary operating system~\cite{B2023W1IO}. %
133+
It is widely spread, but we recommend using a \linux\ variant such as \ubuntu\ for software development and for our course. %
134+
Learn more at \url{https://www.microsoft.com/windows}.%
59135
}%
60136
}%
61-
\protected\gdef\windows{\gls{windows}}%
137+
\protected\gdef\windows{\pgls{windows}}%
62138
%

notation/terms.sty

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,21 @@
55
\newglossaryentry{git}{%
66
name={Git},
77
description={%
8-
Git is a distributed \acrfull{VCS} which allows multiple users to work on the same code while preserving the history of the code changes.%
8+
Git is a distributed \acrfull{VCS} which allows multiple users to work on the same code while preserving the history of the code changes~\cite{S2023LG,T2024BGAGVCPMATFTND}.%
99
}%
1010
}%
11+
\protected\gdef\git{\pgls{git}}
12+
%
13+
%
14+
\newglossaryentry{github}{%
15+
name={GitHub},
16+
description={%
17+
GitHub is a website where software projects can be hosted and managed via the \pgls{git} \pgls{vcs}~\cite{PRGWSUdVLFTEKPKFBV2016TSRFTAOGAG,T2024BGAGVCPMATFTND}. %
18+
Learn more at \url{https://github.com}.%
19+
}%
20+
}%
21+
\protected\gdef\github{\pgls{github}}
22+
%
1123
%
1224
\newglossaryentry{ide}{%
1325
name={Integrated Development Environment},
@@ -24,7 +36,7 @@ For this course, we recommend using \pycharm.%
2436
name={\texttt{sudo}},
2537
sort={sudo},
2638
description={%
27-
In order to perform administrative tasks such as installing new software under \linux, root (or ``super'') user privileges as needed. %
39+
In order to perform administrative tasks such as installing new software under \linux, root (or ``super'') user privileges as needed~\cite{CN2020ULB}. %
2840
A normal user can execute a program in the \gls{terminal} as super user by pre-pending \bashil{sudo}, often referred to as ``super user do.'' %
2941
This requires the root password.%
3042
}%
@@ -35,18 +47,19 @@ This requires the root password.%
3547
name={terminal},
3648
plural={terminals},
3749
description={%
38-
A terminal is a text-based window where you can enter commands and execute them by pressing \keys{\return}. %
50+
A terminal is a text-based window where you can enter commands and execute them~\cite{CN2020ULB}. %
3951
Knowing what a terminal is and how to use it is very essential in any programming- or system administration-related task. %
4052
If you want to open a terminal under \windows, you can \windowsTerminal, as shown, e.g., in \cpageref{fig:installingPythonWindows01openTerminal}. %
4153
Under \ubuntu\ \linux, \ubuntuTerminal\ opens a terminal.%
4254
}%
4355
}%
4456
%
57+
%
4558
\newglossaryentry{vcs}{%
4659
name={Version Control System},
4760
plural={Version Control Systems},
4861
description={%
49-
A \acrfull{VCS} is a software which allows you to manage and preserve the historical development of your program code. %
62+
A \acrfull{VCS} is a software which allows you to manage and preserve the historical development of your program code~\cite{T2024BGAGVCPMATFTND}. %
5063
A distributed \gls{VCS} allows multiple users to work on the same code and upload their changes to the server, which then preserves the change history.
5164
The most popular distributed \gls{VCS} is \gls{git}.%
5265
}%

styles/glossary.sty

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,25 @@ description={\sloppy#4.}%
7979
\expandafter\protected\expandafter\gdef\csname#1\endcsname{\ensuremath{\gls{#1}}}%
8080
\expandafter\protected\expandafter\gdef\csname#1Of\endcsname##1{\ensuremath{##1_{\gls{#1}}}}%
8181
}%
82+
%
83+
%% Create a command #1 that evaluates to #2 exactly once per page and to #3 afterwards.
84+
\protected\gdef\oncePerPage#1#2#3{%
85+
\expandafter\protected\expandafter\gdef\csname @#1A\endcsname{%
86+
#2%
87+
\expandafter\protected\expandafter\gdef\csname #1\endcsname{\csname @#1B\endcsname}%
88+
\afterpage{\expandafter\protected\expandafter\gdef\csname #1\endcsname{\csname @#1A\endcsname}}%
89+
}%
90+
\expandafter\protected\expandafter\gdef\csname @#1B\endcsname{#3}%
91+
\expandafter\protected\expandafter\gdef\csname #1\endcsname{\csname @#1A\endcsname}%
92+
}%
93+
%
94+
%%
95+
%% Invoke the glossary term, but link only once per page.
96+
%%
97+
\protected\gdef\pgls#1{%
98+
\expandafter\ifcsname @@@@#1\endcsname\else%
99+
\oncePerPage{@@@@#1}{\gls{#1}}{\gls[hyper=false]{#1}}%
100+
\fi%
101+
\expandafter\csname @@@@#1\endcsname%
102+
}%
103+
%

text/main/basics/gettingStarted/gettingStarted.tex

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,25 @@
44
In order to do practical things, we need to have all the necessary software on our computer.
55
What software is necessary to do \python\ programming?
66
Well, first of all, \python.
7-
If \python\ is not yet installed on your machine, then we briefly outline in \cref{sec:installingPython} how you can install it.
7+
If \python\ is not yet installed on your machine, then you can follow brief installation guide in \cref{sec:installingPython}.
88

99
Now with the programming language \python\ alone, you cannot really do much -- in a convenient way, at least.
1010
You need a nice editor in which you can write the programs.
1111
Actually, you want an editor where you can not just write programs.
1212
You want an editor where you can also directly execute and test your programs.
13-
In software development, you often work with a \gls{VCS} like \gls{git}.
13+
In software development, you often work with a \pgls{VCS} like \git.
1414
You want to do that convenient from your editor.
15-
Such an editor, which integrates many of the common tasks that occur during programming, is called an \gls{IDE}.
16-
In our course, you will work with the \pycharm\ \gls{IDE}.
17-
If you do not yet have \pycharm\ installed, in \cref{sec:installingPyCharm} we give a brief summary on how you can install it.%
15+
Such an editor, which integrates many of the common tasks that occur during programming, is called an \pgls{IDE}.
16+
In our course, you will work with the \pycharm\ \pgls{IDE}~\cite{VHN2023HOADWP}.
17+
If you do not yet have \pycharm\ installed, then you can work through the setup instructions outlined in \cref{sec:installingPyCharm}.
18+
19+
Before we get into these necessary installation and setup steps that we need to really learn programming, we face a small problem:
20+
Today, devices with many different \pgls{OS} are available.
21+
For each \pgls{OS}, the installation steps and software availability may be different, so I cannot possibly cover them all.
22+
Personally, I strongly recommend using \linux~\cite{T1999TLE} for programming, work, and research.
23+
If you are a student of computer science or any related field, then it is my personal opinion that you should get familiar with this operating system.
24+
Maybe you could start with the very easy-to-use \ubuntu\ \linux~\cite{CN2020ULB}.
25+
Either way, in the following, I will try to provide examples and instructions for both \ubuntu\ and the commercial Microsoft \windows~\cite{B2023W1IO} \pgls{OS}.
1826
%
1927
\hinput{installingPython}{installingPython}%
2028
\hinput{installingPyCharm}{installingPyCharm}%

text/main/basics/gettingStarted/installingPyCharm/installingPyCharm.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
%
44
Just having a programming language and the corresponding interpreter on your system is not enough.
55
Are you going to write programs in a simple text editor like a caveperson?
6-
No, of course not, you need an \gls{IDE}, a program which allows you to do multiple of the necessary tasks involved in the software development process under one convenient user interface.
7-
For this course, we recommend using \pycharm, whose community edition is freely available.
6+
No, of course not, you need an \pgls{IDE}, a program which allows you to do multiple of the necessary tasks involved in the software development process under one convenient user interface.
7+
For this course, I recommend using \pycharm, whose community edition is freely available.
88
The installation guide for \pycharm\ can be found at \url{https://www.jetbrains.com/help/pycharm/installation-guide.html}.%
99
%
1010
\hinput{installingPyCharmWindows}{installingPyCharmWindows}%

text/main/basics/gettingStarted/installingPyCharm/installingPyCharmUbuntu/installingPyCharmUbuntu.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
\centering%
55
%
66
\subfloat[][%
7-
Installing \pycharm\ using the snap install command in a \gls{terminal} opened with \ubuntuTerminal.%
7+
Installing \pycharm\ using the snap install command in a \pgls{terminal} opened with \ubuntuTerminal.%
88
\label{fig:installingPyCharmUbuntu01snapInstall}%
99
]{\includegraphics[width=0.7\linewidth]{\currentDir/installingPyCharmUbuntu01snapInstall}}%
1010
%
@@ -63,9 +63,9 @@
6363
%
6464
\begin{sloppypar}%
6565
Installing \pycharm\ under \ubuntu\ \linux\ is very easy, as illustrated in \cref{fig:installingPyCharmUbuntu}.
66-
First, you open a \gls{terminal} by pressing \ubuntuTerminal.
66+
First, you open a \pgls{terminal} by pressing \ubuntuTerminal.
6767
Then, enter the command \bashil{sudo snap install pycharm-community --classic} and hit return~(\cref{fig:installingPyCharmUbuntu01snapInstall}).
68-
This installs the \pycharm\ software package and the necessary super user privileges are obtained via the pre-pended \gls{sudo}, which will ask us to enter the root password, as sketched in \cref{fig:installingPyCharmUbuntu02sudo}.
68+
This installs the \pycharm\ software package and the necessary super user privileges are obtained via the pre-pended \pgls{sudo}, which will ask us to enter the root password, as sketched in \cref{fig:installingPyCharmUbuntu02sudo}.
6969
Then, the installation process basically runs automatically.
7070
Once it has completed (see \cref{fig:installingPyCharmUbuntu05snapInstallFinished}), you can press the \keys{\OSwin} key and type \bashil{pycharm} in the launcher window to find \pycharm~(\cref{fig:installingPyCharmUbuntu06launcher}).
7171
A double-click will open \pycharm.%

text/main/basics/gettingStarted/installingPyCharm/installingPyCharmWindows/installingPyCharmWindows.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
As \cref{fig:installingPyCharmWindows09installation,fig:installingPyCharmWindows10installation,fig:installingPyCharmWindows11installation} show, the installation setup process is more or less automated, we just need to click \keys{Next} here and there and finally click \keys{Install}~(\cref{fig:installingPyCharmWindows12installation}).
152152
After the installation completes, we run \pycharm\ for the first time.
153153
Now we need to agree to the user agreement~(\cref{fig:installingPyCharmWindows16running}) and should probably choose that we do not with to send any information about our \pycharm\ usage out~(\cref{fig:installingPyCharmWindows17running}).
154-
Finally, as sketched in \cref{fig:installingPyCharmWindows18running}, we have a running and ready \pycharm\ \gls{IDE}.%
154+
Finally, as sketched in \cref{fig:installingPyCharmWindows18running}, we have a running and ready \pycharm\ \pgls{IDE}.%
155155
%
156156
\endhsection%
157157
%

text/main/basics/gettingStarted/installingPython/installingPython.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
\label{sec:installingPython}%
33
In order to learn and use \python, we first need to install it.
44
There are two major versions of \python\ out there: \python~\softwareStyle{2} and \python~\softwareStyle{3}.
5-
Our course focuses entirely on \python~\softwareStyle{3}.
5+
This course focuses entirely on \python~\softwareStyle{3}.
66
We assume that you have installed \pythonWithVersion\ or newer.
7-
Hopefully, you could figure out how to do that by yourself -- but we will at least provide some quick guide here as well.
8-
Help can be found at the following resources:%
7+
We here provide some brief setup instructions.
8+
More help can be found at the following resources:%
99
%
1010
\begin{itemize}%
1111
\item Python Downloads at \url{https://www.python.org/downloads/}%

text/main/basics/gettingStarted/installingPython/installingPythonWindows/installingPythonWindows.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
%
33
\begin{figure}%
44
\centering%
5-
\subfloat[][Opening the \gls{terminal} under \windows: \windowsTerminal.]{%
5+
\subfloat[][Opening the \pgls{terminal} under \windows: \windowsTerminal.]{%
66
\label{fig:installingPythonWindows01openTerminal}%
77
\tightbox{\includegraphics[height=2.8cm]{\currentDir/installingPythonWindows01openTerminal}}%
88
}%
@@ -52,13 +52,13 @@
5252
\end{figure}%
5353
%
5454
Example installation steps for \python\ on \windows\ (version~10) are sketched in \cref{fig:installPythonWindows}.
55-
First, you would open a \gls{terminal} using and \windowsTerminal, as shown in \cref{fig:installingPythonWindows01openTerminal}.
55+
First, you would open a \pgls{terminal} using and \windowsTerminal, as shown in \cref{fig:installingPythonWindows01openTerminal}.
5656
If \python\ is installed, then typing \bashil{python3 --version} in the terminal and hitting \keys{\return} would print the version of the \python\ installation.
5757
If it is not installed, however, then \windows\ will print a message informing you that \python\ is not yet installed and that you can reach the web installer by just typing \bashil{python3} (and hitting \keys{\return}, of course).0
5858
We do this in \cref{fig:installingPythonWindows03python}, which leads us to the installation screen (\cref{fig:installingPythonWindows04installGet}), where we need to press the \keys{Get} button.
5959
This will then download (\cref{fig:installingPythonWindows05downloading}) and install \python.
6060
When this process is completed, the screen just shows nothing (\cref{fig:installingPythonWindows06finished}).
61-
If we go back to the \gls{terminal} and again try \bashil{python3 --version}, it will now work and print the version of our \python\ installation.
61+
If we go back to the \pgls{terminal} and again try \bashil{python3 --version}, it will now work and print the version of our \python\ installation.
6262
In our case, this is version~\softwareStyle{3.12}.%
6363
%
6464
\endhsection%

text/main/basics/gettingStarted/installingPython/pythonUnderUbuntu/pythonUnderUbuntu.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
\begin{figure}%
44
\centering%
55
\includegraphics[width=0.7\linewidth]{\currentDir/ubuntuTerminalPythonVersion}%
6-
\caption{Under \ubuntu\ \linux~\softwareStyle{22.04}, typing \bashil{python3 --version} in a \gls{terminal} and hitting return yields version~\softwareStyle{3.10}.}%
6+
\caption{Under \ubuntu\ \linux~\softwareStyle{22.04}, typing \bashil{python3 --version} in a \pgls{terminal} and hitting return yields version~\softwareStyle{3.10}.}%
77
\label{fig:ubuntuTerminalPythonVersion}%
88
\end{figure}%
99
%
1010
\begin{sloppypar}%
1111
Under \ubuntu\ \linux, \python~\softwareStyle{3} is already pre-installed.
12-
You can open a \gls{terminal}, type \bashil{python3 --version}, hit \keys{\return}, and get the result illustrated in \cref{fig:ubuntuTerminalPythonVersion}:%
12+
You can open a \pgls{terminal}, type \bashil{python3 --version}, hit \keys{\return}, and get the result illustrated in \cref{fig:ubuntuTerminalPythonVersion}:
1313
My system has \python\ version~\softwareStyle{3.10} installed.%
1414
\end{sloppypar}%
1515
%

0 commit comments

Comments
 (0)