forked from mikeizbicki/cmc-csci046
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa67428
commit c6f9e81
Showing
4 changed files
with
180 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
\documentclass[10pt]{article} | ||
|
||
\usepackage[margin=1in]{geometry} | ||
\usepackage{amsmath} | ||
\usepackage{amssymb} | ||
\usepackage{amsthm} | ||
\usepackage{mathtools} | ||
\usepackage[shortlabels]{enumitem} | ||
\usepackage[normalem]{ulem} | ||
\usepackage{courier} | ||
|
||
\usepackage{hyperref} | ||
\hypersetup{ | ||
colorlinks = true, %Colours links instead of ugly boxes | ||
urlcolor = black, %Colour for external hyperlinks | ||
linkcolor = blue, %Colour of internal links | ||
citecolor = blue %Colour of citations | ||
} | ||
|
||
\usepackage[T1]{fontenc} | ||
\usepackage{listings} | ||
\lstset{ | ||
language=HTML | ||
,basicstyle=\linespread{1}\ttfamily | ||
%,numbers=left | ||
,breaklines=true | ||
} | ||
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
|
||
\theoremstyle{definition} | ||
\newtheorem{problem}{Problem} | ||
\newtheorem{note}{Note} | ||
\newcommand{\E}{\mathbb E} | ||
\newcommand{\R}{\mathbb R} | ||
\DeclareMathOperator{\Var}{Var} | ||
\DeclareMathOperator*{\argmin}{arg\,min} | ||
\DeclareMathOperator*{\argmax}{arg\,max} | ||
|
||
\newcommand{\trans}[1]{{#1}^{T}} | ||
\newcommand{\loss}{\ell} | ||
\newcommand{\w}{\mathbf w} | ||
\newcommand{\mle}[1]{\hat{#1}_{\textit{mle}}} | ||
\newcommand{\map}[1]{\hat{#1}_{\textit{map}}} | ||
\newcommand{\normal}{\mathcal{N}} | ||
\newcommand{\x}{\mathbf x} | ||
\newcommand{\y}{\mathbf y} | ||
\newcommand{\ltwo}[1]{\lVert {#1} \rVert} | ||
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
|
||
\begin{document} | ||
\begin{center} | ||
{ | ||
\Large | ||
Quiz: Terminal | ||
} | ||
|
||
%\vspace{0.1in} | ||
%CSCI046: Data Structures | ||
|
||
\vspace{0.1in} | ||
\end{center} | ||
|
||
\vspace{0.15in} | ||
\noindent | ||
\textbf{Total Score:} ~~~~~~~~~~~~~~~/$2^2$ | ||
|
||
\vspace{0.2in} | ||
\noindent | ||
\textbf{Printed Name:} | ||
|
||
\noindent | ||
\rule{\textwidth}{0.1pt} | ||
\vspace{0.15in} | ||
|
||
\noindent | ||
\textbf{Quiz rules:} | ||
\begin{enumerate} | ||
\item You MAY use any printed or handwritten notes. | ||
\item You MAY NOT use a computer or any other electronic device. | ||
\end{enumerate} | ||
|
||
\noindent | ||
|
||
\vspace{0.15in} | ||
|
||
|
||
\begin{problem} | ||
Write the output of the final command in the following terminal session. | ||
If the command has no output, then leave the problem blank. | ||
\end{problem} | ||
\begin{lstlisting} | ||
$ cd | ||
$ rm -rf quiz | ||
$ mkdir quiz | ||
$ cd quiz | ||
$ touch README | ||
$ mkdir foo | ||
$ touch foo/README2 | ||
$ touch README3 | ||
$ ls -a | ||
\end{lstlisting} | ||
\vspace{1in} | ||
|
||
|
||
\begin{problem} | ||
Write the output of the final command in the following terminal session. | ||
If the command has no output, then leave the problem blank. | ||
\end{problem} | ||
\begin{lstlisting} | ||
$ cd | ||
$ rm -rf quiz | ||
$ mkdir quiz | ||
$ cd quiz | ||
$ mkdir foo | ||
$ echo "hello world" > README | ||
$ echo "hola mundo" > foo/README | ||
$ echo "hello again" > foo/README | ||
$ cd foo | ||
$ echo "hola otra vez" >> README | ||
$ cat README | ||
\end{lstlisting} | ||
|
||
\vspace{1in} | ||
|
||
\begin{problem} | ||
Write the output of the final command in the following terminal session. | ||
If the command has no output, then leave the problem blank. | ||
\end{problem} | ||
\begin{lstlisting} | ||
$ cd | ||
$ rm -rf quiz | ||
$ mkdir quiz | ||
$ cd quiz | ||
$ echo "print('hello world')" >> foo.py | ||
$ echo "print('hola mundo')" >> bar.py | ||
$ echo 'print("hola otra vez")' > bar.py | ||
$ echo "print(\"hello again\")" > foo.py | ||
$ python3 foo.py | ||
\end{lstlisting} | ||
\vspace{2in} | ||
|
||
\begin{problem} | ||
Write the output of the final command in the following terminal session. | ||
If the command has no output, then leave the problem blank. | ||
\end{problem} | ||
\begin{lstlisting} | ||
$ cd | ||
$ rm -rf quiz | ||
$ mkdir quiz | ||
$ cd quiz | ||
$ git init | ||
$ echo "print('hello world')" > foo.py | ||
$ echo "print('hola mundo')" > bar.py | ||
$ git add foo.py | ||
$ git add bar.py | ||
$ git commit -m "first commit" | ||
$ git branch foo | ||
$ git checkout foo | ||
$ echo "print('hello again')" >> foo.py | ||
$ git add foo.py | ||
$ git add bar.py | ||
$ git commit -m "second commit" | ||
$ git checkout master | ||
$ echo "print('hola otra vez')" >> bar.py | ||
$ python3 foo.py | ||
\end{lstlisting} | ||
|
||
\end{document} |