Skip to content

Latest commit

 

History

History
95 lines (48 loc) · 3.06 KB

README.md

File metadata and controls

95 lines (48 loc) · 3.06 KB

Weekly Python Exercises (Jan 2018)

range_solution - using range function in Py2 and Py3 styles.

travel_solution - ask user for input on cites, countries visited and provide report. Interesting part is the formatting and counting of cities visited.

log_solution - log parsing solution using str splits and also looking at regex

log_filtering - log parsing solution using class and with filtering capabilties.

PRNE - coding examples from Cisco PRNE class

csv_solution - working with raw json data, convert into csv files.

nested_comprehensions - working with nested list and set comprehensions.

wedding_planner - using class and namedtuple. Complex project

directory_solution - parse directory and check file length, return success/fail dictionaries

multiziperator - solution to make different sized lists and zip / interate print out

tee_solution - write output to stdout and multiple files at the same time.

hashing - obtain MD5 of file in a directory

get_history - create class to keep values using property

checkpickle - using Pickle using a small address book

all_word_count - experiment using threads* (not complete)

threshold_equal - create a class with a forgiving equality comparison

magic_tuples - create an interator of tuples

formatted_cart - using print format templates

password_checker - take a password and check if it meets criteria. Uses nested functions

head_tail - using argparse to view head/tail of a file

itemgetter - revisit itemgetter, using sort, uses nested functions

once_per_minute - create a decorator when applied to a function would ensure that the function can be called no more than once per minute

str_range - create an iterator to go over a range of strings

percentage - looking into descriptors

serial_mix - use mixin classes for pickle, xml, json and csv

better_repr - create class with better repr output

abstract_payment - working with abstract base class

uniquish - checking to see if dicts/sets are hashable

tamperfind - walk a dir and create sha on all files with time stamp to see if they've been tampered with.

tampersave - continuation from tamperfind using classes. pre26.1.py example is most complete

tamperserve - basic flask part 1

tamperserve3 - client server of tampersave

betterrepr - using decorator to accept arguments in context of functions

mypy_payment - using mypy for type checking

tr - unix util style translation of strings

beautifulsoup - parse html and compare words to local word dictionary

zip_tar - working with tar files converted to zip

immutable_me - create class, define vars with init and make immutable when change attempted.

tcp-client-server : simple tcp socket program

socket-file: tcp socket program. Server reads functions in from disk at client requests

appointments-sql: using sqlite3 with python

appointment-holiday: using sqlite, identify holidays

video-file-state: using various libraries to provide file stats

mypypy - decorator that takes arguements.

meeting-rooms : program to add meeting rooms and check for dates.

loan-interest : loan interest program

enum-cards: using Enum with cards example