<
Computer Science fundamental
>
上一篇

Kalman Filter Implemented in Python
下一篇

Table-scale Dynamic Haptic feedback for virtual reality utilized an object-moving robot

Owner: Xiaofan SHEN Tags: Infrastructure

Python

Variables

variable in a program acts like a container. It can be used to store a string, a number, or other kinds of data.

box-and-tangible-value-4-mol6CH.png

str1.find(str2)

Parallelism

Untitled

Pipelining

Pipelining is a form of parallelism where tasks are solved faster by having multiple tasks simultaneously at various levels of completion.

Parallelism can improve performance by improving latency (the time that a task takes from beginning to end) or by improving throughput (the amount of tasks that can complete during a given interval of time).

Resource Tradeoffs

Inexpensive computers can perform 3 basic computations in a nanosecond — that’s one (wildly oversimplified) way of describing what it means to be a “3 GHz” computer.

Caching

Caching is a general problem-solving approach that provides a much more flexible way of dealing with certain resource tradeoffs.

**Hardware caches**

Hardware caches

API

An API is an interface or menu that different programs can use to communicate with each other.

“向荆市长隐藏的信息允许档案部在不打扰荆市长的情况下改变其工作方式。这是界面意义的重要组成部分。”

Bridges of Königsberg

konigsberg-bridge_-simplified-w-nsew-2-xpQnkF.png

图中每条边都经过一次的路径称为欧拉路径

list is a data type for storing multiple items of the same type that are related and belong together.

List

diff-variable-names-okay-2TIHqg.png

pseudocode

Writing the logic of programs in English is called pseudocode.

An algorithm is a step by step process designed to achieve some outcome, and computers are the fastest machines ever conceived for carrying out step by step processes!

That means that the study of algorithms is a core aim of computer science, but their use transcends any one discipline.

Code worked or delivered

When a computer scientist says an algorithm “works,” that doesn’t just mean it promises to produce a correct result. It also has to deliver on that promise, finish, and produce the result, on every possible input.

Making sure an algorithm always finishes and produces a result is called proving termination, and it can be a little bit tricky!

Langton’s ant、Boolean

conditional statement uses a Boolean expression to determine the code that is run.

Dictionary

Untitled

cleaned_word = word.lower().strip(punctuation)

reader = open(‘data/jekyll.txt’) punctuation = ‘.;,-“’”:?—‘!()_’

freq_dict = {} for line in reader: for word in line.split(): cleaned_word = word.lower().strip(punctuation) if cleaned_word in freq_dict: freq_dict[cleaned_word]+=1 else: freq_dict[cleaned_word]=1

print(len(freq_dict))

Counter

-->
Top
Foot