atlas news
    
Improve and Repeat : Python
22  mars     19h00
Python Friday #219: Structure your FastAPI Application
Johnny Graber    With our API, the tests, and the models we get deeper and deeper into FastAPI. It is now a good moment to check what FastAPI suggests on how to structure our application before we start a more complex example. This post is part of my journey to learn Python. You find the code for this ... Read...
15  mars     19h00
Python Friday #218: Send Data to FastAPI
Johnny Graber    So far, we used the GET method to ask FastAPI for data. Now it is time to send data to FastAPI and do some work with it. This post is part of my journey to learn Python. You find the code for this post in my PythonFriday repository on GitHub. Pydantic models FastAPI makes ... Read more The post...
08  mars     19h00
Python Friday #217: Path- and Query Parameters in FastAPI
Johnny Graber    FastAPI offers us two main options to specify what data we want: as part of the path or as query parameters. In this post we expand on our minimalistic example and dig a bit deeper into the basic concepts of FastAPI. This post is part of my journey to learn Python. You find the code ... Read more...
01  mars     19h00
Python Friday #216: Test Your FastAPI Application
Johnny Graber    If we do not want to keep starting our API and manually click through the endpoints to see if everything still works, we need to put a little effort into testing. Thanks to the underlying Starlette toolkit, we can test our FastAPI application in memory and do not need a dedicated server. Let us...
23  février     19h00
Python Friday #215: Async & Await
Johnny Graber    While our application waits on IO Input Output , our CPUs idle around. If we would have a way to let the program step aside and let other code run while we wait on a file or a response, we could get more work done at the same time. That is the basic idea behind ... Read more The post Python...
16  février     19h00
Python Friday #214: First Steps With FastAPI
Johnny Graber    There are many projects in Python that we can use to create an API. After exploring a few options, I decided to go with FastAPI and explore it over the next few weeks. FastAPI is not only fast when it comes to serving requests, but also when it comes to writing code for it. Let ... Read more The...
09  février     19h00
Python Friday #213: Tune the Garbage Collector
Johnny Graber    The Garbage Collector GC in Python frees the memory from no longer needed objects. This usually works without any problem in the background and prevents us from memory leaks. However, for certain tasks we may pay a performance penalty that we can prevent by tuning the GC. Let us explore the...
02  février     19h00
Python Friday #212: Regular Expressions With Metacharacters
Johnny Graber    Last week we worked with the main methods of the re module. However, when we need to be specific about the text parts we search, we miss a lot of the flexibility we can get from regular expressions. In this post we look at metacharacters and how they make regular expressions so powerful. This post ...
26  janvier     19h00
Python Friday #211: First Steps With Regular Expressions
Johnny Graber    I waited a long time to explore regular expressions, then they tend to get complicated in no time. But for some problems there is simply no way around. Let us explore the basics and how we can use them in our Python code. This post is part of my journey to learn Python. You find ... Read more The...
19  janvier     19h00
Python Friday #210: Cache Function Calls
Johnny Graber    If our application uses recursion, we may call the same function with the same values many times. When that function is side effect free, we can save a lot of time by caching the result. And even better, in Python we can do that without much effort. This post is part of my journey to learn ... ...
12  janvier     19h00
Python Friday #209: Defaultdict
Johnny Graber    When we work with dictionaries that contains lists, we need to make sure that the list exists before we can add items. Or when we use a dictionary for counters, we must make sure that we have a value before we can increment it. While this can be done by hand, there is a much ... Read more The post...
05  janvier     19h00
Python Friday #208: Working With Lists and Dictionaries
Johnny Graber    I had to do a lot of work with lists and dictionaries to solve the puzzles for Advent of Code. Here is my little cheat sheet for these two basic data structures from which you could also benefit. This post is part of my journey to learn Python. You find the code for this post ... Read more The...
29  décembre     19h00
Python Friday #207: Type Hints
Johnny Graber    Internally Python uses classes and therefore types everywhere. However, when we declare our methods, we omit the types and end up with limited functionality for our code editors. In this post we look at type hints and how they can improve our experience to write code. This post is part of my...
22  décembre     19h00
Python Friday #206: What Is the Meaning of and in Parameters and Method Calls?
Johnny Graber    You may run into code examples where the parameters are prefixed with a star or a double star. This little feature of Python comes in handy when we need a bit more flexibility for our methods. Let us explore how that works. This post is part of my journey to learn Python. You find the ... Read...
15  décembre     19h00
Python Friday #205: Monkey Patching
Johnny Graber    In last week’s post we overwrote a method in the SSL module to use Feedparser with self signed certificates. Today we take a closer look at the so called monkey patching and how it works under the hood. This post is part of my journey to learn Python. You find the code for this post in ... Read...
08  décembre     19h00
Python Friday #204: Using Feedparser With Self-Signed Certificates
Johnny Graber    Feedparser is a great Python library to read RSS and ATOM feeds that I covered in Python Friday . When I tried to read a local RSS feed with Feedparser, I ran into a problem with my self signed SSL certificate. Let us see how we can tell Feedparser that our certificate is trustworthy. This post...
01  décembre     19h00
Python Friday #203: Is Your Python Version Still Maintained?
Johnny Graber    Time flies, and with it come new versions of Python and older ones reach the end of their lifespan. Let us use this opportunity to check if we use a Python version that is still supported. This post is part of my journey to learn Python. You find the code for this post in my ... Read more The post...
28  novembre     18h00
Advent of Code: The Fun Starts Soon
Johnny Graber    Do you like coding puzzles If so, you should go to AdventOfCode.com and prepare yourself for some funny little coding challenges. Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like....
24  novembre     19h00
Python Friday #202: Rounding in Python
Johnny Graber    Python is usually a straightforward language without surprises. However, when you use the round function you may run into some strange behaviour. Let us have a look at the specialities of round and what is going on. This post is part of my journey to learn Python. You find the code for this...
17  novembre     19h00
Python Friday #201: How Much Cost a Print()?
Johnny Graber    A few weeks back we were running a data preparation script that took a long time to complete. The main part of the work should not take that much time, but somehow that script was sloooow. I expected that the print statement for each record would have an impact on performance, but I had no ... ...
10  novembre     19h00
Python Friday #200
Johnny Graber    It is unbelievable that this is already post for my Python Friday series. Let us use this milestone to look back at the topics we covered since Python Friday . Again, you get an easy to use reference that lets you jump right to the topics you are interested in. Fundamentals of the Python...
03  novembre     19h00
Python Friday #199: Adding Dash to an Existing Flask Application
Johnny Graber    With Dash and Plotly we can create complex interactive dashboards, while Flask works in the background to gives us all the web capabilities. In this post we turn the tables and add Dash to an existing Flask application. This post is part of my journey to learn Python. You find the code for this...
27  octobre     18h00
Python Friday #198: Multi-Component Dashboards with Dash
Johnny Graber    After our first steps with Dash last week, we create in this post a more complex dashboard with multiple components that we can update simultaneously. This post is part of my journey to learn Python. You find the code for this post in my PythonFriday repository on GitHub. Install the dash...
20  octobre     18h00
Python Friday #197: Creating Interactive Dashboards With Dash
Johnny Graber    Wit Plotly we can already create interactive plots and find the data points we are interested in. Would it not be great if we could add some more interactivity and combine multiple plots to a dashboard Luckily for us, we can do exactly that with Dash. This post is part of my journey to learn ... ...
13  octobre     18h00
Python Friday #196: Engine Troubles When Saving Plots With Plotly
Johnny Graber    So far, we saved our plots with the camera icon of the plot preview. If we want to automate the creation of our plots, this manual step will not be sufficient, and we need to have an alternative that we can call from our code. Unfortunately, there is a catch that you need to be ... Read more The...
06  octobre     18h00
Python Friday #195: Customise Your Plots in Plotly
Johnny Graber    There is still more to customise with Plotly than the colours or the templates. In this post we go through the few parts that Plotly does automatically but not always to our satisfaction. This post is part of my journey to learn Python. You find the code for this post in my PythonFriday repository...
29  septembre     18h00
Python Friday #194: Templates for Plotly
Johnny Graber    While colours are one of the most notable things we can change in Plotly, there are many more knobs we can turn to influence the visual aspects of our plots. In this post we explore how templates for Plotly work and what we need to create our own. This post is part of my journey ... Read more The...
22  septembre     18h00
Python Friday #193: Choosing Colours for Plotly
Johnny Graber    As we have seen in the last post, Plotly does not always use colours with a high enough contrast. In this post we explore the different options we have to choose better colours. This post is part of my journey to learn Python. You find the code for this post in my PythonFriday repository on ... ...
15  septembre     18h00
Python Friday #192: Plotly-Specific Diagrams
Johnny Graber    Last week we figured out how we can create our well known plots with Plotly. In this post we explore the diagrams that are specific to Plotly and may help us to find another approach to visualise our data. This post is part of my journey to learn Python. You find the code for this post ... Read...
08  septembre     18h00
Python Friday #191: Often used Diagrams for Plotly
Johnny Graber    After our first steps with the interactive plots of Plotly, we will now explore the different diagrams we can use to visualize our data. This post is part of my journey to learn Python. You find the code for this post in my PythonFriday repository on GitHub. Line plot Line chart We can ... ...
01  septembre     18h00
Python Friday #190: Interactive Plots With Plotly
Johnny Graber    We came a long way with data visualisation over the last few months. But so far, all plots we created were static. Now it is time to change this and look at interactive plotting libraries. This post is part of my journey to learn Python. You find the code for this post in my PythonFriday ... Read...
25  août     18h00
Python Friday #189: Visualize Text With a Word Cloud
Johnny Graber    Creating graphs with numerical and categorical data is something we got comfortable with over the last months. But how can we visualize a text to spot the common words and get a hint of the topic Let us figure out how we can tackle such a challenge. This post is part of my journey to ... Read...
18  août     18h00
Python Friday #188: Working With the NDC Talks Data
Johnny Graber    Last week we formulated our thesis and went on to capture the data to dis prove our assumption. Today we clean the data file, turn it into a graph and check the merit of our thesis. This post is part of my journey to learn Python. You find the code for this post in my ... Read more The post...
11  août     18h00
Python Friday #187: Extracting the NDC Talks Data From YouTube
Johnny Graber    It is time for a hands on walkthrough to collect data and turn it into useful plots. For this exercise we are going to collect metadata from YouTube and run it through Seaborn to figure out if my hunch is correct or not. This post is part of my journey to learn Python. You find the ... Read more...
04  août     18h33
Python Friday #186: Filter Data in Pandas
Johnny Graber    Sometimes we only want to work with part of the data in a DataFrame. In this post, we explore the different ways that Pandas gives us to filter the data we want. This post is part of my journey to learn Python. You find the code for this post in my PythonFriday repository on GitHub. ... Read more...
28  juillet     18h00
Python Friday #185: Creating DataFrames in Pandas
Johnny Graber    While working on my upcoming blog post on filtering data in Pandas, I noticed a little gap in my knowledge: How can we create a DataFrame without the help of a CSV file Let us find out what options we have. This post is part of my journey to learn Python. You can find the ... Read more The post...
21  juillet     18h00
Python Friday #184: Performance-Related Magic Commands in Jupyter
Johnny Graber    When we work with larger datasets in Jupyter, we will notice a slowdown in the execution time. Let us look at magic commands that Jupyter offers us to check the performance of our statements. This post is part of my journey to learn Python. You can find the other parts of this series here. ... ...
14  juillet     18h00
Python Friday #183: Advanced Tips & Tricks for JupyterLab
Johnny Graber    JupyterLab offers us many little tricks to work more effectively. In this post we explore a few helpful tips I would no longer want to miss. This post is part of my journey to learn Python. You can find the other parts of this series here. You find the code for this post in my ... Read more The...
07  juillet     18h00
Python Friday #182: Style Your Plots in Seaborn
Johnny Graber    Seaborn is a powerful library that we can use to explore data. Once we have figured out what we want to show, it is time to adapt the plots to our requirements. In this post we explore the options we have for styling our plots. This post is part of my journey to learn Python. ... Read more The...
30  juin     18h00
Python Friday #181: Making Sense of Your Data With Seaborn
Johnny Graber    Making sense of the data is an important first step before we can visualise the data. In this post we continue with Seaborn and explore the various ways it can help us to better understand what is going on. This post is part of my journey to learn Python. You can find the other parts ... Read more...
23  juin     18h00
Python Friday #180: Explore Your Data With Seaborn
Johnny Graber    Seaborn is a statistical data visualization library based on Matplotlib. We will use Seaborn to find interesting relationships in our data and turn them into informative graphs. As you will see shortly, this involves less code than if we were to use Matplotlib directly. This post is part of my...
16  juin     18h00
Python Friday #179: Explore Your Data With Pandas
Johnny Graber    So far, I printed the Pandas data frame in Jupyter to see what data is in it. That works for small data frames but is rather useless for large ones. Let us find better ways to explore our data in Pandas. This post is part of my journey to learn Python. You can find the ... Read more The post...
09  juin     18h00
Python Friday #178: Clean-up Your Data With Pandas
Johnny Graber    The data we get is not always in a useful format. With a bit of Pandas magic we can clean up a lot and automate the process along the way. This post is part of my journey to learn Python. You can find the other parts of this series here. You find the code for this ... Read more The post Python...
02  juin     18h00
Python Friday #177: Customise Your Plots in Pandas
Johnny Graber    The methods to plot a data frame in Pandas here here create us useful graphics. But as with Matplotlib, sometimes they do not fully meet our requirements. Let us find out how we can fix that in Pandas. This post is part of my journey to learn Python. You can find the other parts ... Read more...
26  mai     18h00
Python Friday #176: Visualise Data in Pandas With Hist() & Boxplot()
Johnny Graber    Plotting with Pandas works without much effort. Today we look at the two dedicated methods hist and boxplot directly on the data frame. This post is part of my journey to learn Python. You can find the other parts of this series here. You find the code for this post in my PythonFriday...
19  mai     18h00
Python Friday #175: Visualise Data in Pandas With Plot()
Johnny Graber    We are back on our journey to data visualisation. Matplotlib offered us a lot of features, but especially the combination of multiple plots into one graphic is painful. With Pandas we get an abstraction of Matplotlib that works on the whole data frame. Let us explore the plotting capabilities we...
12  mai     18h00
Python Friday #174: Untangle Project Dependencies With NetworkX
Johnny Graber    Last week we explored the basic features for creating graphs with NetworkX. Today we put that knowledge to practice and untangle dependencies between projects. This post is part of my journey to learn Python. You can find the other parts of this series here. You find the code for this post in my...
09  mai     17h00
Turn .Net Project Dependencies Into Python Code With Roslyn
Johnny Graber    We want to migrate our big application with around projects to .Net . To do that, we need to find a sequence to migrate the different projects while we keep their dependencies in place. Otherwise we will have an endless list of problems that prevents us from compiling our code. Let’s combine...
05  mai     18h00
Python Friday #173: Create Graphs with NetworkX
Johnny Graber    Today we make a small deviation from the plots of Matplotlib and work with networks and graphs as in computer science . Having a structure that allows us to define objects and their relation to each other is not only interesting for theoretical problems. In this post we look at the basics and next...
28  avril     18h00
Python Friday #172: Combine Multiple Plots in Matplotlib
Johnny Graber    Matplotlib allows us to draw our annotations on top of a plot. Today we look what happens if we draw a plot on top of another plot. This post is part of my journey to learn Python. You can find the other parts of this series here. You find the code for this post in ... Read more The post Python...