Skip to content

Async Aggregators #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 380 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
380 commits
Select commit Hold shift + click to select a range
bc57ef5
Create m
amooo-ooo Sep 4, 2023
2d8f42e
Delete icons directory
amooo-ooo Sep 4, 2023
ba5bce1
Create testing
amooo-ooo Sep 4, 2023
339a9ff
Added Icons
amooo-ooo Sep 4, 2023
47f71e6
Delete testing
amooo-ooo Sep 4, 2023
fb62773
Create styles.css
amooo-ooo Sep 4, 2023
86135ab
Updated main.py
amooo-ooo Sep 4, 2023
67652d4
Updated main.py
amooo-ooo Sep 4, 2023
93ea6ec
Update main.py
amooo-ooo Sep 4, 2023
f7bee0f
Removed trailing whitespace on main.py
amooo-ooo Sep 4, 2023
097267d
All issues fixed
amooo-ooo Sep 4, 2023
0822e2e
Merge pull request #37 from Flow-Glow/new-ui
Flow-Glow Sep 4, 2023
1101912
Update README.md
Flow-Glow Sep 4, 2023
30004d9
Added a test case for double exposure plus some extra assertions
dfebs Sep 4, 2023
1fef4de
remove accidentally commited image
dfebs Sep 4, 2023
3fb2aeb
Fix aggregator spelling
dfebs Sep 4, 2023
207e2a2
Merge pull request #40 from Flow-Glow/fix-aggregator-spelling
Flow-Glow Sep 4, 2023
ccc235a
Merge pull request #38 from Flow-Glow/double-exposure-test-case
Flow-Glow Sep 4, 2023
01d47a2
New Image + fix docstrings
Flow-Glow Sep 4, 2023
0f81c07
major refactor. added several classes for better readability
fleshmanj Sep 4, 2023
d9f018c
refactored main
fleshmanj Sep 4, 2023
f3c61a0
more refactor
fleshmanj Sep 4, 2023
31c2c2b
Merge remote-tracking branch 'upstream/main'
leoybkim Sep 5, 2023
a5d86c0
Merge remote-tracking branch 'upstream/main' into word-collage
leoybkim Sep 5, 2023
74860b9
Merge pull request #25 from Flow-Glow/word-collage
leoybkim Sep 5, 2023
bad114c
Merge remote-tracking branch 'upstream/main'
leoybkim Sep 5, 2023
34f4074
Merge remote-tracking branch 'upstream/main' into frontend-refactor
leoybkim Sep 5, 2023
5017ff1
Fix module import error
leoybkim Sep 5, 2023
f0fd822
Updated main.py
amooo-ooo Sep 5, 2023
24e41a9
Updated window.py
amooo-ooo Sep 5, 2023
b33ae80
Deleted src/styles directory
amooo-ooo Sep 5, 2023
2afd740
fixed issue where image was not showing up when running main from roo…
dfebs Sep 5, 2023
7f2ce57
Fix linter errors
leoybkim Sep 5, 2023
c0162cb
Fix path to close button icon
leoybkim Sep 5, 2023
8c97d9c
Merge remote-tracking branch 'upstream/frontend-refactor' into fronte…
leoybkim Sep 5, 2023
37143e0
WIP
fleshmanj Sep 5, 2023
568db57
Merge remote-tracking branch 'origin/frontend-refactor' into frontend…
fleshmanj Sep 5, 2023
fb09d74
double exposure works but it takes away color
fleshmanj Sep 6, 2023
a9c04d2
lint errors fixed
fleshmanj Sep 6, 2023
795e0de
Use setter when levels are upgraded
leoybkim Sep 6, 2023
f35738a
lint errors fixed
fleshmanj Sep 6, 2023
a16abd7
Merge remote-tracking branch 'origin/frontend-refactor' into frontend…
fleshmanj Sep 6, 2023
1fa3cbb
lint errors fixed
fleshmanj Sep 6, 2023
ec422c3
Create initial implementation of xor masking
leoybkim Sep 6, 2023
a7854d5
Update font type
leoybkim Sep 6, 2023
17861cc
Rename module to xor_mask
leoybkim Sep 6, 2023
29deebd
Test masking generated images
leoybkim Sep 6, 2023
5b1e3c1
Merge pull request #48 from Flow-Glow/xor
dfebs Sep 6, 2023
427b230
make double exposure return image with original size instead of a har…
dfebs Sep 6, 2023
9d40346
Merge pull request #43 from Flow-Glow/frontend-refactor
dfebs Sep 7, 2023
94bcb28
Merge remote-tracking branch 'origin/main'
Flow-Glow Sep 7, 2023
6f7b081
fixed image window to show whole image
fleshmanj Sep 7, 2023
eed2afe
fixed tests
fleshmanj Sep 7, 2023
022d090
set image to 450x450 in update_image_label
fleshmanj Sep 7, 2023
3424484
wip
fleshmanj Sep 7, 2023
b8c6dc9
Merge branch 'ui-image-display-bug-and-double-exposure' into slider-fix
fleshmanj Sep 7, 2023
9729ef7
done. sliders have a range from 20 now so make sure your functions ta…
fleshmanj Sep 7, 2023
45b606c
Merge pull request #53 from Flow-Glow/ui-image-display-bug-and-double…
Flow-Glow Sep 7, 2023
28618ec
Merge remote-tracking branch 'origin/main'
Flow-Glow Sep 7, 2023
217b7b7
Fix level 2
Flow-Glow Sep 7, 2023
89bb448
Refactor window entity and leveling up
leoybkim Sep 7, 2023
2d2f940
Create custom type to pass linter
leoybkim Sep 7, 2023
9d9e914
Run black formatter and fix inconsistent quote styling
leoybkim Sep 7, 2023
eb7365c
Fix flake8 styling for import
leoybkim Sep 7, 2023
1536a51
Fix close button not showing up
leoybkim Sep 7, 2023
1a4091f
Add ascii art generation to the filter
leoybkim Sep 7, 2023
653ad94
added function to update level on levelup
fleshmanj Sep 7, 2023
7e60bc7
Update window.py
amooo-ooo Sep 7, 2023
9d31dcf
Added icon logo
amooo-ooo Sep 7, 2023
0988f87
Update window.py
amooo-ooo Sep 7, 2023
242d581
Update window.py
amooo-ooo Sep 7, 2023
e9dd0f7
Last lint fix on window.py
amooo-ooo Sep 7, 2023
3630b4a
Last last last last fix on window.py for lint
amooo-ooo Sep 7, 2023
d66a018
Merge pull request #58 from Flow-Glow/window-icon
Flow-Glow Sep 8, 2023
6bed08f
added ishihara filter and refactored args to allow multiple values to…
fleshmanj Sep 8, 2023
9d1e96a
Merge branch 'main' into slider-fix
fleshmanj Sep 8, 2023
961a264
Merge branch 'main' into implement-image-differencing
fleshmanj Sep 8, 2023
e5a04b2
lint errors
fleshmanj Sep 8, 2023
7abdd83
Merge pull request #59 from Flow-Glow/slider-fix
dfebs Sep 8, 2023
2c88113
Path bug in xor_mask.py
Flow-Glow Sep 8, 2023
26d1621
Path bug in xor_mask.py
Flow-Glow Sep 8, 2023
b5c75c7
fix test
Flow-Glow Sep 8, 2023
e00cd98
fix test
Flow-Glow Sep 8, 2023
ed05835
fix test
Flow-Glow Sep 8, 2023
0fa50fd
fix lint
Flow-Glow Sep 8, 2023
1de3b73
Merge branch 'upstream-main' into level-3
leoybkim Sep 8, 2023
c00cda1
rename
Flow-Glow Sep 8, 2023
e37fe90
Get icon for level 3
leoybkim Sep 8, 2023
b3b9dff
Revert "Path bug in xor_mask.py"
leoybkim Sep 8, 2023
e689e66
Revert "Path bug in xor_mask.py"
leoybkim Sep 8, 2023
bbf7055
Merge branch 'upstream-main' into level-3
leoybkim Sep 8, 2023
fde9a6b
Merge remote-tracking branch 'origin/main'
Flow-Glow Sep 8, 2023
eaeb3d0
fix Test_Assets -> test_assets
Flow-Glow Sep 8, 2023
39cae4a
Add beginnings of color swap UI
dfebs Sep 8, 2023
ab67cb4
wired button to color swap function
fleshmanj Sep 8, 2023
4564f43
swapped color values
fleshmanj Sep 8, 2023
56aec13
Merge remote-tracking branch 'upstream/color_swap_ui' into level-3
leoybkim Sep 8, 2023
6713ac5
Merge remote-tracking branch 'origin/level-3' into level-3
leoybkim Sep 8, 2023
bcdda0c
Merge fix
leoybkim Sep 8, 2023
0f9f25d
Merge fix and refactor window
leoybkim Sep 8, 2023
f247558
Prepare the ascii art puzzle image
leoybkim Sep 8, 2023
1f4e38c
Hide control panel on ascii art puzzle
leoybkim Sep 8, 2023
1ee0325
Change the application to be full screen mode and scale the input ima…
leoybkim Sep 8, 2023
3fb58a2
Merge pull request #60 from Flow-Glow/implement-image-differencing
dfebs Sep 8, 2023
b40471d
Merge remote-tracking branch 'origin/main'
Flow-Glow Sep 9, 2023
462b909
updated slider value and added image for ishihara
fleshmanj Sep 9, 2023
0d1a199
Merge remote-tracking branch 'origin/main'
Flow-Glow Sep 9, 2023
a8726eb
Merge branch 'main' into color_swap_ui
fleshmanj Sep 9, 2023
763c9d0
Merge pull request #64 from Flow-Glow/color_swap_ui
Flow-Glow Sep 9, 2023
72872e4
Merge remote-tracking branch 'origin/main'
Flow-Glow Sep 9, 2023
36d3282
incorporated color swap code with main
fleshmanj Sep 9, 2023
389530c
Use wider screen width if no control panel needs to be shown in the p…
leoybkim Sep 9, 2023
b651f17
added rishihara.png icon to level
fleshmanj Sep 9, 2023
2a4a5e1
Merge pull request #65 from Flow-Glow/integrate-color-swap
Flow-Glow Sep 9, 2023
badc2c4
removed bugs
fleshmanj Sep 9, 2023
3b19a12
Merge pull request #66 from Flow-Glow/bug-fixes
Flow-Glow Sep 9, 2023
fada427
Merge remote-tracking branch 'origin/main'
Flow-Glow Sep 9, 2023
c02de50
Apply full screen image scaling to apply_color_swap.py
leoybkim Sep 9, 2023
a3b8e28
Merge branch 'upstream-main' into full-screen
leoybkim Sep 9, 2023
533c94d
Merge fix
leoybkim Sep 9, 2023
c580eff
refactored to make it faster and harder to read code
fleshmanj Sep 9, 2023
0246f90
Merge fix
leoybkim Sep 9, 2023
c1d6023
Merge fix
leoybkim Sep 9, 2023
e4162a8
Merge pull request #67 from Flow-Glow/ishihara-refactor
Flow-Glow Sep 9, 2023
41ecf3e
Merge remote-tracking branch 'origin/main'
Flow-Glow Sep 9, 2023
442573e
Fix image scaling after filters
leoybkim Sep 9, 2023
0e21651
Fix merge conflict
leoybkim Sep 9, 2023
96496fc
Fix isort flake8
leoybkim Sep 9, 2023
26d435f
Fix image rescaling for Ishihara filter
leoybkim Sep 9, 2023
3797d23
Motion.py added to gui
Flow-Glow Sep 9, 2023
e30ae0b
Add zoom in/out buttons and emit the signals to the dock
leoybkim Sep 9, 2023
970744e
Clean up
leoybkim Sep 9, 2023
28bec46
Merge branch 'full-screen' into level-3
leoybkim Sep 9, 2023
5910570
Zoom in and out within a scrollable area
leoybkim Sep 9, 2023
3872418
Re-modified double exposure to return an image the size of the smalle…
dfebs Sep 9, 2023
f9e7b60
Motion.py added to gui
Flow-Glow Sep 9, 2023
3d494c8
fix lint
Flow-Glow Sep 9, 2023
1233150
refactored to make it faster and harder to read code
fleshmanj Sep 9, 2023
0d9a0ff
Merge pull request #70 from Flow-Glow/update-colorswap-image
dfebs Sep 9, 2023
472f85d
fix test
Flow-Glow Sep 9, 2023
e8d447a
fix test
Flow-Glow Sep 9, 2023
7132745
made it so you can merge
Flow-Glow Sep 9, 2023
6a3726e
fix lint
Flow-Glow Sep 9, 2023
e020873
200012 fix
Flow-Glow Sep 9, 2023
07636b4
made a slider class that disables mouse drag
fleshmanj Sep 9, 2023
d04e3de
updated slider style
fleshmanj Sep 9, 2023
0217378
Merge pull request #73 from Flow-Glow/disable-slider-option
dfebs Sep 9, 2023
c7e2b24
Merge pull request #71 from Flow-Glow/new-motion-gui
Flow-Glow Sep 9, 2023
a3cf89e
Revert "New motion gui"
Flow-Glow Sep 9, 2023
055597e
Merge pull request #75 from Flow-Glow/revert-71-new-motion-gui
Flow-Glow Sep 9, 2023
305b836
Revert "made a slider class that disables mouse drag"
Flow-Glow Sep 9, 2023
248ab46
Merge pull request #76 from Flow-Glow/revert-73-disable-slider-option
Flow-Glow Sep 9, 2023
2036d84
Merge branch 'upstream-main' into full-screen
leoybkim Sep 9, 2023
1a04413
Merge branch 'full-screen' into level-3
leoybkim Sep 9, 2023
3a69c8b
Update dependency
leoybkim Sep 9, 2023
24cd394
Merge remote-tracking branch 'upstream/full-screen' into full-screen
leoybkim Sep 9, 2023
9059ab5
Merge branch 'full-screen' into level-3
leoybkim Sep 9, 2023
248ba60
Temporarially disabled non-functioning motions cache
anythingapplied Sep 9, 2023
9f16ae6
added additional test image
anythingapplied Sep 9, 2023
c727f7f
Added smooth motion.py
Flow-Glow Sep 9, 2023
4aabd05
Added smooth motion.py
Flow-Glow Sep 9, 2023
ac8d625
W292 no newline at end of file
Flow-Glow Sep 9, 2023
97706aa
New explode motion effect added
anythingapplied Sep 9, 2023
a4c7efc
Add multiline description
Flow-Glow Sep 9, 2023
5551ebb
Merge branch 'upstream-main' into full-screen
leoybkim Sep 9, 2023
5875332
Remove unused function
leoybkim Sep 9, 2023
be5b7b4
Fix button parsing
leoybkim Sep 9, 2023
15d6d08
Fix level order
leoybkim Sep 9, 2023
b84c694
Update image ratio w.r.t. screen size
leoybkim Sep 9, 2023
eb50a69
Update to snake case
leoybkim Sep 10, 2023
ff9416e
Merge pull request #78 from Flow-Glow/multiline-description
leoybkim Sep 10, 2023
2627308
Merge branch 'upstream-main' into full-screen
leoybkim Sep 10, 2023
9aaa999
Update comment
leoybkim Sep 10, 2023
e147e52
Merge branch 'full-screen' into level-3
leoybkim Sep 10, 2023
b66007a
merged main into new-motion-gui
anythingapplied Sep 10, 2023
4ce45b8
Fix image rescaling after applying motion
leoybkim Sep 10, 2023
6b65e45
Remove unused function
leoybkim Sep 10, 2023
7067458
ran isort to fix linting issue caused by black
anythingapplied Sep 10, 2023
516f26b
removed unused os.stat from motions.py
anythingapplied Sep 10, 2023
48ff24d
add motion icon
Flow-Glow Sep 10, 2023
70de207
Add files via upload
Flow-Glow Sep 10, 2023
ec62a29
Delete src/images/motion_icon.png
Flow-Glow Sep 10, 2023
90e98ce
Add files via upload
Flow-Glow Sep 10, 2023
538303d
Update level.py
Flow-Glow Sep 10, 2023
5ac3cbf
Merge pull request #79 from Flow-Glow/new-motion-gui
Flow-Glow Sep 10, 2023
0daab82
Fix padding in the QLabel and scale the image content correctly
leoybkim Sep 10, 2023
0613cab
Remove unused imports
leoybkim Sep 10, 2023
71b8f5e
Merge remote-tracking branch 'origin/main'
Flow-Glow Sep 10, 2023
a364da3
fixed warning from numpy
Flow-Glow Sep 10, 2023
1a45c62
fixed lint
Flow-Glow Sep 10, 2023
8f2b924
Merge branch 'upstream-main' into full-screen
leoybkim Sep 10, 2023
3786dcf
Merge pull request #68 from Flow-Glow/full-screen
Flow-Glow Sep 10, 2023
f1090a5
Merge branch 'upstream-main' into level-3
leoybkim Sep 10, 2023
451fcd8
Use QGraphicsView to zoom on images
leoybkim Sep 10, 2023
d6a7306
Upload compressed images
leoybkim Sep 10, 2023
2cfb2a4
Clean up ImageViewer
leoybkim Sep 10, 2023
9a6e1f4
lint errors will be fixed
fleshmanj Sep 10, 2023
8a74e10
Clean up ImageViewer
leoybkim Sep 10, 2023
8dea1f5
Merge branch 'upstream-main' into level-3
leoybkim Sep 10, 2023
ff362b1
Pass the desirable view port size into the ImageViewer to set the ini…
leoybkim Sep 10, 2023
e1055d1
Show original image on first load for ascii art
leoybkim Sep 10, 2023
22b440c
Fix flake8 :poop:
leoybkim Sep 10, 2023
f00fd7f
Create util function to apply the ASCII art on button click
leoybkim Sep 10, 2023
c763819
Replace the original image QLabel with image viewer on button click
leoybkim Sep 10, 2023
6faad9a
Clean up
leoybkim Sep 10, 2023
00b8f63
Clean up
leoybkim Sep 10, 2023
8da330b
Disable button after click
leoybkim Sep 10, 2023
f60824c
Merge pull request #82 from Flow-Glow/ascii-art
leoybkim Sep 10, 2023
e20a5ad
Update double exposure puzzle
leoybkim Sep 10, 2023
66928ca
Change color swap image
leoybkim Sep 10, 2023
3201773
Remove test image
leoybkim Sep 10, 2023
c38fda3
Merge pull request #83 from Flow-Glow/puzzle
leoybkim Sep 10, 2023
1d1d35f
Update the puzzle answer to ascii art
leoybkim Sep 10, 2023
14a41f4
Merge remote-tracking branch 'upstream/main' into upstream-main
leoybkim Sep 10, 2023
6bca465
level description edits
dfebs Sep 10, 2023
6ab22f7
fix lint issues
dfebs Sep 10, 2023
25844dd
Merge pull request #85 from Flow-Glow/level-edits
Flow-Glow Sep 10, 2023
f9910bf
fixed image bug
fleshmanj Sep 10, 2023
79886dc
added command line level selector
anythingapplied Sep 10, 2023
74e6cd7
fixed test
Flow-Glow Sep 10, 2023
54d9d8f
Merge pull request #88 from Flow-Glow/level-selector
Flow-Glow Sep 10, 2023
be07699
bug fix
fleshmanj Sep 10, 2023
a14eaf2
Merge pull request #87 from Flow-Glow/double-exposure-fix
Flow-Glow Sep 10, 2023
079dc43
Update README.md
Flow-Glow Sep 10, 2023
ee646c8
fixed lint errors
fleshmanj Sep 10, 2023
bef15d2
motions with offset value
anythingapplied Sep 10, 2023
11334a0
Merge branch 'main' into custom_slider-and-motion-puzzle
fleshmanj Sep 10, 2023
b103c42
fixed offset
anythingapplied Sep 10, 2023
961e9dd
Merge pull request #91 from Flow-Glow/motion-initial-values
Flow-Glow Sep 10, 2023
ecc81c3
fixed lint
Flow-Glow Sep 10, 2023
b7f56fd
Merge branch 'main' into custom_slider-and-motion-puzzle
Flow-Glow Sep 10, 2023
9b00770
change description for motion
dfebs Sep 10, 2023
b068ab6
add success
fleshmanj Sep 10, 2023
c4ff3d0
add success
fleshmanj Sep 10, 2023
dd470df
fixed lint
Flow-Glow Sep 10, 2023
86ff34b
add success
fleshmanj Sep 10, 2023
96a546a
add success
fleshmanj Sep 10, 2023
72f38e4
Merge branch 'main' into custom_slider-and-motion-puzzle
fleshmanj Sep 10, 2023
8e0aac7
add success
fleshmanj Sep 10, 2023
8e5b449
removed print
fleshmanj Sep 10, 2023
943eb1b
lint fixes
fleshmanj Sep 10, 2023
1e07df8
add image to readme
dfebs Sep 11, 2023
b1b9ea9
Merge pull request #92 from Flow-Glow/add-image-to-readme
fleshmanj Sep 11, 2023
7aa9405
Update README.md
Flow-Glow Sep 12, 2023
289f35c
Merge pull request #93 from Flow-Glow/Add-Gource
fleshmanj Sep 12, 2023
f8ccbc5
Added level selection to the readme
anythingapplied Sep 14, 2023
b768a9c
reformatted code blocks to properly render
anythingapplied Sep 14, 2023
1954916
Update README.md
Flow-Glow Sep 14, 2023
155790f
Merge pull request #94 from Flow-Glow/readme-level-selection
Flow-Glow Sep 14, 2023
5ba5e91
Add 'async-aggregators/' from commit '155790fdc59d810033a1fd9942d29a1…
janine9vn Sep 28, 2023
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
38 changes: 38 additions & 0 deletions async-aggregators/.github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# GitHub Action Workflow enforcing our code style.

name: Lint

# 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:
lint:
runs-on: ubuntu-latest

env:
# The Python version your project uses. Feel free to change this if required.
PYTHON_VERSION: "3.10"

steps:
# Checks out the repository in the current folder.
- name: Checks out repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}

# Set up the right version of Python
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Run pre-commit hooks
uses: pre-commit/action@v3.0.0
41 changes: 41 additions & 0 deletions async-aggregators/.github/workflows/unittests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# GitHub Action Workflow running unittests.

name: Run Unittests

# Specifies when the workflow should be run. In this case, it's triggered for every push and pull request.
on: [push]

jobs:
build:

# Specifies the type of runner the job will run on. "ubuntu-latest" refers to the latest available version of Ubuntu.
runs-on: ubuntu-latest

# A list of steps that will be run as part of the "build" job.
steps:
# Checks out the repository in the current folder.
- name: Checks out repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}

# Set up the right version of Python
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}

# Installs Poetry - a tool for dependency management in Python.
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -

# Installs the dependencies for the project using Poetry.
# This will use the pyproject.toml and poetry.lock files from your repository.
- name: Install dependencies with Poetry
run: |
poetry install

# Runs the unittests using the virtual environment managed by Poetry.
- name: Run tests
run: poetry run python -m unittest discover # Adjust the command if you have a specific way to run your tests.
31 changes: 31 additions & 0 deletions async-aggregators/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Files generated by the interpreter
__pycache__/
*.py[cod]

# Environment specific
.venv
venv
.env
env

# Unittest reports
.coverage*

# Logs
*.log

# PyEnv version selector
.python-version

# Built objects
*.so
dist/
build/

# IDEs
# PyCharm
.idea/
# VSCode
.vscode/
# MacOS
.DS_Store
35 changes: 35 additions & 0 deletions async-aggregators/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Pre-commit setup
# See https://github.com/python-discord/code-jam-template/tree/main#pre-commit-run-linting-before-committing

# Make sure to edit the `additional_dependencies` list if you want to add plugins

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-toml
- id: check-yaml
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.5.1
hooks:
- id: python-check-blanket-noqa

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort

- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies:
- flake8-docstrings~=1.6.0
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.940
hooks:
- id: mypy
args: [--disallow-untyped-defs, --disallow-incomplete-defs, --disallow-untyped-calls, --ignore-missing-imports]
7 changes: 7 additions & 0 deletions async-aggregators/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2021 Python Discord

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.
123 changes: 123 additions & 0 deletions async-aggregators/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Digital Shadows

![radio room](radio_room.png)

**Digital Shadows** transports players into the enthralling depths of the digital realm, bridging the gap
between the online world and palpable real-world locations, ranging from underground hacker dens and
abandoned warehouses to fortified safe houses.

In the game's opening cinematic, the narrative unfolds on a screen shrouded in darkness, gradually
illuminated by cascading lines of mysterious code. As the climax of this digital downpour is reached,
players are introduced to the central character: Eclipse is a master hacker known only by this codename.
An encrypted message demands Eclipse's attention within a dimly lit enclave, awash with the glow of myriad screens:
"They're making a move. The web is tightening. Need your skills."

Eclipse's enigmatic past reveals a hacker who once operated on the digital periphery. Their trajectory
dramatically shifts upon being recruited by an elite international cybersecurity group. But lurking in
the backdrop is the game's menacing antagonist: "The Silent Hand," a sinister terrorist collective skilled
in wielding advanced digital tools to sow real-world chaos.

Embarking on the Digital Shadows journey, players are tasked with deciphering a complex array of digital
puzzles. Every riddle unraveled delves deeper into the dark web, uncloaking encrypted data and unwinding
layers of secretive communication. Successive solutions unravel the plots and expose the identities of
the shadowy faction, drawing Eclipse ever closer to thwarting "The Silent Hand."

Dive deep into this entwining of shadows, where the boundaries between the digital and tangible blur, and
every decision could reveal a hidden secret or set off an unseen trap. Brace yourself, for in this world,
shadows are always vigilant.


## Prerequisites

Before you begin, ensure you have met the following requirements:

- [Python 3.10.x](https://www.python.org/downloads/)
- [Poetry](https://python-poetry.org/docs/#installation)

## Installation & Setup

1. **Clone the repository:**

```bash
git clone https://github.com/Flow-Glow/Code-Jam-2023-Async-Aggregators.git
cd Code-Jam-2023-Async-Aggregators
```
2. **Install dependencies:**
```bash
poetry install
```
## Running the Project

1. Activate the poetry environment:
```bash
poetry shell
```
2. Run the project:
```bash
python main.py
```
## Selecting Specific Levels

### Level 1 - Ishihara Test
```bash
python main.py
```
### Level 2 - Double Exposure
```bash
python main.py 2
```
### Level 3 - Color Swap
```bash
python main.py 3
```
### Level 4 - Hidden in ASCII
```bash
python main.py 4
```
### Level 5 - Motion
```bash
python main.py 5
```
## Contributing to the Project
1. Fork the project
2. Create a new branch (git checkout -b feature/YourFeature).
3. Commit your changes (git commit -am 'Add some feature').
4. Push to the branch (git push origin feature/YourFeature).
5. Open a pull request.

## License
MIT License

Copyright (c) 2023 Async Aggregators

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.

## Commit History
https://github.com/Flow-Glow/Code-Jam-2023-Async-Aggregators/assets/89105476/ccb20525-2001-46b5-9272-13eb91ceb908


## Contributors:
```
Joshua Fleshman(ChronosFU)
Leo Kim(leo.the.lion)
Daniel Febles(dfebs)
Ziv Landau(flowglow)
Avongard
Amor Budiyanto (sardines)
```
Empty file.
Empty file.
23 changes: 23 additions & 0 deletions async-aggregators/lib/double_exposure/double_exposure.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from PIL import Image


def double_exposure(img1: Image, img2: Image, alpha: float = 0.5) -> Image:
"""
Blend two images together using alpha blending

:param img1: PIL Image
:param img2: PIL Image
:param alpha: int
:return:
"""
# Convert both images to RGB
img1 = img1.convert("RGB")
img2 = img2.convert("RGB")

# Resize img2 to match img1's size
img2 = img2.resize(img1.size)

# Blend the images
blended = Image.blend(img1, img2, alpha)

return blended
67 changes: 67 additions & 0 deletions async-aggregators/lib/double_exposure/test_double_exposure.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import unittest

from PIL import Image

from .double_exposure import double_exposure


class DoubleExposureTestCase(unittest.TestCase):
"""Tests For double_exposure.py"""

def test_alpha_half(self) -> None:
"""
Test that blending with default alpha=0.5 results in a blend of two images and preserves image size.

:return: None
"""
# Load two example images
image1 = Image.new("RGB", (200, 200), (0, 255, 0))
image2 = Image.new("RGB", (200, 200), (255, 0, 0))

# Call the double_exposure function
result_image = double_exposure(image1, image2)

# Check if the size of the result image matches the input images
self.assertEqual(result_image.size, (200, 200))

# Check if the result image matches a blend of the two images
expected_image = Image.new("RGB", (200, 200), (127, 127, 0))
self.assertEqual(result_image, expected_image)

def test_alpha_zero(self) -> None:
"""
Test that blending with alpha=0.0 results in the first image unchanged and preserves image size.

:return: None
"""
# Create two images with different colors
image1 = Image.new("RGB", (200, 200), (255, 0, 0)) # Red
image2 = Image.new("RGB", (200, 200), (0, 255, 0)) # Green

# Blend the images with alpha = 0.0 (result should be the first image)
result_image = double_exposure(image1, image2, alpha=0.0)

# Check if the size of the result image matches the input images
self.assertEqual(result_image.size, (200, 200))

# Check if the result image matches the first image
self.assertEqual(result_image, image1)

def test_alpha_one(self) -> None:
"""
Test that blending with alpha=1.0 results in the second image unchanged and preserves image size.

:return: None
"""
# Create two images with different colors
image1 = Image.new("RGB", (200, 200), (255, 0, 0)) # Red
image2 = Image.new("RGB", (200, 200), (0, 255, 0)) # Green

# Blend the images with alpha = 1.0 (result should be the second image)
result_image = double_exposure(image1, image2, alpha=1.0)

# Check if the size of the result image matches the input images
self.assertEqual(result_image.size, (200, 200))

# Check if the result image matches the second image
self.assertEqual(result_image, image2)
Empty file.
Loading