OpenLLM-France/wikimedia huggingface dataset:
# Koine Greek/3. Exercise in Pronunciation: John 1:1-5
## John 1:1-5

Try reading this out loud, and check your pronunciation with the recording provided below.
$^1$Ἐν ἀρχῇ ἦν ὁ λόγος, καὶ ὁ λόγος ἦν πρὸς τὸν θεόν, καὶ θεὸς ἦν ὁ λόγος. $^2$οὗτος ἦν ἐν ἀρχῇ πρὸς τὸν θεόν. $^3$πάντα δι' αὐτοῦ ἐγένετο, καὶ χωρὶς αὐτοῦ ἐγένετο οὐδὲ [ἕν. ὃ γέγονεν $^4$ἐν] αὐτῷ ζωὴ ἦν, καὶ ἡ ζωὴ ἦν τὸ φῶς τῶν ἀνθρώπων $^5$καὶ τὸ φῶς ἐν τῇ σκοτίᾳ φαίνει, καὶ ἡ σκοτία αὐτὸ οὐ κατέλαβεν.
$^3$ ἕν ὃ γέγονεν. ἐν
http://www.youtube.com/watch?v=j_md4Sua0e0
Congratulations on reciting your first few sentences in Koine Greek!
# Koine Greek/1

In development. . .

## Useful External Links

Greek Alphabet at WikiChristian
# Koine Greek/4. Introduction to Nouns

Nouns in Greek are declined (have ending changes) based on case, number (singular or plural), and gender (masculine, feminine, neuter).
The case of a noun indicates the function of the noun in the sentence. There are five different cases:
* The nominative case marks the subject of a phrase as well as the predicate nominative (i.e., the object of a linking verb (or copulative verb), such as to be). Examples: In the sentence "The dog bit the man", dog would be in the nominative case. Also, in the sentence "The man is a soldier", both "man" and "soldier" are in the nominative case.
* The genitive case denotes source or origin (this function is also called the ablative), or kind or possession. It is also often used for an object of a preposition. It is frequently translated as "of ...". Examples: In the phrase "The man's wife", or equivalently, "the wife of the man", man would be in the genitive case.
* The dative case denotes an indirect object (translated as "to ..." or "for ..."); means or agency, especially impersonal means (translated as "by ..."); or a location. It is also frequently used as an object of a preposition, and often, a preposition can take a noun in either the genitive or dative case with different meanings. Examples: In the sentence "I spoke to John", John would be in the dative case. Also, in the sentence "By grace, you have been saved", grace would be in the dative case.
* The accusative case denotes a direct object. Example: In the sentence, "I saw the cat", cat would be in the accusative case.
In Greek, nouns fall under three different patterns for case endings, called declensions. The first declension contains nouns whose stems end in α or η. They are mostly feminine nouns. The second declension contains nouns whose stems end in ο. They are mostly masculine or neuter. The third declension contains all other nouns (mostly, nouns whose stems end in a consonant). There are broad patterns in third declension endings, but many more special cases than for first and second declension nouns.
# Koine Greek/10

10. The Definite Article is employed in combination with nouns, and is declined in gender, number, and case, to correspond with them.
The Following forms, which should be carefully committed to memory, afford a general type of the inflections of nouns, adjective, and pronouns, and will therefore be useful in their acquisition.
11. The Definite Article, the. It has first and second declension endings. Note that the nominative masculine and feminine forms of the definite article start with a vowel and not τ, and also note that there are no accents on the vowel. By contrast, the relative pronoun who (ὅς, ἥ, ὅ) has accents on the vowels, but is otherwise spelled the same.
ὁ - the :
| | Singular | Singular | Singular | Plural | Plural | Plural |
| | Masc. | Fem. | Neut | Masc. | Fem. | Neut |
| Nominative | ὁ | ἡ | τό | οἱ | αἱ | τὰ |
| Genative | τοῦ | τῆς | τοϋ | τῶν | τῶν | τῶν |
| Dative | τῷ | τῇ | τῷ | τοῖς | ταῖς | τοῖς |
| Accusative | τόν | τήν | τό | τούς | τάς | τά |
12. Indefinite Pronoun: any, a certain, a
τις - any, a certain, a :
| | Singular | Singular | Plural | Plural |
| | Masc/Fem | Neut | Masc/Fem | Neut |
| Nominative | τις | τι | τινές | τινά |
| Genative | τινός | τινός | τινῶν | τινῶν |
| Dative | τινί | τινί | τισί(ν) | τισί(ν) |
| Accusative | τινά | τι | τινάς | τινά |
13. In the two forms now given there are three particular patterns applicable to all nouns, adjectives and pronouns.
1) Neuters are alike in the nominative and accusative of number. Neuters plural, nominative and accusative all end in α. 2) The dative singular always ends in i; although to the vowel the iota is subscript (please note, this needs to be added) 3) The genitive plural always ends in ων.

## Useful External Links

WikiChristian - Koine Greek: Definite Article
# Koine Greek/14

14. Since a knowledge of the verb to be is necessary for formation of the most simple sentence, the conjugation of the verb to be, in the Indicative Mood, is given. (Breathings & accents need to be added)
Present :
| Singular | Plural |
| ειμί I am | εσμέν We are |
| εί Thou art | εστέ Ye are |
| εστί Subject is | εισί(ν) They are |
| Past ||
| Singular | Plural |
| ήν I was | ήμεν We were |
| ήσθα Thou wast | ήτε Ye were |
| ήν Subject was | ήσαν, They were |
| Future ||
| Singular | Plural |
| έσομαι I shall be | εσόμεθα We shall be |
| έση Thou shalt be | έσεσθε Ye shall be |
| έσται Subject shall be | έσονται They Shall Be |
# Robotics/Sensors/Tactile Sensors

Tactile sensors measure force applied to them. This can be in an on-off fashion or as a more or less accurate measurement.

## Simple Contact Sensor
### Bumper switches

One of the most simple sensors available are contact sensors or bumper switches. These sensors use some form of bumper to press a button when the robot comes in contact with another object. A well built bumper switch is a very reliable sensor, but since these detect by touch, they're not very practical on fast or heavy robots.
One key point on bumper switches (or any kind of mechanical switches) is that they don't give a clean signal when closed. The contact tends to "bounce" a bit.

### Whiskers

Whiskers use the same principle as bumper switches, however they give a slightly larger detection range and so avoid the need to bump against other objects. One common design is to mount the whisker through a circular bend wire. When something hits the whisker, it bends and touches the circular bend wire. The electrical contact formed in this way is used to detect the object.
# Robotics/Sensors/Pressure Sensors

The ability to measure pressure is very beneficial to the subject of robotics. The density of the atmosphere changes with altitude. If the air pressure is known then the altitude can then be established. If the robot contains fluids under pressure (for example, hydraulic systems), pressure sensors can be used to detect faults in the system. Pressure sensors can also be installed in a compressed tank of gas to measure the amount of gas left.

## Measuring Pressure
### Analogue Methods

A Bourdon gauge uses a coiled tube which causes a rotation of an arm connected to the tube as it expands due to pressure increase. However, this is not particularly useful in Robotics unless you design a way to get voltage to vary with respect to needle displacement.

### Electric Methods

* Resistive (Strain Gauge) - As the object is deformed, the foil is deformed, causing its electrical resistance to change. This resistance change, usually measured using a Wheatstone bridge, is related to the strain by the quantity known as the gauge factor. Foil strain gauges are only useful to detect large pressure changes and are not very precise over small changes.
* Capacitive - The deflection of the piston is often one half of a capacitor, so that when the piston moves, the capacitance of the device changes. This is a common way (with proper calibrations) to get a very precise, electronic reading from a manometer, and this configuration is called a capacitive manometer vacuum gauge.
* Piezoelectric/Piezoresistive - For measurements of small strain, semiconductor strain gauges, called piezoresistors, are often preferred over foil gauges. A semiconductor gauge usually has a larger gauge factor than a foil gauge. Semiconductor gauges tend to be more expensive, more sensitive to temperature changes, and are more fragile than foil gauges.
# Robotics/Sensors/Distance Sensors
## IR

IR distance sensors are one of the most used distance sensors. They fall in 3 categories:

### Reflection

(Short range. Not more than 2 - 3cm)
This type uses an IR-LED and IR-diode (or phototransistor). When an object is close to the sensor it reflects the light emitted by the LED to the IR-diode. Using modulated IR-light (A) and filtering (B) the input signal of the IR-diode leads to better results as this blocks (much of) other IR-light. There are ICs that contain both a modulator, IR-diode and filter-circuit.

### Triangulation

(Larger range. Around 10 - 30cm) e.g. Sharp has a family of sensors that use this principle for measuring distance. They consist of an IR-LED and an IR-sensitive LDR strip. Combined with built-in optical lenses, the reflected beam's position on the LDR depends on how far the object is.

### line detecting sensor

Similar setup as the reflection IR-sensor, but aimed downwards to detect lines on the ground. This sensor makes use of the difference in reflection between a white background and a black line.
More advanced robots use multiple line detection sensors to follow a line more cleanly.

## Ultrasonic

Ultrasonic distance sensors use sound to measure distance. These sensors emit an ultrasonic pulse train and then measure the time until the pulse is reflected. Since the speed of sound is (more or less; excluding temperature and wind) constant in air (approx. 344m/s) it is easy to calculate the distance to the reflecting object. These are used for distance ranging from several centimeters up to a few meters.

## Laser

Laser based distance sensors use the same principle as ultrasonic distance sensors, but use light instead of sound. These sensors are useful from short (0.05 meters) to quite long range (as in used in home construction, i.e. 150 feet or more). They may have class 2 lasers. The led beam can be fairly narrow at reasonable distance for example with the Bosch GLM50C, the led beam is 6mm at 10m. http://web.archive.org/web/20211017003815/https://www.boschtools.com/us/en/ocsmedia/GLM50C.pdf
# Robotics/Sensors/Touch Sensors
## Construction

A simple touch switch can be constructed from a momentary SPST (single-pole single-throw) switch. A wire extension can be added to the switch lever to act as an “antenna”, “feeler”, “whisker”, etc.
The switch can be wired in such a way that when the state of the switch changes, either a “high” (a digital logic 1) is sent to the micro controller or a “low” (digital logic 0) is sent to the micro controller – depending on the application. The wiring diagram for active high, and active low are shown in figures 1 and 2, respectively.
Another even simpler and cheaper method of touch sensor construction is with 2 pieces of wire. The first, the base, is L-shaped with a small loop at one end. The second wire, the whisker is passed through the loop on the end of the base wire. Under normal or inactive conditions, the whisker wire does not make contact with the loop – thus creating an open circuit. Only when the whisker wire bumps into an object, is the circuit complete. This circuit could be made to be either active-high or active-low using the schematics shown in figures 1 and 2, by simply replacing the switch contacts with the base and whisker wires.
Other types of touch sensors include simple momentary push-button switches.

## Advantages

* Binary – interfaces easily with all microcontrollers
* Low cost
* Simple to construct and to connect
* Simple to operate – either the switch is active, or it is not active
* Reliable

## Disadvantages

* Tactile – object must be “touched” to know it exists
* Low range
* Less accurate for acquiring range data – you only know that there is an object there within the motion range of the switch – not exactly how far it is, or exactly where the sensed object’s XY position is relative to the robots position
# Robotics/Resources
## Other Wikibooks

* Advanced Robotics Book
* Electronics
* Embedded Systems
* Embedded Control Systems Design
* Theoretical Mechanics
* System Troubleshooting
* Robotics Kinematics and Dynamics: a more theoretical approach.
* Electric Motors And Generators: theory and details of what goes on inside a motor
* Practical Electronics/Stepper Motors
* Power Electronics

## External links

* Robotics video tutorial
* All About Circuits - Electrical Engineering Textbook, Calculators, and Tools
* Maker Pro - Maker site for robotic and electronics hobbyists.
* Robotics Education Website
* Robotics for hobbyists
* McComb, Gordon 2000 "The Robot Builder's bonanza 2nd ed." ISBN 0-07-136296-7 -- One of, if not the, best book on home-built mobile robotics.
* "Controlling The Real World With Computers" by Joe Reeder
* "Get Started in Robotics"
* http://www.robotix.in tutorials on robotics
* CLARAty http://claraty.jpl.nasa.gov reusable robotic software framework. Includes many miscellaneous algorithms used in robotics: pose estimation, navigation, path planning, machine vision, coordinate transforms, locomotion inverse kinematics, Bayes networks, etc.
* Robotics at stack exchange
* "The TAM: a device for task abstraction in swarm robotics research"

## Free Wikis on Robotics

* OpenServo wiki
* "The Robot Group Inc." of Austin TX: many artistic and entertainment robots
* Open Circuits wiki: motor drivers

## University and College Sites

* Connecticut College
* MIT Open Course Ware - MIT has published many of its courses online as the OCW project. Some of these provide practically everything, others list course books. Probably one of the most reliable and extensive sources of information on the internet.
# Hierarchy Generation
### Intent

To generate a concrete class composed to various behavioral policies

### Motivation

When a solution calls for a number of different implementations that can be combine in a variety of ways, each sharing or not sharing various decorations, the traditional solution is multiple inheritance which produces a variety of problems. Hierarchy generation is a pattern by which a variety of base classes are successively inherited to avoid multiple inheritance.

### Solution and Sample Code

In the above example the BozoTheClown declaration is a short hand of effectively the following:
This is identical to:
The behavior policies must follow this concept:
# Include Guard Macro
### Intent

To allow inclusion of a header file multiple times.

### Motivation

Including the same header file more than once in the same compilation unit can lead to the violation of a basic rule of C++: One Definition Rule (ODR). A header may get included multiple times because of direct and indirect inclusion.

### Solution and Sample Code

Include Guard macro idiom is an old idiom, which is also applicable in a C program. It uses simple #define to allow the inclusion of a header file multiple times in a compilation unit. The idiom ensures that after preprocessing the guarded content of the header file is only seen once by the compiler. More precisely, the compiler gets to see the guarded content where the header file gets included for the very first time. The following macros are put at the very beginning and at very end of a header file:
Some compilers support
as an efficient alternative to include guards. It does not require to open the header file more than once, unlike traditional include guard macro in some compilers. On many modern compilers like GCC4 or MSC++2008 #pragma once will not give better compile time performance as they recognize header guards.

### Known Uses

Virtually all header files in the world!

### Related Idioms

* Inline Guard Macro
* Export Guard Macro

### References

#pragma once in Wikipedia.
# Int-To-Type
### Intent

* To treat an integral constant as a type at compile-time.
* To achieve static call dispatch based on constant integral values.

### Also Known As

Integral constant wrappers

### Motivation

Function overloading in C++ is based on different types, which prevents compile-time integral constants taking part into function overload resolution. There are at least two different mechanisms to perform static dispatching based on integral constants. First is enable-if idiom and the other one is the int-to-type idiom described below.

### Solution and Sample Code

A simple template, initially described in Dr. Dobb's Journal by Andrei Alexandrescu provides a solution to this idiom.
The above template creates different types for different integer values used to instantiate the template. For example, Int2Type<5> is a different type from Int2Type<10>. Moreover, the integral parameter is saved in the associated constant value. As each integral constant results in a different type, this simple template can be used for static dispatching based on integral constants as shown below.
Consider an Array class that encapsulates a fixed size array very similar to that of the standard array class from TR1. In fact, our Array class is implemented as a derived class of the standard TR1 array class with the only difference of a sort function.
We intend to dispatch sort function at compile-time based on the size of the array to achieve some performance optimizations. For example, sorting an array of size zero or one should be a no-op. Similarly, arrays smaller than size 50 should be sorted using the insertion-sort algorithm whereas as larger arrays should be sorted using the quick-sort algorithm because insertion-sort algorithm is often more efficient than quick-sort algorithm for small data size. Note that, this selection of the sorting algorithm can be trivially done using run-time if condition. However, int-to-type idiom is used to achieve the same effect at compile-time as shown below.
Few more associated types and constants can be defined with Int2Type template to increase its usability. For example, enumeration value is used to retrieve the integer constant associated with the type. Finally, other typedefs such as, next and previous are used to find other types in order such that Int2Type<7>::next is the same type as Int2Type<9>::previous.

### Known Uses

* Integral constant wrappers (bool_, int_, long_) in Boost.MPL
* Dimensional Analysis
* std::integral_constant

### Related Idioms

* enable-if
* Type Generator

### References

[1] Generic<Programming>: Mappings between Types and Values -- Andrei Alexandrescu
# Iterator Pair
### Intent

Specify a range of data values without worrying about the underlying data structure used by the data values.

### Also Known As

Sometimes this is referred to as an Iterator Range.

### Motivation

It is well understood that it is useful to create a vector<int> from another vector<int> using a copy constructor. Similarly, it is useful to create a vector<double> from a vector<int> using Coercion by Member Template idiom applied on a member template constructor. A code example is given below.
The vector interface is still not flexible enough for some needs. For example, A vector can't create itself from a list or a set or a POD array.
Iterator-pair is an idiom that addresses this challenge. It is based on the Iterator design pattern (obviously!) Iterator pattern intent: Provide an object which traverses some aggregate structure, abstracting away assumptions about the implementation of that structure.

### Solution and Sample Code

A pair of iterators is used to designate a beginning and an end of a range of values. By virtue of the iterator design pattern whoever (in our example vector) uses iterator pair idiom can access the range without worrying about the implementation of the aggregate data structure. The only requirement is that the iterators should expose a fixed, minimal interface such as a pre-increment operator.
Iterator-pair idiom is often combined with member templates because the exact type of the iterators is not known apriori. It could be set<T>::iterator or list<T>::iterator or a POD array. Irrespective of the type, any generic algorithm written in terms of the iterator pairs works. It is often useful to indicate the concept that iterator types are supposed to model. In the example above, the iterators are required to model at least the InputIterator concept. More information about iterator categories (tags) and their uses are described in Tag Dispatching idiom.
Sometime iterator pair idiom is unavoidable. For example, to construct a std::string from a buffer of characters with embedded null characters iterator-pair idiom is unavoidable.

### Known Uses

All standard containers

### Related Idioms

* Coercion by Member Template
* Tag Dispatching
# Inline Guard Macro
### Intent

To conveniently control inline-ness of functions using a compiler command line macro definition switch.

### Motivation

For debugging purpose, it is often necessary to turn off inlining of functions throughout the program. But for release version, inline functions are desirable. This indicates a need of a quick way of turning inline-ness on/off as and when desired. Moreover, such functions should be defined in header files when they are inlined and otherwise should be in the source (.cpp) file. If non-inline functions are in header files, almost always it ends up creating multiple definitions of the function. On the other hand, if inline functions are not in header files then compilation units can't find them. In both the cases linker throws errors.
Therefore, a flexible way of inlining is often desirable but C++ language does not support it without some macro magic. The Inline Guard Macro idiom achieves this.

### Solution and Sample Code

The solution is to put all the inline functions in a separate file called .ipp file and decorate each function with a macro INLINE. Header file and the implementation file is create as usual and the .ipp file in selectively included in one of the two files (header or implementation) depending upon whether inlining is desired. An example of a class Test is given below.
The effect of using Include Guard Macro is that depending upon whether MYPROJECT_INLINE_ENABLED is defined or not, test.ipp gets #included in either test.cpp or test.hpp. When it gets merged with test.cpp, functions are not inlined because INLINE is defined as an empty string. On the other hand when test.ipp is merged with test.hpp, INLINE is defined as inline (the keyword).
Now, what remains is to define the MYPROJECT_INLINE_ENABLED macro when desired. Generally, all modern C/C++ compilers allow defining macros at command line. For example to compile the above program on gcc using inlining, the argument -DMYPROJECT_INLINE_ENABLED option is added to the compiling command line. If no such macro is defined, the functions are automatically treated as non-inline and the program compiles OK.

### Known Uses

* ACE (Adaptive Communication Environment)
* TAO (The ACE ORB)

### Related Idioms

* Include Guard Macro
* Export Guard Macro
# Inner Class
### Intent

* Implementing multiple interfaces without multiple inheritance and yet provide natural looking up-casting.
* Provide multiple implementations of the same interface in a single abstraction.

### Motivation

Signature of a virtual function in two independent interfaces provided by two independent class libraries may collide. It is a problem especially when a single class has to implement both the colliding functions in different ways depending upon the interface you consider. For example,
The inner class idiom can help solve this problem.

### Solution and Sample Code

Leaving the interface classes, Base1 and Base2 unchanged we can implement the Derived class as follows.
Note the use of conversion operators in class Derived. (Derived class is really not a derived class!) The conversion operators allow conversion of Derived to Base1 even though they don't share inheritance relationship themselves! Use of member objects base1_obj and base2_obj eliminates the concern of object lifetime. Lifetime of member objects is same as that of the Derived object.

### Related Idioms

* Interface Class
* Capability Query

### References

Thinking in C++ Vol 2 - Practical Programming --- by Bruce Eckel.