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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #421 · 23 мар.

Мы используем Makefile думая, что нет альтернатив, что это стандарт и всё такое. Но make это не запускалка команд, а система сборки. Мы фактически используем его не по назначению. И на самом деле альтернатива есть! Некоторое время назад я открыл для себя прекрасный инструмент - just. Он решает все проблемы make. just - это не система сборки как make, это именно исполнитель команд! Больше никаких Phony Targets и табуляций, привет нормальный синтаксис и передача аргументов!!! 😎 ⭐️Что умеет just: ✅ Автодокументирование команд Не нужно делать отдельную команду с докой, просто добавь комментарий # команда сборки build: ... $ just --list Available recipes: build # команда сборки Команда с именем default запускается по умолчанию если не указано другое, так что я обычно делаю так: default: just --list Теперь просто выполняем just и получаем доку из текущего файла. ✅ Удобная работа с переменными окружения # загрузить из .env set dotenv-load # глобальная переменная export PYTHONPATH := "./src" # переменная для команды test $TESTUNG="true": pytest ✅ Передача аргументов build target: @echo 'Build {{target}}...' команда запуска $ just build dev # Build dev... ✅ Выбор интерпретатора прямо в команде Пример с инлайн-скриптом на python: system: #!/usr/bin/env python3 import platform print(platform.system()) Эта же функция позволит выполнить скрипт как одну команду вместо перезапуска шела для каждой строки foo: #!/usr/bin/env sh for file in ls .; do echo $file done ✅ Выполнение команды в определенной директории. Можно указать как релятивный путь так и абсолютный [working-directory: 'backend'] build: docker compose build Также можно задать рабочую директорию глобально Там еще много интересного: - поддержка функций - автокомплиты и интеграции - экспрешены - алиасы команд - группировка команд - альтернативы команды под разные ОС - импорт других just-файлов - цветной вывод - ... и другие штуковины! Так что вперёд - ➡️ читать доку! Репозиторий: ➡️https://github.com/casey/just Статья: ➡️https://www.chicks.net/reference/file_formats/just/ ЗЫ. Кажется, на Makefile я уже не вернусь) #tools

Hashtags

Резултати

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

Пребарај: #truewisdom

当前筛选 #truewisdom清除筛选
1 English learning materials

@englishmeta1 · Post #250 · 26.06.2024 г., 10:40

Question ppl ask me often How can I improve my writing skills? Here is my reply Improving your writing skills is a valuable endeavor that can benefit you in many areas of life. Here are several strategies you can use to become a better writer: 1. Read Regularly: - Diverse Materials: Read a variety of genres, including fiction, non-fiction, journalism, and academic papers. This exposes you to different styles and vocabularies. - Analyzing: Pay attention to how authors construct sentences, develop ideas, and build arguments. Reflect on what makes their writing effective or ineffective. 2. Write Daily: - Journaling: Keep a daily journal to practice writing regularly. It doesn’t have to be formal; the goal is to make writing a habit. - Prompts: Use writing prompts to challenge yourself and spark creativity. Websites and books often offer daily prompts. 3. Learn the Basics: - Grammar and Syntax: Brush up on grammar and syntax rules. Resources like "The Elements of Style" by Strunk and White can be very useful. - Vocabulary: Expand your vocabulary through reading and using tools like a thesaurus. 4. Seek Feedback: - Peer Review: Share your writing with friends, colleagues, or writing groups to get constructive feedback. - Professional Feedback: Consider hiring a writing coach or taking a writing course. 5. Revise and Edit: - Multiple Drafts: Don’t be afraid to write multiple drafts. Revision is a crucial part of the writing process. - Editing: Learn to edit your work critically. Look for clarity, coherence, conciseness, and correctness. 6. Study Writing Techniques: - Workshops and Courses: Enroll in writing workshops or online courses. Websites like Coursera, Udemy, and edX offer courses on various aspects of writing. - Books on Writing: Read books about writing, such as "On Writing" by Stephen King or "Bird by Bird" by Anne Lamott. 7. Practice Different Styles: - Genres: Experiment with different genres (e.g., poetry, essays, short stories, technical writing) to find your strengths and preferences. - Perspectives: Write from different perspectives and in various voices to develop versatility. 8. Use Writing Tools: - Software: Use tools like Grammarly, Hemingway Editor, or ProWritingAid to help with grammar and style. - Outlining: Use outlining tools to organize your thoughts before you start writing. 9. Stay Motivated: - Set Goals: Set specific, achievable writing goals (e.g., write 500 words a day, complete a short story in a month). - Celebrate Progress: Acknowledge and celebrate your progress to stay motivated. 10. Read Aloud: - Hearing Your Writing: Reading your work aloud can help you catch errors and awkward phrasing that you might miss when reading silently. Improving your writing skills is a continuous process, and persistence is key. By integrating these strategies into your routine, you'll gradually become a more confident and effective writer. #sirjimmy#teamjimmy#writingskills#englishmadeeasy#truewisdom

English With Natives*

@sirjimmy · Post #31107 · 26.06.2024 г., 08:19

Question ppl ask me often How can I improve my writing skills? Here is my reply Improving your writing skills is a valuable endeavor that can benefit you in many areas of life. Here are several strategies you can use to become a better writer: 1. Read Regularly: - Diverse Materials: Read a variety of genres, including fiction, non-fiction, journalism, and academic papers. This exposes you to different styles and vocabularies. - Analyzing: Pay attention to how authors construct sentences, develop ideas, and build arguments. Reflect on what makes their writing effective or ineffective. 2. Write Daily: - Journaling: Keep a daily journal to practice writing regularly. It doesn’t have to be formal; the goal is to make writing a habit. - Prompts: Use writing prompts to challenge yourself and spark creativity. Websites and books often offer daily prompts. 3. Learn the Basics: - Grammar and Syntax: Brush up on grammar and syntax rules. Resources like "The Elements of Style" by Strunk and White can be very useful. - Vocabulary: Expand your vocabulary through reading and using tools like a thesaurus. 4. Seek Feedback: - Peer Review: Share your writing with friends, colleagues, or writing groups to get constructive feedback. - Professional Feedback: Consider hiring a writing coach or taking a writing course. 5. Revise and Edit: - Multiple Drafts: Don’t be afraid to write multiple drafts. Revision is a crucial part of the writing process. - Editing: Learn to edit your work critically. Look for clarity, coherence, conciseness, and correctness. 6. Study Writing Techniques: - Workshops and Courses: Enroll in writing workshops or online courses. Websites like Coursera, Udemy, and edX offer courses on various aspects of writing. - Books on Writing: Read books about writing, such as "On Writing" by Stephen King or "Bird by Bird" by Anne Lamott. 7. Practice Different Styles: - Genres: Experiment with different genres (e.g., poetry, essays, short stories, technical writing) to find your strengths and preferences. - Perspectives: Write from different perspectives and in various voices to develop versatility. 8. Use Writing Tools: - Software: Use tools like Grammarly, Hemingway Editor, or ProWritingAid to help with grammar and style. - Outlining: Use outlining tools to organize your thoughts before you start writing. 9. Stay Motivated: - Set Goals: Set specific, achievable writing goals (e.g., write 500 words a day, complete a short story in a month). - Celebrate Progress: Acknowledge and celebrate your progress to stay motivated. 10. Read Aloud: - Hearing Your Writing: Reading your work aloud can help you catch errors and awkward phrasing that you might miss when reading silently. Improving your writing skills is a continuous process, and persistence is key. By integrating these strategies into your routine, you'll gradually become a more confident and effective writer. #sirjimmy#teamjimmy#writingskills#englishmadeeasy#truewisdom