Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 72 additions & 14 deletions 02_activities/assignments/assignment_1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,32 +56,65 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# For testing purposes, we will write our code in the function\n",
"def anagram_checker(word_a, word_b):\n",
" # Your code here\n",
"\n",
" return sorted(word_a.lower()) == sorted(word_b.lower())\n",
"# Run your code to check using the words below:\n",
"anagram_checker(\"Silent\", \"listen\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"False"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"anagram_checker(\"Silent\", \"Night\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"anagram_checker(\"night\", \"Thing\")"
]
Expand All @@ -97,22 +130,47 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"def anagram_checker(word_a, word_b, is_case_sensitive):\n",
" # Modify your existing code here\n",
"\n",
" if not is_case_sensitive:\n",
" word_a = word_a.lower()\n",
" word_b = word_b.lower()\n",
" return sorted(word_a) == sorted(word_b)\n",
"# Run your code to check using the words below:\n",
"anagram_checker(\"Silent\", \"listen\", False) # True"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 9,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"False"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"anagram_checker(\"Silent\", \"listen\", True) # False"
]
Expand All @@ -139,7 +197,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "new-learner",
"display_name": "dsi_participant",
"language": "python",
"name": "python3"
},
Expand All @@ -153,7 +211,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.9.19"
}
},
"nbformat": 4,
Expand Down
46 changes: 46 additions & 0 deletions python-main/.github/issue_template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Bug Report
description: Report a bug
title: "[Bug]: "
labels: ["bug"]
assignees:
- danielrazavi
- rohanalexander
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to help everyone identify and fix the bug
- type: textarea
id: description
attributes:
label: Describe your issue
placeholder: When I click here this happens
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
placeholder: |
1. Go to page X
2. Click here
3. Click there
validations:
required: true
- type: textarea
id: expected
attributes:
label: What was the expected result?
placeholder: I expected this to happen
- type: textarea
id: screenshots
attributes:
label: Put here any screenshots or videos (optional)
- type: textarea
id: assignee
attributes:
label: Put here the code owner you'd like to review this issue.
- type: markdown
attributes:
value: |
Thanks for reporting this issue! We will get back to you as soon as possible.
16 changes: 16 additions & 0 deletions python-main/.github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!-- PULL REQUEST TITLE: UofT-DSI | <Module Name> - Assignment <assignment number>-->

## What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)

## What did you learn from the changes you have made?

## Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?

## Were there any challenges? If so, what issue(s) did you face? How did you overcome it?

## How were these changes tested?

## A reference to a related issue in your repository (if applicable)

## Checklist
- [ ] I can confirm that my changes are working as intended
26 changes: 26 additions & 0 deletions python-main/.github/workflows/automatic_pr_comment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Automatic PR Comment

on:
pull_request_target:
types: [opened, synchronize]

jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Comment on PR
uses: actions/github-script@v6
with:
script: |
const issue_number = context.payload.pull_request.number;
const repo = context.repo;
const commentBody = `Hello, thank you for your contribution. If you are a participant, please close this pull request and open it in your own forked repository instead of here. Please read the instructions on your onboarding [Assignment Submission Guide](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md) more carefully. If you are not a participant, please give us up to 72 hours to review your PR. Alternatively, you can reach out to us directly to expedite the review process.`;
// Check if the PR is made to a repo in the UofT-DSI organization
if (repo.owner === 'UofT-DSI') {
github.rest.issues.createComment({
owner: repo.owner,
repo: repo.repo,
issue_number: issue_number,
body: commentBody
});
}
6 changes: 6 additions & 0 deletions python-main/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.DS_Store
.vscode/
plants.txt
uv.lock
python-env
.venv
Binary file added python-main/01_materials/concept_maps.pdf
Binary file not shown.
Binary file added python-main/01_materials/concept_maps.pptx
Binary file not shown.
Binary file added python-main/01_materials/pre-course_work.pdf
Binary file not shown.
Loading