Generating unbreakable password ?

Last day when I was busy learning the SAS and R in the workshop provided by MSBA program in USC, I thought a lot about my next python program. All the program I wrote are driven by my interest in python, so until I found something interesting again, I would hardly write something notable.

I came across a post on, which inspired this short program. Unfortunately it was written in Chinese and the main idea is about the security of your password. To sum up, there are a lot of encryption rules and most of them are related to MD5(Message-Digest Algorithm), which generates hash value. However, due to the fast-growing technology, MD5-generated code could also be hacked using super computers. Many others would recommend a newer algorithm but in my opinion the hacking is a matter of time.

Therefore, what I am going to do is to enhance the difficulty of password hacking. I am going to give the password a random shuffle and a for loop to increase the complexity and time for breaking. Here is my simple idea:

During this example I found out that Sublime Text 3 surprisingly did not support “raw_input” function because it could not pop out a window for users to input the strings. It makes ST3 so annoying that I have to have terminal active all the time.

Overall, I don’t think there’s any kind of password that is unbreakable so security should be well considered every time you store it at some place. What’s more, we need to increase the time and cost for hacking, and also lower  the value of breaking our password. Protect yourself on the Internet!

Jikexueyuan Spider is one of my favorite websites to study coding on my own. One of its biggest advantages is the lessons are relatively short compared to long and boring lessons on some websites. However, the UI of has drawbacks in showing learner the connection between different classes. For example, I want to study HTML and CSS, but I cannot filter by lecturers or by time added, so that it is extremely hard to find out the correct sequence after this class(time added is only available in the course’s main page, not on the index page). What I could ONLY do is to select a specific category such as HTML, and face a number of unordered courses, making me frustrated which one to go after this course.

Therefore, I would like to design an application to retrieve all the related courses under a specific category, and automatically click the URL of each course in the background, and then retrieve the name and time added of each course. Finally, I want it to sort the course by time added and write the information down on a .txt file so that I can analyze conveniently. Here are the codes:

Use python to check my email inboxes

Last month I came across an idea to check my email inboxes using python. I did some research on the web and try to imitate the great solutions from other coders. Because I am currently using IMAP service in my main email accounts, I chose to use the “imaplib” module to achieve my expectation. Here are the codes:

I needed this to help me because in China is kind of difficult to check my Gmail account and I want a simpler way to check my inboxes without opening bulkier email clients.

My First Python Application

It’s been two months since I started learning python on my own. It all starts from the bottom of my heart, about what I really want to learn. To be honest, I genuinely feel that I’ve enjoyed this journey.

After reading related books and videos for quite a long time, I decided to get hands on the practice, which is more difficult as expected.

What drives me to write this small application is that I love watching sports games and I often checked a website, which is “”, to see what games are on live today. However, I found this action repetitive and a waste of time opening my website, selecting the bookmark and then scrolling down to the part which I want. I have tried several modules for web scraping and this time I chose to use BeautifulSoup to get the web page. Therefore, this module’s code is as follows:

It works pretty well and shows me what I need in the console. But after I came to the U.S., it started to raise an error saying the variable “today” is Nonetype. After debugging, I found it kind of funny because it is due to the time zone difference. Variable “i” here represents today in the U.S. while sometimes in China it is one day later. Obviously, the website “zhibo8” will delete all the live games information at the end of the day. So if I am lucky enough to run this application at night in Los Angeles, when it is tomorrow morning in China, I will encounter this error.

I plan to figure out a way to solve this problem later, and I am quite satisfied with my first executable python file after two months.