<commit_before>.. meta::
    :description lang=en: Collect useful snippets of Python socket
    :keywords: Python, Python3, Python Socket, Python Socket Cheat Sheet

======
Socket
======

.. contents:: Table of Contents
    :backlinks: none


Get Hostname
------------
<commit_msg>add a description about socket<commit_after>.. meta::
    :description lang=en: Collect useful snippets of Python socket
    :keywords: Python, Python3, Python Socket, Python Socket Cheat Sheet

======
Socket
======

Socket programming is inevitable for most programmers even though Python
provides much high-level networking interface such as httplib, urllib, imaplib,
telnetlib and so on. Some Unix-Like system’s interfaces were called through
socket interface, e.g., Netlink, Kernel cryptography. To temper a pain to read
long-winded documents or source code, this cheat sheet tries to collect some
common or uncommon snippets which are related to low-level socket programming.

.. contents:: Table of Contents
    :backlinks: none

Get Hostname
------------

{'fraction_non_alphanumeric': 0.10258868648130393, 'fraction_numerical': 0.0019175455417066154, 'mean_word_length': 4.019230769230769, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4011634', 'n_tokens_mistral': 286, 'n_tokens_neox': 266, 'n_words': 126}