The programming assignments appear as assignments on Canvas, but the description of the problems appear separately in a pdf that you can also find on Canvas. For example, in the Canvas module "Introduction and warm-up", there is a Canvas assignment "Python warm-up" that integrates with the Canvas calendar and gradebook. But the description of the problems themselves are found in the accompanying file "Python Warm-up Assignment."
The programming assignments in this course work similarly to what you may remember from CSCI 345 Data Structures and Algorithms: You'll get starter code from the course GitHub repository, use provided test cases to test your code, and turn in the files you modified to a turn-in folder on the lab file system.
Unlike CSCI 345, I won't grade you solely on passing the provided test cases. I reserve the right to make new test cases for grading and to inspect your code, grade on efficiency and style, etc. (Who knows, though, I might get lazy and just run the provided test cases after all.) Moreover, programming problems are due as indicated, not at the end of the semester.
First, clone the repsository from github. The repository is
TVD-WC-CSCI/CSCI384_CL_F23
git clone https://github.com/TVD-WC-CSCI/CSCI384_CL_F23.git
In the course repository you'll find a folder called assignments. This folder has a subfolder for each assignment. Most assignments will have only one file you need to modify. Most of the time you'll be writing functions whose stubs are provided in the file.
In case you have any trouble with the repository, I have a copy of the repository in the course Public folder on the CSCI lab. You can find it as
/homes/tvandrun/Public/cs384/CSCI384_CL_F23
Turn in the file you have modified to a turn-in folder named
/cslab/class/cs381/(your userid)/(assignment name).
The "assignment name" used as the name of the turn-in folder is the same as the name of the folder in the repository with the starter code.
For example, if Count Dooku is doing the first assignment (Python
warmup), he should edit the file
assignments/python-warmup/warmup.py
in
his copy of the repository. After writing the bigram_freq()
function, he can use the testcase
test_bigram_freq.py
through the pytest tool:
pytest bigram_freq.py
When he is all done with the assignment, he can copy the file warmup.py to the appropriate turnin folder. If he's doing this completely on the CSCI lab machines, then he does:
cp warmup.py /cslab/class/cs384/countdooku/python-warmup
But if he's copying the file from his own computer, he uses secure copy (scp):
scp warmup.py countdooku@csgate.wheaton.edu:/cslab/class/cs384/countdooku/python-warmup
If you're not sure about where to turn something in, or whether you have
turned something in, etc, you can always ls your turn-in folders. For
example (the %
indicates the command prompt so that you
can see the difference between what the user enters and what the response is),
$ ls /cslab/class/cs384/countdooku python-warmup regex $ ls /cslab/class/cs384/countdooku/python-warmup warmup.py
If there's anything you're unsure about regarding an assignment or the logistic of the course, you can always ask your instructor.
If you want to redo a notebook from a lab activity for your own practice (or because you missed the lab), you can grab the notebook file from the course Public folder, for example
/homes/tvandrun/Public/cs384/labs/python_nltk_demo.ipynb
To launch a notebook, the command is
jupyter notebook --ip=127.0.0.1
At least, that's what you need to do on the cslab machines.
I have found that on my own Mac laptop the
--ip=127.0.0.1
is unnecessary.
Remember that Jupyter notebooks run in a browser. If you have a browser open, then Jupyter will start in a new tab. If you do not have a browser open, then Jupyter will launch the default browser.
In CSCI 384, we use Python 3.
Note that in the CSCI lab,
the python
command
maps to Python 3.
This is new---last school year and earlier python
defaulted
to Python 2.7, and you had to use python3
for Python 3.
Consequently I still tend to use the python3
command out
of habit, and my assignment instructions usually refer to
the python3
command as well
(which is fine; python3
is an alias for python
).
If you plan to use your own computer, make sure you have Python 3 installed. You'll also need the following libraries (this list might grow over the course of the semester):
np
.
https://numpy.org/.
This is a package for scientific computing; we'll especially use
its implementation of arrays.
sklearn
.
https://scikit-learn.org/stable/.
This is a widely-used package for machine learning.
Moreover, you'll need the pytest tool https://docs.pytest.org/en/7.1.x/getting-started.html
In lab activities we'll be using Jupyter notebooks. Although not necessary for any assignments, if you want to revisit any lab activity on your own computer, you'll need the Jupyter tool: https://jupyter.org/install You'll also need the visualization library Matplotlib: