/PythonUtils

A collection of Python exercises, utility functions and helpers

Primary LanguagePythonMIT LicenseMIT

Python Utils

Open Source Love GitHub Python 3.6 GitHub Stars LinkedIn

What is it ❓

This is a collection of my helper functions, implementations and exercises in python. Please see topics below for detailed explanations of whats in the Helpers, My Implements and Python Masterclass.

Helpers

Data Preprocessing:

Evaluation Metrics:

Google Cloud Helpers:

Image Preprocessing:

Intersection Over Union:

Pandas Helpers:

ResNet:

RetinaNet:

Setup:

My Implements

Closest Pair:

Graph Search:

Shortest Path:

Sort:

Spider:

Python Masterclass

To see the Exercises (click to expand...)

Exercise 1: A small program to ask for a name and an age.

Exercise 2: A program that takes an IP address entered at the keyboard and prints out the number of segments it contains, and the length of each segment.

Exercise 3: Guessing game.

Exercise 4: If the program finds a meal without spam it prints out each of the ingredients of the meal.

Exercise 5: Direction adventure game- Easy (Modify the program so that the exits is a dictionary rather than a list).

Exercise 6: Direction adventure game- Medium (Locations dictionary is modified so that everything is in a single dictionary).

Exercise 7: Direction adventure game- Hard (Modify to use shelves instead of dictionaries).

Exercise 8: Create a program that allows a user to choose one of up to 9 time zones from a menu.

Exercise 9: Write a GUI program to create a simple calculator.

Exercise 10: Using tkinter to draw a parabola and a bunch of circles

Exercise 11: Black Jack Challenge

Exercise 12: Write a Python function that takes a sequence of numbers and determines if all the numbers are different from each other.

Exercise 13: Write a Python program to remove and print every third number from a list of numbers until the list becomes empty.

Exercise 14: Write a Python program to print a long text, convert the string to a list and print all the words and their frequencies.

Exercise 1: Write a Python program to get the top stories from Google news. Exercise 1: Write a Python program to create all possible permutations from a given collection of distinct numbers Exercise 1: Write a Python program to get a string from a given string where all occurrences of its first char have been changed to $ except the first char itself. Exercise 1: Write a Python program to create a Caesar encryption Exercise 1: Write a python program to count repeated characters in a string Exercise 1: Write a Python program to reverse words in a string Exercise 1: Write a Python program to get the largest number from a list. Exercise 1: Write a Python function that takes two lists and returns True if they have at least one common member. Exercise 1: Write a Python program to select an item randomly from a list. Exercise 1: Write a Python program to find common items from two lists. Exercise 1: Write a Python program to convert list to list of dictionaries. Exercise 1: Write a Python program to remove key values pairs from a list of dictionaries. Exercise 1: Write a Python program to find the list in a list of lists whose sum of elements is the highest. Exercise 1: Write a Python program to remove duplicates from a list of lists. Exercise 1: Write a Python script to sort (ascending and descending) a dictionary by value. Exercise 1: Write a Python script to check if a given key already exists in a dictionary. Exercise 1: Write a Python script to print a dictionary where the keys are numbers between 1 and 15 (both included) and the values are square of keys Exercise 1: Write a Python program to multiply all the items in a dictionary. Exercise 1: Write a Python program to get the maximum and minimum value in a dictionary. Exercise 1: Write a Python program to find the highest 3 values in a dictionary. Exercise 1: Write a Python program to remove spaces from dictionary keys. Exercise 1: Write a Python program to add an item in a tuple. Exercise 1: Write a Python program to slice a tuple. Exercise 1: Write a Python program to convert a list of tuples into a dictionary. Exercise 1: Write a Python program to sort a tuple by its float element. Exercise 1: Write a Python program to create a set Exercise 1: Write a Python program to construct the following pattern, using a nested for loop. Exercise 1: Write a Python program to count the number of even and odd numbers from a series of numbers. Exercise 1: Write a Python program which iterates the integers from 1 to 50. For multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz". Exercise 1: Write a Python program which takes two digits m (row) and n (column) as input and generates a two-dimensional array. The element value in the i-th row and j-th column of the array should be i*j. Exercise 1: Write a Python program that accepts a string and calculate the number of digits and letters Exercise 1: Write a Python program to find majority element in a list. Exercise 1: Write a Python program to append text to a file and display the text. Exercise 1: Write a Python program to read last n lines of a file. Exercise 1: Write a Python program to read a file line by line store it into a variable. Exercise 1: Write a Python program to count the number of lines in a text file. Exercise 1: Write a Python program to combine each line from first file with the corresponding line in second file. Exercise 1: Write a Python script to display time data Exercise 1: Write a Python program to determine whether a given year is a leap year. Exercise 1: Write a Python program to convert unix timestamp string to readable date. Exercise 1: Write a Python program to print next 5 days starting from today Exercise 1: Write a Python program to select all the Sundays of a specified year. Exercise 1: Write a Python program to get days between two dates. Exercise 1: Write a Python program to reverse a string. Exercise 1: Write a Python function that accepts a string and calculate the number of upper case letters and lower case letters. Exercise 1: Write a Python function to check whether a string is a pangram or not. Exercise 1: Write a Python function that takes a list and returns a new list with unique elements of the first list.

Python For Everybody

To see the Exercises (click to expand...)