In this article, you'll learn how you can get the most out of PyCon. Whether you're a first-timer or a seasoned attendee, this guide will help you get ready to have a great PyCon.
This week we welcome Neil Muller as our PyDev of the Week! Neil is an organizer for Cape Town Python User Group and PyCon ZA. He also speaks at conferences! You can learn more about his open source projects over on Github. Let’s take a few moments to get to know Neil better! Can you tell us a little about yourself (hobbies, education, etc): I’m an Applied Mathematician with interests in image processing and numerical computation, currently living and working in the Cape Town area, South Africa. I followed an interest in facial recognition into a PhD from the University of Stellenbosch, and that led to working on a variety of image processing and numerical modelling problems at iThemba LABS. These days I split my working time between iThemba LABS and Praelexis, a machine learning company (mainly using Python) in Stellenbosch. In my spare time, I am obsessed with board and card games, especially Vampire: The Eternal Struggle. Continue reading PyDev of the Week: Neil Muller →
In this step-by-step tutorial you'll learn how to work with conditional ("if") statements in Python. Master if-statements step-by-step and see how to write complex decision making code in your programs.
In this tutorial, you'll learn how to handle Python KeyError exceptions. They are often caused by a bad key lookup in a dictionary, but there are a few other situations when a KeyError can be raised as well. Knowing how to handle these exceptions is essential to writing good Python code.
In this tutorial, you'll learn how to use the Python time module to represent dates and times in your application, manage code execution, and measure performance.
This week we welcome Dane Hillard (@easyaspython) as our PyDev of the Week! Dane is the author Practices of the Python Pro, an upcoming book from Manning. He is also a blogger and web developer. Let’s take some time to get to know Dane! Can you tell us a little about yourself (hobbies, education, etc): I’m a creative type, so many of my interests are in art and music. I’ve been a competitive ballroom dancer, and I’m a published musician and photographer. I’m proud of those accomplishments, but I’m driven to do most of this stuff for personal fulfillment more than anything! I enjoy sharing and discussing what I learn with others, too. When I have some time my next project is to start exploring foodways, which is this idea of exploring food and its cultural impact through written history. I’ve loved cooking (and food in general) for a long time and I want to get to know its origins better, which I think is something this generation is demanding more from industries as a whole. Should be fun! Continue reading PyDev of the Week: Dane Hillard →
Growing up, I have always found the universe and space in general to be exciting. It is fun to dream about what worlds remain unexplored. I also enjoy seeing photos from other worlds or thinking about the vastness of space. What does this have to do with Python though? Well, the National Aeronautics and Space Administration (NASA) has a web API that allows you to search their image library. You can read all about it on their website. The NASA website recommends getting an Application Programming Interface (API) key. If you go to that website, the form that you will fill out is nice and short. Technically, you do not need an API key to make requests against NASA’s services. However they do have rate limiting in place for developers who access their site without an API key. Even with a key, you are limited to a default of 1000 requests per hour. If you go over your allocation, you will be temporarily blocked from making requests. You can contact NASA to request a higher rate limit though. Interestingly, the documentation doesn’t really say how many requests you can make without an API key. The API documentation disagrees with NASA’s Image API documentation about which endpoints to hit, which makes working with their website a bit confusing. For example, you will see the API documentation talking about this URL: https://api.nasa.gov/planetary/apod?api_key=API_KEY_GOES_HERE But in the Image API documentation, the API root is: https://images-api.nasa.gov For the purposes of this tutorial, you will be using the latter. Continue reading Creating a GUI Application for NASA’s API with wxPython →
In Python, immutable vs mutable data types and objects types can cause some confusion—and weird bugs. With this course you'll see what the difference between mutable and immutable data types is in Python, and how you can use it to your advantage in your own programs.
In this step-by-step tutorial, you'll learn how to work with a PDF in Python. You'll see how to extract metadata from preexisting PDFs . You'll also learn how to merge, split, watermark, and rotate pages in PDFs using Python and PyPDF4.
По мере того, как усложняется структура приложения, ведение логов (журналирование) становится всё полезнее для разработчика. Логи не только пригодятся в процессе отладки, но и помогут обнаружить скрытые проблемы проекта, а также отследить его производительность.
Learn how to speed up your Python 3 programs using concurrency and the asyncio module in the standard library. See step-by-step how to leverage concurrency and parallelism in your own programs, all the way to building a complete HTTP downloader example app using asyncio and aiohttp.
Эта статья — пошаговое руководство по настройке базового CRUD-приложения с помощью Vue и Flask. Начнём с создания нового приложения Vue, используя Vue CLI, а затем перейдём к выполнению основных операций CRUD с помощью RESTful API на бэкенде под управлением Python и Flask.
In this step-by-step tutorial, you'll get started with linear regression in Python. Linear regression is one of the fundamental statistical and machine learning techniques, and Python is a popular choice for machine learning.
This week we welcome Pierre Denis as our PyDev of the Week! Pierre is the creator of Lea, a probabilistic programming package in Python. He can be found on LinkedIn where you can see his CV and learn more about some of the things he is up to. Let’s take a few moments to get to know Pierre better! Can you tell us a little about yourself (hobbies, education, etc): I’ve a Master in Computer Science from UCL Louvain-la-Neuve, Belgium, where I reside. I’m working since 20 years as software engineer in [Spacebel](http://www.spacebel.be), a company developing systems for Space. Basically, I like everything creative and elegant. Beside arts, music, literature, I ‘m looking for this in physics, algorithmic, GUI and mathematics. I love programming, especially in Python. So far, I have initiated three open-source Python projects: UFOPAX (textual virtual universe), Unum (quantities with unit consistency) and Lea (probabilistic programming). For these developments, I tend to be perfectionist and consequently slow: I’m the kind of guy that re-write the same program ten times, just for the sake of inner beauty! Beside programming, I’m doing research in number theory (twin primes conjecture). Also, I’m writing short stories in French, my mother tongue, with some reference to the ‘Pataphysics of Alfred Jarry and a lot of nonsense. Incidentally and fortunately, programs can be good for producing nonsense, as I showed in my bullshit generator! Continue reading PyDev of the Week: Pierre Denis →
Learn the four main approaches to string formatting in Python, as well as their strengths and weaknesses. You'll also get a simple rule of thumb for how to pick the best general purpose string formatting approach in your own programs.
Scientists have used a new algorithm to take a photo of a black hole. One of the most exciting parts about it to me is that they used a lot of Python libraries to do the magic. Here’s a list mentioned in their paper: Numpy (van der Walt et al. 2011) Scipy (Jones et al. 2001) Pandas (McKinney 2010) Jupyter (Kluyver et al. 2016) Matplotlib (Hunter 2007). Astropy (The Astropy Collaboration et al. 2013, 2018) They also used their own custom Python code which is available on Github If you’re interested in a more laymen’s explanation of the ideas behind taking the photo, there’s a nice TED talk on it from one of the researchers: Related Links Reddit Python group discussing these developments A Photo of the researcher that appears to show Matplotlib running.
This step-by-step course will guide you through a series of ways to run Python scripts, depending on your environment, platform, needs, and skills as a programmer.
The ReportLab toolkit supports adding many different charts and graphs to your PDFs. In fact, I have covered some of them in a previous article. However most of the examples I have seen, including the ones in my own article, do not show how to insert a chart as a Flowable. What that means is that most examples show you how to create a PDF with a single page that contains the chart in it. Most developers would want to be able to create some text, perhaps a table and insert the chart along with those elements. You would also usually have additional text following the chart. For this article, you will learn how to do just that. Continue reading ReportLab: Adding a Chart to a PDF with Python →
In Part 3 of this series, you'll learn how to add relationships to the database created in Part 2 and extend the API to support CRUD operations on those relationships using SQLAlchemy and Marshmallow.
This week we welcome Abdur-Rahmaan Janhangeer as our PyDev of the Week! Abdur-Rahmaan is the French translator of Think Python. You can see what he is up to on his blog as well as on Github. Let’s take a few moments to get to know him better! Can you tell us a little about yourself (hobbies, education, etc): I’m Abdur-Rahmaan Janhangeer from Mauritius, a paradise island in the Indian Ocean and currently one of the best tourist destinations. I have an IT business and i am shyly becoming a Python Trainer. I am mostly self-taught in programming. Concerning Python, I’m the Arabic Coordinator for the Python docs, translator of Think Python into French (publishing soon) and organising member for the py user-group of Mauritius. I also did some really tiny contributions to LinuxMint, Numpy and Odoo. As “hobby”, i like to dig into Compiler Theory and code some toy langs in my spare time. Being a gallery moderator, I use InkScape to design logos and business cards for people. Playing around with graphics! Continue reading PyDev of the Week: Abdur-Rahmaan Janhangeer →
In this course, you'll learn how to use Visual Studio Code for Python development. By following examples, you'll cover everything from how to install and configure Visual Studio Code for Python development to how to run tests and debug application, so you can use this powerful tool.
What is pip? In this beginner-friendly tutorial, you'll learn how to use pip, the standard package manager for Python, so that you can install and manage additional packages that are not part of the Python standard library.
In this course you'll see how to use some lesser-used but idiomatic Pandas capabilities that lend your code better readability, versatility, and speed.
No Starch Press is best known for creating books on computer programming. However they recently released a new product called Python Flash Cards by Eric Matthes, the author of Python Crash Course. I thought this was a unique product and decided to ask for a review copy. The cards and their box are high quality. I like the card stock they used quite a bit. The cards themselves target Python 3.7. Each card is marked with a color along their top that matches their category: The cards are also numbered. This is useful for the times where the cards make reference to other cards in their section or other sections entirely. It makes referring to different cards nice and straight-forward. Of course, flash cards are by their very nature, short and to the point. So the testing and packaging sections of cards feel too brief to me. On the other hand, they are flash cards, so the medium doesn’t allow them to be fleshed out the way I would want them to be. If you need more details, Google is never far away. While I am certainly not the target market for these cards, I think they will work well for high school students and possibly even freshmen in college that want to learn. They are certainly useful for refreshing yourself on the basics of Python. If you have students, this set may prove quite useful for them. Python Flash Cards by Eric Matthes Amazon, No Starch Book Reviews Book Review – Mission Python: Code a Space Adventure Game! by Sean McManus Serious Python: Black-Belt Advice on Deployment, Scalability, Testing, and More by Julien Danjou Python Testing with pytest by Brian Okken Module Programming with Python by Erik Westra Python Playground – Geeky Projects for the Curious Programmer by Mahesh Venkitachalam IPython Notebook Essentials by L. Felipe Martins
In this step-by-step tutorial, you'll learn the basics of creating powerful web applications with Django, a Python web framework. You'll build a portfolio application to showcase your web development projects, complete with a fully functioning blog.
I thought it would be fun to write a bit about the cover art for my new book, Creating GUI Applications with wxPython. I had meant to post about that during the actual Kickstarter campaign. My original idea for the cover was to have the mouse directing a Phoenix to attack a snake. The Phoenix is a reference to the code name for wxPython 4 before it was released and you can still see references to Phoenix in the documentation and the artwork on some of the pages for the wxPython project. In fact, I commissioned that cover to be done. Here’s a sketch of it: Original cover concept art As you can see, the artist had trouble remembering that the snake should be a Python. He continued to make lazy mistakes in the finished product and I ended up scrapping that cover. I am not sure if I will use that cover for a future book or not. I personally like the look of the mouse and Phoenix, but the Python will always bother me. So I ended up hiring Varya Kolesnikova again for the actual cover of the book. She is the artist who did my Python 201 cover art. You can view more of her art on Behance or Instagram. Here is her original sketch of my new concept, which was to have the mouse riding the Phoenix and carrying the Python: Actual cover concept art sketch I liked her approach much better, although her idea of a Phoenix was very different than my original vision for it. Here is a color version of the concept art: Color concept art sketch I liked Varya’s approach to the art and she ended up finishing the artwork as you know today: Final cover art I am hard at work wrapping up the last few chapters of the book. If you are interested in getting early access to the book, you can pre-order it now on Leanpub. The final version of the book will be released in May 2019.
This week we welcome Kyle Stratis (@KyleStratis) as our PyDev of the Week! He is an active contributor at Real Python but also maintains his own website. You can catch up with his projects on Github as well. Let’s take a few moments to get to know Kyle! Can you tell us a little about yourself (hobbies, education, etc): I’m a self-taught developer, I actually studied neuroscience up through graduate school, with a focus on mechanisms of attention in the auditory system. The coding I had to do at every step of the experimental process rekindled my early love of the craft, and a good friend stepped in as a mentor – so I taught myself and got my first job while I was writing my master’s thesis. While I do a lot of programming on the side, I also enjoy weightlifting (my father was a bodybuilder and gym-owner, with 4x Mr. Olympia Jay Cutler starting at his gym, so maybe it’s genetic), skateboarding, and surfing, which I do noticeably less of now that I live in Boston. I’m also a bit of a metalhead, so on any given weekend you’ll be likely to find me at a dingy club with a battlevest on and cheap beer in hand. I’d be remiss to not mention spending time with my wife, which usually is spent reading, hiking, and playing with our 2 cats. Continue reading PyDev of the Week: Kyle Stratis →