Category: Code

  • Loops, break, and continue

    A while loop allows you to repeatedly execute a block of code while a certain condition is true. You can use the break statement to exit the loop prematurely, and the continue statement to skip to the next iteration of the loop without executing the rest of the code in the current iteration. A for…

  • The Zen of Python

    Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren’t special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the…

  • Built-in Functions

    The Python interpreter has a number of functions and types built into it that are always available. They are listed here in alphabetical order.

  • Jupyter notebook

    The Jupyter Notebook is a web-based interactive computing platform.

  • Display Matplotlib plot

    PyCharm’s regular Python console doesn’t render Markdown or understand the IPython.display module in the same way. The easiest fix is to simply use plt.show() after creating the plot. This will open a Matplotlib window displaying the graph.

  • Explore the Gemini API

    The Gemini API gives you access to Gemini models created by Google DeepMind. Gemini models are built from the ground up to be multimodal, so you can reason seamlessly across text, images, code, and audio.How to get started

  • Google Colab

    Colab, or “Colaboratory”, allows you to write and execute Python in your browser, with Whether you’re a student, a data scientist or an AI researcher, Colab can make your work easier. 

  • SQLAlchemy

    SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL.

  • var Versus :=

    For a small language, Go has a lot of ways to declare variables. There’s a reason for this: each declaration style communicates something about how the variable is used. Let’s go through the ways you can declare a variable in Go and see when each is appropriate. The most verbose way to declare a variable in…

  • A sample Makefile

    Here’s a sample Makefile to add to our very simple project: Even if you haven’t seen a Makefile before, it’s not too difficult to figure out what is going on. Each possible operation is called a target. The .DEFAULT_GOAL defines which target is run when no target is specified. In our case, we are going to run the build target.…