Posts by Pavlo (62)

Statistics in Python - Generating Random Numbers in Python, NumPy, sklearn, and seaborn

In a Deep Dive course Part I by Fred Baptiste I learned about how to generate random numbers and use seeds, choice, and sample. However, I wanted to get a deeper understanding of the subject. Therefore, I took additional three tutorials on this subject. o The first intermediate-level tutorial I completed is the “Generating Random Data in Python (Guide)” offered by Real Python. The instructor of the tutorial is Brad Solomon. In this tutorial I learned about: • How Random is Random? • Cryptographically Secure Pseudorandom Number Generator (CSPRNG) – os.urandom(), secret, uuid • Pseudorandom Number Generator (PRNG) • PRNG vs TRNG • PRNG vs CSPRNG • Use numpy.random and numpy.set_printoptions() You can find this tutorial at https://realpython.com/python-random/ o The second intermediate-level tutorial I completed is the “Statistics in Python — Generating Random Numbers in Python, NumPy, and sklearn” offered by Towards Data Science dot com. The instructor of the tutorial is Wei-Meng Lee. In this tutorial I learned about: • How to use matplotlib to visualize distributions • Generate random numbers in Python • Uniform distribution • Normal or Gaussian distribution • Linearly distribution using sklearn 2D plot • Linearly Distribution using sklearn 2D plot Interpolation • Linearly Distribution using sklearn 3D plot • Generating random numbers that cluster around centroids 2D • Generating random numbers that cluster around centroids 3D • Generating Correlated Data • Seeding your Random Number Generator You can find this tutorial at https://towardsdatascience.com/statistics-in-python-generating-random-numbers-in-python-numpy-and-sklearn-60e16b2210ae o The third intermediate-level tutorial I completed is the “Normal Distribution Vs Uniform Distribution” taught by Ankit at “thatascience”. It provided the code for generating and plotting Normal vs Uniform distribution using Numpy, matplotlib, seaborn and random. You can find this tutorial at https://thatascience.com/learn-numpy/normal-vs-uniform/

Type Checking in Python

I completed “Python Type Checking (Guide)” intermediate-level tutorial offered by Real Python. The instructor of the tutorial is Geir Arne Hjelle. Using type hints makes it easier for you to reason about code, find subtle bugs, and maintain a clean architecture. In this tutorial I learned about: • Type Systems • Pros and Cons • Annotations • Sequences and Mappings • Type Aliases • Functions Without Return Value • The any Type • Type Theory • Type Variables • Duck Types and Protocols • The Optional Type • Example: A Deck of Cards • Example: The Object(ive) of the Game • Type hints for Methods • Class as Types • Returning self or cls • Annotating *args and **kwargs • Callables • The Mypy project and running Mypy • Adding Stubs • Typeshed • Using Types at Runtime You can find this tutorial at · https://realpython.com/python-type-checking/

Building Command Line Interface with Click and Argparse

In a Deep Dive course Part I by Fred Baptiste I learned about how to use sys.argv and module argparse. However, I wanted to get a deeper understanding of the subject. Therefore, I took additional two tutorials on this subject. o The first intermediate-level tutorial I completed is the “How to Build Command Line Interfaces in Python With argparse” offered by Real Python. The instructor of the tutorial is Davide Mastromatteo. In this tutorial, I learned how to: • Setting the Name of the Program • Displaying a Custom Program Usage Help • Displaying Text Before and After the Arguments Help • Customizing the Allowed Prefix Chars • Setting Prefix Chars for Files That Contain Arguments to Be Included • Allowing or Disallowing Abbreviations • Using Auto Help • Setting the Name or Flags of the Arguments • Setting the Action to Be Taken for an Argument • Setting the Number of Values That Should Be Consumed by the Option • Setting a Default Value Produced if the Argument Is Missing • Setting the Type of the Argument • Setting a Domain of Allowed Values for a Specific Argument • Setting Whether the Argument Is Required • Showing a Brief Description of What an Argument Does • Defining Mutually Exclusive Groups • Setting the Argument Name in Usage Messages • Setting the Name of the Attribute to Be Added to the Object Once Parsed o The second intermediate-level tutorial I completed is the “Building Command Line Applications with Click” offered by Armin Ronacher on Youtube. He is a software programmer and the creator of the Flask web framework for Python. What makes Click special is that you can use decorators. In this tutorial I learned how to: • Create a proper piping package • Set up the entry points • Set the default • Add help strings, write this into a string • Set the default to dash • Attache a soft mount • Pass the verbose flag • Build very complex application displays You can find these tutorials at · https://realpython.com/command-line-interfaces-python-argparse/ · https://www.youtube.com/watch?v=kNke39OZ2k0&ab_channel=ArminRonacher

Plotting Complex Numbers in Python with NumPy, matplotlib

In a Deep Dive course Part I by Fred Baptiste I learned about how to use complex numbers in Python. However, I wanted to get a deeper understanding of the subject. Therefore, I took additional two tutorials on this subject. o The first intermediate-level tutorial I completed is “Complex Numbers” created by Frank Zalkow and Meinard Muller at Audiolabs-Erlangen. This tutorial review some properties of complex numbers. In particular, we need complex numbers in view of a complex-valued formulation of the Fourier transform, which significantly simplifies the proof and the understanding of certain algebraic properties of this transform In this tutorial I learned about: • Plotting complex numbers using NumPy and matplotlib • Polar Representation • Plot Complex Operations like multiplication, conjugation, inverse • Polar Coordinates Plot • Plot Rotate Complex Number • Plot Roots of Polynomial • Plot Mandelbrot Set You can find this tutorial at · https://www.audiolabs-erlangen.de/resources/MIR/FMP/C2/C2_ComplexNumbers.html o The second intermediate-level tutorial I completed is “How to plot complex numbers (Argand Diagram) using matplotlib” at Stack overflow. In this tutorial I learned about: • Plotting complex numbers using NumPy and matplotlib • Argand Diagram • Polar plot You can find this tutorial at · https://stackoverflow.com/questions/17445720/how-to-plot-complex-numbers-argand-diagram-using-matplotlib

Abstract Base Class (ABC) in Python

I completed the tutorial by Raymond Hettinger “Build powerful, new data structures with Python's abstract base classes” offered by YouTube. In this tutorial I learned: • What Abstract Classes are all about • Strategies for using ABCs (pure abstract classes, the framework design pattern, mixin classes) • What purpose ABS server • You can use, class abs.ABC. abc module provides the metaclass ABCMeta for defining ABCs and a helper class ABC to alternatively define ABCs through inheritance. Please refer to https://docs.python.org/3/library/abc.html • You can use Python collections module (collections.abc) that has a reach collection of mixins. This is a “Myth of the 10X Programmer”. Can very easily implement different protocols like Sequence, Set, Mapping, Iterator, and many more. Please refer to https://docs.python.org/3/library/collections.abc.html • Example of Usage of Abstract Base Class: · Data Validation framework: https://docs.python.org/3/howto/descriptor.html#complete-practical-example · BitSet provides memory-efficiency · FileDict is a dictionary that is sharable between processes and can be inspected externally while a program is running. · SQLDict. This dictionary variant uses a database as the underlying store. Allows sharing the dictionary.

1 ... 10 11 12 13

Our Sidebar

You can put any information here you'd like.

  • Latest Posts
  • Announcements
  • Calendars
  • etc