Troubleshoot for JWT.

I got above error and my code was below.

var jwt = require('jsonwebtoken')

Photo by Meg Jerrard on Unsplash

Yes, they are


  • Problem — Identify what animal class a platypus belongs to in terms of Data Science
  • Dataset — Kaggle
  • Conclusion — Platypus is mammal

Platypus is known as unique mammal. They have fluffy far and a beak so if you hear only this information and have not ever seen them, it sounds like they are one kind of bird. However, they do not have wings but 4 legs.

Are they mammal, even if most of mammals do not have a beak? …

Photo by Dan Gold on Unsplash

Make a list which has same length of the DataFrame


  • Problem- Add a column on DataFrame without errors
  • Dataset
  • Instruction — Columns must have same length of the DataFrame


If you are confused of adding columns in DataFrame, always think to Make a list.

The list needs to have same length as the DataFrame, and if you want to refer to an existed column for a new column, be noticed what functions work with pd.Series.


You can download the dataset from my repo

# create dataset

Photo by Ali Kokab on Unsplash

For each increase of SOMETHING, we can expect the price is increased by XXX holding all other features consistent

All I needed to know is LinearRegression().fit(X,y).coef_ to fill out above XXX. You can get coefficient of the trained LinearRegression model following steps and the coefficient is the XXX.


  • Objective: Interpret LinearRegression model
  • Assemble a model: Made with orange juice price, season and weight
  • Interpretation: How the features affect the price?


I would like to know what an interpretation of LinearRegression is like. This model was made with price, season and weight of orange juice. I set the price as a…



I will make Neural Network model to detect certain one object by training the model with its images.


  1. Prepare images which has an object you want to detect, and also images which does not have the object
  2. Get mode information of the images
  3. Reshape the images to square
  4. Resize the images
  5. Reshape dimensionality
  6. Make Neural Network model

Prepare images which has an object you want to detect, and also images which does not have the object

Get images to detect and mix those images with any images, but the any images must not have the object you want to detect. I will create a model which detects the object.


Troubleshoot AttributeError of torch. Install Pytorch modules.

Error message

I got an error message as below.

AttributeError: module 'torch' has no attribute '__version__'


pip uninstall torch

Access Pytorch website to install torch module.

Select your environment then it generates command for terminal. Copy and paste. Once I completed the installation, I do not see the error message anymore.


Automatically generate texts using Python, transformer.pipeline.


This is all modules I need for text generator.

from transformers import pipeline


# Argument must be `text-generation`
text_generator = pipeline("text-generation")

Generate texts

# Give a phrase that related to texts you want to generate
text_generator('I would like to')


[{'generated_text': 'I would like to go back to the beginning where I was before the war, I wouldn\'t really have had them."\n\nIn their time at the helm, British command staffs and civilians were often caught up in the fray, fighting like bandits'}]

So cool! This starts with I would like to which is a phrase I feed…

This is 3rd project as data scientist. I am summarizing what I have learned and what process I go thorough when I tackle on entirely.

  1. Problem statement
  2. Method
  3. Assemble model
  4. Evaluation
  5. Conclusion

Problem statement - This project theme is NLP. I was thinking what problem I can solve related to NLP and got an idea. I assume that some certain words are likely to used in some certain category. For example, a give post which is categorized in ‘movies’ would have words such as Ironman, Hollywood. I believed I could create model which predicts category of posts by their body…

This is the 4th week since I started studying Big data. I want to write down what I have been going through until now so that I can look back my progress. I started with basic syntax of Python and now I am struggling to catch up with Regression analysis.

I am excited to tackle Regression modeling because I have been curious how ML, AI works. For example, I am expecting I will be able to use this tool to recognize biometrics information. Face id and fingerprint id is surprising technology. …

I have started studying Data at General Assembly. I could say the reason why I am here is luck of decision made mistakenly at many points at my life. If I succeeded all of my challenge in life, I’d be going on other life. Do not take negatively, I am happy with what I am doing now so that it was lucky to fail some challenges.

I graduated university with degree of Chemistry field and I was planning to have career in same field. While I study in university, I experienced many experiments such as optics, particles, electricity, image impression…

Nao Kawakami

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