Python
Soledad Galli, Christoph Molnar
Streamline data preprocessing and feature engineering in your machine learning project with this third edition of the Python Feature Engineering Cookbook to make your data preparation more efficient.This guide addresses common challenges, such as imputing missing values and encoding categorical variables using practical solutions and open source Python libraries. You’ll learn advanced techniques for transforming numerical variables, discretizing variables, and dealing with outliers. Each chapter offers step-by-step instructions and real-world examples, helping you understand when and how to apply various transformations for well-prepared data.The book explores feature extraction from complex data types such as dates, times, and text. You’ll see how to create new features through mathematical operations and decision trees and use advanced tools like Featuretools and tsfresh to extract features from relational data and time series.By the end, you’ll be ready to build reproducible feature engineering pipelines that can be easily deployed into production, optimizing data preprocessing workflows and enhancing machine learning model performance.
Soledad Galli
Feature engineering is invaluable for developing and enriching your machine learning models. In this cookbook, you will work with the best tools to streamline your feature engineering pipelines and techniques and simplify and improve the quality of your code.Using Python libraries such as pandas, scikit-learn, Featuretools, and Feature-engine, you’ll learn how to work with both continuous and discrete datasets and be able to transform features from unstructured datasets. You will develop the skills necessary to select the best features as well as the most suitable extraction techniques. This book will cover Python recipes that will help you automate feature engineering to simplify complex processes. You’ll also get to grips with different feature engineering strategies, such as the box-cox transform, power transform, and log transform across machine learning, reinforcement learning, and natural language processing (NLP) domains.By the end of this book, you’ll have discovered tips and practical solutions to all of your feature engineering problems.
Jason Strimpel
Discover how Python has made algorithmic trading accessible to non-professionals with unparalleled expertise and practical insights from Jason Strimpel, founder of PyQuant News and a seasoned professional with global experience in trading and risk management. This book guides you through from the basics of quantitative finance and data acquisition to advanced stages of backtesting and live trading.Detailed recipes will help you leverage the cutting-edge OpenBB SDK to gather freely available data for stocks, options, and futures, and build your own research environment using lightning-fast storage techniques like SQLite, HDF5, and ArcticDB. This book shows you how to use SciPy and statsmodels to identify alpha factors and hedge risk, and construct momentum and mean-reversion factors. You’ll optimize strategy parameters with walk-forward optimization using VectorBT and construct a production-ready backtest using Zipline Reloaded. Implementing all that you’ve learned, you’ll set up and deploy your algorithmic trading strategies in a live trading environment using the Interactive Brokers API, allowing you to stream tick-level data, submit orders, and retrieve portfolio details.By the end of this algorithmic trading book, you'll not only have grasped the essential concepts but also the practical skills needed to implement and execute sophisticated trading strategies using Python.
Silas Toms, Bill Parker, Dr. Christopher Tucker,...
Integrating Python into your day-to-day ArcGIS work is highly recommended when dealing with large amounts of geospatial data. Python for ArcGIS Pro aims to help you get your work done faster, with greater repeatability and higher confidence in your results.Starting from programming basics and building in complexity, two experienced ArcGIS professionals-turned-Python programmers teach you how to incorporate scripting at each step: automating the production of maps for print, managing data between ArcGIS Pro and ArcGIS Online, creating custom script tools for sharing, and then running data analysis and visualization on top of the ArcGIS geospatial library, all using Python.You’ll use ArcGIS Pro Notebooks to explore and analyze geospatial data, and write data engineering scripts to manage ongoing data processing and data transfers. This exercise-based book also includes three rich real-world case studies, giving you an opportunity to apply and extend the concepts you studied earlier.Irrespective of your expertise level with Esri software or the Python language, you’ll benefit from this book’s hands-on approach, which takes you through the major uses of Python for ArcGIS Pro to boost your ArcGIS productivity.
Eryk Lewinson
Python is one of the most popular programming languages used in the financial industry, with a huge set of accompanying libraries. In this book, you'll cover different ways of downloading financial data and preparing it for modeling. You'll calculate popular indicators used in technical analysis, such as Bollinger Bands, MACD, RSI, and backtest automatic trading strategies. Next, you'll cover time series analysis and models, such as exponential smoothing, ARIMA, and GARCH (including multivariate specifications), before exploring the popular CAPM and the Fama-French three-factor model. You'll then discover how to optimize asset allocation and use Monte Carlo simulations for tasks such as calculating the price of American options and estimating the Value at Risk (VaR). In later chapters, you'll work through an entire data science project in the financial domain. You'll also learn how to solve the credit card fraud and default problems using advanced classifiers such as random forest, XGBoost, LightGBM, and stacked models. You'll then be able to tune the hyperparameters of the models and handle class imbalance. Finally, you'll focus on learning how to use deep learning (PyTorch) for approaching financial tasks.By the end of this book, you’ll have learned how to effectively analyze financial data using a recipe-based approach.
Eryk Lewinson
Python is one of the most popular programming languages in the financial industry, with a huge collection of accompanying libraries. In this new edition of the Python for Finance Cookbook, you will explore classical quantitative finance approaches to data modeling, such as GARCH, CAPM, factor models, as well as modern machine learning and deep learning solutions.You will use popular Python libraries that, in a few lines of code, provide the means to quickly process, analyze, and draw conclusions from financial data. In this new edition, more emphasis was put on exploratory data analysis to help you visualize and better understand financial data. While doing so, you will also learn how to use Streamlit to create elegant, interactive web applications to present the results of technical analyses.Using the recipes in this book, you will become proficient in financial data analysis, be it for personal or professional projects. You will also understand which potential issues to expect with such analyses and, more importantly, how to overcome them.
Muhammad Asif
Python is a multipurpose language that can be used for multiple use cases. Python for Geeks will teach you how to advance in your career with the help of expert tips and tricks.You'll start by exploring the different ways of using Python optimally, both from the design and implementation point of view. Next, you'll understand the life cycle of a large-scale Python project. As you advance, you'll focus on different ways of creating an elegant design by modularizing a Python project and learn best practices and design patterns for using Python. You'll also discover how to scale out Python beyond a single thread and how to implement multiprocessing and multithreading in Python. In addition to this, you'll understand how you can not only use Python to deploy on a single machine but also use clusters in private as well as in public cloud computing environments. You'll then explore data processing techniques, focus on reusable, scalable data pipelines, and learn how to use these advanced techniques for network automation, serverless functions, and machine learning. Finally, you'll focus on strategizing web development design using the techniques and best practices covered in the book.By the end of this Python book, you'll be able to do some serious Python programming for large-scale complex projects.
Hussam Khrais
Python is an easy-to-learn and cross-platform programming language that has unlimited third-party libraries. Plenty of open source hacking tools are written in Python, which can be easily integrated within your script.This book is packed with step-by-step instructions and working examples to make you a skilled penetration tester. It is divided into clear bite-sized chunks, so you can learn at your own pace and focus on the areas of most interest to you. This book will teach you how to code a reverse shell and build an anonymous shell. You will also learn how to hack passwords and perform a privilege escalation on Windows with practical examples. You will set up your own virtual hacking environment in VirtualBox, which will help you run multiple operating systems for your testing environment.By the end of this book, you will have learned how to code your own scripts and mastered ethical hacking from scratch.
Alan D. Moore, B. M. Harwani
A responsive graphical user interface (GUI) helps you interact with your application, improves user experience, and enhances the efficiency of your applications. With Python, you’ll have access to elaborate GUI frameworks that you can use to build interactive GUIs that stand apart from the rest.This Learning Path begins by introducing you to Tkinter and PyQt, before guiding you through the application development process. As you expand your GUI by adding more widgets, you'll work with networks, databases, and graphical libraries that enhance its functionality. You'll also learn how to connect to external databases and network resources, test your code, and maximize performance using asynchronous programming. In later chapters, you'll understand how to use the cross-platform features of Tkinter and Qt5 to maintain compatibility across platforms. You’ll be able to mimic the platform-native look and feel, and build executables for deployment across popular computing platforms.By the end of this Learning Path, you'll have the skills and confidence to design and build high-end GUI applications that can solve real-world problems.This Learning Path includes content from the following Packt products:Python GUI Programming with Tkinter by Alan D. MooreQt5 Python GUI Programming Cookbook by B. M. Harwani
Burkhard Meier
Python is a multi-domain, interpreted programming language that is easy to learn and implement. With its wide support for frameworks to develop GUIs, you can build interactive and beautiful GUI-based applications easily using Python. This third edition of Python GUI Programming Cookbook follows a task-based approach to help you create effective GUIs with the smallest amount of code. Every recipe in this book builds upon the last to create an entire, real-life GUI application. These recipes also help you solve problems that you might encounter while developing GUIs. This book mainly focuses on using Python’s built-in tkinter GUI framework. You'll learn how to create GUIs in Python using simple programming styles and object-oriented programming (OOP). As you add more widgets and expand your GUI, you will learn how to connect to networks, databases, and graphical libraries that greatly enhance the functionality of your GUI. You’ll also learn how to use threading to ensure that your GUI doesn't become unresponsive. Toward the end, you’ll learn about the versatile PyQt GUI framework, which comes along with its own visual editor that allows you to design GUIs using drag and drop features. By the end of the book, you’ll be an expert in designing Python GUIs and be able to develop a variety of GUI applications with ease.
Burkhard Meier
Python is a multi-domain, interpreted programming language. It is a widely used general-purpose, high-level programming language. It is often used as a scripting language because of its forgiving syntax and compatibility with a wide variety of different eco-systems. Python GUI Programming Cookbook follows a task-based approach to help you create beautiful and very effective GUIs with the least amount of code necessary.This book will guide you through the very basics of creating a fully functional GUI in Python with only a few lines of code. Each and every recipe adds more widgets to the GUIs we are creating. While the cookbook recipes all stand on their own, there is a common theme running through all of them. As our GUIs keep expanding, using more and more widgets, we start to talk to networks, databases, and graphical libraries that greatly enhance our GUI’s functionality. This book is what you need to expand your knowledge on the subject of GUIs, and make sure you’re not missing out in the long run.
Alan D. Moore
Tkinter is widely used to build GUIs in Python due to its simplicity. In this book, you’ll discover Tkinter’s strengths and overcome its challenges as you learn to develop fully featured GUI applications.Python GUI Programming with Tkinter, Second Edition, will not only provide you with a working knowledge of the Tkinter GUI library, but also a valuable set of skills that will enable you to plan, implement, and maintain larger applications. You’ll build a full-blown data entry application from scratch, learning how to grow and improve your code in response to continually changing user and business needs. You’ll develop a practical understanding of tools and techniques used to manage this evolving codebase and go beyond the default Tkinter widget capabilities. You’ll implement version control and unit testing, separation of concerns through the MVC design pattern, and object-oriented programming to organize your code more cleanly.You’ll also gain experience with technologies often used in workplace applications, such as SQL databases, network services, and data visualization libraries. Finally, you’ll package your application for wider distribution and tackle the challenge of maintaining cross-platform compatibility.
Python GUI programming with Tkinter. Develop responsive and powerful GUI applications with Tkinter
Alan D. Moore
Tkinter is a lightweight, portable, and easy-to-use graphical toolkit available in the Python Standard Library, widely used to build Python GUIs due to its simplicity and availability. This book teaches you to design and build graphical user interfaces that are functional, appealing, and user-friendly using the powerful combination of Python and Tkinter.After being introduced to Tkinter, you will be guided step-by-step through the application development process. Over the course of the book, your application will evolve from a simple data-entry form to a complex data management and visualization tool while maintaining a clean and robust design. In addition to building the GUI, you'll learn how to connect to external databases and network resources, test your code to avoid errors, and maximize performance using asynchronous programming. You'll make the most of Tkinter's cross-platform availability by learning how to maintain compatibility, mimic platform-native look and feel, and build executables for deployment across popular computing platforms.By the end of this book, you will have the skills and confidence to design and build powerful high-end GUI applications to solve real-world problems.
Dr. Gabriele Lanaro
Python is a versatile language that has found applications in many industries. The clean syntax, rich standard library, and vast selection of third-party libraries make Python a wildly popular language. Python High Performance is a practical guide that shows how to leverage the power of both native and third-party Python libraries to build robust applications. The book explains how to use various profilers to find performance bottlenecks and apply the correct algorithm to fix them. The reader will learn how to effectively use NumPy and Cython to speed up numerical code. The book explains concepts of concurrent programming and how to implement robust and responsive applications using Reactive programming. Readers will learn how to write code for parallel architectures using Tensorflow and Theano, and use a cluster of computers for large-scale computations using technologies such as Dask and PySpark. By the end of the book, readers will have learned to achieve performance and scale from their Python applications.
Sebastian Kondracki
Sztuczna inteligencja według Pythona. Sięgnij po potężne wsparcie dla swojego e-sklepu E-commerce wspierany przez potężną moc sztucznej inteligencji ― to dla wielu właścicieli rodzimych firm internetowych wciąż brzmi jak odległa przyszłość. Może gdzieś tam, w Kalifornii, może u technologicznych gigantów, może Apple, Amazon, a bliżej nas, powiedzmy, Allegro korzysta lub będzie korzystać z chatbotów czy data-driven marketingu. Ale nasza firma do tej pory świetnie sobie radziła, to i dalej będzie sobie radzić z prostym mechanizmem sklepu online i kilkoma osobami obsługi. Marzenie ściętej głowy. Do 2025 roku w Polsce brakować będzie 200 tysięcy specjalistów w dziedzinie AI. I to nie w wielkich korporacjach. Głód programistów potrafiących kodować algorytmy sztucznej inteligencji odczują przede wszystkim firmy mniejsze i średnie. Jeśli jesteś właścicielem biznesu bazującego na sprzedaży w sieci, jeśli jesteś początkującym programistą albo działasz już jako programista e-commerce, ale chcesz się w tym kierunku rozwijać ― ta "książka kucharska" jest dla Ciebie. Dlaczego "książka kucharska"? Ponieważ podręcznik zawiera gotowe przepisy na algorytmy optymalizacyjne, systemy rekomendacyjne, przetwarzanie ogromnych ilości danych z ruchu odnotowanego w sklepie i zamianę ich w wiedzę o kliencie. Wszystko to już dziś wdrożysz w dowolnym e-sklepie stosunkowo małym kosztem. Zarówno przy użyciu gotowych programów napisanych w Pythonie przez ogromną społeczność miłośników AI i Pythona, jak i sprytnych produktów w modelu SaaS (ang. software as a service), sprzedawanych przez rzeszę polskich i zagranicznych startupów.
Python i Asyncio. Programowanie asynchroniczne
Caleb Hattingh
Programowanie współbieżne jest ważną techniką w tworzeniu nowoczesnych rozwiązań sieciowych. Programiści Pythona często w tym celu korzystają z wątków i mechanizmu wywłaszczania. Z tym że nie jest to optymalne rozwiązanie - z uwagi na ryzyko naruszenia bezpieczeństwa. Istnieje też możliwość programowania asynchronicznego z wykorzystaniem biblioteki asyncio, która została dodana w Pythonie 3.4. Złożoność API Asyncio budzi jednak obawy programistów Pythona, również biegle posługujących się tym językiem. Mimo to wysiłek włożony w zrozumienie działania Asyncio jest opłacalny, gdyż biblioteka ta pozwala na skuteczne rozwiązywanie problemów ze współbieżnym programowaniem sieciowym. Lektura tej książki ułatwi Ci pozbycie się obaw przed biblioteką asyncio. Zrozumiesz jej podstawowe elementy, co pozwoli Ci na rozpoczęcie programowania sterowanego zdarzeniami i prostą obsługę tysięcy jednoczesnych połączeń sieciowych. Dowiesz się, dlaczego Asyncio stanowi bezpieczniejszą alternatywę dla wielozadaniowości z wywłaszczaniem wątków, i dogłębnie zrozumiesz koncepcję programowania asynchronicznego. Następnie przeanalizujesz wprowadzone w Pythonie zmiany, dzięki którym możliwe jest programowanie asynchroniczne. Dowiesz się także, w jakich konkretnie sytuacjach biblioteka asyncio jest wyjątkowo użyteczna i których narzędzi należy wtedy używać. W książce pokazano najlepsze sposoby wykorzystania nowych możliwości Asyncio. W tej książce: porównanie programowania współbieżnego z wykorzystaniem Asyncio i wątków podstawy programowania bazującego na zdarzeniach możliwości Asyncio ważne dla programistów końcowych oraz twórców frameworków składnia async/await, w tym API koprocedur i klasy Future szczegółowe przypadki użycia kilku bibliotek zgodnych z Asyncio Programowanie asynchroniczne: nowa wizja bezpieczeństwa kodu Pythona!
Python i Excel. Nowoczesne środowisko do automatyzacji i analizy danych
Felix Zumstein
Bez Excela trudno sobie wyobrazić wykonywanie różnych złożonych zadań - to ulubione narzędzie naukowców, finansistów, analityków danych, a także profesjonalistów z innych branż. Każda z tych dziedzin ma swoje stale rosnące wymagania wobec Excela. Firma Microsoft wciąż rozwija ten kultowy arkusz kalkulacyjny, jednak język VBA nie nadąża za potrzebami wielu użytkowników. Osoby te często w codziennej pracy korzystają z Pythona do automatyzacji zadań, stąd integracja Excela i Pythona wydaje się naturalnym i wyjątkowo obiecującym rozwiązaniem. Nie musisz dłużej czekać na włączenie Pythona jako języka skryptowego Excela - ta książka wyjaśnia, jak je połączyć i wyciągnąć z tej integracji maksimum korzyści. To wydanie przeznaczone dla zaawansowanych użytkowników Excela, którzy nie posiadają głębokiej wiedzy o Pythonie. Pokazuje, w jaki sposób manipulować danymi zawartymi w plikach Excela bez Excela, a także jak znakomicie zwiększać możliwości tego programu poprzez budowę interaktywnych narzędzi do analizy danych. Niezależnie od tego, czy interesuje Cię praca z samymi arkuszami Excela, czy też chcesz tworzyć aplikacje Excela, znajdziesz tu mnóstwo wyczerpujących, jasnych i praktycznych wskazówek, popartych zrozumiałymi przykładami przydatnego kodu. W książce między innymi: gruntowne podstawy Pythona i korzystania z notatników Jupyter i Visual Studio Code stosowanie biblioteki pandas do zastępowania typowych obliczeń w Excelu automatyzacja konsolidacji skoroszytów Excela i tworzenia raportów w Excelu tworzenie interaktywnych narzędzi Excela za pomocą xlwings współpraca Excela z bazą danych i plikami CSV stosowanie Pythona do zastąpienia VBA, Power Query i Power Pivot Użyj Pythona, a pokochasz Excela!
Python i praca z danymi. Przetwarzanie, analiza, modelowanie i wizualizacja. Wydanie III
Avinash Navlani, Armando Fandango, Ivan Idris
Analiza danych sprawia, że dzięki ich dużym i mniejszym kolekcjom uzyskujemy wartościową wiedzę, która pozwala na podejmowanie najlepszych decyzji. Dzieje się to poprzez odkrywanie wzorców lub trendów. Obecnie Python udostępnia przeznaczone specjalnie do tego celu narzędzia i biblioteki. Możemy więc łatwo korzystać z wyrafinowanych technik wydobywania wiedzy z danych. Aby jednak osiągnąć zamierzone efekty, trzeba dobrze poznać zarówno metodologię analizy danych, jak i zasady pracy ze służącymi do tego narzędziami. Dzięki tej książce zdobędziesz wszystkie potrzebne informacje i umiejętności, aby skutecznie używać Pythona do analizy danych. Omówiono tu niezbędne podstawy statystyki i zasady analizy danych. Wyczerpująco przedstawiono zaawansowane zagadnienia dotyczące przygotowania, przetwarzania i modelowania danych, a także ich wizualizacji. W zrozumiały sposób wyjaśniono takie procesy jak inteligentne przetwarzanie i analizowanie danych za pomocą algorytmów uczenia maszynowego: regresji, klasyfikacji, analizy głównych składowych czy analizy skupień. Nie zabrakło praktycznych przykładów przetwarzania języka naturalnego i analizy obrazów. Ciekawym zagadnieniem jest również wykonywanie obliczeń równoległych za pomocą biblioteki Dask. W książce między innymi: podstawy analizy danych i korzystanie z bibliotek NumPy i pandas praca z danymi w różnych formatach interaktywna wizualizacja z bibliotekami Matplotlib, seaborn i Bokeh inżynieria cech, analiza szeregów czasowych i przetwarzanie sygnałów zaawansowana analiza danych tekstowych i obrazów Python: wydobywaj z danych wiedzę o wielkiej wartości!
Sandipan Dey
With the advancements in wireless devices and mobile technology, there's increasing demand for people with digital image processing skills in order to extract useful information from the ever-growing volume of images. This book provides comprehensive coverage of the relevant tools and algorithms, and guides you through analysis and visualization for image processing.With the help of over 60 cutting-edge recipes, you'll address common challenges in image processing and learn how to perform complex tasks such as object detection, image segmentation, and image reconstruction using large hybrid datasets. Dedicated sections will also take you through implementing various image enhancement and image restoration techniques, such as cartooning, gradient blending, and sparse dictionary learning. As you advance, you'll get to grips with face morphing and image segmentation techniques. With an emphasis on practical solutions, this book will help you apply deep learning techniques such as transfer learning and fine-tuning to solve real-world problems.By the end of this book, you'll be proficient in utilizing the capabilities of the Python ecosystem to implement various image processing techniques effectively.
Python Interviews. Discussions with Python Experts
Michael Driscoll, Kenneth Reitz
Each of these twenty Python Interviews can inspire and refresh your relationship with Python and the people who make Python what it is today. Let these interviews spark your own creativity, and discover how you also have the ability to make your mark on a thriving tech community. This book invites you to immerse in the Python landscape, and let these remarkable programmers show you how you too can connect and share with Python programmers around the world. Learn from their opinions, enjoy their stories, and use their tech tips.• Brett Cannon - former director of the PSF, Python core developer, led the migration to Python 3.• Steve Holden - tireless Python promoter and former chairman and director of the PSF.• Carol Willing - former director of the PSF and Python core developer, Project Jupyter Steering Council member.• Nick Coghlan - founding member of the PSF's Packaging Working Group and Python core developer.• Jessica McKellar - former director of the PSF and Python activist.• Marc-André Lemburg - Python core developer and founding member of the PSF.• Glyph Lefkowitz - founder of Twisted and fellow of the PSF• Doug Hellmann - fellow of the PSF, creator of the Python Module of the Week blog, Python community member since 1998.• Massimo Di Pierro - fellow of the PSF, data scientist and the inventor of web2py. • Alex Martelli - fellow of the PSF and co-author of Python in a Nutshell.• Barry Warsaw - fellow of the PSF, Python core developer since 1995, and original member of PythonLabs.• Tarek Ziadé - founder of Afpy and author of Expert Python Programming.• Sebastian Raschka - data scientist and author of Python Machine Learning.• Wesley Chun - fellow of the PSF and author of the Core Python Programming books.• Steven Lott - Python blogger and author of Python for Secret Agents.• Oliver Schoenborn - author of Pypubsub and wxPython mailing list contributor.• Al Sweigart - bestselling author of Automate the Boring Stuff with Python and creator of the Python modules Pyperclip and PyAutoGUI.• Luciano Ramalho - fellow of the PSF and the author of Fluent Python.• Mike Bayer - fellow of the PSF, creator of open source libraries including SQLAlchemy.• Jake Vanderplas - data scientist and author of Python Data Science Handbook.