Author

Bashir Alam

Bashir Alam

Data Analyst and Machine Learning Engineer

at · 187 articles published

Computer Science graduate from the University of Central Asia, currently employed as a full-time Machine Learning Engineer at uExel. His expertise lies in OCR, text extraction, data preprocessing, and predictive models.

Areas of expertise

Certifications & credentials

  • Python with Projects
  • C ProgrammingID: UC-a19ba210-767a-47de-a588-96f03d34a185
  • Master of the Basics Python TkinterID: UC-f065c334-f080-4eef-a112-4d2687053570
  • Frontend EssentialsID: 14427917
Author profile illustration for Bashir Alam — technical writer at GoLinuxCloud

Articles by Bashir Alam

programming

Python *args and **kwargs

Learn Python *args and **kwargs with simple examples. Understand positional arguments, keyword arguments, how to iterate over kwargs, and how to pass args and kwargs to another function.

Bashir Alam4 min read
programming

Python Join List

Learn how to join a list in Python using str.join(), including lists of strings, numbers, mixed values, separators, newline joins, and common TypeError fixes.

Bashir Alam5 min read
programming

Python isupper() Method

Learn Python isupper() method with examples. Check if a string is uppercase, understand return values for numbers, symbols, spaces, empty strings, and compare isupper() with upper(), islower(), and isalpha().

Bashir Alam4 min read
programming

Python Get Home Directory

Learn how to get the current user's home directory in Python using pathlib Path.home(), os.path.expanduser('~'), and environment variables like HOME and USERPROFILE.

Bashir Alam5 min read
programming

Python filter() Function

Learn Python filter() function with simple examples. Filter lists, strings, dictionaries, and objects using normal functions, lambda functions, filter(None), and list comprehension alternatives.

Bashir Alam6 min read
programming

Python for Loop in One Line

Learn how to write a Python for loop in one line using list comprehension, generator expressions, for with if condition, if else expression, and simple inline loop examples.

Bashir Alam5 min read
programming

Python Flatten List

Learn how to flatten a list of lists in Python using list comprehension, itertools.chain.from_iterable, nested loops, recursion for deep nesting, and NumPy, plus when to avoid sum() on large data.

Bashir Alam4 min read
programming

Python ceil() Function

Learn Python ceil() using math.ceil() with examples for positive and negative numbers, ceiling division, ceil vs floor, integers, floats, and common mistakes.

Bashir Alam6 min read
programming

Python Class Example

Learn Python classes with simple examples to create a class, create objects, use __init__ and self, define attributes and methods, class variables, inheritance, and common mistakes.

Bashir Alam7 min read
programming

Get Size of Priority Queue in Python: qsize, empty, and maxsize

Learn how to get the size of a Python PriorityQueue with qsize(), compare it to empty() and full(), understand approximate counts under threads, and relate current size to maxsize.

Bashir Alam6 min read
programming

Python Delete File

Learn how to delete a file in Python using pathlib Path.unlink(), os.remove(), and os.unlink(), including delete-if-exists examples, error handling, and deleting all files in a folder.

Bashir Alam7 min read
programming

Python property deleter

Learn how Python property deleter works with @property, @name.setter, and @name.deleter, including how del obj.attr calls the deleter method and common mistakes.

Bashir Alam5 min read
programming

Python Exit Program

Learn how to exit a Python program or script using sys.exit(), exit(), quit(), return, and break, including exit codes, messages, functions, loops, and common mistakes.

Bashir Alam6 min read
programming

Python Delete Variable

Learn how to delete a variable in Python using del, what happens after deleting a variable, how to clear variables, unset names, and whether del frees memory immediately.

Bashir Alam7 min read
programming

How to Get File Size in Python: pathlib, os.path, and bytes

Learn how to get file size in Python with os.path.getsize, pathlib Path.stat, and os.stat, convert bytes to KB or MB, guard large or empty files, handle errors, and sum folder sizes.

Bashir Alam6 min read
programming

Python Counter

Learn Python Counter from the collections module with examples to count items, words, characters, add elements, update counts, use most_common(), elements(), subtract(), and Counter arithmetic.

Bashir Alam9 min read
programming

Python classmethod: @classmethod, cls, and Factory Methods

Learn Python classmethod with examples using @classmethod, cls, class variables, factory methods, return cls, and the difference between class methods, instance methods, and static methods.

Bashir Alam8 min read
programming

Python Catch Multiple Exceptions

Learn how to catch multiple exceptions in Python using one except block with a tuple, separate except blocks, as e, else, finally, and best practices for handling multiple errors.

Bashir Alam5 min read
programming

List Comprehension in Python with Examples

Learn Python list comprehension: syntax, filters, if-else, range and strings, nested and multiple for loops, flattening lists of lists, map and filter alternatives, pitfalls, and a quick reference table.

Bashir Alam10 min read
programming

Python map() Function with Examples

Learn Python map() function with examples using custom functions, lambda, built-in functions, multiple iterables, string conversion, list conversion, and map vs list comprehension.

Bashir Alam6 min read
programming

Python List pop() Method: Remove and Return Items

Learn how Python list pop() removes and returns items by index, defaults to the last item, handles pop(0), raises IndexError, and compares with remove(), del, and clear().

Bashir Alam9 min read
programming

Get File Extension in Python: pathlib, os.path, and edge cases

Learn how to get a file extension in Python using pathlib (suffix, suffixes), os.path.splitext, case-insensitive checks, multi-part names like .tar.gz, and common pitfalls.

Bashir Alam4 min read
programming

Python Line Continuation: Continue Code on the Next Line

Learn how Python line continuation works using parentheses, brackets, braces, and backslash, with examples for long expressions, strings, lists, function calls, and common errors.

Bashir Alam7 min read
programming

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.

Bashir Alam8 min read
programming

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.

Bashir Alam7 min read
programming

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.

Bashir Alam6 min read
programming

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.

Bashir Alam7 min read
programming

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.

Bashir Alam7 min read
programming

Python floor() Function Explained (math.floor, Examples, vs int & round)

Learn how to use floor() in Python with practical examples. Understand math.floor(), differences between floor vs int vs round, handling negative numbers, Pandas and NumPy usage, and common errors. Includes syntax, …

Bashir Alam6 min read
programming

Java Arrays vs Collections Explained with Practical Examples

Learn the differences between arrays and collections in Java with practical examples. This guide explains how to create arrays, initialize lists, print arrays, determine collection size, and work with common Java …

Bashir Alam11 min read