Computing with Data
elgeish
551.2K views
02 Chapter 3
Bash - Introduction Bash - Variables Bash - Pipes Bash - Loops Bash - Conditional Logic Bash - Aliases Command Prompt - Introduction Command Prompt - Variables Command Prompt - Pipes Command Prompt - Loop Command Prompt - Conditional Logic PowerShell - Introduction PowerShell - Pipes PowerShell - Variables PowerShell - Loops PowerShell - Conditional Logic Processes in Linux - Part I Processes in Linux - Part II Processes in Windows Files in Linux Displaying Files Moving, Copying, and Removing Files and Directories Wildcard Characters Soft Links Listing Directory Contents The PATH Environment Variable Compression in Linux Bash Initialization File Script Files Files in Windows Hierarchy of Directories Compression in Windows Users and Permissions in Linux Users and Permissions in Windows Redirecting Input and Output in Linux Redirecting Input and Output in Windows Working on Remote Linux Computers
03 Chapter 4
Compilation Variables Scope Operators Type Conversions References Pointers Arrays Preprocessor and Namespaces - Part I Preprocessor and Namespaces - Part II Strings - Part I Strings - Part II Input - Part I Input - Part II Input - Part III Output If-Else Clauses While-Loops For-Loops - Part I For-Loops - Part II For-Loops - Part III Functions Return Value Function Parameters Function Definition and Function Declaration Scope of Function Variables Pointer Parameters Reference Parameters Recursion - Part I Recursion - Part II Recursion - Part III Recursion - Part IV Passing Arguments to Main Overloading Functions Structs - Part I Structs - Part II Structs - Part III Structs - Part IV Structs - Part V Classes Constructors - Part I Constructors - Part II The Destructor The Copy Constructor The Converting Constructor The Implicit Converting Constructor The Explicit Converting Constructor Operator Overloading Friend Functions and Classes Inheritance Polymorphism Static Binding Virtual Functions Static Variables and Functions - Part I Static Variables and Functions - Part II Dynamic Memory Allocation - Part I Dynamic Memory Allocation - Part II Dynamic Memory Allocation - Part III Smart Pointers - Part I Smart Pointers - Part II Smart Pointers - Part III Template Functions - Part I Template Functions - Part II Template Classes Vectors Arrays Sets Maps - Part I Maps - Part II Unordered Maps
05 Chapter 6
Getting Started Objects Importing Modules Executing Shell Commands Scalar Data Types Strings Duck Typing Tuples Lists Ranges Slicing Sets Dictionaries Counters Dictionaries with Default Values Hashable Objects List Comprehensions Set Comprehensions Dictionary Comprehensions Nested Comprehensions Control Flow The Empty Statement Functions - Part I Functions - Part II Functions - Part III Classes Inheritance The Empty Class The NumPy Package Linear Algebra Random Number Generation The SciPy Package The pandas Package The scikit-learn Package Clustering Classification Regression Reading and Writing Data in Text Format Reading and Writing Ndarrays Reading and Writing Dataframes Material Differences between Python 3 and 2
07 Chapter 8
Graphing Data in R Datasets Packages Strip Plots Histograms Line Plots Kernel Functions Smoothing Histograms Using Gaussian Kernels Smoothing Histograms Using qplot Smoothing Histograms Using ggplot Scatter Plots Smoothing Scatter Plots Facets All-Pairs Relationships Contour Plots Box Plots qq-Plots Devices Data Preparation Graphing Data in Python Line Plots Histograms Contour Plots Surface Plots
08 Chapter 9
Missing Data in R - Part I Missing Data in R - Part II Missing Data in Python Outliers Skewness and Power Transformation - Part I Skewness and Power Transformation - Part II Binning Indicator Variables Random Sampling, Partitioning, and Shuffling Concatenations and Joins Reshaping Data The Split-Apply-Combine Framework
09 Chapter 10
Thread Safety - Part I Thread Safety - Part II Volatility - Part I Volatility - Part II Synchronization Ineffectual Synchronization - Part I Ineffectual Synchronization - Part II Ineffectual Synchronization - Part III Synchronization vs. Volatility Starvation Deadlocks - Part I Deadlocks - Part II Deadlocks - Part II The Producer-Consumer Problem - Part I The Producer-Consumer Problem - Part II The Producer-Consumer Problem - Part III The Producer-Consumer Problem - Part IV The Producer-Consumer Problem - Part V The Producer-Consumer Problem - Part VI Reader-Writer Locks - Part I Reader-Writer Locks - Part II Reader-Writer Locks - Part III Reader-Writer Locks - Part IV Reentrant Locks - Part I Reentrant Locks - Part II Reentrant Locks - Part III Reentrant Locks - Part IV Thread Pools - Part I Thread Pools - Part II Thread Pools - Part III Scheduled Executor Services Futures Streams ParSeq - Part I ParSeq - Part II ParSeq - Part III ParSeq - Part IV File Locks Distributed Locks Linearizable Counters
PowerShell - Introduction
PowerShell is a command-line shell that provides a richer feature set for power users. Thanks to built-in support for the .NET Framework, PowerShell can be a more appealing shell to .NET developers when compared to Command Prompt.
Note: PowerShell examples in the book ran on Windows; the code on this website runs on Linux — the output may vary.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# This is a single-line comment
<#
This is a block comment...
It can span multiple lines
#>
# The prefix ## indicates an output line
# The Write-Host cmdlet writes output to a PowerShell host
# Host here refers to the process that's hosing PowerShell
Write-Host hello world
## hello world
Write-Host hello; Write-Host world
## hello
## world
# The first cmdlet below has the NoNewLine switch turned on
Write-Host -NoNewLine hello; Write-Host world
## helloworld
# The separator below is added between printed objects
Write-Host -Separator ", " hello world
## hello, world
# 0..9 creates an array of integers from 0 to 9
# Parentheses are required to evaluate the expression correctly
Write-Host -Separator ";" (0..9)
## 0;1;2;3;4;5;6;7;8;9
# The + operator below concatenates ranges
Write-Host -Separator ";" (0..9 + 8..0)
## 0;1;2;3;4;5;6;7;8;9;8;7;6;5;4;3;2;1;0
# The namespace prefix System is optional in PowerShell
Write-Host -Separator ([IO.Path]::PathSeparator) (0..9)
## 0;1;2;3;4;5;6;7;8;9
[String]::Join([IO.Path]::PathSeparator, 0..9)
## 0;1;2;3;4;5;6;7;8;9
# This is also an example of a multi-line entry
# When an entry is incomplete, you'll see this prompt: >>
# To complete the entry, press Enter after the last input
# Get-Date returns a DateTime object
(Get-Date).
AddDays(1).
ToUniversalTime().
ToLongDateString().
ToUpper()
## FRIDAY, MAY 13, 2016
# Example: comparing data extraction with Command Prompt
## rem ^ allows us to escape special characters
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Suggested playgrounds