Skip to content

Commit

Permalink
Merge branch 'ocademy-ai:main' into python-trans
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryCheval authored Sep 10, 2023
2 parents 6b4f6b4 + 5664feb commit 47c31db
Show file tree
Hide file tree
Showing 677 changed files with 818,337 additions and 9,642 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/awesome-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: awesome-main

on:
push:
branches:
- main
paths:
- 'awesome/database/data.db'

jobs:
compare-dbs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up SQLite
run: sudo apt-get install sqlite3

- name: Install sqldiff tool
run: |
wget https://www.sqlite.org/2023/sqlite-tools-linux-x86-3420000.zip
unzip sqlite-tools-linux-x86-3420000.zip
- name: Get target branch database
run: |
wget -O target_data.db https://raw.githubusercontent.com/${{ github.repository }}/main/awesome/database/data.db
- name: Show database schema differences
run: ./sqlite-tools-linux-x86-3420000/sqldiff --schema target_data.db awesome/database/data.db

- name: Show substantial tables differences
run: |
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table Course target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table Organization target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table User target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table Tag target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table CourseTags target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table CourseOrganizations target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table UserCourses target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table Tutorial target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table TutorialTags target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table UserTutorials target_data.db awesome/database/data.db
- name: Show all differences in database
run: ./sqlite-tools-linux-x86-3420000/sqldiff --primarykey target_data.db awesome/database/data.db

- name: Install dependencies
run: |
cd awesome
npm install
- name: Synchronize local and cloud databases
run: |
cd awesome/sync
export EMAIL=${{ secrets.EMAIL }}
export PASSWORD=${{ secrets.PASSWORD }}
export AWS_APPSYNC_AUTHENTICATIONTYPE=${{ secrets.AWS_APPSYNC_AUTHENTICATIONTYPE_TEST }}
export AWS_APPSYNC_GRAPHQLENDPOINT=${{ secrets.AWS_APPSYNC_GRAPHQLENDPOINT_TEST }}
export AWS_APPSYNC_REGION=${{ secrets.AWS_APPSYNC_REGION_TEST }}
export AWS_COGNITO_IDENTITY_POOL_ID=${{ secrets.AWS_COGNITO_IDENTITY_POOL_ID_TEST }}
export AWS_COGNITO_REGION=${{ secrets.AWS_COGNITO_REGION_TEST }}
export AWS_COGNITO_SIGNUP_ATTRIBUTES=${{ secrets.AWS_COGNITO_SIGNUP_ATTRIBUTES_TEST }}
export AWS_PROJECT_REGION=${{ secrets.AWS_PROJECT_REGION_TEST }}
export AWS_USER_POOLS_ID=${{ secrets.AWS_USER_POOLS_ID_TEST }}
export AWS_USER_POOLS_WEB_CLIENT_ID=${{ secrets.AWS_USER_POOLS_WEB_CLIENT_ID_TEST }}
node index.js
47 changes: 47 additions & 0 deletions .github/workflows/awesome-pr-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: pr-awesome-main

on:
pull_request:
branches:
- main
paths:
- 'awesome/database/data.db'

jobs:
compare-dbs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up SQLite
run: sudo apt-get install sqlite3

- name: Install sqldiff tool
run: |
wget https://www.sqlite.org/2023/sqlite-tools-linux-x86-3420000.zip
unzip sqlite-tools-linux-x86-3420000.zip
- name: Get target branch database
run: |
wget -O target_data.db https://raw.githubusercontent.com/${{ github.repository }}/main/awesome/database/data.db
- name: Show database schema differences
run: ./sqlite-tools-linux-x86-3420000/sqldiff --schema target_data.db awesome/database/data.db

- name: Show substantial tables differences
run: |
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table Course target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table Organization target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table User target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table Tag target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table CourseTags target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table CourseOrganizations target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table UserCourses target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table Tutorial target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table TutorialTags target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table UserTutorials target_data.db awesome/database/data.db
- name: Show all differences in database
run: ./sqlite-tools-linux-x86-3420000/sqldiff --primarykey target_data.db awesome/database/data.db
47 changes: 47 additions & 0 deletions .github/workflows/awesome-pr-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: pr-awesome-release

on:
pull_request:
branches:
- release
paths:
- 'awesome/database/data.db'

jobs:
compare-dbs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up SQLite
run: sudo apt-get install sqlite3

- name: Install sqldiff tool
run: |
wget https://www.sqlite.org/2023/sqlite-tools-linux-x86-3420000.zip
unzip sqlite-tools-linux-x86-3420000.zip
- name: Get target branch database
run: |
wget -O target_data.db https://raw.githubusercontent.com/${{ github.repository }}/release/awesome/database/data.db
- name: Show database schema differences
run: ./sqlite-tools-linux-x86-3420000/sqldiff --schema target_data.db awesome/database/data.db

- name: Show substantial tables differences
run: |
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table Course target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table Organization target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table User target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table Tag target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table CourseTags target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table CourseOrganizations target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table UserCourses target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table Tutorial target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table TutorialTags target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table UserTutorials target_data.db awesome/database/data.db
- name: Show all differences in database
run: ./sqlite-tools-linux-x86-3420000/sqldiff --primarykey target_data.db awesome/database/data.db
68 changes: 68 additions & 0 deletions .github/workflows/awesome-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: awesome-release

on:
push:
branches:
- release
paths:
- 'awesome/database/data.db'

jobs:
compare-dbs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up SQLite
run: sudo apt-get install sqlite3

- name: Install sqldiff tool
run: |
wget https://www.sqlite.org/2023/sqlite-tools-linux-x86-3420000.zip
unzip sqlite-tools-linux-x86-3420000.zip
- name: Get target branch database
run: |
wget -O target_data.db https://raw.githubusercontent.com/${{ github.repository }}/release/awesome/database/data.db
- name: Show database schema differences
run: ./sqlite-tools-linux-x86-3420000/sqldiff --schema target_data.db awesome/database/data.db

- name: Show substantial tables differences
run: |
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table Course target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table Organization target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table User target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table Tag target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table CourseTags target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table CourseOrganizations target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table UserCourses target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table Tutorial target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table TutorialTags target_data.db awesome/database/data.db
./sqlite-tools-linux-x86-3420000/sqldiff --primarykey --table UserTutorials target_data.db awesome/database/data.db
- name: Show all differences in database
run: ./sqlite-tools-linux-x86-3420000/sqldiff --primarykey target_data.db awesome/database/data.db

- name: Install dependencies
run: |
cd awesome
npm install
- name: Synchronize local and cloud databases
run: |
cd awesome/sync
export EMAIL=${{ secrets.EMAIL }}
export PASSWORD=${{ secrets.PASSWORD }}
export AWS_APPSYNC_AUTHENTICATIONTYPE=${{ secrets.AWS_APPSYNC_AUTHENTICATIONTYPE_PROD }}
export AWS_APPSYNC_GRAPHQLENDPOINT=${{ secrets.AWS_APPSYNC_GRAPHQLENDPOINT_PROD }}
export AWS_APPSYNC_REGION=${{ secrets.AWS_APPSYNC_REGION_PROD }}
export AWS_COGNITO_IDENTITY_POOL_ID=${{ secrets.AWS_COGNITO_IDENTITY_POOL_ID_PROD }}
export AWS_COGNITO_REGION=${{ secrets.AWS_COGNITO_REGION_PROD }}
export AWS_COGNITO_SIGNUP_ATTRIBUTES=${{ secrets.AWS_COGNITO_SIGNUP_ATTRIBUTES_PROD }}
export AWS_PROJECT_REGION=${{ secrets.AWS_PROJECT_REGION_PROD }}
export AWS_USER_POOLS_ID=${{ secrets.AWS_USER_POOLS_ID_PROD }}
export AWS_USER_POOLS_WEB_CLIENT_ID=${{ secrets.AWS_USER_POOLS_WEB_CLIENT_ID_PROD }}
node index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,16 @@ jobs:
name: Build the book
run: |
cd ./open-machine-learning-jupyter-book/
bash ./build.sh
bash ./build-force-all.sh
continue-on-error: false

# Post build the book
- shell: bash -l {0}
name: Post build the book
run: |
cd ./open-machine-learning-jupyter-book/
bash ./post-build.sh
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,17 @@ jobs:
name: Build the book
run: |
cd ./open-machine-learning-jupyter-book/
bash ./build.sh
bash ./build-force-all.sh
continue-on-error: false

# Post build the book
- shell: bash -l {0}
name: Post build the book
run: |
cd ./open-machine-learning-jupyter-book/
bash ./post-build.sh
cp CNAME ./_build/html/
# Push the book's HTML to github-pages
- name: GitHub Pages action
uses: peaceiris/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ jobs:
name: Build the book
run: |
cd ./open-machine-learning-jupyter-book/
bash ./build.sh
bash ./build-force-all.sh
continue-on-error: false
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,14 @@ __pycache__
/venv/
*.py[cod]
*.DS_Store
open-machine-learning-jupyter-book/assets/pickle/ufo-model.pkl
open-machine-learning-jupyter-book/assets/pickle/ufo-model.pkl
open-machine-learning-jupyter-book/ml-fundamentals/classification/cleaned_cuisines.csv
open-machine-learning-jupyter-book/assignments/environment.yml
open-machine-learning-jupyter-book/assignments/README.md
open-machine-learning-jupyter-book/assignments/prerequisites/*
*/tmp/*
*/tmp/**
*/**/node_modules/*
*/node_modules/*
awesome/node_modules
awesome/sync/.config.development.json
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
cs@openacademy.dev.
cs@ocademy.dev.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down
Loading

0 comments on commit 47c31db

Please sign in to comment.