├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
└── workflows
│ └── codacy-analysis.yaml
├── .gitignore
├── LICENSE
├── README.md
├── assets
├── .DS_Store
└── logo
│ ├── Mobile_Logo.png
│ ├── Mobile_Logo.svg
│ ├── Social_Logo.png
│ ├── Web_Logo.png
│ └── Web_Logo.svg
├── backend
├── .gitignore
├── backend
│ ├── __init__.py
│ ├── __pycache__
│ │ ├── __init__.cpython-36.pyc
│ │ ├── settings.cpython-36.pyc
│ │ ├── urls.cpython-36.pyc
│ │ └── wsgi.cpython-36.pyc
│ ├── asgi.py
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── manage.py
├── media
│ └── documents
│ │ ├── sample-Pseudocode.py
│ │ └── sample.py
└── post
│ ├── __init__.py
│ ├── __pycache__
│ ├── __init__.cpython-36.pyc
│ ├── admin.cpython-36.pyc
│ ├── models.cpython-36.pyc
│ ├── serializers.cpython-36.pyc
│ ├── urls.cpython-36.pyc
│ └── views.cpython-36.pyc
│ ├── admin.py
│ ├── apps.py
│ ├── migrations
│ ├── 0001_initial.py
│ ├── __init__.py
│ └── __pycache__
│ │ ├── 0001_initial.cpython-36.pyc
│ │ └── __init__.cpython-36.pyc
│ ├── models.py
│ ├── serializers.py
│ ├── tests.py
│ ├── urls.py
│ └── views.py
├── code_converter
├── .gitignore
├── README.md
├── canister_ids.json
├── dfx.json
├── package-lock.json
├── package.json
├── src
│ ├── code_converter
│ │ └── main.mo
│ └── code_converter_assets
│ │ ├── assets
│ │ └── sample-asset.txt
│ │ └── public
│ │ ├── App.css
│ │ ├── App.js
│ │ ├── converter.jsx
│ │ ├── index.css
│ │ └── index.js
├── tsconfig.json
└── webpack.config.js
├── cpp-pseudogen
├── .gitignore
├── main.cpp
├── output.txt
└── prog.cpp
├── frontend
├── .gitignore
├── README.md
├── package-lock.json
├── package.json
├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
├── src
│ ├── App.css
│ ├── App.js
│ ├── Upload.js
│ ├── index.css
│ ├── index.js
│ └── logo.svg
└── yarn.lock
├── node-api
├── .gitignore
├── codes
│ ├── hello-Pseudocode.py
│ ├── hello.cpp
│ └── hello.py
├── generatePseudo.py
├── hello-Pseudocode.py
├── hello.py
├── helper.js
├── main.cpp
├── output.txt
├── package-lock.json
├── package.json
├── prog.cpp
└── server.js
└── python-scripts
├── .gitignore
├── generatePseudo.py
├── hello-Pseudocode.py
├── hello.py
├── node_modules
├── colors
│ ├── MIT-LICENSE.txt
│ ├── ReadMe.md
│ ├── colors.js
│ ├── example.html
│ ├── example.js
│ ├── package.json
│ ├── test.js
│ └── themes
│ │ ├── winston-dark.js
│ │ └── winston-light.js
├── compilex
│ ├── .gitattributes
│ ├── .npmignore
│ ├── .travis.yml
│ ├── DemoPicture.png
│ ├── License.md
│ ├── README.md
│ ├── compilex.js
│ ├── cppModule.js
│ ├── csModule.js
│ ├── examples
│ │ └── compilex-Demo1
│ │ │ ├── TestSnippets.txt
│ │ │ ├── index.html
│ │ │ ├── node_modules
│ │ │ ├── body-parser
│ │ │ │ ├── .npmignore
│ │ │ │ ├── HISTORY.md
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ ├── node_modules
│ │ │ │ │ ├── bytes
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── History.md
│ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ ├── Readme.md
│ │ │ │ │ │ ├── component.json
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ └── package.json
│ │ │ │ │ ├── qs
│ │ │ │ │ │ ├── .gitmodules
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── Readme.md
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ └── package.json
│ │ │ │ │ ├── raw-body
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── .travis.yml
│ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ ├── node_modules
│ │ │ │ │ │ │ └── bytes
│ │ │ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ │ │ ├── History.md
│ │ │ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ │ │ ├── Readme.md
│ │ │ │ │ │ │ │ ├── component.json
│ │ │ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ │ │ └── package.json
│ │ │ │ │ │ └── package.json
│ │ │ │ │ └── type-is
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── HISTORY.md
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ ├── node_modules
│ │ │ │ │ │ └── mime
│ │ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ │ ├── mime.js
│ │ │ │ │ │ │ ├── package.json
│ │ │ │ │ │ │ ├── test.js
│ │ │ │ │ │ │ └── types
│ │ │ │ │ │ │ ├── mime.types
│ │ │ │ │ │ │ └── node.types
│ │ │ │ │ │ └── package.json
│ │ │ │ └── package.json
│ │ │ └── compilex
│ │ │ │ ├── .gitattributes
│ │ │ │ ├── .npmignore
│ │ │ │ ├── .travis.yml
│ │ │ │ ├── DemoPicture.png
│ │ │ │ ├── License.md
│ │ │ │ ├── README.md
│ │ │ │ ├── compilex.js
│ │ │ │ ├── cppModule.js
│ │ │ │ ├── csModule.js
│ │ │ │ ├── examples
│ │ │ │ └── compilex-Demo1
│ │ │ │ │ ├── TestSnippets.txt
│ │ │ │ │ ├── index.html
│ │ │ │ │ ├── node_modules
│ │ │ │ │ ├── body-parser
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── HISTORY.md
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ ├── node_modules
│ │ │ │ │ │ │ ├── bytes
│ │ │ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ │ │ ├── History.md
│ │ │ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ │ │ ├── Readme.md
│ │ │ │ │ │ │ │ ├── component.json
│ │ │ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ │ │ └── package.json
│ │ │ │ │ │ │ ├── qs
│ │ │ │ │ │ │ │ ├── .gitmodules
│ │ │ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ │ │ ├── Readme.md
│ │ │ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ │ │ └── package.json
│ │ │ │ │ │ │ ├── raw-body
│ │ │ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ │ │ ├── .travis.yml
│ │ │ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ │ │ ├── node_modules
│ │ │ │ │ │ │ │ │ └── bytes
│ │ │ │ │ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ │ │ │ │ ├── History.md
│ │ │ │ │ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ │ │ │ │ ├── Readme.md
│ │ │ │ │ │ │ │ │ │ ├── component.json
│ │ │ │ │ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ │ │ │ │ └── package.json
│ │ │ │ │ │ │ │ └── package.json
│ │ │ │ │ │ │ └── type-is
│ │ │ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ │ │ ├── HISTORY.md
│ │ │ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ │ │ ├── node_modules
│ │ │ │ │ │ │ │ └── mime
│ │ │ │ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ │ │ │ ├── mime.js
│ │ │ │ │ │ │ │ │ ├── package.json
│ │ │ │ │ │ │ │ │ ├── test.js
│ │ │ │ │ │ │ │ │ └── types
│ │ │ │ │ │ │ │ │ ├── mime.types
│ │ │ │ │ │ │ │ │ └── node.types
│ │ │ │ │ │ │ │ └── package.json
│ │ │ │ │ │ └── package.json
│ │ │ │ │ └── compilex
│ │ │ │ │ │ ├── .gitattributes
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── License.md
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── compilex.js
│ │ │ │ │ │ ├── cppModule.js
│ │ │ │ │ │ ├── javaModule.js
│ │ │ │ │ │ ├── package.json
│ │ │ │ │ │ └── pyModule.js
│ │ │ │ │ └── server.js
│ │ │ │ ├── javaModule.js
│ │ │ │ ├── package.json
│ │ │ │ ├── pyModule.js
│ │ │ │ └── vbModule.js
│ │ │ └── server.js
│ ├── javaModule.js
│ ├── package.json
│ ├── pyModule.js
│ └── vbModule.js
└── cuid
│ ├── .npmignore
│ ├── .travis.yml
│ ├── LICENSE
│ ├── README.markdown
│ ├── component.json
│ ├── dist
│ ├── browser-cuid.js
│ └── node-cuid.js
│ ├── grunt.js
│ ├── lib
│ ├── applitude.bundle.js
│ ├── applitude.js
│ └── jquery.js
│ ├── package.json
│ ├── src
│ ├── browser-fingerprint.js
│ ├── footer.js
│ ├── head.js
│ └── node-fingerprint.js
│ └── test
│ ├── applitude-cuid-test.html
│ ├── applitude-cuid-test.js
│ ├── browser-cuid-test.html
│ ├── browser-cuid-test.js
│ ├── node-cuid-test.js
│ ├── qunit.css
│ ├── qunit.js
│ └── testling.js
└── package-lock.json
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information):**
27 | - OS: [e.g. iOS]
28 | - Browser [e.g. chrome, safari]
29 | - Version [e.g. 22]
30 |
31 | **Smartphone (please complete the following information):**
32 | - Device: [e.g. iPhone6]
33 | - OS: [e.g. iOS8.1]
34 | - Browser [e.g. stock browser, safari]
35 | - Version [e.g. 22]
36 |
37 | **Additional context**
38 | Add any other context about the problem here.
39 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.github/workflows/codacy-analysis.yaml:
--------------------------------------------------------------------------------
1 | name: Codacy Security Scan
2 |
3 | on:
4 | push:
5 | branches: ["master", "main"]
6 | pull_request:
7 | branches: ["master", "main"]
8 |
9 | jobs:
10 | codacy-security-scan:
11 | name: Codacy Security Scan
12 | runs-on: ubuntu-latest
13 | steps:
14 | - name: Checkout code
15 | uses: actions/checkout@master
16 |
17 | - name: Run Codacy Analysis CLI
18 | uses: codacy/codacy-analysis-cli-action@master
19 | with:
20 | output: results.sarif
21 | format: sarif
22 | # Adjust severity of non-security issues
23 | gh-code-scanning-compat: true
24 | # Force 0 exit code to allow SARIF file generation
25 | # This will handover control about PR rejection to the GitHub side
26 | max-allowed-issues: 2147483647
27 |
28 | # Upload the SARIF file generated in the previous step
29 | - name: Upload SARIF results file
30 | uses: github/codeql-action/upload-sarif@main
31 | with:
32 | sarif_file: results.sarif
33 |
34 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # VS Code
2 | .vscode/
--------------------------------------------------------------------------------
/assets/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/assets/.DS_Store
--------------------------------------------------------------------------------
/assets/logo/Mobile_Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/assets/logo/Mobile_Logo.png
--------------------------------------------------------------------------------
/assets/logo/Mobile_Logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
31 |
--------------------------------------------------------------------------------
/assets/logo/Social_Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/assets/logo/Social_Logo.png
--------------------------------------------------------------------------------
/assets/logo/Web_Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/assets/logo/Web_Logo.png
--------------------------------------------------------------------------------
/backend/.gitignore:
--------------------------------------------------------------------------------
1 | ### Python ###
2 | # Byte-compiled / optimized / DLL files
3 | __pycache__/
4 | *.py[cod]
5 | *$py.class
6 |
7 | # C extensions
8 | *.so
9 |
10 | # Distribution / packaging
11 | .Python
12 | build/
13 | develop-eggs/
14 | dist/
15 | downloads/
16 | eggs/
17 | .eggs/
18 | parts/
19 | sdist/
20 | var/
21 | wheels/
22 | pip-wheel-metadata/
23 | share/python-wheels/
24 | *.egg-info/
25 | .installed.cfg
26 | *.egg
27 | MANIFEST
28 |
29 | # PyInstaller
30 | # Usually these files are written by a python script from a template
31 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
32 | *.manifest
33 | *.spec
34 |
35 | # Installer logs
36 | pip-log.txt
37 | pip-delete-this-directory.txt
38 |
39 | # Unit test / coverage reports
40 | htmlcov/
41 | .tox/
42 | .nox/
43 | .coverage
44 | .coverage.*
45 | .cache
46 | nosetests.xml
47 | coverage.xml
48 | *.cover
49 | *.py,cover
50 | .hypothesis/
51 | .pytest_cache/
52 | pytestdebug.log
53 |
54 | # Translations
55 | *.mo
56 | *.pot
57 |
58 | # Django stuff:
59 | *.log
60 | local_settings.py
61 | db.sqlite3
62 | db.sqlite3-journal
63 |
64 | # Flask stuff:
65 | instance/
66 | .webassets-cache
67 |
68 | # Scrapy stuff:
69 | .scrapy
70 |
71 | # Sphinx documentation
72 | docs/_build/
73 | doc/_build/
74 |
75 | # PyBuilder
76 | target/
77 |
78 | # Jupyter Notebook
79 | .ipynb_checkpoints
80 |
81 | # IPython
82 | profile_default/
83 | ipython_config.py
84 |
85 | # pyenv
86 | .python-version
87 |
88 | # pipenv
89 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
90 | # However, in case of collaboration, if having platform-specific dependencies or dependencies
91 | # having no cross-platform support, pipenv may install dependencies that don't work, or not
92 | # install all needed dependencies.
93 | #Pipfile.lock
94 |
95 | # poetry
96 | #poetry.lock
97 |
98 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow
99 | __pypackages__/
100 |
101 | # Celery stuff
102 | celerybeat-schedule
103 | celerybeat.pid
104 |
105 | # SageMath parsed files
106 | *.sage.py
107 |
108 | # Environments
109 | # .env
110 | .env/
111 | .venv/
112 | env/
113 | venv/
114 | ENV/
115 | env.bak/
116 | venv.bak/
117 | pythonenv*
118 |
119 | # Spyder project settings
120 | .spyderproject
121 | .spyproject
122 |
123 | # Rope project settings
124 | .ropeproject
125 |
126 | # mkdocs documentation
127 | /site
128 |
129 | # mypy
130 | .mypy_cache/
131 | .dmypy.json
132 | dmypy.json
133 |
134 | # Pyre type checker
135 | .pyre/
136 |
137 | # pytype static type analyzer
138 | .pytype/
139 |
140 | # operating system-related files
141 | # file properties cache/storage on macOS
142 | *.DS_Store
143 | # thumbnail cache on Windows
144 | Thumbs.db
145 |
146 | # profiling data
147 | .prof
148 |
--------------------------------------------------------------------------------
/backend/backend/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/backend/backend/__init__.py
--------------------------------------------------------------------------------
/backend/backend/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/backend/backend/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/backend/backend/__pycache__/settings.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/backend/backend/__pycache__/settings.cpython-36.pyc
--------------------------------------------------------------------------------
/backend/backend/__pycache__/urls.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/backend/backend/__pycache__/urls.cpython-36.pyc
--------------------------------------------------------------------------------
/backend/backend/__pycache__/wsgi.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/backend/backend/__pycache__/wsgi.cpython-36.pyc
--------------------------------------------------------------------------------
/backend/backend/asgi.py:
--------------------------------------------------------------------------------
1 | """
2 | ASGI config for backend project.
3 |
4 | It exposes the ASGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.asgi import get_asgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')
15 |
16 | application = get_asgi_application()
17 |
--------------------------------------------------------------------------------
/backend/backend/urls.py:
--------------------------------------------------------------------------------
1 | """backend URL Configuration
2 |
3 | The `urlpatterns` list routes URLs to views. For more information please see:
4 | https://docs.djangoproject.com/en/3.1/topics/http/urls/
5 | Examples:
6 | Function views
7 | 1. Add an import: from my_app import views
8 | 2. Add a URL to urlpatterns: path('', views.home, name='home')
9 | Class-based views
10 | 1. Add an import: from other_app.views import Home
11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
12 | Including another URLconf
13 | 1. Import the include() function: from django.urls import include, path
14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
15 | """
16 | from django.contrib import admin
17 | from django.urls import path,include
18 |
19 | urlpatterns = [
20 | path('admin/', admin.site.urls),
21 | path('api/', include('post.urls')),
22 | ]
23 |
--------------------------------------------------------------------------------
/backend/backend/wsgi.py:
--------------------------------------------------------------------------------
1 | """
2 | WSGI config for backend project.
3 |
4 | It exposes the WSGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.wsgi import get_wsgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')
15 |
16 | application = get_wsgi_application()
17 |
--------------------------------------------------------------------------------
/backend/manage.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | """Django's command-line utility for administrative tasks."""
3 | import os
4 | import sys
5 |
6 |
7 | def main():
8 | """Run administrative tasks."""
9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')
10 | try:
11 | from django.core.management import execute_from_command_line
12 | except ImportError as exc:
13 | raise ImportError(
14 | "Couldn't import Django. Are you sure it's installed and "
15 | "available on your PYTHONPATH environment variable? Did you "
16 | "forget to activate a virtual environment?"
17 | ) from exc
18 | execute_from_command_line(sys.argv)
19 |
20 |
21 | if __name__ == '__main__':
22 | main()
23 |
--------------------------------------------------------------------------------
/backend/media/documents/sample-Pseudocode.py:
--------------------------------------------------------------------------------
1 | IF x % 5 = 0:
2 | OUTPUT "Hello World"
3 |
--------------------------------------------------------------------------------
/backend/media/documents/sample.py:
--------------------------------------------------------------------------------
1 | if x % 5 == 0:
2 | print("Hello World")
3 |
--------------------------------------------------------------------------------
/backend/post/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/backend/post/__init__.py
--------------------------------------------------------------------------------
/backend/post/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/backend/post/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/backend/post/__pycache__/admin.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/backend/post/__pycache__/admin.cpython-36.pyc
--------------------------------------------------------------------------------
/backend/post/__pycache__/models.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/backend/post/__pycache__/models.cpython-36.pyc
--------------------------------------------------------------------------------
/backend/post/__pycache__/serializers.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/backend/post/__pycache__/serializers.cpython-36.pyc
--------------------------------------------------------------------------------
/backend/post/__pycache__/urls.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/backend/post/__pycache__/urls.cpython-36.pyc
--------------------------------------------------------------------------------
/backend/post/__pycache__/views.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/backend/post/__pycache__/views.cpython-36.pyc
--------------------------------------------------------------------------------
/backend/post/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 | from .models import Post
3 |
4 | # Register your models here.
5 |
6 | admin.site.register(Post)
7 |
8 |
9 |
--------------------------------------------------------------------------------
/backend/post/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class PostConfig(AppConfig):
5 | name = 'post'
6 |
--------------------------------------------------------------------------------
/backend/post/migrations/0001_initial.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 3.1.6 on 2021-02-19 05:52
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | initial = True
9 |
10 | dependencies = [
11 | ]
12 |
13 | operations = [
14 | migrations.CreateModel(
15 | name='Post',
16 | fields=[
17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
18 | ('files', models.FileField(upload_to='documents/')),
19 | ('uploaded_at', models.DateTimeField(auto_now_add=True)),
20 | ],
21 | ),
22 | ]
23 |
--------------------------------------------------------------------------------
/backend/post/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/backend/post/migrations/__init__.py
--------------------------------------------------------------------------------
/backend/post/migrations/__pycache__/0001_initial.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/backend/post/migrations/__pycache__/0001_initial.cpython-36.pyc
--------------------------------------------------------------------------------
/backend/post/migrations/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/backend/post/migrations/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/backend/post/models.py:
--------------------------------------------------------------------------------
1 | from django.db import models
2 |
3 | # Create your models here.
4 | class Post(models.Model):
5 | files = models.FileField(upload_to='documents/')
6 | uploaded_at = models.DateTimeField(auto_now_add=True)
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/backend/post/serializers.py:
--------------------------------------------------------------------------------
1 | from rest_framework import serializers
2 | from .models import Post
3 |
4 | class PostSerializer(serializers.ModelSerializer):
5 | class Meta:
6 | model = Post
7 | fields = '__all__'
--------------------------------------------------------------------------------
/backend/post/tests.py:
--------------------------------------------------------------------------------
1 | from django.test import TestCase
2 |
3 | # Create your tests here.
4 |
--------------------------------------------------------------------------------
/backend/post/urls.py:
--------------------------------------------------------------------------------
1 | from django.urls import path
2 | from . import views
3 |
4 | urlpatterns = [
5 | path('posts/', views.PostView.as_view(), name= 'posts_list'),
6 | ]
--------------------------------------------------------------------------------
/backend/post/views.py:
--------------------------------------------------------------------------------
1 | from .serializers import PostSerializer
2 | from .models import Post
3 | from rest_framework.views import APIView
4 | from rest_framework.parsers import MultiPartParser, FormParser
5 | from rest_framework.response import Response
6 | from rest_framework import status
7 | # Create your views here.
8 |
9 | class PostView(APIView):
10 | parser_classes = (MultiPartParser, FormParser)
11 |
12 | def get(self, request, *args, **kwargs):
13 | posts = Post.objects.all()
14 | serializer = PostSerializer(posts, many=True)
15 | return Response(serializer.data)
16 |
17 | def post(self, request, *args, **kwargs):
18 | posts_serializer = PostSerializer(data=request.data)
19 | if posts_serializer.is_valid():
20 | posts_serializer.save()
21 | return Response(posts_serializer.data, status=status.HTTP_201_CREATED)
22 | else:
23 | print('error', posts_serializer.errors)
24 | return Response(posts_serializer.errors, status=status.HTTP_400_BAD_REQUEST)
25 |
--------------------------------------------------------------------------------
/code_converter/.gitignore:
--------------------------------------------------------------------------------
1 | # Various IDEs and Editors
2 | .vscode/
3 | .idea/
4 | **/*~
5 |
6 | # Mac OSX temporary files
7 | .DS_Store
8 | **/.DS_Store
9 |
10 | # dfx temporary files
11 | .dfx/
12 | #nit
13 | # frontend code
14 | node_modules/
15 | dist/
16 |
--------------------------------------------------------------------------------
/code_converter/README.md:
--------------------------------------------------------------------------------
1 | # code_converter
2 |
3 | Welcome to your new code_converter project and to the internet computer development community. By default, creating a new project adds this README and some template files to your project directory. You can edit these template files to customize your project and to include your own code to speed up the development cycle.
4 |
5 | To get started, you might want to explore the project directory structure and the default configuration file. Working with this project in your development environment will not affect any production deployment or identity tokens.
6 |
7 | To learn more before you start working with code_converter, see the following documentation available online:
8 |
9 | - [Quick Start](https://sdk.dfinity.org/docs/quickstart/quickstart-intro.html)
10 | - [SDK Developer Tools](https://sdk.dfinity.org/docs/developers-guide/sdk-guide.html)
11 | - [Motoko Programming Language Guide](https://sdk.dfinity.org/docs/language-guide/motoko.html)
12 | - [Motoko Language Quick Reference](https://sdk.dfinity.org/docs/language-guide/language-manual.html)
13 |
14 | If you want to start working on your project right away, you might want to try the following commands:
15 |
16 | ```bash
17 | cd code_converter/
18 | dfx help
19 | dfx config --help
20 | ```
21 |
--------------------------------------------------------------------------------
/code_converter/canister_ids.json:
--------------------------------------------------------------------------------
1 | {
2 | "code_converter": {
3 | "ic": "fdktz-5qaaa-aaaab-qah6a-cai"
4 | },
5 | "code_converter_assets": {
6 | "ic": "gb33l-zyaaa-aaaab-aagyq-cai"
7 | }
8 | }
--------------------------------------------------------------------------------
/code_converter/dfx.json:
--------------------------------------------------------------------------------
1 | {
2 | "canisters": {
3 | "code_converter": {
4 | "main": "src/code_converter/main.mo",
5 | "type": "motoko"
6 | },
7 | "code_converter_assets": {
8 | "dependencies": [
9 | "code_converter"
10 | ],
11 | "frontend": {
12 | "entrypoint": "src/code_converter_assets/public/index.js"
13 | },
14 | "source": [
15 | "src/code_converter_assets/assets",
16 | "dist/code_converter_assets/"
17 | ],
18 | "type": "assets"
19 | }
20 | },
21 | "defaults": {
22 | "build": {
23 | "packtool": ""
24 | }
25 | },
26 | "dfx": "0.6.23",
27 | "networks": {
28 | "local": {
29 | "bind": "127.0.0.1:8000",
30 | "type": "ephemeral"
31 | }
32 | },
33 | "version": 1
34 | }
--------------------------------------------------------------------------------
/code_converter/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "code_converter_assets",
3 | "version": "0.1.0",
4 | "description": "",
5 | "keywords": [],
6 | "scripts": {
7 | "build": "webpack"
8 | },
9 | "devDependencies": {
10 | "@dfinity/agent": "0.6.23",
11 | "terser-webpack-plugin": "2.2.2",
12 | "webpack": "4.41.3",
13 | "webpack-cli": "3.3.10"
14 | },
15 | "dependencies": {
16 | "css-loader": "^5.0.2",
17 | "react": "^16.14.0",
18 | "react-ace": "^9.3.0",
19 | "react-dom": "^16.14.0",
20 | "style-loader": "^2.0.0",
21 | "ts-loader": "^8.0.17",
22 | "typescript": "^4.2.2"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/code_converter/src/code_converter/main.mo:
--------------------------------------------------------------------------------
1 | actor {
2 | public func greet(name : Text) : async Text {
3 | return "Hello, " # name # "!";
4 | };
5 | };
6 |
--------------------------------------------------------------------------------
/code_converter/src/code_converter_assets/assets/sample-asset.txt:
--------------------------------------------------------------------------------
1 | This is a sample asset!
2 |
--------------------------------------------------------------------------------
/code_converter/src/code_converter_assets/public/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/code_converter/src/code_converter_assets/public/index.js:
--------------------------------------------------------------------------------
1 | import code_converter from "ic:canisiters/code_converter";
2 | import * as React from "react";
3 | import { render } from "react-dom";
4 | import "./App.css";
5 | import { Converter, ConverterData } from "./converter.jsx";
6 |
7 | class MyHello extends React.Component {
8 | render() {
9 | return ;
10 | }
11 | }
12 |
13 | render(, document.getElementById("app"));
14 |
--------------------------------------------------------------------------------
/code_converter/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2018", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
4 | "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
5 | "lib": [
6 | "ES2018",
7 | "DOM"
8 | ], /* Specify library files to be included in the compilation. */
9 | "allowJs": true, /* Allow javascript files to be compiled. */
10 | "jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
11 | },
12 | "include": [
13 | "src/**/*"
14 | ],
15 | }
--------------------------------------------------------------------------------
/code_converter/webpack.config.js:
--------------------------------------------------------------------------------
1 | const path = require("path");
2 | const TerserPlugin = require("terser-webpack-plugin");
3 | const dfxJson = require("./dfx.json");
4 |
5 | // List of all aliases for canisters. This creates the module alias for
6 | // the `import ... from "ic:canisters/xyz"` where xyz is the name of a
7 | // canister.
8 | const aliases = Object.entries(dfxJson.canisters).reduce(
9 | (acc, [name, _value]) => {
10 | // Get the network name, or `local` by default.
11 | const networkName = process.env["DFX_NETWORK"] || "local";
12 | const outputRoot = path.join(
13 | __dirname,
14 | ".dfx",
15 | networkName,
16 | "canisters",
17 | name
18 | );
19 |
20 | return {
21 | ...acc,
22 | ["ic:canisters/" + name]: path.join(outputRoot, name + ".js"),
23 | ["ic:idl/" + name]: path.join(outputRoot, name + ".did.js"),
24 | };
25 | },
26 | {}
27 | );
28 |
29 | /**
30 | * Generate a webpack configuration for a canister.
31 | */
32 | function generateWebpackConfigForCanister(name, info) {
33 | if (typeof info.frontend !== "object") {
34 | return;
35 | }
36 |
37 | return {
38 | mode: "production",
39 | entry: {
40 | index: path.join(__dirname, info.frontend.entrypoint),
41 | },
42 | node: {
43 | fs: "empty",
44 | },
45 | devtool: "source-map",
46 | optimization: {
47 | minimize: true,
48 | minimizer: [new TerserPlugin()],
49 | },
50 | resolve: {
51 | alias: aliases,
52 | },
53 | output: {
54 | filename: "[name].js",
55 | path: path.join(__dirname, "dist", name),
56 | },
57 |
58 | // Depending in the language or framework you are using for
59 | // front-end development, add module loaders to the default
60 | // webpack configuration. For example, if you are using React
61 | // modules and CSS as described in the "Adding a stylesheet"
62 | // tutorial, uncomment the following lines:
63 | // module: {
64 | // rules: [
65 | // { test: /\.(ts|tsx|jsx)$/, loader: "ts-loader" },
66 | // { test: /\.css$/, use: ['style-loader','css-loader'] }
67 | // ]
68 | // },
69 | module: {
70 | rules: [
71 | { test: /\.(js|ts)x?$/, loader: "ts-loader" },
72 | { test: /\.css$/, use: ["style-loader", "css-loader"] },
73 | ],
74 | },
75 | plugins: [],
76 | };
77 | }
78 |
79 | // If you have additional webpack configurations you want to build
80 | // as part of this configuration, add them to the section below.
81 | module.exports = [
82 | ...Object.entries(dfxJson.canisters)
83 | .map(([name, info]) => {
84 | return generateWebpackConfigForCanister(name, info);
85 | })
86 | .filter((x) => !!x),
87 | ];
88 |
--------------------------------------------------------------------------------
/cpp-pseudogen/.gitignore:
--------------------------------------------------------------------------------
1 | ### C++ ###
2 | # Prerequisites
3 | *.d
4 |
5 | # Compiled Object files
6 | *.slo
7 | *.lo
8 | *.o
9 | *.obj
10 |
11 | # Precompiled Headers
12 | *.gch
13 | *.pch
14 |
15 | # Linker files
16 | *.ilk
17 |
18 | # Debugger Files
19 | *.pdb
20 |
21 | # Compiled Dynamic libraries
22 | *.so
23 | *.dylib
24 | *.dll
25 |
26 | # Fortran module files
27 | *.mod
28 | *.smod
29 |
30 | # Compiled Static libraries
31 | *.lai
32 | *.la
33 | *.a
34 | *.lib
35 |
36 | # Executables
37 | main.exe
38 | *.exe
39 | *.out
40 | *.app
41 |
--------------------------------------------------------------------------------
/cpp-pseudogen/output.txt:
--------------------------------------------------------------------------------
1 | Declare Function main
2 | Declare 1 Integer variable sum = 0
3 | Start a loop from int i = 1 till i <= 10
4 | Perform operation: sum += i
5 | Print Integer sum
6 | Print \n
7 | function Returns 0
8 |
--------------------------------------------------------------------------------
/cpp-pseudogen/prog.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | using namespace std;
4 |
5 | int main()
6 | {
7 |
8 | int sum = 0;
9 | for (int i = 1; i <= 10; i++)
10 | {
11 | sum += i;
12 | }
13 | cout << sum << "\n";
14 | return 0;
15 | }
16 |
--------------------------------------------------------------------------------
/frontend/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/frontend/README.md:
--------------------------------------------------------------------------------
1 | # Getting Started with Create React App
2 |
3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4 |
5 | ## Available Scripts
6 |
7 | In the project directory, you can run:
8 |
9 | ### `yarn start`
10 |
11 | Runs the app in the development mode.\
12 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
13 |
14 | The page will reload if you make edits.\
15 | You will also see any lint errors in the console.
16 |
17 | ### `yarn test`
18 |
19 | Launches the test runner in the interactive watch mode.\
20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21 |
22 | ### `yarn build`
23 |
24 | Builds the app for production to the `build` folder.\
25 | It correctly bundles React in production mode and optimizes the build for the best performance.
26 |
27 | The build is minified and the filenames include the hashes.\
28 | Your app is ready to be deployed!
29 |
30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31 |
32 | ### `yarn eject`
33 |
34 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!**
35 |
36 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37 |
38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
39 |
40 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
41 |
42 | ## Learn More
43 |
44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45 |
46 | To learn React, check out the [React documentation](https://reactjs.org/).
47 |
48 | ### Code Splitting
49 |
50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
51 |
52 | ### Analyzing the Bundle Size
53 |
54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55 |
56 | ### Making a Progressive Web App
57 |
58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59 |
60 | ### Advanced Configuration
61 |
62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
63 |
64 | ### Deployment
65 |
66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
67 |
68 | ### `yarn build` fails to minify
69 |
70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
71 |
--------------------------------------------------------------------------------
/frontend/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "frontend",
3 | "version": "0.1.0",
4 | "proxy": "http://localhost:3000/",
5 | "private": true,
6 | "dependencies": {
7 | "@testing-library/jest-dom": "^5.11.4",
8 | "@testing-library/react": "^11.1.0",
9 | "@testing-library/user-event": "^12.1.10",
10 | "axios": "^0.21.1",
11 | "compile-run": "^2.3.4",
12 | "compileon": "^1.1.0",
13 | "compilex": "^0.7.4",
14 | "react": "^17.0.1",
15 | "react-ace": "^9.3.0",
16 | "react-dom": "^17.0.1",
17 | "react-dropdown": "^1.9.2",
18 | "react-scripts": "4.0.2",
19 | "react-simple-code-editor": "^0.11.0",
20 | "web-vitals": "^1.0.1"
21 | },
22 | "scripts": {
23 | "start": "react-scripts start",
24 | "build": "react-scripts build",
25 | "test": "react-scripts test",
26 | "eject": "react-scripts eject"
27 | },
28 | "eslintConfig": {
29 | "extends": [
30 | "react-app",
31 | "react-app/jest"
32 | ]
33 | },
34 | "browserslist": {
35 | "production": [
36 | ">0.2%",
37 | "not dead",
38 | "not op_mini all"
39 | ],
40 | "development": [
41 | "last 1 chrome version",
42 | "last 1 firefox version",
43 | "last 1 safari version"
44 | ]
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/frontend/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/frontend/public/favicon.ico
--------------------------------------------------------------------------------
/frontend/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
13 |
14 |
18 |
19 |
28 | Code Converter
29 |
30 |
31 |
32 |
33 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/frontend/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/frontend/public/logo192.png
--------------------------------------------------------------------------------
/frontend/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/frontend/public/logo512.png
--------------------------------------------------------------------------------
/frontend/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/frontend/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/frontend/src/Upload.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | const axios = require("axios");
3 |
4 | class Upload extends React.Component {
5 | constructor(props) {
6 | super(props);
7 | this.state = {
8 | file: null,
9 | };
10 | this.onFormSubmit = this.onFormSubmit.bind(this);
11 | this.onChange = this.onChange.bind(this);
12 | }
13 | onFormSubmit(e) {
14 | e.preventDefault();
15 | const formData = new FormData();
16 | formData.append("myImage", this.state.file);
17 | console.log(this.state.file);
18 | const config = {
19 | headers: {
20 | "content-type": "multipart/form-data",
21 | },
22 | };
23 | axios
24 | .post("http://localhost:3004/upload", formData, config)
25 | .then((response) => {
26 | alert("The file is successfully uploaded");
27 | })
28 | .catch((error) => {});
29 | }
30 | onChange(e) {
31 | this.setState({ file: e.target.files[0] });
32 | var reader = new FileReader();
33 | var fileToRead = document.querySelector("input").files[0];
34 |
35 | // attach event, that will be fired, when read is end
36 | reader.addEventListener("loadend", function () {
37 | // reader.result contains the contents of blob as a typed array
38 | // we insert content of file in DOM here
39 | document.getElementById("file").innerText = reader.result;
40 | // content = reader.result;
41 | console.log(reader.result);
42 | });
43 |
44 | // start reading a loaded file
45 | reader.readAsText(fileToRead);
46 | }
47 |
48 | render() {
49 | return (
50 |
54 | );
55 | }
56 | }
57 |
58 | export default Upload;
59 |
--------------------------------------------------------------------------------
/frontend/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/frontend/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/frontend/src/logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/node-api/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
--------------------------------------------------------------------------------
/node-api/codes/hello-Pseudocode.py:
--------------------------------------------------------------------------------
1 | fruits <- ["apple", "banana", "cherry"]
2 | for x in fruits:
3 | IF x = "banana":
4 | continue
5 | ENDIF
6 | OUTPUT x
7 |
--------------------------------------------------------------------------------
/node-api/codes/hello.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | using namespace std;
4 |
5 | int main()
6 | {
7 |
8 | int sum = 0;
9 | for (int i = 1; i <= 10; i++)
10 | {
11 | sum += i;
12 | }
13 | cout << sum << "\n";
14 | return 0;
15 | }
16 |
--------------------------------------------------------------------------------
/node-api/codes/hello.py:
--------------------------------------------------------------------------------
1 | fruits = ["apple", "banana", "cherry"]
2 | for x in fruits:
3 | if x == "banana":
4 | continue
5 | print(x)
6 |
--------------------------------------------------------------------------------
/node-api/hello-Pseudocode.py:
--------------------------------------------------------------------------------
1 | CLASS Node(object):
2 | # Singly linked node
3 | FUNCTION __init__(self, value=None, next=None, prev=None):
4 | value <- value
5 | next <- next
6 | prev <- prev
7 | ENDFUNCTION
8 |
9 | ENDCLASS
10 |
11 | CLASS doubly_linked_list(object):
12 | FUNCTION __init__(self):
13 | head <- None
14 | tail <- None
15 | count <- 0
16 | ENDFUNCTION
17 |
18 | FUNCTION append_item(self, value):
19 | # Append an item
20 | new_item <- Node(value, None, None)
21 | IF head is None:
22 | head <- new_item
23 | tail <- head
24 | ELSE:
25 | new_item.prev <- tail
26 | tail.next <- new_item
27 | tail <- new_item
28 | ENDIF
29 | count += 1
30 | ENDFUNCTION
31 |
32 | FUNCTION iter(self):
33 | # Iterate the list
34 | current <- head
35 | while current:
36 | item_val <- current.value
37 | current <- current.next
38 | yield item_val
39 | ENDFUNCTION
40 |
41 | ENDWHILE
42 | FUNCTION print_foward(self):
43 | for node in iter():
44 | OUTPUT node
45 | ENDFUNCTION
46 |
47 | ENDFOR
48 | FUNCTION search_item(self, val):
49 | for node in iter():
50 | IF val = node:
51 | RETURN True
52 | ENDIF
53 | ENDFOR
54 | RETURN False
55 | ENDFUNCTION
56 |
57 | FUNCTION delete(self, value):
58 | # Delete a specific item
59 | ENDIF
60 | current <- head
61 | node_deleted <- False
62 | IF current is None:
63 | node_deleted <- False
64 | ELSEIF current.value = value:
65 | head <- current.next
66 | head.prev <- None
67 | node_deleted <- True
68 | ELSEIF tail.value = value:
69 | tail <- tail.prev
70 | tail.next <- None
71 | node_deleted <- True
72 | ELSE:
73 | while current:
74 | IF current.value = value:
75 | current.prev.next <- current.next
76 | current.next.prev <- current.prev
77 | node_deleted <- True
78 | ENDIF
79 | current <- current.next
80 | ENDIF
81 | ENDWHILE
82 | IF node_deleted:
83 | count -= 1
84 | ENDIF
85 | ENDFUNCTION
86 |
87 | ENDCLASS
88 |
89 | items <- doubly_linked_list()
90 | items.append_item('PHP')
91 | items.append_item('Python')
92 | items.append_item('C#')
93 | items.append_item('C++')
94 | items.append_item('Java')
95 | items.append_item('SQL')
96 | OUTPUT "Original list:"
97 | items.print_foward()
98 | items.delete("Java")
99 | items.delete("Python")
100 | OUTPUT "\nList after deleting two items:"
101 | items.print_foward(
102 |
--------------------------------------------------------------------------------
/node-api/hello.py:
--------------------------------------------------------------------------------
1 | fruits = ["apple", "banana", "cherry"]
2 | for x in fruits:
3 | if x == "banana":
4 | continue
5 | print(x)
6 |
--------------------------------------------------------------------------------
/node-api/helper.js:
--------------------------------------------------------------------------------
1 | const { existsSync, mkdirSync, writeFileSync } = require("fs");
2 | const { resolve } = require("path");
3 |
4 | function createFile(ext, content) {
5 | if (!existsSync("./codes")) {
6 | mkdirSync("./codes");
7 | } else {
8 | // if (!existsSync(`./codes/${ext}`)) {
9 | // mkdirSync(`./codes/${ext}`);
10 | // }
11 | }
12 | const fileName = "hello";
13 | const filePath = `./codes`;
14 | writeFileSync(filePath + "/" + fileName + "." + ext, content);
15 | return { path: resolve(`./codes/${ext}`), fileName: fileName };
16 | }
17 | module.exports = { createFile };
18 |
--------------------------------------------------------------------------------
/node-api/output.txt:
--------------------------------------------------------------------------------
1 | Declare Function main
2 | Declare 3 Integer variable sum = 0
3 | Start a loop from int i = 1 till i <= 10
4 | Perform operation: sum += i
5 | Print Integer sum
6 | Print \n
7 | function Returns 0
8 |
--------------------------------------------------------------------------------
/node-api/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "api",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "dev": "nodemon server.js",
8 | "test": "echo \"Error: no test specified\" && exit 1"
9 | },
10 | "author": "",
11 | "license": "ISC",
12 | "dependencies": {
13 | "body-parser": "^1.19.0",
14 | "compile-run": "^2.3.4",
15 | "cors": "^2.8.5",
16 | "express": "^4.17.1",
17 | "fs": "0.0.1-security",
18 | "multer": "^1.4.2",
19 | "nodemon": "^2.0.7",
20 | "path": "^0.12.7",
21 | "react-dropdown": "^1.9.2"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/node-api/prog.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | using namespace std;
4 |
5 | int main()
6 | {
7 |
8 | int sum = 0;
9 | for (int i = 1; i <= 10; i++)
10 | {
11 | sum += i;
12 | }
13 | cout << sum << "\n";
14 | return 0;
15 | }
16 |
--------------------------------------------------------------------------------
/node-api/server.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 | const { c, cpp, node, python, java } = require("compile-run");
3 | const { createFile } = require("./helper");
4 | const bodyParser = require("body-parser");
5 | const app = express();
6 | const path = require("path");
7 | const multer = require("multer");
8 | const port = 8000;
9 | var cors = require("cors");
10 | app.use(bodyParser.json());
11 | app.use(bodyParser.urlencoded({ extended: true }));
12 |
13 | app.use(cors()); // Use this after the variable declaration
14 | const storage = multer.diskStorage({
15 | destination: function (req, file, cb) {
16 | cb(null, "./codes");
17 | },
18 | filename: function (req, file, cb) {
19 | console.log("file storage", file);
20 |
21 | cb(null, "hello" + path.extname(file.originalname));
22 | },
23 | });
24 | const upload = multer({
25 | storage: storage,
26 | limits: { fileSize: 1000000 },
27 | });
28 |
29 | app.post("/upload", upload.single("myImage"), (req, res) => {
30 | console.log("file in server", req.file);
31 | return "ok";
32 | });
33 |
34 | app.post("/createFile", (req, res) => {
35 | //upload.single(req.query.name);
36 | // upload.single("avatar"),
37 | // res.setHeader("Access-Control-Allow-Origin", "http://localhost:3001");
38 | console.log(req.url);
39 | console.log("url");
40 | console.log(req.body.body);
41 | var language = req.query.lang;
42 | console.log(language);
43 |
44 | var code = req.body.body;
45 |
46 | if (code !== undefined) {
47 | if (language === "cpp") {
48 | const { path, fileName } = createFile("cpp", code);
49 | } else if (language === "python") {
50 | const { path, fileName } = createFile("py", code);
51 | }
52 | }
53 | });
54 | app.post("/convert", (req, res) => {
55 | var language = req.query.lang;
56 | console.log(language);
57 |
58 | const sourcecode = `print("Hell0 W0rld!")`;
59 | var CPPcode = `
60 | #include
61 | using namespace std;
62 | int main() {
63 | cout << "Hello";
64 | }
65 | `;
66 | if (language === "python") {
67 | let resultPromise = python.runFile("generatePseudo.py");
68 | resultPromise
69 | .then((result) => {
70 | res.send(result);
71 | console.log(result);
72 | })
73 | .catch((err) => {
74 | res.send(result);
75 | console.log(err);
76 | });
77 | } else if (language === "cpp") {
78 | let resultPromise = cpp.runFile("main.cpp");
79 | resultPromise
80 | .then((result) => {
81 | res.send(result);
82 | console.log(result);
83 | })
84 | .catch((err) => {
85 | res.send(result);
86 | console.log(err);
87 | });
88 | } else {
89 | let resultPromise = python.runFile("generatePseudo.py");
90 | resultPromise
91 | .then((result) => {
92 | res.send(result);
93 | console.log(result);
94 | })
95 | .catch((err) => {
96 | res.send(result);
97 | console.log(err);
98 | });
99 | }
100 | });
101 |
102 | app.listen(3004, () => {
103 | console.log("Server running on port 3004");
104 | });
105 |
--------------------------------------------------------------------------------
/python-scripts/.gitignore:
--------------------------------------------------------------------------------
1 | ### Python ###
2 | # Byte-compiled / optimized / DLL files
3 | __pycache__/
4 | *.py[cod]
5 | *$py.class
6 |
7 | # C extensions
8 | *.so
9 |
10 | # Distribution / packaging
11 | .Python
12 | build/
13 | develop-eggs/
14 | dist/
15 | downloads/
16 | eggs/
17 | .eggs/
18 | parts/
19 | sdist/
20 | var/
21 | wheels/
22 | pip-wheel-metadata/
23 | share/python-wheels/
24 | *.egg-info/
25 | .installed.cfg
26 | *.egg
27 | MANIFEST
28 |
29 | # PyInstaller
30 | # Usually these files are written by a python script from a template
31 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
32 | *.manifest
33 | *.spec
34 |
35 | # Installer logs
36 | pip-log.txt
37 | pip-delete-this-directory.txt
38 |
39 | # Unit test / coverage reports
40 | htmlcov/
41 | .tox/
42 | .nox/
43 | .coverage
44 | .coverage.*
45 | .cache
46 | nosetests.xml
47 | coverage.xml
48 | *.cover
49 | *.py,cover
50 | .hypothesis/
51 | .pytest_cache/
52 | pytestdebug.log
53 |
54 | # Translations
55 | *.mo
56 | *.pot
57 |
58 | # Django stuff:
59 | *.log
60 | local_settings.py
61 | db.sqlite3
62 | db.sqlite3-journal
63 |
64 | # Flask stuff:
65 | instance/
66 | .webassets-cache
67 |
68 | # Scrapy stuff:
69 | .scrapy
70 |
71 | # Sphinx documentation
72 | docs/_build/
73 | doc/_build/
74 |
75 | # PyBuilder
76 | target/
77 |
78 | # Jupyter Notebook
79 | .ipynb_checkpoints
80 |
81 | # IPython
82 | profile_default/
83 | ipython_config.py
84 |
85 | # pyenv
86 | .python-version
87 |
88 | # pipenv
89 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
90 | # However, in case of collaboration, if having platform-specific dependencies or dependencies
91 | # having no cross-platform support, pipenv may install dependencies that don't work, or not
92 | # install all needed dependencies.
93 | #Pipfile.lock
94 |
95 | # poetry
96 | #poetry.lock
97 |
98 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow
99 | __pypackages__/
100 |
101 | # Celery stuff
102 | celerybeat-schedule
103 | celerybeat.pid
104 |
105 | # SageMath parsed files
106 | *.sage.py
107 |
108 | # Environments
109 | # .env
110 | .env/
111 | .venv/
112 | env/
113 | venv/
114 | ENV/
115 | env.bak/
116 | venv.bak/
117 | pythonenv*
118 |
119 | # Spyder project settings
120 | .spyderproject
121 | .spyproject
122 |
123 | # Rope project settings
124 | .ropeproject
125 |
126 | # mkdocs documentation
127 | /site
128 |
129 | # mypy
130 | .mypy_cache/
131 | .dmypy.json
132 | dmypy.json
133 |
134 | # Pyre type checker
135 | .pyre/
136 |
137 | # pytype static type analyzer
138 | .pytype/
139 |
140 | # operating system-related files
141 | # file properties cache/storage on macOS
142 | *.DS_Store
143 | # thumbnail cache on Windows
144 | Thumbs.db
145 |
146 | # profiling data
147 | .prof
148 |
--------------------------------------------------------------------------------
/python-scripts/hello-Pseudocode.py:
--------------------------------------------------------------------------------
1 | CLASS Node(object):
2 | # Singly linked node
3 | FUNCTION __init__(self, value=None, next=None, prev=None):
4 | value <- value
5 | next <- next
6 | prev <- prev
7 | ENDFUNCTION
8 |
9 | ENDCLASS
10 |
11 | CLASS doubly_linked_list(object):
12 | FUNCTION __init__(self):
13 | head <- None
14 | tail <- None
15 | count <- 0
16 | ENDFUNCTION
17 |
18 | FUNCTION append_item(self, value):
19 | # Append an item
20 | new_item <- Node(value, None, None)
21 | IF head is None:
22 | head <- new_item
23 | tail <- head
24 | ELSE:
25 | new_item.prev <- tail
26 | tail.next <- new_item
27 | tail <- new_item
28 | ENDIF
29 | count += 1
30 | ENDFUNCTION
31 |
32 | FUNCTION iter(self):
33 | # Iterate the list
34 | current <- head
35 | while current:
36 | item_val <- current.value
37 | current <- current.next
38 | yield item_val
39 | ENDFUNCTION
40 |
41 | ENDWHILE
42 | FUNCTION print_foward(self):
43 | for node in iter():
44 | OUTPUT node
45 | ENDFUNCTION
46 |
47 | ENDFOR
48 | FUNCTION search_item(self, val):
49 | for node in iter():
50 | IF val = node:
51 | RETURN True
52 | ENDIF
53 | ENDFOR
54 | RETURN False
55 | ENDFUNCTION
56 |
57 | FUNCTION delete(self, value):
58 | # Delete a specific item
59 | ENDIF
60 | current <- head
61 | node_deleted <- False
62 | IF current is None:
63 | node_deleted <- False
64 | ELSEIF current.value = value:
65 | head <- current.next
66 | head.prev <- None
67 | node_deleted <- True
68 | ELSEIF tail.value = value:
69 | tail <- tail.prev
70 | tail.next <- None
71 | node_deleted <- True
72 | ELSE:
73 | while current:
74 | IF current.value = value:
75 | current.prev.next <- current.next
76 | current.next.prev <- current.prev
77 | node_deleted <- True
78 | ENDIF
79 | current <- current.next
80 | ENDIF
81 | ENDWHILE
82 | IF node_deleted:
83 | count -= 1
84 | ENDIF
85 | ENDFUNCTION
86 |
87 | ENDCLASS
88 |
89 | items <- doubly_linked_list()
90 | items.append_item('PHP')
91 | items.append_item('Python')
92 | items.append_item('C#')
93 | items.append_item('C++')
94 | items.append_item('Java')
95 | items.append_item('SQL')
96 | OUTPUT "Original list:"
97 | items.print_foward()
98 | items.delete("Java")
99 | items.delete("Python")
100 | OUTPUT "\nList after deleting two items:"
101 | items.print_foward(
102 |
--------------------------------------------------------------------------------
/python-scripts/hello.py:
--------------------------------------------------------------------------------
1 | class Node(object):
2 | # Singly linked node
3 | def __init__(self, value=None, next=None, prev=None):
4 | self.value = value
5 | self.next = next
6 | self.prev = prev
7 |
8 | class doubly_linked_list(object):
9 | def __init__(self):
10 | self.head = None
11 | self.tail = None
12 | self.count = 0
13 |
14 | def append_item(self, value):
15 | # Append an item
16 | new_item = Node(value, None, None)
17 | if self.head is None:
18 | self.head = new_item
19 | self.tail = self.head
20 | else:
21 | new_item.prev = self.tail
22 | self.tail.next = new_item
23 | self.tail = new_item
24 | self.count += 1
25 |
26 | def iter(self):
27 | # Iterate the list
28 | current = self.head
29 | while current:
30 | item_val = current.value
31 | current = current.next
32 | yield item_val
33 |
34 | def print_foward(self):
35 | for node in self.iter():
36 | print(node)
37 |
38 | def search_item(self, val):
39 | for node in self.iter():
40 | if val == node:
41 | return True
42 | return False
43 |
44 | def delete(self, value):
45 | # Delete a specific item
46 | current = self.head
47 | node_deleted = False
48 | if current is None:
49 | node_deleted = False
50 |
51 | elif current.value == value:
52 | self.head = current.next
53 | self.head.prev = None
54 | node_deleted = True
55 |
56 | elif self.tail.value == value:
57 | self.tail = self.tail.prev
58 | self.tail.next = None
59 | node_deleted = True
60 |
61 | else:
62 | while current:
63 | if current.value == value:
64 | current.prev.next = current.next
65 | current.next.prev = current.prev
66 | node_deleted = True
67 | current = current.next
68 |
69 | if node_deleted:
70 | self.count -= 1
71 |
72 | items = doubly_linked_list()
73 | items.append_item('PHP')
74 | items.append_item('Python')
75 | items.append_item('C#')
76 | items.append_item('C++')
77 | items.append_item('Java')
78 | items.append_item('SQL')
79 |
80 | print("Original list:")
81 | items.print_foward()
82 |
83 | items.delete("Java")
84 | items.delete("Python")
85 | print("\nList after deleting two items:")
86 | items.print_foward()
--------------------------------------------------------------------------------
/python-scripts/node_modules/colors/MIT-LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2010
2 |
3 | Marak Squires
4 | Alexis Sellier (cloudhead)
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in
14 | all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | THE SOFTWARE.
--------------------------------------------------------------------------------
/python-scripts/node_modules/colors/ReadMe.md:
--------------------------------------------------------------------------------
1 | # colors.js - get color and style in your node.js console ( and browser ) like what
2 |
3 |
4 |
5 |
6 | ## Installation
7 |
8 | npm install colors
9 |
10 | ## colors and styles!
11 |
12 | - bold
13 | - italic
14 | - underline
15 | - inverse
16 | - yellow
17 | - cyan
18 | - white
19 | - magenta
20 | - green
21 | - red
22 | - grey
23 | - blue
24 | - rainbow
25 | - zebra
26 | - random
27 |
28 | ## Usage
29 |
30 | ``` js
31 | var colors = require('./colors');
32 |
33 | console.log('hello'.green); // outputs green text
34 | console.log('i like cake and pies'.underline.red) // outputs red underlined text
35 | console.log('inverse the color'.inverse); // inverses the color
36 | console.log('OMG Rainbows!'.rainbow); // rainbow (ignores spaces)
37 | ```
38 |
39 | # Creating Custom themes
40 |
41 | ```js
42 |
43 | var colors = require('colors');
44 |
45 | colors.setTheme({
46 | silly: 'rainbow',
47 | input: 'grey',
48 | verbose: 'cyan',
49 | prompt: 'grey',
50 | info: 'green',
51 | data: 'grey',
52 | help: 'cyan',
53 | warn: 'yellow',
54 | debug: 'blue',
55 | error: 'red'
56 | });
57 |
58 | // outputs red text
59 | console.log("this is an error".error);
60 |
61 | // outputs yellow text
62 | console.log("this is a warning".warn);
63 | ```
64 |
65 |
66 | ### Contributors
67 |
68 | Marak (Marak Squires)
69 | Alexis Sellier (cloudhead)
70 | mmalecki (Maciej Małecki)
71 | nicoreed (Nico Reed)
72 | morganrallen (Morgan Allen)
73 | JustinCampbell (Justin Campbell)
74 | ded (Dustin Diaz)
75 |
76 |
77 | #### , Marak Squires , Justin Campbell, Dustin Diaz (@ded)
78 |
--------------------------------------------------------------------------------
/python-scripts/node_modules/colors/example.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Colors Example
6 |
7 |
8 |
9 |
75 |
76 |
--------------------------------------------------------------------------------
/python-scripts/node_modules/colors/example.js:
--------------------------------------------------------------------------------
1 | var colors = require('./colors');
2 |
3 | //colors.mode = "browser";
4 |
5 | var test = colors.red("hopefully colorless output");
6 | console.log('Rainbows are fun!'.rainbow);
7 | console.log('So '.italic + 'are'.underline + ' styles! '.bold + 'inverse'.inverse); // styles not widely supported
8 | console.log('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported
9 | //console.log('zalgo time!'.zalgo);
10 | console.log(test.stripColors);
11 | console.log("a".grey + " b".black);
12 | console.log("Zebras are so fun!".zebra);
13 | console.log('background color attack!'.black.whiteBG)
14 |
15 | //
16 | // Remark: .strikethrough may not work with Mac OS Terminal App
17 | //
18 | console.log("This is " + "not".strikethrough + " fun.");
19 | console.log(colors.rainbow('Rainbows are fun!'));
20 | console.log(colors.italic('So ') + colors.underline('are') + colors.bold(' styles! ') + colors.inverse('inverse')); // styles not widely supported
21 | console.log(colors.bold(colors.italic(colors.underline(colors.red('Chains are also cool.'))))); // styles not widely supported
22 | //console.log(colors.zalgo('zalgo time!'));
23 | console.log(colors.stripColors(test));
24 | console.log(colors.grey("a") + colors.black(" b"));
25 |
26 | colors.addSequencer("america", function(letter, i, exploded) {
27 | if(letter === " ") return letter;
28 | switch(i%3) {
29 | case 0: return letter.red;
30 | case 1: return letter.white;
31 | case 2: return letter.blue;
32 | }
33 | });
34 |
35 | colors.addSequencer("random", (function() {
36 | var available = ['bold', 'underline', 'italic', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta'];
37 |
38 | return function(letter, i, exploded) {
39 | return letter === " " ? letter : letter[available[Math.round(Math.random() * (available.length - 1))]];
40 | };
41 | })());
42 |
43 | console.log("AMERICA! F--K YEAH!".america);
44 | console.log("So apparently I've been to Mars, with all the little green men. But you know, I don't recall.".random);
45 |
46 | //
47 | // Custom themes
48 | //
49 |
50 | // Load theme with JSON literal
51 | colors.setTheme({
52 | silly: 'rainbow',
53 | input: 'grey',
54 | verbose: 'cyan',
55 | prompt: 'grey',
56 | info: 'green',
57 | data: 'grey',
58 | help: 'cyan',
59 | warn: 'yellow',
60 | debug: 'blue',
61 | error: 'red'
62 | });
63 |
64 | // outputs red text
65 | console.log("this is an error".error);
66 |
67 | // outputs yellow text
68 | console.log("this is a warning".warn);
69 |
70 | // outputs grey text
71 | console.log("this is an input".input);
72 |
73 | // Load a theme from file
74 | colors.setTheme('./themes/winston-dark.js');
75 |
76 | console.log("this is an input".input);
77 |
78 |
--------------------------------------------------------------------------------
/python-scripts/node_modules/colors/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "_from": "colors@~0.6.2",
3 | "_id": "colors@0.6.2",
4 | "_inBundle": false,
5 | "_integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=",
6 | "_location": "/colors",
7 | "_phantomChildren": {},
8 | "_requested": {
9 | "type": "range",
10 | "registry": true,
11 | "raw": "colors@~0.6.2",
12 | "name": "colors",
13 | "escapedName": "colors",
14 | "rawSpec": "~0.6.2",
15 | "saveSpec": null,
16 | "fetchSpec": "~0.6.2"
17 | },
18 | "_requiredBy": [
19 | "/compilex"
20 | ],
21 | "_resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz",
22 | "_shasum": "2423fe6678ac0c5dae8852e5d0e5be08c997abcc",
23 | "_spec": "colors@~0.6.2",
24 | "_where": "/home/anjalisoni3655/pseudogen/python-scripts/node_modules/compilex",
25 | "author": {
26 | "name": "Marak Squires"
27 | },
28 | "bugs": {
29 | "url": "https://github.com/Marak/colors.js/issues"
30 | },
31 | "bundleDependencies": false,
32 | "deprecated": false,
33 | "description": "get colors in your node.js console like what",
34 | "engines": {
35 | "node": ">=0.1.90"
36 | },
37 | "homepage": "https://github.com/Marak/colors.js",
38 | "keywords": [
39 | "ansi",
40 | "terminal",
41 | "colors"
42 | ],
43 | "main": "colors",
44 | "name": "colors",
45 | "repository": {
46 | "type": "git",
47 | "url": "git+ssh://git@github.com/Marak/colors.js.git"
48 | },
49 | "version": "0.6.2"
50 | }
51 |
--------------------------------------------------------------------------------
/python-scripts/node_modules/colors/test.js:
--------------------------------------------------------------------------------
1 | var assert = require('assert'),
2 | colors = require('./colors');
3 |
4 | var s = 'string';
5 |
6 | function a(s, code) {
7 | return '\x1B[' + code.toString() + 'm' + s + '\x1B[39m';
8 | }
9 |
10 | function aE(s, color, code) {
11 | assert.equal(s[color], a(s, code));
12 | assert.equal(colors[color](s), a(s, code));
13 | assert.equal(s[color], colors[color](s));
14 | assert.equal(s[color].stripColors, s);
15 | assert.equal(s[color].stripColors, colors.stripColors(s));
16 | }
17 |
18 | function h(s, color) {
19 | return '' + s + '';
20 | }
21 |
22 | var stylesColors = ['white', 'black', 'blue', 'cyan', 'green', 'magenta', 'red', 'yellow'];
23 | var stylesAll = stylesColors.concat(['bold', 'italic', 'underline', 'inverse', 'rainbow']);
24 |
25 | colors.mode = 'console';
26 | assert.equal(s.bold, '\x1B[1m' + s + '\x1B[22m');
27 | assert.equal(s.italic, '\x1B[3m' + s + '\x1B[23m');
28 | assert.equal(s.underline, '\x1B[4m' + s + '\x1B[24m');
29 | assert.equal(s.strikethrough, '\x1B[9m' + s + '\x1B[29m');
30 | assert.equal(s.inverse, '\x1B[7m' + s + '\x1B[27m');
31 | assert.ok(s.rainbow);
32 | aE(s, 'white', 37);
33 | aE(s, 'grey', 90);
34 | aE(s, 'black', 30);
35 | aE(s, 'blue', 34);
36 | aE(s, 'cyan', 36);
37 | aE(s, 'green', 32);
38 | aE(s, 'magenta', 35);
39 | aE(s, 'red', 31);
40 | aE(s, 'yellow', 33);
41 | assert.equal(s, 'string');
42 |
43 | colors.setTheme({error:'red'});
44 |
45 | assert.equal(typeof("astring".red),'string');
46 | assert.equal(typeof("astring".error),'string');
47 |
48 | colors.mode = 'browser';
49 | assert.equal(s.bold, '' + s + '');
50 | assert.equal(s.italic, '' + s + '');
51 | assert.equal(s.underline, '' + s + '');
52 | assert.equal(s.strikethrough, '' + s + '');
53 | assert.equal(s.inverse, '' + s + '');
54 | assert.ok(s.rainbow);
55 | stylesColors.forEach(function (color) {
56 | assert.equal(s[color], h(s, color));
57 | assert.equal(colors[color](s), h(s, color));
58 | });
59 |
60 | assert.equal(typeof("astring".red),'string');
61 | assert.equal(typeof("astring".error),'string');
62 |
63 | colors.mode = 'none';
64 | stylesAll.forEach(function (style) {
65 | assert.equal(s[style], s);
66 | assert.equal(colors[style](s), s);
67 | });
68 |
69 | assert.equal(typeof("astring".red),'string');
70 | assert.equal(typeof("astring".error),'string');
71 |
--------------------------------------------------------------------------------
/python-scripts/node_modules/colors/themes/winston-dark.js:
--------------------------------------------------------------------------------
1 | module['exports'] = {
2 | silly: 'rainbow',
3 | input: 'black',
4 | verbose: 'cyan',
5 | prompt: 'grey',
6 | info: 'green',
7 | data: 'grey',
8 | help: 'cyan',
9 | warn: 'yellow',
10 | debug: 'blue',
11 | error: 'red'
12 | };
--------------------------------------------------------------------------------
/python-scripts/node_modules/colors/themes/winston-light.js:
--------------------------------------------------------------------------------
1 | module['exports'] = {
2 | silly: 'rainbow',
3 | input: 'grey',
4 | verbose: 'cyan',
5 | prompt: 'grey',
6 | info: 'green',
7 | data: 'grey',
8 | help: 'cyan',
9 | warn: 'yellow',
10 | debug: 'blue',
11 | error: 'red'
12 | };
--------------------------------------------------------------------------------
/python-scripts/node_modules/compilex/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 | *.sln merge=union
7 | *.csproj merge=union
8 | *.vbproj merge=union
9 | *.fsproj merge=union
10 | *.dbproj merge=union
11 |
12 | # Standard to msysgit
13 | *.doc diff=astextplain
14 | *.DOC diff=astextplain
15 | *.docx diff=astextplain
16 | *.DOCX diff=astextplain
17 | *.dot diff=astextplain
18 | *.DOT diff=astextplain
19 | *.pdf diff=astextplain
20 | *.PDF diff=astextplain
21 | *.rtf diff=astextplain
22 | *.RTF diff=astextplain
23 |
--------------------------------------------------------------------------------
/python-scripts/node_modules/compilex/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - "0.10"
4 | - "0.11"
5 | matrix:
6 | allow_failures:
7 | - node_js: "0.11"
8 | fast_finish: true
9 | script: "npm run-script test-travis"
--------------------------------------------------------------------------------
/python-scripts/node_modules/compilex/DemoPicture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/python-scripts/node_modules/compilex/DemoPicture.png
--------------------------------------------------------------------------------
/python-scripts/node_modules/compilex/License.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 | =====================
3 |
4 | Copyright (c) 2014 Vishnu Bharathi
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in
14 | all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | THE SOFTWARE.
--------------------------------------------------------------------------------
/python-scripts/node_modules/compilex/examples/compilex-Demo1/TestSnippets.txt:
--------------------------------------------------------------------------------
1 | C
2 | ==
3 |
4 | #include
5 | int main()
6 | {
7 | printf("Hello World from C");
8 | return 0;
9 | }
10 |
11 | #include
12 | int main()
13 | {
14 | int a , b, c ;
15 | scanf("%d",&a);
16 | scanf("%d",&b);
17 | c = a + b ;
18 | printf("%d",c);
19 | return 0;
20 | }
21 |
22 | @@@@@@@@@@@@@@@@@@@@@@@@
23 |
24 | C++
25 | ===
26 | #include
27 | using namespace std;
28 | int main()
29 | {
30 | cout<<"Hello World from C++";
31 | return 0;
32 | }
33 |
34 | #include
35 | using namespace std;
36 | int main()
37 | {
38 | int a , b, c ;
39 | cin>>a;
40 | cin>>b;
41 | c = a + b ;
42 | cout<
3 |
4 | Compilex
5 |
6 |
7 |
8 | Compilex Demo
9 |
30 |
31 |
32 |