TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #169 · 21 окт.

А знаете ли вы, что в Bash есть особая переменная "$_" ? Из описания можно узнать, что в переменную "$_" помещается последний аргумент последней команды. Что-то знакомое? Конечно, в Python есть примерно тоже самое. Мы знаем, что дата первого релиза Bash (8 июня 1989) несколько раньше чем первый релиз Python (20 февраля 1991). Если учесть, что по задумке автора Python это агрегация самых успешных практик отовсюду, можно ли сказать что именно эта фишка к нему пришла из Bash? Ни подтверждения ни опровержения я пока не нашел. Давайте просто считать это совпадением 😉 А как это может быть полезно в Bash? Приведу простой пример, который оценят те, кто часто работает в терминале. Допустим, нам надо создать директорию и зайти в неё. Что обычно делаем? :~$ mkdir foldername :~$ cd foldername :~/foldername$ Как это сделать в одну команду? :~$ mkdir foldername && cd foldername :~/foldername$ Уже лучше, но хочется короче, без повторов. Вот тут и пригодится наша переменная. Напомню, что в неё сохраняется последний аргумент предыдущей команды. :~$ mkdir foldername && cd $_ :~/foldername$ _________________ PS. Символы "&&"" разделяют команды и означают, что требуется выполнить вторую команду только если первая завершилась успешно. #linux#tricks

Резултати

Пронајдени 6 слични објави

Пребарај: #servers

当前筛选 #servers清除筛选
djangoproject

@djangoproject · Post #196 · 28.11.2016 г., 03:42

http://asyncio.readthedocs.io/en/latest/webscraper.html #Web#scraping means downloading multiple web pages, often from different #servers. Typically, there is a considerable waiting time between sending a request and receiving the answer. Using a client that always waits for the server to answer before sending the next request, can lead to spending most of time waiting. Here asyncio can help to send many requests without waiting for a response and collecting the answers later. The following examples show how a synchronous client spends most of the time waiting and how to use asyncio to write asynchronous client that can handle many requests concurrently.

djangoproject

@djangoproject · Post #327 · 30.04.2017 г., 01:28

https://www.tutorialspoint.com/python/python_networking.htm Python provides two levels of access to network services. At a low level, you can access the basic #socket support in the underlying operating system, which allows you to implement #clients and #servers for both connection-oriented and connectionless protocols.

djangoproject

@djangoproject · Post #559 · 25.01.2018 г., 09:12

https://github.com/mehrdadrad/pubdns pubdns is a library for python to have more than 28K public #dns#servers from 190+ countries at your #python script. it works based on the public-dns.info collected data and there is a wrapper based on the dnspython to resolve all type of dns records through these public dns server smoothly. #imp

djangoproject

@djangoproject · Post #463 · 10.10.2017 г., 14:08

https://uwsgi-docs.readthedocs.io/en/latest/ The uWSGI project The #uWSGI project aims at developing a full stack for building #hosting services. Application #servers (for various programming languages and protocols), proxies, process managers and monitors are all implemented using a common #api and a common configuration style. #python

djangoproject

@djangoproject · Post #437 · 11.09.2017 г., 19:13

https://httpie.org/ #HTTPie consists of a single http command designed for painless debugging and interaction with HTTP #servers, #RESTful#APIs, and web services: Sensible defaults Expressive and intuitive command syntax Colorized and formatted terminal output Built-in JSON support Persistent sessions Forms and file uploads HTTPS, proxies, and authentication support Support for arbitrary request data and headers Wget-like downloads Extensions Linux, Mac OSX, and Windows support And more…

GitHub Trends

@githubtrending · Post #15116 · 03.09.2025 г., 12:00

#other#ai#anthropic_claude#awesome#context#mcp#model_context_protocol#servers#tool_use#tools Model Context Protocol (MCP) is an open standard that lets AI models securely connect to various data sources and tools, like files, databases, APIs, and cloud services, to get real-time, relevant information. This helps AI give more accurate, up-to-date, and context-aware answers, reducing repeated data processing and improving efficiency. MCP also supports automation of complex workflows and integration with many platforms, making AI more powerful and flexible. However, running MCP servers requires careful security measures to avoid risks like unauthorized code execution. Using MCP can save time, reduce costs, and enhance AI capabilities for tasks like chatbots, data analysis, and system control. https://github.com/appcypher/awesome-mcp-servers