PyDev of the Week: Qiusheng Wu

This week we welcome Qiusheng Wu (@giswqs) as our PyDev of the Week! Qiusheng has developed several Python packages that you can check out on Github. Specifically they are geemap, lidar, whitebox and they are used for advanced geospatial analysis. Qiusheng also has a website where you can learn more about his research and interests.

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

Qiusheng Wu

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

My name is Qiusheng Wu. I obtained my Ph.D. degree in Geography from the University of Cincinnati in 2015. Currently, I am a tenure-track Assistant Professor of Geographic Information Science (GIS) in the Department of Geography at the University of Tennessee, Knoxville (UTK). Prior to joining UTK, I was a tenure-track Assistant Professor in the Department of Geography at Binghamton University, State University of New York (2015-2019).

My research interests include Geographic Information Science (GIS), remote sensing, and environmental modeling. More specifically, I am interested in applying geospatial big data, machine learning, and cloud computing (e.g., Google Earth Engine) to study environmental change, especially surface water and wetland inundation dynamics. I am a strong advocate of open science and reproducible research. I have developed and published various open-source packages for advanced geospatial analysis (e.g., geemap, lidar, whitebox), which are available on GitHub. I recently created a YouTube channel to share video tutorials for using the Earth Engine Python API and geemap Python package. My goal is to make geospatial technologies and GIS programming easier and more accessible. More information about my research and teaching can be found at https://wetlands.io.

In my spare time, I enjoy coding, cooking, and playing badminton. Continue reading PyDev of the Week: Qiusheng Wu →

PyDev of the Week: Jan Giacomelli

This week we welcome Jan Giacomelli (@jangiacomelli) as our PyDev of the Week. Jan is an entrepreneur and blogs about Python. You can see what projects Jan contributes to over on Github.

Let’s spend a few minutes and get to know Jan better!

 Jan Giacomelli

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

I’ve been programming for a while. I started when I was a high school senior – I made scraper for online betting webpages. After that, I studied electrical engineering and finished my MsC degree. Since my student years I’ve been working as a software engineer.

I’ve been training alpine skiing for almost a decade. After that, I also got a ski instructor license. Therefore in the winter ski centers are the place to go. I also love windsurfing and squash. Besides sports I also like to play guitar and cook. Continue reading PyDev of the Week: Jan Giacomelli →

PyDev of the Week: Samuel Hinton

This week we welcome Samuel Hinton (@samreayh) as our PyDev of the Week! Samuel has written quite a few projects in Python and given lots of talks on astronomy. If you are interested in either of those topics, then you should definitely check out his website or his Github profile.

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

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

Sure thing! I’m an astrophysicist that started off my career in robotics engineering. I’ve always been one for trying out new things and don’t mind jumping topics, so from there I went into IT, software engineering, the finance sector, physics and then decided that space science was cool enough to put a few years into it! When I’m not coding, either for work or on a fun side project, I’ll tend to jump between introverted phases of devouring fantasy novels, and the occasion extroverted phase of doing science outreach, including one fun time when I was invited to play Australia Survivor as an academic champion. That was fun. Crazy, but fun.

The goal is to one day live and work on every continent on the planet, which means one of these days I better leave my home country of Australia and go exploring! Continue reading PyDev of the Week: Samuel Hinton →

Python 101: Conditional Statements

Developers have to make decisions all the time. How do you approach this problem? Do you use technology X or technology Y? Which programming language(s) can you use to solve this? Your code also sometimes needs to make a decision.

Here are some common things that code checks every day:

  • Are you authorized to do that?
  • Is that a valid email address
  • Is that value valid in that field?

These sorts of things are controlled using conditional statements. This topic is usually called control flow. In Python, you can control the flow of your program using if, elif and else statements. You can also do a crude type of control flow using exception handling, although that is usually not recommended.

Some programming languages also have switch or case statements that can be used for control flow. Python does not have those.

In this chapter you will learn about the following:

  • Comparison operators
  • Creating a simple conditional
  • Branching conditional statements
  • Nesting conditionals
  • Logical operators
  • Special operators

Let’s get started by learning about comparison operators! Continue reading Python 101: Conditional Statements →

Python 101: Learning About Sets

A set data type is defined as an “unordered collection of distinct hashable objects” according to the Python 3 documentation. You can use a set for membership testing, removing duplicates from a sequence and computing mathematical operations, like intersection, union, difference, and symmetric difference.

Due to the fact that they are unordered collections, a set does not record element position or order of insertion. Because of that, they also do not support indexing, slicing or other sequence-like behaviors that you have seen with lists and tuples.

There is two types of set built-in to the Python language:

  • set – which is mutable
  • frozenset – which is immutable and hashable

This article will focus on set.

You will learn how to do the following with sets:

  • Creating a set
  • Accessing set members
  • Changing items
  • Adding items
  • Removing items
  • Deleting a set

Let’s get started by creating a set!

Continue reading Python 101: Learning About Sets →

PyDev of the Week: Gaetan Delannay

This week we welcome Gaetan Delannay as our PyDev of the Week! Gaetan is the creator of Appy, a Python web framework and an entrepreneur.

Let’s spend some time getting to know Gaetan better!

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

It is quite unusual for me to talk about myself, but let’s give it a try. Almost 11 years ago, I started a one-man-company, called GeezTeem. 90% of my time is devoted to coding in Python, developing and maintaining about ten software products for the public and not-for-profit sectors in Belgium. Being monomaniacal, all this stuff is made with Appy, my own (GPL) framework for building web applications in Python.

Convinced by the open source philosophy, the large majority of my code is open source, published under the GPL license. Before flying with my own wings, I have spent the previous 10 years working in various companies, public entities or research centers, learning and experimenting all aspects of software engineering, as developer, tester, researcher, quality engineer or software architect, in fields as varied as 3D graphics, requirements engineering, proton therapy control software or management information systems.

The starting point was a master degree in Software Engineering from the university of Namur in Belgium. Besides coding, writing (in french), playing tennis and composing music are my favourite activities. After publishing my first album under the name Null ID, some people told me I was probably mentally affected.
Continue reading PyDev of the Week: Gaetan Delannay →

PyDev of the Week: Cheukting Ho

This week we welcome Cheukting Ho (@cheukting_ho) as our PyDev of the Week. Cheuk is an organizer for EuroPython and various Python sprints. You can find our more about her accomplishments on her website or see what open source projects she is a part of over on Github.

Let’s take some time to get to know her better!

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

I am Cheuk, pronoun she/ her. I came from a Physics research background but had changed my career to become a data scientist when I moved from Hong Kong to London. Now, I had made a change again and work as a developer advocate. This is the result of my love to be involved in the tech community. My newest hobby is to stream coding tutorials and building websites with JAMstack. Continue reading PyDev of the Week: Cheukting Ho →

Type Checking in Python

Type checking or hinting is a newer feature of Python that was added in Python 3.5. Type hinting is also known as type annotation. Type hinting is adding special syntax to functions and variable declarations that tell the developer what type the argument or variable is.

Python does not enforce the type hints. You can still change types at will in Python because of this. However some integrated development environments, such as PyCharm, support type hinting and will highlight typing errors. You can also use a tool called Mypy to check your typing for you. You will learn more about that tool later on in this article.

You will be learning about the following:

  • Pros and Cons of Type Hinting
  • Built-in Type Hinting / Variable Annotation
  • Collection Type Hinting
  • Hinting Values That Could be None
  • Type Hinting Functions
  • What To Do When Things Get Complicated
  • Classes
  • Decorators
  • Aliasing
  • Other Type Hints
  • Type Comments
  • Static Type Checking

Let’s get started! Continue reading Type Checking in Python →

An Overview of Profiling Tools for Python

What does it mean to profile ones code? The main idea behind benchmarking or profiling is to figure out how fast your code executes and where the bottlenecks are. The main reason to do this sort of thing is for optimization. You will run into situations where you need your code to run faster because your business needs have changed. When this happens, you will need to figure out which parts of your code are slowing it down.

This article will only cover how to profile your code using a variety of tools. It will not go into actually optimizing your code. Let’s get started! Continue reading An Overview of Profiling Tools for Python →