【鼎革‧革鼎】︰ Raspbian Stretch 《六之 J.3‧MIR-3 》

通常熟悉教材思路模式利於掌握學習進入狀況。故此先講

輸入‧處理‧輸出模型︰

IPO model

The input–process–output (IPO) model, or input-process-output pattern, is a widely used approach in systems analysis and software engineering for describing the structure of an information processing program or other process. Many introductory programming and systems analysis texts introduce this as the most basic structure for describing a process.[1][2][3][4]

Overview

A computer program or any other sort of process using the input-process-output model receives inputs from a user or other source, does some computations on the inputs, and returns the results of the computations.[1] In essence the system separates itself from the environment, thus defining both inputs and outputs, as one united mechanism.[5] The system would divide the work into two categories:

  • A requirement from the environment (input)
  • A provision for the environment (output)

In other words, such inputs may be materials, human resources, money or information, transformed into outputs, such as consumables, services, new information or money.

As a consequence, Input-Process-Output system becomes very vulnerable to misinterpretation. This is because, theoretically, it contains all the data, in regards to the environment outside the system, yet on practice, environment contains a significant variety of objects, that a system is unable to comprehend, as it exists outside systems control. As a result it is very important, to understand, where the boundary lies, between the system and the environment, which is beyond systems understanding. This is because, often various analysts, would set their own boundaries, favouring their point of view, thus creating much confusion.[6]

 

指明其與 IPython

讀取‧求值‧輸出循環

Read–eval–print loop

A Read–Eval–Print Loop (REPL), also known as an interactive toplevel or language shell, is a simple, interactive computer programming environment that takes single user inputs (i.e. single expressions), evaluates them, and returns the result to the user; a program written in a REPL environment is executed piecewise. The term is most usually used to refer to programming interfaces similar to the classic Lisp machine interactive environment. Common examples include command line shells and similar environments for programming languages, and is particularly characteristic of scripting languages.[1]

Uses

As a shell, a REPL environment allows users to access relevant features of an operating system in addition to providing access to programming capabilities.

The most common use for REPLs outside of operating system shells is for instantaneous prototyping. Other uses include mathematical calculation, creating documents that integrate scientific analysis (e.g. IPython), interactive software maintenance, benchmarking, and algorithm exploration.

A REPL can become an essential part of learning a new language as it gives quick feedback to the novice.

 

密切相關也。這可說是

Jupyter Audio Basics》文章綱要哩!

舉例而言︰

聲音檔輸入

import librosa
x, sr = librosa.load(‘audio/simple_loop.wav’)

 

視覺化輸出

%matplotlib inline
import seaborn # optional
import matplotlib.pyplot as plt
import librosa.display

plt.figure(figsize=(12, 4))
librosa.display.waveplot(x, sr=sr)

 

stft 處理及顯示

X = librosa.stft(x)
Xdb = librosa.amplitude_to_db(X)
plt.figure(figsize=(12, 5))
librosa.display.specshow(Xdb, sr=sr, x_axis=’time’, y_axis=’hz’)

 

聽覺化輸出

import IPython.display as ipd
ipd.Audio(‘audio/simple_loop.wav’) # load a local WAV file

 

 

 

還請讀者自讀原文,品嚐玩味的吧!

僅補之以

System shell commands

To run any command at the system shell, simply prefix it with !, e.g.:

!ping www.bbc.co.uk

You can capture the output into a Python list, e.g.: files = !ls. To pass the values of Python variables or expressions to system commands, prefix them with $: !grep -rF $pattern ipython/*. See our shell section for more details.

Define your own system aliases

It’s convenient to have aliases to the system commands you use most often. This allows you to work seamlessly from inside IPython with the same commands you are used to in your system shell. IPython comes with some pre-defined aliases and a complete system for changing directories, both via a stack (see %pushd, %popd and %dhist) and via direct %cd. The latter keeps a history of visited directories and allows you to go to any previously visited one.

 

之說明及用法,了其方便性呦◎