├── .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 | 7 | 8 | 10 | 18 | 22 | 25 | 27 | 29 | 30 | 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 |
51 | 52 | 53 |
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 |
10 |

Code

11 | 12 |
13 |

Input

14 | 15 |
16 | Language : 24 | Compile With Input : 25 | yes 26 | No 27 |
28 | 29 |
30 |
31 | 32 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/.npmignore: -------------------------------------------------------------------------------- 1 | test/ 2 | .travis.yml 3 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.2.1 / 2014-05-26 2 | ================== 3 | 4 | * invoke `next(err)` after request fully read 5 | - prevents hung responses and socket hang ups 6 | 7 | 1.2.0 / 2014-05-11 8 | ================== 9 | 10 | * add `verify` option 11 | * deps: type-is@1.2.0 12 | - support suffix matching 13 | 14 | 1.1.2 / 2014-05-11 15 | ================== 16 | 17 | * improve json parser speed 18 | 19 | 1.1.1 / 2014-05-11 20 | ================== 21 | 22 | * fix repeated limit parsing with every request 23 | 24 | 1.1.0 / 2014-05-10 25 | ================== 26 | 27 | * add `type` option 28 | * deps: pin for safety and consistency 29 | 30 | 1.0.2 / 2014-04-14 31 | ================== 32 | 33 | * use `type-is` module 34 | 35 | 1.0.1 / 2014-03-20 36 | ================== 37 | 38 | * lower default limits to 100kb 39 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/bytes/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/bytes/History.md: -------------------------------------------------------------------------------- 1 | 2 | 1.0.0 / 2014-05-05 3 | ================== 4 | 5 | * add negative support. fixes #6 6 | 7 | 0.3.0 / 2014-03-19 8 | ================== 9 | 10 | * added terabyte support 11 | 12 | 0.2.1 / 2013-04-01 13 | ================== 14 | 15 | * add .component 16 | 17 | 0.2.0 / 2012-10-28 18 | ================== 19 | 20 | * bytes(200).should.eql('200b') 21 | 22 | 0.1.0 / 2012-07-04 23 | ================== 24 | 25 | * add bytes to string conversion [yields] 26 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/bytes/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha \ 4 | --reporter spec \ 5 | --require should 6 | 7 | .PHONY: test -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/bytes/Readme.md: -------------------------------------------------------------------------------- 1 | # node-bytes 2 | 3 | Byte string parser / formatter. 4 | 5 | ## Example: 6 | 7 | ```js 8 | bytes('1kb') 9 | // => 1024 10 | 11 | bytes('2mb') 12 | // => 2097152 13 | 14 | bytes('1gb') 15 | // => 1073741824 16 | 17 | bytes(1073741824) 18 | // => 1gb 19 | 20 | bytes(1099511627776) 21 | // => 1tb 22 | ``` 23 | 24 | ## Installation 25 | 26 | ``` 27 | $ npm install bytes 28 | $ component install visionmedia/bytes.js 29 | ``` 30 | 31 | ## License 32 | 33 | (The MIT License) 34 | 35 | Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> 36 | 37 | Permission is hereby granted, free of charge, to any person obtaining 38 | a copy of this software and associated documentation files (the 39 | 'Software'), to deal in the Software without restriction, including 40 | without limitation the rights to use, copy, modify, merge, publish, 41 | distribute, sublicense, and/or sell copies of the Software, and to 42 | permit persons to whom the Software is furnished to do so, subject to 43 | the following conditions: 44 | 45 | The above copyright notice and this permission notice shall be 46 | included in all copies or substantial portions of the Software. 47 | 48 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 49 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 50 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 51 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 52 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 53 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 54 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 55 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/bytes/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bytes", 3 | "description": "byte size string parser / serializer", 4 | "keywords": ["bytes", "utility"], 5 | "version": "0.2.1", 6 | "scripts": ["index.js"] 7 | } 8 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/bytes/index.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Parse byte `size` string. 4 | * 5 | * @param {String} size 6 | * @return {Number} 7 | * @api public 8 | */ 9 | 10 | module.exports = function(size) { 11 | if ('number' == typeof size) return convert(size); 12 | var parts = size.match(/^(\d+(?:\.\d+)?) *(kb|mb|gb|tb)$/) 13 | , n = parseFloat(parts[1]) 14 | , type = parts[2]; 15 | 16 | var map = { 17 | kb: 1 << 10 18 | , mb: 1 << 20 19 | , gb: 1 << 30 20 | , tb: ((1 << 30) * 1024) 21 | }; 22 | 23 | return map[type] * n; 24 | }; 25 | 26 | /** 27 | * convert bytes into string. 28 | * 29 | * @param {Number} b - bytes to convert 30 | * @return {String} 31 | * @api public 32 | */ 33 | 34 | function convert (b) { 35 | var tb = ((1 << 30) * 1024), gb = 1 << 30, mb = 1 << 20, kb = 1 << 10, abs = Math.abs(b); 36 | if (abs >= tb) return (Math.round(b / tb * 100) / 100) + 'tb'; 37 | if (abs >= gb) return (Math.round(b / gb * 100) / 100) + 'gb'; 38 | if (abs >= mb) return (Math.round(b / mb * 100) / 100) + 'mb'; 39 | if (abs >= kb) return (Math.round(b / kb * 100) / 100) + 'kb'; 40 | return b + 'b'; 41 | } 42 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/bytes/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bytes", 3 | "author": { 4 | "name": "TJ Holowaychuk", 5 | "email": "tj@vision-media.ca", 6 | "url": "http://tjholowaychuk.com" 7 | }, 8 | "description": "byte size string parser / serializer", 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/visionmedia/bytes.js.git" 12 | }, 13 | "version": "1.0.0", 14 | "main": "index.js", 15 | "dependencies": {}, 16 | "devDependencies": { 17 | "mocha": "*", 18 | "should": "*" 19 | }, 20 | "component": { 21 | "scripts": { 22 | "bytes/index.js": "index.js" 23 | } 24 | }, 25 | "readme": "# node-bytes\n\n Byte string parser / formatter.\n\n## Example:\n\n```js\nbytes('1kb')\n// => 1024\n\nbytes('2mb')\n// => 2097152\n\nbytes('1gb')\n// => 1073741824\n\nbytes(1073741824)\n// => 1gb\n\nbytes(1099511627776)\n// => 1tb\n```\n\n## Installation\n\n```\n$ npm install bytes\n$ component install visionmedia/bytes.js\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", 26 | "readmeFilename": "Readme.md", 27 | "bugs": { 28 | "url": "https://github.com/visionmedia/bytes.js/issues" 29 | }, 30 | "homepage": "https://github.com/visionmedia/bytes.js", 31 | "_id": "bytes@1.0.0", 32 | "_from": "bytes@1.0.0" 33 | } 34 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/qs/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "support/expresso"] 2 | path = support/expresso 3 | url = git://github.com/visionmedia/expresso.git 4 | [submodule "support/should"] 5 | path = support/should 6 | url = git://github.com/visionmedia/should.js.git 7 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/qs/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | .travis.yml 3 | benchmark.js 4 | component.json 5 | examples.js 6 | History.md 7 | Makefile 8 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/qs/Readme.md: -------------------------------------------------------------------------------- 1 | # node-querystring 2 | 3 | query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others. 4 | 5 | ## Installation 6 | 7 | $ npm install qs 8 | 9 | ## Examples 10 | 11 | ```js 12 | var qs = require('qs'); 13 | 14 | qs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com'); 15 | // => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } } 16 | 17 | qs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }}) 18 | // => user[name]=Tobi&user[email]=tobi%40learnboost.com 19 | ``` 20 | 21 | ## Testing 22 | 23 | Install dev dependencies: 24 | 25 | $ npm install -d 26 | 27 | and execute: 28 | 29 | $ make test 30 | 31 | browser: 32 | 33 | $ open test/browser/index.html 34 | 35 | ## License 36 | 37 | (The MIT License) 38 | 39 | Copyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca> 40 | 41 | Permission is hereby granted, free of charge, to any person obtaining 42 | a copy of this software and associated documentation files (the 43 | 'Software'), to deal in the Software without restriction, including 44 | without limitation the rights to use, copy, modify, merge, publish, 45 | distribute, sublicense, and/or sell copies of the Software, and to 46 | permit persons to whom the Software is furnished to do so, subject to 47 | the following conditions: 48 | 49 | The above copyright notice and this permission notice shall be 50 | included in all copies or substantial portions of the Software. 51 | 52 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 53 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 54 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 55 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 56 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 57 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 58 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/qs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "qs", 3 | "description": "querystring parser", 4 | "version": "0.6.6", 5 | "keywords": [ 6 | "query string", 7 | "parser", 8 | "component" 9 | ], 10 | "repository": { 11 | "type": "git", 12 | "url": "git://github.com/visionmedia/node-querystring.git" 13 | }, 14 | "devDependencies": { 15 | "mocha": "*", 16 | "expect.js": "*" 17 | }, 18 | "scripts": { 19 | "test": "make test" 20 | }, 21 | "author": { 22 | "name": "TJ Holowaychuk", 23 | "email": "tj@vision-media.ca", 24 | "url": "http://tjholowaychuk.com" 25 | }, 26 | "main": "index", 27 | "engines": { 28 | "node": "*" 29 | }, 30 | "readme": "# node-querystring\n\n query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others.\n\n## Installation\n\n $ npm install qs\n\n## Examples\n\n```js\nvar qs = require('qs');\n\nqs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com');\n// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } }\n\nqs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }})\n// => user[name]=Tobi&user[email]=tobi%40learnboost.com\n```\n\n## Testing\n\nInstall dev dependencies:\n\n $ npm install -d\n\nand execute:\n\n $ make test\n\nbrowser:\n\n $ open test/browser/index.html\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", 31 | "readmeFilename": "Readme.md", 32 | "bugs": { 33 | "url": "https://github.com/visionmedia/node-querystring/issues" 34 | }, 35 | "homepage": "https://github.com/visionmedia/node-querystring", 36 | "_id": "qs@0.6.6", 37 | "_from": "qs@0.6.6" 38 | } 39 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/.npmignore: -------------------------------------------------------------------------------- 1 | test/ -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/.travis.yml: -------------------------------------------------------------------------------- 1 | node_js: 2 | - "0.8" 3 | - "0.10" 4 | - "0.11" 5 | language: node_js -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/Makefile: -------------------------------------------------------------------------------- 1 | NODE ?= node 2 | BIN = ./node_modules/.bin/ 3 | 4 | test: 5 | @${NODE} ${BIN}mocha \ 6 | --harmony-generators \ 7 | --reporter spec \ 8 | --bail \ 9 | ./test/index.js 10 | 11 | clean: 12 | @rm -rf node_modules 13 | 14 | .PHONY: test clean 15 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/node_modules/bytes/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/node_modules/bytes/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.3.0 / 2014-03-19 3 | ================== 4 | 5 | * added terabyte support 6 | 7 | 0.2.1 / 2013-04-01 8 | ================== 9 | 10 | * add .component 11 | 12 | 0.2.0 / 2012-10-28 13 | ================== 14 | 15 | * bytes(200).should.eql('200b') 16 | 17 | 0.1.0 / 2012-07-04 18 | ================== 19 | 20 | * add bytes to string conversion [yields] 21 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/node_modules/bytes/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha \ 4 | --reporter spec \ 5 | --require should 6 | 7 | .PHONY: test -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/node_modules/bytes/Readme.md: -------------------------------------------------------------------------------- 1 | # node-bytes 2 | 3 | Byte string parser / formatter. 4 | 5 | ## Example: 6 | 7 | ```js 8 | bytes('1kb') 9 | // => 1024 10 | 11 | bytes('2mb') 12 | // => 2097152 13 | 14 | bytes('1gb') 15 | // => 1073741824 16 | 17 | bytes(1073741824) 18 | // => 1gb 19 | 20 | bytes(1099511627776) 21 | // => 1tb 22 | ``` 23 | 24 | ## Installation 25 | 26 | ``` 27 | $ npm install bytes 28 | $ component install visionmedia/bytes.js 29 | ``` 30 | 31 | ## License 32 | 33 | (The MIT License) 34 | 35 | Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> 36 | 37 | Permission is hereby granted, free of charge, to any person obtaining 38 | a copy of this software and associated documentation files (the 39 | 'Software'), to deal in the Software without restriction, including 40 | without limitation the rights to use, copy, modify, merge, publish, 41 | distribute, sublicense, and/or sell copies of the Software, and to 42 | permit persons to whom the Software is furnished to do so, subject to 43 | the following conditions: 44 | 45 | The above copyright notice and this permission notice shall be 46 | included in all copies or substantial portions of the Software. 47 | 48 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 49 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 50 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 51 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 52 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 53 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 54 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 55 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/node_modules/bytes/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bytes", 3 | "description": "byte size string parser / serializer", 4 | "keywords": ["bytes", "utility"], 5 | "version": "0.2.1", 6 | "scripts": ["index.js"] 7 | } 8 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/node_modules/bytes/index.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Parse byte `size` string. 4 | * 5 | * @param {String} size 6 | * @return {Number} 7 | * @api public 8 | */ 9 | 10 | module.exports = function(size) { 11 | if ('number' == typeof size) return convert(size); 12 | var parts = size.match(/^(\d+(?:\.\d+)?) *(kb|mb|gb|tb)$/) 13 | , n = parseFloat(parts[1]) 14 | , type = parts[2]; 15 | 16 | var map = { 17 | kb: 1 << 10 18 | , mb: 1 << 20 19 | , gb: 1 << 30 20 | , tb: ((1 << 30) * 1024) 21 | }; 22 | 23 | return map[type] * n; 24 | }; 25 | 26 | /** 27 | * convert bytes into string. 28 | * 29 | * @param {Number} b - bytes to convert 30 | * @return {String} 31 | * @api public 32 | */ 33 | 34 | function convert (b) { 35 | var tb = ((1 << 30) * 1024), gb = 1 << 30, mb = 1 << 20, kb = 1 << 10; 36 | if (b >= tb) return (Math.round(b / tb * 100) / 100) + 'tb'; 37 | if (b >= gb) return (Math.round(b / gb * 100) / 100) + 'gb'; 38 | if (b >= mb) return (Math.round(b / mb * 100) / 100) + 'mb'; 39 | if (b >= kb) return (Math.round(b / kb * 100) / 100) + 'kb'; 40 | return b + 'b'; 41 | } 42 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/node_modules/bytes/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bytes", 3 | "author": { 4 | "name": "TJ Holowaychuk", 5 | "email": "tj@vision-media.ca", 6 | "url": "http://tjholowaychuk.com" 7 | }, 8 | "description": "byte size string parser / serializer", 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/visionmedia/bytes.js.git" 12 | }, 13 | "version": "0.3.0", 14 | "main": "index.js", 15 | "dependencies": {}, 16 | "devDependencies": { 17 | "mocha": "*", 18 | "should": "*" 19 | }, 20 | "component": { 21 | "scripts": { 22 | "bytes/index.js": "index.js" 23 | } 24 | }, 25 | "readme": "# node-bytes\n\n Byte string parser / formatter.\n\n## Example:\n\n```js\nbytes('1kb')\n// => 1024\n\nbytes('2mb')\n// => 2097152\n\nbytes('1gb')\n// => 1073741824\n\nbytes(1073741824)\n// => 1gb\n\nbytes(1099511627776)\n// => 1tb\n```\n\n## Installation\n\n```\n$ npm install bytes\n$ component install visionmedia/bytes.js\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", 26 | "readmeFilename": "Readme.md", 27 | "bugs": { 28 | "url": "https://github.com/visionmedia/bytes.js/issues" 29 | }, 30 | "homepage": "https://github.com/visionmedia/bytes.js", 31 | "_id": "bytes@0.3.0", 32 | "_from": "bytes@~0.3.0" 33 | } 34 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/type-is/.npmignore: -------------------------------------------------------------------------------- 1 | test.js 2 | .travis.yml 3 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/type-is/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.2.0 / 2014-05-11 2 | ================== 3 | 4 | * support suffix matching: 5 | 6 | - `+json` matches `application/vnd+json` 7 | - `*/vnd+json` matches `application/vnd+json` 8 | - `application/*+json` matches `application/vnd+json` 9 | 10 | 1.1.0 / 2014-04-12 11 | ================== 12 | 13 | * add non-array values support 14 | * expose internal utilities: 15 | 16 | - `.is()` 17 | - `.hasBody()` 18 | - `.normalize()` 19 | - `.match()` 20 | 21 | 1.0.1 / 2014-03-30 22 | ================== 23 | 24 | * add `multipart` as a shorthand 25 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/type-is/README.md: -------------------------------------------------------------------------------- 1 | # type-is [![Build Status](https://travis-ci.org/expressjs/type-is.svg?branch=master)](https://travis-ci.org/expressjs/type-is) [![NPM version](https://badge.fury.io/js/type-is.svg)](https://badge.fury.io/js/type-is) 2 | 3 | Infer the content type of a request. 4 | Extracted from [koa](https://github.com/koajs/koa) for general use. 5 | 6 | Here's an example body parser: 7 | 8 | ```js 9 | var is = require('type-is'); 10 | var parse = require('body'); 11 | var busboy = require('busboy'); 12 | 13 | function bodyParser(req, res, next) { 14 | var hasRequestBody = 'content-type' in req.headers 15 | || 'transfer-encoding' in req.headers; 16 | if (!hasRequestBody) return next(); 17 | 18 | switch (is(req, ['urlencoded', 'json', 'multipart'])) { 19 | case 'urlencoded': 20 | // parse urlencoded body 21 | break 22 | case 'json': 23 | // parse json body 24 | break 25 | case 'multipart': 26 | // parse multipart body 27 | break 28 | default: 29 | // 415 error code 30 | } 31 | } 32 | ``` 33 | 34 | ## API 35 | 36 | ### var type = is(request, types) 37 | 38 | ```js 39 | var is = require('type-is') 40 | 41 | http.createServer(function (req, res) { 42 | is(req, ['text/*']) 43 | }) 44 | ``` 45 | 46 | `request` is the node HTTP request. `types` is an array of types. Each type can be: 47 | 48 | - An extension name such as `json`. This name will be returned if matched. 49 | - A mime type such as `application/json`. 50 | - A mime type with a wildcard such as `*/json` or `application/*`. The full mime type will be returned if matched 51 | - A suffix such as `+json`. This can be combined with a wildcard such as `*/vnd+json` or `application/*+json`. The full mime type will be returned if matched. 52 | 53 | `false` will be returned if no type matches. 54 | 55 | Examples: 56 | 57 | ```js 58 | // req.headers.content-type = 'application/json' 59 | is(req, ['json']) // -> 'json' 60 | is(req, ['html', 'json']) // -> 'json' 61 | is(req, ['application/*']) // -> 'application/json' 62 | is(req, ['application/json']) // -> 'application/json' 63 | is(req, ['html']) // -> false 64 | ``` 65 | 66 | ## License 67 | 68 | The MIT License (MIT) 69 | 70 | Copyright (c) 2013 Jonathan Ong me@jongleberry.com 71 | 72 | Permission is hereby granted, free of charge, to any person obtaining a copy 73 | of this software and associated documentation files (the "Software"), to deal 74 | in the Software without restriction, including without limitation the rights 75 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 76 | copies of the Software, and to permit persons to whom the Software is 77 | furnished to do so, subject to the following conditions: 78 | 79 | The above copyright notice and this permission notice shall be included in 80 | all copies or substantial portions of the Software. 81 | 82 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 83 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 84 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 85 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 86 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 87 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 88 | THE SOFTWARE. 89 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/type-is/node_modules/mime/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 Benjamin Thomas, Robert Kieffer 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/type-is/node_modules/mime/README.md: -------------------------------------------------------------------------------- 1 | # mime 2 | 3 | Comprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community. 4 | 5 | ## Install 6 | 7 | Install with [npm](http://github.com/isaacs/npm): 8 | 9 | npm install mime 10 | 11 | ## API - Queries 12 | 13 | ### mime.lookup(path) 14 | Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g. 15 | 16 | var mime = require('mime'); 17 | 18 | mime.lookup('/path/to/file.txt'); // => 'text/plain' 19 | mime.lookup('file.txt'); // => 'text/plain' 20 | mime.lookup('.TXT'); // => 'text/plain' 21 | mime.lookup('htm'); // => 'text/html' 22 | 23 | ### mime.default_type 24 | Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.) 25 | 26 | ### mime.extension(type) 27 | Get the default extension for `type` 28 | 29 | mime.extension('text/html'); // => 'html' 30 | mime.extension('application/octet-stream'); // => 'bin' 31 | 32 | ### mime.charsets.lookup() 33 | 34 | Map mime-type to charset 35 | 36 | mime.charsets.lookup('text/plain'); // => 'UTF-8' 37 | 38 | (The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.) 39 | 40 | ## API - Defining Custom Types 41 | 42 | The following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types). 43 | 44 | ### mime.define() 45 | 46 | Add custom mime/extension mappings 47 | 48 | mime.define({ 49 | 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'], 50 | 'application/x-my-type': ['x-mt', 'x-mtt'], 51 | // etc ... 52 | }); 53 | 54 | mime.lookup('x-sft'); // => 'text/x-some-format' 55 | 56 | The first entry in the extensions array is returned by `mime.extension()`. E.g. 57 | 58 | mime.extension('text/x-some-format'); // => 'x-sf' 59 | 60 | ### mime.load(filepath) 61 | 62 | Load mappings from an Apache ".types" format file 63 | 64 | mime.load('./my_project.types'); 65 | 66 | The .types file format is simple - See the `types` dir for examples. 67 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/type-is/node_modules/mime/mime.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var fs = require('fs'); 3 | 4 | function Mime() { 5 | // Map of extension -> mime type 6 | this.types = Object.create(null); 7 | 8 | // Map of mime type -> extension 9 | this.extensions = Object.create(null); 10 | } 11 | 12 | /** 13 | * Define mimetype -> extension mappings. Each key is a mime-type that maps 14 | * to an array of extensions associated with the type. The first extension is 15 | * used as the default extension for the type. 16 | * 17 | * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); 18 | * 19 | * @param map (Object) type definitions 20 | */ 21 | Mime.prototype.define = function (map) { 22 | for (var type in map) { 23 | var exts = map[type]; 24 | 25 | for (var i = 0; i < exts.length; i++) { 26 | if (process.env.DEBUG_MIME && this.types[exts]) { 27 | console.warn(this._loading.replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' + 28 | this.types[exts] + ' to ' + type); 29 | } 30 | 31 | this.types[exts[i]] = type; 32 | } 33 | 34 | // Default extension is the first one we encounter 35 | if (!this.extensions[type]) { 36 | this.extensions[type] = exts[0]; 37 | } 38 | } 39 | }; 40 | 41 | /** 42 | * Load an Apache2-style ".types" file 43 | * 44 | * This may be called multiple times (it's expected). Where files declare 45 | * overlapping types/extensions, the last file wins. 46 | * 47 | * @param file (String) path of file to load. 48 | */ 49 | Mime.prototype.load = function(file) { 50 | 51 | this._loading = file; 52 | // Read file and split into lines 53 | var map = {}, 54 | content = fs.readFileSync(file, 'ascii'), 55 | lines = content.split(/[\r\n]+/); 56 | 57 | lines.forEach(function(line) { 58 | // Clean up whitespace/comments, and split into fields 59 | var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/); 60 | map[fields.shift()] = fields; 61 | }); 62 | 63 | this.define(map); 64 | 65 | this._loading = null; 66 | }; 67 | 68 | /** 69 | * Lookup a mime type based on extension 70 | */ 71 | Mime.prototype.lookup = function(path, fallback) { 72 | var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase(); 73 | 74 | return this.types[ext] || fallback || this.default_type; 75 | }; 76 | 77 | /** 78 | * Return file extension associated with a mime type 79 | */ 80 | Mime.prototype.extension = function(mimeType) { 81 | var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase(); 82 | return this.extensions[type]; 83 | }; 84 | 85 | // Default instance 86 | var mime = new Mime(); 87 | 88 | // Load local copy of 89 | // http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types 90 | mime.load(path.join(__dirname, 'types/mime.types')); 91 | 92 | // Load additional types from node.js community 93 | mime.load(path.join(__dirname, 'types/node.types')); 94 | 95 | // Default type 96 | mime.default_type = mime.lookup('bin'); 97 | 98 | // 99 | // Additional API specific to the default instance 100 | // 101 | 102 | mime.Mime = Mime; 103 | 104 | /** 105 | * Lookup a charset based on mime type. 106 | */ 107 | mime.charsets = { 108 | lookup: function(mimeType, fallback) { 109 | // Assume text types are utf8 110 | return (/^text\//).test(mimeType) ? 'UTF-8' : fallback; 111 | } 112 | }; 113 | 114 | module.exports = mime; 115 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/type-is/node_modules/mime/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "Robert Kieffer", 4 | "email": "robert@broofa.com", 5 | "url": "http://github.com/broofa" 6 | }, 7 | "contributors": [ 8 | { 9 | "name": "Benjamin Thomas", 10 | "email": "benjamin@benjaminthomas.org", 11 | "url": "http://github.com/bentomas" 12 | } 13 | ], 14 | "dependencies": {}, 15 | "description": "A comprehensive library for mime-type mapping", 16 | "devDependencies": {}, 17 | "keywords": [ 18 | "util", 19 | "mime" 20 | ], 21 | "main": "mime.js", 22 | "name": "mime", 23 | "repository": { 24 | "url": "https://github.com/broofa/node-mime", 25 | "type": "git" 26 | }, 27 | "version": "1.2.11", 28 | "readme": "# mime\n\nComprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community.\n\n## Install\n\nInstall with [npm](http://github.com/isaacs/npm):\n\n npm install mime\n\n## API - Queries\n\n### mime.lookup(path)\nGet the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.\n\n var mime = require('mime');\n\n mime.lookup('/path/to/file.txt'); // => 'text/plain'\n mime.lookup('file.txt'); // => 'text/plain'\n mime.lookup('.TXT'); // => 'text/plain'\n mime.lookup('htm'); // => 'text/html'\n\n### mime.default_type\nSets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)\n\n### mime.extension(type)\nGet the default extension for `type`\n\n mime.extension('text/html'); // => 'html'\n mime.extension('application/octet-stream'); // => 'bin'\n\n### mime.charsets.lookup()\n\nMap mime-type to charset\n\n mime.charsets.lookup('text/plain'); // => 'UTF-8'\n\n(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)\n\n## API - Defining Custom Types\n\nThe following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types).\n\n### mime.define()\n\nAdd custom mime/extension mappings\n\n mime.define({\n 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],\n 'application/x-my-type': ['x-mt', 'x-mtt'],\n // etc ...\n });\n\n mime.lookup('x-sft'); // => 'text/x-some-format'\n\nThe first entry in the extensions array is returned by `mime.extension()`. E.g.\n\n mime.extension('text/x-some-format'); // => 'x-sf'\n\n### mime.load(filepath)\n\nLoad mappings from an Apache \".types\" format file\n\n mime.load('./my_project.types');\n\nThe .types file format is simple - See the `types` dir for examples.\n", 29 | "readmeFilename": "README.md", 30 | "bugs": { 31 | "url": "https://github.com/broofa/node-mime/issues" 32 | }, 33 | "homepage": "https://github.com/broofa/node-mime", 34 | "_id": "mime@1.2.11", 35 | "_from": "mime@1.2.11" 36 | } 37 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/type-is/node_modules/mime/test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Usage: node test.js 3 | */ 4 | 5 | var mime = require('./mime'); 6 | var assert = require('assert'); 7 | var path = require('path'); 8 | 9 | function eq(a, b) { 10 | console.log('Test: ' + a + ' === ' + b); 11 | assert.strictEqual.apply(null, arguments); 12 | } 13 | 14 | console.log(Object.keys(mime.extensions).length + ' types'); 15 | console.log(Object.keys(mime.types).length + ' extensions\n'); 16 | 17 | // 18 | // Test mime lookups 19 | // 20 | 21 | eq('text/plain', mime.lookup('text.txt')); // normal file 22 | eq('text/plain', mime.lookup('TEXT.TXT')); // uppercase 23 | eq('text/plain', mime.lookup('dir/text.txt')); // dir + file 24 | eq('text/plain', mime.lookup('.text.txt')); // hidden file 25 | eq('text/plain', mime.lookup('.txt')); // nameless 26 | eq('text/plain', mime.lookup('txt')); // extension-only 27 | eq('text/plain', mime.lookup('/txt')); // extension-less () 28 | eq('text/plain', mime.lookup('\\txt')); // Windows, extension-less 29 | eq('application/octet-stream', mime.lookup('text.nope')); // unrecognized 30 | eq('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default 31 | 32 | // 33 | // Test extensions 34 | // 35 | 36 | eq('txt', mime.extension(mime.types.text)); 37 | eq('html', mime.extension(mime.types.htm)); 38 | eq('bin', mime.extension('application/octet-stream')); 39 | eq('bin', mime.extension('application/octet-stream ')); 40 | eq('html', mime.extension(' text/html; charset=UTF-8')); 41 | eq('html', mime.extension('text/html; charset=UTF-8 ')); 42 | eq('html', mime.extension('text/html; charset=UTF-8')); 43 | eq('html', mime.extension('text/html ; charset=UTF-8')); 44 | eq('html', mime.extension('text/html;charset=UTF-8')); 45 | eq('html', mime.extension('text/Html;charset=UTF-8')); 46 | eq(undefined, mime.extension('unrecognized')); 47 | 48 | // 49 | // Test node.types lookups 50 | // 51 | 52 | eq('application/font-woff', mime.lookup('file.woff')); 53 | eq('application/octet-stream', mime.lookup('file.buffer')); 54 | eq('audio/mp4', mime.lookup('file.m4a')); 55 | eq('font/opentype', mime.lookup('file.otf')); 56 | 57 | // 58 | // Test charsets 59 | // 60 | 61 | eq('UTF-8', mime.charsets.lookup('text/plain')); 62 | eq(undefined, mime.charsets.lookup(mime.types.js)); 63 | eq('fallback', mime.charsets.lookup('application/octet-stream', 'fallback')); 64 | 65 | // 66 | // Test for overlaps between mime.types and node.types 67 | // 68 | 69 | var apacheTypes = new mime.Mime(), nodeTypes = new mime.Mime(); 70 | apacheTypes.load(path.join(__dirname, 'types/mime.types')); 71 | nodeTypes.load(path.join(__dirname, 'types/node.types')); 72 | 73 | var keys = [].concat(Object.keys(apacheTypes.types)) 74 | .concat(Object.keys(nodeTypes.types)); 75 | keys.sort(); 76 | for (var i = 1; i < keys.length; i++) { 77 | if (keys[i] == keys[i-1]) { 78 | console.warn('Warning: ' + 79 | 'node.types defines ' + keys[i] + '->' + nodeTypes.types[keys[i]] + 80 | ', mime.types defines ' + keys[i] + '->' + apacheTypes.types[keys[i]]); 81 | } 82 | } 83 | 84 | console.log('\nOK'); 85 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/type-is/node_modules/mime/types/node.types: -------------------------------------------------------------------------------- 1 | # What: WebVTT 2 | # Why: To allow formats intended for marking up external text track resources. 3 | # http://dev.w3.org/html5/webvtt/ 4 | # Added by: niftylettuce 5 | text/vtt vtt 6 | 7 | # What: Google Chrome Extension 8 | # Why: To allow apps to (work) be served with the right content type header. 9 | # http://codereview.chromium.org/2830017 10 | # Added by: niftylettuce 11 | application/x-chrome-extension crx 12 | 13 | # What: HTC support 14 | # Why: To properly render .htc files such as CSS3PIE 15 | # Added by: niftylettuce 16 | text/x-component htc 17 | 18 | # What: HTML5 application cache manifes ('.manifest' extension) 19 | # Why: De-facto standard. Required by Mozilla browser when serving HTML5 apps 20 | # per https://developer.mozilla.org/en/offline_resources_in_firefox 21 | # Added by: louisremi 22 | text/cache-manifest manifest 23 | 24 | # What: node binary buffer format 25 | # Why: semi-standard extension w/in the node community 26 | # Added by: tootallnate 27 | application/octet-stream buffer 28 | 29 | # What: The "protected" MP-4 formats used by iTunes. 30 | # Why: Required for streaming music to browsers (?) 31 | # Added by: broofa 32 | application/mp4 m4p 33 | audio/mp4 m4a 34 | 35 | # What: Video format, Part of RFC1890 36 | # Why: See https://github.com/bentomas/node-mime/pull/6 37 | # Added by: mjrusso 38 | video/MP2T ts 39 | 40 | # What: EventSource mime type 41 | # Why: mime type of Server-Sent Events stream 42 | # http://www.w3.org/TR/eventsource/#text-event-stream 43 | # Added by: francois2metz 44 | text/event-stream event-stream 45 | 46 | # What: Mozilla App manifest mime type 47 | # Why: https://developer.mozilla.org/en/Apps/Manifest#Serving_manifests 48 | # Added by: ednapiranha 49 | application/x-web-app-manifest+json webapp 50 | 51 | # What: Lua file types 52 | # Why: Googling around shows de-facto consensus on these 53 | # Added by: creationix (Issue #45) 54 | text/x-lua lua 55 | application/x-lua-bytecode luac 56 | 57 | # What: Markdown files, as per http://daringfireball.net/projects/markdown/syntax 58 | # Why: http://stackoverflow.com/questions/10701983/what-is-the-mime-type-for-markdown 59 | # Added by: avoidwork 60 | text/x-markdown markdown md mkd 61 | 62 | # What: ini files 63 | # Why: because they're just text files 64 | # Added by: Matthew Kastor 65 | text/plain ini 66 | 67 | # What: DASH Adaptive Streaming manifest 68 | # Why: https://developer.mozilla.org/en-US/docs/DASH_Adaptive_Streaming_for_HTML_5_Video 69 | # Added by: eelcocramer 70 | application/dash+xml mdp 71 | 72 | # What: OpenType font files - http://www.microsoft.com/typography/otspec/ 73 | # Why: Browsers usually ignore the font MIME types and sniff the content, 74 | # but Chrome, shows a warning if OpenType fonts aren't served with 75 | # the `font/opentype` MIME type: http://i.imgur.com/8c5RN8M.png. 76 | # Added by: alrra 77 | font/opentype otf 78 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/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/examples/compilex-Demo1/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/examples/compilex-Demo1/node_modules/compilex/DemoPicture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Sourced-Olaf/Code-Kindle/673595d06086421b2a2f192f5de32baedb3d72af/python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/DemoPicture.png -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/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/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 |
10 |

Code

11 | 12 |
13 |

Input

14 | 15 |
16 | Language : 22 | Compile With Input : 23 | yes 24 | No 25 |
26 | 27 |
28 |
29 | 30 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/.npmignore: -------------------------------------------------------------------------------- 1 | test/ 2 | .travis.yml 3 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.2.1 / 2014-05-26 2 | ================== 3 | 4 | * invoke `next(err)` after request fully read 5 | - prevents hung responses and socket hang ups 6 | 7 | 1.2.0 / 2014-05-11 8 | ================== 9 | 10 | * add `verify` option 11 | * deps: type-is@1.2.0 12 | - support suffix matching 13 | 14 | 1.1.2 / 2014-05-11 15 | ================== 16 | 17 | * improve json parser speed 18 | 19 | 1.1.1 / 2014-05-11 20 | ================== 21 | 22 | * fix repeated limit parsing with every request 23 | 24 | 1.1.0 / 2014-05-10 25 | ================== 26 | 27 | * add `type` option 28 | * deps: pin for safety and consistency 29 | 30 | 1.0.2 / 2014-04-14 31 | ================== 32 | 33 | * use `type-is` module 34 | 35 | 1.0.1 / 2014-03-20 36 | ================== 37 | 38 | * lower default limits to 100kb 39 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/bytes/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/bytes/History.md: -------------------------------------------------------------------------------- 1 | 2 | 1.0.0 / 2014-05-05 3 | ================== 4 | 5 | * add negative support. fixes #6 6 | 7 | 0.3.0 / 2014-03-19 8 | ================== 9 | 10 | * added terabyte support 11 | 12 | 0.2.1 / 2013-04-01 13 | ================== 14 | 15 | * add .component 16 | 17 | 0.2.0 / 2012-10-28 18 | ================== 19 | 20 | * bytes(200).should.eql('200b') 21 | 22 | 0.1.0 / 2012-07-04 23 | ================== 24 | 25 | * add bytes to string conversion [yields] 26 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/bytes/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha \ 4 | --reporter spec \ 5 | --require should 6 | 7 | .PHONY: test -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/bytes/Readme.md: -------------------------------------------------------------------------------- 1 | # node-bytes 2 | 3 | Byte string parser / formatter. 4 | 5 | ## Example: 6 | 7 | ```js 8 | bytes('1kb') 9 | // => 1024 10 | 11 | bytes('2mb') 12 | // => 2097152 13 | 14 | bytes('1gb') 15 | // => 1073741824 16 | 17 | bytes(1073741824) 18 | // => 1gb 19 | 20 | bytes(1099511627776) 21 | // => 1tb 22 | ``` 23 | 24 | ## Installation 25 | 26 | ``` 27 | $ npm install bytes 28 | $ component install visionmedia/bytes.js 29 | ``` 30 | 31 | ## License 32 | 33 | (The MIT License) 34 | 35 | Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> 36 | 37 | Permission is hereby granted, free of charge, to any person obtaining 38 | a copy of this software and associated documentation files (the 39 | 'Software'), to deal in the Software without restriction, including 40 | without limitation the rights to use, copy, modify, merge, publish, 41 | distribute, sublicense, and/or sell copies of the Software, and to 42 | permit persons to whom the Software is furnished to do so, subject to 43 | the following conditions: 44 | 45 | The above copyright notice and this permission notice shall be 46 | included in all copies or substantial portions of the Software. 47 | 48 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 49 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 50 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 51 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 52 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 53 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 54 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 55 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/bytes/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bytes", 3 | "description": "byte size string parser / serializer", 4 | "keywords": ["bytes", "utility"], 5 | "version": "0.2.1", 6 | "scripts": ["index.js"] 7 | } 8 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/bytes/index.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Parse byte `size` string. 4 | * 5 | * @param {String} size 6 | * @return {Number} 7 | * @api public 8 | */ 9 | 10 | module.exports = function(size) { 11 | if ('number' == typeof size) return convert(size); 12 | var parts = size.match(/^(\d+(?:\.\d+)?) *(kb|mb|gb|tb)$/) 13 | , n = parseFloat(parts[1]) 14 | , type = parts[2]; 15 | 16 | var map = { 17 | kb: 1 << 10 18 | , mb: 1 << 20 19 | , gb: 1 << 30 20 | , tb: ((1 << 30) * 1024) 21 | }; 22 | 23 | return map[type] * n; 24 | }; 25 | 26 | /** 27 | * convert bytes into string. 28 | * 29 | * @param {Number} b - bytes to convert 30 | * @return {String} 31 | * @api public 32 | */ 33 | 34 | function convert (b) { 35 | var tb = ((1 << 30) * 1024), gb = 1 << 30, mb = 1 << 20, kb = 1 << 10, abs = Math.abs(b); 36 | if (abs >= tb) return (Math.round(b / tb * 100) / 100) + 'tb'; 37 | if (abs >= gb) return (Math.round(b / gb * 100) / 100) + 'gb'; 38 | if (abs >= mb) return (Math.round(b / mb * 100) / 100) + 'mb'; 39 | if (abs >= kb) return (Math.round(b / kb * 100) / 100) + 'kb'; 40 | return b + 'b'; 41 | } 42 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/bytes/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bytes", 3 | "author": { 4 | "name": "TJ Holowaychuk", 5 | "email": "tj@vision-media.ca", 6 | "url": "http://tjholowaychuk.com" 7 | }, 8 | "description": "byte size string parser / serializer", 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/visionmedia/bytes.js.git" 12 | }, 13 | "version": "1.0.0", 14 | "main": "index.js", 15 | "dependencies": {}, 16 | "devDependencies": { 17 | "mocha": "*", 18 | "should": "*" 19 | }, 20 | "component": { 21 | "scripts": { 22 | "bytes/index.js": "index.js" 23 | } 24 | }, 25 | "readme": "# node-bytes\n\n Byte string parser / formatter.\n\n## Example:\n\n```js\nbytes('1kb')\n// => 1024\n\nbytes('2mb')\n// => 2097152\n\nbytes('1gb')\n// => 1073741824\n\nbytes(1073741824)\n// => 1gb\n\nbytes(1099511627776)\n// => 1tb\n```\n\n## Installation\n\n```\n$ npm install bytes\n$ component install visionmedia/bytes.js\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", 26 | "readmeFilename": "Readme.md", 27 | "bugs": { 28 | "url": "https://github.com/visionmedia/bytes.js/issues" 29 | }, 30 | "homepage": "https://github.com/visionmedia/bytes.js", 31 | "_id": "bytes@1.0.0", 32 | "_from": "bytes@1.0.0" 33 | } 34 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/qs/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "support/expresso"] 2 | path = support/expresso 3 | url = git://github.com/visionmedia/expresso.git 4 | [submodule "support/should"] 5 | path = support/should 6 | url = git://github.com/visionmedia/should.js.git 7 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/qs/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | .travis.yml 3 | benchmark.js 4 | component.json 5 | examples.js 6 | History.md 7 | Makefile 8 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/qs/Readme.md: -------------------------------------------------------------------------------- 1 | # node-querystring 2 | 3 | query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others. 4 | 5 | ## Installation 6 | 7 | $ npm install qs 8 | 9 | ## Examples 10 | 11 | ```js 12 | var qs = require('qs'); 13 | 14 | qs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com'); 15 | // => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } } 16 | 17 | qs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }}) 18 | // => user[name]=Tobi&user[email]=tobi%40learnboost.com 19 | ``` 20 | 21 | ## Testing 22 | 23 | Install dev dependencies: 24 | 25 | $ npm install -d 26 | 27 | and execute: 28 | 29 | $ make test 30 | 31 | browser: 32 | 33 | $ open test/browser/index.html 34 | 35 | ## License 36 | 37 | (The MIT License) 38 | 39 | Copyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca> 40 | 41 | Permission is hereby granted, free of charge, to any person obtaining 42 | a copy of this software and associated documentation files (the 43 | 'Software'), to deal in the Software without restriction, including 44 | without limitation the rights to use, copy, modify, merge, publish, 45 | distribute, sublicense, and/or sell copies of the Software, and to 46 | permit persons to whom the Software is furnished to do so, subject to 47 | the following conditions: 48 | 49 | The above copyright notice and this permission notice shall be 50 | included in all copies or substantial portions of the Software. 51 | 52 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 53 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 54 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 55 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 56 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 57 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 58 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/qs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "qs", 3 | "description": "querystring parser", 4 | "version": "0.6.6", 5 | "keywords": [ 6 | "query string", 7 | "parser", 8 | "component" 9 | ], 10 | "repository": { 11 | "type": "git", 12 | "url": "git://github.com/visionmedia/node-querystring.git" 13 | }, 14 | "devDependencies": { 15 | "mocha": "*", 16 | "expect.js": "*" 17 | }, 18 | "scripts": { 19 | "test": "make test" 20 | }, 21 | "author": { 22 | "name": "TJ Holowaychuk", 23 | "email": "tj@vision-media.ca", 24 | "url": "http://tjholowaychuk.com" 25 | }, 26 | "main": "index", 27 | "engines": { 28 | "node": "*" 29 | }, 30 | "readme": "# node-querystring\n\n query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others.\n\n## Installation\n\n $ npm install qs\n\n## Examples\n\n```js\nvar qs = require('qs');\n\nqs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com');\n// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } }\n\nqs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }})\n// => user[name]=Tobi&user[email]=tobi%40learnboost.com\n```\n\n## Testing\n\nInstall dev dependencies:\n\n $ npm install -d\n\nand execute:\n\n $ make test\n\nbrowser:\n\n $ open test/browser/index.html\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", 31 | "readmeFilename": "Readme.md", 32 | "bugs": { 33 | "url": "https://github.com/visionmedia/node-querystring/issues" 34 | }, 35 | "homepage": "https://github.com/visionmedia/node-querystring", 36 | "_id": "qs@0.6.6", 37 | "_from": "qs@0.6.6" 38 | } 39 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/.npmignore: -------------------------------------------------------------------------------- 1 | test/ -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/.travis.yml: -------------------------------------------------------------------------------- 1 | node_js: 2 | - "0.8" 3 | - "0.10" 4 | - "0.11" 5 | language: node_js -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/Makefile: -------------------------------------------------------------------------------- 1 | NODE ?= node 2 | BIN = ./node_modules/.bin/ 3 | 4 | test: 5 | @${NODE} ${BIN}mocha \ 6 | --harmony-generators \ 7 | --reporter spec \ 8 | --bail \ 9 | ./test/index.js 10 | 11 | clean: 12 | @rm -rf node_modules 13 | 14 | .PHONY: test clean 15 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/node_modules/bytes/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/node_modules/bytes/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.3.0 / 2014-03-19 3 | ================== 4 | 5 | * added terabyte support 6 | 7 | 0.2.1 / 2013-04-01 8 | ================== 9 | 10 | * add .component 11 | 12 | 0.2.0 / 2012-10-28 13 | ================== 14 | 15 | * bytes(200).should.eql('200b') 16 | 17 | 0.1.0 / 2012-07-04 18 | ================== 19 | 20 | * add bytes to string conversion [yields] 21 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/node_modules/bytes/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha \ 4 | --reporter spec \ 5 | --require should 6 | 7 | .PHONY: test -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/node_modules/bytes/Readme.md: -------------------------------------------------------------------------------- 1 | # node-bytes 2 | 3 | Byte string parser / formatter. 4 | 5 | ## Example: 6 | 7 | ```js 8 | bytes('1kb') 9 | // => 1024 10 | 11 | bytes('2mb') 12 | // => 2097152 13 | 14 | bytes('1gb') 15 | // => 1073741824 16 | 17 | bytes(1073741824) 18 | // => 1gb 19 | 20 | bytes(1099511627776) 21 | // => 1tb 22 | ``` 23 | 24 | ## Installation 25 | 26 | ``` 27 | $ npm install bytes 28 | $ component install visionmedia/bytes.js 29 | ``` 30 | 31 | ## License 32 | 33 | (The MIT License) 34 | 35 | Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> 36 | 37 | Permission is hereby granted, free of charge, to any person obtaining 38 | a copy of this software and associated documentation files (the 39 | 'Software'), to deal in the Software without restriction, including 40 | without limitation the rights to use, copy, modify, merge, publish, 41 | distribute, sublicense, and/or sell copies of the Software, and to 42 | permit persons to whom the Software is furnished to do so, subject to 43 | the following conditions: 44 | 45 | The above copyright notice and this permission notice shall be 46 | included in all copies or substantial portions of the Software. 47 | 48 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 49 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 50 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 51 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 52 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 53 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 54 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 55 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/node_modules/bytes/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bytes", 3 | "description": "byte size string parser / serializer", 4 | "keywords": ["bytes", "utility"], 5 | "version": "0.2.1", 6 | "scripts": ["index.js"] 7 | } 8 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/node_modules/bytes/index.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Parse byte `size` string. 4 | * 5 | * @param {String} size 6 | * @return {Number} 7 | * @api public 8 | */ 9 | 10 | module.exports = function(size) { 11 | if ('number' == typeof size) return convert(size); 12 | var parts = size.match(/^(\d+(?:\.\d+)?) *(kb|mb|gb|tb)$/) 13 | , n = parseFloat(parts[1]) 14 | , type = parts[2]; 15 | 16 | var map = { 17 | kb: 1 << 10 18 | , mb: 1 << 20 19 | , gb: 1 << 30 20 | , tb: ((1 << 30) * 1024) 21 | }; 22 | 23 | return map[type] * n; 24 | }; 25 | 26 | /** 27 | * convert bytes into string. 28 | * 29 | * @param {Number} b - bytes to convert 30 | * @return {String} 31 | * @api public 32 | */ 33 | 34 | function convert (b) { 35 | var tb = ((1 << 30) * 1024), gb = 1 << 30, mb = 1 << 20, kb = 1 << 10; 36 | if (b >= tb) return (Math.round(b / tb * 100) / 100) + 'tb'; 37 | if (b >= gb) return (Math.round(b / gb * 100) / 100) + 'gb'; 38 | if (b >= mb) return (Math.round(b / mb * 100) / 100) + 'mb'; 39 | if (b >= kb) return (Math.round(b / kb * 100) / 100) + 'kb'; 40 | return b + 'b'; 41 | } 42 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/raw-body/node_modules/bytes/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bytes", 3 | "author": { 4 | "name": "TJ Holowaychuk", 5 | "email": "tj@vision-media.ca", 6 | "url": "http://tjholowaychuk.com" 7 | }, 8 | "description": "byte size string parser / serializer", 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/visionmedia/bytes.js.git" 12 | }, 13 | "version": "0.3.0", 14 | "main": "index.js", 15 | "dependencies": {}, 16 | "devDependencies": { 17 | "mocha": "*", 18 | "should": "*" 19 | }, 20 | "component": { 21 | "scripts": { 22 | "bytes/index.js": "index.js" 23 | } 24 | }, 25 | "readme": "# node-bytes\n\n Byte string parser / formatter.\n\n## Example:\n\n```js\nbytes('1kb')\n// => 1024\n\nbytes('2mb')\n// => 2097152\n\nbytes('1gb')\n// => 1073741824\n\nbytes(1073741824)\n// => 1gb\n\nbytes(1099511627776)\n// => 1tb\n```\n\n## Installation\n\n```\n$ npm install bytes\n$ component install visionmedia/bytes.js\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", 26 | "readmeFilename": "Readme.md", 27 | "bugs": { 28 | "url": "https://github.com/visionmedia/bytes.js/issues" 29 | }, 30 | "homepage": "https://github.com/visionmedia/bytes.js", 31 | "_id": "bytes@0.3.0", 32 | "_from": "bytes@~0.3.0" 33 | } 34 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/type-is/.npmignore: -------------------------------------------------------------------------------- 1 | test.js 2 | .travis.yml 3 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/type-is/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.2.0 / 2014-05-11 2 | ================== 3 | 4 | * support suffix matching: 5 | 6 | - `+json` matches `application/vnd+json` 7 | - `*/vnd+json` matches `application/vnd+json` 8 | - `application/*+json` matches `application/vnd+json` 9 | 10 | 1.1.0 / 2014-04-12 11 | ================== 12 | 13 | * add non-array values support 14 | * expose internal utilities: 15 | 16 | - `.is()` 17 | - `.hasBody()` 18 | - `.normalize()` 19 | - `.match()` 20 | 21 | 1.0.1 / 2014-03-30 22 | ================== 23 | 24 | * add `multipart` as a shorthand 25 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/type-is/README.md: -------------------------------------------------------------------------------- 1 | # type-is [![Build Status](https://travis-ci.org/expressjs/type-is.svg?branch=master)](https://travis-ci.org/expressjs/type-is) [![NPM version](https://badge.fury.io/js/type-is.svg)](https://badge.fury.io/js/type-is) 2 | 3 | Infer the content type of a request. 4 | Extracted from [koa](https://github.com/koajs/koa) for general use. 5 | 6 | Here's an example body parser: 7 | 8 | ```js 9 | var is = require('type-is'); 10 | var parse = require('body'); 11 | var busboy = require('busboy'); 12 | 13 | function bodyParser(req, res, next) { 14 | var hasRequestBody = 'content-type' in req.headers 15 | || 'transfer-encoding' in req.headers; 16 | if (!hasRequestBody) return next(); 17 | 18 | switch (is(req, ['urlencoded', 'json', 'multipart'])) { 19 | case 'urlencoded': 20 | // parse urlencoded body 21 | break 22 | case 'json': 23 | // parse json body 24 | break 25 | case 'multipart': 26 | // parse multipart body 27 | break 28 | default: 29 | // 415 error code 30 | } 31 | } 32 | ``` 33 | 34 | ## API 35 | 36 | ### var type = is(request, types) 37 | 38 | ```js 39 | var is = require('type-is') 40 | 41 | http.createServer(function (req, res) { 42 | is(req, ['text/*']) 43 | }) 44 | ``` 45 | 46 | `request` is the node HTTP request. `types` is an array of types. Each type can be: 47 | 48 | - An extension name such as `json`. This name will be returned if matched. 49 | - A mime type such as `application/json`. 50 | - A mime type with a wildcard such as `*/json` or `application/*`. The full mime type will be returned if matched 51 | - A suffix such as `+json`. This can be combined with a wildcard such as `*/vnd+json` or `application/*+json`. The full mime type will be returned if matched. 52 | 53 | `false` will be returned if no type matches. 54 | 55 | Examples: 56 | 57 | ```js 58 | // req.headers.content-type = 'application/json' 59 | is(req, ['json']) // -> 'json' 60 | is(req, ['html', 'json']) // -> 'json' 61 | is(req, ['application/*']) // -> 'application/json' 62 | is(req, ['application/json']) // -> 'application/json' 63 | is(req, ['html']) // -> false 64 | ``` 65 | 66 | ## License 67 | 68 | The MIT License (MIT) 69 | 70 | Copyright (c) 2013 Jonathan Ong me@jongleberry.com 71 | 72 | Permission is hereby granted, free of charge, to any person obtaining a copy 73 | of this software and associated documentation files (the "Software"), to deal 74 | in the Software without restriction, including without limitation the rights 75 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 76 | copies of the Software, and to permit persons to whom the Software is 77 | furnished to do so, subject to the following conditions: 78 | 79 | The above copyright notice and this permission notice shall be included in 80 | all copies or substantial portions of the Software. 81 | 82 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 83 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 84 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 85 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 86 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 87 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 88 | THE SOFTWARE. 89 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/type-is/node_modules/mime/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 Benjamin Thomas, Robert Kieffer 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/type-is/node_modules/mime/README.md: -------------------------------------------------------------------------------- 1 | # mime 2 | 3 | Comprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community. 4 | 5 | ## Install 6 | 7 | Install with [npm](http://github.com/isaacs/npm): 8 | 9 | npm install mime 10 | 11 | ## API - Queries 12 | 13 | ### mime.lookup(path) 14 | Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g. 15 | 16 | var mime = require('mime'); 17 | 18 | mime.lookup('/path/to/file.txt'); // => 'text/plain' 19 | mime.lookup('file.txt'); // => 'text/plain' 20 | mime.lookup('.TXT'); // => 'text/plain' 21 | mime.lookup('htm'); // => 'text/html' 22 | 23 | ### mime.default_type 24 | Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.) 25 | 26 | ### mime.extension(type) 27 | Get the default extension for `type` 28 | 29 | mime.extension('text/html'); // => 'html' 30 | mime.extension('application/octet-stream'); // => 'bin' 31 | 32 | ### mime.charsets.lookup() 33 | 34 | Map mime-type to charset 35 | 36 | mime.charsets.lookup('text/plain'); // => 'UTF-8' 37 | 38 | (The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.) 39 | 40 | ## API - Defining Custom Types 41 | 42 | The following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types). 43 | 44 | ### mime.define() 45 | 46 | Add custom mime/extension mappings 47 | 48 | mime.define({ 49 | 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'], 50 | 'application/x-my-type': ['x-mt', 'x-mtt'], 51 | // etc ... 52 | }); 53 | 54 | mime.lookup('x-sft'); // => 'text/x-some-format' 55 | 56 | The first entry in the extensions array is returned by `mime.extension()`. E.g. 57 | 58 | mime.extension('text/x-some-format'); // => 'x-sf' 59 | 60 | ### mime.load(filepath) 61 | 62 | Load mappings from an Apache ".types" format file 63 | 64 | mime.load('./my_project.types'); 65 | 66 | The .types file format is simple - See the `types` dir for examples. 67 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/type-is/node_modules/mime/mime.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var fs = require('fs'); 3 | 4 | function Mime() { 5 | // Map of extension -> mime type 6 | this.types = Object.create(null); 7 | 8 | // Map of mime type -> extension 9 | this.extensions = Object.create(null); 10 | } 11 | 12 | /** 13 | * Define mimetype -> extension mappings. Each key is a mime-type that maps 14 | * to an array of extensions associated with the type. The first extension is 15 | * used as the default extension for the type. 16 | * 17 | * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); 18 | * 19 | * @param map (Object) type definitions 20 | */ 21 | Mime.prototype.define = function (map) { 22 | for (var type in map) { 23 | var exts = map[type]; 24 | 25 | for (var i = 0; i < exts.length; i++) { 26 | if (process.env.DEBUG_MIME && this.types[exts]) { 27 | console.warn(this._loading.replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' + 28 | this.types[exts] + ' to ' + type); 29 | } 30 | 31 | this.types[exts[i]] = type; 32 | } 33 | 34 | // Default extension is the first one we encounter 35 | if (!this.extensions[type]) { 36 | this.extensions[type] = exts[0]; 37 | } 38 | } 39 | }; 40 | 41 | /** 42 | * Load an Apache2-style ".types" file 43 | * 44 | * This may be called multiple times (it's expected). Where files declare 45 | * overlapping types/extensions, the last file wins. 46 | * 47 | * @param file (String) path of file to load. 48 | */ 49 | Mime.prototype.load = function(file) { 50 | 51 | this._loading = file; 52 | // Read file and split into lines 53 | var map = {}, 54 | content = fs.readFileSync(file, 'ascii'), 55 | lines = content.split(/[\r\n]+/); 56 | 57 | lines.forEach(function(line) { 58 | // Clean up whitespace/comments, and split into fields 59 | var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/); 60 | map[fields.shift()] = fields; 61 | }); 62 | 63 | this.define(map); 64 | 65 | this._loading = null; 66 | }; 67 | 68 | /** 69 | * Lookup a mime type based on extension 70 | */ 71 | Mime.prototype.lookup = function(path, fallback) { 72 | var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase(); 73 | 74 | return this.types[ext] || fallback || this.default_type; 75 | }; 76 | 77 | /** 78 | * Return file extension associated with a mime type 79 | */ 80 | Mime.prototype.extension = function(mimeType) { 81 | var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase(); 82 | return this.extensions[type]; 83 | }; 84 | 85 | // Default instance 86 | var mime = new Mime(); 87 | 88 | // Load local copy of 89 | // http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types 90 | mime.load(path.join(__dirname, 'types/mime.types')); 91 | 92 | // Load additional types from node.js community 93 | mime.load(path.join(__dirname, 'types/node.types')); 94 | 95 | // Default type 96 | mime.default_type = mime.lookup('bin'); 97 | 98 | // 99 | // Additional API specific to the default instance 100 | // 101 | 102 | mime.Mime = Mime; 103 | 104 | /** 105 | * Lookup a charset based on mime type. 106 | */ 107 | mime.charsets = { 108 | lookup: function(mimeType, fallback) { 109 | // Assume text types are utf8 110 | return (/^text\//).test(mimeType) ? 'UTF-8' : fallback; 111 | } 112 | }; 113 | 114 | module.exports = mime; 115 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/type-is/node_modules/mime/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "Robert Kieffer", 4 | "email": "robert@broofa.com", 5 | "url": "http://github.com/broofa" 6 | }, 7 | "contributors": [ 8 | { 9 | "name": "Benjamin Thomas", 10 | "email": "benjamin@benjaminthomas.org", 11 | "url": "http://github.com/bentomas" 12 | } 13 | ], 14 | "dependencies": {}, 15 | "description": "A comprehensive library for mime-type mapping", 16 | "devDependencies": {}, 17 | "keywords": [ 18 | "util", 19 | "mime" 20 | ], 21 | "main": "mime.js", 22 | "name": "mime", 23 | "repository": { 24 | "url": "https://github.com/broofa/node-mime", 25 | "type": "git" 26 | }, 27 | "version": "1.2.11", 28 | "readme": "# mime\n\nComprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community.\n\n## Install\n\nInstall with [npm](http://github.com/isaacs/npm):\n\n npm install mime\n\n## API - Queries\n\n### mime.lookup(path)\nGet the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.\n\n var mime = require('mime');\n\n mime.lookup('/path/to/file.txt'); // => 'text/plain'\n mime.lookup('file.txt'); // => 'text/plain'\n mime.lookup('.TXT'); // => 'text/plain'\n mime.lookup('htm'); // => 'text/html'\n\n### mime.default_type\nSets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)\n\n### mime.extension(type)\nGet the default extension for `type`\n\n mime.extension('text/html'); // => 'html'\n mime.extension('application/octet-stream'); // => 'bin'\n\n### mime.charsets.lookup()\n\nMap mime-type to charset\n\n mime.charsets.lookup('text/plain'); // => 'UTF-8'\n\n(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)\n\n## API - Defining Custom Types\n\nThe following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types).\n\n### mime.define()\n\nAdd custom mime/extension mappings\n\n mime.define({\n 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],\n 'application/x-my-type': ['x-mt', 'x-mtt'],\n // etc ...\n });\n\n mime.lookup('x-sft'); // => 'text/x-some-format'\n\nThe first entry in the extensions array is returned by `mime.extension()`. E.g.\n\n mime.extension('text/x-some-format'); // => 'x-sf'\n\n### mime.load(filepath)\n\nLoad mappings from an Apache \".types\" format file\n\n mime.load('./my_project.types');\n\nThe .types file format is simple - See the `types` dir for examples.\n", 29 | "readmeFilename": "README.md", 30 | "bugs": { 31 | "url": "https://github.com/broofa/node-mime/issues" 32 | }, 33 | "homepage": "https://github.com/broofa/node-mime", 34 | "_id": "mime@1.2.11", 35 | "_from": "mime@1.2.11" 36 | } 37 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/type-is/node_modules/mime/test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Usage: node test.js 3 | */ 4 | 5 | var mime = require('./mime'); 6 | var assert = require('assert'); 7 | var path = require('path'); 8 | 9 | function eq(a, b) { 10 | console.log('Test: ' + a + ' === ' + b); 11 | assert.strictEqual.apply(null, arguments); 12 | } 13 | 14 | console.log(Object.keys(mime.extensions).length + ' types'); 15 | console.log(Object.keys(mime.types).length + ' extensions\n'); 16 | 17 | // 18 | // Test mime lookups 19 | // 20 | 21 | eq('text/plain', mime.lookup('text.txt')); // normal file 22 | eq('text/plain', mime.lookup('TEXT.TXT')); // uppercase 23 | eq('text/plain', mime.lookup('dir/text.txt')); // dir + file 24 | eq('text/plain', mime.lookup('.text.txt')); // hidden file 25 | eq('text/plain', mime.lookup('.txt')); // nameless 26 | eq('text/plain', mime.lookup('txt')); // extension-only 27 | eq('text/plain', mime.lookup('/txt')); // extension-less () 28 | eq('text/plain', mime.lookup('\\txt')); // Windows, extension-less 29 | eq('application/octet-stream', mime.lookup('text.nope')); // unrecognized 30 | eq('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default 31 | 32 | // 33 | // Test extensions 34 | // 35 | 36 | eq('txt', mime.extension(mime.types.text)); 37 | eq('html', mime.extension(mime.types.htm)); 38 | eq('bin', mime.extension('application/octet-stream')); 39 | eq('bin', mime.extension('application/octet-stream ')); 40 | eq('html', mime.extension(' text/html; charset=UTF-8')); 41 | eq('html', mime.extension('text/html; charset=UTF-8 ')); 42 | eq('html', mime.extension('text/html; charset=UTF-8')); 43 | eq('html', mime.extension('text/html ; charset=UTF-8')); 44 | eq('html', mime.extension('text/html;charset=UTF-8')); 45 | eq('html', mime.extension('text/Html;charset=UTF-8')); 46 | eq(undefined, mime.extension('unrecognized')); 47 | 48 | // 49 | // Test node.types lookups 50 | // 51 | 52 | eq('application/font-woff', mime.lookup('file.woff')); 53 | eq('application/octet-stream', mime.lookup('file.buffer')); 54 | eq('audio/mp4', mime.lookup('file.m4a')); 55 | eq('font/opentype', mime.lookup('file.otf')); 56 | 57 | // 58 | // Test charsets 59 | // 60 | 61 | eq('UTF-8', mime.charsets.lookup('text/plain')); 62 | eq(undefined, mime.charsets.lookup(mime.types.js)); 63 | eq('fallback', mime.charsets.lookup('application/octet-stream', 'fallback')); 64 | 65 | // 66 | // Test for overlaps between mime.types and node.types 67 | // 68 | 69 | var apacheTypes = new mime.Mime(), nodeTypes = new mime.Mime(); 70 | apacheTypes.load(path.join(__dirname, 'types/mime.types')); 71 | nodeTypes.load(path.join(__dirname, 'types/node.types')); 72 | 73 | var keys = [].concat(Object.keys(apacheTypes.types)) 74 | .concat(Object.keys(nodeTypes.types)); 75 | keys.sort(); 76 | for (var i = 1; i < keys.length; i++) { 77 | if (keys[i] == keys[i-1]) { 78 | console.warn('Warning: ' + 79 | 'node.types defines ' + keys[i] + '->' + nodeTypes.types[keys[i]] + 80 | ', mime.types defines ' + keys[i] + '->' + apacheTypes.types[keys[i]]); 81 | } 82 | } 83 | 84 | console.log('\nOK'); 85 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/node_modules/body-parser/node_modules/type-is/node_modules/mime/types/node.types: -------------------------------------------------------------------------------- 1 | # What: WebVTT 2 | # Why: To allow formats intended for marking up external text track resources. 3 | # http://dev.w3.org/html5/webvtt/ 4 | # Added by: niftylettuce 5 | text/vtt vtt 6 | 7 | # What: Google Chrome Extension 8 | # Why: To allow apps to (work) be served with the right content type header. 9 | # http://codereview.chromium.org/2830017 10 | # Added by: niftylettuce 11 | application/x-chrome-extension crx 12 | 13 | # What: HTC support 14 | # Why: To properly render .htc files such as CSS3PIE 15 | # Added by: niftylettuce 16 | text/x-component htc 17 | 18 | # What: HTML5 application cache manifes ('.manifest' extension) 19 | # Why: De-facto standard. Required by Mozilla browser when serving HTML5 apps 20 | # per https://developer.mozilla.org/en/offline_resources_in_firefox 21 | # Added by: louisremi 22 | text/cache-manifest manifest 23 | 24 | # What: node binary buffer format 25 | # Why: semi-standard extension w/in the node community 26 | # Added by: tootallnate 27 | application/octet-stream buffer 28 | 29 | # What: The "protected" MP-4 formats used by iTunes. 30 | # Why: Required for streaming music to browsers (?) 31 | # Added by: broofa 32 | application/mp4 m4p 33 | audio/mp4 m4a 34 | 35 | # What: Video format, Part of RFC1890 36 | # Why: See https://github.com/bentomas/node-mime/pull/6 37 | # Added by: mjrusso 38 | video/MP2T ts 39 | 40 | # What: EventSource mime type 41 | # Why: mime type of Server-Sent Events stream 42 | # http://www.w3.org/TR/eventsource/#text-event-stream 43 | # Added by: francois2metz 44 | text/event-stream event-stream 45 | 46 | # What: Mozilla App manifest mime type 47 | # Why: https://developer.mozilla.org/en/Apps/Manifest#Serving_manifests 48 | # Added by: ednapiranha 49 | application/x-web-app-manifest+json webapp 50 | 51 | # What: Lua file types 52 | # Why: Googling around shows de-facto consensus on these 53 | # Added by: creationix (Issue #45) 54 | text/x-lua lua 55 | application/x-lua-bytecode luac 56 | 57 | # What: Markdown files, as per http://daringfireball.net/projects/markdown/syntax 58 | # Why: http://stackoverflow.com/questions/10701983/what-is-the-mime-type-for-markdown 59 | # Added by: avoidwork 60 | text/x-markdown markdown md mkd 61 | 62 | # What: ini files 63 | # Why: because they're just text files 64 | # Added by: Matthew Kastor 65 | text/plain ini 66 | 67 | # What: DASH Adaptive Streaming manifest 68 | # Why: https://developer.mozilla.org/en-US/docs/DASH_Adaptive_Streaming_for_HTML_5_Video 69 | # Added by: eelcocramer 70 | application/dash+xml mdp 71 | 72 | # What: OpenType font files - http://www.microsoft.com/typography/otspec/ 73 | # Why: Browsers usually ignore the font MIME types and sniff the content, 74 | # but Chrome, shows a warning if OpenType fonts aren't served with 75 | # the `font/opentype` MIME type: http://i.imgur.com/8c5RN8M.png. 76 | # Added by: alrra 77 | font/opentype otf 78 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/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/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/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/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/pyModule.js: -------------------------------------------------------------------------------- 1 | var exec = require('child_process').exec; 2 | var fs = require('fs'); 3 | var cuid = require('cuid'); 4 | var colors = require('colors'); 5 | 6 | exports.stats = false ; 7 | 8 | exports.compilePython = function (envData , code , fn){ 9 | 10 | var filename = cuid.slug(); 11 | path = './temp/'; 12 | 13 | fs.writeFile( path + filename +'.py' , code , function(err ){ 14 | if(exports.stats) 15 | { 16 | if(err) 17 | console.log('ERROR: '.red + err); 18 | else 19 | console.log('INFO: '.green + filename +'.py created'); 20 | } 21 | if(!err) 22 | { 23 | var command = 'python ' + path + filename +'.py'; 24 | exec( command , function ( error , stdout , stderr ){ 25 | if(error) 26 | { 27 | if(error.toString().indexOf('Error: stdout maxBuffer exceeded.') != -1) 28 | { 29 | var out = { error : 'Error: stdout maxBuffer exceeded. You might have initialized an infinite loop.' }; 30 | fn(out); 31 | } 32 | else 33 | { 34 | if(exports.stats) 35 | { 36 | console.log('INFO: '.green + filename + '.py contained an error while executing'); 37 | } 38 | var out = { error : stderr }; 39 | fn(out); 40 | } 41 | } 42 | else 43 | { 44 | if(exports.stats) 45 | { 46 | console.log('INFO: '.green + filename + '.py successfully executed !'); 47 | } 48 | var out = { output : stdout}; 49 | fn(out); 50 | } 51 | }); 52 | } 53 | }); 54 | } 55 | 56 | exports.compilePythonWithInput = function( envData , code , input , fn){ 57 | var filename = cuid.slug(); 58 | path = './temp/'; 59 | 60 | fs.writeFile( path + filename +'.py' , code , function(err ){ 61 | if(exports.stats) 62 | { 63 | if(err) 64 | console.log('ERROR: '.red + err); 65 | else 66 | console.log('INFO: '.green + filename +'.py created'); 67 | } 68 | if(!err) 69 | { 70 | 71 | fs.writeFile(path + filename + 'input.txt' , input , function(err){ 72 | if(exports.stats) 73 | { 74 | if(err) 75 | console.log('ERROR: '.red + err); 76 | else 77 | console.log('INFO: '.green + filename +'input.txt created'); 78 | } 79 | if(!err) 80 | { 81 | var command = 'python ' + path + filename +'.py < ' + path + filename +'input.txt ' ; 82 | exec( command , function ( error , stdout , stderr ){ 83 | if(error) 84 | { 85 | if(error.toString().indexOf('Error: stdout maxBuffer exceeded.') != -1) 86 | { 87 | var out = { error : 'Error: stdout maxBuffer exceeded. You might have initialized an infinite loop.' }; 88 | fn(out); 89 | } 90 | else 91 | { 92 | if(exports.stats) 93 | { 94 | console.log('INFO: '.green + filename + '.py contained an error while executing'); 95 | } 96 | var out = { error : stderr }; 97 | fn(out); 98 | } 99 | } 100 | else 101 | { 102 | if(exports.stats) 103 | { 104 | console.log('INFO: '.green + filename + '.py successfully executed !'); 105 | } 106 | var out = { output : stdout}; 107 | fn(out); 108 | } 109 | }); 110 | } 111 | }); 112 | } 113 | }); 114 | } 115 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/examples/compilex-Demo1/server.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var path = require('path'); 3 | var app = express(); 4 | var bodyParser = require('body-parser'); 5 | app.use(bodyParser()); 6 | 7 | //compileX 8 | var compiler = require('compilex'); 9 | var option = {stats : true}; 10 | compiler.init(option); 11 | 12 | app.get('/' , function (req , res ) { 13 | 14 | res.sendfile( __dirname + "/index.html"); 15 | 16 | }); 17 | 18 | 19 | app.post('/compilecode' , function (req , res ) { 20 | 21 | var code = req.body.code; 22 | var input = req.body.input; 23 | var inputRadio = req.body.inputRadio; 24 | var lang = req.body.lang; 25 | if((lang === "C") || (lang === "C++")) 26 | { 27 | if(inputRadio === "true") 28 | { 29 | var envData = { OS : "windows" , cmd : "g++"}; 30 | compiler.compileCPPWithInput(envData , code ,input , function (data) { 31 | if(data.error) 32 | { 33 | res.send(data.error); 34 | } 35 | else 36 | { 37 | res.send(data.output); 38 | } 39 | }); 40 | } 41 | else 42 | { 43 | 44 | var envData = { OS : "windows" , cmd : "g++"}; 45 | compiler.compileCPP(envData , code , function (data) { 46 | if(data.error) 47 | { 48 | res.send(data.error); 49 | } 50 | else 51 | { 52 | res.send(data.output); 53 | } 54 | 55 | }); 56 | } 57 | } 58 | if(lang === "Java") 59 | { 60 | if(inputRadio === "true") 61 | { 62 | var envData = { OS : "windows" }; 63 | console.log(code); 64 | compiler.compileJavaWithInput( envData , code , function(data){ 65 | res.send(data); 66 | }); 67 | } 68 | else 69 | { 70 | var envData = { OS : "windows" }; 71 | console.log(code); 72 | compiler.compileJavaWithInput( envData , code , input , function(data){ 73 | res.send(data); 74 | }); 75 | 76 | } 77 | 78 | } 79 | if( lang === "Python") 80 | { 81 | if(inputRadio === "true") 82 | { 83 | var envData = { OS : "windows"}; 84 | compiler.compilePythonWithInput(envData , code , input , function(data){ 85 | res.send(data); 86 | }); 87 | } 88 | else 89 | { 90 | var envData = { OS : "windows"}; 91 | compiler.compilePython(envData , code , function(data){ 92 | res.send(data); 93 | }); 94 | } 95 | } 96 | 97 | }); 98 | 99 | app.get('/fullStat' , function(req , res ){ 100 | compiler.fullStat(function(data){ 101 | res.send(data); 102 | }); 103 | }); 104 | 105 | app.listen(8080); 106 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/examples/compilex-Demo1/node_modules/compilex/pyModule.js: -------------------------------------------------------------------------------- 1 | var exec = require('child_process').exec; 2 | var fs = require('fs'); 3 | var cuid = require('cuid'); 4 | var colors = require('colors'); 5 | 6 | exports.stats = false ; 7 | 8 | exports.compilePython = function (envData , code , fn){ 9 | 10 | var filename = cuid.slug(); 11 | path = './temp/'; 12 | 13 | fs.writeFile( path + filename +'.py' , code , function(err ){ 14 | if(exports.stats) 15 | { 16 | if(err) 17 | console.log('ERROR: '.red + err); 18 | else 19 | console.log('INFO: '.green + filename +'.py created'); 20 | } 21 | if(!err) 22 | { 23 | var command = 'python ' + path + filename +'.py'; 24 | exec( command , function ( error , stdout , stderr ){ 25 | if(error) 26 | { 27 | if(error.toString().indexOf('Error: stdout maxBuffer exceeded.') != -1) 28 | { 29 | var out = { error : 'Error: stdout maxBuffer exceeded. You might have initialized an infinite loop.' }; 30 | fn(out); 31 | } 32 | else 33 | { 34 | if(exports.stats) 35 | { 36 | console.log('INFO: '.green + filename + '.py contained an error while executing'); 37 | } 38 | var out = { error : stderr }; 39 | fn(out); 40 | } 41 | } 42 | else 43 | { 44 | if(exports.stats) 45 | { 46 | console.log('INFO: '.green + filename + '.py successfully executed !'); 47 | } 48 | var out = { output : stdout}; 49 | fn(out); 50 | } 51 | }); 52 | } 53 | }); 54 | } 55 | 56 | exports.compilePythonWithInput = function( envData , code , input , fn){ 57 | var filename = cuid.slug(); 58 | path = './temp/'; 59 | 60 | fs.writeFile( path + filename +'.py' , code , function(err ){ 61 | if(exports.stats) 62 | { 63 | if(err) 64 | console.log('ERROR: '.red + err); 65 | else 66 | console.log('INFO: '.green + filename +'.py created'); 67 | } 68 | if(!err) 69 | { 70 | 71 | fs.writeFile(path + filename + 'input.txt' , input , function(err){ 72 | if(exports.stats) 73 | { 74 | if(err) 75 | console.log('ERROR: '.red + err); 76 | else 77 | console.log('INFO: '.green + filename +'input.txt created'); 78 | } 79 | if(!err) 80 | { 81 | var command = 'python ' + path + filename +'.py < ' + path + filename +'input.txt ' ; 82 | exec( command , function ( error , stdout , stderr ){ 83 | if(error) 84 | { 85 | if(error.toString().indexOf('Error: stdout maxBuffer exceeded.') != -1) 86 | { 87 | var out = { error : 'Error: stdout maxBuffer exceeded. You might have initialized an infinite loop.' }; 88 | fn(out); 89 | } 90 | else 91 | { 92 | if(exports.stats) 93 | { 94 | console.log('INFO: '.green + filename + '.py contained an error while executing'); 95 | } 96 | var out = { error : stderr }; 97 | fn(out); 98 | } 99 | } 100 | else 101 | { 102 | if(exports.stats) 103 | { 104 | console.log('INFO: '.green + filename + '.py successfully executed !'); 105 | } 106 | var out = { output : stdout}; 107 | fn(out); 108 | } 109 | }); 110 | } 111 | }); 112 | } 113 | }); 114 | } 115 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "compilex", 3 | "_id": "compilex@0.7.4", 4 | "_inBundle": false, 5 | "_integrity": "sha1-XLSHythDLAKa3MWx8p7IaXdxGAo=", 6 | "_location": "/compilex", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "tag", 10 | "registry": true, 11 | "raw": "compilex", 12 | "name": "compilex", 13 | "escapedName": "compilex", 14 | "rawSpec": "", 15 | "saveSpec": null, 16 | "fetchSpec": "latest" 17 | }, 18 | "_requiredBy": [ 19 | "#USER", 20 | "/" 21 | ], 22 | "_resolved": "https://registry.npmjs.org/compilex/-/compilex-0.7.4.tgz", 23 | "_shasum": "5cb487cad8432c029adcc5b1f29ec8697771180a", 24 | "_spec": "compilex", 25 | "_where": "/home/anjalisoni3655/pseudogen/python-scripts", 26 | "author": { 27 | "name": "Vishnu Bharathi", 28 | "email": "vishnubharathi04@gmail.com", 29 | "url": "https://twitter.com/scriptnull" 30 | }, 31 | "bugs": { 32 | "url": "https://github.com/scriptnull/compilex/issues" 33 | }, 34 | "bundleDependencies": false, 35 | "dependencies": { 36 | "colors": "~0.6.2", 37 | "cuid": "~1.2.4" 38 | }, 39 | "deprecated": false, 40 | "description": "compilex is a node.js library which is used to build online code editor/compiler websites and webservices.", 41 | "devDependencies": {}, 42 | "homepage": "https://github.com/scriptnull/compilex", 43 | "keywords": [ 44 | "compiler", 45 | "compilex", 46 | "c", 47 | "c++", 48 | "java", 49 | "python", 50 | "c#", 51 | "vb", 52 | "gcc", 53 | "javac", 54 | "csc", 55 | "vbc" 56 | ], 57 | "license": "MIT", 58 | "main": "compilex.js", 59 | "name": "compilex", 60 | "repository": { 61 | "type": "git", 62 | "url": "git+https://github.com/scriptnull/compilex.git" 63 | }, 64 | "scripts": { 65 | "test": "make test" 66 | }, 67 | "version": "0.7.4" 68 | } 69 | -------------------------------------------------------------------------------- /python-scripts/node_modules/compilex/pyModule.js: -------------------------------------------------------------------------------- 1 | var exec = require('child_process').exec; 2 | var fs = require('fs'); 3 | var cuid = require('cuid'); 4 | var colors = require('colors'); 5 | 6 | exports.stats = false ; 7 | 8 | exports.compilePython = function (envData , code , fn){ 9 | 10 | var filename = cuid.slug(); 11 | path = './temp/'; 12 | 13 | fs.writeFile( path + filename +'.py' , code , function(err ){ 14 | if(exports.stats) 15 | { 16 | if(err) 17 | console.log('ERROR: '.red + err); 18 | else 19 | console.log('INFO: '.green + filename +'.py created'); 20 | } 21 | if(!err) 22 | { 23 | var command = 'python ' + path + filename +'.py'; 24 | exec( command , function ( error , stdout , stderr ){ 25 | if(error) 26 | { 27 | if(error.toString().indexOf('Error: stdout maxBuffer exceeded.') != -1) 28 | { 29 | var out = { error : 'Error: stdout maxBuffer exceeded. You might have initialized an infinite loop.' }; 30 | fn(out); 31 | } 32 | else 33 | { 34 | if(exports.stats) 35 | { 36 | console.log('INFO: '.green + filename + '.py contained an error while executing'); 37 | } 38 | var out = { error : stderr }; 39 | fn(out); 40 | } 41 | } 42 | else 43 | { 44 | if(exports.stats) 45 | { 46 | console.log('INFO: '.green + filename + '.py successfully executed !'); 47 | } 48 | var out = { output : stdout}; 49 | fn(out); 50 | } 51 | }); 52 | } 53 | }); 54 | } 55 | 56 | exports.compilePythonWithInput = function( envData , code , input , fn){ 57 | var filename = cuid.slug(); 58 | path = './temp/'; 59 | 60 | fs.writeFile( path + filename +'.py' , code , function(err ){ 61 | if(exports.stats) 62 | { 63 | if(err) 64 | console.log('ERROR: '.red + err); 65 | else 66 | console.log('INFO: '.green + filename +'.py created'); 67 | } 68 | if(!err) 69 | { 70 | 71 | fs.writeFile(path + filename + 'input.txt' , input , function(err){ 72 | if(exports.stats) 73 | { 74 | if(err) 75 | console.log('ERROR: '.red + err); 76 | else 77 | console.log('INFO: '.green + filename +'input.txt created'); 78 | } 79 | if(!err) 80 | { 81 | var command = 'python ' + path + filename +'.py < ' + path + filename +'input.txt ' ; 82 | exec( command , function ( error , stdout , stderr ){ 83 | if(error) 84 | { 85 | if(error.toString().indexOf('Error: stdout maxBuffer exceeded.') != -1) 86 | { 87 | var out = { error : 'Error: stdout maxBuffer exceeded. You might have initialized an infinite loop.' }; 88 | fn(out); 89 | } 90 | else 91 | { 92 | if(exports.stats) 93 | { 94 | console.log('INFO: '.green + filename + '.py contained an error while executing'); 95 | } 96 | var out = { error : stderr }; 97 | fn(out); 98 | } 99 | } 100 | else 101 | { 102 | if(exports.stats) 103 | { 104 | console.log('INFO: '.green + filename + '.py successfully executed !'); 105 | } 106 | var out = { output : stdout}; 107 | fn(out); 108 | } 109 | }); 110 | } 111 | }); 112 | } 113 | }); 114 | } 115 | -------------------------------------------------------------------------------- /python-scripts/node_modules/cuid/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | build -------------------------------------------------------------------------------- /python-scripts/node_modules/cuid/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | -------------------------------------------------------------------------------- /python-scripts/node_modules/cuid/LICENSE: -------------------------------------------------------------------------------- 1 | cuid is covered by The MIT License: 2 | 3 | Copyright (c) 2012 Eric Elliott 4 | 5 | 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: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | 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. -------------------------------------------------------------------------------- /python-scripts/node_modules/cuid/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cuid", 3 | "repo": "dilvie/cuid", 4 | "description": "Collision-resistant ids optimized for horizontal scaling and performance", 5 | "version": "1.2.2", 6 | "keywords": [ 7 | "uid", 8 | "unique id", 9 | "guid", 10 | "uuid" 11 | ], 12 | "dependencies": {}, 13 | "development": {}, 14 | "license": "MIT", 15 | "main": "dist/browser-cuid.js", 16 | "scripts": [ 17 | "dist/browser-cuid.js" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /python-scripts/node_modules/cuid/dist/browser-cuid.js: -------------------------------------------------------------------------------- 1 | /** 2 | * cuid.js 3 | * Collision-resistant UID generator for browsers and node. 4 | * Sequential for fast db lookups and recency sorting. 5 | * Safe for element IDs and server-side lookups. 6 | * 7 | * Extracted from CLCTR 8 | * 9 | * Copyright (c) Eric Elliott 2012 10 | * MIT License 11 | */ 12 | 13 | /*global window, navigator, document, require, process, module */ 14 | (function (app) { 15 | 'use strict'; 16 | var namespace = 'cuid', 17 | c = 0, 18 | blockSize = 4, 19 | base = 36, 20 | discreteValues = Math.pow(base, blockSize), 21 | 22 | pad = function pad(num, size) { 23 | var s = "000000000" + num; 24 | return s.substr(s.length-size); 25 | }, 26 | 27 | randomBlock = function randomBlock() { 28 | return pad((Math.random() * 29 | discreteValues << 0) 30 | .toString(base), blockSize); 31 | }, 32 | 33 | safeCounter = function () { 34 | c = (c < discreteValues) ? c : 0; 35 | c++; // this is not subliminal 36 | return c - 1; 37 | }, 38 | 39 | api = function cuid() { 40 | // Starting with a lowercase letter makes 41 | // it HTML element ID friendly. 42 | var letter = 'c', // hard-coded allows for sequential access 43 | 44 | // timestamp 45 | // warning: this exposes the exact date and time 46 | // that the uid was created. 47 | timestamp = (new Date().getTime()).toString(base), 48 | 49 | // Prevent same-machine collisions. 50 | counter, 51 | 52 | // A few chars to generate distinct ids for different 53 | // clients (so different computers are far less 54 | // likely to generate the same id) 55 | fingerprint = api.fingerprint(), 56 | 57 | // Grab some more chars from Math.random() 58 | random = randomBlock() + randomBlock(); 59 | 60 | counter = pad(safeCounter().toString(base), blockSize); 61 | 62 | return (letter + timestamp + counter + fingerprint + random); 63 | }; 64 | 65 | api.slug = function slug() { 66 | var date = new Date().getTime().toString(36), 67 | counter, 68 | print = api.fingerprint().slice(0,1) + 69 | api.fingerprint().slice(-1), 70 | random = randomBlock().slice(-2); 71 | 72 | counter = safeCounter().toString(36).slice(-4); 73 | 74 | return date.slice(-2) + 75 | counter + print + random; 76 | }; 77 | 78 | api.globalCount = function globalCount() { 79 | // We want to cache the results of this 80 | var cache = (function calc() { 81 | var i, 82 | count = 0; 83 | 84 | for (i in window) { 85 | count++; 86 | } 87 | 88 | return count; 89 | }()); 90 | 91 | api.globalCount = function () { return cache; }; 92 | return cache; 93 | }; 94 | 95 | api.fingerprint = function browserPrint() { 96 | return pad((navigator.mimeTypes.length + 97 | navigator.userAgent.length).toString(36) + 98 | api.globalCount().toString(36), 4); 99 | }; 100 | 101 | // don't change anything from here down. 102 | if (app.register) { 103 | app.register(namespace, api); 104 | } else if (typeof module !== 'undefined') { 105 | module.exports = api; 106 | } else { 107 | app[namespace] = api; 108 | } 109 | 110 | }(this.applitude || this)); 111 | -------------------------------------------------------------------------------- /python-scripts/node_modules/cuid/dist/node-cuid.js: -------------------------------------------------------------------------------- 1 | /** 2 | * cuid.js 3 | * Collision-resistant UID generator for browsers and node. 4 | * Sequential for fast db lookups and recency sorting. 5 | * Safe for element IDs and server-side lookups. 6 | * 7 | * Extracted from CLCTR 8 | * 9 | * Copyright (c) Eric Elliott 2012 10 | * MIT License 11 | */ 12 | 13 | /*global window, navigator, document, require, process, module */ 14 | (function (app) { 15 | 'use strict'; 16 | var namespace = 'cuid', 17 | c = 0, 18 | blockSize = 4, 19 | base = 36, 20 | discreteValues = Math.pow(base, blockSize), 21 | 22 | pad = function pad(num, size) { 23 | var s = "000000000" + num; 24 | return s.substr(s.length-size); 25 | }, 26 | 27 | randomBlock = function randomBlock() { 28 | return pad((Math.random() * 29 | discreteValues << 0) 30 | .toString(base), blockSize); 31 | }, 32 | 33 | safeCounter = function () { 34 | c = (c < discreteValues) ? c : 0; 35 | c++; // this is not subliminal 36 | return c - 1; 37 | }, 38 | 39 | api = function cuid() { 40 | // Starting with a lowercase letter makes 41 | // it HTML element ID friendly. 42 | var letter = 'c', // hard-coded allows for sequential access 43 | 44 | // timestamp 45 | // warning: this exposes the exact date and time 46 | // that the uid was created. 47 | timestamp = (new Date().getTime()).toString(base), 48 | 49 | // Prevent same-machine collisions. 50 | counter, 51 | 52 | // A few chars to generate distinct ids for different 53 | // clients (so different computers are far less 54 | // likely to generate the same id) 55 | fingerprint = api.fingerprint(), 56 | 57 | // Grab some more chars from Math.random() 58 | random = randomBlock() + randomBlock(); 59 | 60 | counter = pad(safeCounter().toString(base), blockSize); 61 | 62 | return (letter + timestamp + counter + fingerprint + random); 63 | }; 64 | 65 | api.slug = function slug() { 66 | var date = new Date().getTime().toString(36), 67 | counter, 68 | print = api.fingerprint().slice(0,1) + 69 | api.fingerprint().slice(-1), 70 | random = randomBlock().slice(-2); 71 | 72 | counter = safeCounter().toString(36).slice(-4); 73 | 74 | return date.slice(-2) + 75 | counter + print + random; 76 | }; 77 | 78 | api.fingerprint = function nodePrint() { 79 | var os = require('os'), 80 | 81 | padding = 2, 82 | pid = pad((process.pid).toString(36), padding), 83 | hostname = os.hostname(), 84 | length = hostname.length, 85 | hostId = pad((hostname) 86 | .split('') 87 | .reduce(function (prev, char) { 88 | return +prev + char.charCodeAt(0); 89 | }, +length + 36) 90 | .toString(36), 91 | padding); 92 | return pid + hostId; 93 | }; 94 | 95 | 96 | // don't change anything from here down. 97 | if (app.register) { 98 | app.register(namespace, api); 99 | } else if (typeof module !== 'undefined') { 100 | module.exports = api; 101 | } else { 102 | app[namespace] = api; 103 | } 104 | 105 | }(this.applitude || this)); 106 | -------------------------------------------------------------------------------- /python-scripts/node_modules/cuid/grunt.js: -------------------------------------------------------------------------------- 1 | /*global module*/ 2 | module.exports = function(grunt) { 3 | 'use strict'; 4 | grunt.initConfig({ 5 | pkg: '', 6 | lint: { 7 | all: ['./grunt.js', './dist/*.js', './test/test.js'] 8 | }, 9 | jshint: { 10 | options: { 11 | curly: true, 12 | eqeqeq: true, 13 | immed: true, 14 | latedef: true, 15 | newcap: true, 16 | nonew: true, 17 | noarg: true, 18 | sub: true, 19 | undef: true, 20 | unused: true, 21 | eqnull: true, 22 | browser: true, 23 | strict: true, 24 | boss: false 25 | } 26 | }, 27 | concat: { 28 | applitude: { 29 | src: ['node_modules/applitude/dist/applitude.bundle.js'], 30 | dest: 'lib/applitude.bundle.js' 31 | }, 32 | browser: { 33 | src: ['src/head.js', 'src/browser-fingerprint.js', 'src/footer.js'], 34 | dest: 'dist/browser-cuid.js' 35 | }, 36 | node: { 37 | src: ['src/head.js', 'src/node-fingerprint.js', 'src/footer.js'], 38 | dest: 'dist/node-cuid.js' 39 | } 40 | }, 41 | qunit: { 42 | applitude: ['test/applitude-cuid-test.html'], 43 | browser: ['test/browser-cuid-test.html'] 44 | }, 45 | test: { 46 | "node-cuid": ['test/node-cuid-test.js'] 47 | } 48 | }); 49 | grunt.registerTask('testall', 'qunit test'); 50 | grunt.registerTask('default', 'concat lint'); 51 | grunt.registerTask('install', 'concat'); 52 | }; 53 | -------------------------------------------------------------------------------- /python-scripts/node_modules/cuid/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "cuid@~1.2.4", 3 | "_id": "cuid@1.2.5", 4 | "_inBundle": false, 5 | "_integrity": "sha1-SzYXaYf5BjzgXuCTTonM7kud6KY=", 6 | "_location": "/cuid", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "range", 10 | "registry": true, 11 | "raw": "cuid@~1.2.4", 12 | "name": "cuid", 13 | "escapedName": "cuid", 14 | "rawSpec": "~1.2.4", 15 | "saveSpec": null, 16 | "fetchSpec": "~1.2.4" 17 | }, 18 | "_requiredBy": [ 19 | "/compilex" 20 | ], 21 | "_resolved": "https://registry.npmjs.org/cuid/-/cuid-1.2.5.tgz", 22 | "_shasum": "4b36176987f9063ce05ee0934e89ccee4b9de8a6", 23 | "_spec": "cuid@~1.2.4", 24 | "_where": "/home/anjalisoni3655/pseudogen/python-scripts/node_modules/compilex", 25 | "author": { 26 | "name": "Eric Elliott", 27 | "email": "eric@ericleads.com", 28 | "url": "http://ericleads.com" 29 | }, 30 | "browserify": "./dist/browser-cuid.js", 31 | "bugs": { 32 | "url": "https://github.com/dilvie/cuid/issues" 33 | }, 34 | "bundleDependencies": false, 35 | "deprecated": false, 36 | "description": "Collision-resistant ids optimized for horizontal scaling and performance. For node and browsers.", 37 | "devDependencies": { 38 | "applitude": "~0.x.x", 39 | "grunt": "~0.3.x" 40 | }, 41 | "directories": { 42 | "dist": "./dist", 43 | "lib": "./lib", 44 | "src": "./src", 45 | "test": "./test" 46 | }, 47 | "homepage": "https://github.com/dilvie/cuid#readme", 48 | "keywords": [ 49 | "uid", 50 | "unique id", 51 | "guid", 52 | "uuid" 53 | ], 54 | "main": "./dist/node-cuid.js", 55 | "name": "cuid", 56 | "repository": { 57 | "type": "git", 58 | "url": "git+https://github.com/dilvie/cuid.git" 59 | }, 60 | "scripts": { 61 | "test": "grunt test" 62 | }, 63 | "version": "1.2.5" 64 | } 65 | -------------------------------------------------------------------------------- /python-scripts/node_modules/cuid/src/browser-fingerprint.js: -------------------------------------------------------------------------------- 1 | api.globalCount = function globalCount() { 2 | // We want to cache the results of this 3 | var cache = (function calc() { 4 | var i, 5 | count = 0; 6 | 7 | for (i in window) { 8 | count++; 9 | } 10 | 11 | return count; 12 | }()); 13 | 14 | api.globalCount = function () { return cache; }; 15 | return cache; 16 | }; 17 | 18 | api.fingerprint = function browserPrint() { 19 | return pad((navigator.mimeTypes.length + 20 | navigator.userAgent.length).toString(36) + 21 | api.globalCount().toString(36), 4); 22 | }; -------------------------------------------------------------------------------- /python-scripts/node_modules/cuid/src/footer.js: -------------------------------------------------------------------------------- 1 | 2 | // don't change anything from here down. 3 | if (app.register) { 4 | app.register(namespace, api); 5 | } else if (typeof module !== 'undefined') { 6 | module.exports = api; 7 | } else { 8 | app[namespace] = api; 9 | } 10 | 11 | }(this.applitude || this)); 12 | -------------------------------------------------------------------------------- /python-scripts/node_modules/cuid/src/head.js: -------------------------------------------------------------------------------- 1 | /** 2 | * cuid.js 3 | * Collision-resistant UID generator for browsers and node. 4 | * Sequential for fast db lookups and recency sorting. 5 | * Safe for element IDs and server-side lookups. 6 | * 7 | * Extracted from CLCTR 8 | * 9 | * Copyright (c) Eric Elliott 2012 10 | * MIT License 11 | */ 12 | 13 | /*global window, navigator, document, require, process, module */ 14 | (function (app) { 15 | 'use strict'; 16 | var namespace = 'cuid', 17 | c = 0, 18 | blockSize = 4, 19 | base = 36, 20 | discreteValues = Math.pow(base, blockSize), 21 | 22 | pad = function pad(num, size) { 23 | var s = "000000000" + num; 24 | return s.substr(s.length-size); 25 | }, 26 | 27 | randomBlock = function randomBlock() { 28 | return pad((Math.random() * 29 | discreteValues << 0) 30 | .toString(base), blockSize); 31 | }, 32 | 33 | safeCounter = function () { 34 | c = (c < discreteValues) ? c : 0; 35 | c++; // this is not subliminal 36 | return c - 1; 37 | }, 38 | 39 | api = function cuid() { 40 | // Starting with a lowercase letter makes 41 | // it HTML element ID friendly. 42 | var letter = 'c', // hard-coded allows for sequential access 43 | 44 | // timestamp 45 | // warning: this exposes the exact date and time 46 | // that the uid was created. 47 | timestamp = (new Date().getTime()).toString(base), 48 | 49 | // Prevent same-machine collisions. 50 | counter, 51 | 52 | // A few chars to generate distinct ids for different 53 | // clients (so different computers are far less 54 | // likely to generate the same id) 55 | fingerprint = api.fingerprint(), 56 | 57 | // Grab some more chars from Math.random() 58 | random = randomBlock() + randomBlock(); 59 | 60 | counter = pad(safeCounter().toString(base), blockSize); 61 | 62 | return (letter + timestamp + counter + fingerprint + random); 63 | }; 64 | 65 | api.slug = function slug() { 66 | var date = new Date().getTime().toString(36), 67 | counter, 68 | print = api.fingerprint().slice(0,1) + 69 | api.fingerprint().slice(-1), 70 | random = randomBlock().slice(-2); 71 | 72 | counter = safeCounter().toString(36).slice(-4); 73 | 74 | return date.slice(-2) + 75 | counter + print + random; 76 | }; 77 | -------------------------------------------------------------------------------- /python-scripts/node_modules/cuid/src/node-fingerprint.js: -------------------------------------------------------------------------------- 1 | api.fingerprint = function nodePrint() { 2 | var os = require('os'), 3 | 4 | padding = 2, 5 | pid = pad((process.pid).toString(36), padding), 6 | hostname = os.hostname(), 7 | length = hostname.length, 8 | hostId = pad((hostname) 9 | .split('') 10 | .reduce(function (prev, char) { 11 | return +prev + char.charCodeAt(0); 12 | }, +length + 36) 13 | .toString(36), 14 | padding); 15 | return pid + hostId; 16 | }; 17 | -------------------------------------------------------------------------------- /python-scripts/node_modules/cuid/test/applitude-cuid-test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |

QUnit Test Suite

8 |

9 |
10 |

11 |
    12 |
    13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /python-scripts/node_modules/cuid/test/applitude-cuid-test.js: -------------------------------------------------------------------------------- 1 | /*global window, applitude, test, ok, cuid, equal, stop, start*/ 2 | (function () { 3 | 'use strict'; 4 | var collision = false; 5 | 6 | test('cuid()', function () { 7 | stop(); 8 | (function () { 9 | var ids = window.ids = {}, 10 | cuid = applitude.cuid, 11 | i, 12 | id; 13 | for (i = 0; i < 600000; i++) { 14 | id = cuid(); 15 | if (!ids[id]) { 16 | ids[id] = id; 17 | } else { 18 | collision = true; 19 | break; 20 | } 21 | } 22 | 23 | ok(typeof cuid() === 'string', 24 | '.cuid() should return a string'); 25 | 26 | ok(!collision, 27 | '.cuid() should generate unique ids on a single machine'); 28 | 29 | start(); 30 | 31 | }()); 32 | }); 33 | }()); 34 | -------------------------------------------------------------------------------- /python-scripts/node_modules/cuid/test/browser-cuid-test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
    7 |

    QUnit Test Suite

    8 |

    9 |
    10 |

    11 |
      12 |
      13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /python-scripts/node_modules/cuid/test/browser-cuid-test.js: -------------------------------------------------------------------------------- 1 | /*global window, applitude, test, ok, cuid, equal, stop, start*/ 2 | (function () { 3 | 'use strict'; 4 | var collision = false; 5 | 6 | test('cuid()', function () { 7 | stop(); 8 | (function () { 9 | var ids = window.ids = {}, 10 | i, 11 | id; 12 | for (i = 0; i < 600000; i++) { 13 | id = cuid(); 14 | if (!ids[id]) { 15 | ids[id] = id; 16 | } else { 17 | collision = true; 18 | break; 19 | } 20 | } 21 | 22 | ok(typeof cuid() === 'string', 23 | '.cuid() should return a string'); 24 | 25 | ok(!collision, 26 | '.cuid() should generate unique ids on a single machine'); 27 | 28 | start(); 29 | 30 | }()); 31 | }); 32 | }()); 33 | -------------------------------------------------------------------------------- /python-scripts/node_modules/cuid/test/node-cuid-test.js: -------------------------------------------------------------------------------- 1 | var cuid = require('../dist/node-cuid.js'); 2 | 3 | var MAX = 1200000; 4 | var collisionTest = function collisionTest(fn) { 5 | var i = 0, 6 | id, 7 | ids = {}, 8 | pass = true; 9 | while (i < MAX) { 10 | id = fn(); 11 | if (!ids[id]) { 12 | ids[id] = id; 13 | } else { 14 | pass = false; 15 | console.log('Failed at ' + i + ' iterations.'); 16 | break; 17 | } 18 | i++; 19 | } 20 | return pass; 21 | }; 22 | 23 | exports.testcuid = function (test) { 24 | 25 | test.ok(typeof cuid() === 'string', 26 | '.cuid() should return a string.'); 27 | 28 | test.ok(collisionTest(cuid), 29 | 'ids should not collide.'); 30 | 31 | test.ok(collisionTest(cuid.slug), 32 | 'slugs should not collide.'); 33 | 34 | test.done(); 35 | 36 | }; 37 | -------------------------------------------------------------------------------- /python-scripts/node_modules/cuid/test/testling.js: -------------------------------------------------------------------------------- 1 | var test = require('testling'); 2 | 3 | /** 4 | * cuid.js 5 | * Collision-resistant client-side UID generator safe 6 | * for element IDs and server-side lookups. 7 | * 8 | * Extracted from CLCTR 9 | * 10 | * Copyright (c) Eric Elliott 2012 11 | * MIT License 12 | */ 13 | 14 | /*global window, navigator, document */ 15 | var global = global || this, module = module || undefined, 16 | exports = module && module.exports || undefined; 17 | 18 | (function (app) { 19 | 'use strict'; 20 | var namespace = 'cuid', 21 | c = 0, 22 | globalCount = (function () { 23 | var i, 24 | count = 0; 25 | for (i in window) { 26 | count++; 27 | } 28 | return count; 29 | }()), 30 | 31 | pad = function pad(num, size) { 32 | var s = "000000000" + num; 33 | return s.substr(s.length-size); 34 | }, 35 | 36 | api = function cuid() { 37 | // Starting with a lowercase letter Makes 38 | // it HTML element ID friendly. 39 | var letter = 'c', // fixed = allows for sequential access 40 | 41 | // timestamp 42 | // warning: this exposes the exact date and time 43 | // that the uid was created. 44 | timestamp = (new Date().getTime()).toString(36), 45 | 46 | // Without this, 1 in 600,000 IDs collide. 47 | counter, 48 | 49 | // A few chars to generate distinct ids for different 50 | // browser / page combos (so different computers are far less 51 | // likely to generate the same id) 52 | fingerprint = pad((navigator.mimeTypes.length + 53 | navigator.userAgent.length).toString(36) + 54 | globalCount.toString(36), 4), 55 | 56 | // Grab some more chars from browser's .random() method 57 | random = pad((Math.random() * 58 | Math.pow(36, 4) << 0) 59 | .toString(36), 4); 60 | 61 | c = (c < 1679615) ? c : 0; 62 | counter = pad(c.toString(36), 4); 63 | 64 | c++; // this is not subliminal 65 | 66 | return (letter + timestamp + counter + fingerprint + random); 67 | }; 68 | 69 | if (app.register) { 70 | app.register(namespace, api); 71 | } else { 72 | app[namespace] = api; 73 | } 74 | 75 | }(global.applitude || (global.navigator && global) || exports)); 76 | 77 | test('cuid', function (t) { 78 | var i; 79 | for (i = 0; i < 10; i++) { 80 | t.log(cuid()); 81 | } 82 | t.end(); 83 | }); 84 | -------------------------------------------------------------------------------- /python-scripts/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "requires": true, 3 | "lockfileVersion": 1, 4 | "dependencies": { 5 | "colors": { 6 | "version": "0.6.2", 7 | "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", 8 | "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=" 9 | }, 10 | "compilex": { 11 | "version": "0.7.4", 12 | "resolved": "https://registry.npmjs.org/compilex/-/compilex-0.7.4.tgz", 13 | "integrity": "sha1-XLSHythDLAKa3MWx8p7IaXdxGAo=", 14 | "requires": { 15 | "colors": "0.6.2", 16 | "cuid": "1.2.5" 17 | } 18 | }, 19 | "cuid": { 20 | "version": "1.2.5", 21 | "resolved": "https://registry.npmjs.org/cuid/-/cuid-1.2.5.tgz", 22 | "integrity": "sha1-SzYXaYf5BjzgXuCTTonM7kud6KY=" 23 | } 24 | } 25 | } 26 | --------------------------------------------------------------------------------