OpenLLM-France/wikimedia huggingface dataset:
# Introduction to Programming Languages/Types of Storage
### Introduction

The memory in a computer is organized in a hierarchical way. The lowest level memory unit is a register, followed by the cache memory, then the RAM, hard driver, and so on. This organization of the computer's memory is specially useful because most programs need more memory than they are supposed to use.
Program variables are the link between abstractions represented by a program and the computer physical memory units. For instance, in C, you can use the keyword `register` to give the compiler a hint that a variable will be frequently used.
There are also other ways to specify where a variable should be stored. In dynamic typed languages (such as PHP, Javascript, or Python), the programmer cannot tell where a variable should be stored; the interpreter makes that decision. In statically typed languages (such as C and C++), on the other hand, the programmer can tell, based on the type of a variable, where the compiler should store each variable.
The compiler (or the Operating System, for that matter) can put variables in one of three places whithin the program's memory: static memory, stack, or heap. The following sections will cover with more details these three types of memory.

### Types of Storage

We will use the program below to illustrate several concepts throughout this section. Let us take a look at it.
Roughly, the program above declares several types of variables. It serves to illustrate the three kinds of storage we will be discussing in this section. But, first, let us recap what happens when the Operating System loads a program into memory.
When a program is loaded into memory, it is organized into different segments. We show these segments below.
From the figure above we can point out a couple of things. First, the program's instructions (the code itself) goes into the text section. The data and bss sections correspond to the static memory. The heap and the stack are the other memory regions program variables can go into.
# Introduction to Programming Languages/Unification Cost Model

We start this section with a motivating question. What is the complexity of the predicate below, written in Prolog?
One could be easily tempted to say that this predicate is linear on the number of arguments of the smallest list. Yet, we could think about calls like:
We cannot solve this call to &= with two operations only. It is necessary to compare, one by one, all the two sublists that make up the larger lists. In this case, the complexity of &= is proportional to the size of the lists, not the number of elements of the lists. Unification-based search algorithms must scan entire data-structures in order to infer properties about them. And this scanning operation is exhaustive: every single possible combination of valid clauses will be explored during the resolution of unification. This brings in an important point: for efficiency reasons, it is better to solve the most restrictive clauses first, leaving those that are more open for later. For instance, let's consider the following predicates:
Given these terms, what, among these two implementations, is the best?
The second predicate is more efficient. To see why, notice that there are two clauses that unify with male(X) in our database of predicates: male(a) and male(b). Thus, the search tree for grandfather_2 starts with two nodes. Each of these nodes, which unifies with parent(X, Y), can have up to two nodes only, either parent(a, b) or parent(d, a), for a and d are the only atoms that satisfy male(X).
Had we used grandfather_1, then the story would be different. Our search tree, this time, starts with five nodes, for parent(X, Z) unifies with five clauses. Each one of these nodes, in turn, span three new nodes. This search tree is much larger than that one that grandfather_1 produces; consequently, it also takes longer to build. The bottom line of this discussion is: even though the order of terms within a predicate should bear no implication on its correctness, this order is still relevant for efficiency reasons. More restrictive predicates should come first, for they are more effective in pruning the search tree that is explored during the unification process.
← Tail Call Cost Model · Array Cost Model →
# Introduction to Psychology/Abnormal Psychology/Disorders of Childhood and Adolescence
## Oppositional Defiant Disorder and Conduct Disorder

* Causes
* Treatments

## Attention-Deficit/ Hyperactivity Disorder

* Causes
* Methods of Assessment
* Treatments

## Elimination Disorders

* Enuresis
* Encopresis

## Long-term Disorders that Begin in Childhood

* Pervasive Developmental Disorders
* Mental Retardation
# Introduction to Psychology
## Table of Contents

* Introduction
* History
* Biological basis of behavior
* Sensation and Perception
* States of Consciousness
* Human Development
* Learning
* Memory
* Language and Cognition
* Motivation and Emotion
* Personality
* Intelligence
* Psychological Disorders
* Psychotherapy and Intervention
* Branches of Psychology
** Abnormal Psychology
** Normal Psychology
** Biopsychology
** Behavior Analysis
** Child and Adolescent Psychology
** Clinical Psychology
** Cognitive Psychology
** Developmental Psychology
** Educational Psychology
** Evolutionary Psychology
** Experimental Psychology
** Forensic Psychology
** Health Psychology
** Neuropsychology
** Neuroscience
** School Psychology
** Industrial-Organizational Psychology
** Personality Psychology
** Social Psychology
** Judgment and Decision Making
** Psycholinguistics
** Autism
* Social Psychology
* Psychophysics
* Research Methods in Psychology
** Scientific Experiment
** Field Study
** Surveys
** Case Studies
* Criticisms of Psychology
* References
# Introduction to Programming Languages/Syntax Directed Type Checking
### Syntax Directed Type Checking

Compilers and interpreters can rely on grammars to implement many different forms of program verification. A well-known static verification that compilers of statically typed languages perform is type checking. Before generating machine code for a program written in a statically typed language, the compiler must ensure that the source program abides by the typing discipline imposed by that language. The type checker verifies, for instance, if the operands have the type expected by the operator. A important step of this kind of verification is to determine the type of arithmetic expressions. In our language of arithmetic expressions every program is an integer number. However, below we show a slightly modified version of that very language, in which numbers can either be integers or floating point.
Many programming languages allow the intermixing of integer and floating point data types in arithmetic expressions. C is one of these languages. The type of a sum involving an integer and a floating point number is a floating point number. However, there are languages that do not allow this kind of mixture. In Standard ML, for instance, we can only sum up together two integers, or two real numbers. Lets adopt the C approach, for the sake of this example. Thus, the attribute grammar below not only implements an interpreter for our new language of arithmetic expressions, but also computes the type of an expression.
If we save the grammar above in a file called type_checker.pl, we can use it as in the execution section below. As we can see, expressions involving integers and floats have the floating point type. We have defined a meet operator that combines the different data types that we have. This name, meet, is a term commonly found in the jargon used in lattice theory.
← Syntax Directed Translation · Compiled Programs →
# Introduction to Game Theory/Short history

Game theory can be traced back to Babylonian times, in the so called Marriage Contract Problem, although this was only recognised as such in 1985. Game Theory really began to emerge as a subject in the 1900s. Firstly by Ernst Zermelo in his paper Über eine Anwendung der Mengenlehre auf die Theorie des Schachspiels ("On the Application of Set Theory to the Theory of Chess") of 1913, in which the first 'theorem' of game theory was published. This theory (known as Zermelo's Theorem) states that in the game of chess either white can force a win, or black can force a win, or both sides can force at least a draw.
The field came into being properly with the 1944 classic Theory of Games and Economic Behavior by John von Neumann and Oskar Morgenstern.
← Overview · Theory of rational choice →
# Introduction to Human Geography/Belief Systems
## Relation of Geography and Belief systems

Many religions place great importance on specific locations. For example, the city of Jerusalem is particularly important to followers of Judaism, Christianity, and Islam. Other cities may be important to a specific religion, such as the Vatican City for Catholicism, or how Mecca is of great importance to followers of Islam. Some religions place great importance on natural features, such as the River Ganges in Hinduism, Mount Fuji in Shintoism, or the Black Hills for the beliefs of several Indigenous American peoples.

## Relation of Geography and Belivers

Some countries are nearly exclusively a specific religion. For example, Vatican City is exclusively inhabited by Catholics. Other countries, such as the United States, possess a wide variety of religions. Some countries are mostly irreligious, such as North Korea, where the majority of people profess no religion officially. Oftentimes within a multicultural country, a specific region or city will be predominantly of a certain religion, such as how Salt Lake City in the United States, which possesses a Mormon population much higher then the national average.
Typically believers live in areas where there are communities of other believers of the same religion or belief system, though there are exceptions. This can be for a variety of reasons, such as being born into a religion, community support provided by other believers, or other reasons. Some believers will specifically seek out areas that lack believers, as missionaries do.
# Introduction to Game Theory/Strategic games

Like most sciences, Game theory is an attempt to model the world in a useful and objective way. The simplest model, the strategic game, is often a suitable analog for an analysis. Strategic games have three components: a set of players, for each player a set of strategies, and additionally a payoff function indicating how desirable each game outcome is for the player. The players in the game are the same as the players in the strategic model. Each player plays the game based on the strategic preference of that particular player. By giving each player a strategy, we get the outcome of the game. In mathematical notation:

## Notes

* ↑ If a player has "rational" preferences as defined earlier and there are a finite number of possible game outcomes then we can always represent the preferences using a function.
← Theory of rational choice · Prisoner's Dilemma →
# Introduction to Geochronology/Random and/or Systematic
## Random/internal uncertainties

Random/internal uncertainties are those relating to the measurement of isotopic ratios of the sample, standards and blank and are used in the derivation of errors of the radiogenic ratios. These uncertainties are intrinsic to each analysis and represent the minimum uncertainty that must be considered. Most of these sources of random uncertainty relate to the mass spectrometry measurements and our ability to measure and reproduce isotopic ratios. Factors such as the electronic noise of detectors place a theoretical limit on the precision which can be achieved by detecting a certain number of ions over a finite period of time (counting statistics). However for almost all geochronologic applications other factors such as correction for mass dependent fractionation that occurs during sample ionisation, and correction for common and/or initial parent and daughter nuclide dominate the analytical uncertainty budget. It is possible to reduce the uncertainty in the mass dependent fractionation via ‘double-spiking’, where two tracer isotopes of the same element (202Pb-205Pb, or 233U-235U for example) are used for real time mass fractionation correction.
# Haskell/Performance examples

* Performance examples (Solutions)
* Haskell Performance
* Introduction
* Step by step examples
* Graph reduction
* Laziness
* Time and space profiling
* Strictness
* Algorithm complexity
* Data structures
* Parallelism
Goal: Explain optimizations step by step with examples that actually happened.

## Tight loop

dons: Write Haskell as fast as C: exploiting strictness, laziness and recursion.
dons: Write Haskell as fast as C: exploiting strictness, laziness and recursion.

## CSV Parsing

haskell-cafe: another Newbie performance question I hope he doesn't mind if I post his code here, I still have to ask him. -- apfeλmus 08:46, 18 May 2008 (UTC)
I think there was another cvs parsing thread on the mailing list which I deemed appropriate, but I can't remember.

## Space Leak

jkff asked about some code in #haskell which was analyzing a logfile. Basically, it was building a histogram
The input was a 1GB logfile and the program blew the available memory mainly because the ByteString.copy weren't forced and the whole file lingered around in memory.

## Branch Prediction Failure

This code demonstrates how your CPU may fail or succeed in predicting code branches (aka if clauses). The code generates a large random Vector of Ints. From this we compute the sum of all numbers larger than 999. If the data is sorted the CPU can easily deduce the probable outcome of the next branch. If the data is not sorted this will be much more difficult and less successful. Unfortunately, sorting for one purpose only is seldom a good idea. The code uses the criterion package for time measurement. Compile this e.g. with -Wall -keep-llvm-files -O2 -optlo-O3 -fllvm -rtsopts -threaded -eventlog -feager-blackholing -fmax-simplifier-iterations=20 -fsimplifier-phases=3 -fno-liberate-case -fspecialise-aggressively. The idea is from github.com/Kobzol/hardware-effects. (tkx68hamburg)
* Performance examples
* Solutions to exercises
* Haskell Performance
* Introduction
* >> Step by step examples
* >> Graph reduction
* >> Laziness
* >> Time and space profiling
* >> Strictness
* >> Algorithm complexity
* >> Data structures
* >> Parallelism
* Haskell
* Haskell Basics
* >> Elementary Haskell
* >> Intermediate Haskell
* >> Monads
* Advanced Haskell
* >> Fun with Types
* >> Wider Theory
* >> Haskell Performance
* Libraries Reference
* >> General Practices
* >> Specialised Tasks
# Haskell/Phantom types

* Phantom types (Solutions)
* Fun with Types
* Polymorphism
* Existentially quantified types
* Advanced type classes
* Phantom types
* Generalised algebraic data-types (GADT)
* Datatype algebra
* Type constructors & Kinds
Phantom types are a way to embed a language with a stronger type system than Haskell's.

## Phantom types

An ordinary type
its phantom type version
Nothing's changed - just a new argument a that we don't touch. But magic!
Now we can enforce a little bit more!
This is useful if you want to increase the type-safety of your code, but not impose additional runtime overhead:
* Phantom types
* Solutions to exercises
* Fun with Types
* Polymorphism
* >> Existentially quantified types
* >> Advanced type classes
* >> Phantom types
* >> Generalised algebraic data-types (GADT)
* >> Datatype algebra
* >> Type constructors & Kinds
* Haskell
* Haskell Basics
* >> Elementary Haskell
* >> Intermediate Haskell
* >> Monads
* Advanced Haskell
* >> Fun with Types
* >> Wider Theory
* >> Haskell Performance
* Libraries Reference
* >> General Practices
* >> Specialised Tasks
# Introduction to Philosophy/What is Doing Philosophy?
## Doing Philosophy

Many fields can be studied and learned without ever actually working with the tools in field. For instance, chemistry can be learned in depth without ever picking up a test tube or mixing ionic compounds. Philosophy, however, is more about the methodology behind deriving answers than it is about the answers themselves. As such, students studying philosophy must use the methodology of philosophy on the philosophy they are learning as they are learning it. Doing philosophy involves asking the right questions, critically examining the work of previous philosophers, truly understanding the works and the reasoning behind the works, and possibly building on the works of previous philosophers by expanding or testing this methodology.
← The Branches of Philosophy · Introduction to Philosophy · Logic →
# Introduction to Philosophy/Why Study Philosophy?

We can hone our analytic and problem-solving abilities, and improve the way we think about thinking, by studying fundamental questions. It is often the reasoning and answers other people have come up with when faced with similar questions that can help most. This is useful in both academic and practical applications.
The choice of essential questions is itself also interesting, as well as the answers - both questions posed, and answers given by particular philosophers depend on the time or era in which they lived.
Often, philosophers will go into professional fields such as law, medicine, and government. However, philosophy is about a great deal more than just academic education, analytical skills, and improving one's prospects for employment. It is not to be confused with history, semantics or debating (though all these elements are part of the study).
The study of philosophy is best undertaken seriously as an attempt to understand oneself and the universe, and even to reconcile the two. While a few years of reading up on philosophical history will certainly improve the quality of one's thinking, philosophy truly becomes worthwhile when it changes our lives. A thorough examination of internal and external life can dramatically change the way we see the world, casting a clearer light on phenomena that we were once immersed in. In this way, the study of philosophy is the study of our lives.
Introduction to Philosophy · What is Philosophy? →
# Final Fantasy IV/Opening Scene

In the opening cinematic, Cecil and the crew of the Red Wings approach the city of Mysidia on a mission to take the Crystal of Water and return it to the empire of Baron. The crew objects to this theft of the Crystal, but Cecil ensures that they comply with their orders. Two Black Wizards, a White Wizard, and the Elder of Mysidia attempt to block the Red Wings, but the three wizards are slain and the Elder injured. The Red Wings take the Crystal.
The crew complains more, lamenting that the elite air force of Baron is reduced to looting missions. Cecil reminds them that the King of Baron's orders are absolute. The Red Wings are then attacked by monsters. Cecil blasts a trio of FloatEyes with the FireBomb spell and counters an attack by a Raven with the Lit-Bolt.
Upon the Red Wings' return to Baron, Cecil reports back to the King of Baron to hand over the Crystal. Chancellor Baigan picks up on Cecil's doubts about the morality of the mission, whispering about Cecil's disloyalty to the King. This leads to the King dismissing Cecil from his command. To demonstrate his loyalty, Cecil must hunt the Summoned Monsters of the Misty Valley and deliver a Package to the village of Mist. The Dragoon Kain protests this treatment of Cecil and is ordered by the King to accompany him.
Return to Final Fantasy IV
# Final Fantasy IV/Red Wings

The Red Wings are the elite air force of Baron. They are the primary weapon that the King of Baron uses to enforce his will across the world. They are captained by Cecil, a Dark Knight.
They are currently engaged in retrieval of the Crystals, including the Crystal of Water from Mysidia. This mission has caused most of the crew of the Red Wings to object. Even Cecil expresses doubt, causing his removal as captain of the airships.
Return to Miscellaneous
# Final Fantasy IV/Sealed Cave
## Locate Sealed Cave

To the south in the underground is a cave which is completely surrounded, and can only be entered from above. This is the sealed cave, so land the airship and enter the cave.
Note: if you already obtained the Dark Crystal by having Rydia cast Warp in the Dwarven Castle throne room, you do not have to complete the Sealed Cave. This only works in the SNES version.
It would be prudent to carry at least 15+ Phoenix Down/Life items into this dungeon, just in case.

## Enter the Cave

When you enter the cave, approach the door. Use the Luca key on it and it will be unsealed. In the next room follow the path all the way around the room, until you reach the second door in the room. Like almost every door in the cave, this door is a trap, and you will have to fight it in order to pass through.

## Trap Door

TrapDoors attack using a combination Search, then Disrupt. They will first use Search, then about 2 rounds later they will use Disrupt which will automatically kill that member of your party. If you have not defeated the TrapDoor past a certain point, it will change into another monster, which you will have to defeat also in order to pass.

## Many Doors

In the next room you can ignore all the doors, and continue into the next room. In this room, go to the right, then up and you will reach a long stretch with many trap doors. None of them are necessary to continue, but some contain chests, and one has a save point. Continue past them to the door at the bottom left of the room to continue through the cave.

## Keep Moving

The next two rooms are small, continue through them, ignoring the trap door in the second room. In the large room you next reach, cross the rope in the center of the room, then go to the left and down the staircase.

## Save Point

Use the savepoint in the next room, then continue on. The next room is a large circle. Ignore the ropes and go all the way around the edge and down the stairs in the middle. In this room you will see a bridge with one final trap door. Enter it and defeat it.

## EvilWall

Retrieve the crystal, and attempt to leave the cave. When you try to cross the bridge, you will be interrupted by another trap. This one is a Wall that will move toward you as you attack, killing you if it gets too close. You must defeat it as quickly as possible. Cast Berserk on Cecil and Edge (and maybe Kain), and have Rydia cast Virus/Bio.

## Kain

Now you can leave the cave (Exit and Warp will not work so you have to walk). Just as you are about to exit the cave, Kain will steal the crystal and leave your party. After this occurs, leave the cave and fly back to the Gnome City.

## Visit Cid

First, go visit the king, and he will tell you that you must return to Mysidia to get the ship necessary to fly to the moon. Cid will enter the room then attach a drill to your airship. Finally, get in the airship and go to the circle in the northeast part of the underground, place your airship above it, then press the button to land, and you will drill your way out of the underground.

## Optional Sidequest

This would be a good point to attempt the Sylph Cave.