TryHackme: Jupyter 101 Writeup

Photo by Maxwell Nelson on Unsplash

Data science is a very broad, enormous topic that isn’t (in my opinion) easy to approach and much harder to master. It has a huge variety of uses across all types of industries! To name a few real-world examples of where data science can be found day-to-day:

  • Recommendations of content on Netflix and YouTube based upon your previous viewing history
  • Fraud detection in Banking
  • Intrusion Detection for Cyber Security
  • Weather Forecasting / Prediction
  • Metrics of a Business’ sales performance
  • Route planning in Google Maps.

It is also goes hand-in-hand with Machine Learning / Artificial Intelligence.

Despite the following room using Python, I have tried to explain any code as much as possible. The code itself is fairly simple, so if you’re not familiar with Python, you can still follow along just fine!

Hopefully the following room provides a friendly introduction into the “Jupyter Notebook” environment which is an extremely useful application in the world of data science.

TASK 1: PREFACE

  1. Lets’ ago!
    No Answers Needed

TASK 2: What is Jupyter?

Jupyter is a web-based platform often used for data analytics / plotting, machine learning, where code is stored in “Notebooks” whom can imported/exported and shared in many formats such as LaTex, HTML, PDF and many more!
The Jupyter Notebook environment isn’t the easiest thing to install and deploy in the world. Normally you have to provide configuration files, Python environments and all sorts of fun things. I’ve done the leg-work here and made a cloud-friendly deploy of Jupyter that launches on boot.

Jupyter is great because you are able to import/export any Notebooks that you create or any other Notebooks that people have made.

Due to the nature of Jupyter, it’s pretty hard to break anything. But if you wish to restore the provided Notebooks — you can simply redeploy the instance!

  1. Read the supporting material.
    No Answers needed

TASK 3: Deploying Instance & Logging In

Use the password: tryhackme

  1. I have logged in!
    No Answers needed

TASK 4: Let’s Learn More About Jupyter

  1. Launch Jupyter
    No Answers needed

TASK 5: Understanding how Jupyter Notebooks Run

  1. What do “Cells” act like?
    Interpreter
  2. What would be the In[#] value of the first Cell when it is ran for the first time? (Where # would be the numerical value)
    1
  3. What keyboard shortcut can you press to execute a cell?
    Shift + Enter
  4. If you was to execute the first Cell again, what would the value of In[#] now become? (Where # would be the numerical value)
    2

TASK 6: Interacting With the Filesystem!

Username: thm
Password: tryhackme
Port: 22

  1. Follow the instructions above.
    No Answers needed

TASK 7: Handling Data With Pandas

  1. What are the two main types of data within Pandas?
    Series and Dataframes
  2. What is the name of the Pandas function that reads a CSV file?
    read_csv
  3. Name the Pandas function you would use if you only wanted to display the first few rows
    head
  4. Name the Pandas function you would use if you only wanted to display the last few rows
    tail
  5. What Pandas function will give you a numerical count of the amount of columns and rows the dataset contains?
    shape

TASK 8: Visualising Data With Matplotlib

  1. How do you display a plot?
    plot()
  2. How would you label the “x” axis on a plot?
    Note: do not add the brackets () for this answer

    xlabel
  3. How would you label the “y” axis on a plot?
    Note: do not add the brackets () for this answer

    ylabel
  4. How would you add a “Title” to a plot?
    Note: do not add the brackets () for this answer

    title
  5. What word would you use to change the color of the plot?
    color
  6. How would you label the “z” axis on a plot?
    Note: do not add the brackets () for this answer

    zlabel

Hacker || Student || CTF Player || Coder || Editor at A&M Publications

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store