This document provides guidelines for maintaining high-quality Python code. These rules MUST be followed by all AI coding agents and contributors.
All code you write MUST be fully optimized.
"Fully optimized" includes:
| def getListProducts(): | |
| # Check in Cache | |
| getList = Cache.get('products') | |
| # If Cache-Hit miss then call Database | |
| if getList == False: | |
| # get from Database | |
| getList = ProductsModel.getAllinJson() | |
| # push to Cache | |
| Cache.set(getList, DAILY_24HR_TTL) | |
| return getList |
| # Completely remove any previous config | |
| sudo apt remove --purge mysql* | |
| sudo apt autoremove | |
| sudo find / -iname mysql | |
| # install the server | |
| sudo apt update | |
| sudo apt install mysql-server | |
| # run the wizard | |
| sudo mysql_secure_installation |
| <?php | |
| namespace Src\Platform\CommonLibrary\PHPRedis; | |
| use Exception; | |
| class PHPRedisCache | |
| { | |
| /** | |
| * A string that should be prepended to keys |
| pg_dump --column-inserts -U <username> --table=<table> <database> -P |
| adb help // List all comands | |
| == Adb Server | |
| adb kill-server | |
| adb start-server | |
| == Adb Reboot | |
| adb reboot | |
| adb reboot recovery | |
| adb reboot-bootloader |
| const http = require("http"); | |
| const host = process.argv.slice(2)[0]; | |
| const port = process.argv.slice(2)[1]; | |
| const requestListener = function (req, res) { | |
| res.writeHead(200); | |
| res.end("Success!!"); | |
| }; |
| wget https://nodejs.org/download/release/v16.19.0/node-v16.19.0-linux-x64.tar.gz | |
| tar xvf node-v16.19.0-linux-x64.tar.gz | |
| mv node-v16.19.0-linux-x64 nodejs | |
| mkdir ~/bin | |
| cp nodejs/bin/node ~/bin | |
| cd ~/bin | |
| ln -s ../nodejs/lib/node_modules/npm/bin/npm-cli.js npm | |
| node --version |
| # Install PCRE | |
| unzip pcre-8.45.zip | |
| ./configure | |
| make | |
| sudo make install | |
| # Extract zlib, no need to install | |
| tar -xvzf zlib-1.2.12.tar.gz | |
| ./configure | |
| make |
| # | |
| # Based on https://hub.docker.com/_/sonarqube | |
| # | |
| version: "3.7" | |
| services: | |
| sonarqube: | |
| container_name: sonarqube |