const TAX_RATE = 0.15;
const netInput = document.querySelector("[data-amount-net]");
const taxInput = document.querySelector("[data-amount-tax]");
const grossInput = document.querySelector("[data-amount-gross]");
const SourceAmountField = Object.freeze({Verified Spec-Driven Development (VSDD) is a unified software engineering methodology that fuses three proven paradigms into a single AI-orchestrated pipeline:
- Spec-Driven Development (SDD): Define the contract before writing a single line of implementation. Specs are the source of truth.
- Test-Driven Development (TDD): Tests are written before code. Red → Green → Refactor. No code exists without a failing test that demanded it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| This example is for inside the class. | |
| First establish the connection into `self.conn` | |
| """ | |
| def _table_column_names(self, table: str) -> str: | |
| """ | |
| Get column names from database table | |
| Parameters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sqlalchemy import create_engine | |
| from sqlalchemy.sql.expression import select | |
| db1_uri = 'db_uri_here' | |
| db2_uri = 'db_uri_here' | |
| db1_engine = create_engine(db1_uri) | |
| db2_engine = create_engine(db2_uri) | |
| db1_conn = db1_engine.connect() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # environment | |
| pip install pipenv | |
| # development | |
| pipenv install devtool | |
| # better REPL | |
| pipenv install ipython | |
| # reading .env variables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # upgrade pip | |
| pip install -U pip | |
| # django | |
| pip install django | |
| # environment variables | |
| pip install python-dotenv | |
| # better shell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## DJANGO REST React Github pages settings | |
| ## With Cookies Session authentication | |
| # create Procfile with content: | |
| web: gunicorn server.wsgi | |
| # heroku setup database | |
| pip install dj-database-url | |
| DATABASES['default'] = dj_database_url.config( | |
| conn_max_age=600, ssl_require=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Importing Sqlite to Postgres Heroku Django | |
| python manage.py dumpdata --exclude=contenttypes --exclude=auth.permission > datadump.json | |
| # Change settings.py to your mysql | |
| # Make sure you can connect on your mysql (permissions,etc) | |
| python manage.py migrate | |
| #Exclude contentype data with this snippet in shell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Tailwind installation and setup script | |
| * | |
| * STEPS: | |
| * Installs tailwindcss | |
| * creates src/assets/css folder to hold main.css and tailwind.css | |
| * initializes full tailwind configuration file | |
| * inserts new package.json scripts commands | |
| * | |
| * NOTE: you have to import main.css in src/index.js |
// default exports
export default 42;
export default {};
export default [];
export default (1 + 2);
export default foo;
export default function () {}
export default class {}
export default function foo () {}NewerOlder