Sign in

How To Calculate If The Year Is Leap Year and How Many Days Are In The Month #PurePythonSeries — Episode #05

Fig 1. Image from What Is a Leap Year? By

Who determined which months would have 30 or 31 days?

A leap year (also known as an intercalary year or bissextile year) is a calendar year that contains an additional day.

A year that is not a leap year is a common year.

In the Gregorian calendar, each leap year has 366 days instead of 365, by extending February to 29 days rather than the common 28. These extra days occur in each year which is an integer multiple of 4 (except for years evenly divisible by 100, but not by 400). The leap year of 366 days has 52 weeks and two days, hence the year following a leap…

A Complete Notebook Review #PurePythonSeries — Episode #04


(1) Series

(2) DataFrame

(3) Conditional Selection

(4) Set and Reset Index

(5) Missing Data

(6) Group By

(7) Cross Section

(8) Pivot Table

(9) Merging, Joinning and Concatenation

1 — PANDAS Series — How to Create From…

import pandas as pd

Let’s create four artifacts to see how to create a Series:

First, a List:

labels = ['a','b', 'c']

Second, another List:

my_data = [10,20,30]

Third, a Numpy array:

import numpy as nparr = np.array(my_data)

And Finally, forth, a Dictionary:

dict = {'a':10, 'b':20, 'c':30}

Create Series FROM LISTS

pd.Series(data=my_data, index=labels)a    10
b 20
c 30
dtype: int64

Or, ordering, first data, then labels:

pd.Series(my_data, labels)a…

Manage Your Lovely Photos With Python! #PurePythonSeries — Episode #03

What is file manipulation?

So, file manipulations — creating a file, removing a directory, etc. — are very common operations in Python.

In this tutorial, let’s see some useful file manipulation commands and learn how to use them, specifically Modules: os and pathlib

Challenge — Make it Yourself!

Distribute the 20 .jpg images into the following directories:            - electronics
- inspiration
- cities
- nature
- trips
- university
According to the theme column of MS Excel Worksheet headers (03_file_manipulation_techniques.xlsx):Download all files belowSee the program working in gif below:
Gif 1 . Program working, creating a directory, and manipulating the files.

How To Create An Email Trigger System in Python — #PurePythonSeries — Episode #02

How does Python integrate with Outlook?

fig 0. PS Art: João Pedro Nogueira Oliveira
In this post, you’ll learn how to use the email package to send emails with MS Excel content and attachments using MS Outlook.

Python’s built-in email package allows you to structure more fancy emails, which can then be transferred with SMTP as you have done already.

01#Step — Test OUTLOOK

import win32com.client as win32outlook = win32.Dispatch('outlook.application')mail = outlook.CreateItem(0)
mail.To = '****'
mail.Subject = 'OUTLOOK test'
mail.Body = '''
This is a test for OUTLOOK.
If you receive this,

How To Send Gmail In Python — #PurePythonSeries — Episode #01

In this post (download Jupyter nb below):

We will learn how to send an email in gmail using python and jupyter notebook. Let's get it on!

First thing first:

1 - Get An Gmail Account;
2 - Turn on "Less secure app access" :/
Notes: 1 - This setting is not available for accounts with 2-Step Verification enabled. Such accounts require an application-specific password for less secure apps access. Learn more2 - Because less secure apps can make your account more vulnerable, Google will automatically turn this setting off if it’s not being used.3 - If "Less secure…

Python Lambda Desmistification — #PurePythonSeries — Episode #00

This post attempts to demystify Lambda in Python.
Fig 1. Lambda Expression: lambda function:iterable

Simply put, a lambda function is just like any normal python function, except that it has no name when defining it, and it is contained in one line of code. A lambda function evaluates an expression for a given argument. You give the function a value (argument) and then provide the operation (expression) — From


HowTo To Get A Lambda Expression just from times2 funtion?

Here is the original function:

def times2(var):
return var*2

The times2 function can be written in one line:

Rewritting it in one line:

def times2(var):return var*2

How to use kaggle Notebook to Study Python — #PySeries#Episode 36

Hi, did you know that the kaggle platform offers a notebook for you to play with Python, free to learn?

Fig 1. Python’s List and Tuple Exercise . Welcome! \o/

Our tasks here:

Let's say your company wants to research the cell phones that receive the most reviews on the Amazon website:Gathering Data: from Amazon Cell Phones Reviews by Griko Nibras (or download it from my google drive link below)Preparing That Data: cleaning, analysis, and visualizationEvaluating it: I will use Python's List. I'll load sold quantities (just for fun); I will transform List to Tuple, since List archetecture is not so robust as Tuple, right? …

How To Format Strings in Python #PySeries#Episode 35

Hi, this is a quick note about strings in python.

Fig 1. Phyton quick notes about string formatting

Let’s get it on?

String Interpolation → Injects a variable into your string printing

. format()
. f-strings
print('This is a string {}'.format('INSERTED'))This is a string INSERTED

Multiples strings — when order matters!

print('{} {} {}.'.format('brown', 'quick', 'fox') )brown quick fox.

Positional arguments:

print('{1} {0} {2}.'.format('brown', 'quick', 'fox') )quick brown fox.

Or keywords arguments:

print('{q} {b} {f}'. format(b = 'brown', q = 'quick', f = 'fox'))quick brown fox

Float formatting follows “{value: width.precision f}”

result = 100/777

Printing directly:

print("The result was {}".format(result))The result was 0.1287001287001287

Or formatting the number:

print("The result was {r:1.3f}".format(r = result))The result was 0.129


How To Install your First RoR App on Heroku — RoRSeries Episode #00

In this post, we will install RubyOnRails App on Heroku using Ubuntu 20.04 LTS and MS WSL 2.

Here is the final result:

Fig 1. My Website running on Heroku host. Just Cool, right? try it:

Be patient! It takes some time to load…free! Not a problem! Please take a look around the site and its functionalities.

Now, let’s see how to get it yourserf!

00# Step — Install Windows Subsystem for Linux Installation Guide for Windows 10;

Please follow the Microsoft tutorial.

01# Step — Now you can install Windows Terminal:

This tool has become a standard service for users who now access tools such as Command Prompt, Windows Power Shell, and…

Which Method Converges Fast? — SheetsSerie # Episode #02

Hi, we will use calc from google to finding roots.

What is Root-finding algorithms?

In mathematics and computing, a root-finding algorithm is an algorithm for finding zeroes, also called “roots”, of continuous functions.

In this series we going to peruse each options in a workable worksheet:)

regula falsi
The motion of a particle is studied by a space engineer. The engineer arrives at a function that describes the particle's position in space.
Fig 1. Being f(t) given in meters and t in seconds
But the astrophysicists are then able to use those observations to explore the physics of gravity, to observe the actions of this fundamental particles, so he…


Hi, Guys o/ I am J3! J of Jungle + 3 Plats Arduino/RPi/Pic; I am just a hobbyist, making studies in electronics to come up with an invention. Welcome! Join me!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store