concept time in category data

This is an excerpt from Manning's book Build a Career in Data Science.
Although the exact process of a job interview varies by company, interviews tend to follow a basic pattern. This pattern is designed to maximize the amount of information a company learns about the candidate while minimizing the amount of time it takes for people within the company to run the interview. The people who do interviews are typically busy, have many interviews to facilitate, and want to allow for fair comparisons between candidates, so the process is streamlined and consistent. Here is a basic outline of what to expect in an interview process (figure 7.1):
Take time to prepare for and practice answers to common interview subjects.

This is an excerpt from Manning's book Algorithms and Data Structures for Massive Datasets.
Figure 1.3: CPU-Memory Performance Gap graph, adopted from Hennessy & Patterson’s well-known Computer Architecture textbook. The graph shows the widening gap between the speeds of memory accesses to CPU and RAM main memory (the average number of memory accesses per second over time.) The vertical axis is on the log scale. Processors show the improvement of about 1.5x per year up to year 2005, while the improvement of access to main memory has been only about 1.1x per year. Processor speed-up has somewhat flattened since 2005, but this is being alleviated by using multiple cores and parallelism.
![]()
What this gap points to intuitively is that doing computation is much faster than accessing data. So if we are still stuck with the traditional mindset of measuring the performance of algorithms using the number of computations (and assuming memory accesses take the same amount of time as the CPU computation), then our analyses will not jive well with reality.

This is an excerpt from Manning's book Data Science Bookcamp: Five Python Projects.
Suppose we choose an element of
sample_spaceat random. What fraction of the time will the chosen element equal'Heads'? Well, our sample space holds two possible elements. Each element occupies an equal fraction of space within the set. Therefore, we expect'Heads'to be selected with a frequency of 1/2. That frequency is formally defined as the probability of an outcome. All outcomes withinsample_spaceshare an identical probability, which is equal to1 / len(sample_space).
Listing 13.44. Comparing matrix product running-times
import time numpy_run_times = [] for_loop_run_times = [] matrix_sizes = range(1, 101) for size in matrix_sizes: matrix = np.ones((size, size)) #1 start_time = time.time() #2 matrix @ matrix numpy_run_times.append(time.time() - start_time) #3 start_time = time.time() for i in range(size): for j in range(size): matrix[i] @ matrix[:,j] for_loop_run_times.append(time.time() - start_time) #4 plt.plot(matrix_sizes, numpy_run_times, label='NumPy Matrix Product', linestyle='--') plt.plot(matrix_sizes, for_loop_run_times, label='For-Loop Matrix Product', color='k') plt.xlabel('Row / Column Size') plt.ylabel('Running Time (Seconds)') plt.legend() plt.show()

This is an excerpt from Manning's book Mastering Large Datasets with Python: Parallelize and Distribute Your Python Code.
Parallel computing, which I’ll also refer to as parallel programming and parallelization, is a way to get your computer to do multiple things at once. For example, referring to the scenario you saw earlier, our young programmers are going to need to process more than one web page at a time; otherwise, they might never finish—there are a lot of web pages. Even processing one page per half second wouldn’t bring them to 200,000 pages a day. To scrape and analyze the entire internet, they’re going to need to be able to scale up their processing. Parallel computing will allow them to do just that.
Listing 6.1. Comparing parallel map and lazy map on different-sized sequences
from time import clock from multiprocessing import Pool def times_two(x): return x*2 def lazy_map(xs): return list(map(times_two, xs)) def parallel_map(xs, chunk=8500): with Pool(2) as P: x = P.map(times_two, xs, chunk) return x for i in range(0,7): N = 10**i t1 = clock() lazy_map(range(N)) lm_time = clock() - t1 t1 = clock() parallel_map(range(N)) par_time = clock() - t1 print(""" -- N = {} -- Lazy map time: {} Parallel map time: {} """.format(N,lm_time, par_time))
One of the issues we’ll have with large datasets—which we’ve already alluded to in this section—is that large datasets are growing datasets. Over time, our dataset grows larger and larger. That said, not all of the data in that large dataset stays relevant.

This is an excerpt from Manning's book Data Wrangling with JavaScript.
You could do your exploratory and analysis coding in Python and then move the data to JavaScript visualization, as many people do. That’s a common approach due to JavaScript’s strong visualization ecosystem. But then what if you want to run your analysis code on live data? When I found that I needed to run my data analysis code in production, I then had to rewrite it in JavaScript. I was never able to accept that this was the way things must be. For me, it boils down to this: I don’t have time to rewrite code.
But does anyone have time to rewrite code? The world moves too quickly for that. We all have deadlines to meet. You need to add value to your business, and time is a luxury you can’t often afford in a hectic and fast-paced business environment. You want to write your data analysis code in an exploratory fashion, à la Jupyter Notebook, but using JavaScript and later deploying it to a JavaScript web application or microservice.
Figure 5.10 Instead of being overwhelmed with output, we want to look at only a few records at a time.
![]()
Listing 8.3 Using the database cursor to incrementally traverse the database one record at a time (listing-8.3.js)
// ... openDatabase function is omitted ... let numRecords = 0; function readDatabase (cursor) { #1 return cursor.next() #2 .then(record => { if (record) { console.log(record); #3 ++numRecords; return readDatabase(cursor); #4 } else { #5 // No more records. } #5 }); }; #1 openDatabase() #6 .then(db => { const databaseCursor = db.collection.find(); #7 return readDatabase(databaseCursor) #8 .then(() => db.close()); #9 }) .then(() => { console.log("Displayed " + numRecords + " records."); }) .catch(err => { console.error("An error occurred reading the database."); console.error(err); }); #1 This is a helper function to read the entire database record by record. #2 Calls the cursor’s next function to traverse to the next record #3 Visits a single record. Add your data processing code here. #4 Recurses to visit the next record #5 No more records. This ends the traversal. #6 Opens a connection to our database #7 Calls the find function to create a database cursor #8 Passes the cursor to readDatabase to initiate the traversal #9 Closes the database when we are finished

This is an excerpt from Manning's book The Art of Data Usability.
It all started when increased seismic activity was detected by two earthquake sensors in south Iceland. The way these sensors work is that they record earthquake waves that travel through the Earth’s crust from the point of origin to the sensor. By analyzing the time it takes to reach different earthquake sensors, you can predict the point of origin (figure 1.1). The analysis of the data from the two earthquake sensors in 1973 indicated two possible points of origin: an active earthquake area called Veiðivötn, or a volcano in an archipelago off the south coast of Iceland called Vestmannaeyjar.
In my experience, it actually isn’t that late. I believe you’re just more likely to remember the times where you’re freezing your toes off in the middle of winter because the bus is late or when you’re late to a meeting and the bus is making you arrive even later. Yes, those toe-freezing delays can be irritating when they happen.

This is an excerpt from Manning's book Think Like a Data Scientist: Tackle the data science process step-by-step.
A set of plots of account balances over time for randomly chosen accounts. Looking at plots can provide far more information than mean and variance. It can also give you a good feeling for account balance behavior and get you thinking about statistical methods that might be helpful for forecasting.
If you plan on handing software to a customer and letting them use it directly, you can bet they’ll find a dozen ways to break it. It’s difficult to eliminate all bugs and handle all possible edge-case outcomes in a nice way, but you can find the most obvious bugs and problems if you give the software to a co-worker—ideally one who has a background similar to the customer’s—and tell them to use all aspects of the tool and to try to break it. Better still, give the software to several people and have them all use it and try to break it. This is often called a bug bash, but it can extend beyond bugs into the realm of user experience as well as the general usefulness of the tool. Feedback here should not be taken lightly, because if your co-workers can find a bug in a few hours, I can almost guarantee that the customers will find it twice as fast, and that can cost you time, money, and reputation.

This is an excerpt from Manning's book Hadoop in Action.
The output of all the mappers are (conceptually) aggregated into one giant list of <k2, v2> pairs. All pairs sharing the same k2 are grouped together into a new (key/value) pair, <k2, list(v2)>. The framework asks the reducer to process each one of these aggregated (key/value) pairs individually. Following our word counting example, the map output for one document may be a list with pair <"foo", 1> three times, and the map output for another document may be a list with pair <"foo", 1> twice. The aggregated pair the reducer will see is <"foo", list(1,1,1,1,1)>. In word counting, the output of our reducer is <"foo", 5>, which is the total number of times “foo” has occurred in our document set. Each reducer works on a different word. The MapReduce framework automatically collects all the <k3, v3> pairs and writes them to file(s). Note that for the word counting example, the data types k2 and k3 are the same and v2 and v3 are also the same. This will not always be the case for other data processing applications.
After running the previous example, we now have a data set that counts the number of citations for each patent. A neat exercise would be to count the counts. Let’s build a histogram of the citation counts. We expect a large number of patents to have been only cited once, and a small number may have been cited hundreds of times. It would be interesting to see the distribution of the citation counts.
We can use any executable script that processes a line-oriented data stream from STDIN and outputs to STDOUT with Hadoop Streaming. For example, the Python script in listing 4.4 randomly samples data from STDIN. For those who don’t know Python, the program has a for loop that reads STDIN one line at a time. For each line, we choose a random integer between 1 and 100 and check against the user-given argument (sys.argv[1]). The comparison determines whether to pass that line on to the output or ignore it. You can use the script in Unix to uniformly sample a line-oriented data file, for example: