Short Program using Transavia's API to notify via email an user waiting for a flight at special dates and with the best price

Overview

Flight-Notifier

Short Program using Transavia's API to notify via email an user waiting for a flight at special dates and with the best price

Algorithm returning a list which contains all the days between the day of the function call and an asked limit date:

These are Python functions which can be linked together to get a full list or separately to get different informations according to different parameters. For a fully functional program you need to work with the library datetime

# Function checking whether it is a leap year or not:
def bissextile():
    year = int(datetime.today().strftime('%Y'))
    if year%4==0:
        if year%100==0 and year%400==0 or year%100!=0:
            return 1
    return 0
# Function returning the number of days in a month according to the given month in parameter:
def lenMonth(m):
    dayArray = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
    if  m-1==1:
        return dayArray[m-1] + bissextile()
    else:
        return dayArray[m-1]
# Function checking if the program went through all the days between the day of the request and the limit date:
def checkYear(val,month,day):
    ar = val[len(val)-1].split("-")
    if int(ar[1])==month and int(ar[2])==day:
        ret = val
        return(ret)
    else:
        return checkMonth(val)
# function checking if the program went through all the days of one month :
def checkMonth(val):
    ar = val[len(val)-1].split("-")
    if int(ar[2]) == lenMonth(int(ar[1])):
        return newDay(val,True)
    else:
        return newDay(val)
# function adding a new day to the final day:
def newDay(val,bool=False):
    ar = val[len(val)-1].split("-")
    if bool:
        d = ar[0]+"-"+str(int(ar[1])+1).zfill(2)+"-01"
        val.append(d)
        return checkYear(val)
    else:
        d = ar[0]+"-"+ar[1]+"-"+str(int(ar[2])+1).zfill(2)
        val.append(d)
        return checkYear(val)
Owner
Wassim
Wassim
Shedding a new skin on Dis-Snek's commands.

Molter - WIP Shedding a new skin on Dis-Snek's commands. Currently, its goals are to make message commands more similar to discord.py's message comman

Astrea 7 May 01, 2022
Awslogs - AWS CloudWatch logs for Humans™

awslogs awslogs is a simple command line tool for querying groups, streams and events from Amazon CloudWatch logs. One of the most powerful features i

Jorge Bastida 4.5k Dec 30, 2022
Python gets the friend's articles from hexo's friend-links

你是否经常烦恼于友链过多但没有时间浏览?那么友链朋友圈将解决这一痛点。你可以随时获取友链网站的更新内容,并了解友链的活跃情况。

129 Dec 28, 2022
trackbranch is a tool for developers that can be used to store collections of branches in the form of profiles.

trackbranch trackbranch is a tool for developers that can be used to store collections of branches in the form of profiles. This can be useful for sit

Kevin Morris 1 Oct 21, 2021
Building and deploying AWS Lambda Shared Layers

AWS Lambda Shared Layers This repository is hosting the code from the following blog post: AWS Lambda & Shared layers for Python. The goal of this rep

Flaneer 7 Dec 02, 2021
A powerfull Telegram Leech Bot

owner of this repo :- Abijthkutty contact me :- Abijth Telegram Torrent and Direct links Leecher Dont Abuse The Repo ... this is intented to run in Sm

αвιנтн 9 Jun 11, 2022
Botto - A discord bot written in python that uses the hikari and lightbulb modules to make this bot

❓ About Botto Hi! This is botto, a discord bot written in python that uses the h

3 Sep 13, 2022
Spore Api

SporeApi Spore Api Simple example: import asyncio from spore_api.client import SporeClient async def main() - None: async with SporeClient() a

LEv145 16 Aug 02, 2022
Набор утилит для Discord с использованием языка программирования Python.

Discord Tools v0.1 Functions: WebHook spamer Spotify account generator (What?) QR Code Token stealer Token generator Discord nitro gen/check Discor to

Максим Скризов 3 Aug 23, 2022
Powerful Telegram Members Scraping and Adding Toolkit

🔥 Genisys V2.1 Powerful Telegram Members Scraping and Adding Toolkit 🔻 Features 🔺 ADDS IN BULK[by user id, not by username] Scrapes and adds to pub

The Cryptonian 16 Mar 01, 2022
HackerNews and Reddit in one placce

EDIT: this project is 3.5 years old. I found it sad it's just laying around, so I did some minimal fixes and deployed it. Hope you enjoy! (PR's welcom

Hugo Montenegro 1 Nov 13, 2021
How to make a QR Code of your own in python

QR CODE Bilgilendirme! " pip install qrcode pillow " kurmalısınız.

Aktali 1 Dec 24, 2021
Dribble sign up screen built in python and kivy

Dribble sign up screen built in python and kivy contains Dribble icon with icon position and shadow animation.

1 Dec 06, 2021
Python library for RetroMMO related stuff, including API wrapper

python library for RetroMMO related stuff, including API wrapper.

1 Nov 25, 2021
This script will detect changes in your session using Discords built in Gateway.

Detect Session Gateway This script will detect changes in your session using Discords built in Gateway. What does this log? Discord build version Oper

Omega 5 Dec 18, 2021
Monetize your apps with KivAds using Google AdMob api.

KivAds(WIP) Monetize your apps with KivAds using Google AdMob api. KivAds uses the latest version of Google AdMob sdk(version 20.0.0). KivAds exposes

Guhan Sensam 16 Nov 05, 2022
Official API documentation for Highrise

Highrise API The Highrise API is implemented as vanilla XML over HTTP using all four verbs (GET/POST/PUT/DELETE). Every resource, like Person, Deal, o

Basecamp 128 Dec 06, 2022
Aio-binance-library - Async library for connecting to the Binance API on Python

aio-binance-library Async library for connecting to the Binance API on Python Th

GRinvest 10 Nov 21, 2022
Telegram Google Translater Bot Can Translate Any Language To Your Selected Language

🔰 TELEGRAM GOOGLE TRANSLATER 🔰 • ⚡ INSTALLING ⚡ • • ✅ OFFICIAL SUPPORTS ✅ •

⚝ANKIT KUMAR⚝ 2 Jan 16, 2022
A Rich renderable for viewing Multiple Sequence Alignments in the terminal.

rich-msa A simple module to render colorful Multiple Sequence Alignment with rich in the terminal. 🔧 Installing Install the rich-msa package directly

Martin Larralde 64 Dec 04, 2022