Skip to content

Commit

Permalink
Merge branch 'release/7.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
JackMorganNZ committed Sep 17, 2022
2 parents f8effaa + 8bd8aa9 commit 38445d7
Show file tree
Hide file tree
Showing 15 changed files with 107 additions and 46 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/crowdin-actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
uses: actions/checkout@v3

- name: Upload or update source files to Crowdin
uses: crowdin/github-action@1.4.12
uses: crowdin/github-action@1.4.13
with:
upload_sources: true

- name: Download Chinese (simplified) translations
uses: crowdin/github-action@1.4.12
uses: crowdin/github-action@1.4.13
with:
upload_sources: false
download_translations: true
Expand All @@ -42,7 +42,7 @@ jobs:
config: crowdin.yaml

- name: Download French translations
uses: crowdin/github-action@1.4.12
uses: crowdin/github-action@1.4.13
with:
upload_sources: false
download_translations: true
Expand All @@ -60,7 +60,7 @@ jobs:
config: crowdin.yaml

- name: Download German translations
uses: crowdin/github-action@1.4.12
uses: crowdin/github-action@1.4.13
with:
upload_sources: false
download_translations: true
Expand All @@ -78,7 +78,7 @@ jobs:
config: crowdin.yaml

- name: Download Indonesian translations
uses: crowdin/github-action@1.4.12
uses: crowdin/github-action@1.4.13
with:
upload_sources: false
download_translations: true
Expand All @@ -96,7 +96,7 @@ jobs:
config: crowdin.yaml

- name: Download Italian translations
uses: crowdin/github-action@1.4.12
uses: crowdin/github-action@1.4.13
with:
upload_sources: false
download_translations: true
Expand All @@ -114,7 +114,7 @@ jobs:
config: crowdin.yaml

- name: Download Te Reo Māori translations
uses: crowdin/github-action@1.4.12
uses: crowdin/github-action@1.4.13
with:
upload_sources: false
download_translations: true
Expand All @@ -132,7 +132,7 @@ jobs:
config: crowdin.yaml

- name: Download Turkish translations
uses: crowdin/github-action@1.4.12
uses: crowdin/github-action@1.4.13
with:
upload_sources: false
download_translations: true
Expand Down
10 changes: 5 additions & 5 deletions crowdin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ files: [
{
source: csunplugged/locale/en/LC_MESSAGES/*.po,
translation: csunplugged/locale/%two_letters_code%/LC_MESSAGES/%original_file_name%,
languages_mapping": {
languages_mapping: {
two_letters_code: {
zh-CN: zh_Hans,
zh-TW: zh_Hant,
Expand All @@ -16,7 +16,7 @@ files: [
{
source: csunplugged/topics/content/en/**/*.md,
translation: csunplugged/topics/content/%two_letters_code%/**/%original_file_name%,
languages_mapping": {
languages_mapping: {
two_letters_code: {
zh-CN: zh_Hans,
zh-TW: zh_Hant,
Expand All @@ -26,7 +26,7 @@ files: [
{
source: csunplugged/topics/content/en/**/*.yaml,
translation: csunplugged/topics/content/%two_letters_code%/**/%original_file_name%,
languages_mapping": {
languages_mapping: {
two_letters_code: {
zh-CN: zh_Hans,
zh-TW: zh_Hant,
Expand All @@ -36,7 +36,7 @@ files: [
{
source: csunplugged/resources/content/en/*.md,
translation: csunplugged/resources/content/%two_letters_code%/%original_file_name%,
languages_mapping": {
languages_mapping: {
two_letters_code: {
zh-CN: zh_Hans,
zh-TW: zh_Hant,
Expand All @@ -46,7 +46,7 @@ files: [
{
source: subtitles/en/*.vtt,
translation: subtitles/%two_letters_code%/%original_file_name%,
languages_mapping": {
languages_mapping: {
two_letters_code: {
zh-CN: zh_Hans,
zh-TW: zh_Hant,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ For our purposes, it's a fun exercise in reasoning that has some widely used eve
## Facilitator preparation

- Prepare the lessons and trial them with the video conference software that you are going to present with.
- If you aren’t familiar with this activity there is a written description in the classic section of the CS Unplugged website called [Finite State Automata - Treasure Hunt](https://classic.csunplugged.org/activities/finite-state-automata/), and you can see it in action in the [Treasure Hunt](https://www.youtube.com/watch?v=8kagtp2gWhU) video (this version is based on a commuting service run by pirates!).
- If you aren’t familiar with this activity there is a written description in the Classic CS Unplugged website called [Finite State Automata - Treasure Hunt](https://classic.csunplugged.org/activities/finite-state-automata/), and you can see it in action in the [Treasure Hunt](https://www.youtube.com/watch?v=8kagtp2gWhU) video (this version is based on a commuting service run by pirates!).
A slightly different version based on a commuter train service is in the “Formal Languages” chapter of the Computer Science Field Guide, which is aimed at high school students; you can find it in the section on [finite state automata](https://www.csfieldguide.org.nz/en/chapters/formal-languages/finite-state-automata/).
- The interactive web page that we use for distance teaching is from here: [Computer Science Field Guide Trainsylvania interactive](https://www.csfieldguide.org.nz/en/interactives/trainsylvania/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
suitable-for-teaching-students: not-recommended
suitable-for-teaching-educators: suitable
supporting-resources: true
2 changes: 1 addition & 1 deletion csunplugged/at_a_distance/content/structure/structure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ lessons:
# - product-code-check-digits
# - image-representation
# - information-theory
# - finite-state-automata
- finite-state-automata
4 changes: 4 additions & 0 deletions csunplugged/classic/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
'activities',
views.redirect_to_classic_unplugged,
),
path(
'activities-under-development',
views.redirect_to_community_activities,
),
path(
'artificial-intelligence',
views.redirect_to_classic_unplugged,
Expand Down
11 changes: 11 additions & 0 deletions csunplugged/classic/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,14 @@ def redirect_to_modems_unplugged(request):
"https://classic.csunplugged.org/activities/community-activities/modems-unplugged/",
permanent=True,
)


def redirect_to_community_activities(request):
"""Redirect request to community activities page.
Returns a 301 permanent redirect HTTP response.
"""
return redirect(
"https://classic.csunplugged.org/activities/community-activities/",
permanent=True,
)
2 changes: 1 addition & 1 deletion csunplugged/config/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Module for Django system configuration."""

__version__ = "7.0.0"
__version__ = "7.1.0"
6 changes: 3 additions & 3 deletions csunplugged/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependencies": {},
"devDependencies": {
"ansi-colors": "4.1.3",
"autoprefixer": "10.4.8",
"autoprefixer": "10.4.11",
"bootstrap": "4.6.1",
"browser-sync": "2.27.10",
"browserify": "17.0.0",
Expand All @@ -28,14 +28,14 @@
"gulp-terser": "2.1.0",
"gulp": "4.0.2",
"intro.js": "4.3.0",
"jquery": "3.6.0",
"jquery": "3.6.1",
"multiple-select": "1.5.2",
"pixrem": "5.0.0",
"popper.js": "1.16.1",
"postcss": "8.4.16",
"postcss-flexbugs-fixes": "5.0.2",
"reveal.js": "4.3.1",
"sass": "1.54.4",
"sass": "1.54.9",
"scratchblocks": "uccser/scratchblocks#master",
"vinyl-buffer": "1.0.1",
"yargs": "17.5.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@ <h2>Trainsylvania</h2>
<aside class="notes">
{% include "at_a_distance/components/speech-bubble-open.html" %}
<p>
We're going to introduce this important idea using a map of a commuting service!
Have your pen and paper or drawing tool ready.
I'm going to tell you a story: there is a new city called Trainsylvania where there are several train stations, but there are no maps showing where the trains go.
We are starting at the <strong>Station 1: Airport</strong>.
We're going to use a map of a commuting service to help explain finite state automata.
Have your pen and paper ready.
I'm going to use this interactive to help you create a map of a city called Trainsylvania.
Trainsylvania has several train stations, but there are no maps showing where the trains go.
We are starting at the train station called <strong>Station 1: Airport</strong>.
</p>
<p>
Write down 'Station 1' on your paper, or just a '1' is fine.
Write down 'Airport Station' on your paper, or just a '1' is fine.
</p>
<p>
We want to get to <strong>Station 5: Harbour</strong>.
Expand All @@ -71,12 +72,12 @@ <h2>Trainsylvania</h2>
</p>
<p>
Remember, we are starting at Airport Station.
In the chat tell me which train you wouldd like to take.
In the chat tell me which train you would like to take.
Type “A” for train A or “B” for train B.
The majority will decide which train we catch.
We will choose which train to take from each station in this way for the rest of the activity.
At this stage you might as well make random choices since there's no information to base the decision on, so just quickly type whichever you want, A or B.
Later you'll have more clues on which to take.
Later you'll have more clues on which train to take.
</p>
{% include "at_a_distance/components/speech-bubble-close.html" %}

Expand Down Expand Up @@ -160,7 +161,7 @@ <h3>Did we get it right?</h3>
<p>
Congratulations!
We've made it to Harbour Station.
Let's see if we have a sequence of A's and B's that will get us from City Mall to Suburbopolis.
Let's see if we have a sequence of A's and B's that will get us from the Airport to the Harbour.
Please type in the route you would take in the chat using just As and Bs.
I will copy it into the Trainsylvania Planner and see if it agrees that your route will work.
The technical term for this sequence of letters is a “string”.
Expand All @@ -185,15 +186,12 @@ <h2>Map of Trainsylvania</h2>
<p>
Here is the master map for this activity that you probably would have appreciated seeing earlier!
How similar is it to the one you drew?
Your map might have a completely different layout if you drew it from scratch, particularly if you started with Airport Station in the middle of your paper, but hopefully your lines are still labelled the same between each station.
Your map might have a completely different layout, particularly if you started with Airport Station in the middle of your paper, but hopefully your lines are still labelled the same between each station.
</p>
<p>
What would have happened (or did happen!) if you hadn't labelled your lines with As or Bs?
Or if you didn't put the directional arrows in?
As you can see on the map, even though train A took you from Airport Station to West Station, catching Train A from West Station doesn't take you back to City Mall, but rather to East Station.
</p>
<p>
With students, we deliberately let them find out as they do the activity that arrows and labels are important, because in the process they will invent for themselves the notation of a finite state automata!
As you can see on the map, even though train A took you from Airport Station to West Station, catching Train A from West Station doesn't take you back to Aiport Station, but rather to East Station.
</p>
{% include "at_a_distance/components/speech-bubble-close.html" %}

Expand All @@ -203,6 +201,10 @@ <h2>Map of Trainsylvania</h2>
</p>

{% include "at_a_distance/components/speech-bubble-open.html" %}
<p>
<em>When teaching educators:</em>
With students, we deliberately let them find out as they do the activity that arrows and labels are important, because in the process they will invent for themselves the notation of a finite state automata!
</p>
<p>
Without the As and Bs it would have been confusing as to which line represented which train.
Without arrows it would have been easy to forget which train went to the station and which was leaving it.
Expand All @@ -211,7 +213,7 @@ <h2>Map of Trainsylvania</h2>
Don't be too hard on yourself, we didn't say at the beginning that you couldn't get back to your starting point on the same train you took away from it.
</p>
<p>
You can see how having arrows on each line and labelling them with As or Bs makes it easier to describe the final successful route from City Mall to Suburbopolis.
You can see how having arrows on each line and labelling them with As or Bs makes it easier to describe the final successful route from the Airport Station to the Harbour Station.
</p>
<p>
These lines with arrows represent what are called 'transitions'.
Expand All @@ -227,15 +229,15 @@ <h2>Map of Trainsylvania</h2>
The final destination (Harbour Station) is indicated with a double circle around it.
This is called the 'final', or 'accepting' state.
It is the state that says “Yes, your sequence (string) is in this machine's language, it works.”
In other words, in our example any string of As and Bs that gets us from City Mall to Suburbopolis is accepted as valid, i.e. will get us to the 'accepting' state.
In other words, in our example any string of As and Bs that gets us from the Airport Station to the Harbour Station is accepted as valid, i.e. will get us to the 'accepting' state.
It's important to note that with a finite state automata, we're not worried about the shortest way to get to the accepting state, but just whether or not you end up there for a given string.
</p>
<p>
Now that you have this map, I am going to give you a string of As and Bs.
Each A or B is a transition, (railway line), between the states (stations).
The starting state is Airport Station like before, and we'll be transitioning to other states.
I'll give you the string, you tell me which state we end up at, that is, which train station.
To make it quicker, you only need to type the first three letters of the station.
To make it quicker, you only need to type its number or the first three letters of the station.
</p>
{% include "at_a_distance/components/speech-bubble-close.html" %}
</aside>
Expand All @@ -244,7 +246,7 @@ <h2>Map of Trainsylvania</h2>
<section>
<h2>Trainsylvania Questions</h2>
<ol>
<li><span class="fragment">BBB will take us to</span><span class="fragment"> East Station</span></li>
<li>BBB will take us to<span class="fragment"> East Station</span></li>
<li><span class="fragment">BABA will take us to back to</span><span class="fragment"> Airport Station</span></li>
<li><span class="fragment">Will AAB get us to Harbour Station?</span><span class="fragment r-text-red"> No</span></li>
<li><span class="fragment">Will ABBAB get us to Harbour Station?</span><span class="fragment r-text-green"> Yes</span></li>
Expand All @@ -260,17 +262,23 @@ <h2>Trainsylvania Questions</h2>

<p>
Wait for answers in the chat.
Once you are ready to continue, press the next slide button to show the answer.
</p>

{% include "at_a_distance/components/speech-bubble-open.html" %}
<p>
Yes, that's right, BBB will take us to East Station (via South Station and Factory Station).
</p>
{% include "at_a_distance/components/speech-bubble-close.html" %}

<p>Push the next slide button to show each prompt individually.</p>

{% include "at_a_distance/components/speech-bubble-open.html" %}
<p>
How about BABA, where will this take us? (from Airport station back to South station, back Airport Station, twice!).
</p>
<p>
To mix it up a bit, will this string get me to Suburbopolis?
To mix it up a bit, will this string get me to the Harbour Station?
AAB.
Yes or no?
Type your answer in the chat.
Expand Down Expand Up @@ -304,11 +312,11 @@ <h2>What is it all about?</h2>
Just as English is a language, there are also languages in computer science.
In computer science languages there are very strict rules that can be used to check the input (for example, an email address can have strictly one “@” sign in it).
Because these languages are very well defined, they are called formal languages.
In contrast, natural languages (like English) aren't strictly defined, and people may argue about whether a particular spelling for a word is correct.
In contrast, natural languages (like English) aren't strictly defined, and people may argue about whether a particular spelling for, or pronunciation of, a word is correct.
</p>
<p>
Formal languages are very useful in computing.
Before a computer attempts to process input information, it checks to see if the character inputs (the symbols, letterssymbols or letters, or button presses used in the input) are in the correct language or not.
Before a computer attempts to process input information, it checks to see if the character inputs (the symbols, letters, or button presses used in the input) are in the correct language or not.
</p>
{% include "at_a_distance/components/speech-bubble-close.html" %}
</aside>
Expand All @@ -317,21 +325,26 @@ <h2>What is it all about?</h2>
<section>
<h2>Is this English?</h2>
<ol>
<li><span class="fragment">Tim likes cake.</span></li>
<li>Tim likes cake.</li>
<li><span class="fragment">ADM;lasdf oodf9 bosfa</span></li>
<li><span class="fragment">Kei te pēhea koe?</span></li>
<li><span class="fragment">ancay youay eakspay igpay atinlay?</span></li>
</ol>

<aside class="notes">
{% include "at_a_distance/components/speech-bubble-open.html" %}
<p>
For a natural language like English, an “English checker” would ask Is this in English language: "Tim likes cake."
</p>
{% include "at_a_distance/components/speech-bubble-close.html" %}

<p>Push the next button to show each prompt individually.</p>

{% include "at_a_distance/components/speech-bubble-open.html" %}
<p>
Is this English: "Adm;lasdf oodf9 bosfa"?
</p>
<p>
Is this English? "Kei te pēhea koe?".
Is this English? "ancay youay eakspay igpay atinlay?".
</p>
<p>
A finite state automaton is one way of applying the strict yes or no rules for the formal machine language.
Expand All @@ -340,7 +353,7 @@ <h2>Is this English?</h2>
{% include "at_a_distance/components/speech-bubble-close.html" %}

<p>
If any one asks, the third bullet points asks “How are you” in the Māori language, the language of the Māori, native to New Zealand.
If any one asks, the third bullet points is written in Pig Latin.
</p>
</aside>
</section>
Expand Down
9 changes: 9 additions & 0 deletions csunplugged/tests/classic/test_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ def test_activities(self):
fetch_redirect_response=False
)

def test_activities_under_development(self):
response = self.client.get("/activities-under-development")
self.assertRedirects(
response,
"https://classic.csunplugged.org/activities/community-activities/",
status_code=301,
fetch_redirect_response=False
)

def test_artificial_intelligence(self):
response = self.client.get("/artificial-intelligence")
self.assertRedirects(
Expand Down

0 comments on commit 38445d7

Please sign in to comment.