Posts

Final Project 4930

Daniel Tafmizi Dr. Friedman Lis 4930 July 19, 2024  Warren Buffett Stock Screener “The number one rule of investing is don’t lose money and the number two rule of investing is don’t forget rule number one.” - Warren Buffett GitHub -  lis4930/finalProjectBuffetModel.py at master · DanielDataGit/lis4930 (github.com)     Precursor: I have been investing in the stock market since the age of 16 (about 4 years). I began to truly use the markets at 18. Since, in about one and a half years, I have grown my portfolio by 15%. I hold a diversified portfolio that is mainly in tech and energy. About 50% stable, and 50% that might file bankruptcy yesterday. While this is a fine mix of risk for a 19-year-old, I have become wise about my future. At some point I will need to lay back on the high-risk tech stocks and focus on slow yet tangible growth. Thus, I am making a program that allows users to screen stocks like Warren Buffett. Many stock screeners are locked behind payed accounts. By using what I

Module 6 4930

Daniel Tafmizi Dr. Friedman Lis 4930 June 24, 2024 Module 6 GitHub link:  DanielDataGit/lis4930 (github.com) Comments: I did not run into much trouble completing the assignment questions. I did not rely on google as much as some of the previous assignments. The datetime module was easy to use. Questions: I was confused with what the first question asked. Did I answer it correctly? Can you use logical operators with datetime to subset data from a list?  from datetime import datetime from datetime import timedelta import sys for line in sys.stdin: data = line.strip().split( " \t " ) if len (data) == 6 : date, time, store, item, cost, payment = data # create local datetime object date_time = datetime.now() print ( "{0} \t {1} \t {2}" .format(item, cost, date_time)) # Add 1 day time1 = datetime.now() + timedelta( days = 1 ) print (time1) # Subtract 60 seconds from prior time2 = time1 - timedelta( seconds = 60 ) print (time2) # Add

Module 5 4930

Daniel Tafmizi Dr. Friedman Lis 4930 June 17, 2024 Module 5 GitHub link:  DanielDataGit/lis4930 (github.com) Comments: This is my first time using the class object maker. I see how this can be used to create efficient and reproducible objects. I appreciate the way python classes are constructed and customized. Furthermore, I am starting to enjoy using the pycharm IDE. At first, I had difficulty using the applications features, but I have become more nuanced towards them. The IDE's autocomplete helped me a few times in this assignment. Question: Is it respected to use the "posn" name as a local name in my functions? I re-used the name in my create and offset functions.  # module 5 assignment class Rectangle: """ A class to manufacture rectangle objects """ def __init__ ( self , posn, w, h): """ Initialize rectangle at posn, with width w, height h """ self .corner = posn self .width

Module 4 4930

Daniel Tafmizi Dr. Friedman Lis 4930 June 10, 2024 Module 4 GitHub link:  DanielDataGit/lis4930 (github.com) Comments: I enjoyed going back to my algebra days. It has been a while since I reviewed quadratic equations and had to do some googling. Overall, I did not run into much trouble with the prompts. For the second question I kept putting x/y instead of x/n, but I resolved the issue after some mental focusing.  Question: How can I prevent the "none" at the end of the incDenominator script? I resolved the issue. I was printing a print. import math def quadraticroots (a, b, c): # calculate discriminant discriminant = b ** 2 - 4 * a * c # plus minus sign fancysym = u" \u00B1 " # calculates roots based off of discriminant if discriminant > 0 : print ( f"The roots are: { (-b + math.sqrt(discriminant)) / ( 2 * a) } , { (-b - math.sqrt(discriminant)) / ( 2 * a) } " ) elif discriminant == 0 : print ( f"The ro

Module 3 4930

Daniel Tafmizi Dr. Friedman Lis 4930 May 27, 2024 Module 3 # 1: Write a function that takes in a person's name, and prints out a greeting. # list of friends friends = [ "John" , "Michael" , "Oliver" ] # list of greetings greetings = [ "hello [friend], how are you doing." , "Hows the weather treating you [friend]." , "How ya been [friend]." ] # goes through greetings for x in greetings: # goes through friends for y in friends: #replaces [friend] with friends (y) final = x.replace( "[friend]" , y) print (final) # 2: Full name function #function that accepts two objects def full_name (x,y): #Formats result by stripping white space on either end and creates greeting print ( "Hello, " + str .strip(x) + " " + str .strip(y)) full_name( "Daniel" , "Tafmizi" ) full_name( " Doctor " , " Friedman" ) full_name( "Abraha

Module 2 4930

 Daniel Tafmizi Dr. Friedman Lis 4930 May 27, 2024 Module 2 Assignment:  print ( 'Hello World' ) Hello World String1 = 'Welcome to the Geeks World' print ( "String with the use of Single Quotes: " ) print (String1) String with the use of Single Quotes: Welcome to the Geeks World It seems that the print and string functions work seamlessly. The string function offers a "playground" for modification and structuring. The print function allows the user to use the string in their program. The example above shows a simple use case. String1 holds a string, that is later called in the program. More advanced uses of this can begin handling user data or allow for manipulation techniques. Notes: Run python in cmd - I did not run into much trouble. Initially, I could not link the script file to the cmd. I tried typing "python3" and it directed me to a Microsoft store download. After downloading the MS python, I was able to type "python3" and

Final Project

Image
Daniel Tafmizi Lis 4273 Dr. Ajani  April 21, 2024 Final Project     My final project uses a World Health Organization data set that tracks weekly deaths and cases (D/C) of Covid 19. I subsetted the United States of America and Canada data rows. I am interested in learning about the  D/C  ratio between the years of each country, as well as the  D/C  ratio between the countries. This offers useful insight into the healthcare and social systems of the countries. Having the  D/C  ratio decrease over time shows that better healthcare and social practices are being implemented. It also acts as a measure of the country's overall healthcare systems.     I will use what I have learned in this class to run Anova analysis on the data. I will detail the process I took as I go along. As a sidenote, it is important I note that the data may have some departures due to local adaptations (WHO). Such as, what they consider a covid death or how they timeline the report. However, taking a yearly appr