[2-min Computer Science Papers] A Short Introduction into the MapReduce System

Google processes huge data sets. For example, the search engine needs to know how often words occur in web documents. The data sets are too large for a single computer. As a single computer has only eight CPUs, processing the data takes forever. Hence, Google uses hundreds of computers in parallel. But writing parallel programs …

[2-min Computer Science Papers] A Short Introduction into the MapReduce System Read More »

Is This an Average Puzzle? Yes!

Daily Data Science Puzzle [python] import numpy as np # Goals in five matches goals_brazil = np.array( [1,2,3,1,2]) goals_germany = np.array( [1,0,1,2,0]) br = np.average(goals_brazil) ge = np.average(goals_germany) print(br>ge) [/python] What is the output of this puzzle? *Beginner Level* Numpy is a popular Python library for data science focusing on arrays, vectors, and matrices. This …

Is This an Average Puzzle? Yes! Read More »

NumPy Matrix Multiplication — np.matmul() and @ [Ultimate Guide]

Have you ever tried to multiply two NumPy arrays together and got a result you didn’t expect? NumPy’s multiplication functions can be confusing. In this article, we’ll explain everything you need to know about matrix multiplication in NumPy. Watch the video where I go over the article in detail: To perform matrix multiplication between 2 …

NumPy Matrix Multiplication — np.matmul() and @ [Ultimate Guide] Read More »

Who Dominates Instagram or Comparing Each Element of a Numpy Array

Daily Data Science Puzzle [python] import numpy as np # popular instagram accounts # (millions followers) inst = [232, #"@instagram" 133, #"@selenagomez" 59, #"@victoriassecret" 120, #"@cristiano" 111, #"@beyonce" 76] #"@nike" inst = np.array(inst) superstars = inst > 100 print(superstars[0]) print(superstars[2]) [/python] What is the output of this puzzle? Numpy is a popular Python library for …

Who Dominates Instagram or Comparing Each Element of a Numpy Array Read More »

Analyzing Stock Data with Numpy – The Reshape and Average Functions

Daily Data Science Puzzle [python] import numpy as np # apple stock prices (May 2018) prices = [ 189, 186, 186, 188, 187, 188, 188, 186, 188, 188, 187, 186 ] prices = np.array(prices) data_3day = prices.reshape(4,3) print(int(np.average(data_3day[0]))) print(int(np.average(data_3day[-1]))) [/python] What is the output of this puzzle? Numpy is a popular Python library for data …

Analyzing Stock Data with Numpy – The Reshape and Average Functions Read More »

How to Create a Sequence of Evenly Spaced Values with Numpy Linspace?

Daily Data Science Puzzle [python] import numpy as np year = np.linspace(0, 365, 366) print(int(year[-1] – year[-2])) [/python] What is the output of this puzzle? Numpy is a popular Python library for data science focusing on linear algebra. This puzzle is about the useful function linspace. In particular, linspace(start, stop, num) returns evenly spaced numbers …

How to Create a Sequence of Evenly Spaced Values with Numpy Linspace? Read More »

How to Create a Sequence of Linearly Increasing Values with Numpy Arange?

Daily Data Science Puzzle [python] import numpy as np # save $122.50 per month x = 122.5 net_wealth = np.arange(0, 1000, x) # how long to save >$1000? print(len(net_wealth)) [/python] What is the output of this puzzle? Numpy is a popular Python library for data science focusing on linear algebra. This puzzle is about the …

How to Create a Sequence of Linearly Increasing Values with Numpy Arange? Read More »