Category: Data Science

-当data science 届的网红

In order to fulfill my dream, I will organize the lecture notes, homework,  projects from Harrisburg University . Meanwhile, I will publish some data analysis related topics.

Online publication link:

Rpubs ,Github  , Kaggle

Python Read/Write Json File

python 33 Python and Java are two popular programming languages. Today we will use This is dance as an example to write a small program to read and write Json files in Python. JSON (JavaScript Object Notation) file is a lightweight, text-based editor that stores simple data structures and objects, and it is a standard data interchange format. It is…

Python Read/Write Binary Image Files

python day 32 We always use “copy” and “paste” buttons to duplicate images. Today let’s use Python to code to do so. Overwrite the picture “b2” as “binary” Copy and Paste the picture “binary” with an empty picture “b2” *rb: read as binary *wb: write as binary

Python Thread Sum

python day 31 There are so many Reality Idol Shows this summer, since the fans are voting for the trainees, we will write a python program using Thread Module to calculate the votes fast.  Key Concept  _Lock: In order to add the number correctly, we will Lock the previous number then release                …

Python Send Emails

python day 30 Can you believe we can use Python to send emails?📩 To my surprise, it actually works! 😜 So today Iet’s try to send an email from gmail using python with “Yibo asks you to play the skateboard” 🙈🙈🙈🙈🙈 Module: email, smtplib  ✨ Trick: Turn ON Gmail less secure pass Python Code: import email import smtplib msg =…

Python Image Manipulations

python day 29 Recently i like many cute emoji stickers and memes. So let’s try to learn how to manipulate the images in python and maybe try to make a unique sticker by yourself! I will use 大理寺日志 The White Cat Legend as an example, it is a short cute cartoon 😻 PIL Image, ImageFilter Module: image info, corp, pixel…

Python Class Polymorphism with Stock Price

Python day 28  The stock market is going up again today! So let’s construct a simple Python program that generates the stock price range for Tech companies, Banks, and Pharma companies. Last time we use the Abstract Class to print out multiple song lyrics, today we will level up the difficulties by assigning different computation rules to the corresponding classes.

Python Class Polymorphism with Songs

python day 27 Recently there are so many Singing TV shows, The Big Band, Super Band, Sisters in Winds and Waves, Rap of China.  So today let’s make a Python Abstract Class that is able to pass to subclasses and print out song lyrics about cute animals. Why do we choose these songs? Because it’s my program so i can…

Python with Tic Tac Toe

python day 26: When i was in Partial Differential Equation class, my deskmate would take out a notebook and play five-in-a-row with me. Many years have passed by, I bearly recall anything about PDE, but i still remember the little definite joy when i was late to class, I knew my deskmate would have the board ready and waiting for…

Python get filename suffix

Python day 25: When i was younger, I only dealt with latex, docx, pdf files. Since i started blogging, i use a lot more files such as jpg, peg, mov4, ipynb, py, md, sas, r , HTML. Sometimes, it is a bit difficult to organize the files. Today we are going to make a small python program to fetch the…

Python Class Example

python day 24 Last time, we did a simple example of Python Class  , We know a Class works as a container that can store objects with similar features (def). Today we will show a more efficient way to call a Class rather than multiple def functions. Since I’m really into Hip-hop recently, we will use make an Idol Class as…

Social media & sharing icons powered by UltimatelySocial