Using Scrapy in PyCharm

We live in a world that relies on data, massive amounts of data. This data is used in many areas of business, for example: Marketing & sales Competition research Lead generation Content aggregation Monitoring consumer sentiment Data Analytics and Data science AI Machine learning Real Estate Product and price data Much of this data is … Read more

How to Append Data to a JSON File in Python? [+Video]

Problem Formulation Given a JSON object stored in a file named “your_file.json” such as a list of dictionaries. πŸ’¬ How to append data such as a new dictionary to it? # File “your_file.json” (BEFORE) [{“alice”: 24, “bob”: 27}] # New entry: {“carl”: 33} # File “your_file.json” (AFTER) [{“alice”: 24, “bob”: 27}, {“carl”: 33}] Method 1: … Read more

The Bullish Case on Blockchains

The last 100 years have been economically dominated by corporations. Corporations have brought us health, wealth, and wisdom. Corporations organized the invention and distribution of drugs that saved billions of lives. Corporations took care of automation and efficiency gains and subsequently made billions of people live lives in prosperity and wealth — an average worker … Read more

How to Get the Current Value of a Variable in TensorFlow?

Problem Formulation Given a TensorFlow variable created with tf.Variable(). As this variable may have changed during the training process (e.g., using assign()), you want to get the current value of it. How to accomplish this in TensorFlow? Sessions Are Gone in TensorFlow 2 In TensorFlow 1, computations were performed within Sessions. That’s why many people … Read more

Sklearn fit() vs transform() vs fit_transform() – What’s the Difference?

Scikit-learn has a library of transformers to preprocess a data set. These transformers clean, generate, reduce or expand the feature representation of the data set. These transformers provide the fit(), transform() and fit_transform() methods. The fit() method identifies and learns the model parameters from a training data set. For example, standard deviation and mean for … Read more

Method Overriding vs Overloading in Python [+Video]

Method overriding vs overloading in Python—what’s the difference? If you’re short on time—here it is: Method overloading: creating a method that can be called with different arguments such as m() and m(1, 2, 3). Method overriding: overwriting the functionality of a method defined in a parent class. In method overloading, methods in a given class … Read more

5 Brag-Worthy Python Projects

Hacking Alexa’s Voice Recordings After David’s mother passed away, he wanted to hear her voice again. As she used Amazon Alexa, he figured, he could download the voice recordings from the Alexa device. But Amazon didn’t provide an interface for it. Fortunately he found this project online: [Cool Project] Hacking Alexa’s Voice Recordings After following … Read more