Blackjack, The 21 Game

« Never be the biggest bettor at your table. »

Introduction

Blackjack can be beaten !

You will see how to be at least break even with the house, and maybe have a small advantage over the long run with easy methods to learn, and how and why they work. I tried to summarize many books that I read and kept only what I thought was useful and easily shareable. I’ll put the list of the book I read at the end if you want to dig deeper in the world of beating the blackjack game.

23 minute read…

Publish a package on PyPi using Poetry

First thing first, you need Poetry if you don’t have it already.

Poetry is the new standard for creating and managing virtual environment for your Python project. It is also a Python dependency management tool that is working differently as pip. It uses the new standard pyproject.toml decided by the Python Packaging Authority with PEP-518. This file merges all the previous config files that were necessary before, setup.py, requirements.txt, setup.cfg, MANIFEST.in et Pipfile, in one unique file to rule them all ! Ok, enough of Lord of the Ring.

I advise you to follow along with the documentation of poetry open.

4 minute read…

Using environment variables in a Flask + Heroku project

Using environment variables is fundamental in a project. This is how you tell your app if you are running in production or locally for example. This is where you also store more sensible information like SECRET_KEY or API credentials. Storing those directly in your web app code can be easy at first, but it is not safe when you will push your code in production, so taking good habits from the beginning is a good idea.

Before jumping in the topic of configuring environment variables, I will first make you set up and deploy a basic app.

5 minute read…