PyDev of the Week: Raphael Pierzina

This week we welcome Raphael Pierzina (@hackebrot) as our PyDev of the Week! Raphael is a core developer of pytest, a popular testing framework for Python. You can learn more about Raphael by visiting his blog or checking out his Github profile. Let’s take a few moments to get to know Raphael!

Can you tell us a little about yourself (hobbies, education, etc)

My background is in 3D visualization and animation. After graduating from university with a Bachelor of Arts in Design, I worked as a software developer for a visual effects company for a few years and built applications for digital artists.

Fast forward to today, after having worked at a few other software companies, I’m now at Mozilla where I work on Firefox Telemetry. I manage projects to reduce Telemetry related blind-spots in our Firefox browser products and support our Software Engineers and Data Engineers in increasing the automated test coverage for the Firefox Telemetry component and our Firefox Data Platform. I wrote about my first year at Mozilla on my blog earlier this year in February, if you’d like to find out more about my work.

For fun, I like to run fast, read books, and enjoy the outdoors. 🏔 Continue reading PyDev of the Week: Raphael Pierzina

Using Twitter with Python and Tweepy

Twitter is a popular social network that people use to communicate with each other. Python has several packages that you can use to interact with Twitter. These packages can be useful for creating Twitter bots or for downloading lots of data for offline analysis. One of the more popular Python Twitter packages is called Tweepy. You will learn how to use Tweepy with Twitter in this article.

Tweepy gives you access to Twitter’s API, which exposes the following (plus lots more!):

  • Tweets
  • Retweets
  • Likes
  • Direct messages
  • Followers

This allows you to do a lot with Tweepy. Let’s find out how to get started!


Getting Started

The first thing that you need to do is create a Twitter account and get the credentials you will need to access Twitter. To do that, you will need to apply for a developer account here.

Once that is created, you can get or generate the following:

  • Consumer API Key
  • Consumer API Secret
  • Access token
  • Access secret

If you ever lose these items, you can go back to your developer account and regenerate new ones. You can also revoke the old ones.

Note: By default, the access token you receive is read-only. If you would like to send tweets with Tweepy, then you will need to make sure you set the Application Type to “Read and Write”. Continue reading Using Twitter with Python and Tweepy

PyDev of the Week: Eric Matthes

This week we welcome Eric Matthes (@ehmatthes) as our PyDev of the Week! Eric is the author of the popular book, Python Crash Course. He also created a neat set of Python Flash Cards that I reviewed earlier this year. You can catch up with Eric on his website or check out some of his work on Github.

Let’s take a few moments to get to know Eric better!

Can you tell us a little about yourself (hobbies, education, etc):

Sure! I grew up in southern New Hampshire, on the outskirts of Boston in the early 1980s. My father was a software engineer at DEC around that time, and I first learned to program on a kit computer in our basement back then. I am so grateful to my father for sharing the technology he had at home, instead of telling me to keep away from it all. It has been amazing to watch computers evolve from the early days of almost no one having a home computer to almost everyone having multiple computers in their lives.

I loved math and science in high school, and I went into undergrad as a chemical engineering major because I loved AP Chemistry. But I soon found that engineering was really about learning to solve other people’s problems. I enjoyed my physics classes though, because they were all about understanding the universe, from the very large to the very small. For a while I naively worried that if I stayed with physics long enough I’d start to find the world less interesting as I understood it on a deeper level. It was a joy to discover that the opposite was true: the more I learned, the more fascinating everything around me became.

I continued to learn new programming languages throughout my educational experiences. I took a variety of programming classes, and always had a few projects going for fun. I wrote a 3d graphing program in C during spring break one year in college.

I wanted to be a particle physicist, but I didn’t want to be a student forever. I decided to try teaching for a couple years, and quickly found that the intellectual challenge of trying to reach every student in my classes was just as satisfying as doing hard science. I loved teaching, and decided to stay with it.

In 2011 my son was born, and a month later my father died. It was a really hard time, but it was also a formative experience for me. My mother asked me to look through my father’s computer and let her know if there was anything worth saving. It was a really intimate experience, looking through all the projects he was working on, and reading through his notes. I used to visit him in his office whenever I went home, and as long as his computer was open and running that day I still felt directly connected to him. It was sad to realize these projects would never be finished, and would never be used by anyone. In the weeks that followed I realized that if I died you’d find a bunch of half-finished projects on my computer as well. I made a commitment to start using the skills I’d learned to build something meaningful.

I wanted to build tools that would bring greater equity to public education. I gave a talk at PyCon 2013 about how much the educational world could gain from the open source model, and Bill Pollock of No Starch Press approached me afterwards. “I hope you build what you described, and if you ever want to write a technical book let me know.” I went back to my classroom and saw a poster hanging on my wall: “What’s the least you need to know about programming in order to start building meaningful projects?” It was a list I had made for my students of the smallest set of things they needed to know in order to be able to build the things they cared about like games, data visualizations, and simple web apps. I realized that was the book I wanted to write, and the question on that poster became the guiding question for Python Crash Course. I hadn’t intended to write a book, but I realized that in five years of trying to teach programming to high school students, all the resources I found were either aimed at young kids, or assumed more technical knowledge and experience than my students had. I decided to write a book for anyone old enough to not want a kids book. It has been immensely satisfying to see that Python Crash Course works for almost everyone in that anticipated audience: young kids motivated enough to want a more serious book, high school students, undergrads in all majors, grad students, working adults, and retired people who are curious to learn programming at an older age. I was surprised to find it even works well for people who are already fluent in another language, and want to pick up Python quickly. Continue reading PyDev of the Week: Eric Matthes

Summer Python Book Sale

It’s summer time and now is a great time to learn Python! To help with that, I am running a sale of my Python books for the next week. The sale ends August 6th. All books are $9.99-$14.99 on Leanpub!

All My Python Books


Creating GUI Applications with wxPython

Creating GUI Applications with wxPython is my latest book. In it you will learn how to create cross-platform desktop applications using wxPython. Use this link or click the image above to get a discount.


Jupyter Notebook 101

The Jupyter Notebook is a great teaching tool and it’s a fun way to use and learn Python and data science. I wrote a nice introductory book on the topic called Jupyter Notebook 101.


ReportLab – PDF Processing with Python

Creating and manipulating PDFs with Python is fun! In ReportLab – PDF Processing with Python you will learn how to create PDFs using the ReportLab package. You will also learn how to manipulate pre-existing PDFs using PyPDF2 and pdfrw as well as a few other handy PDF-related Python packages.


Python 201: Intermediate Python

Python 201: Intermediate Python

Python 201: Intermediate Python is a sequel to my first book, Python 101 and teaches its readers intermediate to advanced topics in Python.

PyDev of the Week: Ines Montani

This week we welcome Ines Montani (@_inesmontani) as our PyDev of the Week! Ines is the Founder of Explosion AI and a core developer of the spaCy package, which is a Python package for Natural Language Processing. If you would like to know more about Ines, you can check out her website or her Github profile. Let’s take a few moments to get to know her better!

Can you tell us a little about yourself (hobbies, education, etc):

Hi, I’m Ines! I pretty much grew up on the internet and started making websites when I was 11. I remember sitting in school and counting the hours until I could go back home and keep working on my websites. I still get that feeling sometimes when I’m working on something particularly exciting.

I wasn’t quite sure what to do with my life, so I ended up doing a combined degree of media science and linguistics and went on to work in the media industry for a few years, leading marketing and sales. But I always kept programming and building things on the side.

In 2016, I started Explosion, together with my co-founder Matt. We specialise in developer tools for Machine Learning, specifically Natural Language Processing – so basically, working with and extracting information from large volumes of text. Our open-source library spaCy is a popular package for building industrial-strength, production-ready NLP pipelines. We also develop Prodigy, an annotation tool for creating training data for machine learning models.

I’m based in Berlin, Germany, and if I’m not programming, I enjoy bouldering 🧗‍♀️, eating good food 🥘 and spending time with my pet rats 🐀. Continue reading PyDev of the Week: Ines Montani

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

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

You can also configure popular text editors and IDEs to use Black following these instructions.

Now that Black is installed, let’s give it a try! Continue reading Intro to Black – The Uncompromising Python Code Formatter

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

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