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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #62 · 4 апр.

Когда разрабатываете свой GUI с помощью PyQt для какого-либо софта бывает необходимо позаимствовать цвета из текущего стиля интерфейса. Например, чтобы правильно раскрасить свои виджеты, подогнав их по цвету. Ведь бывает, что ваш GUI используется в разных софтах. Причём некоторые со светлой темой а другие с тёмной. По умолчанию стили наследуются, но если вы задаёте какую-либо раскраску для части виджета через свой styleSheet, то требуется ссылаться на цвета текущего стиля. Как это сделать? Как получить нужный цвет из палитры имеющегося стиля? Это достаточно просто, нужно использовать класс QPalette и его роли. Например, мне нужно достать цвет текста из одного виджета и применить его в другом как цвет фона (не важно зачем именно так, просто захотелось😊). Получаем палитру виджета и сразу достаём нужный цвет, указав его роль. from PySide2.QtGui import QPalette color = main_window.palette().color(QPalette.Text) теперь можем использовать этот цвет в стилях my_widget.setStyleSheet(f'background-color: {color.name()};') Готово, мы динамически переопределили дефолтный стиль используя текущий стиль окна! На самом деле есть запись покороче, в одну строку и без лишних переменных. Не очень-то по правилам CSS, но Qt это понимает. my_widget.setStyleSheet('background-color: palette(Text);') Этот способ не подходит если вам нужно как-то модифицировать цвет перед применением в своих стилях. В этом случае потребуется первый способ. Зато он прекрасно сработает в файле .qss, то есть не придётся в коде прописывать раскраску отдельных элементов через ссылки на палитру, всё красиво сохранится в отдельном файле .qss! QListView#my_widget::item:selected { background: palette(Midlight); } Про имеющиеся роли можно почитать здесь🌍 #qt#tricks

Hashtags

Резултати

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

Пребарај: #scrapy

当前筛选 #scrapy清除筛选
djangoproject

@djangoproject · Post #453 · 02.10.2017 г., 20:18

https://medium.com/towards-data-science/using-scrapy-to-build-your-own-dataset-64ea2d7d4673 In short, #Scrapy is a framework built to build web scrapers more easily and relieve the pain of maintaining them. Basically, it allows you to focus on the data extraction using #CSS selectors and choosing XPath expressions and less on the intricate internals of how spiders are supposed to work.

Hashtags

有空多睡觉,没空少看书

@kankanshu · Post #16374 · 01.12.2025 г., 20:03

慕课网实战课-畅销3年的Python分布式爬虫课程-原版提取 #Python爬虫#分布式爬虫#Scrapy 课程基于真实电商网站,带你从零打造分布式爬虫系统,掌握Scrapy-Redis核心技术与反爬策略,附赠源码及三年持续更新内容,实战性强。 💾 获取资源请点击:👉 点我获取慕课网实战课-畅销3年的Python分布式爬虫课程-原版提取👈

GitHub Trends

@githubtrending · Post #15387 · 04.01.2026 г., 11:30

#python#crawler#feapder#feaplat#python#scrapy#spider Feapder is a simple, powerful Python web scraping framework (Python 3.6+) with four spider types for different needs, plus breakpoint resuming, monitoring alerts, browser rendering, and massive data deduplication. Install easily via pip (basic, render, or full versions), create a spider with one command, and run it to fetch/parse sites like Baidu. A management system handles deployment/scheduling. This saves you time by making scraping fast, reliable, and scalable without building everything from scratch. https://github.com/Boris-code/feapder

Repositorio data science

@repo_science · Post #3180 · 12.05.2023 г., 19:53

#webScraping#Python#Scrapy 🐍 Scrapy course - Python web scraping for beginners The Scrapy #Beginners Course will teach you everything you need to learn to start scraping websites at scale using #Python Scrapy. Topics - Creating your first #Scrapy spider - #Crawling through websites & scraping data from each page - Cleaning data with Items & Item Pipelines - Saving data to CSV files, #MySQL & #Postgres#databases - Using fake #user-agents & headers to avoid getting blocked - Using #proxies to scale up your web scraping without getting banned - Deploying your #scraper to the cloud & scheduling it to run periodically 🗣️ Joe Kearney. 🔗Link 📢#youtube ⭐️ Resources ⭐️ Course Resources - Scrapy Docs - Course Guide - Course Github - The Python Scrapy Playbook ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----

djangoproject

@djangoproject · Post #224 · 07.01.2017 г., 16:53

#AI #automated_testing #automation #asyncio #atexit #button #concurrency #Coroutines #data_mining #dropdownbox #Debian #decorators #django_cms #form #Google #Gym #intelligence #input #lists #machine_learning #map #Metaprogramming #Micro_services #monitoring #Multipart #multi_touch_apps #multiprocessing #Nodes #numerical #OAuth #package #pytest #python #requests #Requests #satellite #scrapy #scikit_learn #SciPy #searching #submit #selectbox #sessions #TensorFlow #text_boxes #text #telegram #Threads #tuples #Universe #urllib #upload

djangoproject

@djangoproject · Post #298 · 17.04.2017 г., 07:42

#AI#Artificial_Intelligence #aiohttp #API #AWS #asyncio #audio #automated_testing #automation #atexit #BeeWare #button #client #concurrency #cron #Coroutine #data_analysis #data_mining #data_processing #database #Deep_Learning #Debian #decorator #dispatch #django #dropdownbox #Docker #event #Firefox #form #freeze #functool #Generator #GeoDjango #Google #GPU #Gym #learn #Image_processing #intelligence #input #IOT #lambda #lists #machine_learning #Magenta #map #Metaprogramming #Micro_services #mind #monitoring #MongoDB #Mozilla #Multipart #multi_touch_apps #multiprocessing #Nodes #NoSQL #numeric_computation #numerical #NumPy #OAuth #object_serialization #OCR #overloading #package #parallel #pipeline #protocols #PostGIS #pyAudioAnalysis #PyInstaller #PySide #PyTorch #pytest #python #Pyvideo_archives #Qt #Redis #random #request #REST #satellite #scrapy #scikit_learn #SciPy #searching #submit #selectbox #Selenium #serialization #server #session #socket #sound #task #TensorFlow #text_boxes #text #test #telegram #Thread #transport #tuples #Universe #Unix #urllib #upload #Web

djangoproject

@djangoproject · Post #425 · 28.08.2017 г., 03:37

#AI#Artificial_Intelligence #aiohttp #AngularJS #API #AWS #asyncio #audio #automated_testing #automation #atexit #BeeWare #button #client #concurrency #Coroutine #cron #curl #data_analysis #data_mining #data_processing #database #Deep_Learning #Debian #decorator #dict #dispatch #django #django_cms #dropdownbox #Docker #event #Firefox #form #Generator #GeoDjango #git #Google #GPU #Gym #learn #Image_processing #intelligence #input #IOT #lambda #learn #lists #machine_learning #Magenta #map #Metaprogramming #Micro_services #mind #monitoring #MongoDB #Mozilla #Multipart #multi_touch_apps #multiprocessing #Nodes #NoSQL #numeric_computation #numerical #NumPy #OAuth #object_serialization #OCR #overloading #package #parallel #pipeline #protocols #PostGIS #pyAudioAnalysis #pycon #Pyflakes #PyInstaller #PySide #PyTorch #pytest #python #Pyvideo_archives #Qt #React #Redis #random #request #REST #satellite #scrapy #scikit_learn #SciPy #searching #submit #selectbox #Selenium #serialization #server #socket #task #telegram #TensorFlow #test #text_boxes #text #tuples #unicode #Universe #Unix #urllib #upload #Web

djangoproject

@djangoproject · Post #513 · 30.11.2017 г., 22:00

#AI#Artificial_Intelligence #AJAX #aiohttp #Anaconda #AngularJS #API #Atom #AWS #asyncio (#Asynchronous) #audio #automated_testing #automation #atexit #BeeWare #Big_Data #bitcoin #blockchain #Bluemix #Brython #button #Celery #client #class #classmethod #concurrency #Coroutine #cron #CSS #curl #data_analysis #data_mining #data_processing #database #Deep_Learning#deep_learning #Debian #decorator #deploy #dict #dispatch #django #django_cms #Django_REST_Framework #dropdownbox #Docker #event #Firefox #Flask #form #functions #Generator #GeoDjango #git #Google #GPU #GUI #Gym #host #HTML #httplib #learn #Image_processing #intelligence #input #Instagram #IOT #iPython #Jupyter #lambda #learn #License #Linux #lists #machine_learning #Magenta #map #Matplotlib #Metaprogramming #Micro_services #Micropython #mind #monitoring #MongoDB #modules #Mozilla #Multipart #multi_touch_apps #multiprocessing #Nodes #NoSQL #numeric_computation #numerical #NumPy #network #neural_network #OAuth #object_serialization #OCR #overloading #package #parallel #pipeline #protocols #PostGIS #pyAudioAnalysis #pycon #Pyflakes #PyInstaller #PyPI #PyQt #PySide #PyTorch #pytest #python #Pyvideo_archives #Qt #Raspberry_Pi #React #Redis #random #request #Regular_Expressions (#re) #REST #RSS #satellite #scikit_learn #SciPy #scrapy #searching #selectbox #Selenium #serialization #server #sessions #single_responsibility_principle #socket #Spark #str #submit #task #telegram #template #TensorFlow #test #text_boxes #text #tuples #unicode #Universe #Unix #unit_test #urllib #upload #uWSGI #Web #WSGI