PythoFF

Menu

Sign in:

read us on

home/2019/07/22/19de045cee1cd06c774647943d0f2f98fe9a71d4.jpg

NumPy arange(): How to Use np.arange()

In this step-by-step tutorial, you'll learn how to use the NumPy arange() function, which is one of the routines for array creation based on numerical ranges. np.arange() returns arrays with evenly spaced values.

PyDev of the Week: Cris Medina

This week we welcome Cris Medina (@tryexceptpass) as our PyDev of the Week! Cris is the author behind the popular tryexceptpass blog. He is also the maintainer of sofi and korv. You can catch up with Chris’s other projects on Github. Let’s spend some time getting to know him better! Can you tell us a little about yourself (hobbies, education, etc): I was born in the Dominican Republic. I finished highschool there and went to Puerto Rico to study Computer Engineering, specializing in hardware. But I’ve been writing software in some form since I can remember. My dad introduced me to IBM System 360 Basic as my first language. Go figure! Most of my professional career (going on 17 years now) was spent doing test engineering, along with developing all the hardware and software tools required to execute those tests and maintain their infrastructure. The rest of the time I’ve held formal software engineering roles. I like to spend some of my free time with music. My mother is a music teacher and she got me into piano early on. Though I moved into string instruments as I got older. Today I mostly play classical guitar, but I own several types of guitars and dabble in other string instruments. I also enjoy cooking. My family is from various parts around the Mediterranean, so most of my meals have that flare. Cooking reminds me a little of the dev process: you have some idea of what you want, you follow a basic set of instructions on how to get there, but there’s usually some extra flavor you throw in to make it yours and it can take several iterations to get it just right. Continue reading PyDev of the Week: Cris Medina →

New Malicious Python Libraries Found Targeting Linux

ZDNet published an article recently about a newly discovered set of malware-related Python packages on the Python Package Index (PyPI). These packages contained a backdoor that would only activate when installed on Linux. These packages were named: libpeshnx libpesh libar They were written by a user named ruri12. These packages were removed by the PyPI team on July 9, 2019. However they were available since November 2017 and had been downloaded fairly regularly. See the original article for more details. As always, when using a package that you aren’t familiar with, be sure to do your own thorough vetting to be sure you are not installing malware accidentally. Related Reading ZDNet – Malicious Python libraries targeting Linux servers removed from PyPI More typo-squatting Malware Found on PyPI Malicious Libraries Found on Python Package Index (PyPI)

home/2019/07/17/81a5f49511637bea82bea8bc09a338ba22359903.jpg

Create a Flask Application With Google Login

In this step-by-step tutorial, you'll create a Flask application that lets users sign in using their Google login. You'll learn about OAuth 2 and OpenID Connect and also find out how to implement some code to handle user session management.

home/2019/07/16/f6e516ac62ef6ee379512fef35e42fc0147fa939.jpg

How to Write Pythonic Loops

In this course, you'll see how you can make your loops more Pythonic if you're coming to Python from a C-style language. You'll learn how you can get the most out of using range(), xrange(), and enumerate(). You'll also see how you can avoid having to keep track of loop indexes manually.

Intro to Black – The Uncompromising Python Code Formatter

There are several Python code checkers available. For example, a lot of developers enjoy using Pylint or Flake8 to check their code for errors. These tools use static code analysis to check your code for bugs or naming issues. Flake8 will also check your code to see if you are adhering to PEP8, Python’s style guide. However there is a new tool that you can use called Black. Black is a Python code formatter. It will reformat your entire file in place according to the Black code style, which is pretty close to PEP8. Installation Installing Black is easy. You can just use pip for that: pip install black Now that it’s installed, let’s give Black a try! Continue reading Intro to Black – The Uncompromising Python Code Formatter →

home/2019/07/15/95f6ae9f70fd0b84e71eebc985cc5b879f3d3419.jpg

Real Python at PyCon US 2019

Join the Real Python team as we reminisce about our first PyCon together, and for some of us, our first PyCon ever. Find out what our highs and lows were, and learn why none of us can get the Golden Girls theme tune out of our heads 🤦‍♂️

PyDev of the Week: Meg Ray

This week we welcome Meg Ray (@teach_python) as our PyDev of the Week! Meg teaches programming to other teachers and has developed Python-related curriculum. Meg is also the author of Code This Game, a book which will be coming out in August 2019. Let’s take some time to get to know her better! Can you tell us a little about yourself (hobbies, education, etc): I started out as an actor. I studied theater and moved to New York City to start out my career. One of the jobs I did to stay afloat while I was starting out was teaching theater classes to kids. I taught theater programs for students with disabilities as well as homeless youth. This lead me to my career as a special education teacher. I really enjoyed teaching and mentoring young people, particularly young people who have had challenges in their lives. Around this time in my life, I began to learn to program. I was having a lot of fun with it, and I also started to understand computer science education as an equity issue. I was hired at a school to teach a software engineering and game design class that was required for all 9th graders. I learned as I went. I re-designed the course to include Python in addition to block coding and to be more inclusive of students with learning differences. Now I develop curriculum and train other educators to teach computer science. Through the Cornell Tech Teacher in Residence initiative, I have been providing in-classroom coaching and support to K-8 teachers. I’ve also been working on my first book! Code This Game! is an intro to Python and computer science through designing a game. It was really fun to have the opportunity to apply everything I’ve learned about teaching Python to kids in a creative way. On a personal note, I’m a new mom. One of the priorities that I have now is building community. I DM for a D&D (with babies!) campaign, and have been thinking about other ways to make space for family and community in my life. One thing that I love about Python is the Python community. For me that means participating in my local meetup, collaborating with others to support Python eductors, and attending Pycon as a family. Continue reading PyDev of the Week: Meg Ray →

home/2019/07/10/75f314c7d464f5c8a72a51265cce6c383b97483b.jpg

Build a Recommendation Engine With Collaborative Filtering

In this tutorial, you'll learn about collaborative filtering, which is one of the most common approaches for building recommender systems. You'll cover the various types of algorithms that fall under this category and see how to implement them in Python.

home/2019/07/09/49442683e99995ca65cadfd5b3fc9e275f9935ef.jpg

Reading and Writing Files in Python

In this course, you'll learn about reading and writing files in Python. You'll cover everything from what a file is made up of to which libraries can help you along that way. You'll also take a look at some basic scenarios of file usage as well as some advanced techniques.

home/2019/07/08/99ee1d5e1447ca932a9430332e71a762a7456a48.jpg

The Python Square Root Function

In this quick and practical tutorial, you'll learn what a square root is and how to calculate one in Python. You'll even see how you can use the Python square root function to solve a real-world problem.

home/2019/07/08/0d7d7a7a462418aaf470d90632fe48ab2ea3975f.jpg

How to Use the Python or Operator

In this step-by-step tutorial, you'll learn about how the Python or operator works and how to use it. You'll get to know its special features and see what kind of programming problems you can solve by using or in Python.

Большая О: как замедляется код с увеличением объёма данных

PyDev of the Week: Scott Shawcroft

This week we welcome Scott Shawcroft (@tannewt) as our PyDev of the Week! Scott is the lead developer of CircuitPython, a variant of the Python programming language made for microcontrollers. If you’d like to see what else Scott is up to, his website is a good place to start. Let’s take a few moments to get to know Scott better! Can you tell us a little about yourself (hobbies, education, etc): I’m Scott, I graduated from the University of Washington in 2009 in Computer Engineering. Afterwards, I joined the Maps team at Google where I worked on rendering and styling of the map. I left in 2015 to do my own thing. I designed a modular flight controller system for racing quadcopters and learned about hardware at the same time. My hobbies include running, rock climbing, video gaming and thrift shopping for retro electronics (so I can put CircuitPython in them.) Continue reading PyDev of the Week: Scott Shawcroft →

Book Contest: Jupyter Notebook 101

Last year, I released a book entitled Jupyter Notebook 101. In celebration of a successful launch, I have decided to do a little contest. Rules Tweet about why you’d want to win the book and include my handle: @driscollis Send me a direct message on Twitter or via my contact form with a link to your Tweet If you don’t have Twitter, feel free to message me through the website to tell me why you’d like a copy The contest will run starting now until Thursday, July 4th @ 11:59 p.m. CST. Runners up will receive a free copy of the eBook. The grand prize will be a signed paperback copy + the eBook version!

PyDev of the Week: David Kopec

This week we welcome David Kopec (@davekopec) as our PyDev of the Week! David is the author of Classic Computer Science Problems in Python from Manning, as well as several other books. He was even interviewed about his book by Talk Python! If you would like to see what open source projects he is working on, then you should head on over to Github. Now let’s take some time to get to know David! Can you tell us a little about yourself (hobbies, education, etc)? Before I start, I want to thank Mike for including me in this series. It’s an honor. I’m an assistant professor in the Computer Science & Innovation program at Champlain College in beautiful Burlington, Vermont, USA. Before becoming a full time professor, I worked professionally as a software developer, and I’m still open to taking projects on a consulting basis. I have a bachelors degree in economics (minor in English) from Dartmouth College and a masters degree in computer science, also from Dartmouth. I’m the author of three programming books: Dart for Absolute Beginners (Apress, 2014), Classic Computer Science Problems in Swift (Manning, 2018), and Classic Computer Science Problems in Python (Manning, 2019). However, I no longer recommend the Dart book because it’s very outdated. I’m also an active contributor to open source. When I’m not working, I enjoy learning about American history, entrepreneurship, and keeping up with the world of computing (although that’s kind of my job too). I also have all the same hobbies that just about everyone has—cooking, traveling, film, reading (classics, biography, history, business dramas), television (Frasier & The Curse of Oak Island!), music, video games (Zelda & AOE2!), podcasts, stock trading, etc. Continue reading PyDev of the Week: David Kopec →

home/2019/06/29/b025c765fe74a81f1c48dd4169b63fd548ca08d8.jpg

Python Community Interview With Katrina Durance

PyCon US can be a unique experience for anyone, let alone a first-timer. We caught up with a first-time PyCon US attendee, Katrina Durance, to learn about her experience and how it will influence the code she writes going forward.

PyDev of the Week: Geir Arne Hjelle

This week we welcome Geir Arne Hjelle (@gahjelle) as our PyDev of the Week! Geir is a regular contributor to Real Python. You can also find some of his work over on Github. Let’s take a few moments to get to know Geir now! Can you tell us a little about yourself (hobbies, education, etc): Sure. I grew up in a beautiful village on an island in the north of Norway. My family has since moved south, but I still go north and visit friends and enjoy the nature regularly. I’ve always enjoyed playing with numbers, so I quite naturally ended up studying mathematics at the University. I did both a Master’s and a PhD at the Norwegian University of Science and Technology in Trondheim. During the PhD, I also got to spend about a year in my favorite big city: Barcelona. To this day, I spend a week or two in Barcelona every year. After my studies, I lived three years in St. Louis, Missouri doing a Post.Doc at Washington University. Then I moved back to Norway, and I’m currently living in Oslo working with data science, mostly using Python. I spend a fair bit of my free time with programming as well. I write tutorials for Real Python and helping teach kids how to code. I enjoy being outdoors. In Norway there are great opportunities for going skiing in the winter, and hiking in the summer. At this very moment, I’m actually basking in the sun in a hammock in the forest just outside of Oslo. Finally, I should note that I love getting together with friends for a board game session. Continue reading PyDev of the Week: Geir Arne Hjelle →

ГБИ или не ГБИ: будущее многоядерного (C)Python

home/2019/06/29/1764e0842aa662ba593f4bc185c421b30eaaf653.jpg

Developer-led Sales for Startups

This blog post contains the slides along with a loose transcript from my talk on the promises and perils of developer-led sales as an early-stage company strategy for acquiring customers.

home/2019/06/19/c59503b7e48b54a4139d259a5719c58132776672.jpg

Book Contest: Creating GUI Applications with wxPython

Last month, I released a new book entitled Creating GUI Applications with wxPython. In celebration of a successful launch, I have decided to do a little contest. Rules Tweet about the contest Send me a direct message on Twitter or via my contact form with a link to your Tweet If you don’t have Twitter, feel free to message me through the website and I’ll enter you anyway The contest will run starting now until Friday, June 21st @ 11:59 p.m. CST. Runners up will receive a free copy of the eBook. The grand prize will be a signed paperback copy + the eBook version!

home/2019/06/19/5827628cea47563a25e9309de09b03e46693e487.jpg

How to Use Python lambda Functions

In this step-by-step tutorial, you'll learn about Python lambda functions. You'll see how they compare with regular functions and how you can use them in accordance with best practices.

home/2019/06/18/a62cc151554fb8e8036508ddf174afab64c67784.jpg

How to Publish Your Own Python Package to PyPI

Learn how to create a Python package for your project and how to publish it to PyPI, the Python Package Repository with this step-by-step course. Quickly get up to speed on everything from naming your package to configuring it using setup.py.

home/2019/06/17/875d547e9ab11026fd121349a67255721c767ae5.jpg

Python Community Interview With Marlene Mhangami

Join us as we chat with Marlene Mhangami. She's a PSF Director and the co-founder of ZimboPy, a Zimbabwean non-profit that empowers women to pursue careers in tech. She's also organizing the very first PyCon Africa.

PyDev of the Week: Meredydd Luff

This week we welcome Meredydd Luff (@meredydd) as our PyDev of the Week! Meredydd is the co-founder of Anvil and a core developer for the Skulpt package. You can learn more about Meredydd on his website. Let’s take a few moments to get to know him better! Can you tell us a little about yourself (hobbies, education, etc): I’ve loved programming since I was first introduced to BASIC at the age of 7. I come from Cambridge (the old one in the UK, not the relatively-new one near Boston), and I studied here too. I actually started out as a biologist, but then switched to computer science for my PhD. I think programming is the closest thing to magic we have, and I love watching and helping people get their hands on this power. My PhD research was about building usable parallel programming systems, and now I work on Anvil, a tool to make web programming faster and easier for everyone (with Python!). When I’m not programming, I fly light aeroplanes, which I guess is what happens when your inner six-year-old makes your life decisions. I used to dance competitively (including a few years on England’s top Latin formation team), but it turns out international competitions and startups don’t play well together, so the startup won. Continue reading PyDev of the Week: Meredydd Luff →

home/2019/06/12/01acaf9bec0fa821df8047031abb5f0150a938a6.jpg

How to Build Command Line Interfaces in Python With argparse

In this step-by-step Python tutorial, you'll learn how to take your command line Python scripts to the next level by adding a convenient command line interface that you can write with argparse.

home/2019/06/11/2925136df173afeda908eaf77427874ff2b0738a.jpg

OOP Method Types in Python: @classmethod vs @staticmethod vs Instance Methods

home/2019/06/10/21808208d3aaae9c9a327042ad99b49410ab29a8.jpg

How to Make a Twitter Bot in Python With Tweepy

In this step-by-step tutorial, you'll learn how to make a Twitter bot in Python with Tweepy, which is a package that provides a very convenient way to use the Twitter API. You can use your Twitter bot to automate all or part of your Twitter activity.

PyDev of the Week: Valentin Haenel

This week we welcome Valentin Haenel (@esc___) as our PyDev of the Week! Valentin is a core developer of Numba and several other packages that you can see either on his website or on Github. He has also given several talks at various conferences in Europe. Let’s spend some time getting to know Valentin better! Can you tell us a little about yourself (hobbies, education, etc): I went to the University of Edinburgh to get a bachelor in computer science and to the Bernstein Center in Berlin to get a master in computational neuroscience. I tend to favour more traditional computer science topics these days such as compression algorithms and compilers. In my spare time, I spend time with my lovely wife Gloria, fly quad-line sports kites and ride longboards through Berlin. I’ve been doing Python and open-source on Github for about 10 years. Continue reading PyDev of the Week: Valentin Haenel →

home/2019/06/09/62249d6aa2112ea1b4994d273805a97140735827.jpg

How to Implement a Python Stack

In this tutorial, you'll learn how to implement a Python stack. You'll see how to recognize when a stack is a good choice for data structures, how to decide which implementation is best for a program, and what extra considerations to make about stacks in a threading or multiprocessing environment.

Older Posts