Compare commits

..

No commits in common. "a8d873b4fdb579036090cace9fc40d7334f6161b" and "0928dfdd1335f9688fe6ceafeb60c81717f943a2" have entirely different histories.

115 changed files with 148 additions and 1346 deletions

View File

@ -18,10 +18,9 @@
# - the repo root, gates/, scripts/ and .github/ have no entry either, so a # - the repo root, gates/, scripts/ and .github/ have no entry either, so a
# binary added there is blocked. # binary added there is blocked.
# #
# An allowlisted file that .gitignore ALSO matches fails silently on # Every pattern here must also survive `git ls-files | git check-ignore
# `git add` rather than erroring. That is enforced, not remembered: the # --stdin --no-index` printing nothing -- an allowlisted file that .gitignore
# ignore-consistency pre-commit hook (scripts/check_ignore_consistency.sh) # also matches fails silently on `git add` rather than erroring.
# fails the commit if any tracked file is gitignored.
# --- Reports and presentations (155 .pdf, 3 .docx, 1 .doc, 1 .pptx) --------- # --- Reports and presentations (155 .pdf, 3 .docx, 1 .doc, 1 .pptx) ---------
Programming/*.pdf Programming/*.pdf

View File

@ -1,40 +0,0 @@
name: runnability
# Probes every course directory and fails if any RUNNER is broken.
#
# Deliberately NOT a diff against a committed baseline. A runner's status is a
# property of the machine, not of the commit: MATLAB, Unity and the .NET SDK
# are absent here and present locally, so `runnable` on a laptop and `blocked`
# on ubuntu-latest is correct rather than drift. Diffing the two would make
# this workflow red by construction, which is the one outcome the whole
# exercise is meant to avoid.
#
# What IS a defect, and what this catches: a run.sh that crashes, hangs, or
# reports an unknown kind. Those are `error`, and any `error` fails the job.
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
runnability:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Probe every course directory
run: ./run.sh status
- name: Fail on any broken runner
run: |
set -euo pipefail
if grep -qP '\terror\t' gates/runnability-ci.tsv; then
echo "::error::a course run.sh failed to probe"
grep -P '\terror\t' gates/runnability-ci.tsv
exit 1
fi
echo "all runners probed cleanly"
cut -f2 gates/runnability-ci.tsv | sort | uniq -c

10
.gitignore vendored
View File

@ -479,13 +479,3 @@ target/
# Generated by nginx/ssl/generate-cert.sh -- never commit a private key. # Generated by nginx/ssl/generate-cert.sh -- never commit a private key.
Programming/ERSMS-project/nginx/ssl/nginx.key Programming/ERSMS-project/nginx/ssl/nginx.key
Programming/ERSMS-project/nginx/ssl/nginx.crt Programming/ERSMS-project/nginx/ssl/nginx.crt
# Output of ./run.sh run <dir> for the C++ courses.
build/
# Generated fresh by the runner on each CI run. Committing a local copy
# would label this machine capabilities as the runner is, which is a lie.
gates/runnability-ci.tsv
# Per-course virtualenvs created by ./run.sh run.
.venv/

View File

@ -56,15 +56,6 @@ repos:
language: script language: script
pass_filenames: true pass_filenames: true
# A tracked file that .gitignore also matches fails silently on
# `git add`. 130 of those were fixed by hand; this keeps them fixed.
- id: ignore-consistency
name: no tracked file is gitignored
entry: scripts/check_ignore_consistency.sh
language: script
pass_filenames: false
always_run: true
# Thin shim into ~/utils, which owns the four markdown namespaces. # Thin shim into ~/utils, which owns the four markdown namespaces.
- id: md-naming - id: md-naming
name: markdown naming convention name: markdown naming convention
@ -72,13 +63,9 @@ repos:
language: system language: system
files: \.(md|markdown)$ files: \.(md|markdown)$
# -x so shellcheck FOLLOWS sourced files. The 44 per-course run.sh stubs
# source scripts/course_lib.sh; without -x every one of them reports
# SC1091 "not following", and the only other way to silence that is a
# per-file disable, which is banned here.
- id: shellcheck - id: shellcheck
name: shellcheck name: shellcheck
entry: bash -c 'printf "%s\0" "$@" | xargs -0 -n 40 shellcheck -x' -- entry: bash -c 'printf "%s\0" "$@" | xargs -0 -n 40 shellcheck' --
language: system language: system
types: [shell] types: [shell]
exclude_types: [zsh] exclude_types: [zsh]

View File

@ -2,57 +2,53 @@
Generated by `./run.sh status`. Do not edit by hand. Generated by `./run.sh status`. Do not edit by hand.
Status is recorded PER ENVIRONMENT, from `gates/runnability-local.tsv` and Status is recorded PER ENVIRONMENT. A directory that is `runnable` locally and
`gates/runnability-ci.tsv`. A directory that is `runnable` locally and
`blocked` in CI is the normal case, not drift: the runner has no MATLAB, no `blocked` in CI is the normal case, not drift: the runner has no MATLAB, no
Unity and no .NET SDK. Each environment rewrites only its own file, so a CI Unity and no .NET SDK. CI compares only its own column.
run cannot clobber the local column.
`-` means that environment has not probed yet. | Course | local | Detail |
|---|---|---|
| Course | local | ci | Detail (local) | | `NotProgramming/DPZ` | unprobed | no run.sh yet |
|---|---|---|---| | `NotProgramming/ECOGR` | unprobed | no run.sh yet |
| `NotProgramming/DPZ` | runnable | - | builds the report with latexmk | | `NotProgramming/EDABA` | unprobed | no run.sh yet |
| `NotProgramming/ECOGR` | runnable | - | builds the report with latexmk | | `NotProgramming/EDABA-LAB` | unprobed | no run.sh yet |
| `NotProgramming/EDABA` | runnable | - | builds the report with latexmk | | `NotProgramming/EDISE` | unprobed | no run.sh yet |
| `NotProgramming/EDABA-LAB` | runnable | - | builds the report with latexmk | | `NotProgramming/EDISP` | unprobed | no run.sh yet |
| `NotProgramming/EDISE` | runnable | - | builds the report with latexmk | | `NotProgramming/ELAC` | unprobed | no run.sh yet |
| `NotProgramming/EDISP` | no-code | - | submitted lab reports as PDFs only; no source was produced | | `NotProgramming/EMISY` | unprobed | no run.sh yet |
| `NotProgramming/ELAC` | runnable | - | builds the report with latexmk | | `NotProgramming/ENUME` | unprobed | no run.sh yet |
| `NotProgramming/EMISY` | runnable | - | builds the report with latexmk | | `NotProgramming/EPHY2` | unprobed | no run.sh yet |
| `NotProgramming/ENUME` | blocked | - | needs MATLAB or Octave (none of: matlab octave) | | `NotProgramming/EPOGAI` | unprobed | no run.sh yet |
| `NotProgramming/EPHY2` | no-code | - | submitted lab reports as PDFs only; no source was produced | | `NotProgramming/ERPM` | unprobed | no run.sh yet |
| `NotProgramming/EPOGAI` | no-code | - | a presentation only; no source was produced | | `NotProgramming/ESDP1` | unprobed | no run.sh yet |
| `NotProgramming/ERPM` | runnable | - | builds the report with latexmk | | `NotProgramming/ESOEN` | unprobed | no run.sh yet |
| `NotProgramming/ESDP1` | runnable | - | builds the report with latexmk | | `NotProgramming/MOM` | unprobed | no run.sh yet |
| `NotProgramming/ESOEN` | runnable | - | builds the report with latexmk | | `NotProgramming/SDM` | unprobed | no run.sh yet |
| `NotProgramming/MOM` | runnable | - | builds the report with latexmk | | `NotProgramming/SDM2` | unprobed | no run.sh yet |
| `NotProgramming/SDM` | runnable | - | builds the report with latexmk | | `NotProgramming/SPD` | unprobed | no run.sh yet |
| `NotProgramming/SDM2` | runnable | - | builds the report with latexmk | | `NotProgramming/STUP` | unprobed | no run.sh yet |
| `NotProgramming/SPD` | runnable | - | builds the report with latexmk | | `Programming/AIS` | unprobed | no run.sh yet |
| `NotProgramming/STUP` | runnable | - | npm install && npm start | | `Programming/BD2` | unprobed | no run.sh yet |
| `Programming/AIS` | runnable | - | builds the report with latexmk | | `Programming/BSS` | unprobed | no run.sh yet |
| `Programming/BD2` | runnable | - | npm install && npm start | | `Programming/EADS` | unprobed | no run.sh yet |
| `Programming/BSS` | runnable | - | builds the report with latexmk | | `Programming/EARIN` | unprobed | no run.sh yet |
| `Programming/EADS` | runnable | - | compiles each standalone .cpp | | `Programming/ECOAR` | unprobed | no run.sh yet |
| `Programming/EARIN` | runnable | - | python3 the entry script | | `Programming/ECOTE` | unprobed | no run.sh yet |
| `Programming/ECOAR` | runnable | - | make | | `Programming/ECRYPT` | unprobed | no run.sh yet |
| `Programming/ECOTE` | runnable | - | python3 /home/kuhy/WUT_Computer_Science/Programming/ECOTE/program/translator/main.py | | `Programming/ECRYPT_PROJECT` | unprobed | no run.sh yet |
| `Programming/ECRYPT` | no-code | - | test1.py is a 0-byte stub; this course produced no submitted code | | `Programming/EGUI` | unprobed | no run.sh yet |
| `Programming/ECRYPT_PROJECT` | runnable | - | python3 the entry script | | `Programming/EOOP` | unprobed | no run.sh yet |
| `Programming/EGUI` | runnable | - | dotnet build | | `Programming/EOPSY` | unprobed | no run.sh yet |
| `Programming/EOOP` | runnable | - | compiles each standalone .cpp | | `Programming/EPFU` | unprobed | no run.sh yet |
| `Programming/EOPSY` | runnable | - | make | | `Programming/E-PSYOPS` | unprobed | no run.sh yet |
| `Programming/EPFU` | runnable | - | make | | `Programming/ERSMS-project` | unprobed | no run.sh yet |
| `Programming/E-PSYOPS` | runnable | - | opens in the Unity editor | | `Programming/NLP` | unprobed | no run.sh yet |
| `Programming/ERSMS-project` | runnable | - | docker compose up | | `Programming/PBAD` | unprobed | no run.sh yet |
| `Programming/NLP` | runnable | - | python3 the entry script | | `Programming/PORR` | unprobed | no run.sh yet |
| `Programming/PBAD` | blocked | - | jupyter is on PATH but broken (bad interpreter) | | `Programming/PSD` | unprobed | pre-existing run.sh, no --probe support |
| `Programming/PORR` | runnable | - | python3 /home/kuhy/WUT_Computer_Science/Programming/PORR/code/main.py | | `Programming/psd_project` | unprobed | no run.sh yet |
| `Programming/PSD` | runnable | - | starts the Kafka/Flink stack (installs packages with sudo) | | `Programming/TRAK` | unprobed | no run.sh yet |
| `Programming/psd_project` | runnable | - | mvn package | | `Programming/twm_4` | unprobed | no run.sh yet |
| `Programming/TRAK` | runnable | - | python3 the entry script | | `Programming/USD` | unprobed | no run.sh yet |
| `Programming/twm_4` | blocked | - | jupyter is on PATH but broken (bad interpreter) | | `Programming/WDWR` | unprobed | no run.sh yet |
| `Programming/USD` | no-code | - | README describes a MetaDrive RL assignment; no implementation was submitted | | `Programming/ZPOB` | unprobed | no run.sh yet |
| `Programming/WDWR` | runnable | - | python3 the entry script |
| `Programming/ZPOB` | runnable | - | builds the report with latexmk |

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# NotProgramming/DPZ -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind tex \
-- "$@"

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# NotProgramming/ECOGR -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind tex \
-- "$@"

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# NotProgramming/EDABA-LAB -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind tex \
-- "$@"

View File

@ -1,8 +1,4 @@
\documentclass{report} \documentclass{report}
\usepackage[utf8]{inputenc}
% T1 is required for Polish ogonek characters; without it pdflatex
% fails with "Command \k unavailable in encoding OT1".
\usepackage[T1]{fontenc}
\usepackage{graphicx} \usepackage{graphicx}
\usepackage{hyperref} \usepackage{hyperref}
\usepackage{pdfpages} \usepackage{pdfpages}

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# NotProgramming/EDABA -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind tex \
-- "$@"

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# NotProgramming/EDISE -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind tex \
-- "$@"

View File

@ -1,12 +0,0 @@
#!/bin/bash
#
# NotProgramming/EDISP -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind none \
--note "submitted lab reports as PDFs only; no source was produced" \
-- "$@"

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# NotProgramming/ELAC -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind tex \
-- "$@"

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# NotProgramming/EMISY -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind tex \
-- "$@"

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# NotProgramming/ENUME -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind matlab \
-- "$@"

View File

@ -1,12 +0,0 @@
#!/bin/bash
#
# NotProgramming/EPHY2 -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind none \
--note "submitted lab reports as PDFs only; no source was produced" \
-- "$@"

View File

@ -1,12 +0,0 @@
#!/bin/bash
#
# NotProgramming/EPOGAI -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind none \
--note "a presentation only; no source was produced" \
-- "$@"

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# NotProgramming/ERPM -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind tex \
-- "$@"

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# NotProgramming/ESDP1 -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind tex \
-- "$@"

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# NotProgramming/ESOEN -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind tex \
-- "$@"

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# NotProgramming/MOM -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind tex \
-- "$@"

View File

@ -300,7 +300,7 @@
\item Intuicyjność \item Intuicyjność
\item Materiały \item Materiały
\item Zasoby (Assety) \item Zasoby (Assety)
\item Dostępne funkcje \item Dostępne funkcje}
\item ChatGPT \item ChatGPT
\end{itemize} \end{itemize}
\end{frame} \end{frame}

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# NotProgramming/SDM -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind tex \
-- "$@"

View File

@ -1,8 +1,4 @@
\documentclass{beamer} \documentclass{beamer}
\usepackage[utf8]{inputenc}
% T1 is required for Polish ogonek characters; without it pdflatex
% fails with "Command \k unavailable in encoding OT1".
\usepackage[T1]{fontenc}
\usepackage[fontsize=20pt]{fontsize} \usepackage[fontsize=20pt]{fontsize}
\usepackage{graphicx} \usepackage{graphicx}

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# NotProgramming/SDM2 -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind tex \
-- "$@"

View File

@ -1,9 +1,6 @@
\documentclass[12pt]{article} \documentclass[12pt]{article}
\usepackage[polish]{babel} \usepackage[polish]{babel}
\usepackage[utf8]{inputenc} \usepackage[utf8]{inputenc}
% T1 is required for Polish ogonek characters; without it pdflatex
% fails with "Command \k unavailable in encoding OT1".
\usepackage[T1]{fontenc}
\usepackage{array} \usepackage{array}
\usepackage{float} \usepackage{float}
\usepackage{graphicx} % Add this line to include graphics \usepackage{graphicx} % Add this line to include graphics

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# NotProgramming/SPD -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind tex \
-- "$@"

View File

@ -1,8 +1,4 @@
\documentclass[12pt]{extreport} \documentclass[12pt]{extreport}
\usepackage[utf8]{inputenc}
% T1 is required for Polish ogonek characters; without it pdflatex
% fails with "Command \k unavailable in encoding OT1".
\usepackage[T1]{fontenc}
\begin{document} \begin{document}

View File

@ -1,12 +0,0 @@
#!/bin/bash
#
# NotProgramming/STUP -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind node \
--entry "$(dirname "$(readlink -f "$0")")/makieta" \
-- "$@"

View File

@ -1,8 +1,4 @@
\documentclass[a4paper,12pt]{article} \documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
% T1 is required for Polish ogonek characters; without it pdflatex
% fails with "Command \k unavailable in encoding OT1".
\usepackage[T1]{fontenc}
% Packages % Packages
\usepackage{amsmath, amssymb, amsthm} % For math symbols and theorems \usepackage{amsmath, amssymb, amsthm} % For math symbols and theorems

View File

@ -2,9 +2,6 @@
\usepackage[left=0.75in,right=0.75in,bottom=0.75in]{geometry} \usepackage[left=0.75in,right=0.75in,bottom=0.75in]{geometry}
\usepackage[polish]{babel} \usepackage[polish]{babel}
\usepackage[utf8]{inputenc} \usepackage[utf8]{inputenc}
% T1 is required for Polish ogonek characters; without it pdflatex
% fails with "Command \k unavailable in encoding OT1".
\usepackage[T1]{fontenc}
\usepackage{hyperref} \usepackage{hyperref}
\usepackage{graphicx} \usepackage{graphicx}
\usepackage{enumitem} \usepackage{enumitem}

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# Programming/AIS -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind tex \
-- "$@"

View File

@ -1,12 +0,0 @@
#!/bin/bash
#
# Programming/BD2 -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind node \
--entry "$(dirname "$(readlink -f "$0")")/monorepo" \
-- "$@"

View File

@ -1,10 +1,4 @@
% Options belong BEFORE the class name; this read \documentclass{article}[12pt]
% \documentclass{article}[12pt], where [12pt] is not a class option at all.
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
% T1 is required for Polish ogonek characters; without it pdflatex
% fails with "Command \k unavailable in encoding OT1".
\usepackage[T1]{fontenc}
\usepackage{graphicx} \usepackage{graphicx}
\title{[BSS]-Lab1-śr16-KrzysztofRudnicki} \title{[BSS]-Lab1-śr16-KrzysztofRudnicki}

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# Programming/BSS -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind tex \
-- "$@"

View File

@ -1,8 +1,5 @@
\documentclass{article} \documentclass{article}
\usepackage[utf8]{inputenc} \usepackage[utf8]{inputenc}
% T1 is required for Polish ogonek characters; without it pdflatex
% fails with "Command \k unavailable in encoding OT1".
\usepackage[T1]{fontenc}
\usepackage{listings} \usepackage{listings}
\usepackage{xcolor} \usepackage{xcolor}
\usepackage{graphicx} \usepackage{graphicx}

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# Programming/E-PSYOPS -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind unity \
-- "$@"

View File

@ -14,41 +14,36 @@ class Tree{
public: public:
bool checkKeys(int givenKey); bool checkKeys(int givenKey);
bool findNode(treeNode*& nodeToFound, int givenKey); bool findNode(treeNode*& nodeToFound, int givenKey);
static bool findNodeFrom(treeNode* curr, treeNode*& nodeToFound, int givenKey); int sumNodeSub(treeNode* start);
int sumNodeSub(const treeNode* start);
}; };
int Tree::sumNodeSub(const treeNode* start) int Tree::sumNodeSub(const treeNode* start)
{ {
// Without this the recursion has no base case and walks off the end of
// the tree; the declaration/definition const mismatch meant the body was
// never compiled, so it was never reached either.
if (start == nullptr) return 0;
return (sumNodeSub(start->right) return (sumNodeSub(start->right)
+ sumNodeSub(start->left) + sumNodeSub(start->left)
+ start->key); + start->key);
} }
// As submitted this did not compile: it called findNode on a treeNode*, which bool Tree::findNode(treeNode*& nodeToFound, int givenKey);
// is a Tree method, and its while loop never advanced curr so it could not
// have terminated either. Same intent -- search the tree for a key -- expressed
// as the recursion the original was reaching for.
bool Tree::findNodeFrom(treeNode* curr, treeNode*& nodeToFound, int givenKey)
{ {
if(curr == nullptr) return 0; treeNode* curr = root;
if(curr -> key == givenKey) treeNode* Cleft = curr->left;
treeNode* Cright = curr->right;
while(curr != nullptr)
{ {
nodeToFound = curr; if(curr -> key == givenKey)
return 1; {
nodeToFound = curr;
return 1;
}else
{
if(Cleft.findNode(nodeToFound, givenKey)) return 1;
if(Cright.findNode(nodeToFound, givenKey)) return 1;
}
} }
if(findNodeFrom(curr -> left, nodeToFound, givenKey)) return 1; return 0;
return findNodeFrom(curr -> right, nodeToFound, givenKey);
} }
bool Tree::findNode(treeNode*& nodeToFound, int givenKey)
{
return findNodeFrom(root, nodeToFound, givenKey);
}
bool Tree::checkKeys(int key) bool Tree::checkKeys(int key)

View File

@ -24,7 +24,7 @@ public:
Node<Key, Info>* getRoot() const; Node<Key, Info>* getRoot() const;
void destroy(Node<Key, Info>* &someNode); void destroy(Node<Key, Info>* &someNode);
~Dictionary(); ~Dictionary();
void copyDictionary(Node<Key, Info> *&copiedDictRoot, Node<Key, Info> *otherTreeRoot); void copyDictionary(Dictionary *&copiedDictRoot, Dictionary *otherTreeRoot);
Dictionary(const Dictionary &other); Dictionary(const Dictionary &other);
void insert(const Key &newKey, const Info &newInfo); void insert(const Key &newKey, const Info &newInfo);
void remove(const Key &keyToRemove); void remove(const Key &keyToRemove);
@ -67,15 +67,13 @@ template<typename Key, typename Info>
Dictionary<Key, Info>::~Dictionary() { destroy(root); } Dictionary<Key, Info>::~Dictionary() { destroy(root); }
template<typename Key, typename Info> template<typename Key, typename Info>
void Dictionary<Key, Info>::copyDictionary(Node<Key, Info>* &copiedDictRoot, Node<Key, Info>* otherDictRoot) void Dictionary<Key, Info>::copyDictionary(Dictionary* &copiedDictRoot, Dictionary* otherDictRoot)
{ {
if(otherDictRoot == nullptr) copiedDictRoot = nullptr; if(otherDictRoot == nullptr) copiedDictRoot = nullptr;
else else
{ {
copiedDictRoot = new Node<Key, Info>; copiedDictRoot = new Dictionary;
copiedDictRoot->key = otherDictRoot -> key;
copiedDictRoot->info = otherDictRoot -> info; copiedDictRoot->info = otherDictRoot -> info;
copiedDictRoot->balanceFactor = otherDictRoot -> balanceFactor;
copyDictionary(copiedDictRoot -> left, otherDictRoot -> left); copyDictionary(copiedDictRoot -> left, otherDictRoot -> left);
copyDictionary(copiedDictRoot -> right, otherDictRoot -> right); copyDictionary(copiedDictRoot -> right, otherDictRoot -> right);
} }
@ -85,7 +83,7 @@ template<typename Key, typename Info>
Dictionary<Key, Info>::Dictionary(const Dictionary &other) Dictionary<Key, Info>::Dictionary(const Dictionary &other)
{ {
if(other.root == nullptr) root = nullptr; if(other.root == nullptr) root = nullptr;
else copyDictionary(root, other.root); else copyTree(root, other.root);
} }
template<typename Key, typename Info> template<typename Key, typename Info>

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# Programming/EADS -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind cxx \
-- "$@"

View File

@ -1,8 +1,4 @@
\documentclass[12pt]{article} \documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
% T1 is required for Polish ogonek characters; without it pdflatex
% fails with "Command \k unavailable in encoding OT1".
\usepackage[T1]{fontenc}
\usepackage{graphicx} % Required for inserting images \usepackage{graphicx} % Required for inserting images
\usepackage{hyperref} \usepackage{hyperref}

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# Programming/EARIN -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind python \
-- "$@"

View File

@ -1,12 +0,0 @@
#!/bin/bash
#
# Programming/ECOAR -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind make \
--entry "$(dirname "$(readlink -f "$0")")/C" \
-- "$@"

View File

@ -1,21 +1,9 @@
# ECOTE translator To run unit tests:
Enter project environment:
Translates LaTeX `tabular` environments into HTML tables. source /ecote/bin/activate
| Path | What it is | Run tests:
|---|---|
| `translator/` | The implementation. Entry point `translator/main.py`. |
| `translator/functional_tests/` | End-to-end fixtures. |
| `unit_tests/test_code/` | 17 pytest modules. |
## Run the tests
```bash
python -m pytest unit_tests python -m pytest unit_tests
```
> The package used to be called `code/`, which shadows Python's standard
> library `code` module. That is not cosmetic: pytest's debugging plugin
> imports `pdb`, `pdb` imports `code`, and it got this directory instead, so
> the whole suite died with an INTERNALERROR before collecting a single test.
> Renaming it is what makes these tests runnable at all.

View File

@ -1,7 +1,7 @@
""" """
Tests begin document function Tests begin document function
""" """
from translator.main import begin_document from code.main import begin_document
# Write python tests for a function translating LaTeX documentclass to html # Write python tests for a function translating LaTeX documentclass to html
def given_empty_then_error(): def given_empty_then_error():

View File

@ -1,7 +1,7 @@
""" """
Tests begin document function Tests begin document function
""" """
from translator.main import begin_tabular from code.main import begin_tabular
# Write python tests for a function translating LaTeX documentclass to html # Write python tests for a function translating LaTeX documentclass to html
def given_empty_then_error(): def given_empty_then_error():

View File

@ -1,4 +1,4 @@
from translator.main import command_name_check from code.main import command_name_check
def given_valid_then_empty(): def given_valid_then_empty():

View File

@ -1,7 +1,7 @@
""" """
Tests document class function Tests document class function
""" """
from translator.main import document_class from code.main import document_class
# Write python tests for a function translating LaTeX documentclass to html # Write python tests for a function translating LaTeX documentclass to html

View File

@ -1,4 +1,4 @@
from translator.main import document_class_only_checks from code.main import document_class_only_checks
def test_missing_curly_bracket(): def test_missing_curly_bracket():

View File

@ -1,4 +1,4 @@
from translator.main import generic_checks from code.main import generic_checks
def test_empty_string(): def test_empty_string():

View File

@ -1,4 +1,4 @@
from translator.main import generic_checks_command from code.main import generic_checks_command
def test_empty_string(): def test_empty_string():

View File

@ -1,7 +1,7 @@
""" """
Tests begin document function Tests begin document function
""" """
from translator.main import length_conversions from code.main import length_conversions
# Write python tests for a function translating LaTeX documentclass to html # Write python tests for a function translating LaTeX documentclass to html

View File

@ -1,4 +1,4 @@
from translator.main import only_pipes_and_space from code.main import only_pipes_and_space
def given_empty_then_true(): def given_empty_then_true():

View File

@ -1,4 +1,4 @@
from translator.main import split_columns from code.main import split_columns
def given_empty_then_correct(): def given_empty_then_correct():

View File

@ -1,4 +1,4 @@
from translator.main import split_rows from code.main import split_rows
def given_empty_then_correct(): def given_empty_then_correct():

View File

@ -1,4 +1,4 @@
from translator.main import tabular_columns_parameters from code.main import tabular_columns_parameters
def given_empty_then_error(): def given_empty_then_error():

View File

@ -2,7 +2,7 @@
Tests tabular_parameters function Tests tabular_parameters function
""" """
from translator.main import tabular_parameters from code.main import tabular_parameters
def given_empty_then_empty(): def given_empty_then_empty():
""" """

View File

@ -2,7 +2,7 @@
Tests tabular_parameters function Tests tabular_parameters function
""" """
from translator.main import tabular_required_parameters from code.main import tabular_required_parameters
def given_empty_then_error(): def given_empty_then_error():

View File

@ -1,4 +1,4 @@
from translator.main import translate_column from code.main import translate_column
def given_empty_then_correct(): def given_empty_then_correct():

View File

@ -1,5 +1,5 @@
from translator.main import translate_inside_to_html from code.main import translate_inside_to_html
from translator.main import tabular_required_parameters from code.main import tabular_required_parameters
def given_correct_then_correct(): def given_correct_then_correct():

View File

@ -1,13 +0,0 @@
#!/bin/bash
#
# Programming/ECOTE -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind python \
--entry "$(dirname "$(readlink -f "$0")")/program/translator/main.py" \
--test-dir "$(dirname "$(readlink -f "$0")")/program" \
-- "$@"

View File

@ -1,12 +0,0 @@
#!/bin/bash
#
# Programming/ECRYPT -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind none \
--note "test1.py is a 0-byte stub; this course produced no submitted code" \
-- "$@"

View File

Can't render this file because it is too large.

View File

Can't render this file because it is too large.

View File

@ -1,8 +1,4 @@
\documentclass[12pt]{article} \documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
% T1 is required for Polish ogonek characters; without it pdflatex
% fails with "Command \k unavailable in encoding OT1".
\usepackage[T1]{fontenc}
\usepackage{hyperref} \usepackage{hyperref}
\usepackage{graphicx} \usepackage{graphicx}
\usepackage{float} \usepackage{float}

View File

@ -1,14 +0,0 @@
#!/bin/bash
#
# Programming/ECRYPT_PROJECT -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
# No --entry on purpose: code/project.py prompts on stdin, so it cannot be run
# headlessly. This course ships a real pytest suite, and that is the check.
course_main --kind python \
--test-dir "$(dirname "$(readlink -f "$0")")/sieve" \
-- "$@"

View File

@ -1,12 +0,0 @@
#!/bin/bash
#
# Programming/EGUI -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind dotnet \
--entry "$(dirname "$(readlink -f "$0")")/lab2/lab2" \
-- "$@"

View File

@ -15,7 +15,7 @@
g++ -Wall -Wextra -Werror -pedantic lab_2.cpp currency.hpp g++ -Wall -Wextra -Werror -pedantic lab_2.cpp currency.hpp
*/ */
#include "currency.hpp" #include "currency2.hpp"
#include <iostream> #include <iostream>
int main() { int main() {

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# Programming/EOOP -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind cxx \
-- "$@"

View File

@ -1,12 +0,0 @@
#!/bin/bash
#
# Programming/EOPSY -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind make \
--entry "$(dirname "$(readlink -f "$0")")/lab3/task3/ftp" \
-- "$@"

View File

@ -1,12 +0,0 @@
#!/bin/bash
#
# Programming/EPFU -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind make \
--entry "$(dirname "$(readlink -f "$0")")/penguins/src" \
-- "$@"

View File

@ -1,8 +1,4 @@
\documentclass{article} \documentclass{article}[11pt]
\usepackage[utf8]{inputenc}
% T1 is required for Polish ogonek characters; without it pdflatex
% fails with "Command \k unavailable in encoding OT1".
\usepackage[T1]{fontenc}[11pt]
\usepackage{graphicx} \usepackage{graphicx}
\usepackage{float} \usepackage{float}

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# Programming/ERSMS-project -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind compose \
-- "$@"

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# Programming/NLP -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind python \
-- "$@"

View File

@ -1,11 +0,0 @@
#!/bin/bash
#
# Programming/PBAD -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind notebook \
-- "$@"

View File

@ -1,8 +1,4 @@
\documentclass[12pt]{article} \documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
% T1 is required for Polish ogonek characters; without it pdflatex
% fails with "Command \k unavailable in encoding OT1".
\usepackage[T1]{fontenc}
\usepackage{pgfplots} \usepackage{pgfplots}
\usepgfplotslibrary{groupplots} \usepgfplotslibrary{groupplots}
\pgfplotsset{compat=1.17} \pgfplotsset{compat=1.17}

View File

@ -1,12 +0,0 @@
#!/bin/bash
#
# Programming/PORR -- see ../../run.sh for the probe contract.
set -euo pipefail
# shellcheck source-path=SCRIPTDIR
# shellcheck source=../../scripts/course_lib.sh
. "$(dirname "$(readlink -f "$0")")/../../scripts/course_lib.sh"
course_main --kind python \
--entry "$(dirname "$(readlink -f "$0")")/code/main.py" \
-- "$@"

View File

@ -1,21 +1,5 @@
#!/bin/bash #!/bin/bash
# --probe: report whether this can run here WITHOUT running it, per the
# contract in ../../run.sh. This script is the original coursework runner and
# is deliberately left otherwise untouched, so the probe is a early exit
# rather than a rewrite -- it installs packages with sudo and starts Kafka,
# which is exactly what a probe must never trigger.
if [[ "${1:-}" == "--probe" ]]; then
for tool in python mvn java; do
if ! command -v "$tool" > /dev/null 2>&1; then
echo "needs $tool"
exit 78
fi
done
echo "starts the Kafka/Flink stack (installs packages with sudo)"
exit 0
fi
# Function to run a script in the background and save its PID # Function to run a script in the background and save its PID
run_script() { run_script() {
python "$1" & python "$1" &

View File

@ -1,9 +1,6 @@
\documentclass[a4paper, 12pt]{article} \documentclass[a4paper, 12pt]{article}
\usepackage{graphicx} \usepackage{graphicx}
\usepackage[utf8]{inputenc} \usepackage[utf8]{inputenc}
% T1 is required for Polish ogonek characters; without it pdflatex
% fails with "Command \k unavailable in encoding OT1".
\usepackage[T1]{fontenc}
\usepackage[polish]{babel} % Add Polish language support \usepackage[polish]{babel} % Add Polish language support
% Default fixed font does not support bold face % Default fixed font does not support bold face

Some files were not shown because too many files have changed in this diff Show More