Compare commits

..

4 Commits

Author SHA1 Message Date
a8d873b4fd Run all 33 safe courses; fix what that broke
Some checks are pending
md-naming / markdown naming convention (push) Waiting to run
pre-commit / pre-commit (push) Waiting to run
runnability / runnability (push) Waiting to run
Running one directory (EADS) had already produced four bugs, so all of them
were run. 11 failed. Every one was real -- either in the coursework or in the
harness I had just written -- and the split was roughly even.

Coursework bugs:
  - 15 .tex files use Polish ogonek characters with no fontenc, so pdflatex
    dies with "Command \k unavailable in encoding OT1". Fixed where it was
    actually needed, not blanket-applied.
  - BSS had \documentclass{article}[12pt] -- options after the class name,
    where they are not options at all.
  - SDM's beamer deck had a stray } on an \item, which took out the frame.
  - EOOP/Various/currency included "currency2.hpp"; the file is currency.hpp.
  - ECRYPT_PROJECT had the SAME stdlib-shadowing bug as ECOTE: a package named
    code/. Renamed to sieve/, and its 99 tests now run. With ECOTE's 26 that
    is 125 tests that could not execute at all before today.

Harness bugs, which the run is what exposed:
  - COURSE_ENTRY pointed at directories for PORR and ECRYPT_PROJECT, so python
    looked for __main__.py and reported the wrong problem.
  - main.py was auto-picked via find's first result. EARIN has six labs and
    six main.py files, so that ran an arbitrary lab and called it the course.
    Now only auto-picked when exactly one exists.
  - Only the first requirements.txt was installed, which is why EARIN still
    died on gymnasium after a venv was created for it. All of them now.
  - The notebook probe accepted jupyter being on PATH. This machine's jupyter
    is a pipx shim whose interpreter is gone, so "runnable" was a lie; it now
    invokes jupyter --version and PBAD/twm_4 report blocked, honestly.
  - Nothing ran a course's tests. Where a suite exists it is now the check,
    which matters most for ECRYPT_PROJECT, whose program prompts on stdin and
    cannot be run headlessly at all.
  - Which directory pytest runs from is course-specific and unguessable, so
    stubs pass --test-dir: ECOTE needs program/ for imports, ECRYPT_PROJECT
    needs sieve/ because its fixtures open a CSV by relative path.

gates/known-incomplete.txt records the one file that genuinely cannot build:
EOOP/Various/set/set.cpp includes set.hpp, which `git log --all` shows has
never existed here. The course supplied it and only the .cpp was submitted.
That is a factual record with a stated check, not a lint allowlist -- and
fabricating the header would be inventing coursework.

Status is now 36 runnable / 5 no-code / 3 blocked.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172dj34FDpao6wsix8ZuCzE
2026-08-28 18:52:31 +02:00
e512bde26f Gate the invariants, fix ECOTE's unrunnable tests, contain build output
Two invariants had been established by hand and left ungated, which is the
"a remedy that only works if someone remembers" pattern:

  - scripts/check_ignore_consistency.sh fails the commit if any TRACKED file
    is also gitignored. .binary-allowlist used to *instruct* the reader to
    re-run that check; now it is enforced. Verified both ways -- passes on the
    tree, and fails when an ignored file is force-added.

DOCS-runnability.md now really has two columns. Each environment writes only
its own gates/runnability-<env>.tsv and the doc renders from both, so a CI run
cannot clobber the local results. The ci tsv is gitignored: committing a copy
generated here would label this machine's capabilities as the runner's.
Rendering it surfaced a classic bug -- awk's NR==FNR idiom silently swallows
the SECOND file when the first is empty, so the table came out with a header
and no rows. It compares FILENAME instead.

runnability.yml deliberately does NOT diff against a committed baseline. A
status is a property of the machine, so `runnable` locally and `blocked` on a
runner is correct rather than drift, and diffing would make the workflow red
by construction. It fails on `error` instead -- a runner that crashes or
reports an unknown kind.

Then five more courses were actually run, because EADS alone had produced four
real bugs and one sample proves nothing:

  - ECOAR and EPFU build (nasm + 32-bit gcc, and gcc respectively).
  - ECOTE's 17 test modules could not run AT ALL. Its package is named `code/`,
    which shadows the standard library: pytest's debugging plugin imports pdb,
    pdb imports code, and it got this directory instead, so the suite died
    with an INTERNALERROR before collecting a single test. Renamed to
    translator/ with all 17 imports updated -- 26 tests now pass.
  - A LaTeX report builds. That one exposed a hazard rather than a bug:
    latexmk wrote its PDF beside the source, and in a course where the built
    name matches the submitted one it would have silently overwritten a
    tracked deliverable. Both the LaTeX and C++ runners now build into a
    gitignored build/, and rebuilding ECOGR leaves `git status` empty.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172dj34FDpao6wsix8ZuCzE
2026-08-28 18:43:13 +02:00
badc21d653 Record what is left, with measured sizes rather than estimates
The remaining work is much larger than what has landed, and vague about it
would be worse than useless. Numbers are measured, not guessed:

  - 9,281 ruff findings under the fleet config (select = ALL). ~3,000 are
    auto-fixable and ~6,000 are hand work, dominated by 1,671 missing type
    annotations and ~600 missing docstrings.
  - 19 tests for ~28k lines of authored code, across 12 languages.
  - 73 files still over the 250-line cap, 27 of which are blocked on the
    decision parked in TODO-file-length-250.md.
  - 22 dependency manifests, none pinned.

Also records the ordering rules that are easy to lose: the dependency upgrade
and its gate must land in the same commit; source files must not be split
before their tests exist; and the file-rewriting hooks are held back so that
touching hundreds of submitted coursework files is its own reviewed change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172dj34FDpao6wsix8ZuCzE
2026-08-28 18:39:06 +02:00
f7763bb1cd Add a run.sh to every course, and fix the code that would not build
All 44 directories now probe: 38 runnable, 5 no-code, 1 blocked (ENUME needs
MATLAB or Octave, neither of which is on this machine).

The runners are stubs over one shared scripts/course_lib.sh rather than 44
copies of the logic, for the same reason the gates live in ~/utils. A stub
passes its kind as ARGUMENTS -- course_main --kind python --entry ... -- "$@"
-- rather than setting globals, because globals a linter cannot see being read
mean SC2034 on every one of them, and the only cure would be 44 disables.

Fixed along the way:
  - Generating the stubs overwrote Programming/PSD/run.sh, the original
    coursework runner. Restored, and given a --probe early exit instead so it
    is otherwise untouched: it installs packages with sudo and starts Kafka,
    which is exactly what a probe must not trigger.
  - The probe guard only recognised runners containing the literal --probe, so
    the new stubs (which delegate to the library) all read unprobed. It now
    also accepts delegation to course_lib.sh.
  - Blocked probes reported "unknown" because _require_any prints the tool it
    found, so probes redirected its stdout -- swallowing the failure reason
    too. Split into _probe_any, and ENUME now says exactly what it needs.
  - shellcheck runs with -x so it follows the sourced library; without it every
    stub reports SC1091 and the only alternative is a per-file disable. The
    library itself carries `# shellcheck shell=bash` because it has no shebang
    on purpose -- it is sourced, never executed.

Then EADS was actually run, and three of its six C++ files did not compile:
  - lab3.cpp: copyDictionary was declared taking Dictionary* but its body used
    Node members, and the copy constructor called copyTree(), which does not
    exist. The copy also dropped key and balanceFactor. Now compiles AND runs,
    printing its AVL tests.
  - MidTerm/task2.cpp: a const mismatch between declaration and definition, a
    stray semicolon before a function body, findNode calling a Tree method on
    a treeNode*, and a while loop that never advanced. sumNodeSub also had no
    base case -- unreachable before, because the const mismatch meant its body
    was never compiled.
These compiled years ago because older GCC did not diagnose uninstantiated
template bodies. Fragments with no main() are now type-checked with -c rather
than linked, since two of these files are exam answers, not programs.

Binaries go to a gitignored build/ -- an extensionless executable dropped next
to its source is not something .gitignore catches by name.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172dj34FDpao6wsix8ZuCzE
2026-08-28 18:37:55 +02:00
115 changed files with 1346 additions and 148 deletions

View File

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

40
.github/workflows/runnability.yml vendored Normal file
View File

@ -0,0 +1,40 @@
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,3 +479,13 @@ target/
# 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.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,6 +56,15 @@ repos:
language: script
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.
- id: md-naming
name: markdown naming convention
@ -63,9 +72,13 @@ repos:
language: system
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
name: shellcheck
entry: bash -c 'printf "%s\0" "$@" | xargs -0 -n 40 shellcheck' --
entry: bash -c 'printf "%s\0" "$@" | xargs -0 -n 40 shellcheck -x' --
language: system
types: [shell]
exclude_types: [zsh]

View File

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

11
NotProgramming/DPZ/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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 \
-- "$@"

11
NotProgramming/ECOGR/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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 \
-- "$@"

11
NotProgramming/EDABA-LAB/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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,4 +1,8 @@
\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{hyperref}
\usepackage{pdfpages}

11
NotProgramming/EDABA/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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 \
-- "$@"

11
NotProgramming/EDISE/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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 \
-- "$@"

12
NotProgramming/EDISP/run.sh Executable file
View File

@ -0,0 +1,12 @@
#!/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" \
-- "$@"

11
NotProgramming/ELAC/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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 \
-- "$@"

11
NotProgramming/EMISY/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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 \
-- "$@"

11
NotProgramming/ENUME/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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 \
-- "$@"

12
NotProgramming/EPHY2/run.sh Executable file
View File

@ -0,0 +1,12 @@
#!/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" \
-- "$@"

12
NotProgramming/EPOGAI/run.sh Executable file
View File

@ -0,0 +1,12 @@
#!/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" \
-- "$@"

11
NotProgramming/ERPM/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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 \
-- "$@"

11
NotProgramming/ESDP1/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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 \
-- "$@"

11
NotProgramming/ESOEN/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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 \
-- "$@"

11
NotProgramming/MOM/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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 Materiały
\item Zasoby (Assety)
\item Dostępne funkcje}
\item Dostępne funkcje
\item ChatGPT
\end{itemize}
\end{frame}

11
NotProgramming/SDM/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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,4 +1,8 @@
\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{graphicx}

11
NotProgramming/SDM2/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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,6 +1,9 @@
\documentclass[12pt]{article}
\usepackage[polish]{babel}
\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{float}
\usepackage{graphicx} % Add this line to include graphics

11
NotProgramming/SPD/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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,4 +1,8 @@
\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}

12
NotProgramming/STUP/run.sh Executable file
View File

@ -0,0 +1,12 @@
#!/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,4 +1,8 @@
\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
\usepackage{amsmath, amssymb, amsthm} % For math symbols and theorems

View File

@ -2,6 +2,9 @@
\usepackage[left=0.75in,right=0.75in,bottom=0.75in]{geometry}
\usepackage[polish]{babel}
\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{graphicx}
\usepackage{enumitem}

11
Programming/AIS/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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 \
-- "$@"

12
Programming/BD2/run.sh Executable file
View File

@ -0,0 +1,12 @@
#!/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,4 +1,10 @@
\documentclass{article}[12pt]
% Options belong BEFORE the class name; this read
% \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}
\title{[BSS]-Lab1-śr16-KrzysztofRudnicki}

11
Programming/BSS/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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,5 +1,8 @@
\documentclass{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{listings}
\usepackage{xcolor}
\usepackage{graphicx}

11
Programming/E-PSYOPS/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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

@ -1,55 +1,60 @@
// Krzysztof Rudnicki, 307585
struct treeNode
{
int key;
treeNode *left;
treeNode *right;
};
class Tree{
private:
treeNode *root;
public:
bool checkKeys(int givenKey);
bool findNode(treeNode*& nodeToFound, int givenKey);
int sumNodeSub(treeNode* start);
};
int Tree::sumNodeSub(const treeNode* start)
{
return (sumNodeSub(start->right)
+ sumNodeSub(start->left)
+ start->key);
}
bool Tree::findNode(treeNode*& nodeToFound, int givenKey);
{
treeNode* curr = root;
treeNode* Cleft = curr->left;
treeNode* Cright = curr->right;
while(curr != nullptr)
{
if(curr -> key == givenKey)
{
nodeToFound = curr;
return 1;
}else
{
if(Cleft.findNode(nodeToFound, givenKey)) return 1;
if(Cright.findNode(nodeToFound, givenKey)) return 1;
}
}
return 0;
}
bool Tree::checkKeys(int key)
{
treeNode* start;
if (!findNode(start, key)) return 0;
// if we did not find the node we cannot compare the keys of it's left and right subtrees
return (sumNodeSub(start->left) > sumNodeSub(start->right));
// Krzysztof Rudnicki, 307585
struct treeNode
{
int key;
treeNode *left;
treeNode *right;
};
class Tree{
private:
treeNode *root;
public:
bool checkKeys(int givenKey);
bool findNode(treeNode*& nodeToFound, int givenKey);
static bool findNodeFrom(treeNode* curr, treeNode*& nodeToFound, int givenKey);
int 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)
+ sumNodeSub(start->left)
+ start->key);
}
// As submitted this did not compile: it called findNode on a treeNode*, which
// 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;
if(curr -> key == givenKey)
{
nodeToFound = curr;
return 1;
}
if(findNodeFrom(curr -> left, nodeToFound, givenKey)) return 1;
return findNodeFrom(curr -> right, nodeToFound, givenKey);
}
bool Tree::findNode(treeNode*& nodeToFound, int givenKey)
{
return findNodeFrom(root, nodeToFound, givenKey);
}
bool Tree::checkKeys(int key)
{
treeNode* start;
if (!findNode(start, key)) return 0;
// if we did not find the node we cannot compare the keys of it's left and right subtrees
return (sumNodeSub(start->left) > sumNodeSub(start->right));
}

View File

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

11
Programming/EADS/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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,4 +1,8 @@
\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{hyperref}

11
Programming/EARIN/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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 \
-- "$@"

12
Programming/ECOAR/run.sh Executable file
View File

@ -0,0 +1,12 @@
#!/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,9 +1,21 @@
To run unit tests:
Enter project environment:
# ECOTE translator
source /ecote/bin/activate
Translates LaTeX `tabular` environments into HTML tables.
Run tests:
| Path | What it is |
|---|---|
| `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
```
> 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
"""
from code.main import begin_document
from translator.main import begin_document
# Write python tests for a function translating LaTeX documentclass to html
def given_empty_then_error():

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

13
Programming/ECOTE/run.sh Executable file
View File

@ -0,0 +1,13 @@
#!/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" \
-- "$@"

12
Programming/ECRYPT/run.sh Executable file
View File

@ -0,0 +1,12 @@
#!/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

@ -1,4 +1,8 @@
\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{graphicx}
\usepackage{float}

View File

@ -0,0 +1,14 @@
#!/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

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

View File

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

12
Programming/EGUI/run.sh Executable file
View File

@ -0,0 +1,12 @@
#!/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
*/
#include "currency2.hpp"
#include "currency.hpp"
#include <iostream>
int main() {

11
Programming/EOOP/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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 \
-- "$@"

12
Programming/EOPSY/run.sh Executable file
View File

@ -0,0 +1,12 @@
#!/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" \
-- "$@"

12
Programming/EPFU/run.sh Executable file
View File

@ -0,0 +1,12 @@
#!/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,4 +1,8 @@
\documentclass{article}[11pt]
\documentclass{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}[11pt]
\usepackage{graphicx}
\usepackage{float}

View File

@ -0,0 +1,11 @@
#!/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 \
-- "$@"

11
Programming/NLP/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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 \
-- "$@"

11
Programming/PBAD/run.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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,4 +1,8 @@
\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}
\usepgfplotslibrary{groupplots}
\pgfplotsset{compat=1.17}

12
Programming/PORR/run.sh Executable file
View File

@ -0,0 +1,12 @@
#!/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,5 +1,21 @@
#!/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
run_script() {
python "$1" &

View File

@ -1,6 +1,9 @@
\documentclass[a4paper, 12pt]{article}
\usepackage{graphicx}
\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
% Default fixed font does not support bold face

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