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:
| -- Import(FROM) / Export(TO) CSV file from/into a table | |
| -- Ref: https://www.postgresql.org/docs/current/sql-copy.html | |
| -- If processing all columns, no need column specification | |
| -- If CSV file don't include header, remove 'HEADER' from below query | |
| -- For Export, can also specify Query, instead of Table & Column name | |
| COPY table_name (column_1, column_2, column_3, column_5) | |
| [FROM/TO] 'csv_file_location' DELIMITER ',' CSV HEADER QUOTE '"' ESCAPE '"' | |
| -- Dump database on remote host to file | |
| -- Ref: https://www.postgresql.org/docs/current/app-pgdump.html |
| # Path to your oh-my-zsh installation. | |
| export ZSH=/Users/SumonMSelim/.oh-my-zsh | |
| # Set name of the theme to load. | |
| ZSH_THEME="powerlevel9k/powerlevel9k" | |
| POWERLEVEL9K_MODE="awesome-fontconfig" | |
| # User configuration | |
| export TERM="xterm-256color" | |
| export SHELL="/bin/zsh" |
| -- Create a group | |
| CREATE ROLE readaccess; | |
| -- Grant access to existing tables | |
| GRANT USAGE ON SCHEMA public TO readaccess; | |
| GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
| -- Grant access to future tables | |
| ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |
| /** | |
| * Convert an image | |
| * to a base64 url | |
| * @param {String} url | |
| * @param {Function} callback | |
| * @param {String} [outputFormat=image/png] | |
| */ | |
| function convertImgToBase64URL(url, callback, outputFormat){ | |
| var img = new Image(); | |
| img.crossOrigin = 'Anonymous'; |
| <?php | |
| ini_set('max_execution_time', 0); | |
| ini_set('memory_limit', -1); | |
| $host = 'google.com'; | |
| $ports = array(21, 25, 80, 81, 110, 143, 443, 587, 2525, 3306); | |
| foreach ($ports as $port) | |
| { | |
| $connection = @fsockopen($host, $port, $errno, $errstr, 2); |