* Vereda standard output * init Timestamp: 240108-204538 Vereda version = 1 Vereda file = /a/ver/bin/vereda Zorro version = 2 Zorro file = /a/ver/lib/zorro.py Python version = 3.12.0 Python file = /usr/local/bin/python3 * hello_world_function * variable Main built-in scalar types Hello world slice y[2:4] = ll 44 3.14 44 True * data_structure Main built-in data structure types Two dimensional array All: [['00', '01'], ['10', '11'], ['20', '21']] Row 1: ['10', '11'] Element 2,1: 21 Dictionary: {'a': 'zero', 1: 'one', '2': 'TWO'} * data_structure_def {'a': 11, 'b': 22.0} 11 * control_flow_if Control flow with the conditional statement (if) not eight * control_flow_switch letter "a" is a vowel * control_flow_loop_for list=zero|1|two|two| tuple=Zero|1|Two|Two| set=zero|1|2| range=2|4|6| * control_flow_loop_for_dict key=a=zero|1=one|2=TWO| key-value=a=zero|1=one|2=TWO| tuple=('a', 'zero')|(1, 'one')|('2', 'TWO')| * control_flow_loop_while 0|1|2| * error_handling Look Before You Leap (LBYL): no zero division Easier to ask for forgiveness than permission (EAFP): no zero division None * function_static except 1 * function_static 2 * function_fix * function_var except ('One', 'Two') * function_var ('One', 'Two', 'Three') * function_kwarg {'a': 'AA', 'b': 'BB'} * function_call_by Outside function before : 1 [8] 4364176904 4338328384 Inside function : 2 [8, 9] 4364176936 4338328384 Outside function after : 1 [8, 9] 4364176904 4338328384 * standard_library_built_in Some string 11 SOME STRING * standard_library_modules zorro module version= 2 zorro module rights= CC BY-SA - Creative Commons Attribution-ShareAlike Hello world module datetime, pre-installed module Current year: 2024 * external_modules They must be installed Example of popular packages: NumPy, Matplotlib python3 -m pip install foo pip3 install foo * command_line_arguments ['/a/ver/bin/vereda'] * read_input You typed: [NO INPUT - set function to "True"] * readfile * appendfile * html * cvs [['column 1 name', 'column 2 name', ' column 3 name'], ['first row data 1', 'first row data 2', 'first row data 3'], ['second row data 1', 'second row data 2', 'second row data 3']] * record_jar type of reja: {1: {'Planet': ' Mercury', 'Orbital-Radius': ' 57,910,000 km', 'Diameter': ' 4,880 km', 'Mass': ' 3.30e23 kg'}, 2: {'Planet': ' Venus', 'Orbital-Radius': ' 108,200,000 km', 'Diameter': ' 12,103.6 km', 'Mass': ' 4.869e24 kg'}, 3: {'Planet': ' Earth', 'Orbital-Radius': ' 149,600,000 km', 'Diameter': ' 12,756.3 km', 'Mass': ' 5.972e24 kg', 'Moons': ' Luna'}} {'Planet': ' Mercury', 'Orbital-Radius': ' 57,910,000 km', 'Diameter': ' 4,880 km', 'Mass': ' 3.30e23 kg'} Mercury {1: {'Diameter': ' 4,880 km', 'Mass': ' 3.30e23 kg', 'Orbital-Radius': ' 57,910,000 km', 'Planet': ' Mercury'}, 2: {'Diameter': ' 12,103.6 km', 'Mass': ' 4.869e24 kg', 'Orbital-Radius': ' 108,200,000 km', 'Planet': ' Venus'}, 3: {'Diameter': ' 12,756.3 km', 'Mass': ' 5.972e24 kg', 'Moons': ' Luna', 'Orbital-Radius': ' 149,600,000 km', 'Planet': ' Earth'}} * json {'a': 'AAA', 'b': 'BBB'} * sqlite [('apple', 4), ('orange', 2), ('bed', 9)] * cvs_to_sqlite file: output/air.sqlite fields: rowid datetime station_antwerp station_paris station_london rows 1 to 5: [(1, '2019-05-07 02:00:00', '', '', '23.0'), (2, '2019-05-07 03:00:00', '50.5', '25.0', '19.0'), (3, '2019-05-07 04:00:00', '45.0', '27.7', '19.0'), (4, '2019-05-07 05:00:00', '', '50.4', '16.0'), (5, '2019-05-07 06:00:00', '', '61.9', '')] * pickling_ex d={'a': 'AAA', 'b': 'BBB'} d_p=b'\x80\x04\x95\x19\x00\x00\x00\x00\x00\x00\x00}\x94(\x8c\x01a\x94\x8c\x03AAA\x94\x8c\x01b\x94\x8c\x03BBB\x94u.' d_u={'a': 'AAA', 'b': 'BBB'} d_f= {'a': 'AAA', 'b': 'BBB'} * zipdir Output to "output/data.zip" * matplotlib_ex * numpy_ex * pandas_ex example 1 Name Age Sex 0 Braund, Mr. Owen Harris 22 male 1 Allen, Mr. William Henry 35 male 2 Bonnell, Miss. Elizabeth 58 female 0 22 1 35 2 58 Name: Age, dtype: int64 Max age = 58 Describe = Age count 3.000000 mean 38.333333 std 18.230012 min 22.000000 25% 28.500000 50% 35.000000 75% 46.500000 max 58.000000 example 2 column 1 name column 2 name column 3 name 0 first row data 1 first row data 2 first row data 3 1 second row data 1 second row data 2 second row data 3 RangeIndex: 2 entries, 0 to 1 Data columns (total 3 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 column 1 name 2 non-null object 1 column 2 name 2 non-null object 2 column 3 name 2 non-null object dtypes: object(3) memory usage: 180.0+ bytes None example 3 station_antwerp station_paris station_london datetime 2019-05-07 02:00:00 NaN NaN 23.0 2019-05-07 03:00:00 50.5 25.0 19.0 2019-05-07 04:00:00 45.0 27.7 19.0 2019-05-07 05:00:00 NaN 50.4 16.0 2019-05-07 06:00:00 NaN 61.9 NaN ... ... ... ... 2019-06-20 22:00:00 NaN 21.4 NaN 2019-06-20 23:00:00 NaN 24.9 NaN 2019-06-21 00:00:00 NaN 26.5 NaN 2019-06-21 01:00:00 NaN 21.8 NaN 2019-06-21 02:00:00 NaN 20.0 NaN [1035 rows x 3 columns] * generate_documentation * generate_documentation wrote zorro.html