From e976b55a5c2a83f4f2ab1221ea228c9b8737db4f Mon Sep 17 00:00:00 2001 From: Simeon Wong Date: Thu, 14 Nov 2024 20:32:09 -0500 Subject: [PATCH 1/4] delete ip logs... WARNING UNTESTED! --- 02_activities/assignments/assignment.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index d81e9a77b..001291867 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -33,6 +33,7 @@ unzip rawdata.zip # 6. Repeat the above step for user logs and event logs # 7. For user privacy, remove all files containing IP addresses (files with "ipaddr" in the filename) from ./data/raw and ./data/processed/user_logs +rf -rf ./data # 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed From ea20676d33161a6f4d0fcd3c4f7aa5360f0f4309 Mon Sep 17 00:00:00 2001 From: Simeon Wong Date: Thu, 14 Nov 2024 20:55:44 -0500 Subject: [PATCH 2/4] initialize README file with company name --- 02_activities/assignments/assignment.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 001291867..f2bfd22bd 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -11,6 +11,7 @@ set -x mkdir analysis output touch README.md +echo "# Project Name: DSI Consulting Inc." > README.md touch analysis/main.py # download client data From 043ffdadfa9611722c5ebfee1877189f6d74307a Mon Sep 17 00:00:00 2001 From: zsepahi Date: Mon, 13 Oct 2025 22:44:27 -0400 Subject: [PATCH 3/4] tiny channge --- text.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 text.txt diff --git a/text.txt b/text.txt new file mode 100644 index 000000000..e69de29bb From 3d7070107dd58745cf2935cdc08e52bafa16d200 Mon Sep 17 00:00:00 2001 From: zsepahi Date: Tue, 14 Oct 2025 10:51:12 -0400 Subject: [PATCH 4/4] complete assignment --- 02_activities/assignments/assignment.sh | 21 +++- bob.md | 144 ------------------------ 2 files changed, 19 insertions(+), 146 deletions(-) delete mode 100644 bob.md diff --git a/02_activities/assignments/assignment.sh b/02_activities/assignments/assignment.sh index 8af8dc092..378b1ec39 100644 --- a/02_activities/assignments/assignment.sh +++ b/02_activities/assignments/assignment.sh @@ -9,6 +9,9 @@ set -x # project name and a brief description of the project. # Then it unzips the raw data provided by the client. +# added to remove project folder to enable the script to directly delete any pre-existing folder +rm -rf newproject + if [ -d newproject ]; then echo "Directory 'newproject' already exists. Please remove it before running this script." exit 1 @@ -26,24 +29,38 @@ unzip -q rawdata.zip ########################################### # Complete assignment here +# added this to remove file folder +rm -rf data # 1. Create a directory named data +mkdir data # 2. Move the ./rawdata directory to ./data/raw +mv ./rawdata ./data/raw # 3. List the contents of the ./data/raw directory +ls ./data/raw # 4. In ./data/processed, create the following directories: server_logs, user_logs, and event_logs +# -p will create the leading folders because processed is initially not there, so you add the processed folder and server/user/event logs +mkdir -p ./data/processed/server_logs +mkdir -p ./data/processed/user_logs +mkdir -p ./data/processed/event_logs # 5. Copy all server log files (files with "server" in the name AND a .log extension) from ./data/raw to ./data/processed/server_logs +cp ./data/raw/*server*.log ./data/processed/server_logs # 6. Repeat the above step for user logs and event logs +cp ./data/raw/*user*.log ./data/processed/user_logs +cp ./data/raw/*event*.log ./data/processed/event_logs # 7. For user privacy, remove all files containing IP addresses (files with "ipaddr" in the filename) from ./data/raw and ./data/processed/user_logs +rm -f ./data/raw/*ipaddr* ./data/processed/user_logs/*ipaddr* # 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed - +# > means to take the results and stored somewhere else +find ./data/processed -type f > ./data/inventory.txt ########################################### -echo "Project setup is complete!" +echo "Project setup is complete!" \ No newline at end of file diff --git a/bob.md b/bob.md deleted file mode 100644 index d5e5a78a4..000000000 --- a/bob.md +++ /dev/null @@ -1,144 +0,0 @@ -# Unix shell - -## Content - -* [Description](#description) -* [Learning Outcomes](#learning-outcomes) -* [Activities](#activities) -* [Contacts](#contacts) -* [Delivery of the Learning Module](#delivery-of-the-learning-module) -* [Schedule](#schedule) -* [Requirements](#requirements) -* [Resources](#resources) - + [Cheat sheet](#cheat-sheet) - + [Videos](#videos) - + [How to Get Help](#how-to-get-help) -* [Folder Structure](#folder-structure) - -## Description - -This module introduces the Unix shell language and covers file and directory navigation and manipulation. Participants gain proficiency in various commands, script creation, and writing basic functions using pipes, filters, and loops. - -Participants will acquire problem-solving skills through live coding sessions. Additionally, they will explore the concept of reproducibility and its integration into their work. - -## Learning Outcomes -By the end of the module, participants will be able to: -* Comfortably access and navigate the terminal -* Create, modify and delete directories and files - - -## Activities -This module has two types of activities. -1. Assignments are mandatory, and form part of your evaluation. -1. Practice problems are not assessed, but are provided to you for extra practice. We encourage you to work on them together and discuss solutions during Work Periods and on the Slack! - -### Assignments -Participants should review the [Assignment Submission Guide](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md) for instructions on how to complete assignments in this module. - -1. [Shell script assignment](./02_activities/assignments/assignment_instructions.md) - -### Practice Problems -1. [Shell Basics](https://uoft-dsi.github.io/shell/interactive_problems.html#shell_basics) -1. [Shell Moderate](https://uoft-dsi.github.io/shell/interactive_problems.html#shell_moderate) -1. [Shell Advanced](./02_activities/practice/shell_advanced/shell_advanced.md) - - -## Contacts - -**Questions can be submitted to the #dc2-help channel on Slack** - -* Technical Facilitator: - * **Daniel Razavi** - daniel.razavi@utoronto.ca - -* Learning Support Staff: - * **Dmytro Bonislavskyi** - dmytro.bonislavskyi@gmail.com - * **Anjali Desphande** - anju_shrivastava@yahoo.com - * **Sergii Khomych** - svkhomich1@gmail.com -  -## Delivery of the Learning Module - -This module will include live learning sessions and optional, asynchronous work periods. During live learning sessions, the Technical Facilitator will introduce and explain key concepts and demonstrate core skills. Learning is facilitated during this time. Before and after each live learning session, the instructional team will be available for questions related to the core concepts of the module. Optional work periods are to be used to seek help from peers, the Learning Support team, and to work through the practice problems and assignments in the learning module, with access to live help. Content is not facilitated, but rather this time should be driven by participants. We encourage participants to come to these work periods with questions and problems to work through. -  -Participants are encouraged to engage actively during the learning module. They key to developing the core skills in each learning module is through practice. The more participants engage in coding along with the instructional team, and applying the skills in each module, the more likely it is that these skills will solidify. - -  -## Requirements - -* Participants are not expected to have any coding experience; the learning content has been designed for beginners. -* Participants are encouraged to ask questions, and collaborate with others to enhance their learning experience. -* Participants must have a computer and an internet connection to participate in online activities. -* Participants must not use generative AI such as ChatGPT to generate code in order to complete assignments. It should be used as a supportive tool to seek out answers to questions you may have. -* We expect participants to have completed the steps in the [onboarding repo](https://github.com/UofT-DSI/onboarding/blob/main/environment_setup/README.md). -* We encourage participants to default to having their camera on at all times, and turning the camera off only as needed. This will greatly enhance the learning experience for all participants and provides real-time feedback for the instructional team. - -## Resources - -Feel free to use the following as resources: - -### Cheat sheet -- [Devhints](https://devhints.io/bash) -- [Bash-Cheat-Sheet](https://github.com/RehanSaeed/Bash-Cheat-Sheet) - -### Videos -- [Change Directory](https://www.youtube.com/watch?v=6U4XV4w8qtE) -- [Deleting Files and Directories](https://www.youtube.com/watch?v=-L3XeZPwj_Y) -- [Bash in 100 seconds](https://www.youtube.com/watch?v=I4EWvMFj37g) - -### How to Get Help -#### 1. Gather information about your problem -- Copy and paste your error message -- Copy and paste the code that caused the error, and the last few commands leading up to the error -- Write down what you are trying to accomplish with your code. Include both the specific action, and the bigger picture and context -- (optional) Take a screenshot of your entire workspace - -#### 2. Try searching the web for your error message -- Sometimes, the error has common solutions that can be easy to find! - - This will be faster than waiting for an answer -- If none of the solutions apply, consider asking a Generative AI tool - - Paste your code, the error message, and a description of your overall goals - -#### 3. Try asking in your cohort's Slack help channel -- Since we're all working through the same material, there's a good chance one of your peers has encountered the same error, or has already solved it -- Try searching in the DSI Certificates Slack help channel for whether a similar query has been posted -- If the question has not yet been answered, post your question! - - Describe your the overall goals, the context, and the specific details of what you were trying to accomplish - - Make sure to **copy and paste** your code, your error message - - Copying and pasting helps: - 1. Your peers and teaching team quickly try out your code - 1. Others to find your question in the future - -#### Great resources on how to ask good technical questions that get useful answers -- [Asking for Help - The Odin Project](https://www.theodinproject.com/lessons/foundations-asking-for-help) -- [How do I ask a good question? - Stack Overflow](https://stackoverflow.com/help/how-to-ask) -- [The XY problem: A question pitfall that won't get useful answers](https://xyproblem.info/) -- [How to create a minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) - -## Folder Structure -Below is an outline of the folder structure for this module: -``` -. -├── .github -├── 01_materials -├── 02_activities -├── 03_instructional_team -├── 04_this_cohort -├── .gitignore -├── LICENSE -├── SETUP.md -└── README.md - -``` -* **.github**: Contains issue templates and pull request templates for the repository. -* **materials**: Module slides and interactive notebooks (.ipynb files) used during learning sessions. -* **activities**: Contains graded assignments and ungraded practice problems to apply concepts covered in the learning module. -* **instructional_team**: Resources for the instructional team. -* **this_cohort**: Additional materials for this cohort. -* **.gitignore**: Files to exclude from this folder, specified by the Technical Facilitator -* **LICENSE**: The license for this repository. -* **SETUP.md**: Contains the steps required to set up this repo for the module. -* **README.md**: This file. -