OpenLLM-France/wikimedia huggingface dataset:
# Saylor.org's Ancient Civilizations of the World/The Hellenistic Period

The Hellenistic period or Hellenistic era of history is the period which followed the conquests and death of Alexander the Great in 323 BC. The Hellenistic period may be seen to end either with the final conquest of the Greek heartlands by Rome in 146 BC or with the final defeat of the last remaining successor-state to Alexander's empire after the Battle of Actium in 31 BCE. The Hellenistic period was characterized by a wave of colonists who established Greek cities and kingdoms in Asia and Africa.
It was so named by the historian J. G. Droysen. During this time, Greek cultural influence and power was at its zenith in Europe and Asia. It is often considered a period of transition, sometimes even of decline or decadence, between the brilliance of the Greek Classical era and the emergence of the Roman Empire.

## Attribution

"The Hellenistic Period" (Wikipedia) http://en.wikipedia.org/wiki/Hellenistic_period
# Saylor.org's Ancient Civilizations of the World/The Gupta Age
## Background

The Gupta Empire (गुप्त साम्राज्य) was an ancient Indian empire which existed from approximately 320 to 550 CE and covered much of the Indian Subcontinent. Founded by Maharaja Sri Gupta, the dynasty was the model of a classical civilization. The peace and prosperity created under the leadership of the Guptas enabled the pursuit of scientific and artistic endeavors. This period is called the Golden Age of India, and was marked by extensive inventions and discoveries in science, technology, engineering, art, dialectic, literature, logic, mathematics, astronomy, religion and philosophy that crystallized the elements of what is generally known as Hindu culture.
Chandra Gupta I, Samudra Gupta the Great, and Chandra Gupta II the Great were the most notable rulers of the Gupta dynasty. The 4th century CE Sanskrit poet Kalidasa, credits Guptas with having conquered about twenty one kingdoms, both in and outside India, including the kingdoms of Parasikas (Persians), the Hunas, the Kambojas tribes located in the west and east Oxus valleys, the Kinnaras, Kiratas etc. Strong trade ties also made the region an important cultural center and set the region up as a base that would influence nearby kingdoms in Burma, Sri Lanka, and Southeast Asia.
The empire gradually declined because of many factors such as substantial loss of territory and imperial authority caused by their own erstwhile feudatories and the invasion by the Huna peoples from Central Asia. After the collapse of the Gupta Empire in the 6th century, India was again ruled by numerous regional kingdoms. A minor line of the Gupta clan continued to rule Magadha after the disintegration of the empire. These Guptas were ultimately ousted by Vardhana ruler Harsha Vardhana, who established an empire in the first half of the 7th century.

## Attribution

"The Gupta Empire" (Wikipedia) https://en.wikipedia.org/wiki/Gupta_Empire
# Saylor.org's Ancient Civilizations of the World/The Indus River Valley
## Ancient Indian Civilization

The earliest known farming cultures in south Asia emerged in the hills of Balochistan, Pakistan, which included Mehrgarh in the 7th millennium BCE. These semi-nomadic peoples domesticated wheat, barley, sheep, goat and cattle. Pottery was in use by the 6th millennium BCE. Their settlement consisted of mud buildings that housed four internal subdivisions. Burials included elaborate goods such as baskets, stone and bone tools, beads, bangles, pendants and occasionally animal sacrifices. Figurines and ornaments of sea shell, limestone, turquoise, lapis lazuli, sandstone and polished copper have been found. By the 4th millennium BCE we find much evidence of manufacturing. Technologies included stone and copper drills, updraft kilns, large pit kilns and copper melting crucibles. Button seals included geometric designs.

### Indus Valley Civilization

By 4000 BCE a pre-Harappan culture emerged, with trade networks including lapis lazuli and other raw materials. Villagers domesticated numerous other crops, including peas, sesame seed, dates, and cotton, plus a wide range of domestic animals, including the water buffalo which still remains essential to intensive agricultural production throughout Asia today. There is also evidence of sea-going craft. Archaeologists have discovered a massive, dredged canal and docking facility at the coastal city of Lothal, India, perhaps the world's oldest sea-faring harbour. Judging from the dispersal of artifacts the trade networks integrated portions of Afghanistan, the Persian coast, northern and central India, Mesopotamia (see Meluhha) and Ancient Egypt (see Silk Road).
Archaeologists studying the remains of two men from Mehrgarh, Pakistan, discovered that these peoples in the Indus Valley Civilization had knowledge of medicine and dentistry as early as circa 3300 BCE. The Indus Valley Civilization gains credit for the earliest known use of decimal fractions in a uniform system of ancient weights and measures, as well as negative numbers (see Timeline of mathematics). Ancient Indus Valley artifacts include beautiful, glazed stone faïence beads. The Indus Valley Civilization boasts the earliest known accounts of urban planning. As seen in Harappa, Mohenjo-daro and (recently discovered) Rakhigarhi, their urban planning included the world's first urban sanitation systems. Evidence suggests efficient municipal governments. Streets were laid out in perfect grid patterns comparable to modern New York. Houses were protected from noise, odors and thieves. The sewage and drainage systems developed and used in cities throughout the Indus Valley were far more advanced than that of contemporary urban sites in Mesopotamia.

## Attribution

"Ancient Civilizations/Ancient Indian Civilization" (Wikibooks) http://en.wikibooks.org/wiki/World_History/Ancient_Civilizations#Ancient_Indian_Civilization
# Saylor.org's Ancient Civilizations of the World/The Mauryan Age
## The Rise of the Mauryans

Scholars are unsure as to the direct causes of the demise of the civilization in the Indus River valley, one of the first civilizations, around 1500 BCE. By 600 CE, a second wave of civilization appeared. This civilization was concentrated along the Ganges River in northern India. It was marked by individual towns, regional states, and cultural and ethnic diversity. Lacking political unity, this civilization was nevertheless united by religious traditions of Hinduism and a shared social organization. Beginning in 321 BCE, the Mauryans brought political unity to this civilization and established the Mauryan dynasty and India's first empire (321-185 BCE). The Mauryan emperors maintained a large military of infantry, cavalry, chariots, and elephants with the aid of a thorough taxation system, a large civilian bureaucracy, and state-direction of key industries of weaving, weaponry, ship-building, and mining.
Despite the efforts of the emperors, the Mauryan empire began to dissolve not long after the death of its most famous emperor, Ashoka. Hundreds of years later, a second attempt at empire was made by the Gupta. By 303 CE, Chandragupta Maurya had gained control of a vast swath of the Indian subcontinent running from Bengal in the east to Afghanistan in the west, and pushing south about halfway down the peninsula. The success of Chandragupta Maurya is accredited to his prime minister and mentor, the shrewd tactician Kautilya. Chandragupta's son, Bindusara, would further extend the empire in the south and the central regions of India, but it would be the next emperor who would truly be remembered as extraordinary. The Gupta empire (320-550 CE) saw a flourishing of trade between India and China and trade with the Roman world.

## The Emperor Ashoka

The Emperor Ashoka (r. 273-232 CE) is one of the most famous rulers in Indian history. His conversion to Buddhism gave the religion a seal of legitimacy much in the same way the conversion of the Roman Emperor Constantine to Christianity would do the same for that faith. Nevertheless, he governed according to the moral precepts of both Hinduism and Buddhism. He began by ordering that his edicts be carved into stones and caves around the empire. Years later, he began ordering that his edicts be carved into large sandstone pillars topped with statues of lions. These edicts address medical treatment, including the ordering of healing herbs planted, a mandate requiring royal officers to take a leave every five years to spend with family, conduct personal business, and seek learning, prescriptions for proper behavior toward relatives, and a provision for religious tolerance. Ashoka also was responsible for the erection of over eighty thousand buddhist stupas to house the relics of Buddhism.
# Primary Mathematics/Scientific and engineering notation
## Scientific and engineering notation

In science and engineering it is necessary to represent extremely small and large numbers. Representing such numbers with conventional notation becomes difficult, for numbers such as these:
One way to represent such numbers is using exponents. The first number, for example, could be represented as one of the following:
The second number could be represented as one of:
This notation is used to make extremely large and small numbers easier to write. It is composed of the base on the left, and the exponent (on the right).

### Scientific notation

In scientific notation, the goal is to get the base number to be greater than or equal to 1.0, and less than 10. So, in the above examples, the two values in scientific notation were:

### Engineering notation

Engineering notation is a variation of scientific notation, where the exponent is a multiple of 3, and the base is as close as possible to the range 0.1-1.0. In the above examples, the two values in engineering notation were:
# Primitive Technology/Digging Stick

A digging stick is a wooden tool used to dig out underground tubers, burrowing animals, and anthills. They were also used by agrarian societies for farming.
Numerous indigenous cultures across multiple continents are known for using digging sticks, most notably the Aztecs, Ethiopians, and the prehistoric inhabitants of New Guinea. The Hadza, a modern African hunter-gatherer ethnic group, continue to utilize digging sticks in the present day. Contemporary survivalists have also experimented with digging sticks.
Due to the decomposing nature of wood, digging sticks are rare in the archaeological record.

## Description
### Dimensions

Typical digging sticks ranged from two to three feet in length, with the bottom tip shaved off at an angle.
The size of digging sticks could be variable, and they may have been adjusted to the height of the user. In New Guinea, archaeologists found that women may have used shorter sticks than men.

### Types
#### Fire Hardened Tip

For some digging sticks, fire hardening was employed to strengthen the tip.

#### Handle

For some digging sticks, a cross-piece would be fit perpendicularly over the top of the stick, allowing the use of two hands to manipulate the tool into the ground.
In some instances, the handle could be decorated ceremonially.

## History
### Non-Human Primates

Chimpanzees have been documented using wooden implements for purposes similar to digging.
They insert sticks into ant, bee, and termite nests to probe and fish for insects. Chimpanzees eat ants and honey as part of their diet.

### Mesolithic Period

Digging sticks have been definitely recovered in the archaeological record since the mesolithic period. Notable archaeological sites include:
* Kuk Swamp (Papua New Guinea)
* Star Carr (England)

## References

* ↑ "Digging stick". Wikipedia. 2018. https://en.wikipedia.org/wiki/Digging_stick. Retrieved 2019-08-03.
* ↑ Binus, Joshua (2004). "Plateau Culture Digging Stick". Oregonhistoryproject.org. Oregon Historical Society. Retrieved 2019-08-04.
* 1 2 Jack, Golson. "Chapter 19 Artefacts of Wood". Ten Thousand Years of Cultivation at Kuk Swamp in the Highlands of Papua New Guinea. ANU Press. pp. 359–372. ISBN 978-1-76046-116-4. Retrieved 2019-08-03.
* ↑ Boesch C, Boesch H. (1990). "Tool Use and Tool Making in Wild Chimpanzees" (PDF). Folia Primatologica. 54: 86–99. doi:10.1159/000156428.
* ↑ Taylor, Maisie. "Chapter 29 The Wooden Artefacts". Star Carr: Studies in Technology, Subsistence and Environment. White Rose University Press. pp. 367–418. ISBN 978-1-912482-01-6. Retrieved 2019-08-04.
# Primitive Technology/Lithic Reduction

Lithic reduction is used to turn common stones into tools.
# Primary Mathematics/Unit expressions
## Unit math

Until now, most of the numbers we've used have been scalar (unitless). However, in the real world, most numbers have units associated with them. There are special rules which apply when doing math on numbers with units.

### Addition and subtraction

The following rules apply:
* If the units are the same, add or subtract normally.
* If the units are different, then:
   * If they can be converted to the same units, then addition and subtraction can occur.
   * If they can't be converted to the same units, then addition and subtraction are not possible.

#### Examples

In the following case, we try adding apples and oranges, but encounter a roadblock:
These two items cannot be directly added together. However, depending on the context, it may be possible to convert them into "pieces of fruit" and add them. The result would look like this:
While the same may apply to subtraction, it is highly dependent on context (for example, the problem may be solvable if you treat it as receiving 4 pieces of fruit and giving 3 pieces of fruit in exchange.).
More commonly, you will encounter situations where you use standard unit conversion (e.g. 1 foot = 12 inches):
A complex example where unit conversion is required:
This method is called unit cancellation, and is quite useful is science and engineering.
Here is an example where it isn't possible to convert to the same units:

### Multiplication and division

When multiplying or dividing numbers with units, the units are also multiplied or divided.

#### Examples

Here's are examples using the same base units:
Here are examples using different base units:
It is also possible to multiply or divide a number with units by a scalar (a unitless number):
So, two groups of 3 apples each gives us 6 apples, while 3 apples divided into 2 equal groups gives us 1.5 apples per group.

### Powers, roots, and exponents

Just like multiplication or division, the operation also applies to the units.

#### Examples

So, in the first case we calculated that a cube 2 feet long on each side has a volume of 8 cubic feet, while in the second case we calculated that a square plot of 100 square miles of land would be 10 miles long on each side.
To distinguish between feet, square feet, and cubic feet, the term "linear feet" is sometimes used to clarify that we are talking about regular feet, not square or cubic feet.

### Unit conversion

Sometimes it is necessary to do a unit conversion by itself. The unit cancellation method shown previously can be applied to convert from any unit to any other compatible units.

#### Examples

Convert 10 miles per day to inches per second:
# Primary Mathematics/Working with fractions
## Working with fractions

Mixed numbers and top-heavy fractions:
A mixed number is an integer and a fraction, eg two and a half, a top heavy fraction is a fraction with a larger numerator than denominator, eg 3/2. For multiplication and division you must not use mixed numbers. They can be used in addition and subtraction (do the integers and fractions separately and combine the result) if this is not too confusing.
Simplest terms: Multiplying (or dividing) the numerator and denominator by the same number will not change the fraction. A fraction is put into its simplest terms by dividing both by the largest integer that goes into both a whole number of times, this can be done in stages using small integers such as 2 and 3, 5 and 10 repeatedly.
Multiplication:
Where ab=a*b.
Division:
To divide fractions; remember that a fraction is a division. Fractions can be stacked like so:
The rule to remember to simplify is that anything under an odd number of lines goes on the bottom and anything under an even number of lines goes on the top (0 is even for this purpose) thus:
It is easier (perhaps) to remember that the second fraction in the division gets turned upside down.
Addition and subtraction:
For addition the denominators of the two fractions must be the same - if this is so then simply add (or subtract) the numerators:
If the denominators are not the same then a common denominator must be found, the simplest way to do this is take the product of the denominators although if one is a multiple of the other simply multiplying it by the applicable integer works as well. Remember to multiply the numerators by the same number. Generally:
But for example
Is possible.
Remember that young children will not understand the algebraic formulation here. The art of primary teaching is finding a way to make this make sense to young children. However, teachers need to know these general rules.
# Primitive Technology
## Preface

Technological advancement is a defining feature of the human species. Since the third millennium B.C., an explosion of discoveries, inventions, and new knowledge has resulted in a highly complex technological tree. As new developments are made in the contemporary era, older skills become increasingly obsolete. Numerous indigenous, traditional, and "primitive" methods are on the verge of extinction.
This project aims to research and collect obsolete knowledge from the past.
The objective is to use a chronological approach to review advancements starting from the prehistoric period.
We utilize a mixture of anthropology, history, and experimental archaeology to develop this evidence-based encyclopedia. While the initial focus of this project is on primitive technologies, the ultimate (yet distant) goal is to eventually pursue the technology tree into the Medieval, Industrial, and Modern eras.

## Table of Contents

    Note: Articles are not strictly intended to be read in order.

### Volume 1: The Scavenger

* Introduction
* Chapter 1: Fresh Water
* Chapter 2: Stone
** Hammerstone
** Tool Stone
** Lithic Reduction
** Chopper
* Chapter 3: Wooden Tools
** Digging Stick
* Fire
* Cordage
# Rust for the Novice Programmer/Comments
## Comments

We're beginning to have a few lines in our code, and sometimes it can awkward to organise properly. One useful tip is that you can put notes or annotations to your code that explains what it does. This is done with comments, with which there are two ways in Rust:
* using '//' before a line means that the rest of the line is ignored by the compiler
* using '/*' means that all the rest of the code will be ignored by the compiler until it finds '*/'
For example:
Here the comment is used to annotate what the next section does. We can also use these comments to stop code from being run temporarily without removing it entirely. For example:
Here the value 10 will be printed since the two lines have the /* */ comments around them so they are not run.
Comments are just generally useful and will be used in later sections to annotate code.
Next: More numbers and data types
# Rust for the Novice Programmer/Basic Maths Testing Program/User Input
## Reading in User Input

Now, we want to read in user input. In the terminal, when the user types in text it gets sent to something called stdin(short for standard input). Again we turn to the standard Rust documentation on stdin. Documentation is extremely important since very few programs live on their own, instead integrating with other code/systems to make it easier to do common things. stdin lies within std::io where std is short for standard and io is short for input/output. std is the Standard library which means it is officially designed and documented by the same group who design the Rust programming language. This generally offers a greater degree of certainty around the code being safe and performant as well as the documentation being clear and detailed. Here, we want to write a new function that waits for user input and when it receives that input, returns the number. First, let's just take in the input and print it out to the terminal:
Notably, the read_line function takes in a mutable string rather than returning a string. This is because it can be costly to create and allocate a string of characters and if we want to append to an existing string, it would require an extra allocation. Therefore, taking in a string buffer allows the user to create their own string or use an existing string which is more flexible without extra cost. It also can fail and produce an error which is in the form of a Result. For now, we will just assume no error and panic if there is an error. Then, we remember to put
at the top, and change our main function to:
And now if we run it, we can see it doesn't stop immediately and we can type in the terminal. When we type something in and press Enter, the thing we typed in is repeated again, indicating that it's working! However, we have a string when we need the user input as a number.
Next: converting a string to a number
# Rust for the Novice Programmer/Enums
## Enums

Let's say we were storing three points which form an angle and we wanted to keep track of some properties about it in a struct. What properties would we want to keep track of in a struct? Well, we could store the three points' x and y positions, the angle between them. Let's say we wanted to store what type of angle it is too. As a reminder: acute angles are less than 90 degrees, right angles are exactly 90 degrees, obtuse angles are more than 90 but less than 180 and reflex are greater than 180. How to store these different states? One simple way might be to assign a number to each one. For example, 0 is acute, 1 is right, 2 is obtuse and 3 is reflex. Let's see how that might work:
Now we have to remember which number corresponds to which angle type. Also there is the possibility that the number is set to something that isn't a valid angle type, when the point of a type system is to ensure that values should only be things that make sense and are valid. This fails in that purpose. This is one reason for enums!
An enum(short for enumerated type) is a way of saying that a thing may be in one of a differing number of states. e.g. A player character may be in an idle, running or jumping state. An image may in an animated or static state. etc. Here, we define our enum like this:
Now, we can put this into our struct like this:
And we use it like this:
Note that we have to write it out quite verbosely, explicitly saying that it is Right of type AngleType. One important thing about Rust is that sometimes it encourages writing things out quite clearly even if this does take longer to write. This is because of some rules of programming:
* Code will be read more times than it is written
* Code is easier to write than read
* Shorter names for types and variables often don't explain things as comprehensively as longer ones
All this means that long term it is better to take time when writing code to save time later on.
Now we can check if an enum is a type we expect with the normal == operator. e.g.
Wait, where's the return statement? And why doesn't it end with a semicolon?? Well because we often want to have short functions, it saves time if we use an implicit return, where we omit the semicolon so the statement returns automatically. The normal rules apply, so the type of the statement must match the return type of the function. This can be useful but can also sometimes be difficult to follow, so use where it makes sense in your view.
Another great thing about Rust enums is that since different states might have different data associated with them, we can store the data in these types. For example, let's say we wanted to add a boolean if the angle is aligned with the axes. This only really makes sense for the right angle, so we can add that boolean like so:
But how do we get values out of enums? That's what pattern matching is for:
Next: Pattern Matching