The official docs:
The Python Package Index (PyPI) is a repository of software for the Python programming language.
PyPI is the official 3rd party software repository for the Python language.
To install packages from the PyPI repository, you will need a package installer. The most common and recommended one is pip.
PyPI is public, anyone can access it and download any package listed there. However, sometimes you want to create your own private repository, mainly for security reasons.
To set up a PyPI server, you will need a server — it can be your own machine, your friend’s, or a…
In this short article, I’ll try to explain why we get the following:
Python 3.9.0 (default, Dec 6 2020, 18:02:34)
[Clang 12.0.0 (clang-122.214.171.124)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
bool, you'll find that it is numeric in nature - It can hold two values, "True" and "False", and they are just ‘customized’ versions of the integers 1 and 0, that only print themselves differently.
>>> isinstance(True, int)
True>>> True == 1…
In this article, we will create a minimal Spring Boot application that uses GitHub for authentication.
OAuth is an open-source standard for access delegation. It grants applications access to users' protected resources via an authorization server.
For example, let’s suppose you’re developing a code scanning application, and you want to get access to users’ code on GitHub. Asking users for their credentials is not a realistic solution — no one will ever share sensitive data with you. This where OAuth comes in. Using the OAuth authorization mechanism, services can authorize against each other on the user’s behalf:
Problem: Given a positive integer, write a code to find if it is a power of two or not.
“A number is a power of two” means that it can be written as 2^x where x is an integer. For example:
The immediate solution: Take the log of the given number on base 2 and if you get an integer then the number is the power of…
Let’s begin by creating a minimal Flask application:
Next, let’s write the command that will run the Gunicorn server:
The parameters are pretty much self-explanatory: We are telling Gunicorn that we want to spawn two worker processes running two threads each. We are also accepting connections from the outside and overriding Gunicorn’s default port (8000).
Our basic Dockerfile:
Let’s build our image:
docker build -t flask/hello-world .
docker run -p 8003:8003 flask/hello-world
The application is now accessible since we published the port:
$ curl localhost:8003
Assuming you already have Minikube running…
“git-bisect — Use binary search to find the commit that introduced a bug” — Git’s official docs
It’s best to go through a real example in order to understand this command and demonstrate how it works.
Let’s create an empty Git project and add the following commits:
git commit --allow-empty -m 'good commit 1' git commit --allow-empty -m 'good commit 2' git commit --allow-empty -m 'good commit 3' git commit --allow-empty -m 'good commit 4' git commit --allow-empty -m 'good commit 5' git commit --allow-empty -m 'good commit 6' git commit --allow-empty -m 'BAD COMMIT' git commit --allow-empty -m 'good…
Computers have their own language. They don’t understand human languages (maybe they do if you speak binary), and they don’t know anything but binary. How do we communicate with them?
As I’m typing now, the computer is not aware of any of the characters you’re seeing. Let’s consider the M character. At the lowest level, M is stored using a sequence of 0s and 1s:
01001101. Before we proceed, let’s recall two fundamental definitions:
Bit — smallest unit of storage, can only store 0 or 1
Byte — one byte = eight bits. That’s it.
It is literally true that you can succeed best and quickest by helping others to succeed — Napoleon Hill
If you’ve ever been interested in programming or anything related to and been around the net long enough, you’ve come across Stack Overflow, accidentally or on purpose.
What is Stack Overflow?
Stack Overflow is a question and answer site for professional and enthusiast programmers. It’s built and run by you as part of the Stack Exchange network of Q&A sites. With your help, we’re working together to build a library of detailed answers to every question about programming.
It was in…
If you’re using the command line to interact with your Kubernetes cluster, you’re probably familiar with the
There are many cheatsheets available for
kubectl that attempt to cover all of its available commands. While it’s very powerful, this command can be a bit cumbersome for some of the operations that you use on a daily basis. For example, the following command list contains only a small portion of the available commands of
Software engineer | Music geek | Beer lover