FAISS Python API Tutorial: IndexFlatL2, IndexIVFFlat, add, search, and remove_ids
Practical FAISS Python API guide: install faiss-cpu, NumPy float32 shapes, IndexFlatL2 and IndexFlatIP, add and search, IndexIVFFlat training and nprobe, IndexIDMap and remove_ids, save/load indexes, common dtype and …
Python Measure Execution Time: time, perf_counter, and timeit
Learn how to measure execution time in Python using time.perf_counter(), timeit, process_time(), and decorators, with examples in seconds, milliseconds, and nanoseconds.
Golang Struct Embedding: Composition, Promoted Fields, and Methods
Golang struct embedding and go struct embedding: anonymous embedded fields, promoted fields and methods per the Go spec, composition vs inheritance, pointer embedding, name conflicts, interface embedding, satisfying …
Python Marshmallow Tutorial: Schema, Fields, dump(), and load()
Learn Python Marshmallow with examples for creating schemas, using fields, serializing data with dump(), deserializing and validating data with load(), nested schemas, many=True, DateTime formatting, and common errors.
Golang Pointers Tutorial: Address, Dereference, nil, and Pointer Receivers
Learn pointers in Go: pointer types *T, address operator &, dereferencing, nil pointers, passing pointers to functions, pointer receivers, structs, slices and maps, and when not to use pointers.
Implement a Binary Search Tree in Python: insert, search, delete, traverse
Build a BST in Python with a Node class, iterative insert and search, inorder preorder postorder traversals, delete for leaf one-child and two-child nodes, duplicate policy, complexity, and common pitfalls.
Nested Dictionary in Python: Create, Access, Update, and Loop
Learn nested dictionaries in Python with examples to create, access, update, add, delete, loop through, flatten, and merge dictionary inside dictionary data.
Python Lambda & Anonymous Functions: Syntax, Examples, map(), filter(), sorted()
Learn Python lambda functions (anonymous functions): syntax, examples with multiple arguments, map(), filter(), sorted(), conditional expressions, limits, common mistakes, and when to use def instead.
Combine Two Arrays as Columns in NumPy: column_stack, hstack, and concatenate
Combine two lists or 1-D NumPy arrays into a two-column 2-D array using numpy.column_stack, with numpy.stack axis=1, numpy.hstack for column-shaped inputs, numpy.concatenate axis=1, row vs column stacking, shape rules …
Create Simple & Complex Python Package with Examples
This guide will lead you on how to create a Python package which includes setup, configuration, building and publishing. You will learn how to include more files, test locally and version control for successful …
Python any() and all() Functions: Check If Any or All Items Are True
Learn how Python any() and all() work with lists, strings, dictionaries, truthy and falsy values, generator expressions, short-circuiting, and common mistakes.
Golang Interface Tutorial: Examples, Implementation, and Type Assertion
Learn interfaces in Go with simple examples, including method sets, implicit implementation, interface parameters, empty interface, any, type assertion, printing interface values, composition, pointer receivers, and …
pip requirements.txt File: Create, Install, and Use with pip
Learn how to use a pip requirements.txt file to install Python dependencies with pip install -r, create the file manually or with pip freeze, add version constraints, and fix common errors.
Python Add to Dictionary: Add Key-Value Pairs, Update, and Append
Learn how to add to a dictionary in Python using key assignment, update(), setdefault(), |=, and dictionary unpacking, with examples for single keys, multiple keys, lists, nested dictionaries, and existing keys.
Merge Dictionaries in Python: |, update(), **, and More
Learn how to merge dictionaries in Python using the | operator, update(), ** unpacking, copy(), ChainMap, and more, with duplicate key behavior and Python version differences.
FileNotFoundError in Python: Causes, Fixes, and Path Examples
Learn what FileNotFoundError (No such file or directory, errno 2) means in Python, why it happens even when the file seems to exist, and how to fix it with correct paths, working directory, pathlib, symlinks, and …
How to Concatenate Tensors in PyTorch: torch.cat, stack, and shapes
Learn how to concatenate tensors in PyTorch with torch.cat along dim 0 or 1, torch.concat and torch.concatenate aliases, shape rules, stack vs cat, device errors, and a quick reference table.
strconv in Go: parse, format, quote, and common errors
strconv in Go: parse and format integers, floats, and bools, Quote and Unquote, bases with FormatUint and ParseInt, NumError with errors.Is, and when to prefer strconv over fmt.Sscanf.
Golang SHA-512: Sum512, hex, files, streams, salt verify, and SHA-256 comparison
Golang SHA-512 with crypto/sha512: Sum512 and hex, sha512.New streaming io.Copy, file checksum verify, streams vs one-shot, salt-and-hash demo with verification caveats, SHA-512 vs SHA-256, HMAC, use cases, passwords …
Golang Compare Strings: Equality, Ordering, and Case-Insensitive Match
Compare strings in Go with == and !=, lexicographic order with < and >, strings.EqualFold for case-insensitive match, strings.Compare for three-way results, and trimming input before comparing.
Golang Command Line Arguments: os.Args, Flags, and Examples
Read command-line arguments in Go with os.Args, use the flag package for named options, validate positional args, parse numbers safely, and understand go run vs a compiled binary.
What Is Ampersand in Golang? & and * Pointer Operators Explained
Learn what ampersand means in Go, how & gets a variable address, how * works with pointers, and how & and * are used together in simple examples.
Golang Variable Scope: Local, Package-Level, Global, and Block Scope
Learn variable scope in Go, including local variables, package-level variables, global-style variables, block scope, short declarations, shadowing, and best practices.
Go Import Underscore Explained: Blank Imports and Side Effects
Learn why Go uses underscore before an import path, how blank imports work, when packages are imported for side effects, and how this relates to unused import errors.
Golang Web Server Tutorial: Build and Configure an HTTP Server in Go
Learn how to build a Go web server using net/http, configure routes, handlers, ports, timeouts, static files, JSON responses, and graceful shutdown.
Golang Closure Function: Closures, Captured Variables, and Performance
Learn closures in Go: function values that capture outer variables, how they differ from anonymous functions, returned functions and state, goroutine loop pitfalls, and golang closure performance and escape analysis.
Golang WaitGroup: sync.WaitGroup Example, Add, Done, and Wait
Learn how to use sync.WaitGroup in Go to wait for goroutines, with Add, Done, Wait, WaitGroup.Go, common mistakes, and practical examples.
Golang Buffered Channel: Capacity, Blocking, and Buffered vs Unbuffered
Learn buffered channels in Go: make(chan T,n) capacity, len and cap, when send and receive block, buffered vs unbuffered channels, backpressure, deadlocks, choosing buffer size, and practical patterns.
Import Local Package in Go Without GOPATH: Step-by-Step Go Modules Example
Learn how to import a local Go package without GOPATH using go.mod, module paths, subfolders, exported names, replace directives, and go.work.
Golang Channel with Multiple Receivers: Workers, Fan-Out, and Safe Closing
Learn how multiple goroutines read from the same Go channel: each value is received once, fan-out worker pools, closing rules, result channels, buffered vs unbuffered, and why this is not broadcast.






