SQL stands for “structured query language”. It is a programming language for storing and processing information in a relational database. A relational database stores information in tabular form, with rows and columns representing different data attributes and the various relationships between the data values.
Continue reading “SQL”CSV and Panda
CSV files
CSV stands for “comma-spearated values”, which allows data to be saved in a tabular format. They are commonly used to store spreedsheet data. CSV files are essentially text files and can be opened the same way as text files. However, there are python modules dedicated to handling csv files. Here we mainly focus on the csv module.
Continue reading “CSV and Panda”JSON files
In computer science, JSON stands for JavaScript Object Notation. JSON files are what XML files were originally supposed to be. They are often thought of as an “imporvement” on XML files.
Continue reading “JSON files”Decorator
Decorators in Python are functions that modify other functions. If we need to modify a lot of functions all at once with a minimum of coding, we should use a decorator. A decorator allows us to modify the behavior of a function without changing the codes inside of the function permanently.
Continue reading “Decorator”Python DeBugger
When we are coding, there are always some potential mistakes or errors. Even though we look back to the codes, we still may not be able to find them. In this case, a debugger is very useful. A debugger is a tool that help us test or debugger our programs ideally line by line. The main use of a debugger is to run the target program under controlled conditions that permit the programmer to track its execution and monitor changes in computer resources that may indicate malfunctioning code.
Continue reading “Python DeBugger”Python Try Except
When we are making a program, it’s possible to be interrupted bu some mistakes. These mistakes are sometimes called errors in Python. These errors in python can be Syntax errors and Exceptions. A error in the program will cause the program stop execution. On the other hand, exceptions are raised when some internal events occur which changes the normal flow of the program.
Continue reading “Python Try Except”Sorting algorithm
Sorting a always an improtant topic in computer science. A sorting algorithm is an algorithm that puts elements of a list into an ascending or descending order. Efficient sorting is important for optimizing the efficiency of other algorithms that require input data to be in sorted lists. Sorting is also useful for producing human-readable outputs.
Continue reading “Sorting algorithm”Binary Tree
Binary tree is like linked list where each node connects to at most two other nodes. Binary tree is a good example of a recursive data structure. Binary trees have multiple applications in computer science, including Binary Search Trees (BST), the Heap Sort algorithm, and other search/ sorting algorithms for data.
Continue reading “Binary Tree”Linked list, stack, and queue
A linked list is an important programming concept that underlies a lot of modern data structures. Linked List is a linear data structure, in which elements are not stored at a contiguous location, rather they are linked using pointers. Linked List forms a series of connected nodes, where each node stores the data and the address of the next node.
Continue reading “Linked list, stack, and queue”Generator
Generators in Python are essentially functions that using “yield” keyword instead of “return”. The trick is that “yield” does not end the function and a function can “yield” infinitely many things. The main down side is that we can’t simply call the generator to access all the output. Instead, we can iterate over the output inside a loop. The main advantage of a generator is the fact that its output is generated on demand. Normally, the variables that we defined need a place in memory to store it. Imagine a huge list contains millions of items inside, That requires a huge amount of memory to store and it will wake a long time to iterate it. But the output of a generator is not stored in memory by default, therefore, it would save tons of memory when dealing with large amounts of data.
Continue reading “Generator”