Posts

Showing posts with the label Python command line options

Featured Post

SQL Interview Success: Unlocking the Top 5 Frequently Asked Queries

Image
 Here are the five top commonly asked SQL queries in the interviews. These you can expect in Data Analyst, or, Data Engineer interviews. Top SQL Queries for Interviews 01. Joins The commonly asked question pertains to providing two tables, determining the number of rows that will return on various join types, and the resultant. Table1 -------- id ---- 1 1 2 3 Table2 -------- id ---- 1 3 1 NULL Output ------- Inner join --------------- 5 rows will return The result will be: =============== 1  1 1   1 1   1 1    1 3    3 02. Substring and Concat Here, we need to write an SQL query to make the upper case of the first letter and the small case of the remaining letter. Table1 ------ ename ===== raJu venKat kRIshna Solution: ========== SELECT CONCAT(UPPER(SUBSTRING(name, 1, 1)), LOWER(SUBSTRING(name, 2))) AS capitalized_name FROM Table1; 03. Case statement SQL Query ========= SELECT Code1, Code2,      CASE         WHEN Code1 = 'A' AND Code2 = 'AA' THEN "A" | "A

Python Command Line Options List

The complete list of command line options -b Issue warnings for calling str() with a bytes or bytearray object and no encoding argument, and comparing a bytes or bytearray with a str. Option -bb issues errors instead. -B Do not write .pyc or .pyo byte-code files on imports. -d Turn on parser debugging output (for developers of the Python core). -E Ignore Python environment variables described ahead (such as PYTHONPATH). -h Print help message and exit. -i Enter interactive mode after executing a script. Hint: useful for postmortem debugging; see also pdb.pm(), described in Python’s library manuals. -O Optimize generated byte code (create and use .pyo byte-code files). Currently yields a minor performance improvement. -OO Operates like -O, the previous option, but also removes docstrings from byte code. -q Do not print version and copyright message on interactive startup (as of Python 3.2). -s Do not add the user site directory to the sys.path module search path. -S Do not imply “impor