Let’s code python with Google Colaboratory!(English)

This course is designed for beginners or, more specifically, blog readers who don’t have a python environment or cloud consoles such as GCP, Azure, or AWS. I will provide the easiest IDE called Google Colaboratory so that you can sip a cup of coffee and relax to read and play to see how easy to provision your notebook as basic 101 in this article. Then, for the next article, I would introduce AI and machine learning models working in code by code level with the first-class GPU solution using TensorFlow. No programming background is required. No IDE or notebook is required. All you have to do is to click the link with the web browser.

Fire Wolf son
Fire Wolf son

Hi, Dad! All I want is to start touching notebook to feel how python work.
My friends told me to use pip install or anaconda etc.

Fire Wolf
Fire Wolf

Sure. I know what you are trying to say.

You don’t want to stall your data science journey because of the installation.

Fire Wolf son
Fire Wolf son

Yep! I just want to code it.

Fire Wolf
Fire Wolf

Fair enough. Today, let’s skip this installation and make a jump start.

Fire Wolf son
Fire Wolf son

Awesome! No set up?? Can you show me how it is possible?

Fire Wolf
Fire Wolf

I will teach you. Let’s get started!

Let’s take the first step!

Do you want to pursue real financial independence to retire early? Yep! FIRE(Financial Independence, Retire Early)  can be achieved through your capital income with consistent investment to your index funding. Yet, most YouTubers only reiterate the importance of investing money for ETFs, mutual funds, stock, etc., as their quick bandaid solution. Given this trend, my primary question for these YouTubers is, “How about Labor income?” That is the first step that needs to be discussed because if you don’t have sufficient labor income to invest for the future capital income, then the scale of the fund effect will be marginal. For example, they talk about a $1 million investment to earn $50K with a 5% annual return, but how many folks have that massive money upfront? Reality bites. If you only have a 10K investment per year, your capital return is likely only $500. Without magnitude of labor income, no big gain in the future. This is a sort of chicken and egg issue. However, FIRE requires a balanced approach of both labor income and capital gain plus dividends cash flow. For this reason, I decided to write more realistic solution about how to improve your labor market value to earn bigger income for future investment. The more labor income magnitude you gain, the more investment return based on your cash for the future you would have. Luckily enough, I worked as one of the most profitable job title holder globally which is a data scientist. My mission is to introduce what this hot job is about and get into that market game for no-programming background readers. I hear so many folks saying that they have no clue how to get started that type of job. No problem. I can walk you through as a step by step guide for those folks to identify the right path where they should go.

What is a notebook?

Most data scientists use notebooks for their work. It is a sort of editor tool for programmers. I use ATOM and Jupyter Notebook. It depends on engineers. Anaconda is one of the easiest ways to provide your proper development environment with an all-in-one package. Yet, you may still receive tons of errors when it comes to installation, and you will likely be fed up with it to give up the python work. Are you tired of this type of step? Do you still want to feel how python programming works to understand what machine learning is about?? No problem. No more headache trying to make Python work on your PC. Let me get straight to the point. In this session, I will guide you to execute code line by line without any development setup so that you can directly nail the code step rather than experiencing unnecessary long steps. My mission is to show a free entrance gate so that anybody can be a data scientist in the future by introducing a free web notebook that Google Colaboratory provides. No prerequisites. It requires no special installation. Please feel free to sit down, kick back and relax with your cup of coffee.

Fire Wolf son
Fire Wolf son

But…Dad. It sounds too good to be true. Google may charge us money.

Fire wolf
Fire wolf

I know right? But guess what? It is truly free if you use it just for a trial purpose.

(Note: Colab Pro version is not a free service.)

Welcome to Google Colaboratory!

Click Google Colaboratory. This one action enables you to open up another new world in order to enter a first class computation resource environment that Google provides. No worries about installation. Welcome to the Python world! You made your first step! (Note: You need to have your own Google Account such as gmail. If not, please create your new gmail account for this purpose.) Once you are in, then click “New Notebook” button.

Your first coding! Hello fire wolf!

Now, you get your brand new own notebook! Congratulations! Let’s code something like below. You can copy and paste it to your noetbook code cell.

import datetime
dt_now = datetime.datetime.now()
print("hello fire wolf! I coded this on:")
print(dt_now)

Once you did, please click [shift]+[return] at the same time or click play button on your left of the code cell. It gives you the result that looks like below.

Fire wolf son
Fire wolf son

I get the result like this.

—–

hello fire wolf! I coded this on:

2021-08-20 18:21:22 -> This should be different from this screen and the timing you executed.

Python has a lot of modules which include executable code set for reusable purposes. It makes the code logically organized. In this case, “import datetime” is first step to import the “datetime” module and then use it to call. With dt_now = datetime.datetime.now() method defines what type of date and time format you get. From the first line of code, now you have imported datetime module, you can use it to get your current local time with datetime.now() method by executing this code set. The print() function prints the specified message to the screen. You don’t need to remember it right now, but the point here is you coded successfully with your own notebook. Congratulations!

You can save this file by changing the file name (top left in your screen) from Untitled0.ipynb to Your_own_name.jpynb. You can also share the file as ipynb to other engineers. For the next step, I will show the complex classifier model algorithm, called deep learning. It gives you the power to identify name of a variety of flowers with 98% accuracy,

Summary

How was it? I hope you enjoyed this easy article. No stress. No prerequisites. I launched this blog simply because I would love to help somebody who may not access their proper resources to compete against others. WOLF was harassed and discriminated against by some people due to my nationalities and language barriers when I first came to the United States. However, I was never offended and was fortunate to work with other good people who noticed it and respected me, and helped me to perform even though I could not speak proper English at that time. There are always good people across the globe to help others, and I believe they are helping somebody in some countries who needs help. Since then, I feel I should give it back to the community here and there as long as people need some help because the reason why I can stand here is not just about the reflection of my own effort, but surely with that kindness, collaborations, and help that they offered me. I would love to be the one who can do the same for others or under-served communities as they helped me when I could not get a job. For that, I truly appreciate anybody who is doing the same to anybody. It looks like a long way to go, but if you believe in yourself and keep working on something good for yourself and others, then eventually karma will take care of your future, and surely somebody will notice your great effort. The future is in your hands. Together, let’s keep moving forward.

Next step

For our next step, I will introduce TensorFlow with GPU. Again, I will use the same notebook that you provisioned today with this article. So, technically, this post title is not about AI itself but more like the entry point of AI. Machine Learning can do more than the old system can do. The systems have been developed for a long time to automate labor-intensive processes. The power of machine learning is to make quite an accurate prediction and inference, such as who is likely getting COVID-19 with specific bio-marker or preconditions. We didn’t do any inference today’s work. For some cases, ML can even identify cancer, a person’s gender/age, or an animal species’ name with much better accuracies than a human being can do. If you think ML is an interesting area for you, then I strongly encourage you to start taking a variety of online courses that most online providers provide free of charge. You can even learn from top-notch professors from MIT, Stanford, Harvard, etc. 

コメントを残す

メールアドレスが公開されることはありません。

CAPTCHA


このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください