Go to /home/user/libraries for this example:
$ mkdir /home/user/libraries
$ cd /home/user/libraries
Library header (fib.h):
| - Software consists of algorithms and data structures. (Niklaus Wirth published | |
| a book called _Algorithms = Data Structures = Programs_.) | |
| - Algorithms work on data structures by manipulating them in place or by | |
| transforming them into other data structures. | |
| - Data structures are usually the starting and end point of a program. | |
| Exceptions are programs that make up their own data (e.g. by generating | |
| random data or by gathering measurements of sensors), but even then the | |
| definition of the data structures predates the algorithm. | |
| - The data structure an algorithm works on shall be called an _input data | |
| structure_, and a data structure an algorithm is producing shall be called an |
| #!/usr/bin/awk | |
| # sumtime.awk: sums up times | |
| # input: lines with time indications of the form hh:mm, e.g. 12:30 or 4:15 | |
| # output: the sum of the times, e.g. 16:45 | |
| /[0-9]{1,}:[0-9]{1,2}/ { | |
| split($0, fields, ":") | |
| hours += fields[1] | |
| minutes += fields[2] | |
| } |
| package main | |
| import ( | |
| "os" | |
| "text/template" | |
| "time" | |
| ) | |
| type Article struct { | |
| Title string |
| systemd-analyze dot --to-pattern='*.service' | \ | |
| sed '2i graph[overlap=false dpi=150]; node[fontname="monospace" shape=rect];' | \ | |
| nop | \ # obsessive-compulsive disorder | |
| twopi -Tpng > systemd.png |
| #!/usr/bin/env python3 | |
| from functools import reduce | |
| def sieve(xs): | |
| return reduce( | |
| lambda primes, x: primes + [x] | |
| if not any(filter(lambda p: x % p == 0, primes)) | |
| else primes, |
| #!/usr/bin/env python3 | |
| import re | |
| import sys | |
| from huffman import Node | |
| from huffman import count_frequencies | |
| from huffman import build_tree | |
| import pydot |
| #!/usr/bin/env python3 | |
| from collections import namedtuple | |
| from bitstream import BitStream | |
| Node = namedtuple('Node', 'chars weight left right') | |
| left = False |
| Was bedeutet «Cloud Computing»? | |
| Patrick Bucher, Modul 346, BBZW Sursee | |
| 2022-12-15 | |
| [Hierbei handelt es sich um eine unautorisierte Übersetzung. Die selben | |
| Begriffe im Original wurden je nach Kontext und Bedarf anders übersetzt. | |
| Bei ambivalenten Übersetzungen wird der englische Originalbegriff in | |
| Klammern und kursivgesetzt angegeben.] | |
| Cloud Computing ist ein Modell zur Ermöglichung eines allgegenwärtigen |
| package main | |
| import ( | |
| "errors" | |
| "fmt" | |
| ) | |
| type Number float64 | |
| type Operator func(Number) Number |