python_lib_examples package

Submodules

python_lib_examples.args module

python_lib_examples.args.modify_immutable(arg)[source]
python_lib_examples.args.modify_mutable(arg)[source]
python_lib_examples.args.my_function(*args)[source]
python_lib_examples.args.my_function2(**args)[source]

python_lib_examples.async_files module

async python_lib_examples.async_files.async_read_file(file_path)[source]
async python_lib_examples.async_files.async_write_file(file_path, content)[source]
async python_lib_examples.async_files.main()[source]

python_lib_examples.asyncio_example module

async python_lib_examples.asyncio_example.main()[source]
async python_lib_examples.asyncio_example.print_letters()[source]
async python_lib_examples.asyncio_example.print_numbers()[source]

python_lib_examples.binary_tree module

class python_lib_examples.binary_tree.BinaryTree(value=0, left=None, right=None)[source]

Bases: object

construct_from_list(arr)[source]

given list of arr of each layer of the tree, None represents empty tree node. construct the tree.

inorder_str()[source]
Return type:

str

postorder_str()[source]
Return type:

str

preorder_str()[source]
Return type:

str

python_lib_examples.binary_tree.test_binary_tree()[source]
python_lib_examples.binary_tree.test_construct_binary_tree()[source]

python_lib_examples.bisect_example module

python_lib_examples.bisect_example.main()[source]

python_lib_examples.built_in_args module

python_lib_examples.built_in_args.get_args()[source]
python_lib_examples.built_in_args.main()[source]

python_lib_examples.built_in_list_dict_str module

python_lib_examples.built_in_list_dict_str.calculators()[source]
python_lib_examples.built_in_list_dict_str.dict_basics()[source]
python_lib_examples.built_in_list_dict_str.list_basics()[source]
python_lib_examples.built_in_list_dict_str.str_basics()[source]

python_lib_examples.built_in_yield module

python_lib_examples.built_in_yield.read_file_line_by_line(file_name)[source]

python_lib_examples.copy_example module

python_lib_examples.fork_deadlock_simple module

python_lib_examples.functools_lrucache module

python_lib_examples.functools_lrucache.expensive_function(x)[source]

python_lib_examples.heapq_example module

python_lib_examples.logger_example module

class python_lib_examples.logger_example.JZLogger[source]

Bases: object

python_lib_examples.logger_example.get_cruise_logger()[source]

python_lib_examples.multiprocess_test module

python_lib_examples.multiprocess_test.check_if_main_process()[source]
python_lib_examples.multiprocess_test.my_function()[source]
python_lib_examples.multiprocess_test.my_function2()[source]

python_lib_examples.ordered_dict_example module

python_lib_examples.ordered_dict_lru_cache module

class python_lib_examples.ordered_dict_lru_cache.LRUCache(max_size)[source]

Bases: object

get(key)[source]
put(key, value)[source]

python_lib_examples.pathlib_example module

python_lib_examples.pool_deadlock module

python_lib_examples.pool_deadlock.runs_in_subprocess()[source]
python_lib_examples.pool_deadlock.setup_logging()[source]

python_lib_examples.random_example module

python_lib_examples.shared_memory_example module

python_lib_examples.shared_memory_example.update_shared_data(shared_array, shared_value)[source]

python_lib_examples.subprocess_example module

python_lib_examples.xml_example module