Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Game Catch on Python
Игра фейковая викторина на Python.
import random
import tkinter
# Create the main window
window = tkinter.Tk()
window.title("Catch me if you can")
# Create a canvas inside the main window
canvas = tkinter.Canvas(window, width=800, height=600, bg="Light Blue")
canvas.pack(fill=tkinter.BOTH, expand=True)
# Create a label and place it at the top center of the canvas
label = tkinter.Label(canvas, text="Are you a loser?", font=('consolas', 40), bg='lightblue')
label.place(relx=0.5, rely=0.1, anchor=tkinter.CENTER)
# Function called when "yes" button is clicked
def catchme():
button.config(text="then catch me if you can :)", font=('consolas', 40), command=teleport)
# Function called when "no" button is clicked
def for_real():
yes.config(text="I knew")
# Function to teleport the "no" button to a random position
def teleport():
button.place(x=random.randint(0, 100), y=random.randint(0, 100))
button.config(text="no", command=catchme)
button.config(bg=random.choice(["red", "blue", "green", "yellow", "pink"]))
# Create the "yes" button, set its appearance, and place it at a specific position on the canvas
yes = tkinter.Button(canvas, text="yes", font=('consolas', 40), command=for_real)
yes.place(relx=0.3, rely=0.8, anchor=tkinter.CENTER)
# Create the "no" button, set its aёppearance, and place it at a specific position on the canvas
button = tkinter.Button(canvas, text="no", font=('consolas', 40), command=teleport)
button.place(relx=0.7, rely=0.8, anchor=tkinter.CENTER)
# Start the main event loop
window.mainloop()
📌
10 лучших библиотек Python для создания графического интерфейса в 2024 году
@pythonlPlease open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Пример парсинга таблицы с веб-сайта с помощью Python.
@pythonl
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Habr: https://habr.com/ru/articles/783766/
Видео: https://www.youtube.com/watch?v=6Pk4OgdNxXQ
@pythonl
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
class difflib.SequenceMatcher:
This module provides classes and functions for comparing sequences.
Этот модуль предоставляет классы и функции для сравнения последовательностей. Он может быть использован, например, для сравнения файлов и может выдавать информацию о различиях в файлах в различных форматах, включая HTML, контекстные и унифицированные диффы. Для сравнения каталогов и файлов см. также модуль filecmp.
https://docs.python.org/3/library/difflib.html
@pythonlPlease open Telegram to view this post
VIEW IN TELEGRAM
💼 Y'ORG
Y'ORG объединяет большин языковые модель с Jupyter Notebook для выполнения различных задач.
Цель Y'ORG - предоставить удобный интерактивный способ (1) изучения кода, (2) составления планов и задач для работы, (3) написания кода и добавления новых функций. Он также помогает ученым и аналитикам (4) проводить анализ данных и (5) создавать полноценные отчеты.
▪ Github
@pythonl
Y'ORG объединяет большин языковые модель с Jupyter Notebook для выполнения различных задач.
Цель Y'ORG - предоставить удобный интерактивный способ (1) изучения кода, (2) составления планов и задач для работы, (3) написания кода и добавления новых функций. Он также помогает ученым и аналитикам (4) проводить анализ данных и (5) создавать полноценные отчеты.
▪ Github
@pythonl
__init__()
and __repr__()
to user-defined classes.Вы уже пробовали использовать dataclass в Python?
Декоратор dataclass автоматически добавляет сгенерированные специальные методы, такие как
`__init__()` и `__repr__()
` в ваши классы.@pythonl
Please open Telegram to view this post
VIEW IN TELEGRAM
Python предоставляет вам возможность создавать пулы процессов. Вы можете создавать их с помощью модуля Python `
threading
` или модуля `concurrent.futures
`.Модуль `
concurrent.futures
` оборачивает и потоки, и многопроцессорность, что делает их интерфейсы еще более приятными.@pythonl
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
beginners_python_cheat_sheet_pcc_all.pdf
741 KB
Обновленные версии большой Python Шпаргалки.
@pythonl
Please open Telegram to view this post
VIEW IN TELEGRAM
This media is not supported in your browser
VIEW IN TELEGRAM
🧑✈️ GPT PILOT
It's a dev tool that writes scalable apps from scratch.
Только что открыл для себя GPT Pilot. На Github у него почти 20 тысяч звезд.
Это инструмент для разработчиков, который пишет масштабируемые приложения с нуля.
Просто опишите свое приложение, и GPT Pilot сделает следующее:
1. Задаст правильные вопросы
2. Создаст продукт и технические требования
3. Настроит среду
4. Поможет написать приложение шаг за шагом.
Вам остается только проверять готовый код.
▪Github
@pythonl
It's a dev tool that writes scalable apps from scratch.
Только что открыл для себя GPT Pilot. На Github у него почти 20 тысяч звезд.
Это инструмент для разработчиков, который пишет масштабируемые приложения с нуля.
Просто опишите свое приложение, и GPT Pilot сделает следующее:
1. Задаст правильные вопросы
2. Создаст продукт и технические требования
3. Настроит среду
4. Поможет написать приложение шаг за шагом.
Вам остается только проверять готовый код.
▪Github
@pythonl
📢 Introducing CRUXEval, a benchmark to measure Python code execution!
CRUXEval - это новый бенчмарк, состоящий из 800 функций Python для тестирования кода.
🖥 Github: https://github.com/facebookresearch/cruxeval
🏠Homepage: https://crux-eval.github.io
📜Paper: http://crux-eval.github.io/paper/cruxeval.pdf
🏆Leaderboard: https://crux-eval.github.io/leaderboard.html
🔎Sample Explorer: https://crux-eval.github.io/demo.html
📊HF Dataset: https://huggingface.co/datasets/cruxeval-org/cruxeval
@pythonl
CRUXEval - это новый бенчмарк, состоящий из 800 функций Python для тестирования кода.
🏠Homepage: https://crux-eval.github.io
📜Paper: http://crux-eval.github.io/paper/cruxeval.pdf
🏆Leaderboard: https://crux-eval.github.io/leaderboard.html
🔎Sample Explorer: https://crux-eval.github.io/demo.html
📊HF Dataset: https://huggingface.co/datasets/cruxeval-org/cruxeval
@pythonl
Please open Telegram to view this post
VIEW IN TELEGRAM