Disable pip Outside of Virtual Environments

Python packages everywhere # I'm a huge fan of virtual environments in Python. They are a convenient way to manage dependencies if you are working on more than one Python project at a time. Well, they are the only way to manage dependencies between projects. In the JavaScript wor … | Continue reading


@switowski.com | 4 years ago

How to Prepare for the CAPM Certification Exam

"Wait, aren't you a software developer?" If it's not your first time on my blog, you might be thinking: "Aren't you a prominent software developer, not a project manager?" Ok, maybe without the prominent part. But yes, you are right. I started working as a developer a few years a … | Continue reading


@switowski.com | 4 years ago

You Don't Have to Migrate to Python 3

Python 3 is great! But not every Python 2 project has to be migrated. There are different ways how you can prepare for the upcoming Python 2 End of Life. | Continue reading


@switowski.com | 4 years ago

You Don't Have to Migrate to Python 3

You can put your pitchforks and torches down - Python 3 is great! If you can migrate your project from Python 2 to Python 3, then by all means, you should do this. But with all the praise of Python 3 and all the great talks on how to migrate, we are forgetting about a huge portio … | Continue reading


@switowski.com | 4 years ago

IPython Extensions

What are IPython extensions, how to install them, and how to write and publish your own extension? | Continue reading


@switowski.com | 4 years ago

IPython Extensions Guide

Modifying IPython is very easy. Need to execute some code at the startup? Add it to the startup directory. Need to change the caching behavior, exceptions verbosity level or the color theme? Open the .ipython_config.py file and modify everything there. But if you switch to a diff … | Continue reading


@switowski.com | 4 years ago

Automatically reload Python modules with %autoreload

Tired of having to reload a module each time you change it? %autoreload to the rescue! | Continue reading


@switowski.com | 4 years ago

Automatically Reload Modules with %autoreload

Writing my first module in Python was a confusing experience. As it usually happens, when I was testing it in the interactive Python REPL, the first version turned out to have some bugs (the second and third ones also did ). That's fine - I thought - I will just fix the module an … | Continue reading


@switowski.com | 4 years ago

It's 2019 and I'm Still Using Python 2

Here are the slides for my talk called "It's 2019 and I'm still using Python 2. Should I be worried?". Since I update the slides before each conference to incorporate any new ideas that come to my mind and make sure they are up to date, if you are interested in a particular versi … | Continue reading


@switowski.com | 4 years ago

Wait, IPython Can Do That?!

Here are the slides for my talk called "Wait, IPython can do that?!". Since I update the slides before each conference to incorporate any new ideas that come to my mind and make sure they are up to date, if you are interested in a particular version of the slides, just send me an … | Continue reading


@switowski.com | 4 years ago

Creating Magic Functions in IPython - Part 3

So far in this series, we have covered three different decorators: @register_line_magic (in part1), @register_cell_magic and @register_line_cell_magic (in part2). Which is enough to create any type of magic function in IPython. But, IPython offers another way of creating them - b … | Continue reading


@switowski.com | 5 years ago

Creating a type checker magic function in IPython

Continue the magic functions journey and create a cell magic function that checks type hints in IPython. | Continue reading


@switowski.com | 5 years ago

Creating Magic Functions in IPython - Part 2

In the previous post, I explained what the magic functions are and why they are cool. We have also created a line magic function that interprets mathematical formulas written in Polish notation. Today, we will talk about cell magic functions. Cell magics in IPython # Cell magics … | Continue reading


@switowski.com | 5 years ago

Creating Magic Functions in IPython

Learn how to make your own magic functions in IPython by creating a line magic function. | Continue reading


@switowski.com | 5 years ago

Creating Magic Functions in IPython - Part 1

IPython magic functions # One of the cool features of IPython are magic functions - helper functions built into IPython. They can help you easily start an interactive debugger, create a macro, run a statement through a code profiler or measure its' execution time and do many more … | Continue reading


@switowski.com | 5 years ago

__str__ vs. __repr__

Every now and then, when I go back to writing Python code after a break, a question comes to mind: What message should I put into the __str__ and the __repr__ functions? When you search for the difference between them, you will find out that __str__ should be human readable and _ … | Continue reading


@switowski.com | 5 years ago

Git aliases don't have to be boring

Git aliases can be far more advanced than just a simple “l = log”. Check out those seven examples of what else you can do. | Continue reading


@switowski.com | 5 years ago

Git Aliases Don't Have to Be Boring!

In the previous post, we covered what to put inside a .gitconfig file to supercharge git. We have discussed some basic aliases, but you can do much more than simple ci = commit type of stuff. You can define whole functions that will help you with mundane tasks. Here are some of m … | Continue reading


@switowski.com | 5 years ago

Configuring git

What can you find inside the .gitconfig file and how can you make git look much nicer with a few simple settings there? | Continue reading


@switowski.com | 5 years ago

Configuring Git

Git is a pretty amazing tool. It doesn't force you to use it in a particular way. If you want to start with a simple workflow, where you write some code and add it to the master branch - that's fine. You learn a handful of commands: commit, checkout, push, pull, status, and diff, … | Continue reading


@switowski.com | 5 years ago

IPython startup files

In one of the companies where I worked, I was a part of a pretty small team of five developers. We had a support rota, so each week, one of us was responsible for handling tickets from users. Apart from requesting new features, users often asked for changes in the system that onl … | Continue reading


@switowski.com | 5 years ago

IPython Startup Files

In one of the companies where I worked, I was a part of a pretty small team of five developers. We had a support rota, so each week, one of us was responsible for handling tickets from users. Apart from requesting new features, users often asked for changes in the system that onl … | Continue reading


@switowski.com | 5 years ago