OpenLLM-France/wikimedia huggingface dataset:
# Guide to Unix/Explanations/awk

The name 'awk' is derived from the names of the three people who originally developed it - Aho, Weinberger and Kernighan. It is a programming language which uses a pattern-action expression that transforms the input to the output. It processes the input (usually a file of data), searching each line for the given pattern. Any line that matches the given pattern has the action applied to it and this constitutes the output. A line that does not match is ignored.
Each input line is divided into fields by a separator character (default is space) and patterns can be matched to these fields as they are referenced in the usual Unix style - $1 being field 1, $2 being field 2 etc. $0 means the entire input line.
If no pattern is specified then all input lines are selected. If no action is specified, the default action is to print the entire line. Therefore if you just want to print a subset of the input, you just need to supply a pattern that will produce the desired results, Awk will print the input as found.
However, you can also specify which fields are to be output in the same way e.g. print $1.
A simple example:
awk '$1 ~ /A/ { print $2 " " $3 }' /etc/passwd

### Program Structure

awk programs consist of a sequence of one or more pattern-action statements:
awk scans input lines of data and performs actions on those lines that match any of the specified patterns.

### Running AWK

Here we call awk from a shell script awk1.sh:
There is no pattern, so every line fed into awk is matched and the action is invoked. Which results in every line of the file being printed on the screen. Thus awk1.sh behaves similar to cat.
To demonstrate, create the file numeric.dat with the contents:
Run awk1.sh on numeric.dat (don't forget to make the script executable):
(Notice how ./ is being used to execute a script.)

### Expressions =

If the first field is equal to one then print the entire line
Results in:
If the second field is equal to "two" then print the entire line:
Results in:
If the first field is greater than 5 then print the third field
Results in

### Regular Expressions

Print the input line if the pattern "ix" is matched in any field
Results in:
Print the input line if the pattern "ix" is matched in the third field:
Results in:
Print the input lines that do not contain the pattern "x"
Results in:

### Compound expressions

Print lines where the third field matches the pattern "x" OR the first field is less than or equal to 3.
Results in:
Print lines where the third field matches the pattern "vi" AND the second field begins with the letter "s".
Results in:

### Ranges

Print lines where the second field equals "three" and where the third field equals "vii" and all subsequent lines in between:
Results in:

### BEGIN and END

BEGIN is a special pattern which matches before the first input line. Similarly END matches after the last input line.
Results in
# History of Oregon/Introduction

This book will serve as a narrative of the history of the great state of Oregon from it's earliest roots to it's most recent historic events.
The goal is to provide a better understanding of Oregon's history by having small sections of Oregon's history in a chronological order that can be read in a short amount of time. These will connect to the other readings in a way that should help to see the importance of the earlier events and how they all relate.
Hopefully this will help to encourage additional research and collaboration on the often under-represented subject of Oregon's History. I encourage anyone who is interested to help contribute and add any additional knowledge they can.
# History of Rail Transport
## Table of contents

* Preface
* Introduction
* Early Rail Transportation
* First Railways
* Steam Locomotives
* Development of the British Railway Network
* Development of Railways in other Countries
* Electric Railways
* Diesel Locomotives
* Bibliography
* Authors and Contributors
# History of Opera
## Introduction

* What is Opera?

## Table of contents
### Early Opera

* Pre-Florentine Camerata
* Florentine Camerata and Contemporaries

### Baroque

* Early Baroque (Monteverdi, Vivaldi, etc)
* Handel

### Classical-Romantic

* Gluck
* Mozart
* Contemporaries of Mozart
* Beethoven

### Italian

* Bel Canto
* Rossini
* Donizetti
* Bellini
* Verdi
* Puccini
* Verismo
* Mascagni
* Leoncavallo

### French

* Early French
* Bizet
* Gounod
* Offenbach
* Debussy

### German

* Early German Opera
* German Operetta
* Wagner
* Strauss
* Korngold
* Berg
* Schonberg
* Weill
# History of Oregon/Formation and geology

Oregon is part of the Continental shelf of North America. The geological evidence suggests the western half Oregon was cemented on by the collision of the Siletzia plate, essentially a large volcanic island, with the original coast millions of years ago.
The western part of the state has a line of Volcanos and mountains that run North and South forming the Cascade Range. Another range of mountains along the coast also have signs of previous volcanism but are now dormant. The eastern part of the state is an semi-arid region of mostly flat-land that gradually increases in elevation as one goes East. The great Columbia River drains the waters of the region into the Pacific Ocean. A large portion of the state rotates in a clockwise direction according to GPS sensors.
Oregon was not affected by the massive Cordilleran Ice Sheets as Washington was, however the meltwater from the retreat created massive floods that surged down the Columbia River and reshaped the lower landscapes.
Geologists:
Thomas Condon

## References:

* ↑ Coseismic Slip in Great Subduction Earthquakes – is it related to subduction erosion and subsidence of the forearc?
# History of Pentecost/Holy Days

The day of Pentecost or the feast of Shavuot is one of the most important feasts in Judaism and great mark in Christianity.This is the day on which the God of Israel gave the law ,He descended on mount Sinai in the form of fire.On this great and wonderful day He wrote the law on stone tablets but in the first day of Pentecost of the new covenant He wrote His law on their hearts through His Spirit.In the new covenant He baptised them with the Holy Spirit and fire.On the first day of Pentecost in the Old covenant three thousand people were killed ,but in the New covenant first day of Shavuot three thousand people/souls were saved.Thus what the apostle Paul said in 2nd Corinthians ,the law kills but the Spirit gives life.Shavuot should be celebrated by the New testament Church but not under obligation or law, but under the spirit of celebrating the descent of the Holy Spirit on the church.
# High School Mathematics Extensions/Further Modular Arithmetic/Project/Finding the Square Root

* HSME
* Content
* Further Modular Arithmetic
* Multiplicative Group and Discrete Log
* Problems & Projects
* Problem Set
* Project
* Solutions
* Exercises Solutions
* Problem Set Solutions
* Misc.
* Definition Sheet
* Full Version
* PDF Version

## Legendre Symbol

.. to be expanded There is actually a simple way to determine whether a is square
Let g be a generator of G where G is the multiplicative group mod p. Since all the squares form a group therefore, if a is a square, then
    $a^{\frac {p-1}{2}}\equiv 1$
and if a is not a square then
    $a^{\frac {p-1}{2}}\equiv -1$
we shall use these facts in the next section. .. to be expanded

## *Finding the square root*

We aim to describe a way to find a square root in mod m. Let's start with the simplest case, where p is prime. In fact, for square root finding, the simplest case also happens to be the hardest.
If p ≡ 3 (mod 4) then it is easy to find a square root. Just note that if a has a square root then
    $(a^{\frac {p+1}{4}})^{2}\equiv a^{\frac {p+1}{2}}\equiv a^{\frac {p-1}{2}}a\equiv a$
So let us consider primes equivalent to 1 mod 4. Suppose we can find the square root of a mod p, and let
    $x_{0}^{2}\equiv a{\pmod {p}}$
With the above information, we can find the square of a mod p$^2$. We let
    $x=x_{0}+x_{1}p\!$
we want x$^2$ ≡ a (mod p$^2$), so
    $x^{2}=x_{0}^{2}+2x_{0}x_{1}p+x_{1}^{2}p^{2}\!$
    $x^{2}=a+kp+2x_{0}x_{1}p{\pmod {p^{2}}}\!$
for some k as $x_{0}^{2}\equiv a{\pmod {p}}$ so $x_{0}^{2}=a+kp$, we see that
    $x^{2}=a+p(k+2x_{0}x_{1}){\pmod {p^{2}}}\!$
so if we need to find $x_{1}$ such that $k+2x_{0}x_{1}\equiv 0{\pmod {p}}$, we simply need to make $x_{1}$ the subject
    $x_{1}\equiv -k(2x_{0})^{-1}{\pmod {p}}$.
..generalisation ..example
..method for finding a sqr root mod p
# High School Mathematics Extensions/Logic/Problem Set/Solutions
## Logic Problem Set Exercises

1.
    $x'\Rightarrow y'=x+y'$
    $y\Rightarrow x=y'+x=x+y'$
    Thus the statements are the same
2.
    $(x\Leftrightarrow y)\Rightarrow z=$
    $(x\Leftrightarrow y)'+z=$
    $(x'+y)'+z=$
    $xy'+z$
3.
    a. $(\forall x)(x^{2}=9\Rightarrow x^{2}-6x-3=0)$
    x$^2$ = 9 means that x can be 3
    3$^2$ - 6*3 - 3 = 0 is false
    Thus the sentence is false
    b.$(\exists x)((x^{2}=9)\times (x^{2}-6x-3=0))$
    For this equation to be false we need an x so that x$^2$=9 and x$^2$ - 6x - 3 = 0 are both false.
    The values of x for which x$^2$=9 is true are x=3 and x=-3
    The values of x for which x$^2$ - 6x - 3 = 0 is true are $x=2{\sqrt {3}}+3{\mbox{ and }}x=-2{\sqrt {3}}+3$
    Since none of the values for x are the same there exist no numbers at all for which the statement is true.
4. (This solution is due to Tom Lam). Let (x+y)w+z = a NAND b , where a and b can either be one of x,y,w,z or another NAND operator.
$(x+y)w+z=(ab)'$
$(x+y)w+z=a'+b'$
Therefore $a=[(x+y)w]'$ and $b=z'$ , both need further NAND operators. Let a = c NAND d , and let b = e NAND f.
$(x+y)w+z={(cd)'}^{'}+{(ef)'}^{'}$
$(x+y)w+z=cd+ef$
Therefore d=w, e=f=z,c=x+y.Let c = g NAND h.
$x+y=(gh)'$
$x+y=g'+h'$
Now g=x' and h=y', we still need more NAND operators. Let g = i NAND j and let h = k NAND l.
$(ij)'=x'$ $x=ij$ $(kl)'=y'$ $kl=y$
Therefore i=j=x and k=l=y.
Now substitute all the variables back, you should get: (x+y)w+z={[(x NAND x) NAND (y NAND y)] NAND w} NAND (z NAND z)
Alternatively Each of AND, OR and NOT can be expressed in terms of NAND only. And therefore any boolean expression can be written down entirely in terms of NAND. This property is called the universality of NAND. Remember x NAND y = (xy)'
Firstly,
    NOT x = x' = x'x' = (xx)' = x NAND x
also,
    x OR y = x + y = (x'y')' = (x NAND x) NAND (y NAND y)
and
    x AND y = xy = (xy)' ' = (x NAND y) NAND (x NAND y)
Now
    (x + y)w = ((x NAND x) NAND (y NAND y)) NAND w
and so
    (x + y)w + z = ((((x NAND x) NAND (y NAND y)) NAND w) NAND (((x NAND x) NAND (y NAND y)) NAND w)) NAND (z NAND z)
# High School Mathematics Extensions/Mathematical Programming/Exercise 1: Implementing Commands
## Explanation

Includes
Type Definitions
Function Prototypes
Global Variables
Function Definitions

## Next Step

* Exercise 1: The Complete Program
# High School Mathematics Extensions/Mathematical Programming/Exercise 1: The Complete Program
## Explanation

Program for looking at integer division and modulus.

## Return to Mathematical Programming

Back to the article
# High School Mathematics Extensions/Mathematical Programming/Exercise 1: Processing Commands
## Explanation

Includes
stdio.h
conio.h
Type Definitions
Values for TRUE and FALSE to get away from the standard C syntax of just testing for zero / not zero.
Function Prototypes
Prototype so we don't need to worry about forward references.
Global Variables
done = loop control in main. r = denominator(on the right hand side of the operators). l = numerator (on the left hand side of the operators).
Function Definitions init - set global variables. input_message = prompt for a command. input = read command. get_integer = read an integer. retrieve_keypress = look for a keypress. validate = make sure the command is one the program can handle. execute_command = map the command on to the routines to implement it. output_divide = implement divide '/'. output_modulus = implement modulus '%'. output_values = print out l and r.

## Next Step

* Exercise 1: Implementing Commands
* Exercise 1: The Complete Program
# Markov Chains

In short, Markov Chains are models of a random process that is based on the probabilities of previous process. In other words, the following state of the model is dependent on the probabilities of the previous state of the model. These models have to follow a rule known as the Markov Property, a property that requires the probability of the future of a random process (a stochastic process in math lingo!) to be dependent only on its present state.
For example, based on the Example Markov Chain Image to the right, the probability that a creature will eat a certain food (whether that be grapes, lettuce, or cheese) is dependent on the last one they ate. If they ate lettuce previously, they have a 40% chance to eat grapes next, a 60% chance they will eat cheese next, and a 0% chance they will eat more lettuce afterwards.
# High School Mathematics Extensions/Mathematical Programming/Input Revisited
## Explanation

One new functions was added: float get_delta.
One function was changed: void execute_command(char command).
Function Additions
float get_delta
   * Prompts for delta.
   * Uses cscanf to guarantee floating point input.
   * Calls getch function to empty input buffer.
   * Calls cprintf("\n") to move down a line in output.
   * Validates and prints delta.
Function Changes
void execute_command(char command)
   * Add code to call get_delta for 'd' or 'D' commands.

## Next Step

* The Complete Program
# High School Life Science/Cell Division

more information about hight School Life Science we are here for you
# High School Geometry/Surface Area and Volume

* The Polyhedron
* Representing Solids
* Prisms
* Cylinders
* Pyramids
* Cones
* Spheres
* Similar Solids
# High School Life Science/Cell Division, Reproduction, and DNA

* Cell Division
* Reproduction
* DNA, RNA, and Protein Synthesis
# High School Life Science/Cell Functions

* Transport
* Photosynthesis
* Cellular Respiration
# High School Life Science/Behavior of Animals

* Understanding Animal Behavior
* Types of Animal Behavior
# High School Life Science/Birds and Mammals

* Birds
* Mammals
* Primates and Humans
# High School Life Science/Cardiovascular System

* Introduction to the Cardiovascular System
* Heart and Blood Vessels
* Blood
* Health of the Cardiovascular System
# High School Geometry/Transformations

* Translations
* Matrices
* Reflections
* Rotation
* Composition
* Tessellations
* Symmetry
* Dilations
# High School Life Science
## Support system in animals

    Authors
* Studying Life
* Introduction to Living Organisms
* Cells and Their Structures
* Cell Functions
* Cell Division, Reproduction, and DNA
* Genetics
* Evolution
* Prokaryotes
* Protists and Fungi
* Plants
* Introduction to Invertebrates
* Other Invertebrates
* Fishes, Amphibians, and Reptiles
* Birds and Mammals
* Behavior of Animals
* Skin, Bones, and Muscles
* Food and the Digestive System
* Cardiovascular System
* Respiratory and Excretory Systems
* Controlling the Body
* Diseases and the Body's Defenses
* Reproductive Systems and Life Stages
* From Populations to the Biosphere
* Ecosystem Dynamics
* Environmental Problems

## Resources

* PDF Version (Part 1) (info)
* PDF Version (Part 2) (info)
* PDF Version (Part 3) (info)
* Teacher's Guide (info)
# High School Life Science/Authors
## Jean Brainard

Dr. Jean M. Brainard is a freelance health and science writer and curriculum specialist living in central Ohio. She received a master's degree from the Harvard School of Public Health and a doctorate in biomedical anthropology from the State University of New York at Binghamton. A former university professor, Dr. Brainard has written hundreds of textbook chapters and encyclopedia articles on a diversity of subjects, as well as numerous professional publications based on her own research.

## Niamh Gray-Wilson

Niamh Gray-Wilson is a freelance science writer and editor living in Austin, Texas. She hails from Galway, Ireland, and graduated from the National University of Ireland, Galway with a bachelor's degree in microbiology.

## Jessica Harwood

Jessica Harwood is a freelance writer and a Professor of Biology at Spartanburg Methodist College. She earned a B.A. in biology from Ohio Wesleyan University, a M.S. in botany from the University of Wisconsin-Madison, and a M.A. in professional communication from Clemson University.

## Doris Kraus

Dr. Kraus received her Ph.D. in zoology from Rutgers University. For over 20 years she has been a freelance science and medical writer and editor, for both technical and lay audiences. Dr. Kraus has contributed to several books, has written for a variety of media including educational publishing, newspapers and radio, and has consulted for public television. She received an American Medical Writers Association award for a newspaper series on Alzheimer's Disease.
# HydroGeoSphere/Problem Identification

The first section of the prefix.grok file should consist of a description of the problem being defined. As for the rest of the file, blank lines and lines beginning with an exclamation point (!) are ignored.
The description can contain from zero up to as many lines as the user requires to describe the problem. Each line can contain up to 60 characters. The description is printed at the beginning of the listing files for grok (prefixo.eco) and HydroGeoSphere (prefix.lst).
The user must signal the end of the description using the End instruction.

## End

This instruction signals the end of the description, and control is then passed back to the preprocessor.
# HydroGeoSphere/Properties Guidelines
## Types of media

Currently, the following basic types of media can be defined in HydroGeoSphere:
* porous
* dual continuua
* discretely-fractured
* surface runoff
* channel flow
* et
Porous media and dual continuua are defined by three-dimensional 8-node (brick) or 6-node (prism) elements, discretely-fractured, surface flow and ET media are defined by two-dimensional 4-node (rectangle) or 3-node (triangle) elements and channel flow media are defined by 1-node (line) elements. By default, every 3-D element in the problem domain is a porous media element. Elements of the other four types of media may or may not be defined for a specific problem.

## Elements

Each porous media element is assigned a zone (i.e. material) number during grid generation. In simple cases, all elements will be assigned a zone number of 1, while in more complex cases, elements may have been assigned different zone numbers. For example, if a multilayered grid was generated using the instruction Generate layers from slice then the elements would have been assigned zone numbers based on the layer number (i.e. elements in the lowest layer number 1 would be assigned a material number of 1).
By default, all zones, and therefore all elements in the domain, are assigned the same default porous media properties, which are listed in Table 5.5. These values are set in software and cannot be modified by the user unless the code is changed and recompiled. However, there are other ways of changing the porous media zone properties as we will discuss below.
The first step in modifying zoned properties for a given problem is to indicate which type of medium is to be manipulated. The following instruction does this:

## Use domain type

* zone_type Can be one of the strings: porous media, dual, fracture, surface, channel or et.
Causes grok to read a string defining the type of domain to which additional instructions should be applied.
# HydroGeoSphere/Reading an Existing 3-D Grid

In some cases, the grid generation step can be very time-consuming. If this is so, then the following instruction can be used to read a grid which was generated in a previous run:

## Read 3D grid

The grid whose prefix matches that of the prefix.grok file will be read in.
These instructions show how to set up the grid generation section of the prefix.grok file to use the Read 3d grid instruction:
In the first run, one can read the slice and generate the layered grid. It is important that the instruction write faces and segments be included if you are using any of the choose face or choose segment instructions later in the prefix.grok file.
On subsequent runs, one can skip over the grid generation commands and use the read 3D grid instruction instead.
# HydroGeoSphere/Pore Water Freezing and Thawing

To calculate the freezing and thawing of pore water, HydroGeoSphere requires the following set of instructions:

## Pore water freezing-thawing...End

grok reads instructions that define the pore water freezing and thawing parameters for the domain until it encounters an End instruction.
For example:

## Surface temperature

* time(i), val(i)...end The time and surface temperature value list.
At time time(i) the value val(i) is applied and maintained until time time(i+1). The last value entered in the list will be applied until the end of the simulation.

## Thermal diffusivity

* val Thermal diffusivity [L$^2$ T$^{−1}$].

## Background temperature

* val Background temperature [Θ].

## Melting temperature

* val Melting temperature [Θ].

## Freezing temperature

* val Freezing temperature [Θ].

## Maximum freezing depth

* val Maximum freezing depth [L].

## Integration convergence criteria

* val Integration convergence criteria.

## Memory length for convolution integral

* val Memory length for convolution integral.
# HydroGeoSphere/Porous Medium (Variably-Saturated)

By default, all porous media zones (and elements) in the domain will use a constitutive relationship based on the pseudo-soil relation, as developed by Huyakorn et al. [1994]. Essentially, in the pseudo-soil relationship, the medium is assigned a nodal saturation of 1 above the water table and 0 (zero) below it. Relative permeability is applied to horizontal flow only and water travels vertically under saturated hydraulic conductivity conditions.

## Default constitutive relationship values

If you wish to use Van Genuchten or Brooks-Corey functions to describe the constitutive relationship you can do so using the instructions given in Section 5.8.3.4. Unless you modify them, the default values given in Table 5.11 will be used to define the functional relationships:
Table 5.11: Default Values for Functions Defining the Porous Media Constitutive Relationships, for the Van Genuchten and Brooks-Corey models :
| Parameter | Value | Unit |
| Common: | - | - |
| Residual water saturation, $S_{wr}$ | 0.053 | - |
| Pore-connectivity, $l_{p}$ | 0.5 | - |
| Beta (power index), ${\beta }$ | 3.1768 | - |
| Van Genuchten: | - | - |
| Alpha (power index), ${\alpha }$ | 3.5237 | m$^{−1}$ |
| Gamma (power index, computed), ${\gamma }$ | 1 - 1/${\beta }$ | - |
| Brooks-Corey: | - | - |
| Exponent (computed) | 2/${\beta }$ + $l_{p}$ + 2 | - |
| Air entry pressure, ${\psi }_{ae}$ | -0.16 | m |
| Alpha (power index, computed), ${\alpha }$ | -1/${\psi }_{ae}$ | m$^{−1}$ |

## Default pressure-saturation and saturation-permeability

If you wish to use tables to describe the constitutive relationships you can do so using the instructions given in Section 5.8.3.5. Unless you modify them, the default values of water saturation versus pressure head and saturation versus relative permeability listed in Table 5.12 will be used to define the tabular relationships:
Table 5.12: Default Pressure-saturation and Saturation-relative permeability Tables for Variably-saturated Porous Media :
| Pressure(m) ${\psi }$ | Saturation $S_{w}$ |
| -10.0 | 0.053 |
| 0.0 | 1.0 |
| Saturation $S_{w}$ | Relative permeability $k_{rw}$ |
| 0.053 | 0.053 |
| 1.0 | 1.0 |

## Relative permeability xy

Scope: .grok .mprops
When using functions or tables to define the constitutive relationships, this instruction causes grok to apply the relative permeability to horizontal flow only so that water travels vertically under saturated hydraulic conductivity conditions, similar to the behaviour of the pseudo-soil relation. This instruction should be applied to porous media, as discussed in Section 5.8.1.