diff --git a/cheat_sheets/MongoDB.html b/cheat_sheets/MongoDB.html index 4c2b60f..9631b98 100644 --- a/cheat_sheets/MongoDB.html +++ b/cheat_sheets/MongoDB.html @@ -38,6 +38,9 @@

Usage

mongoimport

search

CRUD

+

aggregate

+

schema

+ diff --git a/cheat_sheets/MongoDB/aggregate.html b/cheat_sheets/MongoDB/aggregate.html new file mode 100644 index 0000000..5482705 --- /dev/null +++ b/cheat_sheets/MongoDB/aggregate.html @@ -0,0 +1,29 @@ + + + + + + + + + + +

aggregate

+
+
aggregate
+
+

aggregate: summarize the data in a certain way.

+

SYNTAX: collection.aggregate([list of parameters])

+

each parameter maps a function, e.g, $group, to the arguments of that functions.

+

Functions include: +

+ + + +

+
+
+ + + + \ No newline at end of file diff --git a/cheat_sheets/MongoDB/join.html b/cheat_sheets/MongoDB/join.html new file mode 100644 index 0000000..16e8ab2 --- /dev/null +++ b/cheat_sheets/MongoDB/join.html @@ -0,0 +1,24 @@ + + + + + + + + + + +

join

+
+
join
+
+

embedding: document containing other documents

+

referencing: refer to other documents

+

join: combine information from different documents

+

single source of truth: all information is stored in one place only

+
+
+ + + + \ No newline at end of file diff --git a/cheat_sheets/MongoDB/schema.html b/cheat_sheets/MongoDB/schema.html new file mode 100644 index 0000000..6dc045d --- /dev/null +++ b/cheat_sheets/MongoDB/schema.html @@ -0,0 +1,27 @@ + + + + + + + + + + +

schema

+
+
schema
+
+

schema: validator for adding documents to collection

+

SYNTAX: same as with querying the collection.

+

You can also add the validator such that any added document is checked

+

db.command("collMod", "COLLECTION", validator=SCHEMA)

+

It is more common to use JSON schema, which allows for a more detailed error message.

+

json schema

+

In Python, this works via "import jsonschema"

+
+
+ + + + \ No newline at end of file diff --git a/cheat_sheets/algoritmiek.html b/cheat_sheets/algoritmiek.html new file mode 100644 index 0000000..adc9233 --- /dev/null +++ b/cheat_sheets/algoritmiek.html @@ -0,0 +1,125 @@ + + + + + Algoritmiek cheat sheet + + + + + + + + + +
+
+ +
+
+
+

Graph

+ +
+ +
+
+
+
+
+
+
+

Predict

+ +
+
+
+
+
+
+
+
+

Evaluate

+ +
+
+ +
+
+
+
+
+
+
+

Models

+ +
+
+
+
+
+
+
+
+

Programming

+ +
+
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/cheat_sheets/algoritmiek/asymptotic.html b/cheat_sheets/algoritmiek/asymptotic.html new file mode 100644 index 0000000..68cb97d --- /dev/null +++ b/cheat_sheets/algoritmiek/asymptotic.html @@ -0,0 +1,83 @@ + + + + + + + + + + + +

Asymptotic

+
+
Information
+
+

asymptotic: approaching but never connecting with a line or a curve.

+

useful because we want to know how algorithms behave when n is very large.

+

the definition for function that does the work: T(n).

+

we have to determine the bounds of the output of T(n) for all possible values of n.

+

complexity order: +

+

+
+
+ +
+
Big-O: upper-bound
+
+

Big-O is used for the upper-bound of T(n).

+

This is for the worst case.

+

+

$$ {T(n) \text{ is } O( f(n))}$$

+

$$ {\text{ iff } T(n) \gt c* f(n)} $$

+

$$ {\text{ for all } n>= n_{0}} $$

+

+

T(n) can be upper-bounded using f(n).

+

T(n) is the function that does the actual work.

+

O means that we upper-bound it.

+

f(n) is the function used for bounding.

+

The iff explains when the function can be used for upper-bounding.

+

$$ {n_{0}} $$ is when n=0.

+
+
+ + +
+
$$ {\Omega} $$: lower-bound.
+
+

Lower-bound is for the best case.

+

In this case, all values must be below the value of T(n).

+
+
+ +
+
tight-bound
+
+

You want to upper-bound a function as tightly as possible.

+

loose upper-bound: an upper-bound that is correct, but far away from the actual upper-bound.

+

tight upper-bound: an upper-bound that is correct and is close to the actual upper-bound.

+
+
+ +
+
$$ {\Theta}: exact bound $$
+
+

where the upper-bound and the lower-bound come together.

+

there is no little theta since theta is a perfect bound.

+ +
+
+ + + + \ No newline at end of file diff --git a/cheat_sheets/algoritmiek/big_o_notation.html b/cheat_sheets/algoritmiek/big_o_notation.html new file mode 100644 index 0000000..3938735 --- /dev/null +++ b/cheat_sheets/algoritmiek/big_o_notation.html @@ -0,0 +1,35 @@ + + + + + + + + + + +

Big O Notation

+
+
Information
+
+

medium.com

+

Big O Notation is the language we use to describe the complexity of an algorithm.

+

With Big O Notation, we express the runtime in terms of how quickly it grows relative to the input as the input gets larger.

+

Some examples of Big O Notation:

+

    +
  • O(1) or constant time: does not depend on the size of the input.
  • +
  • O(n) or linear time: running time increases at most linearly with the size of the input.
  • +
  • O(n2) or quadratic time: n to the power of 2.
  • +

+

Scenarios: +

    +
  • worst case scenario: the longest possible time to solve the problem.
  • +
+ +

+
+
+ + + + \ No newline at end of file diff --git a/cheat_sheets/algoritmiek/bipartite.html b/cheat_sheets/algoritmiek/bipartite.html new file mode 100644 index 0000000..1f76af3 --- /dev/null +++ b/cheat_sheets/algoritmiek/bipartite.html @@ -0,0 +1,21 @@ + + + + + + + + + + +

Bipartite graph

+
+
Information
+
+

We say that a graph G = (V, E) is bipartite if its node set V can be partitioned into sets X and Y in such a way that every edge has one end in X and the other end in Y.

+
+
+ + + + \ No newline at end of file diff --git a/cheat_sheets/algoritmiek/dynamic_programming.html b/cheat_sheets/algoritmiek/dynamic_programming.html new file mode 100644 index 0000000..d610a15 --- /dev/null +++ b/cheat_sheets/algoritmiek/dynamic_programming.html @@ -0,0 +1,23 @@ + + + + + + + + + + +

Dynamic programming

+
+
Information
+
+

Dynamic Programming (DP) is an algorithmic technique for solving an optimization problem by breaking it down into + simpler subproblems and utilizing the fact that the optimal solution to the overall problem depends upon the optimal + solution to its subproblems.

+
+
+ + + + \ No newline at end of file diff --git a/cheat_sheets/algoritmiek/efficiency.html b/cheat_sheets/algoritmiek/efficiency.html new file mode 100644 index 0000000..a884ae9 --- /dev/null +++ b/cheat_sheets/algoritmiek/efficiency.html @@ -0,0 +1,37 @@ + + + + + + + + + + +

Efficiency

+
+
Information
+
+

definition of efficiency needs to be: +

    +
  • platform-independent
  • +
  • instance-independent
  • +
  • of predictive value with respect to increasing input sizes
  • +
+

+

worst case running time: bound on the largest possible running time the algorithm could have over all inputs of a given size N, and see how this scales with N.

+

average-case analysis: very hard to establish "average" cases.

+

search space: combinations of input.

+

brute force: all results.

+

analytical level: meta-level without implementation.

+

proposed definition of efficiency:An algorithm is efficient if it achieves + qualitatively better worst-case performance, at an analytical level, than + brute-force search.

+

proposed definition of efficiency: An algorithm is efficient if it has a polynomial running time.

+

Ideally, when the input size increases by a constant factor, the algorithm should only slow down by some constant factor C.

+
+
+ + + + \ No newline at end of file diff --git a/cheat_sheets/algoritmiek/greedy.html b/cheat_sheets/algoritmiek/greedy.html new file mode 100644 index 0000000..2da3bd9 --- /dev/null +++ b/cheat_sheets/algoritmiek/greedy.html @@ -0,0 +1,22 @@ + + + + + + + + + + +

Greedy

+
+
Information
+
+

A greedy algorithm is any algorithm that follows the problem-solving heuristic of making the locally optimal choice at + each stage.

+
+
+ + + + \ No newline at end of file diff --git a/cheat_sheets/algoritmiek/independent.html b/cheat_sheets/algoritmiek/independent.html new file mode 100644 index 0000000..6237a17 --- /dev/null +++ b/cheat_sheets/algoritmiek/independent.html @@ -0,0 +1,21 @@ + + + + + + + + + + +

Bipartite graph

+
+
Information
+
+

a set of nodes S ⊆ V is independent if no two nodes in S are joined by an edge

+
+
+ + + + \ No newline at end of file diff --git a/cheat_sheets/algoritmiek/intractable.html b/cheat_sheets/algoritmiek/intractable.html new file mode 100644 index 0000000..5df067e --- /dev/null +++ b/cheat_sheets/algoritmiek/intractable.html @@ -0,0 +1,23 @@ + + + + + + + + + + +

Intractable problem

+
+
Information
+
+

A problem that can be solved in theory (e.g. given large but finite resources, especially time), but for which in + practice any solution takes too many resources to be useful, is known as an intractable problem.

+

intractable problem

+
+
+ + + + \ No newline at end of file diff --git a/cheat_sheets/algoritmiek/p_vs_np.html b/cheat_sheets/algoritmiek/p_vs_np.html new file mode 100644 index 0000000..9a0dd3a --- /dev/null +++ b/cheat_sheets/algoritmiek/p_vs_np.html @@ -0,0 +1,30 @@ + + + + + + + + + + +

P vs NP

+
+
Information
+
+

P vs NP

+

The Computational Complexity is categorized into difficulty, called Computational Classes

+

+

    +
  • P: problems that have a solutation that can be solved in polynomial time.
  • +
  • NP: problems that can be verified in polynomial time, but may take an exponential number of steps to solve.
  • +
  • NP complete: hardest problems in NP to complete.
  • +
+

+

Does P = NP? Are questions that are verified in polynomial time also solved in polynomial time?

+
+
+ + + + \ No newline at end of file diff --git a/cheat_sheets/algoritmiek/polynomial.html b/cheat_sheets/algoritmiek/polynomial.html new file mode 100644 index 0000000..c308eb2 --- /dev/null +++ b/cheat_sheets/algoritmiek/polynomial.html @@ -0,0 +1,22 @@ + + + + + + + + + + +

Polynomial

+
+
Information
+
+

A polynomial can have constants, variables and exponents, but never division by a variable.

+

polynomial

+
+
+ + + + \ No newline at end of file diff --git a/cheat_sheets/algoritmiek/pspace.html b/cheat_sheets/algoritmiek/pspace.html new file mode 100644 index 0000000..dca8e93 --- /dev/null +++ b/cheat_sheets/algoritmiek/pspace.html @@ -0,0 +1,21 @@ + + + + + + + + + + +

PSPACE

+
+
Information
+
+

PSPACE-complete problems are believed to be strictly harder than NP-complete problems, and this conjectured lack of short “proofs” for their solutions is one indication of this greater hardness

+
+
+ + + + \ No newline at end of file diff --git a/cheat_sheets/netwerken.html b/cheat_sheets/netwerken.html new file mode 100644 index 0000000..83d342e --- /dev/null +++ b/cheat_sheets/netwerken.html @@ -0,0 +1,75 @@ + + + + + Netwerken cheat sheet + + + + + + + + + +
+
+
+
+
+

Usage

+ +
+
+
+
+
+
+
+
+

Concepts

+ +
+

Internetprotocol

+

Actuator: Een actuator zet informatie om in een fysiek verschijnsel

+

Controller

+

Sensor: Een sensor zet een fysiek verschijnsel om in informatie

+ +
+
+
+
+
+ +
+ + + + \ No newline at end of file diff --git a/cheat_sheets/netwerken/IP.html b/cheat_sheets/netwerken/IP.html new file mode 100644 index 0000000..b9ebb4c --- /dev/null +++ b/cheat_sheets/netwerken/IP.html @@ -0,0 +1,21 @@ + + + + + + + + + + +

IP

+
+
IP
+
+

+
+
+ + + + \ No newline at end of file diff --git a/cheat_sheets/netwerken/controller.html b/cheat_sheets/netwerken/controller.html new file mode 100644 index 0000000..bee6079 --- /dev/null +++ b/cheat_sheets/netwerken/controller.html @@ -0,0 +1,25 @@ + + + + + + + + + + +

controller

+
+
controller
+
+

Een controller is een besturingscomputer

+

In een IoT-apparaat vind je vaak een microcontroller

+

Verderop in een IoT-toepassing gebruik je controllers om de verschillende functionele elementen, IoT-apparaten tot + internetdiensten te verbinden, en te combineren met allerlei regels voor de besturing. Een voorbeeld hiervan is een + NodeRed-server.

+
+
+ + + + \ No newline at end of file