This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Developed by MikyPo | |
| # More code for DA here: https://dzen.ru/mikypo | |
| # Импорт библиотек | |
| import os | |
| import requests | |
| from datetime import datetime, timedelta, timezone | |
| import time | |
| import json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections import deque | |
| import sys | |
| sys.setrecursionlimit(10000) | |
| class Solitaire: | |
| def __init__(self): | |
| # Определяем валидные позиции на поле 7x7 | |
| self.valid_positions = [ | |
| (0, 2), (0, 3), (0, 4), | |
| (1, 2), (1, 3), (1, 4), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Developed by MikyPo | |
| # More code for DA here: https://dzen.ru/mikypo | |
| # === 1. 📥 Импорт библиотек | |
| import locale | |
| import os | |
| import pandas as pd | |
| import requests | |
| from datetime import datetime, timedelta | |
| from dotenv import load_dotenv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Developed by MikyPo | |
| # More code for DA here: https://dzen.ru/mikypo | |
| # Установка необходимых библиотек | |
| !pip install -q diffusers accelerate transformers pillow safetensors | |
| # Импорт библиотеки torch | |
| import torch | |
| # Проверяем доступность CUDA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Developed by MikyPo | |
| # More code for DA here: https://dzen.ru/mikypo | |
| # Импорт библиотек | |
| import pandas as pd | |
| import numpy as np | |
| import openpyxl | |
| import plotly.express as px | |
| import plotly.graph_objects as go | |
| import warnings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Developed by MikyPo | |
| # More code for DA here: https://dzen.ru/mikypo | |
| # Импорт нужных библиотек | |
| import duckdb | |
| import pandas as pd | |
| import numpy as np | |
| # Для вывода подсвеченного кода SQL | |
| from rich.console import Console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Developed by MikyPo | |
| # More code for DA here: https://dzen.ru/mikypo | |
| """ | |
| Подключение к БД PostgreSQL на Railway hosting | |
| """ | |
| !pip install psycopg2-binary --quiet # Ставим psycopg, если ещё не установлено | |
| # 1. Ставим нужные библиотеки | |
| import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from openpyxl import load_workbook | |
| from tqdm import tqdm | |
| # Путь к файлу | |
| filename = 'data.xlsx' | |
| # Загружаем книгу | |
| wb = load_workbook(filename, read_only=True) | |
| # Возвращает активный (выбранный по умолчанию) лист Excel-файла, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import base64 | |
| import json | |
| import os | |
| import requests | |
| import time | |
| from io import BytesIO | |
| from dotenv import load_dotenv | |
| from IPython.display import display, Image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| import numpy as np | |
| from tqdm import tqdm | |
| # 1. Генерация тестовой таблицы (1 000 000 строк) | |
| def generate_test_data(rows=1000000): | |
| data = { | |
| 'id': np.arange(1, rows+1), | |
| 'value': np.random.rand(rows) * 100, | |
| 'category': np.random.choice(['A', 'B', 'C', 'D'], size=rows) |
NewerOlder