Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
0e3f179
Initial commit
xerif-wenghoe Aug 7, 2025
283548e
Set up project
interrrp Aug 9, 2025
ae321d8
Merge pull request #2 from xerif-wenghoe/setup-project
xerif-wenghoe Aug 9, 2025
02ac680
Add Pyodide type stubs
interrrp Aug 10, 2025
fe8e3fa
Add `js` type stubs
interrrp Aug 10, 2025
7967c2c
Fix type errors
interrrp Aug 10, 2025
6f61e1b
Add `document.getElementById` stub
interrrp Aug 11, 2025
a3bf21f
Merge pull request #3 from xerif-wenghoe/pyodide-type-stubs
xerif-wenghoe Aug 12, 2025
548f2d3
alpha AES implementation
max-min-median Aug 13, 2025
afd73f2
added AES decryption
max-min-median Aug 13, 2025
950c1f1
Fixed bug preventing multiple instantiations of AES objects
max-min-median Aug 13, 2025
c580bb1
Add AES tests
interrrp Aug 13, 2025
ca670ed
Fix linting issues
interrrp Aug 13, 2025
a94a2c6
test: add unittest and numpy imports
cin-lawrence Aug 14, 2025
b55247f
Merge pull request #4 from xerif-wenghoe/aes
xerif-wenghoe Aug 14, 2025
ca89210
feat: main page structure, need to fix css+ image import
artrng Aug 10, 2025
0cac90a
assets, need to move css from inline to folder
artrng Aug 10, 2025
1f7015d
Move to separate HTML file
interrrp Aug 10, 2025
e026897
Refactor
interrrp Aug 10, 2025
82dc68f
Fix missing image placeholder
interrrp Aug 10, 2025
bd2bec0
forgot probably old ui stuff
artrng Aug 11, 2025
3837253
feat: Read input file
interrrp Aug 12, 2025
c75286e
file info displays when selected, idk where it should go
artrng Aug 13, 2025
3032587
fix: wrong filename
cin-lawrence Aug 14, 2025
584403a
feat: implement encrypt/decrypt with key and download
cin-lawrence Aug 14, 2025
9930cda
refactor: import
cin-lawrence Aug 14, 2025
de88f9d
Merge pull request #5 from xerif-wenghoe/methods
xerif-wenghoe Aug 14, 2025
e268800
Extensible method system
interrrp Aug 16, 2025
8bdfdc8
File downloads
interrrp Aug 16, 2025
2015880
Improve UI
interrrp Aug 16, 2025
906b155
Separate method assets in /methods
interrrp Aug 16, 2025
84e9fda
Refactor
interrrp Aug 16, 2025
e0e13e1
Cache method HTML
interrrp Aug 16, 2025
0e72314
Reset key when going back to selections
interrrp Aug 16, 2025
e89ce78
Fix file input encoding issue
interrrp Aug 16, 2025
9287126
Increase UI spacing
interrrp Aug 16, 2025
c313834
Remove `aes.ensure_length`
interrrp Aug 16, 2025
26f8862
Use protocols over ABC for method
interrrp Aug 17, 2025
b741b65
Merge branch 'location'
interrrp Aug 17, 2025
d5517e1
Merge branch 'chess'
interrrp Aug 17, 2025
c415369
Add chess "clear board" and "initial position" buttons
interrrp Aug 17, 2025
b16a35b
Improve selection grid
interrrp Aug 17, 2025
cf719c2
Ensure deterministic selection ordering
interrrp Aug 17, 2025
4bb592e
Add safe.py to redesign
max-min-median Aug 17, 2025
db84492
Merge branch 'redesign' of https://github.com/xerif-wenghoe/code-jam-…
max-min-median Aug 17, 2025
904a9bb
Chesslock: add deadzone radius to mouse for click pickup mode
max-min-median Aug 17, 2025
38eb13d
More work on Safe method
max-min-median Aug 17, 2025
b658d7c
Make selection grid sizes consistent
interrrp Aug 17, 2025
ccac524
New selection icons
interrrp Aug 17, 2025
04c8981
Merge `Method` protocol into `methods.py`
interrrp Aug 17, 2025
10e13a8
Container format
interrrp Aug 17, 2025
12c1ac9
Hash for container format
interrrp Aug 17, 2025
d16822e
More work on safe method
max-min-median Aug 17, 2025
3698140
Merge branch 'redesign' of https://github.com/xerif-wenghoe/code-jam-…
max-min-median Aug 17, 2025
8f049b8
Add safe method to methods.py
max-min-median Aug 17, 2025
3262513
Fix Pyright issue in `chess.py`
interrrp Aug 17, 2025
73cd9cc
Conform `SafeMethod` to protocol
interrrp Aug 17, 2025
1dd6fee
Style range inputs
interrrp Aug 17, 2025
d45ed85
Add safe selection image
interrrp Aug 17, 2025
88d48fa
Allow user to switch to different dials
max-min-median Aug 17, 2025
d238d8c
feat: implement pattern lock method
xerif-wenghoe Aug 17, 2025
c3d9d05
Merge branch 'redesign' of https://github.com/xerif-wenghoe/code-jam-…
xerif-wenghoe Aug 17, 2025
7f47c65
audio for piano notes
artrng Aug 17, 2025
7f78f94
started integration of music method
artrng Aug 18, 2025
f884b0a
tick check if playing
artrng Aug 18, 2025
4c47f7b
feat: add double click event
cin-lawrence Aug 18, 2025
6499933
refactor: fix linter issues
cin-lawrence Aug 18, 2025
ded1030
bugfix, timeout calls can persist when spamming pause button
artrng Aug 18, 2025
de5a0ee
fix timeouts persisting when spamming pause button, sorry if i overwr…
artrng Aug 18, 2025
36a5e81
feat: add direction lock impl
cin-lawrence Aug 18, 2025
0495eed
feat: add icon
cin-lawrence Aug 18, 2025
87ce5dc
fix: resolve conflict
cin-lawrence Aug 18, 2025
2f3024b
fix: change onmouseup to async
cin-lawrence Aug 18, 2025
e180938
fix: avoid byte conflict
cin-lawrence Aug 18, 2025
7205a78
feat: implement dimension selection
xerif-wenghoe Aug 18, 2025
5c58c10
Fix chess and safe methods sending keys
max-min-median Aug 18, 2025
de414fb
fix: canvas size now remain constant for each dimensions
xerif-wenghoe Aug 18, 2025
349c467
Add comments
max-min-median Aug 18, 2025
6b83a02
music key return functional
artrng Aug 18, 2025
ed31d80
Fix linting issues
interrrp Aug 18, 2025
534cd2f
music works on resize
artrng Aug 18, 2025
963518b
Merge branch 'redesign' of https://github.com/xerif-wenghoe/code-jam-…
artrng Aug 18, 2025
b119c38
default bpm change
artrng Aug 18, 2025
96e5700
bpm
artrng Aug 18, 2025
51483e0
song stops playing on return to main menu: ticks check for instrument…
artrng Aug 18, 2025
36263d3
add hotkeys for chess
max-min-median Aug 18, 2025
14c1614
Merge branch 'redesign' of https://github.com/xerif-wenghoe/code-jam-…
max-min-median Aug 18, 2025
5a8d798
Call `on_key_received` for music method
interrrp Aug 18, 2025
140f0fd
Refactor `FileInput`
interrrp Aug 18, 2025
e280649
Remove `# pyright: ignore`s
interrrp Aug 18, 2025
946e18e
Update pattern lock selection image
interrrp Aug 18, 2025
d7e1058
Fix linting issues
interrrp Aug 18, 2025
310f0c1
feat: colourpicker lock
xerif-wenghoe Aug 18, 2025
4ef118b
merge
xerif-wenghoe Aug 18, 2025
2faf564
prettified password input
max-min-median Aug 18, 2025
49bd61c
fix: minor issue on patternlock and colourpickerlock
xerif-wenghoe Aug 18, 2025
9191a7e
Merge branch 'redesign' of https://github.com/xerif-wenghoe/code-jam-…
xerif-wenghoe Aug 18, 2025
d506de7
Remove commented out code in `safe.py`
interrrp Aug 18, 2025
5a29fbe
Update color picker selection image
interrrp Aug 18, 2025
5666dc1
dangerous push
artrng Aug 18, 2025
e3e7a36
Add marker location
interrrp Aug 18, 2025
0fab231
Simplify direction page.html
interrrp Aug 18, 2025
7ceebb9
subpixel rendering
artrng Aug 18, 2025
bdb93fe
Fix safe encoding and output
max-min-median Aug 18, 2025
28f09d1
Merge branch 'redesign' of https://github.com/xerif-wenghoe/code-jam-…
max-min-median Aug 18, 2025
e18cd79
bpm edit
artrng Aug 18, 2025
8f783b4
Merge branch 'redesign' of https://github.com/xerif-wenghoe/code-jam-…
artrng Aug 18, 2025
df794d3
emergency bugfix, call key update at end of function
artrng Aug 18, 2025
def487f
Password lock now checks for mismatch
max-min-median Aug 18, 2025
aae1259
chore: linting
cin-lawrence Aug 18, 2025
4c5f82f
feat: add Dockerfile and docker commands in makefile
cin-lawrence Aug 18, 2025
9b1344c
chess: fixed spacebar not working
max-min-median Aug 18, 2025
fc5a527
Merge branch 'redesign' of https://github.com/xerif-wenghoe/code-jam-…
max-min-median Aug 18, 2025
a5299b9
Merge pull request #6 from xerif-wenghoe/redesign
xerif-wenghoe Aug 18, 2025
c4327de
Create README.md
interrrp Aug 22, 2025
ab91346
Describe what Pyodide did
interrrp Aug 22, 2025
056f79e
Contributions
interrrp Aug 22, 2025
8386b31
Merge pull request #8 from xerif-wenghoe/readme
xerif-wenghoe Aug 22, 2025
880861c
include link to presentation video
xerif-wenghoe Aug 22, 2025
8a8c091
Merge pull request #9 from xerif-wenghoe/readme
xerif-wenghoe Aug 22, 2025
d185ee3
Add 'tubular-tulips/' from commit '8a8c0910af50257484b691bbc95d5849de…
janine9vn Sep 13, 2025
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
29 changes: 29 additions & 0 deletions tubular-tulips/.github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# GitHub Action workflow for running pre-commit hooks

name: Run pre-commit hooks

# Trigger the workflow on both push (to the main repository, on the main branch)
# and pull requests (against the main repository, but from any repo, from any branch).
on:
push:
branches:
- main
pull_request:

# Brand new concurrency setting! This ensures that not more than one run can be triggered for the same commit.
# It is useful for pull requests coming from the main repository since both triggers will match.
concurrency: lint-${{ github.sha }}

jobs:
pre-commit:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Run pre-commit hooks
run: uv run pre-commit run --all-files --show-diff-on-failure
203 changes: 203 additions & 0 deletions tubular-tulips/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[codz]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py.cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# UV
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
#uv.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
#poetry.toml

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
#pdm.lock
#pdm.toml
.pdm-python
.pdm-build/

# pixi
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
#pixi.lock
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
# in the .venv directory. It is recommended not to include this directory in version control.
.pixi

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.envrc
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Abstra
# Abstra is an AI-powered process automation framework.
# Ignore directories containing user credentials, local state, and settings.
# Learn more at https://abstra.io/docs
.abstra/

# Visual Studio Code
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the entire vscode folder
# .vscode/

# Ruff stuff:
.ruff_cache/

# PyPI configuration file
.pypirc

# Marimo
marimo/_static/
marimo/_lsp/
__marimo__/

# Streamlit
.streamlit/secrets.toml
29 changes: 29 additions & 0 deletions tubular-tulips/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Pre-commit configuration.
# See https://github.com/python-discord/code-jam-template/tree/main#pre-commit-run-linting-before-committing

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.8
hooks:
- id: ruff-check
args:
- --fix
- id: ruff-format

- repo: local
hooks:
- id: pytest
name: pytest
entry: uv run pytest
language: system
pass_filenames: false
always_run: true
27 changes: 27 additions & 0 deletions tubular-tulips/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM python:3.13-alpine AS builder

COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

WORKDIR /app

COPY ./pyproject.toml .
COPY ./uv.lock .

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

RUN --mount=type=ssh uv sync --frozen --no-cache

FROM python:3.13-alpine

WORKDIR /app

COPY --from=builder /app /app

COPY ./server.py /app
COPY ./cj12 /app/cj12
COPY ./static /app/static
COPY ./typings /app/typings

ENV PATH="/app/.venv/bin:$PATH"
CMD ["python", "server.py"]
21 changes: 21 additions & 0 deletions tubular-tulips/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Tubular Tulips

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
15 changes: 15 additions & 0 deletions tubular-tulips/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.PHONY: build
build:
@docker build -t cj12-tubular-tulips .

.PHONY: run
run:
@docker run --name cj12 -d -p 8000:8000 cj12-tubular-tulips

.PHONY: pre
pre:
@pre-commit run --all-files

.PHONY: sync
sync:
@uv sync --all-extras --all-groups --all-packages -U
Loading