yuval.guide
open-menu closeme
courses
topics icon
linux bash python git containers k8s aws terraform checkpoint jenkins prometheus
About
github linkedin
  • Generators

    calendar Apr 10, 2024 · 2 min read · python  ·
    Share on: twitter facebook linkedin copy

    If you were following the

    Iterators post, you could think that creating iterable object or generators (that could provide an iterator) in python is not so easy. You should be able to create a class, then implement those special methods, make sure everything works..
    But there are easier ways.

    Creating a …


    Read More
  • Iterators

    calendar Mar 27, 2024 · 2 min read · python  ·
    Share on: twitter facebook linkedin copy

    In this basic post we'll explain the basics of iterators.

    A Python Iterator

    • If a python object contains some collection of objects, we need a way to get these object, one at a time.
    • Note that:
      • A specific order is optional, but we must make sure that:
      • ..we get each object ONCE, and..
      • ..eventually we get ALL objects. …

    Read More
  • Function Parameters Default Values

    calendar Mar 25, 2024 · 2 min read · python  ·
    Share on: twitter facebook linkedin copy

    We have covered default values for parameters during our discussion of

    function parameters.
    We now want to explain some more details about that.

    Python IS dynamic

    • If you are coming from static programming languages (C, C++, Java, C#, Rust, Golang etc..) then you should remind yourself that in python EVERYTHING …

    Read More
  • Function Decorators With Parameters

    calendar Mar 25, 2024 · 1 min read · python  ·
    Share on: twitter facebook linkedin copy

    In this example, we create a decorator that will multiply a value returned by a 2 parameters func by a value.

    What we want to achieve

    • Suppose you have a decorator and a function like the following:
    1@mult(5)
    2def add_nums(a,b):
    3    return a+b
    
    • The idea is that instead of having add_nums(3,4) return 7, it will return …

    Read More
  • Python bytes

    calendar Mar 17, 2024 · 2 min read · python  ·
    Share on: twitter facebook linkedin copy

    About bytes

    • The python bytes type represents abinary sequence of bytes.
    • I use the term "binary" because it is sometimes displayed as a sequence of characters, but it it not text, not it it a string!
    • bytes is immutable, whereas bytearray is a mutable version of it.

    representation

    • A bytes object looks like …


    Read More
  • Flask Getting Started

    calendar Mar 17, 2024 · 2 min read · python  ·
    Share on: twitter facebook linkedin copy

    The tasks project

    • Flask is a micro web framework.
    • You can use it to create web sites, but also to create web services, which are programs that communicate over the http protocol.
    • We'll use it here to create a simple web service and api.
    • In our api, we'll send and receive JSON strings to represent tasks …


    Read More
  • Function Decorator Basics

    calendar Mar 13, 2024 · 2 min read · python  ·
    Share on: twitter facebook linkedin copy

    Function decorators are used in many python packages and libraries. Often, you see the @ sign in code before you learn what it is, so you get back to read about decorators.
    We'll use a simple example to demonstrate the use of decorators.

    What do we try to achieve

    • Suppose you have a simple, 2 params function like the …

    Read More
  • Open Function

    calendar Mar 12, 2024 · 1 min read · linux  ·
    Share on: twitter facebook linkedin copy

    Open Function Basics

    • The open function documentation contains a lot of parameters
    • The only positional parameter (file) specifies the path of the file to be read.


    Read More
  • Python Top

    calendar Mar 12, 2024 · 1 min read · python  ·
    Share on: twitter facebook linkedin copy

    Python Basics

    • Creating Python virtual environments with Python venv

    • Values and Vars

    Python builtin Types

    • bytes

    Python Functions

    • function parameters

    • function parameters default values

    • function decorators basics

    • function decorators with parameters

    Python Object Oriented …


    Read More
  • Values and Vars

    calendar Mar 6, 2024 · 2 min read · python  ·
    Share on: twitter facebook linkedin copy

    The basic Truth of Python values and vars

    • All of the values in Python are really objects.
      You can think of objects as bags that contain the value itself, with some more operations that you can use with the value (these are called methods).
      We'll talk about object in more details in later posts.
    • Each object (i.e value) …


    Read More
    • ««
    • «
    • 1
    • 2
    • »
    • »»


Google ads

Tags

LINUX 24 AWS 18 GIT 16 JENKINS 16 BASH 14 CI/CD 14 K8S 12 PYTHON 11 TERRAFORM 10 KUBERNETES 9 CONTAINERS 6 PROMETHEUS 3 NETWORKING 2 SECURITY 2
All Tags
AWS18 AWS NETWORKING1 BASH14 CCSA1 CHECKPOINT1 CI/CD14 CONTAINERS6 DATA1 DEVOPS1 DOCKER1 EC21 EFS1 GIT16 IAM1 JENKINS16 K8S12 KUBERNETES9 LINUX24 NETWORKING2 PROMETHEUS3 PYTHON11 SECURITY2 STORAGE1 TCP/IP2 TERRAFORM10
[A~Z][0~9]
Created by Yuval Shaul

Copyright 2023-  CREATED BY YUVAL SHAUL. All Rights Reserved

to-top