Overview You already know lists. They're great for ordered collections of things – a shopping cart, a sequence of numbers, a set of results. But they're not the right tool for every job. This post covers two more data structures. First dictionaries – the most important data structure in Python, and the one you'll use constantly. Then tuples – which you'll actually encounter inside dict...
Overview You've got the building blocks. Now put them to use. Each challenge below gives you a problem, the expected output, and a starter editor to work in. There's no single right answer – if your code produces the correct output, it's correct. Once you're done (or if you're stuck), expand the solution to see two different approaches and how they compare. Challenge 1: FizzBuzz Lo...
Overview Now that you've got Python installed, it's time to actually learn the language. This post covers the fundamentals you'll use in pretty much every Python program you ever write. Nothing too crazy yet – just the building blocks. Variables & Data Types Variables are how your program remembers things. You give a value a name, and from that point on you can use that name anywh...
Python REPL (in-browser) This is a simplified integration of a Python REPL (Read-Eval-Print Loop) using PyScript. You can type Python code into the terminal below and it will run directly in your browser – no installation needed.
What's the Purpose of This? A lot of people I talk to want to get into programming but don't know where to start. Python is always my first recommendation — it's simple enough to pick up quickly, but powerful enough to take you a long way. Why Python? Python is an accessible language due to its readable syntax and reduced emphasis on low-level concerns when compared to languages such as C, C...
Pre-requisites Install the latest version of Vim (9.0.0185 or newer). Install NodeJS (v20.2.0 or newer). Installing Latest Vim Version Clone the Vim repository: cd $HOME git clone https://github.com/vim/vim.git Change to the Vim source directory: cd $HOME/vim/src Configure make to use all available cores: export NB_CORES="$(grep -c '^processor' /proc/cpuinfo)" export MAKEFLAGS="-j$...
Delving deeper into the capabilities of Oracle VM VirtualBox, we find that VBoxManage serves as the command-line gateway, as introduced in greater detail in Section 1.18, “Alternative Front-Ends”. Positioned as the command-line interface to Oracle VM VirtualBox, VBoxManage empowers users to exercise comprehensive control over the virtualization platform directly from the command line of their h...
Since Windows 10's 1709 update, they've added a built-in ssh client and server, making it surprisingly easy to set up. Unlike before, with the Windows Subsystem for Linux (WSL), native support for remote execution was lacking, forcing users to resort to less-than-ideal third-party solutions like Psexec and WinRM, each with its own limitations. Microsoft's OpenSSH for Windows is actually an ope...
Installation Install GPG Keys: gpg2 --keyserver keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB Install RVM: curl -sSL https://get.rvm.io | bash -s stable Use the following to your shell config so RVM is usable: echo '[ -f "$HOME/.rvm/scripts" ] && . "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc List all available ...
Hypervisor Setup A hypervisor in it's simplest form is software used to manage and run virtual machines. I can't harp enough on how much I love VirtualBox, it's free, open-source, and really enabling bidirectional copy-pasta's is a godsend. VMware is also a good alternative, but I've never returned since the time they made the clipboard feature a paid feature. Download and install Virtual...
Create a Python Package Creating a Python package is a great way to organize your code and make it reusable across different projects. A package is a collection of modules that can be imported and used in other programs. In this tutorial, we will go through the steps of creating a Python package. What are we going to do? Create a package (with a setup.py script) Make it available on PyP...
Git, the golden child of version control, is touted as a developer's best friend. But let's keep it real. When things go south in Git-land, it's not a leisurely stroll—it's more like navigating an obstacle course blindfolded. You've got merge conflicts chucking grenades, accidental commits blowing up in your face, and a detached HEAD state leaving you wandering in the dark. Git is a breeze unt...
What are URLs? URLs (Uniform Resource Locators) are web addresses used to identify and locate resources on the internet. They provide a standardized way to access various types of resources, such as web pages, images, documents, or any other type of file. A URL consists of several components, each serving a specific purpose and providing information about the resource and its location. Let's ...
What is the Domain Name System? In the digital world, websites and devices rely on a system called the Domain Name System (DNS) to function effectively. The Domain Name System (DNS) is a hierarchical decentralized naming system that translates human-readable domain names into the numerical IP addresses required for communication between devices on the Internet. Let's break it down. Note:...