| David Beazley - Python Cookbook, 3rd edition - 2013.epub | 1.79 MB | ||
| David Beazley - Python Cookbook, 3rd edition - 2013.mobi | 2.26 MB | ||
| David Beazley - Python Cookbook, 3rd edition - 2013.pdf | 9.44 MB | ||
| python-cookbook-master | |||
| README.md | 138 B | ||
| src | |||
| 1 | |||
| calculating_with_dictionaries | |||
| example.py | 506 B | ||
| determine_the_top_n_items_occurring_in_a_list | |||
| example.py | 647 B | ||
| extracting_a_subset_of_a_dictionary | |||
| example.py | 515 B | ||
| filtering_list_elements | |||
| example.py | 778 B | ||
| finding_out_what_two_dictionaries_have_in_common | |||
| example.py | 309 B | ||
| finding_the_largest_or_smallest_n_items | |||
| example.py | 578 B | ||
| grouping-records-together-based-on-a-field | |||
| grouping.py | 875 B | ||
| implementing_a_priority_queue | |||
| example.py | 752 B | ||
| keeping_the_last_n_items | |||
| example.py | 513 B | ||
| somefile.txt | 2.09 KB | ||
| mapping_names_to_sequence_elements | |||
| example1.py | 386 B | ||
| removing_duplicates_from_a_sequence_while_maintaining_order | |||
| example.py | 319 B | ||
| example2.py | 527 B | ||
| sort_a_list_of_dictionaries_by_a_common_key | |||
| example.py | 665 B | ||
| sort_objects_without_native_comparison_support | |||
| example.py | 312 B | ||
| transforming_and_reducing_data_at_the_same_time | |||
| example.py | 588 B | ||
| unpack_a_fixed_number_of_elements_from_iterables_of_arbitrary_length | |||
| example.py | 332 B | ||
| working_with_multiple_mappings_as_a_single_mapping | |||
| example.py | 924 B | ||
| 2 | |||
| combining_and_concatenating_strings | |||
| example.py | 750 B | ||
| matching_and_searching_for_text_patterns_using_regular_expressions | |||
| example.py | 515 B | ||
| matching_strings_using_shell_wildcard_patterns | |||
| example.py | 416 B | ||
| normalizing_unicode_text_to_a_standard_representation | |||
| example.py | 658 B | ||
| reformatting_text_to_fixed_number_of_columns | |||
| example.py | 466 B | ||
| sanitizing_and_cleaning_up_text | |||
| example.py | 720 B | ||
| searching_and_replacing_text | |||
| example.py | 488 B | ||
| specifying_a_regular_expression_for_the_shortest_match | |||
| example.py | 391 B | ||
| splitting_strings_on_any_of_multiple_delimiters | |||
| example.py | 690 B | ||
| tokenizing_text | |||
| example.py | 579 B | ||
| variable_interpolation_in_strings | |||
| example.py | 619 B | ||
| writing_a_regular_expression_for_multiline_patterns | |||
| example.py | 216 B | ||
| writing_a_simple_recursive_descent_parser | |||
| example.py | 4.58 KB | ||
| plyexample.py | 1.45 KB | ||
| 3 | |||
| determining_last_fridays_date | |||
| example.py | 502 B | ||
| finding_the_date_range_for_the_current_month | |||
| example.py | 780 B | ||
| 4 | |||
| creating_data_processing_pipelines | |||
| example.py | 1.69 KB | ||
| www | |||
| bar | |||
| access-log | 636.35 KB | ||
| access-log-0108.bz2 | 45.02 KB | ||
| access-log-0208.bz2 | 45.02 KB | ||
| foo | |||
| access-log | 636.35 KB | ||
| access-log-0108.gz | 70.57 KB | ||
| access-log-0208.gz | 70.57 KB | ||
| creating_new_iteration_patterns_with_generators | |||
| example.py | 151 B | ||
| delegating-iteration | |||
| example.py | 584 B | ||
| easy_implementation_of_the_iterator_protocol | |||
| example.py | 840 B | ||
| hardexample.py | 1.71 KB | ||
| generators_with_state | |||
| example.py | 690 B | ||
| somefile.txt | 80 B | ||
| how_to_flatten_a_nested_sequence | |||
| example.py | 494 B | ||
| iterate_over_the_index-value_pairs_of_a_list | |||
| example.py | 408 B | ||
| sample.dat | 27 B | ||
| iterating_in_reverse | |||
| example.py | 530 B | ||
| iterating_in_sorted_order_over_merged_sorted_iterables | |||
| example.py | 133 B | ||
| iterating_on_items_in_separate_containers | |||
| example.py | 151 B | ||
| 5 | |||
| adding_or_changing_the_encoding_of_an_already_open_file | |||
| example.py | 223 B | ||
| getting_a_directory_listing | |||
| example.py | 452 B | ||
| iterating_over_fixed-sized_records | |||
| data.bin | 256 B | ||
| example.py | 347 B | ||
| reading_and_writing_text_data | |||
| example.py | 1 KB | ||
| sample.txt | 30 B | ||
| wrapping_an_existing_file_descriptor_as_a_file_object | |||
| echo.py | 823 B | ||
| writing_bytes_to_a_text_file | |||
| example.py | 205 B | ||
| 6 | |||
| incremental_parsing_of_huge_xml_files | |||
| example.py | 1.15 KB | ||
| potholes.xml | 89.8 KB | ||
| parsing_modifying_and_rewriting_xml | |||
| example.py | 515 B | ||
| pred.xml | 409 B | ||
| parsing_simple_xml_data | |||
| example.py | 425 B | ||
| parsing_xml_documents_with_namespaces | |||
| example.py | 629 B | ||
| sample.xml | 321 B | ||
| reading_and_writing_binary_arrays_of_structures | |||
| readrecords.py | 378 B | ||
| unpackrecords.py | 415 B | ||
| writerecords.py | 457 B | ||
| reading_and_writing_csv_data | |||
| example.py | 1.5 KB | ||
| stocks.csv | 309 B | ||
| stocks.tsv | 309 B | ||
| reading_and_writing_json_data | |||
| example.py | 1.2 KB | ||
| reading_nested_and_variable_sized_binary_structures | |||
| example1.py | 1.06 KB | ||
| example2.py | 1.78 KB | ||
| example3.py | 2.68 KB | ||
| example4.py | 3.64 KB | ||
| writepolys.py | 1008 B | ||
| 7 | |||
| accessing_variables_defined_inside_a_closure | |||
| example1.py | 482 B | ||
| example2.py | 854 B | ||
| example3.py | 585 B | ||
| carrying_extra_state_with_callback_functions | |||
| example.py | 2.14 KB | ||
| functions_that_accept_any_number_of_arguments | |||
| example.py | 653 B | ||
| functions_that_only_accept_keyword_arguments | |||
| example.py | 507 B | ||
| functions_with_default_arguments | |||
| example.py | 667 B | ||
| inlining_callback_functions | |||
| example.py | 1.35 KB | ||
| making_an_n-argument_callable_work_as_a_callable_with_fewer_arguments | |||
| example1.py | 287 B | ||
| example2.py | 533 B | ||
| example3.py | 704 B | ||
| 8 | |||
| calling_a_method_on_a_parent_class | |||
| example1.py | 212 B | ||
| example2.py | 195 B | ||
| example3.py | 729 B | ||
| example4.py | 554 B | ||
| example5.py | 559 B | ||
| calling_a_method_on_an_object_given_the_name_as_a_string | |||
| example.py | 783 B | ||
| changing_the_string_representation_of_instances | |||
| example.py | 226 B | ||
| creating_a_new_kind_of_class_or_instance_attribute | |||
| example1.py | 805 B | ||
| example2.py | 1.28 KB | ||
| creating_an_instance_without_invoking_init | |||
| example.py | 612 B | ||
| creating_cached_instances | |||
| example1.py | 482 B | ||
| example2.py | 637 B | ||
| example3.py | 587 B | ||
| creating_managed_attributes | |||
| example.py | 627 B | ||
| customized_formatting | |||
| example1.py | 428 B | ||
| delegation_and_proxies | |||
| example1.py | 394 B | ||
| example2.py | 1.16 KB | ||
| example3.py | 598 B | ||
| example4.py | 382 B | ||
| extending_a_property_in_a_subclass | |||
| example.py | 1.34 KB | ||
| example2.py | 1.06 KB | ||
| extending_classes_with_mixins | |||
| example1.py | 1.8 KB | ||
| example2.py | 677 B | ||
| example3.py | 733 B | ||
| how_to_define_an_interface_or_abstract_base_class | |||
| example.py | 1.17 KB | ||
| example2.py | 358 B | ||
| how_to_define_more_than_one_constructor_in_a_class | |||
| example.py | 637 B | ||
| example2.py | 712 B | ||
| how_to_encapsulate_names_in_a_class | |||
| example.py | 552 B | ||
| implementing_a_data_model_or_type_system | |||
| example.py | 3.61 KB | ||
| example_clsdec.py | 3.83 KB | ||
| implementing_custom_containers | |||
| example1.py | 788 B | ||
| example2.py | 852 B | ||
| implementing_stateful_objects_or_state_machines | |||
| example1.py | 1.12 KB | ||
| example2.py | 1.73 KB | ||
| implementing_the_visitor_pattern | |||
| example.py | 2.71 KB | ||
| implementing_the_visitor_pattern_without_recursion | |||
| example1.py | 1.54 KB | ||
| example2.py | 1.47 KB | ||
| example3.py | 2.57 KB | ||
| node.py | 1.04 KB | ||
| lazily_computed_attributes | |||
| example1.py | 709 B | ||
| example2.py | 697 B | ||
| making_classes_support_comparison_operations | |||
| example.py | 1.84 KB | ||
| making_objects_support_the_context_manager_protocol | |||
| example1.py | 1.02 KB | ||
| example2.py | 1.34 KB | ||
| managing_memory_in_cyclic_data_structures | |||
| example.py | 769 B | ||
| simplified_initialization_of_data_structures | |||
| example1.py | 945 B | ||
| example2.py | 871 B | ||
| example3.py | 863 B | ||
| 9 | |||
| applying_decorators_to_class_and_static_methods | |||
| example.py | 866 B | ||
| avoiding_repetitive_property_methods | |||
| example1.py | 717 B | ||
| capturing_class_attribute_definition_order | |||
| example1.py | 1.67 KB | ||
| example2.py | 894 B | ||
| defining_a_decorator_that_takes_an_optional_argument | |||
| example.py | 801 B | ||
| defining_a_decorator_that_takes_arguments | |||
| example.py | 933 B | ||
| defining_a_decorator_with_user_adjustable_attributes | |||
| example1.py | 2.13 KB | ||
| example2.py | 1.27 KB | ||
| defining_a_metaclass_that_takes_optional_arguments | |||
| example.py | 761 B | ||
| defining_classes_programmatically | |||
| example1.py | 480 B | ||
| example2.py | 1.03 KB | ||
| defining_context_managers_the_easy_way | |||
| example1.py | 316 B | ||
| example2.py | 564 B | ||
| defining_decorators_as_classes | |||
| example1.py | 784 B | ||
| example2.py | 630 B | ||
| example3.py | 1.06 KB | ||
| defining_decorators_as_part_of_a_class | |||
| example1.py | 653 B | ||
| example2.py | 377 B | ||
| disassembling_python_byte_code | |||
| example.py | 754 B | ||
| enforcing_an_argument_signature | |||
| example1.py | 1.24 KB | ||
| example2.py | 1.4 KB | ||
| enforcing_coding_conventions_in_classes | |||
| example1.py | 548 B | ||
| example2.py | 1.13 KB | ||
| enforcing_type_checking_on_a_function_using_a_decorator | |||
| example.py | 1.33 KB | ||
| executing_code_with_local_side_effects | |||
| example.py | 821 B | ||
| initializing_class_members_at_definition_time | |||
| example.py | 857 B | ||
| monkeypatching_class_definitions | |||
| example.py | 541 B | ||
| multiple_dispatch_with_function_annotations | |||
| example1.py | 3.42 KB | ||
| example2.py | 1.37 KB | ||
| parsing_and_analyzing_python_source | |||
| example1.py | 800 B | ||
| namelower.py | 1.98 KB | ||
| preserving_function_metadata_when_writing_decorators | |||
| example.py | 665 B | ||
| unwrapping_a_decorator | |||
| example.py | 541 B | ||
| using_metaclasses_to_control_instance_creation | |||
| example1.py | 390 B | ||
| example2.py | 558 B | ||
| example3.py | 719 B | ||
| 10 | |||
| loading_modules_from_a_remote_machine_using_import_hooks | |||
| explicit_load.py | 606 B | ||
| metaexample.py | 291 B | ||
| pathexample.py | 303 B | ||
| testcode | |||
| fib.py | 106 B | ||
| grok | |||
| __init__.py | 27 B | ||
| blah.py | 23 B | ||
| spam.py | 65 B | ||
| urlimport.py | 7.47 KB | ||
| making_separate_directories_import_under_a_common_namespace | |||
| bar-package | |||
| spam | |||
| grok.py | 27 B | ||
| example.py | 93 B | ||
| foo-package | |||
| spam | |||
| blah.py | 27 B | ||
| monkeypatching_modules_on_import | |||
| example1.py | 175 B | ||
| example2.py | 453 B | ||
| postimport.py | 1010 B | ||
| splitting_a_module_into_multiple_files | |||
| example.py | 68 B | ||
| mymodule | |||
| __init__.py | 50 B | ||
| a.py | 62 B | ||
| b.py | 81 B | ||
| 11 | |||
| adding_ssl_to_network_servers | |||
| echoclient.py | 595 B | ||
| echoserv.py | 1.06 KB | ||
| makecerts.sh | 179 B | ||
| ssl_xmlrpc_client.py | 1.08 KB | ||
| ssl_xmlrpc_server.py | 1.38 KB | ||
| sslmixin.py | 843 B | ||
| creating_a_simple_rest_based_interface | |||
| client1.py | 202 B | ||
| example1.py | 1.22 KB | ||
| resty.py | 799 B | ||
| creating_a_tcp_server | |||
| echoclient.py | 189 B | ||
| echoserv.py | 465 B | ||
| echoserv1.py | 465 B | ||
| echoserv2.py | 507 B | ||
| echoserv3.py | 734 B | ||
| echoserv4.py | 696 B | ||
| echoserv5.py | 622 B | ||
| threadedserv.py | 685 B | ||
| creating_a_udp_server | |||
| client.py | 140 B | ||
| timeserv1.py | 451 B | ||
| timeserv2.py | 377 B | ||
| event_driven_io_explained | |||
| eventhandler.py | 865 B | ||
| tcpclient.py | 171 B | ||
| tcpserver.py | 1.72 KB | ||
| threadpool.py | 1.91 KB | ||
| thrpoolclient.py | 188 B | ||
| udpclient.py | 177 B | ||
| udpserver.py | 789 B | ||
| implementing_remote_procedure_call | |||
| jsonrpclient.py | 600 B | ||
| jsonrpcserver.py | 1.3 KB | ||
| rpcclient.py | 674 B | ||
| rpcserver.py | 1.3 KB | ||
| interacting_with_http_services_as_a_client | |||
| example1.py | 487 B | ||
| example2.py | 501 B | ||
| example3.py | 467 B | ||
| example4.py | 346 B | ||
| passing_a_socket_file_descriptor_between_processes | |||
| client1.py | 218 B | ||
| server.py | 1.07 KB | ||
| server1.py | 1.26 KB | ||
| servermp.py | 934 B | ||
| worker.py | 1.1 KB | ||
| workermp.py | 813 B | ||
| simple_authentication_of_clients | |||
| auth.py | 699 B | ||
| client.py | 275 B | ||
| server.py | 602 B | ||
| simple_communication_between_interpreters | |||
| echoclient.py | 224 B | ||
| echoserv.py | 516 B | ||
| simple_remote_procedure_call_with_xmlrpc | |||
| client.py | 240 B | ||
| keyserv.py | 825 B | ||
| zero_copy_sending_and_receiving_of_large_arrays | |||
| client.py | 238 B | ||
| server.py | 210 B | ||
| zerocopy.py | 317 B | ||
| 12 | |||
| defining_an_actor_task | |||
| actor.py | 1.44 KB | ||
| tagged.py | 541 B | ||
| worker.py | 770 B | ||
| how_to_communicate_between_threads | |||
| example1.py | 852 B | ||
| example2.py | 1.08 KB | ||
| how_to_create_a_thread_pool | |||
| example1.py | 723 B | ||
| example2.py | 897 B | ||
| example3.py | 378 B | ||
| how_to_determine_if_a_thread_has_started | |||
| example1.py | 565 B | ||
| example2.py | 1.24 KB | ||
| example3.py | 521 B | ||
| how_to_lock_critical_sections | |||
| example1.py | 1023 B | ||
| how_to_start_and_stop_threads | |||
| example.py | 467 B | ||
| implementing_publish_subscribe_messaging | |||
| exchange1.py | 1016 B | ||
| exchange2.py | 1.23 KB | ||
| launching_a_daemon_process_on_unix | |||
| daemon.py | 2.51 KB | ||
| locking_with_deadlock_avoidance | |||
| deadlock.py | 855 B | ||
| example1.py | 557 B | ||
| example2.py | 660 B | ||
| example3.py | 576 B | ||
| polling_multiple_thread_queues | |||
| pqueue.py | 1.62 KB | ||
| simple_parallel_programming | |||
| findrobots.py | 900 B | ||
| findrobots_par.py | 991 B | ||
| logs | |||
| 20121217.log.gz | 136.27 KB | ||
| 20121218.log.gz | 140.9 KB | ||
| 20121219.log.gz | 134.97 KB | ||
| 20121220.log.gz | 145.23 KB | ||
| 20121221.log.gz | 134.46 KB | ||
| 20121222.log.gz | 110.46 KB | ||
| 20121223.log.gz | 112.48 KB | ||
| 20121224.log.gz | 116.22 KB | ||
| 20121225.log.gz | 118.61 KB | ||
| 20121226.log.gz | 123.63 KB | ||
| 20121227.log.gz | 128.22 KB | ||
| 20121228.log.gz | 125.1 KB | ||
| 20121229.log.gz | 116.58 KB | ||
| 20121230.log.gz | 118.53 KB | ||
| storing_thread_specific_state | |||
| example1.py | 1.28 KB | ||
| example2.py | 1.74 KB | ||
| using_generators_as_an_alternative_to_threads | |||
| actorsched.py | 1.59 KB | ||
| netsched.py | 4.96 KB | ||
| simple.py | 1.09 KB | ||
| 13 | |||
| adding_logging_to_libraries | |||
| somelib.py | 218 B | ||
| executing_an_external_command_and_getting_its_output | |||
| example1.py | 265 B | ||
| example2.py | 338 B | ||
| finding_files | |||
| modified_within.py | 636 B | ||
| generating_a_range_of_ip_addresses_from_a_cidr_address | |||
| example.py | 802 B | ||
| getting_the_terminal_size | |||
| example.py | 92 B | ||
| making_a_stopwatch | |||
| stopwatch.py | 983 B | ||
| parsing_command_line_options | |||
| search.py | 979 B | ||
| prompting_for_a_password_at_runtime | |||
| example.py | 115 B | ||
| putting_limits_on_memory_and_cpu_usage | |||
| example.py | 459 B | ||
| reading_configuration_files | |||
| config.ini | 516 B | ||
| example1.py | 411 B | ||
| simple_logging_for_scripts | |||
| example1.py | 620 B | ||
| example2.py | 602 B | ||
| logconfig.ini | 333 B | ||
| 14 | |||
| logging_test_output_to_a_file | |||
| test.py | 1.06 KB | ||
| make_your_programs_run_faster | |||
| example.py | 748 B | ||
| profiling_and_timing_your_program | |||
| timethis.py | 475 B | ||
| raising_an_exception_in_response_to_another_exception | |||
| example.py | 1.17 KB | ||
| skipping_or_anticipating_test_failures | |||
| test.py | 610 B | ||
| testing_for_exceptional_conditions_in_unit_tests | |||
| test.py | 835 B | ||
| testing_output_sent_to_stdout | |||
| mymodule.py | 122 B | ||
| testmymodule.py | 568 B | ||
| 15 | |||
| Makefile | 70 B | ||
| accessing_c_code_using_ctypes | |||
| example.py | 239 B | ||
| sample.py | 2.14 KB | ||
| calling_python_from_c | |||
| Makefile | 108 B | ||
| embed.c | 1.88 KB | ||
| consuming_an_iterable_from_c | |||
| example.py | 157 B | ||
| sample.c | 1.02 KB | ||
| setup.py | 190 B | ||
| defining_and_exporting_c_apis_from_extension_modules | |||
| README.txt | 128 B | ||
| example.py | 80 B | ||
| ptexample.c | 1.17 KB | ||
| ptsetup.py | 277 B | ||
| pysample.c | 2.07 KB | ||
| pysample.h | 730 B | ||
| setup.py | 248 B | ||
| diagnosing_segmentation_faults | |||
| example.py | 341 B | ||
| sample.c | 689 B | ||
| setup.py | 190 B | ||
| managing_opaque_pointers_in_c_extension_modules | |||
| example.py | 141 B | ||
| pysample.c | 1.69 KB | ||
| setup.py | 248 B | ||
| passing_null_terminated_strings_to_c_libraries | |||
| example.py | 273 B | ||
| sample.c | 1.48 KB | ||
| setup.py | 190 B | ||
| passing_unicode_strings_to_c_libraries | |||
| example.py | 85 B | ||
| sample.c | 1.32 KB | ||
| setup.py | 190 B | ||
| reading_file_like_objects_from_c | |||
| example.py | 88 B | ||
| sample.c | 1.93 KB | ||
| setup.py | 190 B | ||
| sample.c | 979 B | ||
| sample.h | 279 B | ||
| turning_a_function_pointer_into_a_callable | |||
| example.py | 383 B | ||
| using_cython_to_write_high_performance_array_operations | |||
| example.py | 781 B | ||
| sample.pyx | 1.48 KB | ||
| setup.py | 289 B | ||
| working_with_c_strings_of_dubious_encoding | |||
| example.py | 71 B | ||
| sample.c | 1.57 KB | ||
| setup.py | 190 B | ||
| wrapping_c_code_with_swig | |||
| example.py | 237 B | ||
| sample.i | 1.21 KB | ||
| setup.py | 430 B | ||
| wrapping_existing_c_code_with_cython | |||
| csample.pxd | 335 B | ||
| example.py | 233 B | ||
| sample.pyx | 1.25 KB | ||
| sample_alt.pyx | 1.22 KB | ||
| setup.py | 405 B | ||
| setup_alt.py | 409 B | ||
| writing_a_simple_c_extension_module | |||
| example.py | 136 B | ||
| pysample.c | 1.51 KB | ||
| setup.py | 248 B | ||
| writing_an_extension_function_that_operates_on_arrays | |||
| example.py | 168 B | ||
| pysample.c | 1.54 KB | ||
| setup.py | 248 B |
Книги и журналы » Компьютерная литература » Программирование (книги)
Python Cookbook, 3rd edition
Год: 2013
Автор: David Beazley, Brian K. Jones
Издательство: O'Reilly Media
ISBN: 1449340377
Язык: Английский
Формат: epub, mobi, pdf
Качество: Изначально компьютерное (eBook)
Количество страниц: 706 pages
Описание: If you need help writing programs in Python 3, or want to update older Python 2 code, this book is just the ticket. Packed with practical recipes written and tested with Python 3.3, this unique cookbook is for experienced Python programmers who want to focus on modern tools and idioms.
Inside, you’ll find complete recipes for more than a dozen topics, covering the core Python language as well as tasks common to a wide variety of application domains. Each recipe contains code samples you can use in your projects right away, along with a discussion about how and why the solution works.
[spoiler="Примеры страниц"]
![]()
[/spoiler]
[spoiler="Оглавление"]
Data Structures and Algorithms
Strings and Text
Numbers, Dates, and Times
Iterators and Generators
Files and I/O
Data Encoding and Processing
Functions
Classes and Objects
Metaprogramming
Modules and Packages
Network and Web Programming
Concurrency
Utility Scripting and System Administration
Testing, Debugging, and Exceptions
C Extensions
[/spoiler]
Доп. информация: 08.06.2013 Добавлена полная книга в формате PDF, обновите торрент
В папке "python-cookbook-master" исходные коды к книге
| torrent name | size | uploader | age | seed | leech |
|---|---|---|---|---|---|
| 71.9 MB | CJDanVamme | 4 years | 6 | 1 |
All Comments