Автоматическое форматирование Python кода с помощью Black
Сегодня мы расскажем вам о незаменимом инструменте для поддержания структуры и читаемости вашего Python кода - Black. Black - это автоматический форматтер кода, который помогает вам избавиться от несогласованных стилей и выравнивает ваш код согласно официальным рекомендациям PEP 8.
Что такое Black?
Black - это инструмент для автоматического форматирования Python кода, разработанный с учетом строгих принципов. Он призван обеспечить единообразие в структуре кода и упростить его чтение для всех участников проекта.
Преимущества использования Black:
- Единообразие: Black гарантирует, что ваш код будет соответствовать стандартам PEP 8, что делает его более читаемым и понятным.
- Автоматизация:Black автоматически форматирует код, что позволяет избежать рутинных задач по выравниванию и форматированию.
- Интеграция:Black легко интегрируется в ваш рабочий процесс с помощью популярных инструментов разработки, таких как VSCode, PyCharm и других.
- Кастомизация: Вы можете настроить некоторые параметры Black, чтобы адаптировать его к вашим потребностям.
Как использовать Black?
Для начала, установите Black с помощью pip:
pip install black
Затем, вы можете использовать Black для форматирования вашего кода следующим образом:
black your_python_file.py
Black автоматически примет ваш код и приведет его к согласованному стилю. Вы также можете настроить некоторые аспекты форматирования, чтобы сделать его идеально подходящим для вашего проекта.
#python#Black#форматирование#код#PEP8
How Did Toni Morrison Become Our National Archetype?
🔠🅰️🔠🔠1️⃣
There are many ways to be difficult in this world. You can be demanding, inconvenient, stubborn, complicated, troublesome, baffling, illegible.
Black womanhood is one place where all these forms of difficulty overlap. I feel like I have always known this; I have been called difficult more times in my life than I can count.
But I only began to understand – to discover the meanings and uses of – my own difficulty because of Toni Morrison.
Morrison has shaped the way we think about everything from literature to politics, criticism to ethics, to the responsibilities of making art.
In 1993 she became the only black woman ever to win the Nobel prize in literature. But the facts remain: she is difficult to read. She is difficult to teach.
Notwithstanding the voluminous train of profiles, reviews and scholarly analysis that she drags behind her, she is difficult to write about.
More to the point, she is our only truly canonical black female writer – and her work is highly complex.
In a 1981 Vogue profile, Morrison spoke of a reader who had “told her how difficult it was to understand black culture in her books – it was so removed from his experience”.
She had responded: “Boy, you must have had a hell of a time with Beowulf!” The Vogue interviewer, missing the wit in this retort, commented:
“Morrison has no patience with people who plead ignorance; but then, she does not pride herself on being a patient woman. ‘I find myself being more and more difficult,’ she says. ‘It’s something I really relish.’”
Morrison’s literary difficulty was often translated this way into a personal difficulty, a moral failing: How dare she be impatient! Well, wouldn’t you be?
One reason for Morrison’s air of pique was surely the strain of trying to balance the demands of multiple careers simultaneously. She was an editor, a professor, a writer, a critic and a public intellectual.
I have worked in these fields as well, so I know that extending many branches can be a way of distracting yourself from the core vocation.
The commitment to writing over all else is often viewed as selfish; when gender is factored into the equation, the charge can carry the stigma of illegitimacy.
“For a woman to say, ‘I am a writer’ is difficult,” Morrison noted succinctly.
Morrison’s childhood stories read like photo negatives of the standard American race narratives.
She struggled to accommodate these forms of often underpaid literary labour with the unpaid domestic labour of raising two sons as a single mother:
“It was very difficult writing and rearing children because they deserve all your time, and you don’t have it.”
This occupational difficulty was exacerbated not only by the fact that she was unique in her fields but also by the fact that she often wilfully chose to go it alone.
For example, she didn’t tell anyone at her first job in trade publishing that she was writing a novel until The Bluest Eye came out at another house.
As troublesome as difficulty may have been for her professionally, Morrison genuinely delighted in the difficulty of other black women artists, such as the novelist Gayl Jones, whose works she edited and published, and the jazz pianist and composer Mary Lou Williams.
For Morrison, the fact that they were considered difficult was a sign that they had insisted on their art being taken seriously.
To read Morrison herself with the seriousness that she deserves requires that we account for the knot – or bind – of gender and race she shared with them. It is not an easy one to untangle.
As Morrison wrote in a 1971 New York Times op-ed about feminism, “one must look very closely at the black woman herself – a difficult, inevitably doomed proposition, for if anything is true of black women, it is how consistently they have (deliberately, I suspect) defied classification”.
#toni#morrison#zambia#nobel#prize#black#narratives
📱American Оbserver - Stay up to date on all important events
🇺🇸
👩💻StackOverflow's 2019 Developer Survey Results👨💻
This year, nearly 90,000 developers took the survey. Here are some key results:
- For the 7th year in a row, #JavaScript is the most commonly used programming language, but #Python has risen in the ranks again.
- Over half of respondents had written their first line of code by the time they were 16, although this experience varies by country & by gender.
- Respondents were asked to think about the last time they solved coding problems with & without #StackOverflow. The data indicate that Stack Overflow saves a developer 30 to 90 minutes of time per week!
- About 65% of professional developers on Stack Overflow contribute to #OpenSource projects once a year or more.
- #Reddit & #YouTube were the most common answers to what social media site they use the most. (No #Telegram in the list! Wtf, StackOverflow!?)
🔗 Read more here.
🚀@PerspectiveIX
#вакансия#vacancy#job#python#AI#ML#datascientist
Вакансия: Senior Python Data Scientist (FinTech)
Компания: Paynocchio
Занятость: Фулл-тайм/Парт-тайм
Локация: Удаленно
Вознаграждение: От 500 000 рублей
Уровень компетенций: Senior
Контакты для связи:@YuliaValiulina
Paynocchio — FinTech стартап. Наш продукт — это сложная технологическая платформа на базе AI, которая включает в себя платежный шлюз, кошелёк, карты лояльности, карты кешбэка и многое другое.
На текущий момент мы на стадии финального тестирования и запуска продукта на рынок Сингапура в сегменте B2B.
Сейчас перед нами стоит стратегически важная миссия — разработать внутреннюю платформу на базе искусственного интеллекта для генерации документов и решения различных продуктовых и аналитических задач.
📌С чем предстоит работать:
- Определить платформу и реализовать скрипт взаимодействия с этой системой, используя наш веб-шлюз и наши серверные мощности.
- Разработать авторизационную панель для работы с системой внутри компании Paynocchio.
- Описать скрипт для взаимодействия с искусственным интеллектом.
- Загрузка критериев модели поведения и работы с нашими решениями, а также всей информации для качественного ответа и сгенерированных документов.
- Реализация ролевой системы для выполнения узконаправленных запросов на генерацию документа, текста, схемы или иного решения.
- Обеспечить безопасность входных и выходных данных.
- Реализация методов загрузки datasets для дальнейшего обучения модели.
📌Что мы ждем от тебя:
- Опыт работы на позиции не менее 4 лет.
- Глубокие знания Python, включая современные подходы к написанию и поддержке кода.
- Опыт работы с библиотеками и фреймворками для машинного обучения (например: TensorFlow, PyTorch или Hugging Face Transformers).
- Опыт работы с API для интеграции моделей ИИ (OpenAI API, OpenAI SDK или Copilot API).
- Опыт в разработке систем обработки естественного языка (NLP).
- Понимание работы языковых моделей (LLM), принципов их обучения и применения.
- Опыт предобработки текста, извлечения данных и анализа текстовой информации.
- Умение работать с различными источниками данных и форматами документов (CSV, JSON, XML, PDF).
- Гражданство РФ.
- Уровень английского не ниже B2.
📌Что мы предлагаем:
- Конкурентоспособная заработная плата (ориентируемся на твои зарплатные ожидания).
- Полностью удаленный формат работы. Можешь выбрать любую удобную для себя локацию.
- Рассматриваем как фулл-тайм сотрудничество на постоянной основе, так и парт-тайм.
- Работа по американскому календарю, но по часовому поясу МСК.
- Оформление: ГПХ (РФ), ИП (РФ).
- Полностью оплачиваемые отпуска и больничные.
- Выплата вознаграждения в рублях, на карту любого банка РФ.
Если наш продукт тебе откликается, направляй свое CV мне в Телеграм. Я с радостью с тобой пообщаюсь и отвечу на все интересующие вопросы.